@agg-market/ui 1.0.0 → 3.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.
Files changed (129) hide show
  1. package/dist/badge.d.mts +5 -3
  2. package/dist/badge.d.ts +5 -3
  3. package/dist/badge.js +52 -12
  4. package/dist/badge.mjs +1 -1
  5. package/dist/button.d.mts +2 -2
  6. package/dist/button.d.ts +2 -2
  7. package/dist/button.js +19 -34
  8. package/dist/button.mjs +2 -2
  9. package/dist/card.d.mts +4 -2
  10. package/dist/card.d.ts +4 -2
  11. package/dist/card.js +8 -4
  12. package/dist/card.mjs +1 -1
  13. package/dist/chart.js +14 -7
  14. package/dist/chart.mjs +2 -2
  15. package/dist/{chunk-ZYREURXK.mjs → chunk-2MJY6RVY.mjs} +35 -35
  16. package/dist/{chunk-P23GR7NX.mjs → chunk-422MCIXV.mjs} +1 -1
  17. package/dist/chunk-4KMFDCAH.mjs +371 -0
  18. package/dist/{chunk-HM3CGN32.mjs → chunk-5GDNWQZS.mjs} +46 -46
  19. package/dist/{chunk-VIP7HSOU.mjs → chunk-5K7VXAYM.mjs} +4 -0
  20. package/dist/{chunk-BJNHDIDW.mjs → chunk-6425RRBI.mjs} +4 -4
  21. package/dist/{chunk-O2XH4A3G.mjs → chunk-7NISYVSJ.mjs} +22 -22
  22. package/dist/{chunk-MXBPDNMC.mjs → chunk-BEDUFOIG.mjs} +95 -22
  23. package/dist/{chunk-VC7LTPQD.mjs → chunk-BN5VVHNV.mjs} +2 -2
  24. package/dist/{chunk-JRS2M5GY.mjs → chunk-CTVMT3VL.mjs} +13 -6
  25. package/dist/{chunk-USLTNDJA.mjs → chunk-D5FTFSKL.mjs} +8 -8
  26. package/dist/{chunk-BLSHXIAH.mjs → chunk-D7JTOGYP.mjs} +6 -11
  27. package/dist/{chunk-W2DMBW4E.mjs → chunk-DL7STJQ5.mjs} +61 -33
  28. package/dist/chunk-ERGNR6UQ.mjs +67 -0
  29. package/dist/chunk-FO263M3V.mjs +10 -0
  30. package/dist/{chunk-3O4U3E5I.mjs → chunk-FO2QCB4Z.mjs} +8 -4
  31. package/dist/{chunk-OGI343OV.mjs → chunk-IGPNIM2B.mjs} +3 -2
  32. package/dist/chunk-K6IJ4WBM.mjs +67 -0
  33. package/dist/{chunk-PGSPYQOW.mjs → chunk-KAGYJ4XT.mjs} +17 -27
  34. package/dist/{chunk-RGZQHSNJ.mjs → chunk-KCPDVBIZ.mjs} +26 -17
  35. package/dist/{chunk-ZHKMDK5M.mjs → chunk-KFOATMAE.mjs} +87 -87
  36. package/dist/{chunk-H4UIBDL2.mjs → chunk-LK5D3ZTK.mjs} +15 -15
  37. package/dist/{chunk-VUDJ3PYM.mjs → chunk-O46OFVH6.mjs} +40 -16
  38. package/dist/{chunk-RXACBTON.mjs → chunk-OA2IZ3VW.mjs} +16 -22
  39. package/dist/{chunk-F236MLT6.mjs → chunk-PZTHM6WG.mjs} +13 -10
  40. package/dist/{chunk-XELWY7SO.mjs → chunk-QYZKC7KG.mjs} +137 -104
  41. package/dist/{chunk-LWTQD345.mjs → chunk-S3H63TQ5.mjs} +57 -312
  42. package/dist/{chunk-MNSHWA6M.mjs → chunk-TA7LKYKP.mjs} +9 -8
  43. package/dist/{chunk-JH5VMNDL.mjs → chunk-V52WSZHQ.mjs} +8 -7
  44. package/dist/chunk-YJA5VQW6.mjs +167 -0
  45. package/dist/{chunk-EXF4SESB.mjs → chunk-ZFMCCBP6.mjs} +1 -1
  46. package/dist/connect-button.js +51 -73
  47. package/dist/connect-button.mjs +6 -6
  48. package/dist/deposit-modal.js +171 -177
  49. package/dist/deposit-modal.mjs +7 -7
  50. package/dist/event-list-item-details.js +222 -198
  51. package/dist/event-list-item-details.mjs +11 -11
  52. package/dist/event-list-item.js +172 -114
  53. package/dist/event-list-item.mjs +8 -8
  54. package/dist/event-list.js +391 -507
  55. package/dist/event-list.mjs +11 -11
  56. package/dist/event-market-page.js +826 -764
  57. package/dist/event-market-page.mjs +19 -19
  58. package/dist/hello-world.js +28 -16
  59. package/dist/hello-world.mjs +2 -2
  60. package/dist/home-page.js +395 -511
  61. package/dist/home-page.mjs +12 -12
  62. package/dist/icon.d.mts +1 -1
  63. package/dist/icon.d.ts +1 -1
  64. package/dist/icon.js +15 -17
  65. package/dist/icon.mjs +2 -2
  66. package/dist/index.d.mts +4 -4
  67. package/dist/index.d.ts +4 -4
  68. package/dist/index.js +1135 -944
  69. package/dist/index.mjs +34 -32
  70. package/dist/loading-icon.d.mts +1 -1
  71. package/dist/loading-icon.d.ts +1 -1
  72. package/dist/loading-icon.js +5 -9
  73. package/dist/loading-icon.mjs +2 -2
  74. package/dist/market-details.d.mts +2 -2
  75. package/dist/market-details.d.ts +2 -2
  76. package/dist/market-details.js +357 -551
  77. package/dist/market-details.mjs +13 -13
  78. package/dist/modal.js +4 -0
  79. package/dist/modal.mjs +1 -1
  80. package/dist/onboarding-modal.js +63 -67
  81. package/dist/onboarding-modal.mjs +6 -6
  82. package/dist/place-order.js +231 -466
  83. package/dist/place-order.mjs +9 -9
  84. package/dist/profile-modal.js +52 -65
  85. package/dist/profile-modal.mjs +6 -6
  86. package/dist/search.d.mts +2 -2
  87. package/dist/search.d.ts +2 -2
  88. package/dist/search.js +28 -34
  89. package/dist/search.mjs +4 -4
  90. package/dist/select.js +104 -99
  91. package/dist/select.mjs +3 -3
  92. package/dist/settlement.js +279 -59
  93. package/dist/settlement.mjs +6 -6
  94. package/dist/skeleton.js +15 -10
  95. package/dist/skeleton.mjs +2 -2
  96. package/dist/styles.css +1 -1
  97. package/dist/switch-button.js +13 -6
  98. package/dist/switch-button.mjs +1 -1
  99. package/dist/tabs.d.mts +8 -4
  100. package/dist/tabs.d.ts +8 -4
  101. package/dist/tabs.js +163 -420
  102. package/dist/tabs.mjs +4 -4
  103. package/dist/tailwind.css +1 -1
  104. package/dist/types-BVj9ky9P.d.mts +3 -0
  105. package/dist/types-BVj9ky9P.d.ts +3 -0
  106. package/dist/typography.d.mts +4 -2
  107. package/dist/typography.d.ts +4 -2
  108. package/dist/typography.js +49 -18
  109. package/dist/typography.mjs +5 -3
  110. package/dist/user-profile-page.d.mts +2 -2
  111. package/dist/user-profile-page.d.ts +2 -2
  112. package/dist/user-profile-page.js +200 -474
  113. package/dist/user-profile-page.mjs +7 -7
  114. package/dist/venue-logo.d.mts +2 -2
  115. package/dist/venue-logo.d.ts +2 -2
  116. package/dist/venue-logo.js +6 -11
  117. package/dist/venue-logo.mjs +1 -1
  118. package/dist/{venue-logo.types-BSAuY84j.d.ts → venue-logo.types-D8Cu2rAm.d.ts} +1 -1
  119. package/dist/{venue-logo.types-DACqcTvY.d.mts → venue-logo.types-HRf1yBLD.d.mts} +1 -1
  120. package/dist/withdraw-modal.js +72 -85
  121. package/dist/withdraw-modal.mjs +6 -6
  122. package/package.json +2 -2
  123. package/dist/chunk-AEMAY3MR.mjs +0 -44
  124. package/dist/chunk-DYEWXEEY.mjs +0 -37
  125. package/dist/chunk-QFQHD2V6.mjs +0 -146
  126. package/dist/chunk-ZDF7QP4G.mjs +0 -160
  127. package/dist/chunk-ZVBVGWSP.mjs +0 -15
  128. package/dist/types-Bed6Q0EK.d.mts +0 -3
  129. package/dist/types-Bed6Q0EK.d.ts +0 -3
package/dist/index.js CHANGED
@@ -191,6 +191,7 @@ __export(src_exports, {
191
191
  skeletonViews: () => skeletonViews,
192
192
  toDate: () => toDate,
193
193
  tradingVenueSchema: () => tradingVenueSchema,
194
+ typographyVariants: () => typographyVariants,
194
195
  venueLogoNames: () => venueLogoNames
195
196
  });
196
197
  module.exports = __toCommonJS(src_exports);
@@ -265,43 +266,26 @@ var formatAmountDisplay = (value) => {
265
266
 
266
267
  // src/primitives/icon/icon.constants.ts
267
268
  var iconSizeClasses = {
268
- xxs: "h-2 w-2",
269
- xs: "h-3 w-3",
270
- s: "h-4 w-4",
271
- ms: "h-5 w-5",
272
- m: "h-6 w-6",
273
- l: "h-8 w-8",
274
- xl: "h-10 w-10",
275
- xxl: "h-12 w-12"
269
+ small: "h-4 w-4",
270
+ medium: "h-6 w-6",
271
+ large: "h-8 w-8"
276
272
  };
277
273
 
278
274
  // src/primitives/button/button.constants.ts
279
275
  var sizeClasses = {
280
- xxs: cn("h-6 px-2.5 gap-1", "text-agg-xs leading-agg-4"),
281
- xs: cn("h-7 px-3 gap-1", "text-agg-xs leading-agg-4"),
282
- s: cn("h-8 px-4 gap-1.5", "text-agg-sm leading-agg-5"),
283
- m: cn("h-9 px-5 gap-1.5", "text-agg-sm leading-agg-5"),
284
- l: cn("h-10 px-6 gap-2", "text-agg-base leading-agg-6"),
285
- xl: cn("h-11 px-7 gap-2", "text-agg-base leading-agg-6"),
286
- xxl: cn("h-12 px-8 gap-2", "text-agg-base leading-agg-6")
276
+ small: cn("h-8 px-4 gap-1.5", "text-agg-sm leading-agg-5"),
277
+ medium: cn("h-9 px-5 gap-1.5", "text-agg-sm leading-agg-5"),
278
+ large: cn("h-10 px-6 gap-2", "text-agg-base leading-agg-6")
287
279
  };
288
280
  var iconSizeClasses2 = {
289
- xxs: iconSizeClasses.xs,
290
- xs: iconSizeClasses.xs,
291
- s: iconSizeClasses.s,
292
- m: iconSizeClasses.s,
293
- l: iconSizeClasses.s,
294
- xl: iconSizeClasses.s,
295
- xxl: iconSizeClasses.s
281
+ small: iconSizeClasses.small,
282
+ medium: iconSizeClasses.small,
283
+ large: iconSizeClasses.small
296
284
  };
297
285
  var iconSlotClasses = {
298
- xxs: "[&_svg]:h-3 [&_svg]:w-3",
299
- xs: "[&_svg]:h-3 [&_svg]:w-3",
300
- s: "[&_svg]:h-4 [&_svg]:w-4",
301
- m: "[&_svg]:h-4 [&_svg]:w-4",
302
- l: "[&_svg]:h-4 [&_svg]:w-4",
303
- xl: "[&_svg]:h-4 [&_svg]:w-4",
304
- xxl: "[&_svg]:h-4 [&_svg]:w-4"
286
+ small: "[&_svg]:h-4 [&_svg]:w-4",
287
+ medium: "[&_svg]:h-4 [&_svg]:w-4",
288
+ large: "[&_svg]:h-4 [&_svg]:w-4"
305
289
  };
306
290
  var variantClasses = {
307
291
  primary: cn(
@@ -317,10 +301,11 @@ var variantClasses = {
317
301
  "focus-visible:ring-agg-separator"
318
302
  ),
319
303
  tertiary: cn(
320
- "bg-transparent text-agg-foreground",
321
- "hover:bg-agg-secondary-hover",
304
+ "bg-transparent text-agg-primary",
305
+ "hover:text-agg-primary-hover",
322
306
  "disabled:bg-transparent disabled:text-agg-muted-foreground",
323
- "focus-visible:ring-agg-separator"
307
+ "focus-visible:ring-agg-separator",
308
+ "px-0! py-0! h-fit!"
324
309
  )
325
310
  };
326
311
  var baseButtonClasses = cn(
@@ -336,7 +321,7 @@ var Button = (_a) => {
336
321
  var _b = _a, {
337
322
  children,
338
323
  variant = "primary",
339
- size = "m",
324
+ size = "medium",
340
325
  isLoading = false,
341
326
  disabled,
342
327
  prefix,
@@ -363,8 +348,9 @@ var Button = (_a) => {
363
348
  __spreadProps(__spreadValues({
364
349
  type,
365
350
  className: cn(
351
+ "group/agg-button",
366
352
  baseButtonClasses,
367
- getMotionClassName(enableAnimations, "transition-colors"),
353
+ getMotionClassName(enableAnimations, "transition-colors duration-200 ease-in-out"),
368
354
  sizeClasses[size],
369
355
  iconSlotClasses[size],
370
356
  variantClasses[variant],
@@ -423,19 +409,23 @@ var import_hooks4 = require("@agg-market/hooks");
423
409
  var import_hooks3 = require("@agg-market/hooks");
424
410
  var import_jsx_runtime3 = require("react/jsx-runtime");
425
411
  var Card = (_a) => {
426
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
412
+ var _b = _a, { className, onClick } = _b, props = __objRest(_b, ["className", "onClick"]);
427
413
  const { enableAnimations } = (0, import_hooks3.useSdkUiConfig)();
428
414
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
429
415
  "div",
430
- __spreadValues({
416
+ __spreadValues(__spreadValues({
431
417
  className: cn(
418
+ "group/agg-card",
432
419
  "flex w-full flex-col font-agg-sans",
433
420
  "rounded-agg-xl border border-agg-separator",
434
421
  "bg-agg-secondary text-agg-foreground shadow-agg-card",
435
- getMotionClassName(enableAnimations, "transition-shadow hover:shadow-agg-card-hover"),
422
+ getMotionClassName(
423
+ enableAnimations,
424
+ "transition-shadow hover:shadow-agg-card-hover duration-300 ease-in-out"
425
+ ),
436
426
  className
437
427
  )
438
- }, props)
428
+ }, onClick ? { onClick } : {}), props)
439
429
  );
440
430
  };
441
431
  Card.displayName = "Card";
@@ -454,7 +444,7 @@ var EventListItemSkeletonView = ({
454
444
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
455
445
  Card,
456
446
  {
457
- className: cn(baseCardClassName, className),
447
+ className: cn("group/agg-skeleton", baseCardClassName, className),
458
448
  role: isStandalone ? "status" : void 0,
459
449
  "aria-label": isStandalone ? ariaLabel != null ? ariaLabel : labels.eventItem.loading : void 0,
460
450
  "aria-busy": isStandalone || void 0,
@@ -503,7 +493,7 @@ var EventListSkeletonView = ({ className, ariaLabel }) => {
503
493
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
504
494
  "section",
505
495
  {
506
- className: cn("flex w-full flex-col gap-5", className),
496
+ className: cn("group/agg-skeleton", "flex w-full flex-col gap-5", className),
507
497
  role: "status",
508
498
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
509
499
  "aria-busy": true,
@@ -561,7 +551,7 @@ var EventListItemDetailsSkeletonView = ({
561
551
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
562
552
  Card,
563
553
  {
564
- className: cn(detailsBaseCardClassName, className),
554
+ className: cn("group/agg-skeleton", detailsBaseCardClassName, className),
565
555
  role: "status",
566
556
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
567
557
  "aria-busy": true,
@@ -622,7 +612,7 @@ var MarketDetailsSkeletonView = ({
622
612
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
623
613
  Card,
624
614
  {
625
- className: cn(marketDetailsBaseCardClassName, className),
615
+ className: cn("group/agg-skeleton", marketDetailsBaseCardClassName, className),
626
616
  role: "status",
627
617
  "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
628
618
  "aria-busy": true,
@@ -692,7 +682,7 @@ MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
692
682
  var import_jsx_runtime8 = require("react/jsx-runtime");
693
683
  var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
694
684
  var ContentBody = () => {
695
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-6 p-5", children: [
685
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex flex-col gap-6 p-5"), children: [
696
686
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
697
687
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start justify-between gap-5", children: [
698
688
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
@@ -759,7 +749,7 @@ var PlaceOrderSkeletonView = ({
759
749
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
760
750
  "div",
761
751
  {
762
- className: cn("w-full", className),
752
+ className: cn("group/agg-skeleton", "w-full", className),
763
753
  role: "status",
764
754
  "aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
765
755
  "aria-busy": true,
@@ -793,6 +783,7 @@ var SettlementSkeletonView = ({
793
783
  Card,
794
784
  {
795
785
  className: cn(
786
+ "group/agg-skeleton",
796
787
  "flex flex-col w-full gap-5 rounded-agg-xl border border-agg-separator bg-agg-secondary p-5 shadow-none hover:shadow-none",
797
788
  className
798
789
  ),
@@ -951,7 +942,10 @@ var SwitchButton = ({
951
942
  "div",
952
943
  {
953
944
  className: cn(
945
+ "group/agg-switch",
954
946
  "inline-flex min-w-0 rounded-agg-full bg-agg-secondary-hover font-agg-sans",
947
+ getMotionClassName(enableAnimations, "transition-background duration-200 ease-in-out"),
948
+ "cursor-pointer hover:bg-agg-tertiary",
955
949
  className
956
950
  ),
957
951
  children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
@@ -971,7 +965,7 @@ var SwitchButton = ({
971
965
  "pointer-events-none absolute inset-y-0 left-0 rounded-agg-full border-2 border-agg-primary bg-agg-secondary",
972
966
  getMotionClassName(
973
967
  enableAnimations,
974
- "transition-transform duration-[450ms] ease-[cubic-bezier(0.77,0,0.175,1)]"
968
+ "transition-transform duration-500 ease-[cubic-bezier(0.77,0,0.175,1)]"
975
969
  )
976
970
  ),
977
971
  style: {
@@ -995,15 +989,19 @@ var SwitchButton = ({
995
989
  disabled: option.disabled,
996
990
  className: cn(
997
991
  "relative z-10 min-w-0 rounded-agg-full px-5 py-1.5 font-agg-sans text-agg-base leading-agg-6 text-agg-foreground",
998
- getMotionClassName(enableAnimations, "transition-colors duration-300"),
992
+ getMotionClassName(
993
+ enableAnimations,
994
+ "transition-[colors] duration-200 ease-in-out"
995
+ ),
999
996
  "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",
1000
- "disabled:cursor-not-allowed disabled:text-agg-muted-foreground",
997
+ "cursor-pointer disabled:cursor-not-allowed disabled:text-agg-muted-foreground",
1001
998
  isActive ? "font-agg-bold" : "font-agg-normal"
1002
999
  ),
1003
- onClick: () => {
1004
- if (option.disabled || isActive) {
1000
+ onClick: (e) => {
1001
+ e.preventDefault();
1002
+ e.stopPropagation();
1003
+ if (option.disabled || isActive)
1005
1004
  return;
1006
- }
1007
1005
  onValueChange(option.value);
1008
1006
  },
1009
1007
  onKeyDown: (event) => {
@@ -1090,14 +1088,10 @@ var ArrowsToDotIcon = (_a) => {
1090
1088
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1091
1089
  "path",
1092
1090
  {
1093
- d: "M8 2V5M8 11V14M2 8H5M11 8H14M3.76 3.76L5.9 5.9M10.1 10.1L12.24 12.24M12.24 3.76L10.1 5.9M5.9 10.1L3.76 12.24",
1094
- stroke: "currentColor",
1095
- strokeWidth: "1.25",
1096
- strokeLinecap: "round",
1097
- strokeLinejoin: "round"
1091
+ d: "M8 6.66667C8.73667 6.66667 9.33333 7.26333 9.33333 8C9.33333 8.73667 8.73667 9.33333 8 9.33333C7.26333 9.33333 6.66667 8.73667 6.66667 8C6.66667 7.26333 7.26333 6.66667 8 6.66667ZM5.27867 7.05733L3.39267 5.17133C3.132 4.91067 2.71067 4.91067 2.45 5.17133C2.18933 5.432 2.18933 5.854 2.45 6.114L3.67467 7.33333H0.666667C0.298 7.33333 0 7.632 0 8C0 8.368 0.298 8.66667 0.666667 8.66667H3.662L2.44867 9.88667C2.18867 10.148 2.19 10.5693 2.45133 10.8293C2.71267 11.0893 3.13467 11.088 3.394 10.8267L5.27933 8.93133C5.79467 8.41467 5.79467 7.574 5.27933 7.05667L5.27867 7.05733ZM7.068 5.278C7.56133 5.79267 8.45 5.79267 8.94267 5.278L10.828 3.392C11.0887 3.13133 11.0887 2.70933 10.828 2.44933C10.5673 2.18867 10.146 2.18867 9.88533 2.44933L8.66667 3.674V0.666667C8.66667 0.298667 8.36867 0 8 0C7.63133 0 7.33333 0.298667 7.33333 0.666667V3.662L6.11333 2.44867C5.852 2.18867 5.43067 2.19 5.17067 2.45133C4.91067 2.71267 4.912 3.13467 5.17333 3.394L7.068 5.278ZM8.94267 10.7213C8.42667 10.2053 7.58533 10.2053 7.06867 10.72L5.17267 12.606C4.91133 12.866 4.91 13.2873 5.17 13.5487C5.42933 13.8093 5.85067 13.8113 6.11267 13.5513L7.33267 12.3307V15.3333C7.33267 15.702 7.63067 16 7.99933 16C8.368 16 8.666 15.702 8.666 15.3333V12.3307L9.88467 13.55C10.1453 13.8107 10.5667 13.8107 10.8273 13.55C11.088 13.2893 11.088 12.868 10.8273 12.6073L8.94267 10.7213ZM15.3333 7.33333H12.3307L13.55 6.114C13.8107 5.854 13.8107 5.432 13.55 5.17133C13.2893 4.91067 12.868 4.91067 12.6073 5.17133L10.7213 7.05733C10.2053 7.574 10.2047 8.41467 10.72 8.93133L12.606 10.8273C12.866 11.088 13.2873 11.09 13.5487 10.83C13.81 10.57 13.8113 10.1487 13.5513 9.88733L12.3307 8.66733H15.3333C15.702 8.66733 16 8.36867 16 8.00067C16 7.63267 15.702 7.334 15.3333 7.334V7.33333Z",
1092
+ fill: "currentColor"
1098
1093
  }
1099
- ),
1100
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("circle", { cx: "8", cy: "8", r: "1.5", fill: "currentColor" })
1094
+ )
1101
1095
  ]
1102
1096
  })
1103
1097
  );
@@ -2332,7 +2326,7 @@ var Icon = (_a) => {
2332
2326
  var _b = _a, {
2333
2327
  name,
2334
2328
  color,
2335
- size = "m",
2329
+ size = "medium",
2336
2330
  className = "text-agg-primary",
2337
2331
  style
2338
2332
  } = _b, props = __objRest(_b, [
@@ -2345,7 +2339,14 @@ var Icon = (_a) => {
2345
2339
  const Component = iconRegistry[name];
2346
2340
  const resolvedStyle = resolveIconStyle(color, style);
2347
2341
  const resolvedClassName = cn(iconSizeClasses[size], className);
2348
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Component, __spreadValues({ color, className: resolvedClassName, style: resolvedStyle }, props));
2342
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2343
+ Component,
2344
+ __spreadValues({
2345
+ color,
2346
+ className: cn("group/agg-icon", resolvedClassName),
2347
+ style: resolvedStyle
2348
+ }, props)
2349
+ );
2349
2350
  };
2350
2351
  Icon.displayName = "Icon";
2351
2352
 
@@ -2353,7 +2354,7 @@ Icon.displayName = "Icon";
2353
2354
  var import_hooks10 = require("@agg-market/hooks");
2354
2355
 
2355
2356
  // src/primitives/venue-logo/logo-props.ts
2356
- var DEFAULT_MONOCHROME_COLOR = "#000000";
2357
+ var DEFAULT_MONOCHROME_COLOR = "currentColor";
2357
2358
  var resolveLogoPrimaryColor = ({
2358
2359
  brandColor,
2359
2360
  isColor = true,
@@ -2557,14 +2558,9 @@ var venueLogoLabels = {
2557
2558
  };
2558
2559
  var venueLogoNames = Object.keys(venueLogoRegistry);
2559
2560
  var sizeClasses2 = {
2560
- xxs: "h-2 w-2",
2561
- xs: "h-3 w-3",
2562
- s: "h-4 w-4",
2563
- ms: "h-5 w-5",
2564
- m: "h-6 w-6",
2565
- l: "h-8 w-8",
2566
- xl: "h-10 w-10",
2567
- xxl: "h-12 w-12"
2561
+ small: "h-4 w-4",
2562
+ medium: "h-6 w-6",
2563
+ large: "h-8 w-8"
2568
2564
  };
2569
2565
 
2570
2566
  // src/primitives/venue-logo/index.tsx
@@ -2574,7 +2570,7 @@ var VenueLogo = ({
2574
2570
  isColor = true,
2575
2571
  isMonochromatic = false,
2576
2572
  color,
2577
- size = "m",
2573
+ size = "medium",
2578
2574
  className,
2579
2575
  ariaLabel,
2580
2576
  title
@@ -2586,7 +2582,7 @@ var VenueLogo = ({
2586
2582
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2587
2583
  Component,
2588
2584
  {
2589
- className: cn("shrink-0", sizeClass, className),
2585
+ className: cn("group/agg-venue-logo", "shrink-0", sizeClass, className),
2590
2586
  isColor: resolvedIsColor,
2591
2587
  color,
2592
2588
  "aria-label": ariaLabel != null ? ariaLabel : labels.venues[venue],
@@ -2600,7 +2596,7 @@ VenueLogo.displayName = "VenueLogo";
2600
2596
  var import_hooks11 = require("@agg-market/hooks");
2601
2597
  var import_jsx_runtime59 = require("react/jsx-runtime");
2602
2598
  var LoadingIcon = ({
2603
- size = "m",
2599
+ size = "medium",
2604
2600
  className,
2605
2601
  ariaLabel
2606
2602
  }) => {
@@ -2612,6 +2608,7 @@ var LoadingIcon = ({
2612
2608
  role: "status",
2613
2609
  "aria-label": ariaLabel != null ? ariaLabel : labels.common.loading,
2614
2610
  className: cn(
2611
+ "group/agg-loading-icon",
2615
2612
  "inline-grid place-items-center text-agg-primary will-change-transform",
2616
2613
  className
2617
2614
  ),
@@ -2879,7 +2876,7 @@ var ConnectButton = ({
2879
2876
  Button,
2880
2877
  __spreadProps(__spreadValues({
2881
2878
  variant: "primary",
2882
- size: "l",
2879
+ size: "large",
2883
2880
  className: classNames == null ? void 0 : classNames.connectButton,
2884
2881
  onClick: handleConnectClick,
2885
2882
  disabled: isConnectDisabled,
@@ -2894,7 +2891,7 @@ var ConnectButton = ({
2894
2891
  Button,
2895
2892
  __spreadProps(__spreadValues({
2896
2893
  variant: "primary",
2897
- size: "l",
2894
+ size: "large",
2898
2895
  className: classNames == null ? void 0 : classNames.signInButton,
2899
2896
  onClick: handleSignInClick,
2900
2897
  disabled: disabled || !hasWalletAddress,
@@ -2911,7 +2908,7 @@ var ConnectButton = ({
2911
2908
  Button,
2912
2909
  {
2913
2910
  variant: "primary",
2914
- size: "xxs",
2911
+ size: "small",
2915
2912
  className: cn("h-6 px-3 text-agg-xs leading-agg-4", classNames == null ? void 0 : classNames.depositButton),
2916
2913
  onClick: handleDepositClick,
2917
2914
  disabled,
@@ -2919,13 +2916,7 @@ var ConnectButton = ({
2919
2916
  children: labels.auth.deposit
2920
2917
  }
2921
2918
  ),
2922
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2923
- "p",
2924
- {
2925
- className: cn("text-agg-sm leading-none text-agg-foreground", classNames == null ? void 0 : classNames.balanceText),
2926
- children: isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(LoadingIcon, { size: "s" }) : formatUsd(totalBalance)
2927
- }
2928
- )
2919
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
2929
2920
  ] }),
2930
2921
  /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: handleProfileMenuOpenChange, children: [
2931
2922
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
@@ -2945,7 +2936,7 @@ var ConnectButton = ({
2945
2936
  "span",
2946
2937
  {
2947
2938
  className: cn(
2948
- "text-agg-base font-agg-bold leading-none text-agg-foreground",
2939
+ "agg-type-body-strong text-agg-foreground",
2949
2940
  classNames == null ? void 0 : classNames.profileTriggerLabel
2950
2941
  ),
2951
2942
  children: resolvedProfileLabel
@@ -2955,7 +2946,7 @@ var ConnectButton = ({
2955
2946
  Icon,
2956
2947
  {
2957
2948
  name: isProfileMenuOpen ? "chevron-up" : "chevron-down",
2958
- size: "s",
2949
+ size: "small",
2959
2950
  className: "h-3.5 w-3.5 text-agg-foreground",
2960
2951
  "aria-hidden": "true"
2961
2952
  }
@@ -3013,7 +3004,7 @@ var ConnectButton = ({
3013
3004
  Button,
3014
3005
  {
3015
3006
  variant: "tertiary",
3016
- size: "xxs",
3007
+ size: "small",
3017
3008
  className: "h-6 px-3 text-agg-xs leading-agg-4",
3018
3009
  onClick: handleViewAllBalancesClick,
3019
3010
  children: labels.auth.viewAll
@@ -3022,7 +3013,7 @@ var ConnectButton = ({
3022
3013
  ] }) }),
3023
3014
  !isBalanceLoading ? resolvedBalanceRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
3024
3015
  /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-center gap-1.5", children: [
3025
- row.venue ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(VenueLogo, { venue: row.venue, size: "s" }) : null,
3016
+ row.venue ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(VenueLogo, { venue: row.venue, size: "small" }) : null,
3026
3017
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground", children: row.label })
3027
3018
  ] }),
3028
3019
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: row.amountLabel })
@@ -3042,7 +3033,7 @@ var ConnectButton = ({
3042
3033
  onSelect: handleProfileItemClick,
3043
3034
  disabled,
3044
3035
  children: [
3045
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "profile", size: "s", className: "text-agg-foreground" }),
3036
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "profile", size: "small", className: "text-agg-foreground" }),
3046
3037
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: labels.auth.myProfile })
3047
3038
  ]
3048
3039
  }
@@ -3054,7 +3045,7 @@ var ConnectButton = ({
3054
3045
  onSelect: handleDepositClick,
3055
3046
  disabled,
3056
3047
  children: [
3057
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "download", size: "s", className: "text-agg-foreground" }),
3048
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
3058
3049
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: labels.auth.deposit })
3059
3050
  ]
3060
3051
  }
@@ -3066,7 +3057,7 @@ var ConnectButton = ({
3066
3057
  onSelect: handleWithdrawClick,
3067
3058
  disabled,
3068
3059
  children: [
3069
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "upload", size: "s", className: "text-agg-foreground" }),
3060
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "upload", size: "small", className: "text-agg-foreground" }),
3070
3061
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: labels.auth.withdraw })
3071
3062
  ]
3072
3063
  }
@@ -3078,7 +3069,7 @@ var ConnectButton = ({
3078
3069
  onSelect: handleDisconnectClick,
3079
3070
  disabled,
3080
3071
  children: [
3081
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "disconnect", size: "s", className: "text-agg-foreground" }),
3072
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "disconnect", size: "small", className: "text-agg-foreground" }),
3082
3073
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: labels.auth.disconnect })
3083
3074
  ]
3084
3075
  }
@@ -3096,21 +3087,39 @@ ConnectButton.displayName = "ConnectButton";
3096
3087
  var import_hooks13 = require("@agg-market/hooks");
3097
3088
 
3098
3089
  // src/primitives/typography/typography.constants.ts
3099
- var variantClasses2 = {
3100
- title: cn("font-agg-sans text-agg-lg leading-agg-7", "font-agg-bold", "text-agg-foreground"),
3101
- body: cn("font-agg-sans text-agg-base leading-agg-6", "font-agg-normal", "text-agg-foreground"),
3102
- meta: cn(
3103
- "font-agg-sans text-agg-sm leading-agg-5",
3104
- "font-agg-normal",
3105
- "text-agg-muted-foreground"
3106
- ),
3107
- label: cn(
3108
- "font-agg-sans text-agg-sm leading-agg-5",
3109
- "font-agg-bold uppercase",
3110
- "text-agg-foreground"
3111
- ),
3112
- value: cn("font-agg-sans text-agg-xl leading-agg-7", "font-agg-normal", "text-agg-foreground"),
3113
- caption: cn("font-agg-sans text-agg-xs leading-agg-4", "font-agg-normal", "text-agg-foreground")
3090
+ var typographyVariants = [
3091
+ "display",
3092
+ "heading",
3093
+ "title",
3094
+ "title-strong",
3095
+ "body-large",
3096
+ "body-large-strong",
3097
+ "body",
3098
+ "body-strong",
3099
+ "label",
3100
+ "label-strong",
3101
+ "label-caps",
3102
+ "caption",
3103
+ "caption-strong",
3104
+ "caption-caps",
3105
+ "overline"
3106
+ ];
3107
+ var typographyVariantClasses = {
3108
+ display: cn("agg-type-display"),
3109
+ heading: cn("agg-type-heading"),
3110
+ title: cn("agg-type-title"),
3111
+ "title-strong": cn("agg-type-title-strong"),
3112
+ "body-large": cn("agg-type-body-large"),
3113
+ "body-large-strong": cn("agg-type-body-large-strong"),
3114
+ body: cn("agg-type-body"),
3115
+ "body-strong": cn("agg-type-body-strong"),
3116
+ label: cn("agg-type-label"),
3117
+ "label-strong": cn("agg-type-label-strong"),
3118
+ "label-caps": cn("agg-type-label-caps"),
3119
+ caption: cn("agg-type-caption"),
3120
+ "caption-strong": cn("agg-type-caption-strong"),
3121
+ "caption-caps": cn("agg-type-caption-caps"),
3122
+ overline: cn("agg-type-overline")
3114
3123
  };
3115
3124
 
3116
3125
  // src/primitives/typography/index.tsx
@@ -3121,7 +3130,18 @@ var Typography = ({
3121
3130
  className,
3122
3131
  children
3123
3132
  }) => {
3124
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Component, { className: cn(variantClasses2[variant], "truncate", className), children });
3133
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3134
+ Component,
3135
+ {
3136
+ className: cn(
3137
+ "group/agg-typography",
3138
+ "text-agg-foreground",
3139
+ typographyVariantClasses[variant],
3140
+ className
3141
+ ),
3142
+ children
3143
+ }
3144
+ );
3125
3145
  };
3126
3146
  Typography.displayName = "Typography";
3127
3147
 
@@ -3305,7 +3325,7 @@ var LineChart = ({
3305
3325
  seriesSwitchAriaLabel: labels.common.lineChartSeriesSwitchAria,
3306
3326
  formatSeriesOptionAriaLabel: labels.common.lineChartSeriesOptionAria
3307
3327
  }) : null : null;
3308
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cn("w-full", classNames == null ? void 0 : classNames.root), style: { width }, children: [
3328
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cn("group/agg-chart", "w-full", classNames == null ? void 0 : classNames.root), style: { width }, children: [
3309
3329
  !isLoading && seriesControls ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: cn("mb-3", classNames == null ? void 0 : classNames.controls), children: seriesControls }) : null,
3310
3330
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
3311
3331
  "div",
@@ -3382,16 +3402,15 @@ var NumberValue = ({
3382
3402
  };
3383
3403
  NumberValue.displayName = "NumberValue";
3384
3404
 
3405
+ // src/primitives/badge/index.tsx
3406
+ var import_hooks16 = require("@agg-market/hooks");
3407
+
3385
3408
  // src/primitives/badge/badge.constants.ts
3386
- var badgeSizes = ["xxs", "xs", "s", "m", "l", "xl", "xxl"];
3409
+ var badgeSizes = ["small", "medium", "large"];
3387
3410
  var badgeSizeClasses = {
3388
- xxs: cn("h-4 px-1.5 gap-0.5", "text-agg-xs leading-agg-3"),
3389
- xs: cn("h-5 px-2 gap-1", "text-agg-xs leading-agg-4"),
3390
- s: cn("h-6 px-2.5 gap-1", "text-agg-sm leading-agg-5"),
3391
- m: cn("h-7 px-3 gap-1.5", "text-agg-sm leading-agg-5"),
3392
- l: cn("h-8 px-3.5 gap-1.5", "text-agg-base leading-agg-6"),
3393
- xl: cn("h-9 px-4 gap-2", "text-agg-lg leading-agg-7"),
3394
- xxl: cn("h-10 px-5 gap-2", "text-agg-xl leading-agg-7")
3411
+ small: cn("py-1.5 px-4 gap-1.5", "agg-type-label"),
3412
+ medium: cn("py-1.5 px-4 gap-2", "agg-type-body"),
3413
+ large: cn("py-2.5 px-6 gap-2", "agg-type-body")
3395
3414
  };
3396
3415
  var baseBadgeClasses = cn(
3397
3416
  "inline-flex items-center justify-center rounded-agg-full font-agg-sans",
@@ -3400,27 +3419,48 @@ var baseBadgeClasses = cn(
3400
3419
 
3401
3420
  // src/primitives/badge/index.tsx
3402
3421
  var import_jsx_runtime65 = require("react/jsx-runtime");
3403
- function Badge({ text, prefix, suffix, size = "m", classNames }) {
3422
+ function Badge({
3423
+ text,
3424
+ prefix,
3425
+ suffix,
3426
+ size = "medium",
3427
+ classNames,
3428
+ onClick,
3429
+ isActive = false
3430
+ }) {
3431
+ const { enableAnimations } = (0, import_hooks16.useSdkUiConfig)();
3404
3432
  const resolvedText = `${text}`;
3405
3433
  const resolvedAriaLabel = resolvedText.length > 0 ? resolvedText : void 0;
3406
3434
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
3407
3435
  "span",
3408
- {
3436
+ __spreadProps(__spreadValues({
3409
3437
  "aria-label": resolvedAriaLabel,
3410
- className: cn(baseBadgeClasses, badgeSizeClasses[size], classNames == null ? void 0 : classNames.root),
3438
+ className: cn(
3439
+ "group/agg-badge",
3440
+ baseBadgeClasses,
3441
+ badgeSizeClasses[size],
3442
+ onClick ? "cursor-pointer hover:bg-agg-tertiary disabled:cursor-not-allowed" : "",
3443
+ getMotionClassName(
3444
+ enableAnimations,
3445
+ "transition-[border-color,background-color] duration-200 ease-in-out"
3446
+ ),
3447
+ isActive ? "border-agg-primary bg-agg-secondary! font-agg-bold!" : "border-transparent font-agg-normal",
3448
+ classNames == null ? void 0 : classNames.root
3449
+ )
3450
+ }, onClick && { onClick }), {
3411
3451
  children: [
3412
3452
  prefix ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: classNames == null ? void 0 : classNames.prefix, children: prefix }) : null,
3413
3453
  /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: cn("truncate", classNames == null ? void 0 : classNames.text), children: text }),
3414
3454
  suffix ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: classNames == null ? void 0 : classNames.suffix, children: suffix }) : null
3415
3455
  ]
3416
- }
3456
+ })
3417
3457
  );
3418
3458
  }
3419
3459
  Badge.displayName = "Badge";
3420
3460
 
3421
3461
  // src/primitives/select/index.tsx
3422
3462
  var import_react5 = require("react");
3423
- var import_hooks16 = require("@agg-market/hooks");
3463
+ var import_hooks17 = require("@agg-market/hooks");
3424
3464
  var import_jsx_runtime66 = require("react/jsx-runtime");
3425
3465
  var Select = ({
3426
3466
  items,
@@ -3431,8 +3471,8 @@ var Select = ({
3431
3471
  disabled = false
3432
3472
  }) => {
3433
3473
  var _a;
3434
- const labels = (0, import_hooks16.useLabels)();
3435
- const { enableAnimations } = (0, import_hooks16.useSdkUiConfig)();
3474
+ const labels = (0, import_hooks17.useLabels)();
3475
+ const { enableAnimations } = (0, import_hooks17.useSdkUiConfig)();
3436
3476
  const hasEnabledItems = items.some((item) => !item.disabled);
3437
3477
  const hasAnyIcon = items.some((item) => item.iconUrl);
3438
3478
  const [isOpen, setIsOpen] = (0, import_react5.useState)(false);
@@ -3442,7 +3482,7 @@ var Select = ({
3442
3482
  if (!isOpen)
3443
3483
  return;
3444
3484
  const handlePointerDown = (e) => {
3445
- if (containerRef.current && !containerRef.current.contains(e.target)) {
3485
+ if (containerRef.current && !containerRef.current.contains(e == null ? void 0 : e.target)) {
3446
3486
  close();
3447
3487
  }
3448
3488
  };
@@ -3453,7 +3493,7 @@ var Select = ({
3453
3493
  if (!isOpen)
3454
3494
  return;
3455
3495
  const handleKey = (e) => {
3456
- if (e.key === "Escape")
3496
+ if ((e == null ? void 0 : e.key) === "Escape")
3457
3497
  close();
3458
3498
  };
3459
3499
  document.addEventListener("keydown", handleKey);
@@ -3462,7 +3502,7 @@ var Select = ({
3462
3502
  const isDisabled = disabled || !hasEnabledItems;
3463
3503
  const selectedItem = items.find((item) => item.value === value);
3464
3504
  if (!hasAnyIcon) {
3465
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("label", { className: cn("relative inline-flex w-full", className), children: [
3505
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("label", { className: cn("group/agg-select", "relative inline-flex w-full", className), children: [
3466
3506
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3467
3507
  "select",
3468
3508
  {
@@ -3471,7 +3511,7 @@ var Select = ({
3471
3511
  "w-full appearance-none rounded-agg-md border border-agg-separator bg-agg-secondary px-4 py-2 pr-10 font-agg-sans text-agg-sm leading-agg-5 text-agg-foreground outline-none",
3472
3512
  getMotionClassName(
3473
3513
  enableAnimations,
3474
- "transition-[border-color,box-shadow] duration-200 ease-out"
3514
+ "transition-[border-color,box-shadow] duration-200 ease-in-out"
3475
3515
  ),
3476
3516
  "focus:border-agg-primary focus:ring-2 focus:ring-agg-primary/15",
3477
3517
  "disabled:cursor-not-allowed disabled:opacity-60"
@@ -3482,94 +3522,101 @@ var Select = ({
3482
3522
  children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("option", { value: item.value, disabled: item.disabled, children: item.label }, item.value))
3483
3523
  }
3484
3524
  ),
3485
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "pointer-events-none absolute inset-y-0 right-3 inline-flex items-center justify-center text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: "chevron-down", size: "s", color: "currentColor" }) })
3525
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "pointer-events-none absolute inset-y-0 right-3 inline-flex items-center justify-center text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: "chevron-down", size: "small", color: "currentColor" }) })
3486
3526
  ] });
3487
3527
  }
3488
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { ref: containerRef, className: cn("relative inline-flex w-full", className), children: [
3489
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
3490
- "button",
3491
- {
3492
- type: "button",
3493
- "aria-label": ariaLabel != null ? ariaLabel : labels.common.selectAria,
3494
- "aria-expanded": isOpen,
3495
- "aria-haspopup": "listbox",
3496
- disabled: isDisabled,
3497
- className: cn(
3498
- "w-full rounded-agg-md border border-agg-separator bg-agg-secondary px-4 py-2 pr-10 font-agg-sans text-agg-sm leading-agg-5 text-agg-foreground outline-none",
3499
- "flex items-center gap-2 text-left",
3500
- getMotionClassName(
3501
- enableAnimations,
3502
- "transition-[border-color,box-shadow] duration-200 ease-out"
3503
- ),
3504
- "focus:border-agg-primary focus:ring-2 focus:ring-agg-primary/15",
3505
- "disabled:cursor-not-allowed disabled:opacity-60"
3506
- ),
3507
- onClick: () => setIsOpen((prev) => !prev),
3508
- children: [
3509
- (selectedItem == null ? void 0 : selectedItem.iconUrl) ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3510
- "img",
3511
- {
3512
- src: selectedItem.iconUrl,
3513
- alt: "",
3514
- className: "h-4 w-4 shrink-0 rounded-sm object-contain"
3515
- }
3516
- ) : null,
3517
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "flex-1 truncate", children: (_a = selectedItem == null ? void 0 : selectedItem.label) != null ? _a : "" })
3518
- ]
3519
- }
3520
- ),
3521
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "pointer-events-none absolute inset-y-0 right-3 inline-flex items-center justify-center text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: "chevron-down", size: "s", color: "currentColor" }) }),
3522
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3523
- "div",
3524
- {
3525
- role: "listbox",
3526
- "aria-label": ariaLabel != null ? ariaLabel : labels.common.selectAria,
3527
- className: "absolute top-full left-0 z-50 mt-1 w-full overflow-hidden rounded-agg-md border border-agg-separator bg-agg-secondary shadow-lg",
3528
- children: items.map((item) => {
3529
- const isSelected = item.value === value;
3530
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
3531
- "button",
3532
- {
3533
- type: "button",
3534
- role: "option",
3535
- "aria-selected": isSelected,
3536
- disabled: item.disabled,
3537
- className: cn(
3538
- "flex w-full items-center gap-2 px-4 py-2 text-left text-agg-sm leading-agg-5 outline-none",
3539
- "hover:bg-agg-secondary-hover focus-visible:bg-agg-secondary-hover",
3540
- isSelected ? "font-agg-bold text-agg-primary" : "font-agg-normal text-agg-foreground",
3541
- item.disabled && "cursor-not-allowed opacity-60"
3528
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
3529
+ "div",
3530
+ {
3531
+ ref: containerRef,
3532
+ className: cn("group/agg-select", "relative inline-flex w-full", className),
3533
+ children: [
3534
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
3535
+ "button",
3536
+ {
3537
+ type: "button",
3538
+ "aria-label": ariaLabel != null ? ariaLabel : labels.common.selectAria,
3539
+ "aria-expanded": isOpen,
3540
+ "aria-haspopup": "listbox",
3541
+ disabled: isDisabled,
3542
+ className: cn(
3543
+ "w-full rounded-agg-md border border-agg-separator bg-agg-secondary px-4 py-2 pr-10 font-agg-sans text-agg-sm leading-agg-5 text-agg-foreground outline-none",
3544
+ "flex items-center gap-2 text-left",
3545
+ getMotionClassName(
3546
+ enableAnimations,
3547
+ "transition-[border-color,box-shadow] duration-200 ease-in-out"
3542
3548
  ),
3543
- onClick: () => {
3544
- if (!item.disabled) {
3545
- onChange(item.value);
3546
- close();
3549
+ "focus:border-agg-primary focus:ring-2 focus:ring-agg-primary/15",
3550
+ "disabled:cursor-not-allowed disabled:opacity-60"
3551
+ ),
3552
+ onClick: () => setIsOpen((prev) => !prev),
3553
+ children: [
3554
+ (selectedItem == null ? void 0 : selectedItem.iconUrl) ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3555
+ "img",
3556
+ {
3557
+ src: selectedItem.iconUrl,
3558
+ alt: "",
3559
+ className: "h-4 w-4 shrink-0 rounded-sm object-contain"
3547
3560
  }
3548
- },
3549
- children: [
3550
- item.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3551
- "img",
3552
- {
3553
- src: item.iconUrl,
3554
- alt: "",
3555
- className: "h-4 w-4 shrink-0 rounded-sm object-contain"
3556
- }
3557
- ) : null,
3558
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "truncate", children: item.label })
3559
- ]
3560
- },
3561
- item.value
3562
- );
3563
- })
3564
- }
3565
- ) : null
3566
- ] });
3561
+ ) : null,
3562
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "flex-1 truncate", children: (_a = selectedItem == null ? void 0 : selectedItem.label) != null ? _a : "" })
3563
+ ]
3564
+ }
3565
+ ),
3566
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "pointer-events-none absolute inset-y-0 right-3 inline-flex items-center justify-center text-agg-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: "chevron-down", size: "small", color: "currentColor" }) }),
3567
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3568
+ "div",
3569
+ {
3570
+ role: "listbox",
3571
+ "aria-label": ariaLabel != null ? ariaLabel : labels.common.selectAria,
3572
+ className: "absolute top-full left-0 z-50 mt-1 w-full overflow-hidden rounded-agg-md border border-agg-separator bg-agg-secondary shadow-lg",
3573
+ children: items.map((item) => {
3574
+ const isSelected = item.value === value;
3575
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
3576
+ "button",
3577
+ {
3578
+ type: "button",
3579
+ role: "option",
3580
+ "aria-selected": isSelected,
3581
+ disabled: item.disabled,
3582
+ className: cn(
3583
+ "flex w-full items-center gap-2 px-4 py-2 text-left text-agg-sm leading-agg-5 outline-none",
3584
+ "hover:bg-agg-secondary-hover focus-visible:bg-agg-secondary-hover",
3585
+ isSelected ? "font-agg-bold text-agg-primary" : "font-agg-normal text-agg-foreground",
3586
+ item.disabled && "cursor-not-allowed opacity-60"
3587
+ ),
3588
+ onClick: () => {
3589
+ if (!item.disabled) {
3590
+ onChange(item.value);
3591
+ close();
3592
+ }
3593
+ },
3594
+ children: [
3595
+ item.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3596
+ "img",
3597
+ {
3598
+ src: item.iconUrl,
3599
+ alt: "",
3600
+ className: "h-4 w-4 shrink-0 rounded-sm object-contain"
3601
+ }
3602
+ ) : null,
3603
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "truncate", children: item.label })
3604
+ ]
3605
+ },
3606
+ item.value
3607
+ );
3608
+ })
3609
+ }
3610
+ ) : null
3611
+ ]
3612
+ }
3613
+ );
3567
3614
  };
3568
3615
  Select.displayName = "Select";
3569
3616
 
3570
3617
  // src/primitives/search/index.tsx
3571
3618
  var import_react6 = require("react");
3572
- var import_hooks17 = require("@agg-market/hooks");
3619
+ var import_hooks18 = require("@agg-market/hooks");
3573
3620
 
3574
3621
  // src/primitives/search/search-empty-icon.tsx
3575
3622
  var import_jsx_runtime67 = require("react/jsx-runtime");
@@ -3644,6 +3691,7 @@ var SearchResultRow = ({
3644
3691
  {
3645
3692
  type: "button",
3646
3693
  className: cn(
3694
+ "group/agg-search-result",
3647
3695
  "group flex w-full items-center gap-6 px-5 py-3 text-left",
3648
3696
  "focus-visible:outline-none focus-visible:bg-agg-secondary-hover",
3649
3697
  "hover:bg-agg-secondary-hover",
@@ -3676,13 +3724,13 @@ var SearchResultRow = ({
3676
3724
  )
3677
3725
  ] }),
3678
3726
  /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("flex w-[200px] shrink-0 items-center gap-2", classNames == null ? void 0 : classNames.resultMeta), children: [
3679
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(VenueLogo, { venue: item.venue, size: "s" }),
3727
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(VenueLogo, { venue: item.venue, size: "small" }),
3680
3728
  /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
3681
3729
  /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
3682
3730
  "p",
3683
3731
  {
3684
3732
  className: cn(
3685
- "shrink-0 whitespace-nowrap font-agg-sans text-[18px] leading-7 font-agg-bold text-agg-foreground",
3733
+ "agg-type-body-large-strong shrink-0 whitespace-nowrap text-agg-foreground",
3686
3734
  classNames == null ? void 0 : classNames.resultValue
3687
3735
  ),
3688
3736
  children: item.valueLabel
@@ -3704,7 +3752,7 @@ var SearchResultRow = ({
3704
3752
  Icon,
3705
3753
  {
3706
3754
  name: "chevron-right",
3707
- size: "m",
3755
+ size: "medium",
3708
3756
  className: cn("h-5 w-5 shrink-0 text-agg-muted-foreground", classNames == null ? void 0 : classNames.resultChevron)
3709
3757
  }
3710
3758
  )
@@ -3728,8 +3776,8 @@ var Search = ({
3728
3776
  classNames,
3729
3777
  inputProps
3730
3778
  }) => {
3731
- const labels = (0, import_hooks17.useLabels)();
3732
- const { enableAnimations } = (0, import_hooks17.useSdkUiConfig)();
3779
+ const labels = (0, import_hooks18.useLabels)();
3780
+ const { enableAnimations } = (0, import_hooks18.useSdkUiConfig)();
3733
3781
  const validatedResults = (0, import_react6.useMemo)(() => {
3734
3782
  return getValidatedResults(results);
3735
3783
  }, [results]);
@@ -3741,7 +3789,7 @@ var Search = ({
3741
3789
  const handleInputChange = (event) => {
3742
3790
  onValueChange(event.target.value);
3743
3791
  };
3744
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("flex w-full flex-col gap-1", classNames == null ? void 0 : classNames.root), children: [
3792
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("group/agg-search", "flex w-full flex-col gap-1", classNames == null ? void 0 : classNames.root), children: [
3745
3793
  /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("label", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
3746
3794
  "div",
3747
3795
  {
@@ -3751,7 +3799,7 @@ var Search = ({
3751
3799
  "focus-within:border-2 focus-within:border-agg-primary",
3752
3800
  getMotionClassName(
3753
3801
  enableAnimations,
3754
- "transition-[border-color,box-shadow] duration-200 ease-out"
3802
+ "transition-[border-color,box-shadow] duration-200 ease-in-out"
3755
3803
  ),
3756
3804
  classNames == null ? void 0 : classNames.inputContainer
3757
3805
  ),
@@ -3760,7 +3808,7 @@ var Search = ({
3760
3808
  Icon,
3761
3809
  {
3762
3810
  name: "search",
3763
- size: "s",
3811
+ size: "small",
3764
3812
  className: cn("text-agg-muted-foreground", classNames == null ? void 0 : classNames.searchIcon)
3765
3813
  }
3766
3814
  ),
@@ -3872,8 +3920,7 @@ Search.displayName = "Search";
3872
3920
 
3873
3921
  // src/primitives/tabs/index.tsx
3874
3922
  var import_react7 = require("react");
3875
- var import_hooks18 = require("@agg-market/hooks");
3876
- var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
3923
+ var import_hooks19 = require("@agg-market/hooks");
3877
3924
 
3878
3925
  // src/primitives/tabs/tabs.utils.ts
3879
3926
  var findNextEnabledIndex = (items, startIndex, direction) => {
@@ -3898,86 +3945,10 @@ var findEdgeEnabledIndex = (items, direction) => {
3898
3945
  }
3899
3946
  return -1;
3900
3947
  };
3901
- var FALLBACK_TAB_WIDTH = 112;
3902
- var FALLBACK_MORE_WIDTH = 56;
3903
- var sumWidths = (indices, widths) => {
3904
- return [...indices].reduce((accumulator, index) => {
3905
- var _a;
3906
- return accumulator + ((_a = widths[index]) != null ? _a : 0);
3907
- }, 0);
3908
- };
3909
- var resolveTabsOverflowLayout = ({
3910
- items,
3911
- value,
3912
- containerWidth,
3913
- moreButtonWidth,
3914
- itemWidthByValue
3915
- }) => {
3916
- var _a;
3917
- if (items.length === 0) {
3918
- return {
3919
- visibleItems: [],
3920
- hiddenItems: []
3921
- };
3922
- }
3923
- if (!Number.isFinite(containerWidth) || containerWidth <= 0) {
3924
- return {
3925
- visibleItems: items,
3926
- hiddenItems: []
3927
- };
3928
- }
3929
- const resolvedItemWidths = items.map((item) => {
3930
- var _a2;
3931
- const measuredWidth = (_a2 = itemWidthByValue.get(item.value)) != null ? _a2 : FALLBACK_TAB_WIDTH;
3932
- return Math.max(1, measuredWidth);
3933
- });
3934
- const totalItemsWidth = resolvedItemWidths.reduce((sum, width) => {
3935
- return sum + width;
3936
- }, 0);
3937
- if (totalItemsWidth <= containerWidth) {
3938
- return {
3939
- visibleItems: items,
3940
- hiddenItems: []
3941
- };
3942
- }
3943
- const reservedMoreWidth = Math.max(1, moreButtonWidth || FALLBACK_MORE_WIDTH);
3944
- const visibleIndices = /* @__PURE__ */ new Set();
3945
- let usedWidth = 0;
3946
- for (let index = 0; index < items.length; index += 1) {
3947
- const itemWidth = (_a = resolvedItemWidths[index]) != null ? _a : FALLBACK_TAB_WIDTH;
3948
- const hasRemainingItems = index < items.length - 1;
3949
- const requiredExtraWidth = hasRemainingItems ? reservedMoreWidth : 0;
3950
- if (usedWidth + itemWidth + requiredExtraWidth > containerWidth)
3951
- break;
3952
- visibleIndices.add(index);
3953
- usedWidth += itemWidth;
3954
- }
3955
- if (visibleIndices.size === 0) {
3956
- visibleIndices.add(0);
3957
- }
3958
- const activeIndex = items.findIndex((item) => item.value === value);
3959
- const isActiveHidden = activeIndex >= 0 && !visibleIndices.has(activeIndex);
3960
- if (isActiveHidden && activeIndex >= 0) {
3961
- visibleIndices.add(activeIndex);
3962
- while (visibleIndices.size > 1) {
3963
- const visibleWidth = sumWidths(visibleIndices, resolvedItemWidths);
3964
- if (visibleWidth + reservedMoreWidth <= containerWidth)
3965
- break;
3966
- const removableIndex = [...visibleIndices].sort((left, right) => right - left).find((index) => index !== activeIndex);
3967
- if (removableIndex == null)
3968
- break;
3969
- visibleIndices.delete(removableIndex);
3970
- }
3971
- }
3972
- return {
3973
- visibleItems: items.filter((_, index) => visibleIndices.has(index)),
3974
- hiddenItems: items.filter((_, index) => !visibleIndices.has(index))
3975
- };
3976
- };
3977
3948
 
3978
3949
  // src/primitives/tabs/index.tsx
3979
3950
  var import_jsx_runtime69 = require("react/jsx-runtime");
3980
- var mobileTabsMediaQuery = "(max-width: 767px)";
3951
+ var mobileTabsMediaQuery = "(max-width: 512px)";
3981
3952
  var getTabButtonClassName = ({
3982
3953
  enableAnimations,
3983
3954
  isBarVariant,
@@ -3989,7 +3960,11 @@ var getTabButtonClassName = ({
3989
3960
  return cn(
3990
3961
  "cursor-pointer disabled:cursor-not-allowed",
3991
3962
  "relative inline-flex h-full shrink-0 items-center justify-center gap-2 font-agg-sans",
3992
- getMotionClassName(enableAnimations, "transition-colors motion-reduce:transition-none"),
3963
+ isBarVariant ? "hover:text-agg-foreground hover:bg-agg-secondary-hover" : "hover:text-agg-foreground hover:font-bold",
3964
+ getMotionClassName(
3965
+ enableAnimations,
3966
+ "transition-[colors] duration-300 ease-in-out motion-reduce:transition-none"
3967
+ ),
3993
3968
  isBarVariant ? cn(
3994
3969
  "min-w-20 overflow-hidden border-r border-agg-separator last:border-r-0",
3995
3970
  isSmall ? "px-3 text-agg-sm leading-agg-5" : "px-4 text-agg-base leading-agg-6"
@@ -4001,35 +3976,6 @@ var getTabButtonClassName = ({
4001
3976
  isDisabled && "cursor-not-allowed opacity-60"
4002
3977
  );
4003
3978
  };
4004
- var getMeasureTabClassName = ({
4005
- isBarVariant,
4006
- size
4007
- }) => {
4008
- const isSmall = size === "s";
4009
- return cn(
4010
- "relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap font-agg-sans",
4011
- isBarVariant ? cn(
4012
- "h-8 min-w-20 border-r border-agg-separator font-agg-bold",
4013
- isSmall ? "px-3 text-agg-sm leading-agg-5" : "px-4 text-agg-base leading-agg-6"
4014
- ) : cn(
4015
- "h-12 font-agg-bold",
4016
- isSmall ? "px-4 text-agg-sm leading-agg-5" : "px-5 text-agg-base leading-agg-6"
4017
- )
4018
- );
4019
- };
4020
- var getMoreButtonClassName = ({
4021
- enableAnimations,
4022
- isBarVariant,
4023
- size
4024
- }) => {
4025
- const isSmall = size === "s";
4026
- return cn(
4027
- "cursor-pointer disabled:cursor-not-allowed",
4028
- "relative inline-flex shrink-0 items-center justify-center overflow-hidden font-agg-sans text-agg-foreground hover:bg-agg-secondary-hover",
4029
- getMotionClassName(enableAnimations, "transition-colors motion-reduce:transition-none"),
4030
- isBarVariant ? "h-8 rounded-r-agg-sm border border-agg-separator bg-agg-secondary px-2" : cn("h-12 bg-agg-secondary", isSmall ? "px-3 text-agg-sm" : "px-4 text-agg-base")
4031
- );
4032
- };
4033
3979
  var Tabs = ({
4034
3980
  items,
4035
3981
  value,
@@ -4037,12 +3983,12 @@ var Tabs = ({
4037
3983
  variant = "bar",
4038
3984
  size = "m",
4039
3985
  overflowBehavior,
4040
- overflowMenuAriaLabel,
4041
3986
  ariaLabel,
4042
- className
3987
+ className,
3988
+ classNames
4043
3989
  }) => {
4044
- const labels = (0, import_hooks18.useLabels)();
4045
- const { enableAnimations, rootClassName } = (0, import_hooks18.useSdkUiConfig)();
3990
+ const labels = (0, import_hooks19.useLabels)();
3991
+ const { enableAnimations } = (0, import_hooks19.useSdkUiConfig)();
4046
3992
  const buttonRefs = (0, import_react7.useRef)([]);
4047
3993
  const dragStateRef = (0, import_react7.useRef)({
4048
3994
  isPointerDown: false,
@@ -4054,8 +4000,6 @@ var Tabs = ({
4054
4000
  });
4055
4001
  const suppressClickRef = (0, import_react7.useRef)(false);
4056
4002
  const resolvedAriaLabel = ariaLabel != null ? ariaLabel : labels.common.tabsAria;
4057
- const resolvedOverflowMenuAriaLabel = overflowMenuAriaLabel != null ? overflowMenuAriaLabel : labels.common.hiddenTabsAria;
4058
- const [isMoreMenuOpen, setIsMoreMenuOpen] = (0, import_react7.useState)(false);
4059
4003
  const [isMobileViewport, setIsMobileViewport] = (0, import_react7.useState)(false);
4060
4004
  const [isDraggingTabs, setIsDraggingTabs] = (0, import_react7.useState)(false);
4061
4005
  const [activeUnderlineStyle, setActiveUnderlineStyle] = (0, import_react7.useState)({
@@ -4063,39 +4007,21 @@ var Tabs = ({
4063
4007
  width: 0,
4064
4008
  opacity: 0
4065
4009
  });
4066
- const [overflowLayout, setOverflowLayout] = (0, import_react7.useState)({
4067
- visibleItems: items,
4068
- hiddenItems: []
4069
- });
4070
4010
  const [scrollAffordanceState, setScrollAffordanceState] = (0, import_react7.useState)({
4071
4011
  showStart: false,
4072
4012
  showEnd: false
4073
4013
  });
4074
- const containerRef = (0, import_react7.useRef)(null);
4075
4014
  const tabListRef = (0, import_react7.useRef)(null);
4076
- const moreButtonMeasureRef = (0, import_react7.useRef)(null);
4077
- const tabMeasureRefs = (0, import_react7.useRef)(/* @__PURE__ */ new Map());
4078
4015
  const isBarVariant = variant === "bar";
4079
4016
  const resolvedOverflowBehavior = (0, import_react7.useMemo)(() => {
4080
4017
  if (overflowBehavior)
4081
4018
  return overflowBehavior;
4082
4019
  if (!isBarVariant)
4083
4020
  return "scroll";
4084
- return isMobileViewport ? "select" : "menu";
4021
+ return isMobileViewport ? "select" : "scroll";
4085
4022
  }, [isBarVariant, isMobileViewport, overflowBehavior]);
4086
- const shouldUseOverflowMenu = resolvedOverflowBehavior === "menu";
4087
4023
  const shouldUseOverflowScroll = resolvedOverflowBehavior === "scroll";
4088
4024
  const shouldUseOverflowSelect = resolvedOverflowBehavior === "select";
4089
- const handleMeasureTabRef = (0, import_react7.useCallback)(
4090
- (tabValue, tabElement) => {
4091
- if (!tabElement) {
4092
- tabMeasureRefs.current.delete(tabValue);
4093
- return;
4094
- }
4095
- tabMeasureRefs.current.set(tabValue, tabElement);
4096
- },
4097
- []
4098
- );
4099
4025
  (0, import_react7.useEffect)(() => {
4100
4026
  if (typeof window === "undefined")
4101
4027
  return;
@@ -4115,55 +4041,6 @@ var Tabs = ({
4115
4041
  mediaQueryList.removeListener(handleMediaQueryChange);
4116
4042
  };
4117
4043
  }, []);
4118
- const handleRecalculateOverflow = (0, import_react7.useCallback)(() => {
4119
- var _a, _b, _c, _d;
4120
- if (!shouldUseOverflowMenu) {
4121
- setOverflowLayout({
4122
- visibleItems: items,
4123
- hiddenItems: []
4124
- });
4125
- return;
4126
- }
4127
- const containerWidth = (_b = (_a = containerRef.current) == null ? void 0 : _a.clientWidth) != null ? _b : 0;
4128
- const moreButtonWidth = (_d = (_c = moreButtonMeasureRef.current) == null ? void 0 : _c.offsetWidth) != null ? _d : 0;
4129
- const itemWidthByValue = new Map(
4130
- items.map((item) => {
4131
- var _a2, _b2;
4132
- return [item.value, (_b2 = (_a2 = tabMeasureRefs.current.get(item.value)) == null ? void 0 : _a2.offsetWidth) != null ? _b2 : 0];
4133
- })
4134
- );
4135
- setOverflowLayout(
4136
- resolveTabsOverflowLayout({
4137
- items,
4138
- value,
4139
- containerWidth,
4140
- moreButtonWidth,
4141
- itemWidthByValue
4142
- })
4143
- );
4144
- }, [items, shouldUseOverflowMenu, value]);
4145
- (0, import_react7.useEffect)(() => {
4146
- handleRecalculateOverflow();
4147
- }, [handleRecalculateOverflow]);
4148
- (0, import_react7.useEffect)(() => {
4149
- if (!shouldUseOverflowMenu)
4150
- return;
4151
- const container = containerRef.current;
4152
- if (!container || typeof ResizeObserver === "undefined")
4153
- return;
4154
- const resizeObserver = new ResizeObserver(() => {
4155
- handleRecalculateOverflow();
4156
- });
4157
- resizeObserver.observe(container);
4158
- return () => {
4159
- resizeObserver.disconnect();
4160
- };
4161
- }, [handleRecalculateOverflow, shouldUseOverflowMenu]);
4162
- (0, import_react7.useEffect)(() => {
4163
- if (overflowLayout.hiddenItems.length > 0)
4164
- return;
4165
- setIsMoreMenuOpen(false);
4166
- }, [overflowLayout.hiddenItems.length]);
4167
4044
  const updateScrollAffordances = (0, import_react7.useCallback)(() => {
4168
4045
  if (!shouldUseOverflowScroll) {
4169
4046
  setScrollAffordanceState({
@@ -4181,8 +4058,7 @@ var Tabs = ({
4181
4058
  showEnd: maxScrollLeft - tabListElement.scrollLeft > 4
4182
4059
  });
4183
4060
  }, [shouldUseOverflowScroll]);
4184
- const renderedItems = shouldUseOverflowMenu ? overflowLayout.visibleItems : items;
4185
- const shouldShowMoreButton = shouldUseOverflowMenu && overflowLayout.hiddenItems.length > 0;
4061
+ const renderedItems = items;
4186
4062
  const selectItems = (0, import_react7.useMemo)(() => {
4187
4063
  return items.map((item) => ({
4188
4064
  value: item.value,
@@ -4207,24 +4083,24 @@ var Tabs = ({
4207
4083
  (_a = buttonRefs.current[index]) == null ? void 0 : _a.focus();
4208
4084
  };
4209
4085
  const handleKeyDown = (event, index) => {
4210
- switch (event.key) {
4086
+ switch (event == null ? void 0 : event.key) {
4211
4087
  case "ArrowRight": {
4212
- event.preventDefault();
4088
+ event == null ? void 0 : event.preventDefault();
4213
4089
  handleMoveFocus(findNextEnabledIndex(renderedItems, index, 1));
4214
4090
  return;
4215
4091
  }
4216
4092
  case "ArrowLeft": {
4217
- event.preventDefault();
4093
+ event == null ? void 0 : event.preventDefault();
4218
4094
  handleMoveFocus(findNextEnabledIndex(renderedItems, index, -1));
4219
4095
  return;
4220
4096
  }
4221
4097
  case "Home": {
4222
- event.preventDefault();
4098
+ event == null ? void 0 : event.preventDefault();
4223
4099
  handleMoveFocus(findEdgeEnabledIndex(renderedItems, 1));
4224
4100
  return;
4225
4101
  }
4226
4102
  case "End": {
4227
- event.preventDefault();
4103
+ event == null ? void 0 : event.preventDefault();
4228
4104
  handleMoveFocus(findEdgeEnabledIndex(renderedItems, -1));
4229
4105
  return;
4230
4106
  }
@@ -4232,22 +4108,16 @@ var Tabs = ({
4232
4108
  return;
4233
4109
  }
4234
4110
  };
4235
- const activeHiddenItem = (0, import_react7.useMemo)(() => {
4236
- if (!shouldUseOverflowMenu)
4237
- return void 0;
4238
- return overflowLayout.hiddenItems.find((item) => item.value === value);
4239
- }, [overflowLayout.hiddenItems, shouldUseOverflowMenu, value]);
4240
4111
  const tabListClassName = cn(
4241
4112
  "inline-flex items-stretch bg-agg-secondary",
4242
- shouldUseOverflowMenu ? "min-w-0 flex-1 overflow-hidden" : shouldUseOverflowScroll ? cn(
4113
+ shouldUseOverflowScroll ? cn(
4243
4114
  "overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
4244
4115
  getMotionClassName(enableAnimations, "scroll-smooth")
4245
4116
  ) : "overflow-x-auto",
4246
4117
  isBarVariant ? "h-8 rounded-agg-sm border border-agg-separator" : "h-12 border-b border-agg-separator -mb-[1px]",
4247
4118
  shouldUseOverflowScroll && "select-none",
4248
4119
  shouldUseOverflowScroll && !isBarVariant && "snap-x snap-mandatory",
4249
- shouldUseOverflowScroll && (isDraggingTabs ? "cursor-grabbing" : "cursor-grab"),
4250
- shouldShowMoreButton && isBarVariant && "rounded-r-none border-r-0"
4120
+ shouldUseOverflowScroll && (isDraggingTabs ? "cursor-grabbing" : "cursor-grab")
4251
4121
  );
4252
4122
  const handleTabListWheel = (event) => {
4253
4123
  if (!shouldUseOverflowScroll)
@@ -4336,14 +4206,10 @@ var Tabs = ({
4336
4206
  const handleTabListClickCapture = (event) => {
4337
4207
  if (!suppressClickRef.current)
4338
4208
  return;
4339
- event.preventDefault();
4340
- event.stopPropagation();
4209
+ event == null ? void 0 : event.preventDefault();
4210
+ event == null ? void 0 : event.stopPropagation();
4341
4211
  suppressClickRef.current = false;
4342
4212
  };
4343
- const handleSelectHiddenItem = (nextValue) => {
4344
- handleSelect(nextValue);
4345
- setIsMoreMenuOpen(false);
4346
- };
4347
4213
  const updateActiveUnderline = (0, import_react7.useCallback)(() => {
4348
4214
  if (isBarVariant) {
4349
4215
  setActiveUnderlineStyle({
@@ -4411,18 +4277,34 @@ var Tabs = ({
4411
4277
  (0, import_react7.useEffect)(() => {
4412
4278
  if (!shouldUseOverflowScroll)
4413
4279
  return;
4280
+ const tabListElement = tabListRef.current;
4281
+ if (!tabListElement)
4282
+ return;
4414
4283
  const activeIndex = renderedItems.findIndex((item) => item.value === value);
4415
4284
  const activeButton = activeIndex >= 0 ? buttonRefs.current[activeIndex] : null;
4416
4285
  if (!activeButton)
4417
4286
  return;
4418
- activeButton.scrollIntoView({
4419
- behavior: getScrollBehavior(enableAnimations),
4420
- block: "nearest",
4421
- inline: "nearest"
4287
+ if (tabListElement.scrollWidth - tabListElement.clientWidth <= 1)
4288
+ return;
4289
+ const currentScrollLeft = tabListElement.scrollLeft;
4290
+ const currentScrollRight = currentScrollLeft + tabListElement.clientWidth;
4291
+ const activeButtonLeft = activeButton.offsetLeft;
4292
+ const activeButtonRight = activeButtonLeft + activeButton.offsetWidth;
4293
+ let nextScrollLeft = currentScrollLeft;
4294
+ if (activeButtonLeft < currentScrollLeft) {
4295
+ nextScrollLeft = activeButtonLeft;
4296
+ } else if (activeButtonRight > currentScrollRight) {
4297
+ nextScrollLeft = activeButtonRight - tabListElement.clientWidth;
4298
+ }
4299
+ if (Math.abs(nextScrollLeft - currentScrollLeft) < 1)
4300
+ return;
4301
+ tabListElement.scrollTo({
4302
+ left: Math.max(0, nextScrollLeft),
4303
+ behavior: getScrollBehavior(enableAnimations)
4422
4304
  });
4423
4305
  }, [enableAnimations, renderedItems, shouldUseOverflowScroll, value]);
4424
4306
  if (shouldUseOverflowSelect) {
4425
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: cn("w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4307
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: cn("w-full", className, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4426
4308
  Select,
4427
4309
  {
4428
4310
  ariaLabel,
@@ -4437,10 +4319,12 @@ var Tabs = ({
4437
4319
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
4438
4320
  "div",
4439
4321
  {
4440
- ref: containerRef,
4441
4322
  className: cn(
4442
- "relative inline-flex max-w-full items-stretch font-agg-sans bg-agg-secondary",
4443
- className
4323
+ "group/agg-tabs",
4324
+ "relative max-w-full items-stretch font-agg-sans bg-agg-secondary",
4325
+ "inline-flex",
4326
+ className,
4327
+ classNames == null ? void 0 : classNames.root
4444
4328
  ),
4445
4329
  children: [
4446
4330
  /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
@@ -4449,7 +4333,7 @@ var Tabs = ({
4449
4333
  ref: tabListRef,
4450
4334
  role: "tablist",
4451
4335
  "aria-label": resolvedAriaLabel,
4452
- className: cn("relative", tabListClassName),
4336
+ className: cn("relative", tabListClassName, classNames == null ? void 0 : classNames.tabList),
4453
4337
  onClickCapture: handleTabListClickCapture,
4454
4338
  onPointerCancel: handleEndTabListDrag,
4455
4339
  onPointerDown: handleTabListPointerDown,
@@ -4471,7 +4355,11 @@ var Tabs = ({
4471
4355
  "aria-selected": isActive,
4472
4356
  "aria-label": item.label,
4473
4357
  disabled: item.disabled,
4474
- onClick: () => handleSelect(item.value),
4358
+ onClick: (e) => {
4359
+ e.preventDefault();
4360
+ e.stopPropagation();
4361
+ handleSelect(item.value);
4362
+ },
4475
4363
  onKeyDown: (event) => handleKeyDown(event, index),
4476
4364
  className: cn(
4477
4365
  getTabButtonClassName({
@@ -4513,7 +4401,7 @@ var Tabs = ({
4513
4401
  "pointer-events-none absolute bottom-0 left-0 rounded-t-agg-sm bg-agg-primary",
4514
4402
  getMotionClassName(
4515
4403
  enableAnimations,
4516
- "transition-[transform,width,opacity] duration-300 ease-[cubic-bezier(0.4,0,0.2,1)]"
4404
+ "transition-[transform,width,opacity] duration-300 ease-in-out"
4517
4405
  ),
4518
4406
  "h-[3px]"
4519
4407
  ),
@@ -4529,7 +4417,7 @@ var Tabs = ({
4529
4417
  {
4530
4418
  "aria-hidden": true,
4531
4419
  className: cn(
4532
- "pointer-events-none absolute top-0 bottom-0 left-0 z-10 w-12 md:w-18 bg-gradient-to-r from-agg-secondary via-agg-secondary to-transparent",
4420
+ "pointer-events-none absolute top-0 bottom-0 left-8 z-10 w-12 md:w-18 bg-linear-to-r from-agg-secondary via-agg-secondary to-transparent",
4533
4421
  getMotionClassName(enableAnimations, "transition-opacity duration-200"),
4534
4422
  scrollAffordanceState.showStart ? "opacity-100" : "opacity-0"
4535
4423
  )
@@ -4540,104 +4428,13 @@ var Tabs = ({
4540
4428
  {
4541
4429
  "aria-hidden": true,
4542
4430
  className: cn(
4543
- "pointer-events-none absolute top-0 right-0 bottom-0 z-10 w-12 md:w-18 bg-gradient-to-l from-agg-secondary via-agg-secondary to-transparent",
4431
+ "pointer-events-none absolute top-0 right-8 bottom-0 z-10 w-12 md:w-18 bg-linear-to-l from-agg-secondary via-agg-secondary to-transparent",
4544
4432
  getMotionClassName(enableAnimations, "transition-opacity duration-200"),
4545
4433
  scrollAffordanceState.showEnd ? "opacity-100" : "opacity-0"
4546
4434
  )
4547
4435
  }
4548
4436
  )
4549
- ] }) : null,
4550
- shouldShowMoreButton ? /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(DropdownMenu2.Root, { open: isMoreMenuOpen, onOpenChange: setIsMoreMenuOpen, children: [
4551
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4552
- "button",
4553
- {
4554
- type: "button",
4555
- "aria-label": resolvedOverflowMenuAriaLabel,
4556
- className: cn(
4557
- getMoreButtonClassName({
4558
- enableAnimations,
4559
- isBarVariant,
4560
- size
4561
- }),
4562
- activeHiddenItem ? "font-agg-bold text-agg-primary" : "font-agg-normal text-agg-foreground"
4563
- ),
4564
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: "dots-horizontal", size: isBarVariant ? "s" : "m", color: "currentColor" })
4565
- }
4566
- ) }),
4567
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4568
- DropdownMenu2.Content,
4569
- {
4570
- align: "end",
4571
- "aria-label": resolvedOverflowMenuAriaLabel,
4572
- className: cn(
4573
- AGG_ROOT_CLASS_NAME,
4574
- rootClassName,
4575
- "z-agg-dropdown mt-2 min-w-48 overflow-hidden rounded-agg-md border border-agg-separator bg-agg-secondary shadow-agg-popover outline-none"
4576
- ),
4577
- "data-agg-animations": enableAnimations ? "true" : "false",
4578
- sideOffset: 8,
4579
- children: overflowLayout.hiddenItems.map((item) => {
4580
- const isSelected = item.value === value;
4581
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
4582
- DropdownMenu2.Item,
4583
- {
4584
- disabled: item.disabled,
4585
- onSelect: () => handleSelectHiddenItem(item.value),
4586
- className: cn(
4587
- "cursor-pointer disabled:cursor-not-allowed",
4588
- "flex w-full items-center gap-2 px-4 py-2 text-left text-agg-sm leading-agg-5 outline-none",
4589
- getMotionClassName(enableAnimations, "transition-colors"),
4590
- "focus:bg-agg-secondary-hover data-[highlighted]:bg-agg-secondary-hover",
4591
- isSelected ? "font-agg-bold text-agg-primary" : "font-agg-normal text-agg-foreground",
4592
- item.disabled && "cursor-not-allowed opacity-60"
4593
- ),
4594
- children: [
4595
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: item.icon }) : null,
4596
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "truncate whitespace-nowrap [&::first-letter]:uppercase", children: item.label })
4597
- ]
4598
- },
4599
- item.value
4600
- );
4601
- })
4602
- }
4603
- ) })
4604
- ] }) : null,
4605
- shouldUseOverflowMenu ? /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
4606
- "div",
4607
- {
4608
- "aria-hidden": true,
4609
- className: "pointer-events-none invisible fixed top-0 left-0 -z-10 h-0 overflow-hidden whitespace-nowrap",
4610
- children: [
4611
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
4612
- "span",
4613
- {
4614
- ref: (tabElement) => handleMeasureTabRef(item.value, tabElement),
4615
- className: getMeasureTabClassName({
4616
- isBarVariant,
4617
- size
4618
- }),
4619
- children: [
4620
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: item.icon }) : null,
4621
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: item.label })
4622
- ]
4623
- },
4624
- `measure-${item.value}`
4625
- )),
4626
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4627
- "span",
4628
- {
4629
- ref: moreButtonMeasureRef,
4630
- className: getMoreButtonClassName({
4631
- enableAnimations,
4632
- isBarVariant,
4633
- size
4634
- }),
4635
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: "dots-horizontal", size: isBarVariant ? "s" : "m", color: "currentColor" })
4636
- }
4637
- )
4638
- ]
4639
- }
4640
- ) : null
4437
+ ] }) : null
4641
4438
  ]
4642
4439
  }
4643
4440
  );
@@ -4646,7 +4443,7 @@ Tabs.displayName = "Tabs";
4646
4443
 
4647
4444
  // src/primitives/modal/index.tsx
4648
4445
  var Dialog = __toESM(require("@radix-ui/react-dialog"));
4649
- var import_hooks19 = require("@agg-market/hooks");
4446
+ var import_hooks20 = require("@agg-market/hooks");
4650
4447
  var import_jsx_runtime70 = require("react/jsx-runtime");
4651
4448
  var Modal = ({
4652
4449
  open,
@@ -4664,7 +4461,7 @@ var ModalContainer = ({
4664
4461
  "aria-label": ariaLabel,
4665
4462
  "aria-labelledby": ariaLabelledBy
4666
4463
  }) => {
4667
- const { rootClassName, enableAnimations } = (0, import_hooks19.useSdkUiConfig)();
4464
+ const { rootClassName, enableAnimations } = (0, import_hooks20.useSdkUiConfig)();
4668
4465
  const overlayAnimationClassName = enableAnimations ? "motion-safe:data-[state=open]:animate-agg-modal-overlay-in motion-safe:data-[state=closed]:animate-agg-modal-overlay-out motion-reduce:animate-none" : void 0;
4669
4466
  const panelAnimationClassName = enableAnimations ? "motion-safe:data-[state=open]:animate-agg-modal-panel-in motion-safe:data-[state=closed]:animate-agg-modal-panel-out motion-reduce:animate-none" : void 0;
4670
4467
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Dialog.Portal, { children: [
@@ -4682,6 +4479,7 @@ var ModalContainer = ({
4682
4479
  Dialog.Content,
4683
4480
  {
4684
4481
  className: cn(
4482
+ "group/agg-modal",
4685
4483
  "fixed inset-0 z-agg-modal",
4686
4484
  "flex items-center justify-center p-4",
4687
4485
  "sm:p-5",
@@ -4726,14 +4524,15 @@ var ModalHeader = ({
4726
4524
  children,
4727
4525
  hideBorder = false
4728
4526
  }) => {
4729
- const { enableAnimations } = (0, import_hooks19.useSdkUiConfig)();
4730
- const labels = (0, import_hooks19.useLabels)();
4527
+ const { enableAnimations } = (0, import_hooks20.useSdkUiConfig)();
4528
+ const labels = (0, import_hooks20.useLabels)();
4731
4529
  const defaultCloseIcon = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(CloseIcon, { className: "h-6 w-6" });
4732
4530
  const resolvedCloseIcon = closeIcon != null ? closeIcon : defaultCloseIcon;
4733
4531
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
4734
4532
  "div",
4735
4533
  {
4736
4534
  className: cn(
4535
+ "group/agg-modal-header",
4737
4536
  "flex flex-col",
4738
4537
  "sticky top-0 z-20",
4739
4538
  "bg-agg-secondary",
@@ -4809,6 +4608,7 @@ var ModalBody = ({ children, classNames }) => {
4809
4608
  "div",
4810
4609
  {
4811
4610
  className: cn(
4611
+ "group/agg-modal-body",
4812
4612
  "grow overflow-y-auto",
4813
4613
  "px-4 py-6",
4814
4614
  "sm:p-8",
@@ -4829,6 +4629,7 @@ var ModalFooter = ({
4829
4629
  "div",
4830
4630
  {
4831
4631
  className: cn(
4632
+ "group/agg-modal-footer",
4832
4633
  "sticky bottom-0",
4833
4634
  "bg-agg-secondary",
4834
4635
  "flex h-[73px] w-full flex-row items-center justify-between gap-3",
@@ -4847,7 +4648,7 @@ Modal.displayName = "Modal";
4847
4648
  // src/events/item/index.tsx
4848
4649
  var import_dayjs2 = __toESM(require("dayjs"));
4849
4650
  var import_react8 = require("react");
4850
- var import_hooks20 = require("@agg-market/hooks");
4651
+ var import_hooks21 = require("@agg-market/hooks");
4851
4652
 
4852
4653
  // src/events/item/event-list-item.utils.ts
4853
4654
  var resolveEventListItemEvent = (fetchedEvent) => {
@@ -5008,7 +4809,7 @@ var EventListItemLoadingState = ({
5008
4809
  classNames,
5009
4810
  ariaLabel
5010
4811
  }) => {
5011
- const labels = (0, import_hooks20.useLabels)();
4812
+ const labels = (0, import_hooks21.useLabels)();
5012
4813
  return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5013
4814
  Skeleton,
5014
4815
  {
@@ -5022,7 +4823,7 @@ var EventListItemUnavailableState = ({
5022
4823
  classNames,
5023
4824
  ariaLabel
5024
4825
  }) => {
5025
- const labels = (0, import_hooks20.useLabels)();
4826
+ const labels = (0, import_hooks21.useLabels)();
5026
4827
  return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5027
4828
  Card,
5028
4829
  {
@@ -5030,7 +4831,7 @@ var EventListItemUnavailableState = ({
5030
4831
  role: "status",
5031
4832
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventItem.unavailableAria,
5032
4833
  children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("flex flex-col gap-1", classNames == null ? void 0 : classNames.header), children: [
5033
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Typography, { variant: "title", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItem.unavailableTitle }),
4834
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Typography, { variant: "body-large-strong", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItem.unavailableTitle }),
5034
4835
  /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Typography, { variant: "body", className: "text-agg-muted-foreground", children: labels.eventItem.unavailableDescription })
5035
4836
  ] })
5036
4837
  }
@@ -5049,8 +4850,8 @@ var EventListItemContent = ({
5049
4850
  ariaLabel
5050
4851
  }) => {
5051
4852
  var _a;
5052
- const config = (0, import_hooks20.useSdkUiConfig)();
5053
- const labels = (0, import_hooks20.useLabels)();
4853
+ const config = (0, import_hooks21.useSdkUiConfig)();
4854
+ const labels = (0, import_hooks21.useLabels)();
5054
4855
  const allVenueMarkets = (0, import_react8.useMemo)(() => {
5055
4856
  return event.markets.flatMap((market) => market.venueMarkets);
5056
4857
  }, [event.markets]);
@@ -5074,8 +4875,8 @@ var EventListItemContent = ({
5074
4875
  const handleKeyDown = (eventToHandle) => {
5075
4876
  if (!onClick)
5076
4877
  return;
5077
- if (eventToHandle.key === "Enter" || eventToHandle.key === " ") {
5078
- eventToHandle.preventDefault();
4878
+ if ((eventToHandle == null ? void 0 : eventToHandle.key) === "Enter" || (eventToHandle == null ? void 0 : eventToHandle.key) === " ") {
4879
+ eventToHandle == null ? void 0 : eventToHandle.preventDefault();
5079
4880
  onClick();
5080
4881
  }
5081
4882
  };
@@ -5084,9 +4885,17 @@ var EventListItemContent = ({
5084
4885
  return null;
5085
4886
  if (Math.abs(value) < config.arbitrageThreshold)
5086
4887
  return null;
5087
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("flex items-baseline gap-1", "text-agg-success"), children: [
5088
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Typography, { variant: "label", className: "text-agg-success", children: config.formatPercent(value) }),
5089
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Icon, { name: "triangle-up", size: "xxs", title: labels.eventItem.arbitrage })
4888
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("flex items-center gap-1", "text-agg-success"), children: [
4889
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Typography, { variant: "label-strong", className: "text-agg-success", children: config.formatPercent(value) }),
4890
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4891
+ Icon,
4892
+ {
4893
+ name: "triangle-up",
4894
+ size: "small",
4895
+ title: labels.eventItem.arbitrage,
4896
+ className: "size-2!"
4897
+ }
4898
+ )
5090
4899
  ] });
5091
4900
  };
5092
4901
  return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
@@ -5111,9 +4920,10 @@ var EventListItemContent = ({
5111
4920
  /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5112
4921
  Typography,
5113
4922
  {
5114
- variant: "title",
4923
+ variant: "body-strong",
5115
4924
  className: cn(
5116
- "min-w-0 text-agg-base font-agg-bold leading-agg-6 whitespace-normal [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] md:block md:truncate md:whitespace-nowrap",
4925
+ "min-w-0 text-agg-base font-agg-bold leading-agg-6 ",
4926
+ "truncate text-wrap wrap-break-word line-clamp-2",
5117
4927
  classNames == null ? void 0 : classNames.title
5118
4928
  ),
5119
4929
  children: resolvedTitle
@@ -5130,7 +4940,7 @@ var EventListItemContent = ({
5130
4940
  "div",
5131
4941
  {
5132
4942
  className: cn(
5133
- "grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3",
4943
+ "flex flex-row gap-3 w-full items-center justify-between",
5134
4944
  classNames == null ? void 0 : classNames.outcomeRow
5135
4945
  ),
5136
4946
  children: [
@@ -5142,21 +4952,23 @@ var EventListItemContent = ({
5142
4952
  children: formattedTitle
5143
4953
  }
5144
4954
  ),
5145
- renderArbitrage(arbitragePercent),
5146
- showBadge ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5147
- Badge,
5148
- {
5149
- text: config.formatPercent(probability),
5150
- prefix: showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(VenueLogo, { venue: visibleOutcome.venue, size: "s" }) : void 0,
5151
- size: "l",
5152
- classNames: {
5153
- root: cn(
5154
- "h-9 min-w-[101px] justify-center px-4 text-agg-base leading-agg-6",
5155
- classNames == null ? void 0 : classNames.badge
5156
- )
4955
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex flex-row gap-3 items-center justify-end", children: [
4956
+ renderArbitrage(arbitragePercent),
4957
+ showBadge ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4958
+ Badge,
4959
+ {
4960
+ text: config.formatPercent(probability),
4961
+ prefix: showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(VenueLogo, { venue: visibleOutcome.venue, size: "small" }) : void 0,
4962
+ size: "large",
4963
+ classNames: {
4964
+ root: cn(
4965
+ "h-9 min-w-[101px] justify-center px-4 text-agg-base leading-agg-6",
4966
+ classNames == null ? void 0 : classNames.badge
4967
+ )
4968
+ }
5157
4969
  }
5158
- }
5159
- ) : null
4970
+ ) : null
4971
+ ] })
5160
4972
  ]
5161
4973
  },
5162
4974
  `${visibleOutcome.market.id}-${visibleOutcome.outcome.id}`
@@ -5171,7 +4983,7 @@ var EventListItemContent = ({
5171
4983
  classNames == null ? void 0 : classNames.footer
5172
4984
  ),
5173
4985
  children: [
5174
- /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("flex items-center gap-2", "text-agg-sm leading-agg-5"), children: [
4986
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("flex items-center gap-1", "text-agg-sm leading-agg-5"), children: [
5175
4987
  /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "truncate text-agg-muted-foreground", children: formatCountLabel(
5176
4988
  marketCount,
5177
4989
  labels.eventItem.marketSingular,
@@ -5179,16 +4991,33 @@ var EventListItemContent = ({
5179
4991
  ) }),
5180
4992
  /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-agg-muted-foreground", children: "\xD7" }),
5181
4993
  singleVenue ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "flex items-center gap-1 truncate text-agg-muted-foreground", children: [
5182
- showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(VenueLogo, { venue: singleVenue, size: "xs" }) : null,
4994
+ showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4995
+ VenueLogo,
4996
+ {
4997
+ venue: singleVenue,
4998
+ size: "small",
4999
+ isMonochromatic: true,
5000
+ className: "text-agg-muted-foreground!"
5001
+ }
5002
+ ) : null,
5183
5003
  /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: venueLabel })
5184
5004
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "truncate text-agg-muted-foreground", children: formatCountLabel(
5185
5005
  venueCount,
5186
5006
  labels.eventItem.venueSingular,
5187
5007
  labels.eventItem.venuePlural
5188
5008
  ) }),
5189
- showVenueLogo && !singleVenue && visibleVenueLogos.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "flex items-center gap-1 overflow-hidden", children: visibleVenueLogos.map((venue) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(VenueLogo, { venue, size: "xs" }, venue)) }) : null
5009
+ showVenueLogo && !singleVenue && visibleVenueLogos.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "flex items-center gap-1 overflow-hidden", children: visibleVenueLogos.map((venue) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5010
+ VenueLogo,
5011
+ {
5012
+ venue,
5013
+ size: "small",
5014
+ isMonochromatic: true,
5015
+ className: "text-agg-muted-foreground!"
5016
+ },
5017
+ venue
5018
+ )) }) : null
5190
5019
  ] }),
5191
- volumeLabel ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Typography, { variant: "meta", className: "text-agg-sm", children: volumeLabel }) : null
5020
+ volumeLabel ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Typography, { variant: "label", className: "text-agg-sm text-agg-muted-foreground", children: volumeLabel }) : null
5192
5021
  ]
5193
5022
  }
5194
5023
  )
@@ -5206,7 +5035,7 @@ var EventListItemByEventId = (_a) => {
5206
5035
  event: fetchedEvent,
5207
5036
  isError,
5208
5037
  isLoading
5209
- } = (0, import_hooks20.useEvent)(eventId, {
5038
+ } = (0, import_hooks21.useEvent)(eventId, {
5210
5039
  enabled: !!eventId
5211
5040
  });
5212
5041
  const resolvedEvent = (0, import_react8.useMemo)(() => {
@@ -5240,7 +5069,7 @@ EventListItem.displayName = "EventListItem";
5240
5069
 
5241
5070
  // src/events/item-details/index.tsx
5242
5071
  var import_react9 = require("react");
5243
- var import_hooks21 = require("@agg-market/hooks");
5072
+ var import_hooks22 = require("@agg-market/hooks");
5244
5073
 
5245
5074
  // src/events/item-details/event-list-item-details.utils.ts
5246
5075
  var import_dayjs3 = __toESM(require("dayjs"));
@@ -5369,7 +5198,7 @@ var EventListItemDetailsLoadingState = ({
5369
5198
  classNames,
5370
5199
  ariaLabel
5371
5200
  }) => {
5372
- const labels = (0, import_hooks21.useLabels)();
5201
+ const labels = (0, import_hooks22.useLabels)();
5373
5202
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5374
5203
  Skeleton,
5375
5204
  {
@@ -5383,7 +5212,7 @@ var EventListItemDetailsUnavailableState = ({
5383
5212
  classNames,
5384
5213
  ariaLabel
5385
5214
  }) => {
5386
- const labels = (0, import_hooks21.useLabels)();
5215
+ const labels = (0, import_hooks22.useLabels)();
5387
5216
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5388
5217
  Card,
5389
5218
  {
@@ -5391,7 +5220,7 @@ var EventListItemDetailsUnavailableState = ({
5391
5220
  role: "status",
5392
5221
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.unavailableAria,
5393
5222
  children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: cn("flex flex-col gap-1", classNames == null ? void 0 : classNames.header), children: [
5394
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Typography, { variant: "title", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItemDetails.unavailableTitle }),
5223
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Typography, { variant: "body-large-strong", className: cn("truncate", classNames == null ? void 0 : classNames.title), children: labels.eventItemDetails.unavailableTitle }),
5395
5224
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Typography, { variant: "body", className: "text-agg-muted-foreground", children: labels.eventItemDetails.unavailableDescription })
5396
5225
  ] })
5397
5226
  }
@@ -5429,7 +5258,7 @@ var EventListItemDetailsGraphSection = ({
5429
5258
  formatPercent,
5430
5259
  selectedTimeRange
5431
5260
  }) => {
5432
- const labels = (0, import_hooks21.useLabels)();
5261
+ const labels = (0, import_hooks22.useLabels)();
5433
5262
  const [selectedVenue, setSelectedVenue] = (0, import_react9.useState)(null);
5434
5263
  const [activeProbabilityMode, setActiveProbabilityMode] = (0, import_react9.useState)("yes");
5435
5264
  const probabilityModeConfigs = (0, import_react9.useMemo)(() => {
@@ -5516,7 +5345,7 @@ var EventListItemDetailsGraphSection = ({
5516
5345
  const timeWindow = (0, import_react9.useMemo)(() => {
5517
5346
  return getTimeWindowByRange(selectedTimeRange);
5518
5347
  }, [selectedTimeRange]);
5519
- const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks21.usePriceHistory)(__spreadProps(__spreadValues({
5348
+ const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks22.usePriceHistory)(__spreadProps(__spreadValues({
5520
5349
  groups: priceHistoryGroups
5521
5350
  }, timeWindow), {
5522
5351
  enabled: priceHistoryGroups.length > 0
@@ -5654,25 +5483,27 @@ var EventListItemDetailsGraphSection = ({
5654
5483
  className: cn(
5655
5484
  "rounded-agg-full 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"
5656
5485
  ),
5657
- onClick: () => handleVenueToggle(venueData.venue),
5658
5486
  children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5659
5487
  Badge,
5660
5488
  {
5661
5489
  text,
5662
- size: "l",
5490
+ size: "large",
5663
5491
  prefix: showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5664
5492
  VenueLogo,
5665
5493
  {
5666
5494
  venue: venueData.venue,
5667
- size: "s",
5495
+ size: "small",
5668
5496
  title: (_a = venueInfo == null ? void 0 : venueInfo[venueData.venue]) == null ? void 0 : _a.label
5669
5497
  }
5670
5498
  ) : void 0,
5671
5499
  classNames: {
5672
- root: cn(
5673
- "h-9 shrink-0 border-2 px-4 text-agg-base leading-agg-6",
5674
- isActiveVenue ? "border-agg-primary bg-agg-secondary font-agg-bold" : "border-transparent bg-agg-secondary-hover font-agg-normal"
5675
- )
5500
+ root: cn("h-9 shrink-0 border-2 px-4 text-agg-base leading-agg-6")
5501
+ },
5502
+ isActive: isActiveVenue,
5503
+ onClick: (e) => {
5504
+ e.preventDefault();
5505
+ e.stopPropagation();
5506
+ handleVenueToggle(venueData.venue);
5676
5507
  }
5677
5508
  }
5678
5509
  )
@@ -5714,8 +5545,8 @@ var EventListItemDetailsContent = ({
5714
5545
  ariaLabel,
5715
5546
  defaultTimeRange
5716
5547
  }) => {
5717
- const config = (0, import_hooks21.useSdkUiConfig)();
5718
- const labels = (0, import_hooks21.useLabels)();
5548
+ const config = (0, import_hooks22.useSdkUiConfig)();
5549
+ const labels = (0, import_hooks22.useLabels)();
5719
5550
  const venueMarkets = (0, import_react9.useMemo)(() => {
5720
5551
  var _a, _b, _c;
5721
5552
  return (_c = (_b = (_a = event.markets) == null ? void 0 : _a[0]) == null ? void 0 : _b.venueMarkets) != null ? _c : [];
@@ -5810,69 +5641,73 @@ var EventListItemDetailsContent = ({
5810
5641
  className: cn(detailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
5811
5642
  "aria-label": ariaLabel != null ? ariaLabel : resolvedTitle,
5812
5643
  children: [
5813
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: cn("flex items-start gap-3 md:gap-4 ", classNames == null ? void 0 : classNames.header), children: [
5814
- resolvedImage ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5815
- "img",
5816
- {
5817
- src: resolvedImage,
5818
- alt: "",
5819
- className: "size-10 rounded-agg-lg object-cover md:size-[60px]"
5820
- }
5821
- ) : null,
5822
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: [
5823
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5824
- Typography,
5825
- {
5826
- variant: "value",
5827
- className: cn(
5828
- "min-w-0 text-agg-base font-agg-bold! leading-agg-6 whitespace-normal [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] md:text-agg-2xl md:leading-agg-8 md:block md:truncate md:whitespace-nowrap",
5829
- classNames == null ? void 0 : classNames.title
5830
- ),
5831
- children: resolvedTitle
5832
- }
5644
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
5645
+ "div",
5646
+ {
5647
+ className: cn(
5648
+ "flex flex-row gap-3 md:gap-4",
5649
+ "items-center justify-start",
5650
+ classNames == null ? void 0 : classNames.header
5833
5651
  ),
5834
- outcomeSelectorLabels.length > 2 ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5835
- "div",
5836
- {
5837
- className: cn(
5838
- "flex items-center gap-2 overflow-x-auto pb-1 md:flex-wrap md:overflow-visible md:pb-0",
5839
- classNames == null ? void 0 : classNames.headerPills
5652
+ children: [
5653
+ resolvedImage ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5654
+ "img",
5655
+ {
5656
+ src: resolvedImage,
5657
+ alt: "",
5658
+ className: "size-10 rounded-agg-lg object-cover md:size-[60px]"
5659
+ }
5660
+ ) : null,
5661
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: [
5662
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5663
+ Typography,
5664
+ {
5665
+ variant: "body-strong",
5666
+ className: cn(
5667
+ "min-w-0 text-agg-base font-agg-bold! leading-agg-6 md:text-agg-2xl md:leading-agg-8",
5668
+ "truncate text-wrap wrap-break-word line-clamp-2",
5669
+ classNames == null ? void 0 : classNames.title
5670
+ ),
5671
+ children: resolvedTitle
5672
+ }
5840
5673
  ),
5841
- children: outcomeSelectorLabels.map((outcomeSelectorLabel) => {
5842
- const isActive = outcomeSelectorLabel === selectedOutcomeLabel;
5843
- const displayLabel = isDateLikeLabel(outcomeSelectorLabel) ? formatDateLabel(outcomeSelectorLabel) : outcomeSelectorLabel;
5844
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5845
- Button,
5846
- {
5847
- size: "s",
5848
- variant: "secondary",
5849
- "aria-pressed": isActive,
5850
- className: cn(
5851
- "h-auto shrink-0 rounded-agg-full px-4 py-1.5 text-agg-sm leading-agg-5",
5852
- "border-2",
5853
- isActive ? "border-agg-primary bg-agg-secondary text-agg-foreground font-agg-bold" : "border-transparent bg-agg-secondary-hover text-agg-foreground font-agg-normal"
5854
- ),
5855
- onClick: () => setSelectedOutcomeLabel(outcomeSelectorLabel),
5856
- children: displayLabel
5857
- },
5858
- outcomeSelectorLabel
5859
- );
5860
- })
5861
- }
5862
- ) : null
5863
- ] })
5864
- ] }),
5674
+ outcomeSelectorLabels.length > 2 ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5675
+ "div",
5676
+ {
5677
+ className: cn(
5678
+ "flex items-center gap-2 overflow-x-auto pb-1 md:flex-wrap md:overflow-visible md:pb-0",
5679
+ classNames == null ? void 0 : classNames.headerPills
5680
+ ),
5681
+ children: outcomeSelectorLabels.map((outcomeSelectorLabel) => {
5682
+ const isActive = outcomeSelectorLabel === selectedOutcomeLabel;
5683
+ const displayLabel = isDateLikeLabel(outcomeSelectorLabel) ? formatDateLabel(outcomeSelectorLabel) : outcomeSelectorLabel;
5684
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5685
+ Button,
5686
+ {
5687
+ size: "small",
5688
+ variant: "secondary",
5689
+ "aria-pressed": isActive,
5690
+ className: cn(
5691
+ "h-auto shrink-0 rounded-agg-full px-4 py-1.5 text-agg-sm leading-agg-5",
5692
+ "border-2",
5693
+ isActive ? "border-agg-primary bg-agg-secondary text-agg-foreground font-agg-bold" : "border-transparent bg-agg-secondary-hover text-agg-foreground font-agg-normal"
5694
+ ),
5695
+ onClick: () => setSelectedOutcomeLabel(outcomeSelectorLabel),
5696
+ children: displayLabel
5697
+ },
5698
+ outcomeSelectorLabel
5699
+ );
5700
+ })
5701
+ }
5702
+ ) : null
5703
+ ] })
5704
+ ]
5705
+ }
5706
+ ),
5865
5707
  detailsStats && detailsStats.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: cn("flex flex-wrap items-start gap-4 md:gap-6", classNames == null ? void 0 : classNames.headerStats), children: detailsStats.map((statItem) => {
5866
- const deltaClassName = statItem.deltaTone === "positive" ? "text-agg-success" : statItem.deltaTone === "negative" ? "text-agg-error" : "text-agg-muted-foreground";
5708
+ const deltaClassName = statItem.deltaTone === "positive" ? "text-agg-success!" : statItem.deltaTone === "negative" ? "text-agg-error!" : "text-agg-muted-foreground";
5867
5709
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex flex-col gap-1", children: [
5868
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5869
- Typography,
5870
- {
5871
- variant: "label",
5872
- className: "text-agg-xs leading-agg-4 tracking-agg-normal text-agg-muted-foreground",
5873
- children: statItem.label
5874
- }
5875
- ),
5710
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Typography, { variant: "caption-caps", className: "text-agg-muted-foreground", children: statItem.label }),
5876
5711
  /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-baseline gap-1", children: [
5877
5712
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5878
5713
  Typography,
@@ -5882,14 +5717,7 @@ var EventListItemDetailsContent = ({
5882
5717
  children: statItem.value
5883
5718
  }
5884
5719
  ),
5885
- statItem.delta ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5886
- Typography,
5887
- {
5888
- variant: "meta",
5889
- className: cn("text-agg-sm leading-agg-5", deltaClassName),
5890
- children: statItem.delta
5891
- }
5892
- ) : null
5720
+ statItem.delta ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Typography, { variant: "label", className: cn(deltaClassName), children: statItem.delta }) : null
5893
5721
  ] })
5894
5722
  ] }, `${statItem.label}-${statItem.value}`);
5895
5723
  }) }) : null,
@@ -5909,18 +5737,19 @@ var EventListItemDetailsContent = ({
5909
5737
  }
5910
5738
  ),
5911
5739
  /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: cn("flex flex-wrap items-center justify-between gap-4", classNames == null ? void 0 : classNames.footer), children: [
5912
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Typography, { variant: "meta", className: "text-agg-muted-foreground text-agg-sm leading-agg-5", children: volumeLabel || "-" }),
5740
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: volumeLabel || "-" }),
5913
5741
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: cn("flex items-center gap-2 md:gap-3", classNames == null ? void 0 : classNames.timeRange), children: eventListItemDetailsTimeRanges.map((timeRange) => {
5914
5742
  const isActive = timeRange === selectedTimeRange;
5915
5743
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5916
5744
  Button,
5917
5745
  {
5918
- size: "xs",
5746
+ size: "small",
5919
5747
  variant: "tertiary",
5920
5748
  className: cn(
5921
5749
  "h-auto min-w-0 rounded-none px-0 py-0 text-agg-xs leading-agg-4 md:text-agg-sm md:leading-agg-5",
5922
5750
  "border-0 bg-transparent shadow-none",
5923
- isActive ? "font-agg-bold text-agg-foreground" : "font-agg-normal text-agg-muted-foreground"
5751
+ "hover:text-agg-foreground!",
5752
+ isActive ? "font-agg-bold! text-agg-foreground!" : "font-agg-normal! text-agg-muted-foreground!"
5924
5753
  ),
5925
5754
  "aria-pressed": isActive,
5926
5755
  onClick: () => setSelectedTimeRange(timeRange),
@@ -5944,7 +5773,7 @@ var EventListItemDetailsByEventId = (_a) => {
5944
5773
  event: fetchedEvent,
5945
5774
  isError,
5946
5775
  isLoading
5947
- } = (0, import_hooks21.useEvent)(eventId, {
5776
+ } = (0, import_hooks22.useEvent)(eventId, {
5948
5777
  enabled: !!eventId
5949
5778
  });
5950
5779
  const resolvedEvent = (0, import_react9.useMemo)(() => {
@@ -6021,7 +5850,7 @@ EventListItemDetails.displayName = "EventListItemDetails";
6021
5850
 
6022
5851
  // src/events/market-details/index.tsx
6023
5852
  var import_react10 = require("react");
6024
- var import_hooks22 = require("@agg-market/hooks");
5853
+ var import_hooks23 = require("@agg-market/hooks");
6025
5854
 
6026
5855
  // src/events/market-details/market-details.utils.ts
6027
5856
  var import_dayjs4 = __toESM(require("dayjs"));
@@ -6262,7 +6091,7 @@ var MarketDetailsLoadingState = ({
6262
6091
  ariaLabel,
6263
6092
  classNames
6264
6093
  }) => {
6265
- const labels = (0, import_hooks22.useLabels)();
6094
+ const labels = (0, import_hooks23.useLabels)();
6266
6095
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6267
6096
  Skeleton,
6268
6097
  {
@@ -6276,7 +6105,7 @@ var MarketDetailsUnavailableState = ({
6276
6105
  ariaLabel,
6277
6106
  classNames
6278
6107
  }) => {
6279
- const labels = (0, import_hooks22.useLabels)();
6108
+ const labels = (0, import_hooks23.useLabels)();
6280
6109
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6281
6110
  Card,
6282
6111
  {
@@ -6284,8 +6113,8 @@ var MarketDetailsUnavailableState = ({
6284
6113
  role: "status",
6285
6114
  "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.unavailableAria,
6286
6115
  children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-1 p-5", children: [
6287
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "title", children: labels.marketDetails.unavailableTitle }),
6288
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "meta", children: labels.marketDetails.unavailableDescription })
6116
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.unavailableTitle }),
6117
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.unavailableDescription })
6289
6118
  ] })
6290
6119
  }
6291
6120
  );
@@ -6296,16 +6125,16 @@ var OrderBookRows = ({
6296
6125
  formatNumber,
6297
6126
  formatCurrency
6298
6127
  }) => {
6299
- const labels = (0, import_hooks22.useLabels)();
6128
+ const labels = (0, import_hooks23.useLabels)();
6300
6129
  const isAsks = title === labels.marketDetails.asks;
6301
6130
  const priceClassName = isAsks ? "text-agg-orderbook-ask" : "text-agg-orderbook-bid";
6302
6131
  const barClassName = isAsks ? "bg-agg-orderbook-ask/10" : "bg-agg-orderbook-bid/10";
6303
6132
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-2", children: [
6304
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "label", className: "text-agg-xs leading-agg-4", children: title }),
6133
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "caption-caps", children: title }),
6305
6134
  rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-2", children: [
6306
6135
  /* @__PURE__ */ (0, import_jsx_runtime73.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: [
6307
6136
  /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
6308
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(VenueLogo, { venue: row.venue, size: "xs" }),
6137
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(VenueLogo, { venue: row.venue, size: "small" }),
6309
6138
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6310
6139
  "span",
6311
6140
  {
@@ -6339,11 +6168,15 @@ var getOutcomeButtonClassName = ({
6339
6168
  isPositive,
6340
6169
  isActive
6341
6170
  }) => {
6171
+ 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";
6172
+ const activeStateClassName = isPositive ? "border-transparent bg-[#18c15c] text-agg-on-primary" : "border-transparent bg-[#e5455f] text-agg-on-primary";
6342
6173
  return cn(
6343
6174
  "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]",
6344
- getMotionClassName(enableAnimations, "transition-all duration-300"),
6345
- isPositive ? "border-agg-orderbook-bid/50 bg-agg-orderbook-bid/5 text-agg-foreground" : "border-agg-orderbook-ask/50 bg-agg-orderbook-ask/5 text-agg-foreground",
6346
- isActive && (isPositive ? "border-agg-orderbook-bid" : "border-agg-orderbook-ask")
6175
+ getMotionClassName(enableAnimations, "transition-all duration-300 ease-in-out"),
6176
+ isActive ? activeStateClassName : defaultStateClassName,
6177
+ "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",
6178
+ "cursor-pointer disabled:cursor-not-allowed disabled:text-agg-muted-foreground",
6179
+ isActive ? "font-agg-bold" : "font-agg-normal"
6347
6180
  );
6348
6181
  };
6349
6182
  var MarketDetailsContent = ({
@@ -6361,8 +6194,8 @@ var MarketDetailsContent = ({
6361
6194
  classNames,
6362
6195
  otherContent
6363
6196
  }) => {
6364
- const config = (0, import_hooks22.useSdkUiConfig)();
6365
- const labels = (0, import_hooks22.useLabels)();
6197
+ const config = (0, import_hooks23.useSdkUiConfig)();
6198
+ const labels = (0, import_hooks23.useLabels)();
6366
6199
  const detailsContentId = (0, import_react10.useId)();
6367
6200
  const model = (0, import_react10.useMemo)(() => {
6368
6201
  return buildMarketDetailsModel({
@@ -6448,7 +6281,7 @@ var MarketDetailsContent = ({
6448
6281
  const priceHistoryGroups = (0, import_react10.useMemo)(() => {
6449
6282
  return buildPriceHistoryGroups(graphOutcomes);
6450
6283
  }, [graphOutcomes]);
6451
- const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks22.usePriceHistory)(__spreadProps(__spreadValues({
6284
+ const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks23.usePriceHistory)(__spreadProps(__spreadValues({
6452
6285
  groups: priceHistoryGroups
6453
6286
  }, timeWindow), {
6454
6287
  enabled: isOpened && selectedTab === "graph" && priceHistoryGroups.length > 0
@@ -6460,7 +6293,7 @@ var MarketDetailsContent = ({
6460
6293
  liveUpdate: true
6461
6294
  }));
6462
6295
  }, [selectedOutcomesByVenue]);
6463
- const { data: orderBookData, isLoading: isOrderBookLoading } = (0, import_hooks22.useOrderBook)({
6296
+ const { data: orderBookData, isLoading: isOrderBookLoading } = (0, import_hooks23.useOrderBook)({
6464
6297
  orderbooks: orderBookInputs,
6465
6298
  enabled: isOpened && selectedTab === "order-book" && orderBookInputs.length > 0
6466
6299
  });
@@ -6550,7 +6383,7 @@ var MarketDetailsContent = ({
6550
6383
  }, [labels, model]);
6551
6384
  const handleOutcomeKeyDown = (eventToHandle) => {
6552
6385
  var _a;
6553
- if (eventToHandle.key !== "ArrowLeft" && eventToHandle.key !== "ArrowRight") {
6386
+ if ((eventToHandle == null ? void 0 : eventToHandle.key) !== "ArrowLeft" && (eventToHandle == null ? void 0 : eventToHandle.key) !== "ArrowRight") {
6554
6387
  return;
6555
6388
  }
6556
6389
  if (headerOutcomeItems.length <= 1)
@@ -6562,9 +6395,17 @@ var MarketDetailsContent = ({
6562
6395
  const nextIndex = activeIndex < 0 ? 0 : (activeIndex + direction + headerOutcomeItems.length) % headerOutcomeItems.length;
6563
6396
  setSelectedOutcomeLabel((_a = headerOutcomeItems[nextIndex]) == null ? void 0 : _a.label);
6564
6397
  };
6565
- const handleToggleExpanded = () => {
6566
- setIsOpened((prev) => !prev);
6567
- onOpenChange == null ? void 0 : onOpenChange(!isOpened);
6398
+ const handleToggleExpanded = (event2) => {
6399
+ if (event2 && "key" in event2 && (event2 == null ? void 0 : event2.key) !== "Enter" && (event2 == null ? void 0 : event2.key) !== " ") {
6400
+ return;
6401
+ }
6402
+ event2 == null ? void 0 : event2.preventDefault();
6403
+ event2 == null ? void 0 : event2.stopPropagation();
6404
+ setIsOpened((prev) => {
6405
+ const next = !prev;
6406
+ onOpenChange == null ? void 0 : onOpenChange(next);
6407
+ return next;
6408
+ });
6568
6409
  };
6569
6410
  const handleGraphVenueToggle = (venue) => {
6570
6411
  setSelectedGraphVenue((currentVenue) => {
@@ -6588,88 +6429,101 @@ var MarketDetailsContent = ({
6588
6429
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
6589
6430
  Card,
6590
6431
  {
6591
- className: cn(marketDetailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
6592
- "aria-label": ariaLabel != null ? ariaLabel : model.title,
6432
+ className: cn(
6433
+ "w-full cursor-pointer rounded-agg-2xl text-left outline-none",
6434
+ marketDetailsBaseCardClassName,
6435
+ classNames == null ? void 0 : classNames.root
6436
+ ),
6437
+ "aria-expanded": isOpened,
6438
+ "aria-controls": detailsContentId,
6439
+ role: "button",
6440
+ tabIndex: 0,
6441
+ "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
6442
+ onClick: handleToggleExpanded,
6443
+ onKeyDown: handleToggleExpanded,
6593
6444
  children: [
6594
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: cn("flex flex-col gap-3 px-5 py-4", isOpened && "pb-3", classNames == null ? void 0 : classNames.header), children: [
6595
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
6596
- "button",
6597
- {
6598
- type: "button",
6599
- className: "flex w-full cursor-pointer items-center justify-between gap-4 rounded-agg-2xl text-left outline-none",
6600
- "aria-expanded": isOpened,
6601
- "aria-controls": detailsContentId,
6602
- "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
6603
- onClick: handleToggleExpanded,
6604
- children: [
6605
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
6606
- model.image ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6607
- "img",
6608
- {
6609
- src: model.image,
6610
- alt: "",
6611
- className: "size-12 rounded-agg-lg object-cover md:size-[60px]"
6612
- }
6613
- ) : null,
6614
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
6615
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { as: "h3", variant: "title", className: "truncate text-agg-lg leading-agg-7", children: model.title }),
6616
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "meta", className: "truncate text-agg-sm leading-agg-5", children: model.subtitle }) })
6617
- ] })
6618
- ] }),
6619
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6620
- Typography,
6445
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
6446
+ "div",
6447
+ {
6448
+ className: cn(
6449
+ "flex flex-row items-center justify-between gap-3 px-5 py-4",
6450
+ isOpened && "pb-3",
6451
+ classNames == null ? void 0 : classNames.header
6452
+ ),
6453
+ children: [
6454
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
6455
+ model.image ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6456
+ "img",
6621
6457
  {
6622
- as: "div",
6623
- variant: "value",
6624
- className: "shrink-0 text-agg-2xl font-agg-bold leading-agg-8",
6625
- children: formatProbabilityPercent(headlineProbability)
6458
+ src: model.image,
6459
+ alt: "",
6460
+ className: "size-12 rounded-agg-lg object-cover md:size-[60px]"
6626
6461
  }
6627
- )
6628
- ]
6629
- }
6630
- ),
6631
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6632
- "div",
6633
- {
6634
- className: "flex gap-2",
6635
- role: "tablist",
6636
- "aria-label": labels.marketDetails.marketOutcomesAria,
6637
- tabIndex: 0,
6638
- onKeyDown: handleOutcomeKeyDown,
6639
- children: headerOutcomeItems.map((item) => {
6640
- const isPositive = item.tone === "positive";
6641
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6642
- "button",
6643
- {
6644
- type: "button",
6645
- role: "tab",
6646
- "aria-selected": item.label === selectedOutcomeLabel,
6647
- tabIndex: item.label === selectedOutcomeLabel ? 0 : -1,
6648
- className: getOutcomeButtonClassName({
6649
- enableAnimations: config.enableAnimations,
6650
- isPositive,
6651
- isActive: item.label === selectedOutcomeLabel
6652
- }),
6653
- onClick: () => {
6654
- setSelectedOutcomeLabel(item.label);
6655
- },
6656
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
6657
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6658
- VenueLogo,
6659
- {
6660
- venue: isPositive ? "polymarket" : "probable",
6661
- size: "xs"
6662
- }
6663
- ),
6664
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { className: "text-agg-base leading-agg-6", children: `${item.label} ${formatProbabilityCents(item.probability)}` })
6665
- ] })
6666
- },
6667
- item.label
6668
- );
6669
- })
6670
- }
6671
- )
6672
- ] }),
6462
+ ) : null,
6463
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
6464
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { as: "h3", variant: "body-large-strong", className: "truncate", children: model.title }),
6465
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "label", className: "truncate text-agg-muted-foreground", children: model.subtitle }) })
6466
+ ] })
6467
+ ] }),
6468
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { as: "div", variant: "heading", className: "shrink-0", children: formatProbabilityPercent(headlineProbability) }),
6469
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6470
+ "div",
6471
+ {
6472
+ className: "flex gap-2",
6473
+ role: "tablist",
6474
+ "aria-label": labels.marketDetails.marketOutcomesAria,
6475
+ tabIndex: 0,
6476
+ onKeyDown: (e) => handleOutcomeKeyDown(e),
6477
+ children: headerOutcomeItems.map((item) => {
6478
+ const isPositive = item.tone === "positive";
6479
+ const isActiveOutcome = item.label === selectedOutcomeLabel;
6480
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6481
+ "button",
6482
+ {
6483
+ type: "button",
6484
+ role: "tab",
6485
+ "aria-selected": isActiveOutcome,
6486
+ tabIndex: isActiveOutcome ? 0 : -1,
6487
+ className: getOutcomeButtonClassName({
6488
+ enableAnimations: config.enableAnimations,
6489
+ isPositive,
6490
+ isActive: isActiveOutcome
6491
+ }),
6492
+ onClick: (e) => {
6493
+ e.preventDefault();
6494
+ e.stopPropagation();
6495
+ setSelectedOutcomeLabel(item.label);
6496
+ },
6497
+ children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
6498
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6499
+ VenueLogo,
6500
+ {
6501
+ venue: isPositive ? "polymarket" : "probable",
6502
+ size: "small",
6503
+ color: isActiveOutcome ? "var(--agg-color-on-primary)" : void 0
6504
+ }
6505
+ ),
6506
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6507
+ Typography,
6508
+ {
6509
+ variant: isActiveOutcome ? "body-strong" : "body",
6510
+ className: cn(
6511
+ "text-agg-base leading-agg-6",
6512
+ isActiveOutcome ? "text-agg-on-primary" : "text-agg-foreground"
6513
+ ),
6514
+ children: `${item.label} ${formatProbabilityCents(item.probability)}`
6515
+ }
6516
+ )
6517
+ ] })
6518
+ },
6519
+ item.label
6520
+ );
6521
+ })
6522
+ }
6523
+ )
6524
+ ]
6525
+ }
6526
+ ),
6673
6527
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6674
6528
  "div",
6675
6529
  {
@@ -6721,7 +6575,7 @@ var MarketDetailsContent = ({
6721
6575
  "aria-busy": true,
6722
6576
  children: [
6723
6577
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(LoadingIcon, {}),
6724
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "meta", children: labels.marketDetails.loadingOrderbookLabel })
6578
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.loadingOrderbookLabel })
6725
6579
  ]
6726
6580
  }
6727
6581
  ) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
@@ -6769,9 +6623,13 @@ var MarketDetailsContent = ({
6769
6623
  "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",
6770
6624
  isActiveVenue ? "border-agg-primary bg-agg-secondary" : "border-transparent bg-agg-secondary-hover"
6771
6625
  ),
6772
- onClick: () => handleGraphVenueToggle(item.venue),
6626
+ onClick: (e) => {
6627
+ e.preventDefault();
6628
+ e.stopPropagation();
6629
+ handleGraphVenueToggle(item.venue);
6630
+ },
6773
6631
  children: [
6774
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(VenueLogo, { venue: item.venue, size: "xs" }),
6632
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(VenueLogo, { venue: item.venue, size: "small" }),
6775
6633
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: probability })
6776
6634
  ]
6777
6635
  },
@@ -6816,7 +6674,11 @@ var MarketDetailsContent = ({
6816
6674
  isActive ? "font-agg-bold text-agg-foreground" : "font-agg-normal text-agg-muted-foreground"
6817
6675
  ),
6818
6676
  "aria-pressed": isActive,
6819
- onClick: () => setSelectedTimeRange(timeRange),
6677
+ onClick: (e) => {
6678
+ e.preventDefault();
6679
+ e.stopPropagation();
6680
+ setSelectedTimeRange(timeRange);
6681
+ },
6820
6682
  children: timeRange === "ALL" ? labels.eventItemDetails.allTimeRange : timeRange
6821
6683
  },
6822
6684
  timeRange
@@ -6831,7 +6693,7 @@ var MarketDetailsContent = ({
6831
6693
  {
6832
6694
  className: "flex items-center justify-between rounded-agg-xl bg-agg-secondary-hover px-4 py-3",
6833
6695
  children: [
6834
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "meta", children: row.label }),
6696
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: row.label }),
6835
6697
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "body", className: "text-right", children: row.value })
6836
6698
  ]
6837
6699
  },
@@ -6867,7 +6729,7 @@ var MarketDetails = (props) => {
6867
6729
  (_a2 = props.onOpenChange) == null ? void 0 : _a2.call(props, nextIsOpened);
6868
6730
  };
6869
6731
  const hasEventProp = "event" in props && !!props.event;
6870
- const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks22.useEvent)(
6732
+ const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks23.useEvent)(
6871
6733
  hasEventProp ? void 0 : props.eventId,
6872
6734
  {
6873
6735
  enabled: !props.isLoading && !hasEventProp && !!props.eventId
@@ -6919,7 +6781,7 @@ MarketDetails.displayName = "MarketDetails";
6919
6781
 
6920
6782
  // src/events/list/index.tsx
6921
6783
  var import_react11 = require("react");
6922
- var import_hooks23 = require("@agg-market/hooks");
6784
+ var import_hooks24 = require("@agg-market/hooks");
6923
6785
 
6924
6786
  // src/events/list/event-list.constants.ts
6925
6787
  var POLYMARKET_VENUE = "polymarket";
@@ -6985,7 +6847,7 @@ var resolveTabVenus = (tab) => {
6985
6847
  var import_jsx_runtime74 = require("react/jsx-runtime");
6986
6848
  var renderTabIcon = (tab, isActive) => {
6987
6849
  if (tab.venueLogo) {
6988
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(VenueLogo, { venue: tab.venueLogo, size: "xs" });
6850
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(VenueLogo, { venue: tab.venueLogo, size: "small" });
6989
6851
  }
6990
6852
  if (!tab.iconName)
6991
6853
  return null;
@@ -6993,11 +6855,37 @@ var renderTabIcon = (tab, isActive) => {
6993
6855
  Icon,
6994
6856
  {
6995
6857
  name: tab.iconName,
6996
- size: "s",
6858
+ size: "small",
6997
6859
  color: isActive ? "var(--agg-color-primary)" : "var(--agg-color-foreground)"
6998
6860
  }
6999
6861
  );
7000
6862
  };
6863
+ var TAB_MIN_WIDTH = 80;
6864
+ var TAB_HORIZONTAL_PADDING = 32;
6865
+ var TAB_ICON_AND_GAP_WIDTH = 24;
6866
+ var TAB_OUTER_BORDER_WIDTH = 2;
6867
+ var TAB_INNER_BORDER_WIDTH = 1;
6868
+ var measureTabLabelWidth = (label) => {
6869
+ if (typeof document === "undefined")
6870
+ return label.length * 9;
6871
+ const canvas = document.createElement("canvas");
6872
+ const context = canvas.getContext("2d");
6873
+ if (!context)
6874
+ return label.length * 9;
6875
+ context.font = "700 16px Inter";
6876
+ return context.measureText(label).width;
6877
+ };
6878
+ var estimateTabsWidth = (items) => {
6879
+ if (items.length === 0)
6880
+ return 0;
6881
+ const tabsWidth = items.reduce((sum, item) => {
6882
+ const textWidth = Math.ceil(measureTabLabelWidth(item.label));
6883
+ const iconWidth = item.icon ? TAB_ICON_AND_GAP_WIDTH : 0;
6884
+ const buttonWidth = Math.max(TAB_MIN_WIDTH, textWidth + iconWidth + TAB_HORIZONTAL_PADDING);
6885
+ return sum + buttonWidth;
6886
+ }, 0);
6887
+ return tabsWidth + TAB_OUTER_BORDER_WIDTH + (items.length - 1) * TAB_INNER_BORDER_WIDTH;
6888
+ };
7001
6889
  var EventList = ({
7002
6890
  title,
7003
6891
  maxItemsPerRow = 3,
@@ -7008,13 +6896,14 @@ var EventList = ({
7008
6896
  categoryIds
7009
6897
  }) => {
7010
6898
  var _a, _b;
7011
- const labels = (0, import_hooks23.useLabels)();
6899
+ const labels = (0, import_hooks24.useLabels)();
7012
6900
  const defaultEventListTabs = (0, import_react11.useMemo)(() => {
7013
6901
  return getDefaultEventListTabs(labels);
7014
6902
  }, [labels]);
7015
6903
  const [activeTabValue, setActiveTabValue] = (0, import_react11.useState)(
7016
6904
  (_b = (_a = defaultEventListTabs[0]) == null ? void 0 : _a.value) != null ? _b : "matched"
7017
6905
  );
6906
+ const [shouldUseSelectOverflow, setShouldUseSelectOverflow] = (0, import_react11.useState)(false);
7018
6907
  const activeTab = (0, import_react11.useMemo)(() => {
7019
6908
  return defaultEventListTabs.find((tab) => tab.value === activeTabValue);
7020
6909
  }, [activeTabValue]);
@@ -7028,7 +6917,7 @@ var EventList = ({
7028
6917
  }, [maxVisibleItems]);
7029
6918
  const requestLimit = resolvedMaxVisibleItems != null ? resolvedMaxVisibleItems : limit;
7030
6919
  const shouldPaginate = resolvedMaxVisibleItems == null;
7031
- const { events, isLoading, isError, fetchNextPage, hasNextPage, isFetchingNextPage } = (0, import_hooks23.useEvents)({
6920
+ const { events, isLoading, isError, fetchNextPage, hasNextPage, isFetchingNextPage } = (0, import_hooks24.useEvents)({
7032
6921
  venues,
7033
6922
  search,
7034
6923
  categoryIds,
@@ -7054,6 +6943,46 @@ var EventList = ({
7054
6943
  };
7055
6944
  });
7056
6945
  }, [activeTabValue]);
6946
+ const headerRef = (0, import_react11.useRef)(null);
6947
+ const titleRef = (0, import_react11.useRef)(null);
6948
+ const updateTabsOverflowBehavior = (0, import_react11.useCallback)(() => {
6949
+ if (typeof window === "undefined")
6950
+ return;
6951
+ const headerElement = headerRef.current;
6952
+ const titleElement = titleRef.current;
6953
+ if (!headerElement || !titleElement)
6954
+ return;
6955
+ const isDesktop = window.matchMedia("(min-width: 768px)").matches;
6956
+ if (!isDesktop) {
6957
+ setShouldUseSelectOverflow(false);
6958
+ return;
6959
+ }
6960
+ const headerStyles = window.getComputedStyle(headerElement);
6961
+ const rawGap = headerStyles.columnGap || headerStyles.gap || "0";
6962
+ const horizontalGap = Number.parseFloat(rawGap) || 0;
6963
+ const availableTabsWidth = headerElement.clientWidth - titleElement.getBoundingClientRect().width - horizontalGap;
6964
+ const estimatedTabsWidth = estimateTabsWidth(tabsItems);
6965
+ setShouldUseSelectOverflow(availableTabsWidth > 0 && estimatedTabsWidth > availableTabsWidth);
6966
+ }, [tabsItems]);
6967
+ (0, import_react11.useEffect)(() => {
6968
+ updateTabsOverflowBehavior();
6969
+ }, [updateTabsOverflowBehavior]);
6970
+ (0, import_react11.useEffect)(() => {
6971
+ if (typeof ResizeObserver === "undefined")
6972
+ return;
6973
+ const headerElement = headerRef.current;
6974
+ const titleElement = titleRef.current;
6975
+ if (!headerElement || !titleElement)
6976
+ return;
6977
+ const resizeObserver = new ResizeObserver(() => {
6978
+ updateTabsOverflowBehavior();
6979
+ });
6980
+ resizeObserver.observe(headerElement);
6981
+ resizeObserver.observe(titleElement);
6982
+ return () => {
6983
+ resizeObserver.disconnect();
6984
+ };
6985
+ }, [updateTabsOverflowBehavior]);
7057
6986
  const resolvedMaxItemsPerRow = Number.isFinite(maxItemsPerRow) ? Math.max(1, Math.floor(maxItemsPerRow)) : 1;
7058
6987
  const loadingPlaceholderCount = isFetchingNextPage ? Math.min(resolvedMaxItemsPerRow, resolvedMaxVisibleItems != null ? resolvedMaxVisibleItems : Infinity) : 0;
7059
6988
  const shouldRenderLoadingState = isLoading && tileEvents.length === 0;
@@ -7095,19 +7024,25 @@ var EventList = ({
7095
7024
  return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Skeleton, { view: "event-list", ariaLabel: labels.eventList.loading(title) });
7096
7025
  }
7097
7026
  return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("section", { className: "flex w-full flex-col gap-5", children: [
7098
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("header", { className: "flex flex-col md:flex-row w-full flex-nowrap items-start md:items-center justify-between gap-2 md:gap-4", children: [
7099
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Typography, { as: "h2", variant: "value", className: "truncate [&::first-letter]:uppercase", children: title }),
7100
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7101
- Tabs,
7102
- {
7103
- ariaLabel: labels.eventList.tabsAria(title),
7104
- className: "max-w-full",
7105
- items: tabsItems,
7106
- value: activeTabValue,
7107
- onChange: setActiveTabValue
7108
- }
7109
- )
7110
- ] }),
7027
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
7028
+ "header",
7029
+ {
7030
+ ref: headerRef,
7031
+ className: "flex flex-col sm:flex-row w-full flex-nowrap items-start sm:items-center justify-between gap-2 sm:gap-4",
7032
+ children: [
7033
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { ref: titleRef, className: "min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Typography, { as: "h2", variant: "title", className: "truncate [&::first-letter]:uppercase", children: title }) }),
7034
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7035
+ Tabs,
7036
+ {
7037
+ ariaLabel: labels.eventList.tabsAria(title),
7038
+ items: tabsItems,
7039
+ value: activeTabValue,
7040
+ onChange: setActiveTabValue
7041
+ }
7042
+ )
7043
+ ]
7044
+ }
7045
+ ),
7111
7046
  /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: gridClassName, style: gridStyle, children: [
7112
7047
  tileEvents.map((event) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7113
7048
  EventListItem,
@@ -7154,7 +7089,7 @@ EventList.displayName = "EventList";
7154
7089
 
7155
7090
  // src/pages/home/index.tsx
7156
7091
  var import_react12 = require("react");
7157
- var import_hooks24 = require("@agg-market/hooks");
7092
+ var import_hooks25 = require("@agg-market/hooks");
7158
7093
 
7159
7094
  // src/pages/home/home.constants.ts
7160
7095
  var ALL_CATEGORIES_TAB_VALUE = "trending";
@@ -7292,11 +7227,11 @@ var HomePage = ({
7292
7227
  categoriesLimit = DEFAULT_CATEGORIES_LIMIT,
7293
7228
  allCategoryTabLabel = DEFAULT_ALL_CATEGORY_TAB_LABEL
7294
7229
  }) => {
7295
- const labels = (0, import_hooks24.useLabels)();
7230
+ const labels = (0, import_hooks25.useLabels)();
7296
7231
  const hasCustomTabs = !!tabs && tabs.length > 0;
7297
7232
  const shouldUseCategoriesTabs = !hasCustomTabs && useCategoriesTabs;
7298
7233
  const resolvedAllCategoryTabLabel = allCategoryTabLabel === DEFAULT_ALL_CATEGORY_TAB_LABEL ? labels.home.trending : allCategoryTabLabel;
7299
- const { categories } = (0, import_hooks24.useCategories)({
7234
+ const { categories } = (0, import_hooks25.useCategories)({
7300
7235
  limit: categoriesLimit,
7301
7236
  enabled: shouldUseCategoriesTabs
7302
7237
  });
@@ -7332,7 +7267,7 @@ var HomePage = ({
7332
7267
  Icon,
7333
7268
  {
7334
7269
  name: tab.iconName,
7335
- size: "m",
7270
+ size: "medium",
7336
7271
  color: isActive ? "var(--agg-color-primary)" : "var(--agg-color-foreground)"
7337
7272
  }
7338
7273
  ) : void 0,
@@ -7448,17 +7383,17 @@ var VenueRow = ({ venue, onSelect }) => {
7448
7383
  }
7449
7384
  },
7450
7385
  children: [
7451
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(VenueLogo, { venue: venue.venue, size: "xl", className: "rounded-lg" }) }),
7386
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(VenueLogo, { venue: venue.venue, size: "large", className: "rounded-lg" }) }),
7452
7387
  /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex-1 min-w-0", children: [
7453
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "text-base font-bold text-foreground leading-6", children: displayName }),
7454
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("p", { className: "text-sm text-muted-foreground leading-5", children: [
7388
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "agg-type-body-strong text-agg-foreground", children: displayName }),
7389
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
7455
7390
  "Balance ",
7456
7391
  formatCompactUsd(venue.balance)
7457
7392
  ] })
7458
7393
  ] }),
7459
7394
  hasShortfall ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "hidden sm:flex items-center gap-1.5 shrink-0", children: [
7460
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(WarningFilledIcon, { className: "h-4 w-4 text-warning" }),
7461
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "text-sm font-bold text-warning whitespace-nowrap", children: [
7395
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(WarningFilledIcon, { className: "h-4 w-4 text-agg-warning" }),
7396
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "agg-type-label-strong whitespace-nowrap text-agg-warning", children: [
7462
7397
  "Short ",
7463
7398
  formatCompactUsd(venue.shortfall)
7464
7399
  ] })
@@ -7467,7 +7402,7 @@ var VenueRow = ({ venue, onSelect }) => {
7467
7402
  Button,
7468
7403
  {
7469
7404
  variant: "secondary",
7470
- size: "s",
7405
+ size: "small",
7471
7406
  suffix: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ChevronRightIcon, {}),
7472
7407
  onClick: (e) => {
7473
7408
  e.stopPropagation();
@@ -7487,7 +7422,7 @@ var VenueSelectionStep = ({
7487
7422
  }) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
7488
7423
  /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Modal.Header, { title: "Deposit", hideBorder: true }),
7489
7424
  /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex flex-col gap-4", children: [
7490
- !hasAnyShortfall ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "text-base text-foreground leading-6", children: "Choose where to deposit funds:" }) : null,
7425
+ !hasAnyShortfall ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "agg-type-body text-agg-foreground", children: "Choose where to deposit funds:" }) : null,
7491
7426
  /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex flex-col gap-3", children: venues.map((venue) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(VenueRow, { venue, onSelect: onSelectVenue }, venue.venue)) })
7492
7427
  ] }) })
7493
7428
  ] });
@@ -7520,14 +7455,14 @@ var DepositMethodCard = ({
7520
7455
  children: [
7521
7456
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-secondary-hover", children: icon }),
7522
7457
  /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex-1 min-w-0", children: [
7523
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: "text-base font-bold text-foreground leading-6", children: title }),
7524
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: "text-sm text-muted-foreground leading-5", children: description })
7458
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: "agg-type-body-strong text-agg-foreground", children: title }),
7459
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: "agg-type-label text-agg-muted-foreground", children: description })
7525
7460
  ] }),
7526
7461
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7527
7462
  Button,
7528
7463
  {
7529
7464
  variant: "secondary",
7530
- size: "s",
7465
+ size: "small",
7531
7466
  suffix: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ChevronRightIcon, {}),
7532
7467
  onClick: (e) => {
7533
7468
  e.stopPropagation();
@@ -7556,7 +7491,7 @@ var DepositMethodStep = ({
7556
7491
  "button",
7557
7492
  {
7558
7493
  type: "button",
7559
- className: "flex items-center justify-center text-foreground hover:text-foreground/80 transition-colors hover:cursor-pointer mr-2",
7494
+ className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
7560
7495
  onClick: onBack,
7561
7496
  "aria-label": "Go back",
7562
7497
  children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
@@ -7566,8 +7501,8 @@ var DepositMethodStep = ({
7566
7501
  ),
7567
7502
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex flex-col gap-4", children: [
7568
7503
  /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center gap-2", children: [
7569
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(VenueLogo, { venue: venue.venue, size: "xs", className: "rounded-sm" }),
7570
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("p", { className: "text-sm text-muted-foreground leading-5", children: [
7504
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(VenueLogo, { venue: venue.venue, size: "small", className: "rounded-sm" }),
7505
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
7571
7506
  displayName,
7572
7507
  " balance: ",
7573
7508
  formatCompactUsd(venue.balance)
@@ -7577,7 +7512,7 @@ var DepositMethodStep = ({
7577
7512
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7578
7513
  DepositMethodCard,
7579
7514
  {
7580
- icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(BoltIcon, { className: "h-6 w-6 text-foreground" }),
7515
+ icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(BoltIcon, { className: "h-6 w-6 text-agg-foreground" }),
7581
7516
  title: "Transfer Crypto",
7582
7517
  description: "Send USDC from your blockchain wallet.",
7583
7518
  onContinue: () => onSelectMethod("crypto")
@@ -7586,7 +7521,7 @@ var DepositMethodStep = ({
7586
7521
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7587
7522
  DepositMethodCard,
7588
7523
  {
7589
- icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(CreditCardIcon, { className: "h-6 w-6 text-foreground" }),
7524
+ icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(CreditCardIcon, { className: "h-6 w-6 text-agg-foreground" }),
7590
7525
  title: "Deposit with Card",
7591
7526
  description: "Buy USDC instantly with a debit or credit card.",
7592
7527
  onContinue: () => onSelectMethod("card")
@@ -7626,7 +7561,7 @@ var CardDepositStep = ({
7626
7561
  "button",
7627
7562
  {
7628
7563
  type: "button",
7629
- className: "flex items-center justify-center text-foreground hover:text-foreground/80 transition-colors hover:cursor-pointer mr-2",
7564
+ className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
7630
7565
  onClick: onBack,
7631
7566
  "aria-label": "Go back",
7632
7567
  children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
@@ -7636,8 +7571,8 @@ var CardDepositStep = ({
7636
7571
  ),
7637
7572
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex flex-col gap-6", children: [
7638
7573
  /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-2", children: [
7639
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(VenueLogo, { venue: venue.venue, size: "xs", className: "rounded-sm" }),
7640
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("p", { className: "text-sm text-muted-foreground leading-5", children: [
7574
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(VenueLogo, { venue: venue.venue, size: "small", className: "rounded-sm" }),
7575
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
7641
7576
  displayName,
7642
7577
  " balance: ",
7643
7578
  formatCompactUsd(venue.balance)
@@ -7656,7 +7591,7 @@ var CardDepositStep = ({
7656
7591
  }
7657
7592
  ) }),
7658
7593
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-baseline", children: [
7659
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-3xl sm:text-4xl font-bold text-foreground leading-none", children: "$" }),
7594
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "agg-type-display text-agg-foreground", children: "$" }),
7660
7595
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7661
7596
  "input",
7662
7597
  {
@@ -7664,8 +7599,8 @@ var CardDepositStep = ({
7664
7599
  inputMode: "decimal",
7665
7600
  "aria-label": "Amount",
7666
7601
  className: cn(
7667
- "w-full bg-transparent text-3xl sm:text-4xl font-bold leading-none outline-none",
7668
- isValid ? "text-foreground" : "text-muted-foreground"
7602
+ "agg-type-display w-full bg-transparent outline-none",
7603
+ isValid ? "text-agg-foreground" : "text-agg-muted-foreground"
7669
7604
  ),
7670
7605
  placeholder: "0",
7671
7606
  value: rawAmount ? formatAmountDisplay(rawAmount) : "",
@@ -7687,12 +7622,12 @@ var CardDepositStep = ({
7687
7622
  tabIndex: 0,
7688
7623
  children: [
7689
7624
  /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex-1 min-w-0", children: [
7690
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-base font-bold text-foreground leading-6", children: "Provider" }),
7691
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-sm text-muted-foreground leading-5", children: "Auto-picked for you" })
7625
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "agg-type-body-strong text-agg-foreground", children: "Provider" }),
7626
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "agg-type-label text-agg-muted-foreground", children: "Auto-picked for you" })
7692
7627
  ] }),
7693
7628
  /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-2 shrink-0", children: [
7694
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-sm font-bold text-foreground", children: "Swapped" }),
7695
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ChevronRightIcon, { className: "h-4 w-4 text-foreground" })
7629
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "agg-type-label-strong text-agg-foreground", children: "Swapped" }),
7630
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ChevronRightIcon, { className: "h-4 w-4 text-agg-foreground" })
7696
7631
  ] })
7697
7632
  ]
7698
7633
  }
@@ -7701,7 +7636,7 @@ var CardDepositStep = ({
7701
7636
  Button,
7702
7637
  {
7703
7638
  variant: "primary",
7704
- size: "xl",
7639
+ size: "large",
7705
7640
  className: "w-full",
7706
7641
  disabled: !isValid,
7707
7642
  onClick: () => onContinue(numericAmount),
@@ -7807,7 +7742,7 @@ var CryptoTransferStep = ({
7807
7742
  "button",
7808
7743
  {
7809
7744
  type: "button",
7810
- className: "flex items-center justify-center text-foreground hover:text-foreground/80 transition-colors hover:cursor-pointer mr-2",
7745
+ className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
7811
7746
  onClick: onBack,
7812
7747
  "aria-label": "Go back",
7813
7748
  children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
@@ -7819,7 +7754,7 @@ var CryptoTransferStep = ({
7819
7754
  /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col gap-5", children: [
7820
7755
  /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex gap-6", children: [
7821
7756
  /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
7822
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-sm font-bold text-foreground leading-5", children: "Supported token" }),
7757
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: "Supported token" }),
7823
7758
  /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7824
7759
  Select,
7825
7760
  {
@@ -7831,7 +7766,7 @@ var CryptoTransferStep = ({
7831
7766
  )
7832
7767
  ] }),
7833
7768
  /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
7834
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-sm font-bold text-foreground leading-5", children: "Supported network" }),
7769
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: "Supported network" }),
7835
7770
  /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7836
7771
  Select,
7837
7772
  {
@@ -7844,7 +7779,7 @@ var CryptoTransferStep = ({
7844
7779
  ] })
7845
7780
  ] }),
7846
7781
  /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col gap-2", children: [
7847
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-sm font-bold text-foreground leading-5", children: "Your deposit address" }),
7782
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: "Your deposit address" }),
7848
7783
  /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
7849
7784
  "div",
7850
7785
  {
@@ -7854,12 +7789,12 @@ var CryptoTransferStep = ({
7854
7789
  "h-10 px-3"
7855
7790
  ),
7856
7791
  children: [
7857
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "flex-1 min-w-0 text-base text-foreground leading-6 truncate", children: depositAddress }),
7792
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "agg-type-body flex-1 min-w-0 truncate text-agg-foreground", children: depositAddress }),
7858
7793
  /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7859
7794
  "button",
7860
7795
  {
7861
7796
  type: "button",
7862
- className: "shrink-0 text-muted-foreground hover:text-foreground transition-colors",
7797
+ className: "shrink-0 text-agg-muted-foreground transition-colors hover:text-agg-foreground",
7863
7798
  onClick: handleCopyAddress,
7864
7799
  "aria-label": "Copy deposit address",
7865
7800
  children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CopyIcon, { className: "h-4 w-4" })
@@ -7870,7 +7805,7 @@ var CryptoTransferStep = ({
7870
7805
  )
7871
7806
  ] })
7872
7807
  ] }),
7873
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Button, { variant: "secondary", size: "xl", className: "w-full", onClick: onDone, children: "Done" })
7808
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Button, { variant: "secondary", size: "large", className: "w-full", onClick: onDone, children: "Done" })
7874
7809
  ] }) })
7875
7810
  ] });
7876
7811
  };
@@ -7883,13 +7818,13 @@ var KalshiStepCard = ({
7883
7818
  description,
7884
7819
  children
7885
7820
  }) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col gap-2 rounded-xl bg-secondary-hover p-4", children: [
7886
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("p", { className: "text-xs font-bold uppercase leading-4 text-muted-foreground", children: [
7821
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("p", { className: "agg-type-caption-caps text-agg-muted-foreground", children: [
7887
7822
  "Step ",
7888
7823
  step
7889
7824
  ] }),
7890
7825
  /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col gap-1", children: [
7891
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-sm font-bold text-foreground leading-5", children: title }),
7892
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-sm text-foreground leading-5", children: description })
7826
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: title }),
7827
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "agg-type-label text-agg-foreground", children: description })
7893
7828
  ] }),
7894
7829
  children
7895
7830
  ] });
@@ -7900,13 +7835,13 @@ var KalshiDepositStep = ({ depositUrl, onDone }) => /* @__PURE__ */ (0, import_j
7900
7835
  VenueLogo,
7901
7836
  {
7902
7837
  venue: "kalshi",
7903
- size: "xl",
7838
+ size: "large",
7904
7839
  className: "h-[60px] w-[60px] rounded-lg"
7905
7840
  }
7906
7841
  ),
7907
7842
  /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col items-center gap-4 text-center", children: [
7908
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h2", { className: "text-2xl font-bold text-foreground leading-8", children: "Fund Your Kalshi Account" }),
7909
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-base text-foreground leading-6", children: "To trade on Kalshi you'll need to add funds to your Kalshi balance first. You can do this on Kalshi's site." })
7843
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h2", { className: "agg-type-heading text-agg-foreground", children: "Fund Your Kalshi Account" }),
7844
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "agg-type-body text-agg-foreground", children: "To trade on Kalshi you'll need to add funds to your Kalshi balance first. You can do this on Kalshi's site." })
7910
7845
  ] }),
7911
7846
  /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
7912
7847
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
@@ -7919,7 +7854,7 @@ var KalshiDepositStep = ({ depositUrl, onDone }) => /* @__PURE__ */ (0, import_j
7919
7854
  Button,
7920
7855
  {
7921
7856
  variant: "secondary",
7922
- size: "s",
7857
+ size: "small",
7923
7858
  suffix: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ExternalLinkIcon, { className: "h-3.5 w-3.5" }),
7924
7859
  onClick: () => {
7925
7860
  window.open(depositUrl, "_blank", "noopener,noreferrer");
@@ -7946,7 +7881,7 @@ var KalshiDepositStep = ({ depositUrl, onDone }) => /* @__PURE__ */ (0, import_j
7946
7881
  }
7947
7882
  )
7948
7883
  ] }),
7949
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Button, { variant: "secondary", size: "l", onClick: onDone, children: "Done" })
7884
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Button, { variant: "secondary", size: "large", onClick: onDone, children: "Done" })
7950
7885
  ] }) })
7951
7886
  ] });
7952
7887
 
@@ -8091,19 +8026,19 @@ var VenueRow2 = ({ venue, onSelect }) => {
8091
8026
  }
8092
8027
  },
8093
8028
  children: [
8094
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(VenueLogo, { venue: venue.venue, size: "xl", className: "rounded-lg" }) }),
8029
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(VenueLogo, { venue: venue.venue, size: "large", className: "rounded-lg" }) }),
8095
8030
  /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex-1 min-w-0", children: [
8096
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-base font-bold text-foreground leading-6", children: displayName }),
8097
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("p", { className: "text-sm text-muted-foreground leading-5", children: [
8031
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "agg-type-body-strong text-agg-foreground", children: displayName }),
8032
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
8098
8033
  "Balance ",
8099
8034
  formatCompactUsd(venue.balance)
8100
8035
  ] })
8101
8036
  ] }),
8102
- isDisabled ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "text-sm text-muted-foreground", children: (_b = venue.disabledReason) != null ? _b : "Unavailable" }) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8037
+ isDisabled ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "agg-type-label text-agg-muted-foreground", children: (_b = venue.disabledReason) != null ? _b : "Unavailable" }) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8103
8038
  Button,
8104
8039
  {
8105
8040
  variant: "secondary",
8106
- size: "s",
8041
+ size: "small",
8107
8042
  suffix: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ChevronRightIcon, {}),
8108
8043
  onClick: (e) => {
8109
8044
  e.stopPropagation();
@@ -8122,7 +8057,7 @@ var VenueSelectionStep2 = ({
8122
8057
  }) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_jsx_runtime82.Fragment, { children: [
8123
8058
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Modal.Header, { title: "Withdraw", hideBorder: true }),
8124
8059
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex flex-col gap-4", children: [
8125
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-base text-foreground leading-6", children: "Choose where to withdraw funds from:" }),
8060
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "agg-type-body text-agg-foreground", children: "Choose where to withdraw funds from:" }),
8126
8061
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex flex-col gap-3", children: venues.map((venue) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(VenueRow2, { venue, onSelect: onSelectVenue }, venue.venue)) })
8127
8062
  ] }) })
8128
8063
  ] });
@@ -8155,14 +8090,14 @@ var WithdrawMethodCard = ({
8155
8090
  children: [
8156
8091
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-secondary-hover", children: icon }),
8157
8092
  /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex-1 min-w-0", children: [
8158
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-base font-bold text-foreground leading-6", children: title }),
8159
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-sm text-muted-foreground leading-5", children: description })
8093
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "agg-type-body-strong text-agg-foreground", children: title }),
8094
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "agg-type-label text-agg-muted-foreground", children: description })
8160
8095
  ] }),
8161
8096
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8162
8097
  Button,
8163
8098
  {
8164
8099
  variant: "secondary",
8165
- size: "s",
8100
+ size: "small",
8166
8101
  suffix: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ChevronRightIcon, {}),
8167
8102
  onClick: (e) => {
8168
8103
  e.stopPropagation();
@@ -8191,7 +8126,7 @@ var WithdrawMethodStep = ({
8191
8126
  "button",
8192
8127
  {
8193
8128
  type: "button",
8194
- className: "flex items-center justify-center text-foreground hover:text-foreground/80 transition-colors hover:cursor-pointer mr-2",
8129
+ className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
8195
8130
  onClick: onBack,
8196
8131
  "aria-label": "Go back",
8197
8132
  children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
@@ -8201,8 +8136,8 @@ var WithdrawMethodStep = ({
8201
8136
  ),
8202
8137
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex flex-col gap-4", children: [
8203
8138
  /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-2", children: [
8204
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(VenueLogo, { venue: venue.venue, size: "xs", className: "rounded-sm" }),
8205
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("p", { className: "text-sm text-muted-foreground leading-5", children: [
8139
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(VenueLogo, { venue: venue.venue, size: "small", className: "rounded-sm" }),
8140
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
8206
8141
  displayName,
8207
8142
  " balance: ",
8208
8143
  formatCompactUsd(venue.balance)
@@ -8212,7 +8147,7 @@ var WithdrawMethodStep = ({
8212
8147
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8213
8148
  WithdrawMethodCard,
8214
8149
  {
8215
- icon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(WalletIcon, { className: "h-6 w-6 text-foreground" }),
8150
+ icon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(WalletIcon, { className: "h-6 w-6 text-agg-foreground" }),
8216
8151
  title: "Withdraw to Wallet",
8217
8152
  description: "Send funds to your crypto wallet as USDC.",
8218
8153
  onContinue: () => onSelectMethod("wallet")
@@ -8221,7 +8156,7 @@ var WithdrawMethodStep = ({
8221
8156
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8222
8157
  WithdrawMethodCard,
8223
8158
  {
8224
- icon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(BankIcon, { className: "h-6 w-6 text-foreground" }),
8159
+ icon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(BankIcon, { className: "h-6 w-6 text-agg-foreground" }),
8225
8160
  title: "Withdraw to Bank",
8226
8161
  description: "Transfer funds to your linked bank account.",
8227
8162
  onContinue: () => onSelectMethod("bank")
@@ -8267,7 +8202,7 @@ var WithdrawAmountStep = ({
8267
8202
  "button",
8268
8203
  {
8269
8204
  type: "button",
8270
- className: "flex items-center justify-center text-foreground hover:text-foreground/80 transition-colors hover:cursor-pointer mr-2",
8205
+ className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
8271
8206
  onClick: onBack,
8272
8207
  "aria-label": "Go back",
8273
8208
  children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ChevronLeftIcon, { className: "h-6 w-6" })
@@ -8278,8 +8213,8 @@ var WithdrawAmountStep = ({
8278
8213
  /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex flex-col gap-6", children: [
8279
8214
  /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center justify-between", children: [
8280
8215
  /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center gap-2", children: [
8281
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(VenueLogo, { venue: venue.venue, size: "xs", className: "rounded-sm" }),
8282
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("p", { className: "text-sm text-muted-foreground leading-5", children: [
8216
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(VenueLogo, { venue: venue.venue, size: "small", className: "rounded-sm" }),
8217
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
8283
8218
  displayName,
8284
8219
  " balance: ",
8285
8220
  formatCompactUsd(venue.balance)
@@ -8289,7 +8224,7 @@ var WithdrawAmountStep = ({
8289
8224
  "button",
8290
8225
  {
8291
8226
  type: "button",
8292
- className: "text-sm font-bold text-primary hover:text-primary/80 transition-colors",
8227
+ className: "agg-type-label-strong text-agg-primary transition-colors hover:text-agg-primary/80",
8293
8228
  onClick: handleMax,
8294
8229
  children: "Max"
8295
8230
  }
@@ -8297,7 +8232,7 @@ var WithdrawAmountStep = ({
8297
8232
  ] }),
8298
8233
  /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex-1 min-w-0", children: [
8299
8234
  /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-baseline", children: [
8300
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-3xl sm:text-4xl font-bold text-foreground leading-none", children: "$" }),
8235
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "agg-type-display text-agg-foreground", children: "$" }),
8301
8236
  /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8302
8237
  "input",
8303
8238
  {
@@ -8305,8 +8240,8 @@ var WithdrawAmountStep = ({
8305
8240
  inputMode: "decimal",
8306
8241
  "aria-label": "Amount",
8307
8242
  className: cn(
8308
- "w-full bg-transparent text-3xl sm:text-4xl font-bold leading-none outline-none",
8309
- exceedsBalance ? "text-error" : numericAmount > 0 ? "text-foreground" : "text-muted-foreground"
8243
+ "agg-type-display w-full bg-transparent outline-none",
8244
+ exceedsBalance ? "text-agg-error" : numericAmount > 0 ? "text-agg-foreground" : "text-agg-muted-foreground"
8310
8245
  ),
8311
8246
  placeholder: "0",
8312
8247
  value: rawAmount ? formatAmountDisplay(rawAmount) : "",
@@ -8314,13 +8249,13 @@ var WithdrawAmountStep = ({
8314
8249
  }
8315
8250
  )
8316
8251
  ] }),
8317
- exceedsBalance ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "mt-2 text-sm text-error", children: "Amount exceeds available balance" }) : null
8252
+ exceedsBalance ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "agg-type-label mt-2 text-agg-error", children: "Amount exceeds available balance" }) : null
8318
8253
  ] }),
8319
8254
  /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8320
8255
  Button,
8321
8256
  {
8322
8257
  variant: "primary",
8323
- size: "xl",
8258
+ size: "large",
8324
8259
  className: "w-full",
8325
8260
  disabled: !isValid,
8326
8261
  onClick: () => onContinue(numericAmount),
@@ -8339,13 +8274,13 @@ var KalshiStepCard2 = ({
8339
8274
  description,
8340
8275
  children
8341
8276
  }) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex flex-col gap-2 rounded-xl bg-secondary-hover p-4", children: [
8342
- /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("p", { className: "text-xs font-bold uppercase leading-4 text-muted-foreground", children: [
8277
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("p", { className: "agg-type-caption-caps text-agg-muted-foreground", children: [
8343
8278
  "Step ",
8344
8279
  step
8345
8280
  ] }),
8346
8281
  /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex flex-col gap-1", children: [
8347
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "text-sm font-bold text-foreground leading-5", children: title }),
8348
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "text-sm text-foreground leading-5", children: description })
8282
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: title }),
8283
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "agg-type-label text-agg-foreground", children: description })
8349
8284
  ] }),
8350
8285
  children
8351
8286
  ] });
@@ -8359,13 +8294,13 @@ var KalshiWithdrawStep = ({
8359
8294
  VenueLogo,
8360
8295
  {
8361
8296
  venue: "kalshi",
8362
- size: "xl",
8297
+ size: "large",
8363
8298
  className: "h-[60px] w-[60px] rounded-lg"
8364
8299
  }
8365
8300
  ),
8366
8301
  /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex flex-col items-center gap-4 text-center", children: [
8367
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h2", { className: "text-2xl font-bold text-foreground leading-8", children: "Withdraw from Kalshi" }),
8368
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "text-base text-foreground leading-6", children: "To withdraw from Kalshi you'll need to initiate the withdrawal from your Kalshi account directly on Kalshi's site." })
8302
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h2", { className: "agg-type-heading text-agg-foreground", children: "Withdraw from Kalshi" }),
8303
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "agg-type-body text-agg-foreground", children: "To withdraw from Kalshi you'll need to initiate the withdrawal from your Kalshi account directly on Kalshi's site." })
8369
8304
  ] }),
8370
8305
  /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
8371
8306
  /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
@@ -8378,7 +8313,7 @@ var KalshiWithdrawStep = ({
8378
8313
  Button,
8379
8314
  {
8380
8315
  variant: "secondary",
8381
- size: "s",
8316
+ size: "small",
8382
8317
  suffix: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ExternalLinkIcon, { className: "h-3.5 w-3.5" }),
8383
8318
  onClick: () => {
8384
8319
  window.open(withdrawUrl, "_blank", "noopener,noreferrer");
@@ -8405,7 +8340,7 @@ var KalshiWithdrawStep = ({
8405
8340
  }
8406
8341
  )
8407
8342
  ] }),
8408
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Button, { variant: "secondary", size: "l", onClick: onDone, children: "Done" })
8343
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Button, { variant: "secondary", size: "large", onClick: onDone, children: "Done" })
8409
8344
  ] }) })
8410
8345
  ] });
8411
8346
 
@@ -8500,7 +8435,7 @@ WithdrawModal.displayName = "WithdrawModal";
8500
8435
 
8501
8436
  // src/onboarding/index.tsx
8502
8437
  var import_react22 = require("react");
8503
- var import_hooks30 = require("@agg-market/hooks");
8438
+ var import_hooks31 = require("@agg-market/hooks");
8504
8439
  var Dialog4 = __toESM(require("@radix-ui/react-dialog"));
8505
8440
 
8506
8441
  // src/onboarding/onboarding-modal.constants.ts
@@ -8523,7 +8458,7 @@ var ONCHAIN_VENUES = [
8523
8458
 
8524
8459
  // src/onboarding/steps/how-it-works.tsx
8525
8460
  var import_react18 = require("react");
8526
- var import_hooks25 = require("@agg-market/hooks");
8461
+ var import_hooks26 = require("@agg-market/hooks");
8527
8462
  var import_jsx_runtime87 = require("react/jsx-runtime");
8528
8463
  var defaultIcons = {
8529
8464
  createAccount: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
@@ -8532,7 +8467,7 @@ var defaultIcons = {
8532
8467
  stayInControl: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
8533
8468
  };
8534
8469
  var HowItWorksStep = ({ onContinue, icons }) => {
8535
- const labels = (0, import_hooks25.useLabels)();
8470
+ const labels = (0, import_hooks26.useLabels)();
8536
8471
  const scrollRef = (0, import_react18.useRef)(null);
8537
8472
  const [showTopGradient, setShowTopGradient] = (0, import_react18.useState)(false);
8538
8473
  const [showBottomGradient, setShowBottomGradient] = (0, import_react18.useState)(true);
@@ -8600,17 +8535,17 @@ var HowItWorksStep = ({ onContinue, icons }) => {
8600
8535
  }
8601
8536
  )
8602
8537
  ] }),
8603
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Button, { variant: "primary", size: "l", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
8538
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
8604
8539
  ] });
8605
8540
  };
8606
8541
  HowItWorksStep.displayName = "HowItWorksStep";
8607
8542
 
8608
8543
  // src/onboarding/steps/profile-setup.tsx
8609
8544
  var import_react19 = require("react");
8610
- var import_hooks26 = require("@agg-market/hooks");
8545
+ var import_hooks27 = require("@agg-market/hooks");
8611
8546
  var import_jsx_runtime88 = require("react/jsx-runtime");
8612
8547
  var ProfileSetupStep = ({ onContinue }) => {
8613
- const labels = (0, import_hooks26.useLabels)();
8548
+ const labels = (0, import_hooks27.useLabels)();
8614
8549
  const [username, setUsername] = (0, import_react19.useState)("");
8615
8550
  const [avatarFile, setAvatarFile] = (0, import_react19.useState)();
8616
8551
  const [avatarPreview, setAvatarPreview] = (0, import_react19.useState)();
@@ -8714,13 +8649,13 @@ var ProfileSetupStep = ({ onContinue }) => {
8714
8649
  )
8715
8650
  ] })
8716
8651
  ] }),
8717
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { variant: "primary", size: "l", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
8652
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
8718
8653
  ] });
8719
8654
  };
8720
8655
  ProfileSetupStep.displayName = "ProfileSetupStep";
8721
8656
 
8722
8657
  // src/onboarding/steps/connect-accounts.tsx
8723
- var import_hooks27 = require("@agg-market/hooks");
8658
+ var import_hooks28 = require("@agg-market/hooks");
8724
8659
  var import_jsx_runtime89 = require("react/jsx-runtime");
8725
8660
  var OnchainVenueLogos = () => {
8726
8661
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
@@ -8728,7 +8663,7 @@ var OnchainVenueLogos = () => {
8728
8663
  {
8729
8664
  className: "overflow-hidden rounded sm:rounded-agg-md",
8730
8665
  style: { zIndex: ONCHAIN_VENUES.length - index },
8731
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(VenueLogo, { venue, size: "ms", className: "sm:h-8 sm:w-8" })
8666
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(VenueLogo, { venue, size: "medium", className: "sm:h-8 sm:w-8" })
8732
8667
  },
8733
8668
  venue
8734
8669
  )) });
@@ -8742,12 +8677,12 @@ var VenueCard = ({
8742
8677
  onConnect,
8743
8678
  connected = false
8744
8679
  }) => {
8745
- const labels = (0, import_hooks27.useLabels)();
8680
+ const labels = (0, import_hooks28.useLabels)();
8746
8681
  const action = connected ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8747
8682
  Button,
8748
8683
  {
8749
8684
  variant: "tertiary",
8750
- size: "l",
8685
+ size: "large",
8751
8686
  className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
8752
8687
  onClick: onConnect,
8753
8688
  children: labels.onboarding.connectAccounts.connect
@@ -8757,7 +8692,7 @@ var VenueCard = ({
8757
8692
  Button,
8758
8693
  {
8759
8694
  variant: "tertiary",
8760
- size: "m",
8695
+ size: "medium",
8761
8696
  className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
8762
8697
  onClick: onConnect,
8763
8698
  suffix: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ChevronRightIcon, { className: "h-4 w-4" }),
@@ -8803,7 +8738,7 @@ var ConnectAccountsStep = ({
8803
8738
  connectedOnchain = false,
8804
8739
  connectedKalshi = false
8805
8740
  }) => {
8806
- const labels = (0, import_hooks27.useLabels)();
8741
+ const labels = (0, import_hooks28.useLabels)();
8807
8742
  const canContinue = connectedOnchain || connectedKalshi;
8808
8743
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col gap-6", children: [
8809
8744
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
@@ -8829,7 +8764,7 @@ var ConnectAccountsStep = ({
8829
8764
  VenueLogo,
8830
8765
  {
8831
8766
  venue: "kalshi",
8832
- size: "l",
8767
+ size: "large",
8833
8768
  className: "h-6 w-6 sm:h-8 sm:w-8"
8834
8769
  }
8835
8770
  ) }),
@@ -8846,7 +8781,7 @@ var ConnectAccountsStep = ({
8846
8781
  Button,
8847
8782
  {
8848
8783
  variant: "primary",
8849
- size: "l",
8784
+ size: "large",
8850
8785
  className: "w-full",
8851
8786
  onClick: onContinue,
8852
8787
  disabled: !canContinue,
@@ -8859,7 +8794,7 @@ ConnectAccountsStep.displayName = "ConnectAccountsStep";
8859
8794
 
8860
8795
  // src/onboarding/steps/connect-kalshi-modal.tsx
8861
8796
  var import_react20 = require("react");
8862
- var import_hooks28 = require("@agg-market/hooks");
8797
+ var import_hooks29 = require("@agg-market/hooks");
8863
8798
  var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
8864
8799
  var import_jsx_runtime90 = require("react/jsx-runtime");
8865
8800
  var ConnectKalshiModal = ({
@@ -8867,7 +8802,7 @@ var ConnectKalshiModal = ({
8867
8802
  onOpenChange,
8868
8803
  onVerify
8869
8804
  }) => {
8870
- const labels = (0, import_hooks28.useLabels)();
8805
+ const labels = (0, import_hooks29.useLabels)();
8871
8806
  const [apiKeyId, setApiKeyId] = (0, import_react20.useState)("");
8872
8807
  const [privateKey, setPrivateKey] = (0, import_react20.useState)("");
8873
8808
  const [verifying, setVerifying] = (0, import_react20.useState)(false);
@@ -8938,7 +8873,7 @@ var ConnectKalshiModal = ({
8938
8873
  }
8939
8874
  ),
8940
8875
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex flex-col gap-8 items-center", children: [
8941
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "overflow-hidden rounded-agg-lg", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(VenueLogo, { venue: "kalshi", size: "xl" }) }),
8876
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "overflow-hidden rounded-agg-lg", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(VenueLogo, { venue: "kalshi", size: "large" }) }),
8942
8877
  /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex flex-col gap-4 items-center text-center", children: [
8943
8878
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
8944
8879
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
@@ -9079,12 +9014,12 @@ var ConnectKalshiModal = ({
9079
9014
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
9080
9015
  ] }) : null,
9081
9016
  /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex items-center gap-3 justify-center", children: [
9082
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { variant: "secondary", size: "l", onClick: handleCancel, children: labels.onboarding.connectKalshiModal.actions.cancel }),
9017
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Button, { variant: "secondary", size: "large", onClick: handleCancel, children: labels.onboarding.connectKalshiModal.actions.cancel }),
9083
9018
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9084
9019
  Button,
9085
9020
  {
9086
9021
  variant: "primary",
9087
- size: "l",
9022
+ size: "large",
9088
9023
  onClick: handleVerify,
9089
9024
  disabled: !canVerify,
9090
9025
  isLoading: verifying,
@@ -9102,7 +9037,7 @@ ConnectKalshiModal.displayName = "ConnectKalshiModal";
9102
9037
 
9103
9038
  // src/onboarding/steps/connect-onchain-modal.tsx
9104
9039
  var import_react21 = require("react");
9105
- var import_hooks29 = require("@agg-market/hooks");
9040
+ var import_hooks30 = require("@agg-market/hooks");
9106
9041
  var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
9107
9042
  var import_jsx_runtime91 = require("react/jsx-runtime");
9108
9043
  var ConnectOnchainModal = ({
@@ -9110,7 +9045,7 @@ var ConnectOnchainModal = ({
9110
9045
  onOpenChange,
9111
9046
  onConnect
9112
9047
  }) => {
9113
- const labels = (0, import_hooks29.useLabels)();
9048
+ const labels = (0, import_hooks30.useLabels)();
9114
9049
  const [connecting, setConnecting] = (0, import_react21.useState)(false);
9115
9050
  const [error, setError] = (0, import_react21.useState)();
9116
9051
  const handleCancel = (0, import_react21.useCallback)(() => {
@@ -9170,7 +9105,7 @@ var ConnectOnchainModal = ({
9170
9105
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
9171
9106
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-center gap-[6px]", children: [
9172
9107
  index > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
9173
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(VenueLogo, { venue, size: "ms" }),
9108
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(VenueLogo, { venue, size: "medium" }),
9174
9109
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
9175
9110
  ] }, venue)) })
9176
9111
  ] }),
@@ -9180,13 +9115,22 @@ var ConnectOnchainModal = ({
9180
9115
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
9181
9116
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
9182
9117
  ] }) : null,
9183
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Button, { variant: "primary", size: "l", onClick: handleConnect, isLoading: connecting, children: labels.onboarding.connectOnchainModal.connect })
9118
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9119
+ Button,
9120
+ {
9121
+ variant: "primary",
9122
+ size: "large",
9123
+ onClick: handleConnect,
9124
+ isLoading: connecting,
9125
+ children: labels.onboarding.connectOnchainModal.connect
9126
+ }
9127
+ )
9184
9128
  ] }),
9185
9129
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
9186
9130
  Button,
9187
9131
  {
9188
9132
  variant: "tertiary",
9189
- size: "m",
9133
+ size: "medium",
9190
9134
  className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
9191
9135
  onClick: handleCancel,
9192
9136
  children: labels.onboarding.connectOnchainModal.cancel
@@ -9214,7 +9158,7 @@ var OnboardingModal = ({
9214
9158
  connectedKalshi = false
9215
9159
  }) => {
9216
9160
  var _a;
9217
- const labels = (0, import_hooks30.useLabels)();
9161
+ const labels = (0, import_hooks31.useLabels)();
9218
9162
  const [step, setStep] = (0, import_react22.useState)(ONBOARDING_STEPS.HOW_IT_WORKS);
9219
9163
  const stepLabels = {
9220
9164
  [ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
@@ -9324,7 +9268,7 @@ var PROFILE_TAB_ITEMS = [
9324
9268
 
9325
9269
  // src/profile/tabs/about-tab.tsx
9326
9270
  var import_react23 = require("react");
9327
- var import_hooks31 = require("@agg-market/hooks");
9271
+ var import_hooks32 = require("@agg-market/hooks");
9328
9272
  var import_jsx_runtime93 = require("react/jsx-runtime");
9329
9273
  var AboutTab = ({
9330
9274
  avatarPreview,
@@ -9334,7 +9278,7 @@ var AboutTab = ({
9334
9278
  onDraftAvatarChange,
9335
9279
  draftAvatarPreview
9336
9280
  }) => {
9337
- const labels = (0, import_hooks31.useLabels)();
9281
+ const labels = (0, import_hooks32.useLabels)();
9338
9282
  const fileInputRef = (0, import_react23.useRef)(null);
9339
9283
  const handleAvatarClick = (0, import_react23.useCallback)(() => {
9340
9284
  var _a;
@@ -9510,7 +9454,7 @@ var AccountsWalletsTab = ({
9510
9454
  const displayName = (_a = venueLogoLabels[account.venue]) != null ? _a : account.venue;
9511
9455
  return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(AccountRow, { children: [
9512
9456
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
9513
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(VenueLogo, { venue: account.venue, size: "s" }),
9457
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(VenueLogo, { venue: account.venue, size: "small" }),
9514
9458
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: displayName }),
9515
9459
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
9516
9460
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: account.displayAddress }),
@@ -9518,7 +9462,7 @@ var AccountsWalletsTab = ({
9518
9462
  Icon,
9519
9463
  {
9520
9464
  name: "check-badge",
9521
- size: "s",
9465
+ size: "small",
9522
9466
  color: "var(--agg-color-primary, #536dfe)"
9523
9467
  }
9524
9468
  ) : null
@@ -9533,21 +9477,21 @@ var AccountsWalletsTab = ({
9533
9477
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col gap-2", children: [
9534
9478
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(AccountRow, { children: [
9535
9479
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-3", children: [
9536
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "twitter", size: "s", color: "currentColor" }) }),
9480
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "twitter", size: "small", color: "currentColor" }) }),
9537
9481
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "X (Twitter)" })
9538
9482
  ] }),
9539
9483
  (twitter == null ? void 0 : twitter.connected) ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DisconnectTextButton, { onClick: onDisconnectTwitter }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ConnectTextButton, { onClick: onConnectTwitter })
9540
9484
  ] }),
9541
9485
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(AccountRow, { children: [
9542
9486
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-3", children: [
9543
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-[#5865F2]", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "discord", size: "s", color: "currentColor" }) }),
9487
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-[#5865F2]", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "discord", size: "small", color: "currentColor" }) }),
9544
9488
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "Discord" })
9545
9489
  ] }),
9546
9490
  (discord == null ? void 0 : discord.connected) ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DisconnectTextButton, { onClick: onDisconnectDiscord }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ConnectTextButton, { onClick: onConnectDiscord })
9547
9491
  ] }),
9548
9492
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(AccountRow, { children: [
9549
9493
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-3", children: [
9550
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-[#26A5E4]", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "telegram", size: "s", color: "currentColor" }) }),
9494
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-[#26A5E4]", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "telegram", size: "small", color: "currentColor" }) }),
9551
9495
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "Telegram" })
9552
9496
  ] }),
9553
9497
  (telegram == null ? void 0 : telegram.connected) ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DisconnectTextButton, { onClick: onDisconnectTelegram }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ConnectTextButton, { onClick: onConnectTelegram })
@@ -9569,10 +9513,10 @@ var AccountsWalletsTab = ({
9569
9513
  ),
9570
9514
  children: [
9571
9515
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-3", children: [
9572
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "email", size: "s", color: "currentColor" }) }),
9516
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "email", size: "small", color: "currentColor" }) }),
9573
9517
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: email != null ? email : "Connect email" })
9574
9518
  ] }),
9575
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "chevron-right", size: "s", color: "currentColor" })
9519
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { name: "chevron-right", size: "small", color: "currentColor" })
9576
9520
  ]
9577
9521
  }
9578
9522
  )
@@ -9673,7 +9617,7 @@ var ProfileModal = ({
9673
9617
  isActive ? "font-agg-normal text-agg-foreground bg-agg-secondary-hover border-agg-primary" : "font-agg-normal text-agg-foreground border-transparent"
9674
9618
  ),
9675
9619
  children: [
9676
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon, { name: tab.icon, size: "s", color: "currentColor" }),
9620
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
9677
9621
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "whitespace-nowrap", children: tab.label })
9678
9622
  ]
9679
9623
  },
@@ -9711,7 +9655,7 @@ var ProfileModal = ({
9711
9655
  ),
9712
9656
  children: [
9713
9657
  isActive ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-agg-primary" }) : null,
9714
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon, { name: tab.icon, size: "s", color: "currentColor" }),
9658
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
9715
9659
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "shrink-0 whitespace-nowrap", children: tab.label })
9716
9660
  ]
9717
9661
  },
@@ -9754,12 +9698,12 @@ var ProfileModal = ({
9754
9698
  ] })
9755
9699
  ] }) }),
9756
9700
  /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Modal.Footer, { children: [
9757
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { variant: "secondary", size: "l", onClick: handleCancel, className: "min-w-[120px]", children: "Cancel" }),
9701
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { variant: "secondary", size: "large", onClick: handleCancel, className: "min-w-[120px]", children: "Cancel" }),
9758
9702
  /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
9759
9703
  Button,
9760
9704
  {
9761
9705
  variant: "primary",
9762
- size: "l",
9706
+ size: "large",
9763
9707
  disabled: !hasChanges,
9764
9708
  isLoading: isSaving,
9765
9709
  onClick: handleSave,
@@ -9773,17 +9717,17 @@ ProfileModal.displayName = "ProfileModal";
9773
9717
 
9774
9718
  // src/pages/event-market/index.tsx
9775
9719
  var import_react27 = require("react");
9776
- var import_hooks35 = require("@agg-market/hooks");
9720
+ var import_hooks36 = require("@agg-market/hooks");
9777
9721
  var import_dayjs6 = __toESM(require("dayjs"));
9778
9722
 
9779
9723
  // src/trading/place-order/index.tsx
9780
9724
  var import_react25 = require("react");
9781
- var import_hooks33 = require("@agg-market/hooks");
9725
+ var import_hooks34 = require("@agg-market/hooks");
9782
9726
 
9783
9727
  // src/trading/utils.ts
9784
- var import_hooks32 = require("@agg-market/hooks");
9728
+ var import_hooks33 = require("@agg-market/hooks");
9785
9729
  var import_dayjs5 = __toESM(require("dayjs"));
9786
- var defaultLabels = (0, import_hooks32.resolveAggUiLabels)("en-US");
9730
+ var defaultLabels = (0, import_hooks33.resolveAggUiLabels)("en-US");
9787
9731
  var defaultSettlementSectionLabel = defaultLabels.trading.settlementSection;
9788
9732
  var defaultSettlementDifferencesTitle = defaultLabels.trading.settlementDifferencesTitle;
9789
9733
  var defaultTradingDisclaimer = defaultLabels.trading.disclaimer;
@@ -9875,6 +9819,26 @@ var getResultValueClassName = (tone) => {
9875
9819
  return "text-agg-foreground";
9876
9820
  return "text-agg-success";
9877
9821
  };
9822
+ var negativeOutcomePattern = /\b(no|down|against|under|lose|false)\b/i;
9823
+ var resolveIsPositiveOutcome = (outcome, index) => {
9824
+ const outcomeText = `${outcome.id} ${outcome.label}`;
9825
+ if (negativeOutcomePattern.test(outcomeText))
9826
+ return false;
9827
+ if (index === 1)
9828
+ return false;
9829
+ return true;
9830
+ };
9831
+ var getOutcomeButtonClassName2 = ({
9832
+ enableAnimations,
9833
+ isActive,
9834
+ isPositive
9835
+ }) => {
9836
+ return cn(
9837
+ "flex-1 cursor-pointer rounded-agg-full border px-6 py-2.5 text-agg-base leading-agg-6",
9838
+ getMotionClassName(enableAnimations, "transition-all duration-300 ease-in-out"),
9839
+ isActive ? isPositive ? "border-transparent bg-[#18c15c] font-agg-bold text-agg-on-primary" : "border-transparent bg-[#e5455f] font-agg-bold text-agg-on-primary" : "border-transparent bg-agg-secondary-hover font-agg-normal text-agg-foreground hover:bg-agg-tertiary"
9840
+ );
9841
+ };
9878
9842
  var getStatusContent = ({
9879
9843
  placement,
9880
9844
  status,
@@ -9931,8 +9895,8 @@ var PlaceOrder = ({
9931
9895
  onStatusAction,
9932
9896
  onTabChange
9933
9897
  }) => {
9934
- const { enableAnimations } = (0, import_hooks33.useSdkUiConfig)();
9935
- const labels = (0, import_hooks33.useLabels)();
9898
+ const { enableAnimations } = (0, import_hooks34.useSdkUiConfig)();
9899
+ const labels = (0, import_hooks34.useLabels)();
9936
9900
  const resolvedDisclaimer = disclaimer === defaultTradingDisclaimer ? labels.trading.disclaimer : disclaimer;
9937
9901
  if (isLoading) {
9938
9902
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
@@ -9977,7 +9941,7 @@ var PlaceOrder = ({
9977
9941
  const actionButton = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
9978
9942
  Button,
9979
9943
  {
9980
- size: "xxl",
9944
+ size: "large",
9981
9945
  className: "w-full",
9982
9946
  disabled: isPrimaryActionDisabled,
9983
9947
  isLoading: isPrimaryActionLoading,
@@ -10011,7 +9975,7 @@ var PlaceOrder = ({
10011
9975
  Icon,
10012
9976
  {
10013
9977
  name: "close",
10014
- size: "m",
9978
+ size: "medium",
10015
9979
  className: "h-6 w-6 text-agg-foreground",
10016
9980
  color: "currentColor"
10017
9981
  }
@@ -10031,21 +9995,25 @@ var PlaceOrder = ({
10031
9995
  variant: "underline",
10032
9996
  size: "s",
10033
9997
  overflowBehavior: "scroll",
10034
- className: "w-full"
9998
+ classNames: {
9999
+ root: "w-full",
10000
+ tabList: "w-full"
10001
+ }
10035
10002
  }
10036
10003
  ),
10037
10004
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col gap-4", children: [
10038
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex w-full gap-2", children: outcomes.map((outcome) => {
10005
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex w-full gap-2", children: outcomes.map((outcome, index) => {
10039
10006
  const isActive = outcome.id === resolvedOutcomeId;
10007
+ const isPositive = resolveIsPositiveOutcome(outcome, index);
10040
10008
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
10041
10009
  "button",
10042
10010
  {
10043
10011
  type: "button",
10044
- className: cn(
10045
- "flex-1 rounded-agg-full px-6 py-2.5 text-agg-base leading-agg-6",
10046
- getMotionClassName(enableAnimations, "transition-colors"),
10047
- isActive ? "bg-agg-success font-agg-bold text-agg-on-primary" : "bg-agg-secondary-hover font-agg-normal text-agg-foreground"
10048
- ),
10012
+ className: getOutcomeButtonClassName2({
10013
+ enableAnimations,
10014
+ isActive,
10015
+ isPositive
10016
+ }),
10049
10017
  "aria-pressed": isActive,
10050
10018
  "aria-label": `${outcome.label} ${outcome.priceLabel}`,
10051
10019
  onClick: () => handleOutcomeChange(outcome.id),
@@ -10088,7 +10056,7 @@ var PlaceOrder = ({
10088
10056
  VenueLogo,
10089
10057
  {
10090
10058
  venue: row.venue,
10091
- size: "s",
10059
+ size: "small",
10092
10060
  ariaLabel: getTradingVenueLabel(row.venue)
10093
10061
  }
10094
10062
  ),
@@ -10150,7 +10118,7 @@ PlaceOrder.displayName = "PlaceOrder";
10150
10118
 
10151
10119
  // src/trading/settlement/index.tsx
10152
10120
  var import_react26 = require("react");
10153
- var import_hooks34 = require("@agg-market/hooks");
10121
+ var import_hooks35 = require("@agg-market/hooks");
10154
10122
  var import_jsx_runtime97 = require("react/jsx-runtime");
10155
10123
  var getSettlementHeaderClassName = () => {
10156
10124
  return "flex items-center justify-between gap-4";
@@ -10169,12 +10137,18 @@ var Settlement = ({
10169
10137
  className
10170
10138
  }) => {
10171
10139
  var _a, _b;
10172
- const labels = (0, import_hooks34.useLabels)();
10140
+ const labels = (0, import_hooks35.useLabels)();
10141
+ const { enableAnimations } = (0, import_hooks35.useSdkUiConfig)();
10173
10142
  const resolvedSectionLabel = sectionLabel === defaultSettlementSectionLabel ? labels.trading.settlementSection : sectionLabel;
10174
10143
  const resolvedDifferencesTitle = differencesTitle === defaultSettlementDifferencesTitle ? labels.trading.settlementDifferencesTitle : differencesTitle;
10175
10144
  const [internalExpandedVenue, setInternalExpandedVenue] = (0, import_react26.useState)(
10176
10145
  (_b = defaultExpandedVenue != null ? defaultExpandedVenue : (_a = venues[0]) == null ? void 0 : _a.venue) != null ? _b : null
10177
10146
  );
10147
+ const [expandedDescriptionByVenue, setExpandedDescriptionByVenue] = (0, import_react26.useState)({});
10148
+ const [overflowingDescriptionByVenue, setOverflowingDescriptionByVenue] = (0, import_react26.useState)({});
10149
+ const [collapsedDescriptionByVenue, setCollapsedDescriptionByVenue] = (0, import_react26.useState)({});
10150
+ const descriptionWrapperRefs = (0, import_react26.useRef)(/* @__PURE__ */ new Map());
10151
+ const descriptionMeasureRefs = (0, import_react26.useRef)(/* @__PURE__ */ new Map());
10178
10152
  (0, import_react26.useEffect)(() => {
10179
10153
  if (expandedVenue === void 0)
10180
10154
  return;
@@ -10188,6 +10162,154 @@ var Settlement = ({
10188
10162
  }
10189
10163
  onExpandedVenueChange == null ? void 0 : onExpandedVenueChange(nextVenue);
10190
10164
  };
10165
+ const handleDescriptionWrapperRef = (0, import_react26.useCallback)(
10166
+ (venue, element) => {
10167
+ if (!element) {
10168
+ descriptionWrapperRefs.current.delete(venue);
10169
+ return;
10170
+ }
10171
+ descriptionWrapperRefs.current.set(venue, element);
10172
+ },
10173
+ []
10174
+ );
10175
+ const handleDescriptionMeasureRef = (0, import_react26.useCallback)(
10176
+ (venue, element) => {
10177
+ if (!element) {
10178
+ descriptionMeasureRefs.current.delete(venue);
10179
+ return;
10180
+ }
10181
+ descriptionMeasureRefs.current.set(venue, element);
10182
+ },
10183
+ []
10184
+ );
10185
+ const updateDescriptionLayout = (0, import_react26.useCallback)(
10186
+ (venue, description, showMoreLabel) => {
10187
+ const descriptionWrapperElement = descriptionWrapperRefs.current.get(venue);
10188
+ const descriptionMeasureElement = descriptionMeasureRefs.current.get(venue);
10189
+ if (!descriptionWrapperElement || !descriptionMeasureElement)
10190
+ return;
10191
+ const wrapperWidth = descriptionWrapperElement.clientWidth;
10192
+ if (wrapperWidth <= 0)
10193
+ return;
10194
+ const computedStyles = window.getComputedStyle(descriptionWrapperElement);
10195
+ const parsedLineHeight = Number.parseFloat(computedStyles.lineHeight);
10196
+ const lineHeight = Number.isFinite(parsedLineHeight) ? parsedLineHeight : 20;
10197
+ const maxHeight = lineHeight * 2 + 1;
10198
+ descriptionMeasureElement.style.width = `${wrapperWidth}px`;
10199
+ const getHeight = (value) => {
10200
+ descriptionMeasureElement.textContent = value;
10201
+ return descriptionMeasureElement.scrollHeight;
10202
+ };
10203
+ const fullHeight = getHeight(description);
10204
+ if (fullHeight <= maxHeight) {
10205
+ setOverflowingDescriptionByVenue((currentState) => {
10206
+ if (currentState[venue] === false)
10207
+ return currentState;
10208
+ return __spreadProps(__spreadValues({}, currentState), {
10209
+ [venue]: false
10210
+ });
10211
+ });
10212
+ setCollapsedDescriptionByVenue((currentState) => {
10213
+ if (currentState[venue] === description)
10214
+ return currentState;
10215
+ return __spreadProps(__spreadValues({}, currentState), {
10216
+ [venue]: description
10217
+ });
10218
+ });
10219
+ return;
10220
+ }
10221
+ const suffix = `... ${showMoreLabel}`;
10222
+ let left = 0;
10223
+ let right = description.length;
10224
+ let bestLength = 0;
10225
+ while (left <= right) {
10226
+ const middle = Math.floor((left + right) / 2);
10227
+ const candidate = description.slice(0, middle).trimEnd();
10228
+ const candidateHeight = getHeight(`${candidate}${suffix}`);
10229
+ if (candidateHeight <= maxHeight) {
10230
+ bestLength = middle;
10231
+ left = middle + 1;
10232
+ continue;
10233
+ }
10234
+ right = middle - 1;
10235
+ }
10236
+ const collapsedDescription = description.slice(0, bestLength).trimEnd();
10237
+ setOverflowingDescriptionByVenue((currentState) => {
10238
+ if (currentState[venue] === true)
10239
+ return currentState;
10240
+ return __spreadProps(__spreadValues({}, currentState), {
10241
+ [venue]: true
10242
+ });
10243
+ });
10244
+ setCollapsedDescriptionByVenue((currentState) => {
10245
+ if (currentState[venue] === collapsedDescription)
10246
+ return currentState;
10247
+ return __spreadProps(__spreadValues({}, currentState), {
10248
+ [venue]: collapsedDescription
10249
+ });
10250
+ });
10251
+ },
10252
+ []
10253
+ );
10254
+ (0, import_react26.useEffect)(() => {
10255
+ if (typeof window === "undefined")
10256
+ return;
10257
+ if (!resolvedExpandedVenue)
10258
+ return;
10259
+ if (expandedDescriptionByVenue[resolvedExpandedVenue])
10260
+ return;
10261
+ const expandedVenueItem = venues.find((venueItem) => venueItem.venue === resolvedExpandedVenue);
10262
+ if (!expandedVenueItem)
10263
+ return;
10264
+ const frameId = window.requestAnimationFrame(() => {
10265
+ var _a2;
10266
+ updateDescriptionLayout(
10267
+ resolvedExpandedVenue,
10268
+ expandedVenueItem.description,
10269
+ (_a2 = expandedVenueItem.showMoreLabel) != null ? _a2 : "Show more"
10270
+ );
10271
+ });
10272
+ return () => {
10273
+ window.cancelAnimationFrame(frameId);
10274
+ };
10275
+ }, [expandedDescriptionByVenue, resolvedExpandedVenue, updateDescriptionLayout, venues]);
10276
+ (0, import_react26.useEffect)(() => {
10277
+ if (!resolvedExpandedVenue)
10278
+ return;
10279
+ if (expandedDescriptionByVenue[resolvedExpandedVenue])
10280
+ return;
10281
+ if (typeof ResizeObserver === "undefined")
10282
+ return;
10283
+ const expandedVenueItem = venues.find((venueItem) => venueItem.venue === resolvedExpandedVenue);
10284
+ if (!expandedVenueItem)
10285
+ return;
10286
+ const descriptionWrapperElement = descriptionWrapperRefs.current.get(resolvedExpandedVenue);
10287
+ if (!descriptionWrapperElement)
10288
+ return;
10289
+ const resizeObserver = new ResizeObserver(() => {
10290
+ var _a2;
10291
+ updateDescriptionLayout(
10292
+ resolvedExpandedVenue,
10293
+ expandedVenueItem.description,
10294
+ (_a2 = expandedVenueItem.showMoreLabel) != null ? _a2 : "Show more"
10295
+ );
10296
+ });
10297
+ resizeObserver.observe(descriptionWrapperElement);
10298
+ return () => {
10299
+ resizeObserver.disconnect();
10300
+ };
10301
+ }, [expandedDescriptionByVenue, resolvedExpandedVenue, updateDescriptionLayout, venues]);
10302
+ const handleDescriptionShowMoreClick = (event, venue) => {
10303
+ event == null ? void 0 : event.stopPropagation();
10304
+ setExpandedDescriptionByVenue((currentState) => {
10305
+ if (currentState[venue])
10306
+ return currentState;
10307
+ return __spreadProps(__spreadValues({}, currentState), {
10308
+ [venue]: true
10309
+ });
10310
+ });
10311
+ onShowMore == null ? void 0 : onShowMore(venue);
10312
+ };
10191
10313
  if (isLoading) {
10192
10314
  return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10193
10315
  Skeleton,
@@ -10216,25 +10338,53 @@ var Settlement = ({
10216
10338
  ] }),
10217
10339
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
10218
10340
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex flex-col gap-3", children: venues.map((venue) => {
10341
+ var _a2, _b2;
10219
10342
  const venueLabel = getTradingVenueLabel(venue.venue, venue.label);
10220
10343
  const isExpanded = resolvedExpandedVenue === venue.venue;
10221
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: cn("flex flex-col", isExpanded ? "gap-2" : "gap-0"), children: [
10344
+ const isDescriptionExpanded = !!expandedDescriptionByVenue[venue.venue];
10345
+ const isDescriptionOverflowing = !!overflowingDescriptionByVenue[venue.venue];
10346
+ const shouldShowDescriptionCta = isExpanded && isDescriptionOverflowing && !isDescriptionExpanded;
10347
+ const resolvedShowMoreLabel = (_a2 = venue.showMoreLabel) != null ? _a2 : "Show more";
10348
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col", children: [
10222
10349
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
10223
10350
  "button",
10224
10351
  {
10225
10352
  type: "button",
10226
- className: "flex items-center gap-2 text-left",
10353
+ className: cn(
10354
+ "flex items-center gap-2 text-left",
10355
+ "cursor-pointer disabled:cursor-not-allowed hover:opacity-50",
10356
+ getMotionClassName(
10357
+ enableAnimations,
10358
+ "transition-[opacity,color] duration-200 ease-in-out"
10359
+ )
10360
+ ),
10227
10361
  "aria-expanded": isExpanded,
10228
10362
  "aria-label": labels.trading.settlementDetailsAria(venueLabel),
10229
10363
  onClick: () => handleVenueClick(venue.venue),
10230
10364
  children: [
10231
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(VenueLogo, { venue: venue.venue, size: "s", ariaLabel: venueLabel }),
10232
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: venueLabel }),
10365
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10366
+ VenueLogo,
10367
+ {
10368
+ venue: venue.venue,
10369
+ size: "small",
10370
+ ariaLabel: venueLabel
10371
+ }
10372
+ ),
10373
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10374
+ "span",
10375
+ {
10376
+ className: cn(
10377
+ "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground",
10378
+ isExpanded ? "text-agg-primary" : "text-agg-foreground"
10379
+ ),
10380
+ children: venueLabel
10381
+ }
10382
+ ),
10233
10383
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10234
10384
  Icon,
10235
10385
  {
10236
10386
  name: isExpanded ? "chevron-up" : "chevron-down",
10237
- size: "s",
10387
+ size: "small",
10238
10388
  className: "text-agg-foreground",
10239
10389
  color: "currentColor"
10240
10390
  }
@@ -10242,25 +10392,65 @@ var Settlement = ({
10242
10392
  ]
10243
10393
  }
10244
10394
  ),
10245
- isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
10246
- venue.description,
10247
- venue.showMoreLabel ? /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
10248
- " ",
10249
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10250
- "button",
10395
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10396
+ "div",
10397
+ {
10398
+ "aria-hidden": !isExpanded,
10399
+ className: cn(
10400
+ "grid overflow-hidden",
10401
+ isExpanded ? "mt-2 grid-rows-[1fr] opacity-100" : "mt-0 grid-rows-[0fr] opacity-0",
10402
+ !isExpanded && "pointer-events-none",
10403
+ getMotionClassName(
10404
+ enableAnimations,
10405
+ "transition-[grid-template-rows,opacity,margin-top] duration-300 ease-in-out"
10406
+ )
10407
+ ),
10408
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
10409
+ "div",
10251
10410
  {
10252
- type: "button",
10253
- className: "font-agg-normal text-agg-foreground underline-offset-2 hover:underline",
10254
- "aria-label": labels.trading.settlementShowMoreAria(
10255
- venue.showMoreLabel,
10256
- venueLabel
10257
- ),
10258
- onClick: () => onShowMore == null ? void 0 : onShowMore(venue.venue),
10259
- children: venue.showMoreLabel
10411
+ ref: (element) => handleDescriptionWrapperRef(venue.venue, element),
10412
+ className: "relative min-h-0",
10413
+ children: [
10414
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("p", { className: "min-h-0 text-agg-sm leading-agg-5 text-agg-foreground", children: [
10415
+ isDescriptionExpanded || !isDescriptionOverflowing ? venue.description : (_b2 = collapsedDescriptionByVenue[venue.venue]) != null ? _b2 : venue.description,
10416
+ shouldShowDescriptionCta ? /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
10417
+ "... ",
10418
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10419
+ "button",
10420
+ {
10421
+ type: "button",
10422
+ tabIndex: isExpanded ? 0 : -1,
10423
+ className: cn(
10424
+ "cursor-pointer disabled:cursor-not-allowed",
10425
+ "text-agg-sm leading-agg-5 text-agg-foreground underline-offset-2 hover:underline hover:font-agg-bold",
10426
+ getMotionClassName(
10427
+ enableAnimations,
10428
+ "transition-[text-decoration] duration-200 ease-in-out"
10429
+ )
10430
+ ),
10431
+ "aria-label": labels.trading.settlementShowMoreAria(
10432
+ resolvedShowMoreLabel,
10433
+ venueLabel
10434
+ ),
10435
+ onClick: (event) => handleDescriptionShowMoreClick(event, venue.venue),
10436
+ children: resolvedShowMoreLabel
10437
+ }
10438
+ )
10439
+ ] }) : null
10440
+ ] }),
10441
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
10442
+ "p",
10443
+ {
10444
+ ref: (element) => handleDescriptionMeasureRef(venue.venue, element),
10445
+ "aria-hidden": true,
10446
+ className: "pointer-events-none invisible fixed top-0 left-0 -z-10 whitespace-normal text-agg-sm leading-agg-5"
10447
+ }
10448
+ )
10449
+ ]
10260
10450
  }
10261
10451
  )
10262
- ] }) : null
10263
- ] }) : null
10452
+ }
10453
+ )
10264
10454
  ] }, venue.venue);
10265
10455
  }) })
10266
10456
  ]
@@ -10329,7 +10519,7 @@ var resolveInitialExpandedMarketId = (detailedMarkets, defaultExpandedMarketId)
10329
10519
  var EventMarketPageUnavailableState = ({
10330
10520
  ariaLabel
10331
10521
  }) => {
10332
- const labels = (0, import_hooks35.useLabels)();
10522
+ const labels = (0, import_hooks36.useLabels)();
10333
10523
  return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
10334
10524
  Card,
10335
10525
  {
@@ -10337,8 +10527,8 @@ var EventMarketPageUnavailableState = ({
10337
10527
  role: "status",
10338
10528
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventMarketPage.unavailableAria,
10339
10529
  children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex flex-col gap-1", children: [
10340
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Typography, { variant: "title", children: labels.eventMarketPage.unavailableTitle }),
10341
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Typography, { variant: "meta", children: labels.eventMarketPage.unavailableDescription })
10530
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Typography, { variant: "body-large-strong", children: labels.eventMarketPage.unavailableTitle }),
10531
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.eventMarketPage.unavailableDescription })
10342
10532
  ] })
10343
10533
  }
10344
10534
  );
@@ -10348,7 +10538,7 @@ var EventMarketPageLoadingState = ({
10348
10538
  settlement,
10349
10539
  classNames
10350
10540
  }) => {
10351
- const labels = (0, import_hooks35.useLabels)();
10541
+ const labels = (0, import_hooks36.useLabels)();
10352
10542
  const fallbackSettlement = settlement != null ? settlement : {
10353
10543
  sectionLabel: labels.trading.settlementSection,
10354
10544
  question: labels.eventMarketPage.loadingSettlementQuestion,
@@ -10414,7 +10604,7 @@ var EventMarketPageContent = ({
10414
10604
  classNames,
10415
10605
  ariaLabel
10416
10606
  }) => {
10417
- const labels = (0, import_hooks35.useLabels)();
10607
+ const labels = (0, import_hooks36.useLabels)();
10418
10608
  const resolvedHeroMarketId = (0, import_react27.useMemo)(() => {
10419
10609
  return resolveHeroMarketId(event, heroMarketId);
10420
10610
  }, [event, heroMarketId]);
@@ -10499,7 +10689,7 @@ var EventMarketPageContent = ({
10499
10689
  };
10500
10690
  var EventMarketPage = (props) => {
10501
10691
  const hasEventProp = "event" in props && !!props.event;
10502
- const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks35.useEvent)(
10692
+ const { event: fetchedEvent, isLoading: isFetchingEvent } = (0, import_hooks36.useEvent)(
10503
10693
  hasEventProp ? void 0 : props.eventId,
10504
10694
  {
10505
10695
  enabled: !props.isLoading && !hasEventProp && !!props.eventId
@@ -10564,7 +10754,7 @@ var BalanceDisplay = ({
10564
10754
  ),
10565
10755
  children: [
10566
10756
  /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex items-end gap-3", children: [
10567
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "font-agg-sans text-[30px] leading-[36px] font-agg-bold text-agg-foreground", children: (_a = currentBalance == null ? void 0 : currentBalance.totalLabel) != null ? _a : "$0.00" }),
10757
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "agg-type-display text-agg-foreground", children: (_a = currentBalance == null ? void 0 : currentBalance.totalLabel) != null ? _a : "$0.00" }),
10568
10758
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "font-agg-sans text-agg-base leading-6 font-agg-normal text-agg-muted-foreground", children: "Profit/Loss" }),
10569
10759
  /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex items-center gap-1", children: [
10570
10760
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
@@ -10581,7 +10771,7 @@ var BalanceDisplay = ({
10581
10771
  Icon,
10582
10772
  {
10583
10773
  name: "triangle-up-filled",
10584
- size: "xxs",
10774
+ size: "small",
10585
10775
  className: cn(
10586
10776
  (currentBalance == null ? void 0 : currentBalance.isPositive) ? "text-agg-success" : "rotate-180 text-agg-error"
10587
10777
  )
@@ -10627,11 +10817,11 @@ var BalancesCard = ({
10627
10817
  className
10628
10818
  ),
10629
10819
  children: [
10630
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("h3", { className: "font-agg-sans text-[18px] leading-7 font-agg-bold text-agg-foreground", children: "Balances" }),
10820
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("h3", { className: "agg-type-body-large-strong text-agg-foreground", children: "Balances" }),
10631
10821
  /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "relative min-h-0 flex-1 overflow-clip", children: [
10632
10822
  /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "flex max-h-full flex-col gap-3 overflow-y-auto pr-1", children: venueBalances.map((balance, idx) => /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex items-center justify-between", children: [
10633
10823
  /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex items-center gap-1.5", children: [
10634
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(VenueLogo, { venue: balance.venue, size: "s" }),
10824
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(VenueLogo, { venue: balance.venue, size: "small" }),
10635
10825
  /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "font-agg-sans text-agg-base leading-6 font-agg-normal text-agg-foreground capitalize", children: balance.venue })
10636
10826
  ] }),
10637
10827
  /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "font-agg-sans text-agg-base leading-6 font-agg-bold text-agg-foreground", children: balance.balanceLabel })
@@ -10645,8 +10835,8 @@ var BalancesCard = ({
10645
10835
  )
10646
10836
  ] }),
10647
10837
  /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex items-center gap-3", children: [
10648
- onDeposit ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { variant: "primary", size: "s", onClick: onDeposit, className: "flex-1", children: "Deposit" }) : null,
10649
- onWithdraw ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { variant: "secondary", size: "s", onClick: onWithdraw, className: "flex-1", children: "Withdraw" }) : null
10838
+ onDeposit ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { variant: "primary", size: "small", onClick: onDeposit, className: "flex-1", children: "Deposit" }) : null,
10839
+ onWithdraw ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { variant: "secondary", size: "small", onClick: onWithdraw, className: "flex-1", children: "Withdraw" }) : null
10650
10840
  ] })
10651
10841
  ]
10652
10842
  }
@@ -10676,7 +10866,7 @@ var ActivityRow = ({ activity, onClick }) => {
10676
10866
  children: [
10677
10867
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "w-[60px] shrink-0 font-agg-sans text-agg-base leading-agg-6 font-agg-normal text-agg-foreground", children: activity.type }),
10678
10868
  /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
10679
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(VenueLogo, { venue: activity.venue, size: "s", className: "shrink-0" }),
10869
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(VenueLogo, { venue: activity.venue, size: "small", className: "shrink-0" }),
10680
10870
  /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
10681
10871
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
10682
10872
  "img",
@@ -10788,7 +10978,7 @@ var PositionRow = ({ position, onClick }) => {
10788
10978
  onClick: handleClick,
10789
10979
  children: [
10790
10980
  /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
10791
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(VenueLogo, { venue: position.venue, size: "s", className: "shrink-0" }),
10981
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(VenueLogo, { venue: position.venue, size: "small", className: "shrink-0" }),
10792
10982
  /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
10793
10983
  /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
10794
10984
  "img",
@@ -10807,8 +10997,8 @@ var PositionRow = ({ position, onClick }) => {
10807
10997
  ] })
10808
10998
  ] })
10809
10999
  ] }),
10810
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "w-[120px] shrink-0 font-agg-sans text-[20px] leading-7 font-agg-normal text-agg-foreground", children: position.averageLabel }),
10811
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "w-[120px] shrink-0 font-agg-sans text-[20px] leading-7 font-agg-normal text-agg-foreground", children: position.currentLabel }),
11000
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "w-[120px] shrink-0 agg-type-title text-agg-foreground", children: position.averageLabel }),
11001
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "w-[120px] shrink-0 agg-type-title text-agg-foreground", children: position.currentLabel }),
10812
11002
  /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex items-center gap-6 shrink-0", children: [
10813
11003
  /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex w-[140px] flex-col items-end justify-center gap-1 text-agg-base leading-agg-6 whitespace-nowrap", children: [
10814
11004
  /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "font-agg-sans font-agg-bold text-black", children: position.valueLabel }),
@@ -10823,7 +11013,7 @@ var PositionRow = ({ position, onClick }) => {
10823
11013
  }
10824
11014
  )
10825
11015
  ] }),
10826
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Icon, { name: "chevron-right", size: "s", className: "shrink-0 text-agg-muted-foreground" })
11016
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Icon, { name: "chevron-right", size: "small", className: "shrink-0 text-agg-muted-foreground" })
10827
11017
  ] })
10828
11018
  ]
10829
11019
  }
@@ -10904,7 +11094,7 @@ var PositionsActivity = ({
10904
11094
  ] }, filter.value);
10905
11095
  }) }) : null,
10906
11096
  /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("label", { className: "flex min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex h-10 w-full items-center gap-3 rounded-agg-sm border border-agg-separator bg-agg-secondary px-3 py-2.5 focus-within:border-2 focus-within:border-agg-primary", children: [
10907
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Icon, { name: "search", size: "s", className: "shrink-0 text-agg-muted-foreground" }),
11097
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Icon, { name: "search", size: "small", className: "shrink-0 text-agg-muted-foreground" }),
10908
11098
  /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
10909
11099
  "input",
10910
11100
  {
@@ -11028,14 +11218,14 @@ var UserInfoCard = ({
11028
11218
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-4", children: [
11029
11219
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11030
11220
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-2", children: [
11031
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("h2", { className: "font-agg-sans text-[24px] leading-8 font-agg-bold text-agg-foreground", children: user.username }),
11221
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("h2", { className: "agg-type-heading text-agg-foreground", children: user.username }),
11032
11222
  user.socialLinks && user.socialLinks.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex items-center gap-2", children: user.socialLinks.map((social) => {
11033
11223
  const iconName = social.platform === "twitter" ? "twitter" : social.platform === "discord" ? "discord" : "telegram";
11034
11224
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
11035
11225
  "span",
11036
11226
  {
11037
11227
  className: "flex size-8 shrink-0 items-center justify-center rounded-full border border-agg-separator bg-agg-secondary",
11038
- children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { name: iconName, size: "s", className: "text-agg-foreground" })
11228
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { name: iconName, size: "small", className: "text-agg-foreground" })
11039
11229
  },
11040
11230
  social.platform
11041
11231
  );
@@ -11048,7 +11238,7 @@ var UserInfoCard = ({
11048
11238
  onClick: onEditProfile,
11049
11239
  className: "flex shrink-0 cursor-pointer items-center gap-1.5 bg-transparent text-agg-primary hover:opacity-80",
11050
11240
  children: [
11051
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { name: "pencil", size: "s", className: "text-agg-primary" }),
11241
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { name: "pencil", size: "small", className: "text-agg-primary" }),
11052
11242
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-agg-base font-agg-bold leading-6", children: "Edit" })
11053
11243
  ]
11054
11244
  }
@@ -11064,7 +11254,7 @@ var UserInfoCard = ({
11064
11254
  idx > 0 && "-ml-2"
11065
11255
  ),
11066
11256
  style: { zIndex: evmExchanges.length - idx },
11067
- children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(VenueLogo, { venue: exchange.venue, size: "s", className: "h-5 w-5" })
11257
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(VenueLogo, { venue: exchange.venue, size: "small", className: "h-5 w-5" })
11068
11258
  },
11069
11259
  `${exchange.venue}-${idx}`
11070
11260
  )) }),
@@ -11075,11 +11265,11 @@ var UserInfoCard = ({
11075
11265
  " exchange",
11076
11266
  totalExchangeCount !== 1 ? "s" : ""
11077
11267
  ] }),
11078
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { name: "info", size: "xs", className: "text-agg-muted-foreground" })
11268
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { name: "info", size: "small", className: "text-agg-muted-foreground" })
11079
11269
  ] })
11080
11270
  ] }) : null,
11081
11271
  user.socialHandle ? /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-3", children: [
11082
- user.socialHandleVenue ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden rounded-[4px]", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(VenueLogo, { venue: user.socialHandleVenue, size: "s", className: "h-5 w-5" }) }) : null,
11272
+ user.socialHandleVenue ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden rounded-[4px]", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(VenueLogo, { venue: user.socialHandleVenue, size: "small", className: "h-5 w-5" }) }) : null,
11083
11273
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground", children: user.socialHandle })
11084
11274
  ] }) : null
11085
11275
  ] }) : null
@@ -11349,5 +11539,6 @@ var placeOrderViewModelSchema = import_zod3.z.object({
11349
11539
  skeletonViews,
11350
11540
  toDate,
11351
11541
  tradingVenueSchema,
11542
+ typographyVariants,
11352
11543
  venueLogoNames
11353
11544
  });