@agg-build/ui 4.17.0 → 4.17.2

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 (36) hide show
  1. package/dist/{chunk-M6U2RKBD.mjs → chunk-3Y2GCNVL.mjs} +100 -52
  2. package/dist/{chunk-D2BTU7QI.mjs → chunk-7E4UXCEX.mjs} +223 -169
  3. package/dist/{chunk-QGONLJLE.mjs → chunk-B5ALKYD5.mjs} +210 -184
  4. package/dist/{chunk-RR44PSKH.mjs → chunk-BBDFSTIA.mjs} +3 -1
  5. package/dist/{chunk-5SCDQSNA.mjs → chunk-JI5KV4QI.mjs} +2 -2
  6. package/dist/{chunk-NIRCF54M.mjs → chunk-RZLM3M5R.mjs} +2 -2
  7. package/dist/{chunk-HFMKCV4L.mjs → chunk-TK62UB5F.mjs} +27 -16
  8. package/dist/events.js +29 -16
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +1033 -920
  11. package/dist/index.mjs +9 -38
  12. package/dist/modals.js +212 -184
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +814 -674
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +3 -1
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +535 -442
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +0 -2
  23. package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +0 -2
  24. package/dist/types/auth/connect-button-view/index.d.mts +1 -1
  25. package/dist/types/auth/connect-button-view/index.d.ts +1 -1
  26. package/dist/types/pages/user-profile/components/available-balance-card.d.mts +3 -1
  27. package/dist/types/pages/user-profile/components/available-balance-card.d.ts +3 -1
  28. package/dist/types/pages/user-profile/user-profile.types.d.mts +8 -0
  29. package/dist/types/pages/user-profile/user-profile.types.d.ts +8 -0
  30. package/dist/types/primitives/modal/index.d.mts +1 -1
  31. package/dist/types/primitives/modal/index.d.ts +1 -1
  32. package/dist/types/primitives/modal/modal.types.d.mts +6 -0
  33. package/dist/types/primitives/modal/modal.types.d.ts +6 -0
  34. package/dist/types/trading/place-order/index.place-order.utils.d.mts +12 -1
  35. package/dist/types/trading/place-order/index.place-order.utils.d.ts +12 -1
  36. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  formatRecurringCountdown,
15
15
  formatShareAmount,
16
16
  useHomePageModals
17
- } from "./chunk-M6U2RKBD.mjs";
17
+ } from "./chunk-3Y2GCNVL.mjs";
18
18
  import {
19
19
  EventList,
20
20
  EventListItem,
@@ -32,7 +32,7 @@ import {
32
32
  orderbookRowLimitDefault,
33
33
  resolveEventDetailsSyncKey,
34
34
  useCenterOrderbookSpread
35
- } from "./chunk-NIRCF54M.mjs";
35
+ } from "./chunk-RZLM3M5R.mjs";
36
36
  import {
37
37
  CARD_NETWORK_OPTIONS,
38
38
  DepositModal,
@@ -45,7 +45,7 @@ import {
45
45
  buildTerminalSummary,
46
46
  clearPendingCardSession,
47
47
  getPendingCardSession
48
- } from "./chunk-5SCDQSNA.mjs";
48
+ } from "./chunk-JI5KV4QI.mjs";
49
49
  import {
50
50
  AggNotificationEventsProvider,
51
51
  DEPOSIT_MODAL_OPEN_EVENT,
@@ -67,7 +67,7 @@ import {
67
67
  useResolvedMarketClaim,
68
68
  useSharedKycFlow,
69
69
  venueRequiresSharedKyc
70
- } from "./chunk-D2BTU7QI.mjs";
70
+ } from "./chunk-7E4UXCEX.mjs";
71
71
  import {
72
72
  SETTLEMENT_SECTION_ID,
73
73
  Settlement,
@@ -88,7 +88,7 @@ import {
88
88
  resolveOrderBookRows,
89
89
  resolveUnifiedOrderBookEntries,
90
90
  useEventTradingContext
91
- } from "./chunk-HFMKCV4L.mjs";
91
+ } from "./chunk-TK62UB5F.mjs";
92
92
  import {
93
93
  ConnectAccountsStep,
94
94
  ConnectKalshiModal,
@@ -98,7 +98,7 @@ import {
98
98
  OnboardingModal,
99
99
  ProfileSetupStep,
100
100
  SharedKycModal
101
- } from "./chunk-QGONLJLE.mjs";
101
+ } from "./chunk-B5ALKYD5.mjs";
102
102
  import {
103
103
  AGG_DEFAULT_URL,
104
104
  AGG_DOCS_URL,
@@ -220,7 +220,7 @@ import {
220
220
  useOptionalToast,
221
221
  useToast,
222
222
  venueLogoNames
223
- } from "./chunk-RR44PSKH.mjs";
223
+ } from "./chunk-BBDFSTIA.mjs";
224
224
 
225
225
  // src/notifications/agg-toast-provider.tsx
226
226
  import { jsx } from "react/jsx-runtime";
@@ -249,15 +249,12 @@ function AggProvider(_a) {
249
249
 
250
250
  // src/auth/connect-button-view/index.tsx
251
251
  import {
252
- getVenueAvailabilityState,
253
252
  optimizedImageUrl,
254
253
  useAggAuthContext,
255
- useAppConfig,
256
254
  useLabels,
257
255
  useResolvedExecutionMode,
258
256
  useSdkUiConfig
259
257
  } from "@agg-build/hooks";
260
- import { Venue } from "@agg-build/sdk";
261
258
  import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
262
259
 
263
260
  // src/auth/connect-button-view/connect-button-view.constants.ts
@@ -626,7 +623,6 @@ var AuthConnectButtonView = ({
626
623
  profileLabel,
627
624
  totalBalance,
628
625
  positionsBalance,
629
- kalshiBalance = null,
630
626
  claimReadyCount = 0,
631
627
  onClaimWinningsClick,
632
628
  walletMethods,
@@ -634,19 +630,12 @@ var AuthConnectButtonView = ({
634
630
  }) => {
635
631
  var _a;
636
632
  const labels = useLabels();
637
- const { disabledVenues, isLoading: isAppConfigLoading } = useAppConfig();
638
633
  const { isPaperMode } = useResolvedExecutionMode();
639
- const isKalshiAvailable = getVenueAvailabilityState({
640
- venueId: Venue.kalshi,
641
- disabledVenues,
642
- isConfigLoading: isAppConfigLoading
643
- }) === "available";
644
634
  const {
645
635
  general: { rootClassName },
646
636
  features: { enableAnimations }
647
637
  } = useSdkUiConfig();
648
638
  const resolvedProfileLabel = profileLabel || labels.auth.myProfile;
649
- const kalshiBalanceLabel = formatUsd(kalshiBalance != null ? kalshiBalance : 0);
650
639
  const authLabelsWithClaim = labels.auth;
651
640
  const resolveClaimTooltipLabel = (count) => {
652
641
  var _a2, _b;
@@ -774,18 +763,7 @@ var AuthConnectButtonView = ({
774
763
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
775
764
  /* @__PURE__ */ jsx3("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx3(Icon, { name: "wallet-filled", size: "small", className: "text-agg-muted-foreground" }) }),
776
765
  /* @__PURE__ */ jsx3("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
777
- ] }),
778
- isKalshiAvailable && !isPaperMode ? /* @__PURE__ */ jsxs(
779
- "div",
780
- {
781
- className: "flex items-center gap-2",
782
- "aria-label": `${labels.userProfile.balance.kalshiBalance}: ${kalshiBalanceLabel}`,
783
- children: [
784
- /* @__PURE__ */ jsx3(VenueLogo, { venue: Venue.kalshi, size: "small", className: "size-3.5" }),
785
- /* @__PURE__ */ jsx3("p", { className: "agg-type-label text-agg-foreground", children: kalshiBalanceLabel })
786
- ]
787
- }
788
- ) : null
766
+ ] })
789
767
  ] }),
790
768
  /* @__PURE__ */ jsxs(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
791
769
  /* @__PURE__ */ jsx3(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
@@ -911,14 +889,7 @@ var AuthConnectButtonView = ({
911
889
  /* @__PURE__ */ jsx3("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Positions Value" })
912
890
  ] }),
913
891
  /* @__PURE__ */ jsx3("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) })
914
- ] }),
915
- isKalshiAvailable && !isPaperMode ? /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-2", children: [
916
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
917
- /* @__PURE__ */ jsx3(VenueLogo, { venue: Venue.kalshi, size: "small", className: "size-4" }),
918
- /* @__PURE__ */ jsx3("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: labels.userProfile.balance.kalshiBalance })
919
- ] }),
920
- /* @__PURE__ */ jsx3("p", { className: "text-left text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground", children: kalshiBalanceLabel })
921
- ] }) : null
892
+ ] })
922
893
  ] })
923
894
  ]
924
895
  }
package/dist/modals.js CHANGED
@@ -237,7 +237,8 @@ var ModalContainer = ({
237
237
  maxWidth = "600px",
238
238
  classNames,
239
239
  "aria-label": ariaLabel,
240
- "aria-labelledby": ariaLabelledBy
240
+ "aria-labelledby": ariaLabelledBy,
241
+ onOpenAutoFocus
241
242
  }) => {
242
243
  const {
243
244
  general: { rootClassName },
@@ -268,6 +269,7 @@ var ModalContainer = ({
268
269
  ),
269
270
  "aria-label": ariaLabel,
270
271
  "aria-labelledby": ariaLabelledBy,
272
+ onOpenAutoFocus,
271
273
  onCloseAutoFocus: (event) => {
272
274
  event.preventDefault();
273
275
  },
@@ -8936,6 +8938,27 @@ var getSafeConnectionError = ({
8936
8938
  error.message
8937
8939
  ).trim();
8938
8940
  };
8941
+ var CloseButton = ({
8942
+ className,
8943
+ disabled
8944
+ }) => {
8945
+ const labels = (0, import_hooks39.useLabels)();
8946
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
8947
+ Dialog3.Close,
8948
+ {
8949
+ "aria-label": labels.common.close,
8950
+ disabled,
8951
+ className: cn(
8952
+ "z-30 flex size-6 cursor-pointer items-center justify-center rounded-agg-full",
8953
+ "text-agg-foreground transition-colors hover:text-agg-foreground/80",
8954
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-accent",
8955
+ "disabled:cursor-not-allowed disabled:opacity-50",
8956
+ className
8957
+ ),
8958
+ children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "close", size: "medium", className: "!text-agg-foreground" })
8959
+ }
8960
+ );
8961
+ };
8939
8962
  var ConnectKalshiModal = ({
8940
8963
  open,
8941
8964
  onOpenChange,
@@ -8966,12 +8989,12 @@ var ConnectKalshiModal = ({
8966
8989
  setError(void 0);
8967
8990
  setIsVerifying(false);
8968
8991
  setIsConnected(false);
8969
- const animationFrame = window.requestAnimationFrame(() => {
8970
- var _a;
8971
- return (_a = apiKeyInputRef.current) == null ? void 0 : _a.focus();
8972
- });
8973
- return () => window.cancelAnimationFrame(animationFrame);
8974
8992
  }, [open]);
8993
+ const handleOpenAutoFocus = (0, import_react16.useCallback)((event) => {
8994
+ var _a;
8995
+ event.preventDefault();
8996
+ (_a = apiKeyInputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
8997
+ }, []);
8975
8998
  const handleOpenChange = (0, import_react16.useCallback)(
8976
8999
  (nextOpen) => {
8977
9000
  if (isVerifying && !nextOpen) return;
@@ -9014,207 +9037,211 @@ var ConnectKalshiModal = ({
9014
9037
  [handleVerify]
9015
9038
  );
9016
9039
  if (availabilityState === "hidden") return null;
9017
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
9040
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9018
9041
  Modal.Container,
9019
9042
  {
9020
- maxWidth: "600px",
9043
+ maxWidth: isConnected ? "480px" : "600px",
9021
9044
  "aria-label": labels.onboarding.connectKalshiModal.ariaLabel,
9022
- classNames: { container: "!rounded-agg-2xl" },
9023
- children: [
9024
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "flex h-[60px] shrink-0 items-center justify-end px-8", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9025
- Dialog3.Close,
9026
- {
9027
- "aria-label": labels.common.close,
9028
- className: "flex size-10 cursor-pointer items-center justify-center rounded-agg-full text-agg-secondary transition-colors hover:bg-agg-quaternary hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-accent disabled:cursor-default disabled:opacity-50",
9029
- disabled: isVerifying,
9030
- children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "close", size: "medium" })
9031
- }
9032
- ) }),
9033
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal.Body, { classNames: { root: "!px-5 !pb-12 !pt-0 sm:!px-10" }, children: isConnected ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
9045
+ classNames: {
9046
+ container: "!rounded-t-agg-xl !rounded-b-none md:!rounded-agg-2xl"
9047
+ },
9048
+ onOpenAutoFocus: isConnected ? void 0 : handleOpenAutoFocus,
9049
+ children: isConnected ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(Modal.Body, { classNames: { root: "relative !px-5 !py-8 md:!px-10 md:!py-12" }, children: [
9050
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(CloseButton, { className: "absolute right-5 top-5 md:right-8 md:top-8" }),
9051
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
9034
9052
  "div",
9035
9053
  {
9036
- className: "flex flex-col items-center gap-8 pb-3 text-center",
9054
+ className: "flex flex-col items-center gap-8 text-center",
9037
9055
  role: "status",
9038
9056
  "aria-live": "polite",
9039
9057
  children: [
9040
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9041
- Icon,
9042
- {
9043
- name: "success-check",
9044
- className: "size-7 text-agg-on-primary",
9045
- "aria-hidden": "true"
9046
- }
9047
- ) }),
9048
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
9058
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success/15", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "success-check", className: "size-6 text-agg-success", "aria-hidden": "true" }) }),
9059
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
9049
9060
  /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.title }),
9050
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Description, { className: "max-w-[480px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.description })
9061
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Description, { className: "text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.description })
9051
9062
  ] }),
9052
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9053
- Button,
9054
- {
9055
- variant: "primary",
9056
- size: "large",
9057
- className: "min-w-[120px]",
9058
- onClick: () => handleOpenChange(false),
9059
- children: labels.onboarding.connectKalshiModal.success.done
9060
- }
9061
- )
9063
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Button, { variant: "secondary", size: "large", onClick: () => handleOpenChange(false), children: labels.onboarding.connectKalshiModal.success.done })
9062
9064
  ]
9063
9065
  }
9064
- ) : /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("form", { className: "flex flex-col items-center gap-8", onSubmit: handleSubmit, children: [
9065
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(VenueLogo, { venue: import_sdk13.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
9066
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col items-center gap-4 text-center", children: [
9067
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
9068
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
9069
- ] }),
9070
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
9071
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
9072
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-1", children: [
9073
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
9074
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
9075
- ] }),
9076
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
9077
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
9078
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
9079
- labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
9080
- " ",
9081
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
9082
- labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
9083
- " ",
9066
+ )
9067
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("form", { className: "flex min-h-0 flex-1 flex-col", onSubmit: handleSubmit, children: [
9068
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9069
+ Modal.Body,
9070
+ {
9071
+ classNames: { root: "relative !px-5 !pb-6 !pt-5 md:!px-10 md:!pb-0 md:!pt-12" },
9072
+ children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-6 md:items-center md:gap-0", children: [
9073
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex w-full flex-col md:contents", children: [
9074
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center gap-3 md:contents", children: [
9084
9075
  /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9085
- "a",
9076
+ VenueLogo,
9086
9077
  {
9087
- href: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl,
9088
- target: "_blank",
9089
- rel: "noreferrer",
9090
- className: "cursor-pointer underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
9091
- children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl
9078
+ venue: import_sdk13.Venue.kalshi,
9079
+ variant: "logo",
9080
+ size: "large",
9081
+ className: "!size-10 md:!mb-8 md:!size-[60px]"
9082
+ }
9083
+ ),
9084
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Title, { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground md:mb-4 md:text-center md:text-agg-2xl md:leading-agg-8", children: labels.onboarding.connectKalshiModal.title }),
9085
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9086
+ CloseButton,
9087
+ {
9088
+ disabled: isVerifying,
9089
+ className: "ml-auto shrink-0 md:absolute md:right-8 md:top-8 md:ml-0"
9092
9090
  }
9093
9091
  )
9094
9092
  ] }),
9095
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
9096
- labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
9097
- " ",
9098
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
9099
- labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
9100
- ] }),
9101
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
9102
- labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
9103
- " ",
9104
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
9105
- labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
9106
- ] }),
9107
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
9108
- ] }),
9109
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
9110
- labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
9111
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("br", {}),
9112
- labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
9113
- ] })
9114
- ] }),
9115
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
9116
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-1", children: [
9117
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
9118
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
9093
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Description, { className: "mt-3 text-agg-sm leading-agg-5 text-agg-foreground md:mb-8 md:mt-0 md:text-center md:text-agg-base md:leading-agg-6", children: labels.onboarding.connectKalshiModal.description })
9119
9094
  ] }),
9120
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
9121
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-2", children: [
9122
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9123
- "label",
9124
- {
9125
- htmlFor: "kalshi-api-key-id",
9126
- className: "text-agg-sm font-agg-bold text-agg-foreground",
9127
- children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
9128
- }
9129
- ),
9130
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9131
- "input",
9132
- {
9133
- ref: apiKeyInputRef,
9134
- id: "kalshi-api-key-id",
9135
- type: "text",
9136
- autoComplete: "off",
9137
- value: apiKeyId,
9138
- onChange: (event) => setApiKeyId(event.target.value),
9139
- placeholder: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdPlaceholder,
9140
- disabled: isVerifying,
9141
- "aria-invalid": !!error,
9142
- "aria-describedby": error ? errorId : void 0,
9143
- className: cn(
9144
- "h-10 w-full rounded-agg-md border border-agg-separator bg-agg-secondary px-3 py-2.5",
9145
- "text-agg-base text-agg-foreground placeholder:text-agg-muted-foreground",
9146
- "outline-none transition-colors focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
9147
- "disabled:cursor-not-allowed disabled:opacity-60"
9095
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
9096
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
9097
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-1", children: [
9098
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
9099
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
9100
+ ] }),
9101
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
9102
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
9103
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
9104
+ labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
9105
+ " ",
9106
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
9107
+ labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
9108
+ " ",
9109
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9110
+ "a",
9111
+ {
9112
+ href: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl,
9113
+ target: "_blank",
9114
+ rel: "noreferrer",
9115
+ className: "cursor-pointer underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
9116
+ children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl
9117
+ }
9118
+ )
9119
+ ] }),
9120
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
9121
+ labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
9122
+ " ",
9123
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
9124
+ labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
9125
+ ] }),
9126
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { children: [
9127
+ labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
9128
+ " ",
9129
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
9130
+ labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
9131
+ ] }),
9132
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
9133
+ ] }),
9134
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
9135
+ labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
9136
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("br", {}),
9137
+ labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
9138
+ ] })
9139
+ ] }),
9140
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
9141
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-1", children: [
9142
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
9143
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
9144
+ ] }),
9145
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
9146
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-2", children: [
9147
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9148
+ "label",
9149
+ {
9150
+ htmlFor: "kalshi-api-key-id",
9151
+ className: "text-agg-sm font-agg-bold text-agg-foreground",
9152
+ children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
9153
+ }
9154
+ ),
9155
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9156
+ "input",
9157
+ {
9158
+ ref: apiKeyInputRef,
9159
+ id: "kalshi-api-key-id",
9160
+ type: "text",
9161
+ autoComplete: "off",
9162
+ value: apiKeyId,
9163
+ onChange: (event) => setApiKeyId(event.target.value),
9164
+ placeholder: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdPlaceholder,
9165
+ disabled: isVerifying,
9166
+ "aria-invalid": !!error,
9167
+ "aria-describedby": error ? errorId : void 0,
9168
+ className: cn(
9169
+ "h-10 w-full rounded-agg-sm border border-agg-separator bg-agg-secondary px-3 py-2.5",
9170
+ "text-agg-base text-agg-foreground placeholder:text-agg-muted-foreground",
9171
+ "outline-none transition-colors focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
9172
+ "disabled:cursor-not-allowed disabled:opacity-60"
9173
+ )
9174
+ }
9148
9175
  )
9149
- }
9150
- )
9151
- ] }),
9152
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-2", children: [
9153
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9154
- "label",
9155
- {
9156
- htmlFor: "kalshi-private-key",
9157
- className: "text-agg-sm font-agg-bold text-agg-foreground",
9158
- children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
9159
- }
9160
- ),
9161
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9162
- "textarea",
9163
- {
9164
- id: "kalshi-private-key",
9165
- autoComplete: "off",
9166
- value: privateKey,
9167
- onChange: (event) => setPrivateKey(event.target.value),
9168
- placeholder: labels.onboarding.connectKalshiModal.stepTwo.privateKeyPlaceholder,
9169
- rows: 3,
9170
- disabled: isVerifying,
9171
- "aria-invalid": !!error,
9172
- "aria-describedby": error ? errorId : void 0,
9173
- className: cn(
9174
- "w-full resize-none rounded-agg-md border border-agg-separator bg-agg-secondary px-3 py-2.5",
9175
- "text-agg-base text-agg-foreground placeholder:text-agg-muted-foreground",
9176
- "outline-none transition-colors focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
9177
- "disabled:cursor-not-allowed disabled:opacity-60"
9176
+ ] }),
9177
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-2", children: [
9178
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9179
+ "label",
9180
+ {
9181
+ htmlFor: "kalshi-private-key",
9182
+ className: "text-agg-sm font-agg-bold text-agg-foreground",
9183
+ children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
9184
+ }
9185
+ ),
9186
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9187
+ "textarea",
9188
+ {
9189
+ id: "kalshi-private-key",
9190
+ autoComplete: "off",
9191
+ value: privateKey,
9192
+ onChange: (event) => setPrivateKey(event.target.value),
9193
+ placeholder: labels.onboarding.connectKalshiModal.stepTwo.privateKeyPlaceholder,
9194
+ rows: 3,
9195
+ disabled: isVerifying,
9196
+ "aria-invalid": !!error,
9197
+ "aria-describedby": error ? errorId : void 0,
9198
+ className: cn(
9199
+ "w-full resize-none rounded-agg-sm border border-agg-separator bg-agg-secondary px-3 py-2.5",
9200
+ "text-agg-base text-agg-foreground placeholder:text-agg-muted-foreground",
9201
+ "outline-none transition-colors focus:border-agg-primary focus:ring-1 focus:ring-agg-primary",
9202
+ "disabled:cursor-not-allowed disabled:opacity-60"
9203
+ )
9204
+ }
9178
9205
  )
9179
- }
9180
- )
9181
- ] })
9182
- ] })
9183
- ] }),
9184
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
9185
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
9186
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center gap-3", children: [
9187
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
9188
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "document", size: "small", className: "size-4 text-agg-primary" }),
9189
- labels.onboarding.connectKalshiModal.help.docsLinkLabel
9206
+ ] })
9207
+ ] })
9190
9208
  ] }),
9191
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "h-3 w-px bg-agg-separator" }),
9192
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
9193
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "play-square", size: "small", className: "size-4 text-agg-primary" }),
9194
- labels.onboarding.connectKalshiModal.help.tutorialLinkLabel
9195
- ] })
9209
+ error ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
9210
+ "div",
9211
+ {
9212
+ id: errorId,
9213
+ className: "flex items-center gap-2 md:justify-center",
9214
+ role: "alert",
9215
+ "aria-live": "assertive",
9216
+ children: [
9217
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "warning", size: "small", className: "size-3.5 text-agg-error" }),
9218
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
9219
+ ]
9220
+ }
9221
+ ) : null
9196
9222
  ] })
9197
- ] }),
9198
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col items-center gap-5", children: [
9199
- error ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
9200
- "div",
9201
- {
9202
- id: errorId,
9203
- className: "flex items-center gap-2",
9204
- role: "alert",
9205
- "aria-live": "assertive",
9206
- children: [
9207
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: "warning", size: "small", className: "size-3.5 text-agg-error" }),
9208
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
9209
- ]
9210
- }
9211
- ) : null,
9212
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center justify-center gap-3", children: [
9223
+ }
9224
+ ),
9225
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
9226
+ Modal.Footer,
9227
+ {
9228
+ classNames: {
9229
+ root: "relative !h-auto !gap-3 !p-4 md:!justify-center md:!border-0 md:!px-10 md:!pb-12 md:!pt-8"
9230
+ },
9231
+ children: [
9232
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9233
+ "div",
9234
+ {
9235
+ "aria-hidden": "true",
9236
+ className: "pointer-events-none absolute inset-x-0 -top-[60px] h-[60px] bg-gradient-to-b from-transparent to-agg-secondary md:hidden"
9237
+ }
9238
+ ),
9213
9239
  /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
9214
9240
  Button,
9215
9241
  {
9216
9242
  variant: "secondary",
9217
9243
  size: "large",
9244
+ className: "shrink-0",
9218
9245
  onClick: () => handleOpenChange(false),
9219
9246
  disabled: isVerifying,
9220
9247
  children: labels.onboarding.connectKalshiModal.actions.cancel
@@ -9226,15 +9253,16 @@ var ConnectKalshiModal = ({
9226
9253
  type: "submit",
9227
9254
  variant: "primary",
9228
9255
  size: "large",
9256
+ className: "flex-1 md:flex-none",
9229
9257
  disabled: !parsedCredentials.success || isVerifying,
9230
9258
  isLoading: isVerifying,
9231
9259
  children: labels.onboarding.connectKalshiModal.actions.verifyConnection
9232
9260
  }
9233
9261
  )
9234
- ] })
9235
- ] })
9236
- ] }) })
9237
- ]
9262
+ ]
9263
+ }
9264
+ )
9265
+ ] })
9238
9266
  }
9239
9267
  ) });
9240
9268
  };
package/dist/modals.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  buildTerminalSummary,
12
12
  clearPendingCardSession,
13
13
  getPendingCardSession
14
- } from "./chunk-5SCDQSNA.mjs";
14
+ } from "./chunk-JI5KV4QI.mjs";
15
15
  import {
16
16
  ConnectAccountsStep,
17
17
  ConnectKalshiModal,
@@ -21,8 +21,8 @@ import {
21
21
  OnboardingModal,
22
22
  ProfileSetupStep,
23
23
  SharedKycModal
24
- } from "./chunk-QGONLJLE.mjs";
25
- import "./chunk-RR44PSKH.mjs";
24
+ } from "./chunk-B5ALKYD5.mjs";
25
+ import "./chunk-BBDFSTIA.mjs";
26
26
  export {
27
27
  CARD_NETWORK_OPTIONS,
28
28
  ConnectAccountsStep,