@agg-market/ui 9.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-N7U7QCSB.mjs → chunk-55YYUTBK.mjs} +807 -358
- package/dist/{chunk-3U4VHAP6.mjs → chunk-5G4T5R2H.mjs} +6 -2
- package/dist/{chunk-6CRY27SQ.mjs → chunk-GYOCLZGH.mjs} +538 -418
- package/dist/{chunk-HJ4UPYM7.mjs → chunk-RYQSVETG.mjs} +201 -165
- package/dist/{chunk-3G7C6WEC.mjs → chunk-XP7DREIX.mjs} +47 -15
- package/dist/events.js +575 -429
- package/dist/events.mjs +6 -4
- package/dist/index.js +1577 -948
- package/dist/index.mjs +10 -6
- package/dist/modals.js +1185 -374
- package/dist/modals.mjs +4 -2
- package/dist/pages.js +1400 -1010
- package/dist/pages.mjs +4 -4
- package/dist/primitives.js +46 -14
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +20 -4
- package/dist/trading.mjs +2 -2
- package/dist/types/events/item/event-list-item.types.d.mts +1 -2
- package/dist/types/events/item/event-list-item.types.d.ts +1 -2
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +1 -4
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +1 -4
- package/dist/types/events/item-details/event-list-item-details.utils.d.mts +42 -3
- package/dist/types/events/item-details/event-list-item-details.utils.d.ts +42 -3
- package/dist/types/events/list/event-list.types.d.mts +2 -1
- package/dist/types/events/list/event-list.types.d.ts +2 -1
- package/dist/types/events/list/index.d.mts +1 -1
- package/dist/types/events/list/index.d.ts +1 -1
- package/dist/types/events/market-details/index.d.mts +6 -2
- package/dist/types/events/market-details/index.d.ts +6 -2
- package/dist/types/events/market-details/market-details.types.d.mts +33 -9
- package/dist/types/events/market-details/market-details.types.d.ts +33 -9
- package/dist/types/events/market-details/market-details.utils.d.mts +15 -10
- package/dist/types/events/market-details/market-details.utils.d.ts +15 -10
- package/dist/types/modals/index.d.mts +1 -0
- package/dist/types/modals/index.d.ts +1 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +2 -0
- package/dist/types/pages/home/home.constants.d.mts +1 -3
- package/dist/types/pages/home/home.constants.d.ts +1 -3
- package/dist/types/pages/home/home.types.d.mts +0 -2
- package/dist/types/pages/home/home.types.d.ts +0 -2
- package/dist/types/pages/home/home.utils.d.mts +4 -0
- package/dist/types/pages/home/home.utils.d.ts +4 -0
- package/dist/types/pages/home/index.d.mts +1 -1
- package/dist/types/pages/home/index.d.ts +1 -1
- package/dist/types/primitives/chart/index.d.mts +9 -1
- package/dist/types/primitives/chart/index.d.ts +9 -1
- package/dist/types/primitives/venue-logo/index.d.mts +1 -1
- package/dist/types/primitives/venue-logo/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Badge,
|
|
2
3
|
BankIcon,
|
|
3
4
|
BestPricesIcon,
|
|
4
5
|
BoltIcon,
|
|
@@ -12,23 +13,28 @@ import {
|
|
|
12
13
|
DocumentIcon,
|
|
13
14
|
ExternalLinkIcon,
|
|
14
15
|
Icon,
|
|
16
|
+
InlineAlert,
|
|
15
17
|
LinkAccountsIcon,
|
|
18
|
+
LoadingIcon,
|
|
16
19
|
Modal,
|
|
17
20
|
PlaySquareIcon,
|
|
18
21
|
ProfileIcon,
|
|
19
22
|
RemoteImage,
|
|
20
23
|
Select,
|
|
24
|
+
StateMessage,
|
|
21
25
|
StayInControlIcon,
|
|
22
26
|
VenueLogo,
|
|
23
27
|
WalletIcon,
|
|
24
28
|
WarningFilledIcon,
|
|
25
29
|
WarningIcon,
|
|
26
30
|
__async,
|
|
31
|
+
__spreadProps,
|
|
32
|
+
__spreadValues,
|
|
27
33
|
cn,
|
|
28
34
|
formatAmountDisplay,
|
|
29
35
|
formatCompactUsd,
|
|
30
36
|
venueLogoLabels
|
|
31
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XP7DREIX.mjs";
|
|
32
38
|
|
|
33
39
|
// src/deposit/index.tsx
|
|
34
40
|
import { useState as useState3 } from "react";
|
|
@@ -668,20 +674,460 @@ var DepositModal = ({
|
|
|
668
674
|
};
|
|
669
675
|
DepositModal.displayName = "DepositModal";
|
|
670
676
|
|
|
677
|
+
// src/onramp/index.tsx
|
|
678
|
+
import { useCallback as useCallback4, useState as useState4 } from "react";
|
|
679
|
+
|
|
680
|
+
// src/onramp/steps/quote-form.tsx
|
|
681
|
+
import { useCallback as useCallback3 } from "react";
|
|
682
|
+
|
|
683
|
+
// src/onramp/onramp-modal.constants.ts
|
|
684
|
+
var FIAT_OPTIONS = [
|
|
685
|
+
{ value: "USD", label: "USD" },
|
|
686
|
+
{ value: "EUR", label: "EUR" },
|
|
687
|
+
{ value: "GBP", label: "GBP" }
|
|
688
|
+
];
|
|
689
|
+
var FIAT_SYMBOLS = {
|
|
690
|
+
USD: "$",
|
|
691
|
+
EUR: "\u20AC",
|
|
692
|
+
GBP: "\xA3"
|
|
693
|
+
};
|
|
694
|
+
var CRYPTO_OPTIONS = [
|
|
695
|
+
{ value: "USDC", label: "USDC (Ethereum)" },
|
|
696
|
+
{ value: "USDC_BASE", label: "USDC (Base)" },
|
|
697
|
+
{ value: "USDC_SOLANA", label: "USDC (Solana)" },
|
|
698
|
+
{ value: "USDC_POLYGON", label: "USDC (Polygon)" },
|
|
699
|
+
{ value: "USDC_ARBITRUM", label: "USDC (Arbitrum)" }
|
|
700
|
+
];
|
|
701
|
+
|
|
702
|
+
// src/onramp/steps/quote-form.tsx
|
|
703
|
+
import { Fragment as Fragment6, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
704
|
+
var QuoteFormStep = ({
|
|
705
|
+
title,
|
|
706
|
+
values,
|
|
707
|
+
onAmountChange,
|
|
708
|
+
onFiatChange,
|
|
709
|
+
onCryptoChange,
|
|
710
|
+
onWalletAddressChange,
|
|
711
|
+
onSubmit
|
|
712
|
+
}) => {
|
|
713
|
+
var _a;
|
|
714
|
+
const numericAmount = Number(values.amount) || 0;
|
|
715
|
+
const isFormValid = numericAmount > 0 && values.walletAddress.length > 0;
|
|
716
|
+
const handleAmountChange = useCallback3(
|
|
717
|
+
(e) => {
|
|
718
|
+
const v = e.target.value.replace(/[^0-9.]/g, "");
|
|
719
|
+
const parts = v.split(".");
|
|
720
|
+
onAmountChange(parts.length > 2 ? `${parts[0]}.${parts.slice(1).join("")}` : v);
|
|
721
|
+
},
|
|
722
|
+
[onAmountChange]
|
|
723
|
+
);
|
|
724
|
+
return /* @__PURE__ */ jsxs7(Fragment6, { children: [
|
|
725
|
+
/* @__PURE__ */ jsx7(Modal.Header, { title, hideBorder: true }),
|
|
726
|
+
/* @__PURE__ */ jsx7(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-6", children: [
|
|
727
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2", children: [
|
|
728
|
+
/* @__PURE__ */ jsx7("p", { className: "agg-type-label text-agg-muted-foreground", children: "You pay" }),
|
|
729
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-3", children: [
|
|
730
|
+
/* @__PURE__ */ jsx7("div", { className: "shrink-0", children: /* @__PURE__ */ jsx7(
|
|
731
|
+
Select,
|
|
732
|
+
{
|
|
733
|
+
items: FIAT_OPTIONS,
|
|
734
|
+
value: values.fiatCurrency,
|
|
735
|
+
onChange: onFiatChange,
|
|
736
|
+
ariaLabel: "Fiat currency",
|
|
737
|
+
className: "w-auto"
|
|
738
|
+
}
|
|
739
|
+
) }),
|
|
740
|
+
/* @__PURE__ */ jsx7("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxs7("div", { className: "flex items-baseline", children: [
|
|
741
|
+
/* @__PURE__ */ jsx7("span", { className: "agg-type-display text-agg-foreground", children: (_a = FIAT_SYMBOLS[values.fiatCurrency]) != null ? _a : "$" }),
|
|
742
|
+
/* @__PURE__ */ jsx7(
|
|
743
|
+
"input",
|
|
744
|
+
{
|
|
745
|
+
type: "text",
|
|
746
|
+
inputMode: "decimal",
|
|
747
|
+
"aria-label": "Amount",
|
|
748
|
+
className: cn(
|
|
749
|
+
"agg-type-display w-full bg-transparent outline-none",
|
|
750
|
+
numericAmount > 0 ? "text-agg-foreground" : "text-agg-muted-foreground"
|
|
751
|
+
),
|
|
752
|
+
placeholder: "0",
|
|
753
|
+
value: values.amount ? formatAmountDisplay(values.amount) : "",
|
|
754
|
+
onChange: handleAmountChange
|
|
755
|
+
}
|
|
756
|
+
)
|
|
757
|
+
] }) })
|
|
758
|
+
] })
|
|
759
|
+
] }),
|
|
760
|
+
/* @__PURE__ */ jsx7("div", { className: "border-t border-agg-separator" }),
|
|
761
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2", children: [
|
|
762
|
+
/* @__PURE__ */ jsx7("p", { className: "agg-type-label text-agg-muted-foreground", children: "You receive" }),
|
|
763
|
+
/* @__PURE__ */ jsx7(
|
|
764
|
+
Select,
|
|
765
|
+
{
|
|
766
|
+
items: CRYPTO_OPTIONS,
|
|
767
|
+
value: values.cryptoCurrency,
|
|
768
|
+
onChange: onCryptoChange,
|
|
769
|
+
ariaLabel: "Cryptocurrency"
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
] }),
|
|
773
|
+
/* @__PURE__ */ jsx7("div", { className: "border-t border-agg-separator" }),
|
|
774
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2", children: [
|
|
775
|
+
/* @__PURE__ */ jsx7("p", { className: "agg-type-label text-agg-muted-foreground", children: "Destination wallet" }),
|
|
776
|
+
/* @__PURE__ */ jsx7(
|
|
777
|
+
"input",
|
|
778
|
+
{
|
|
779
|
+
type: "text",
|
|
780
|
+
"aria-label": "Wallet address",
|
|
781
|
+
className: cn(
|
|
782
|
+
"w-full rounded-agg-md border border-agg-separator bg-agg-secondary",
|
|
783
|
+
"px-4 py-2 font-agg-sans text-agg-sm leading-agg-5 text-agg-foreground outline-none",
|
|
784
|
+
"placeholder:text-agg-muted-foreground",
|
|
785
|
+
"transition-[border-color,box-shadow] duration-200 ease-in-out",
|
|
786
|
+
"focus:border-agg-primary focus:ring-2 focus:ring-agg-primary/15"
|
|
787
|
+
),
|
|
788
|
+
placeholder: "0x...",
|
|
789
|
+
value: values.walletAddress,
|
|
790
|
+
onChange: (e) => onWalletAddressChange(e.target.value)
|
|
791
|
+
}
|
|
792
|
+
)
|
|
793
|
+
] }),
|
|
794
|
+
/* @__PURE__ */ jsx7(
|
|
795
|
+
Button,
|
|
796
|
+
{
|
|
797
|
+
variant: "primary",
|
|
798
|
+
size: "large",
|
|
799
|
+
className: "w-full",
|
|
800
|
+
disabled: !isFormValid,
|
|
801
|
+
onClick: onSubmit,
|
|
802
|
+
children: "Get Quotes"
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
] }) })
|
|
806
|
+
] });
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
// src/onramp/steps/quote-card.tsx
|
|
810
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
811
|
+
var QuoteCard = ({ quote, rank, onSelect }) => {
|
|
812
|
+
var _a;
|
|
813
|
+
const isBest = rank === 1;
|
|
814
|
+
return /* @__PURE__ */ jsxs8(
|
|
815
|
+
"div",
|
|
816
|
+
{
|
|
817
|
+
className: cn(
|
|
818
|
+
"flex items-center gap-3 sm:gap-4",
|
|
819
|
+
"rounded-xl border",
|
|
820
|
+
"p-3 sm:p-4",
|
|
821
|
+
"transition-colors cursor-pointer",
|
|
822
|
+
isBest ? "border-agg-primary bg-agg-primary/5 hover:bg-agg-primary/10" : "border-agg-separator hover:bg-agg-secondary-hover"
|
|
823
|
+
),
|
|
824
|
+
role: "button",
|
|
825
|
+
tabIndex: 0,
|
|
826
|
+
onClick: onSelect,
|
|
827
|
+
onKeyDown: (e) => {
|
|
828
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
829
|
+
e.preventDefault();
|
|
830
|
+
onSelect();
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
children: [
|
|
834
|
+
/* @__PURE__ */ jsx8(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
className: cn(
|
|
838
|
+
"shrink-0 flex items-center justify-center h-10 w-10 rounded-lg",
|
|
839
|
+
isBest ? "bg-agg-primary/10" : "bg-agg-secondary-hover"
|
|
840
|
+
),
|
|
841
|
+
children: /* @__PURE__ */ jsx8(
|
|
842
|
+
"span",
|
|
843
|
+
{
|
|
844
|
+
className: cn(
|
|
845
|
+
"text-agg-lg font-agg-bold",
|
|
846
|
+
isBest ? "text-agg-primary" : "text-agg-muted-foreground"
|
|
847
|
+
),
|
|
848
|
+
children: rank
|
|
849
|
+
}
|
|
850
|
+
)
|
|
851
|
+
}
|
|
852
|
+
),
|
|
853
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex-1 min-w-0", children: [
|
|
854
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
|
|
855
|
+
/* @__PURE__ */ jsx8("p", { className: "agg-type-body-strong text-agg-foreground", children: quote.serviceProvider }),
|
|
856
|
+
isBest ? /* @__PURE__ */ jsx8(
|
|
857
|
+
Badge,
|
|
858
|
+
{
|
|
859
|
+
text: "Best",
|
|
860
|
+
size: "small",
|
|
861
|
+
classNames: { root: "bg-agg-primary! text-white! border-agg-primary!" }
|
|
862
|
+
}
|
|
863
|
+
) : null,
|
|
864
|
+
quote.lowKyc ? /* @__PURE__ */ jsx8(Badge, { text: "Low KYC", size: "small" }) : null
|
|
865
|
+
] }),
|
|
866
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
867
|
+
/* @__PURE__ */ jsxs8("p", { className: "agg-type-label text-agg-muted-foreground", children: [
|
|
868
|
+
quote.destinationAmount.toFixed(6),
|
|
869
|
+
" ",
|
|
870
|
+
quote.destinationCurrencyCode.split("_")[0]
|
|
871
|
+
] }),
|
|
872
|
+
/* @__PURE__ */ jsx8("span", { className: "text-agg-muted-foreground", children: "\xB7" }),
|
|
873
|
+
/* @__PURE__ */ jsxs8("p", { className: "agg-type-label text-agg-muted-foreground", children: [
|
|
874
|
+
"Fee ",
|
|
875
|
+
(_a = FIAT_SYMBOLS[quote.sourceCurrencyCode]) != null ? _a : "",
|
|
876
|
+
quote.totalFee.toFixed(2)
|
|
877
|
+
] })
|
|
878
|
+
] })
|
|
879
|
+
] }),
|
|
880
|
+
/* @__PURE__ */ jsx8("div", { className: "shrink-0", children: /* @__PURE__ */ jsx8(
|
|
881
|
+
Button,
|
|
882
|
+
{
|
|
883
|
+
variant: "secondary",
|
|
884
|
+
size: "small",
|
|
885
|
+
suffix: /* @__PURE__ */ jsx8(ChevronRightIcon, {}),
|
|
886
|
+
onClick: (e) => {
|
|
887
|
+
e.stopPropagation();
|
|
888
|
+
onSelect();
|
|
889
|
+
},
|
|
890
|
+
children: "Select"
|
|
891
|
+
}
|
|
892
|
+
) })
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
);
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
// src/onramp/steps/quote-selection.tsx
|
|
899
|
+
import { Fragment as Fragment7, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
900
|
+
var BACK_BUTTON_CLASS = "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80";
|
|
901
|
+
var BackButton = ({ onClick }) => /* @__PURE__ */ jsx9("button", { type: "button", className: BACK_BUTTON_CLASS, onClick, "aria-label": "Go back", children: /* @__PURE__ */ jsx9(ChevronLeftIcon, { className: "h-6 w-6" }) });
|
|
902
|
+
var QuoteSelectionStep = ({
|
|
903
|
+
quotes,
|
|
904
|
+
isLoading,
|
|
905
|
+
error,
|
|
906
|
+
fiatCurrency,
|
|
907
|
+
cryptoCurrency,
|
|
908
|
+
amount,
|
|
909
|
+
onBack,
|
|
910
|
+
onSelectQuote,
|
|
911
|
+
onRetry
|
|
912
|
+
}) => {
|
|
913
|
+
var _a;
|
|
914
|
+
const subtitle = `${cryptoCurrency.split("_")[0]} \xB7 ${(_a = FIAT_SYMBOLS[fiatCurrency]) != null ? _a : ""}${amount.toLocaleString()} ${fiatCurrency}`;
|
|
915
|
+
return /* @__PURE__ */ jsxs9(Fragment7, { children: [
|
|
916
|
+
/* @__PURE__ */ jsx9(
|
|
917
|
+
Modal.Header,
|
|
918
|
+
{
|
|
919
|
+
title: "Select Provider",
|
|
920
|
+
subtitle,
|
|
921
|
+
hideBorder: true,
|
|
922
|
+
leftElement: /* @__PURE__ */ jsx9(BackButton, { onClick: onBack })
|
|
923
|
+
}
|
|
924
|
+
),
|
|
925
|
+
/* @__PURE__ */ jsxs9(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: [
|
|
926
|
+
isLoading ? /* @__PURE__ */ jsx9("div", { className: "flex min-h-[240px] items-center justify-center", children: /* @__PURE__ */ jsx9(LoadingIcon, { size: "large" }) }) : null,
|
|
927
|
+
!isLoading && error ? /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-4", children: [
|
|
928
|
+
/* @__PURE__ */ jsx9(InlineAlert, { tone: "error", message: error }),
|
|
929
|
+
/* @__PURE__ */ jsx9(Button, { variant: "secondary", size: "medium", className: "w-full", onClick: onRetry, children: "Retry" })
|
|
930
|
+
] }) : null,
|
|
931
|
+
!isLoading && !error && quotes.length === 0 ? /* @__PURE__ */ jsx9(
|
|
932
|
+
StateMessage,
|
|
933
|
+
{
|
|
934
|
+
tone: "empty",
|
|
935
|
+
title: "No quotes available",
|
|
936
|
+
description: "No providers returned quotes for this pair. Try a different amount or cryptocurrency.",
|
|
937
|
+
actionLabel: "Go back",
|
|
938
|
+
onAction: onBack
|
|
939
|
+
}
|
|
940
|
+
) : null,
|
|
941
|
+
!isLoading && quotes.length > 0 ? /* @__PURE__ */ jsx9("div", { className: "flex flex-col gap-3", children: quotes.map((quote, i) => /* @__PURE__ */ jsx9(
|
|
942
|
+
QuoteCard,
|
|
943
|
+
{
|
|
944
|
+
quote,
|
|
945
|
+
rank: i + 1,
|
|
946
|
+
onSelect: () => onSelectQuote(quote)
|
|
947
|
+
},
|
|
948
|
+
`${quote.serviceProvider}-${quote.paymentMethodType}`
|
|
949
|
+
)) }) : null
|
|
950
|
+
] })
|
|
951
|
+
] });
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
// src/onramp/steps/widget.tsx
|
|
955
|
+
import { useRef } from "react";
|
|
956
|
+
import { Fragment as Fragment8, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
957
|
+
var BACK_BUTTON_CLASS2 = "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80";
|
|
958
|
+
var BackButton2 = ({ onClick }) => /* @__PURE__ */ jsx10("button", { type: "button", className: BACK_BUTTON_CLASS2, onClick, "aria-label": "Go back", children: /* @__PURE__ */ jsx10(ChevronLeftIcon, { className: "h-6 w-6" }) });
|
|
959
|
+
var WidgetStep = ({ widgetUrl, isLoading, onBack }) => {
|
|
960
|
+
const iframeRef = useRef(null);
|
|
961
|
+
return /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
962
|
+
/* @__PURE__ */ jsx10(
|
|
963
|
+
Modal.Header,
|
|
964
|
+
{
|
|
965
|
+
title: "Complete Purchase",
|
|
966
|
+
hideBorder: true,
|
|
967
|
+
leftElement: /* @__PURE__ */ jsx10(BackButton2, { onClick: onBack })
|
|
968
|
+
}
|
|
969
|
+
),
|
|
970
|
+
/* @__PURE__ */ jsxs10(Modal.Body, { classNames: { root: "p-0! sm:p-0! overflow-hidden" }, children: [
|
|
971
|
+
isLoading ? /* @__PURE__ */ jsx10("div", { className: "flex min-h-[400px] items-center justify-center", children: /* @__PURE__ */ jsx10(LoadingIcon, { size: "large" }) }) : null,
|
|
972
|
+
widgetUrl ? /* @__PURE__ */ jsx10(
|
|
973
|
+
"iframe",
|
|
974
|
+
{
|
|
975
|
+
ref: iframeRef,
|
|
976
|
+
src: widgetUrl,
|
|
977
|
+
title: "Meld payment widget",
|
|
978
|
+
className: "h-[700px] w-full border-0 block",
|
|
979
|
+
allow: "camera; microphone; payment; encrypted-media"
|
|
980
|
+
}
|
|
981
|
+
) : null
|
|
982
|
+
] })
|
|
983
|
+
] });
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
// src/onramp/index.tsx
|
|
987
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
988
|
+
var OnrampModal = ({
|
|
989
|
+
open,
|
|
990
|
+
onOpenChange,
|
|
991
|
+
transactionType,
|
|
992
|
+
walletAddress: initialWalletAddress = "",
|
|
993
|
+
defaultFiatCurrency = "USD",
|
|
994
|
+
defaultCryptoCurrency = "USDC",
|
|
995
|
+
onGetQuotes,
|
|
996
|
+
onSelectQuote
|
|
997
|
+
}) => {
|
|
998
|
+
const [step, setStep] = useState4("form");
|
|
999
|
+
const [formValues, setFormValues] = useState4({
|
|
1000
|
+
amount: "",
|
|
1001
|
+
fiatCurrency: defaultFiatCurrency,
|
|
1002
|
+
cryptoCurrency: defaultCryptoCurrency,
|
|
1003
|
+
walletAddress: initialWalletAddress
|
|
1004
|
+
});
|
|
1005
|
+
const [quotes, setQuotes] = useState4([]);
|
|
1006
|
+
const [isLoadingQuotes, setIsLoadingQuotes] = useState4(false);
|
|
1007
|
+
const [quoteError, setQuoteError] = useState4(null);
|
|
1008
|
+
const [widgetUrl, setWidgetUrl] = useState4(null);
|
|
1009
|
+
const [isCreatingSession, setIsCreatingSession] = useState4(false);
|
|
1010
|
+
const handleOpenChange = useCallback4(
|
|
1011
|
+
(isOpen) => {
|
|
1012
|
+
if (!isOpen) {
|
|
1013
|
+
setStep("form");
|
|
1014
|
+
setQuotes([]);
|
|
1015
|
+
setQuoteError(null);
|
|
1016
|
+
setWidgetUrl(null);
|
|
1017
|
+
}
|
|
1018
|
+
onOpenChange(isOpen);
|
|
1019
|
+
},
|
|
1020
|
+
[onOpenChange]
|
|
1021
|
+
);
|
|
1022
|
+
const handleGetQuotes = useCallback4(() => __async(void 0, null, function* () {
|
|
1023
|
+
const numericAmount2 = Number(formValues.amount);
|
|
1024
|
+
if (!numericAmount2 || numericAmount2 <= 0)
|
|
1025
|
+
return;
|
|
1026
|
+
setStep("quotes");
|
|
1027
|
+
setIsLoadingQuotes(true);
|
|
1028
|
+
setQuoteError(null);
|
|
1029
|
+
try {
|
|
1030
|
+
const result = yield onGetQuotes({
|
|
1031
|
+
transactionType,
|
|
1032
|
+
sourceAmount: numericAmount2,
|
|
1033
|
+
sourceCurrencyCode: formValues.fiatCurrency,
|
|
1034
|
+
destinationCurrencyCode: formValues.cryptoCurrency,
|
|
1035
|
+
countryCode: "US"
|
|
1036
|
+
});
|
|
1037
|
+
setQuotes(result);
|
|
1038
|
+
} catch (err) {
|
|
1039
|
+
setQuoteError(err instanceof Error ? err.message : "Failed to fetch quotes");
|
|
1040
|
+
} finally {
|
|
1041
|
+
setIsLoadingQuotes(false);
|
|
1042
|
+
}
|
|
1043
|
+
}), [formValues, transactionType, onGetQuotes]);
|
|
1044
|
+
const handleSelectQuote = useCallback4(
|
|
1045
|
+
(quote) => __async(void 0, null, function* () {
|
|
1046
|
+
setStep("widget");
|
|
1047
|
+
setIsCreatingSession(true);
|
|
1048
|
+
try {
|
|
1049
|
+
const session = yield onSelectQuote({
|
|
1050
|
+
transactionType,
|
|
1051
|
+
serviceProvider: quote.serviceProvider,
|
|
1052
|
+
sourceAmount: quote.sourceAmount,
|
|
1053
|
+
sourceCurrencyCode: quote.sourceCurrencyCode,
|
|
1054
|
+
destinationCurrencyCode: quote.destinationCurrencyCode,
|
|
1055
|
+
countryCode: quote.countryCode,
|
|
1056
|
+
walletAddress: formValues.walletAddress
|
|
1057
|
+
});
|
|
1058
|
+
setWidgetUrl(session.serviceProviderWidgetUrl);
|
|
1059
|
+
} catch (e) {
|
|
1060
|
+
setStep("quotes");
|
|
1061
|
+
} finally {
|
|
1062
|
+
setIsCreatingSession(false);
|
|
1063
|
+
}
|
|
1064
|
+
}),
|
|
1065
|
+
[transactionType, formValues.walletAddress, onSelectQuote]
|
|
1066
|
+
);
|
|
1067
|
+
const numericAmount = Number(formValues.amount) || 0;
|
|
1068
|
+
return /* @__PURE__ */ jsx11(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs11(
|
|
1069
|
+
Modal.Container,
|
|
1070
|
+
{
|
|
1071
|
+
maxWidth: "520px",
|
|
1072
|
+
"aria-label": transactionType === "BUY" ? "Buy Crypto" : "Sell Crypto",
|
|
1073
|
+
children: [
|
|
1074
|
+
step === "form" ? /* @__PURE__ */ jsx11(
|
|
1075
|
+
QuoteFormStep,
|
|
1076
|
+
{
|
|
1077
|
+
title: transactionType === "BUY" ? "Buy Crypto" : "Sell Crypto",
|
|
1078
|
+
values: formValues,
|
|
1079
|
+
onAmountChange: (amount) => setFormValues((prev) => __spreadProps(__spreadValues({}, prev), { amount })),
|
|
1080
|
+
onFiatChange: (fiatCurrency) => setFormValues((prev) => __spreadProps(__spreadValues({}, prev), { fiatCurrency })),
|
|
1081
|
+
onCryptoChange: (cryptoCurrency) => setFormValues((prev) => __spreadProps(__spreadValues({}, prev), { cryptoCurrency })),
|
|
1082
|
+
onWalletAddressChange: (walletAddress) => setFormValues((prev) => __spreadProps(__spreadValues({}, prev), { walletAddress })),
|
|
1083
|
+
onSubmit: handleGetQuotes
|
|
1084
|
+
}
|
|
1085
|
+
) : null,
|
|
1086
|
+
step === "quotes" ? /* @__PURE__ */ jsx11(
|
|
1087
|
+
QuoteSelectionStep,
|
|
1088
|
+
{
|
|
1089
|
+
quotes,
|
|
1090
|
+
isLoading: isLoadingQuotes,
|
|
1091
|
+
error: quoteError,
|
|
1092
|
+
fiatCurrency: formValues.fiatCurrency,
|
|
1093
|
+
cryptoCurrency: formValues.cryptoCurrency,
|
|
1094
|
+
amount: numericAmount,
|
|
1095
|
+
onBack: () => setStep("form"),
|
|
1096
|
+
onSelectQuote: handleSelectQuote,
|
|
1097
|
+
onRetry: handleGetQuotes
|
|
1098
|
+
}
|
|
1099
|
+
) : null,
|
|
1100
|
+
step === "widget" ? /* @__PURE__ */ jsx11(
|
|
1101
|
+
WidgetStep,
|
|
1102
|
+
{
|
|
1103
|
+
widgetUrl,
|
|
1104
|
+
isLoading: isCreatingSession,
|
|
1105
|
+
onBack: () => {
|
|
1106
|
+
setWidgetUrl(null);
|
|
1107
|
+
setStep("quotes");
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
) : null
|
|
1111
|
+
]
|
|
1112
|
+
}
|
|
1113
|
+
) });
|
|
1114
|
+
};
|
|
1115
|
+
OnrampModal.displayName = "OnrampModal";
|
|
1116
|
+
|
|
671
1117
|
// src/withdraw/index.tsx
|
|
672
|
-
import { useState as
|
|
1118
|
+
import { useState as useState6 } from "react";
|
|
673
1119
|
|
|
674
1120
|
// src/withdraw/withdraw-modal.constants.ts
|
|
675
1121
|
var KALSHI_VENUE2 = "kalshi";
|
|
676
1122
|
var KALSHI_WITHDRAW_URL_DEFAULT = "https://kalshi.com/account/withdraw";
|
|
677
1123
|
|
|
678
1124
|
// src/withdraw/steps/venue-selection.tsx
|
|
679
|
-
import { Fragment as
|
|
1125
|
+
import { Fragment as Fragment9, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
680
1126
|
var VenueRow2 = ({ venue, onSelect }) => {
|
|
681
1127
|
var _a, _b;
|
|
682
1128
|
const displayName = (_a = venueLogoLabels[venue.venue]) != null ? _a : venue.venue;
|
|
683
1129
|
const isDisabled = venue.disabled === true;
|
|
684
|
-
return /* @__PURE__ */
|
|
1130
|
+
return /* @__PURE__ */ jsxs12(
|
|
685
1131
|
"div",
|
|
686
1132
|
{
|
|
687
1133
|
className: cn(
|
|
@@ -694,7 +1140,9 @@ var VenueRow2 = ({ venue, onSelect }) => {
|
|
|
694
1140
|
role: "button",
|
|
695
1141
|
tabIndex: isDisabled ? -1 : 0,
|
|
696
1142
|
"aria-disabled": isDisabled,
|
|
697
|
-
onClick: () => {
|
|
1143
|
+
onClick: (e) => {
|
|
1144
|
+
e.stopPropagation();
|
|
1145
|
+
e.preventDefault();
|
|
698
1146
|
if (!isDisabled)
|
|
699
1147
|
onSelect(venue.venue);
|
|
700
1148
|
},
|
|
@@ -705,20 +1153,20 @@ var VenueRow2 = ({ venue, onSelect }) => {
|
|
|
705
1153
|
}
|
|
706
1154
|
},
|
|
707
1155
|
children: [
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ jsx12("div", { className: "shrink-0", children: /* @__PURE__ */ jsx12(VenueLogo, { venue: venue.venue, size: "large", className: "rounded-lg" }) }),
|
|
1157
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex-1 min-w-0", children: [
|
|
1158
|
+
/* @__PURE__ */ jsx12("p", { className: "agg-type-body-strong text-agg-foreground", children: displayName }),
|
|
1159
|
+
/* @__PURE__ */ jsxs12("p", { className: "agg-type-label text-agg-muted-foreground", children: [
|
|
712
1160
|
"Balance ",
|
|
713
1161
|
formatCompactUsd(venue.balance)
|
|
714
1162
|
] })
|
|
715
1163
|
] }),
|
|
716
|
-
isDisabled ? /* @__PURE__ */
|
|
1164
|
+
isDisabled ? /* @__PURE__ */ jsx12("div", { className: "shrink-0", children: /* @__PURE__ */ jsx12("span", { className: "agg-type-label text-agg-muted-foreground", children: (_b = venue.disabledReason) != null ? _b : "Unavailable" }) }) : /* @__PURE__ */ jsx12("div", { className: "shrink-0", children: /* @__PURE__ */ jsx12(
|
|
717
1165
|
Button,
|
|
718
1166
|
{
|
|
719
1167
|
variant: "secondary",
|
|
720
1168
|
size: "small",
|
|
721
|
-
suffix: /* @__PURE__ */
|
|
1169
|
+
suffix: /* @__PURE__ */ jsx12(ChevronRightIcon, {}),
|
|
722
1170
|
onClick: (e) => {
|
|
723
1171
|
e.stopPropagation();
|
|
724
1172
|
onSelect(venue.venue);
|
|
@@ -733,22 +1181,22 @@ var VenueRow2 = ({ venue, onSelect }) => {
|
|
|
733
1181
|
var VenueSelectionStep2 = ({
|
|
734
1182
|
venues,
|
|
735
1183
|
onSelectVenue
|
|
736
|
-
}) => /* @__PURE__ */
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
/* @__PURE__ */
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
/* @__PURE__ */
|
|
1184
|
+
}) => /* @__PURE__ */ jsxs12(Fragment9, { children: [
|
|
1185
|
+
/* @__PURE__ */ jsx12(Modal.Header, { title: "Withdraw", hideBorder: true }),
|
|
1186
|
+
/* @__PURE__ */ jsx12(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-4", children: [
|
|
1187
|
+
/* @__PURE__ */ jsx12("p", { className: "agg-type-body text-agg-foreground", children: "Choose where to withdraw funds from:" }),
|
|
1188
|
+
/* @__PURE__ */ jsx12("div", { className: "flex flex-col gap-3", children: venues.map((venue) => /* @__PURE__ */ jsx12(VenueRow2, { venue, onSelect: onSelectVenue }, venue.venue)) })
|
|
741
1189
|
] }) })
|
|
742
1190
|
] });
|
|
743
1191
|
|
|
744
1192
|
// src/withdraw/steps/withdraw-method.tsx
|
|
745
|
-
import { Fragment as
|
|
1193
|
+
import { Fragment as Fragment10, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
746
1194
|
var WithdrawMethodCard = ({
|
|
747
1195
|
icon,
|
|
748
1196
|
title,
|
|
749
1197
|
description,
|
|
750
1198
|
onContinue
|
|
751
|
-
}) => /* @__PURE__ */
|
|
1199
|
+
}) => /* @__PURE__ */ jsxs13(
|
|
752
1200
|
"div",
|
|
753
1201
|
{
|
|
754
1202
|
className: cn(
|
|
@@ -767,17 +1215,17 @@ var WithdrawMethodCard = ({
|
|
|
767
1215
|
}
|
|
768
1216
|
},
|
|
769
1217
|
children: [
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
773
|
-
/* @__PURE__ */
|
|
1218
|
+
/* @__PURE__ */ jsx13("div", { className: "shrink-0 flex items-center justify-center h-10 w-10 rounded-lg bg-agg-secondary-hover", children: icon }),
|
|
1219
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex-1 min-w-0", children: [
|
|
1220
|
+
/* @__PURE__ */ jsx13("p", { className: "agg-type-body-strong text-agg-foreground", children: title }),
|
|
1221
|
+
/* @__PURE__ */ jsx13("p", { className: "agg-type-label text-agg-muted-foreground", children: description })
|
|
774
1222
|
] }),
|
|
775
|
-
/* @__PURE__ */
|
|
1223
|
+
/* @__PURE__ */ jsx13("div", { className: "shrink-0", children: /* @__PURE__ */ jsx13(
|
|
776
1224
|
Button,
|
|
777
1225
|
{
|
|
778
1226
|
variant: "secondary",
|
|
779
1227
|
size: "small",
|
|
780
|
-
suffix: /* @__PURE__ */
|
|
1228
|
+
suffix: /* @__PURE__ */ jsx13(ChevronRightIcon, {}),
|
|
781
1229
|
onClick: (e) => {
|
|
782
1230
|
e.stopPropagation();
|
|
783
1231
|
onContinue();
|
|
@@ -795,47 +1243,47 @@ var WithdrawMethodStep = ({
|
|
|
795
1243
|
}) => {
|
|
796
1244
|
var _a;
|
|
797
1245
|
const displayName = (_a = venueLogoLabels[venue.venue]) != null ? _a : venue.venue;
|
|
798
|
-
return /* @__PURE__ */
|
|
799
|
-
/* @__PURE__ */
|
|
1246
|
+
return /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
1247
|
+
/* @__PURE__ */ jsx13(
|
|
800
1248
|
Modal.Header,
|
|
801
1249
|
{
|
|
802
1250
|
title: `Withdraw from ${displayName}`,
|
|
803
1251
|
hideBorder: true,
|
|
804
|
-
leftElement: /* @__PURE__ */
|
|
1252
|
+
leftElement: /* @__PURE__ */ jsx13(
|
|
805
1253
|
"button",
|
|
806
1254
|
{
|
|
807
1255
|
type: "button",
|
|
808
1256
|
className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
|
|
809
1257
|
onClick: onBack,
|
|
810
1258
|
"aria-label": "Go back",
|
|
811
|
-
children: /* @__PURE__ */
|
|
1259
|
+
children: /* @__PURE__ */ jsx13(ChevronLeftIcon, { className: "h-6 w-6" })
|
|
812
1260
|
}
|
|
813
1261
|
)
|
|
814
1262
|
}
|
|
815
1263
|
),
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
/* @__PURE__ */
|
|
1264
|
+
/* @__PURE__ */ jsx13(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-4", children: [
|
|
1265
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
|
|
1266
|
+
/* @__PURE__ */ jsx13(VenueLogo, { venue: venue.venue, size: "small", className: "rounded-sm" }),
|
|
1267
|
+
/* @__PURE__ */ jsxs13("p", { className: "agg-type-label text-agg-muted-foreground", children: [
|
|
820
1268
|
displayName,
|
|
821
1269
|
" balance: ",
|
|
822
1270
|
formatCompactUsd(venue.balance)
|
|
823
1271
|
] })
|
|
824
1272
|
] }),
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
/* @__PURE__ */
|
|
1273
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-3", children: [
|
|
1274
|
+
/* @__PURE__ */ jsx13(
|
|
827
1275
|
WithdrawMethodCard,
|
|
828
1276
|
{
|
|
829
|
-
icon: /* @__PURE__ */
|
|
1277
|
+
icon: /* @__PURE__ */ jsx13(WalletIcon, { className: "h-6 w-6 text-agg-foreground" }),
|
|
830
1278
|
title: "Withdraw to Wallet",
|
|
831
1279
|
description: "Send funds to your crypto wallet as USDC.",
|
|
832
1280
|
onContinue: () => onSelectMethod("wallet")
|
|
833
1281
|
}
|
|
834
1282
|
),
|
|
835
|
-
/* @__PURE__ */
|
|
1283
|
+
/* @__PURE__ */ jsx13(
|
|
836
1284
|
WithdrawMethodCard,
|
|
837
1285
|
{
|
|
838
|
-
icon: /* @__PURE__ */
|
|
1286
|
+
icon: /* @__PURE__ */ jsx13(BankIcon, { className: "h-6 w-6 text-agg-foreground" }),
|
|
839
1287
|
title: "Withdraw to Bank",
|
|
840
1288
|
description: "Transfer funds to your linked bank account.",
|
|
841
1289
|
onContinue: () => onSelectMethod("bank")
|
|
@@ -847,8 +1295,8 @@ var WithdrawMethodStep = ({
|
|
|
847
1295
|
};
|
|
848
1296
|
|
|
849
1297
|
// src/withdraw/steps/withdraw-amount.tsx
|
|
850
|
-
import { useCallback as
|
|
851
|
-
import { Fragment as
|
|
1298
|
+
import { useCallback as useCallback5, useState as useState5 } from "react";
|
|
1299
|
+
import { Fragment as Fragment11, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
852
1300
|
var WithdrawAmountStep = ({
|
|
853
1301
|
venue,
|
|
854
1302
|
method,
|
|
@@ -856,50 +1304,50 @@ var WithdrawAmountStep = ({
|
|
|
856
1304
|
onContinue
|
|
857
1305
|
}) => {
|
|
858
1306
|
var _a;
|
|
859
|
-
const [rawAmount, setRawAmount] =
|
|
1307
|
+
const [rawAmount, setRawAmount] = useState5("");
|
|
860
1308
|
const displayName = (_a = venueLogoLabels[venue.venue]) != null ? _a : venue.venue;
|
|
861
1309
|
const numericAmount = Number(rawAmount) || 0;
|
|
862
1310
|
const isValid = numericAmount > 0 && numericAmount <= venue.balance;
|
|
863
1311
|
const exceedsBalance = numericAmount > venue.balance;
|
|
864
1312
|
const methodLabel = method === "wallet" ? "Wallet" : "Bank";
|
|
865
|
-
const handleAmountChange =
|
|
1313
|
+
const handleAmountChange = useCallback5((e) => {
|
|
866
1314
|
const v = e.target.value.replace(/[^0-9.]/g, "");
|
|
867
1315
|
const parts = v.split(".");
|
|
868
1316
|
const sanitized = parts.length > 2 ? `${parts[0]}.${parts.slice(1).join("")}` : v;
|
|
869
1317
|
setRawAmount(sanitized);
|
|
870
1318
|
}, []);
|
|
871
|
-
const handleMax =
|
|
1319
|
+
const handleMax = useCallback5(() => {
|
|
872
1320
|
setRawAmount(venue.balance.toString());
|
|
873
1321
|
}, [venue.balance]);
|
|
874
|
-
return /* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
1322
|
+
return /* @__PURE__ */ jsxs14(Fragment11, { children: [
|
|
1323
|
+
/* @__PURE__ */ jsx14(
|
|
876
1324
|
Modal.Header,
|
|
877
1325
|
{
|
|
878
1326
|
title: `Withdraw to ${methodLabel}`,
|
|
879
1327
|
hideBorder: true,
|
|
880
|
-
leftElement: /* @__PURE__ */
|
|
1328
|
+
leftElement: /* @__PURE__ */ jsx14(
|
|
881
1329
|
"button",
|
|
882
1330
|
{
|
|
883
1331
|
type: "button",
|
|
884
1332
|
className: "mr-2 flex items-center justify-center text-agg-foreground transition-colors hover:cursor-pointer hover:text-agg-foreground/80",
|
|
885
1333
|
onClick: onBack,
|
|
886
1334
|
"aria-label": "Go back",
|
|
887
|
-
children: /* @__PURE__ */
|
|
1335
|
+
children: /* @__PURE__ */ jsx14(ChevronLeftIcon, { className: "h-6 w-6" })
|
|
888
1336
|
}
|
|
889
1337
|
)
|
|
890
1338
|
}
|
|
891
1339
|
),
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
/* @__PURE__ */
|
|
894
|
-
/* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
/* @__PURE__ */
|
|
1340
|
+
/* @__PURE__ */ jsx14(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-6", children: [
|
|
1341
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between", children: [
|
|
1342
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
|
|
1343
|
+
/* @__PURE__ */ jsx14(VenueLogo, { venue: venue.venue, size: "small", className: "rounded-sm" }),
|
|
1344
|
+
/* @__PURE__ */ jsxs14("p", { className: "agg-type-label text-agg-muted-foreground", children: [
|
|
897
1345
|
displayName,
|
|
898
1346
|
" balance: ",
|
|
899
1347
|
formatCompactUsd(venue.balance)
|
|
900
1348
|
] })
|
|
901
1349
|
] }),
|
|
902
|
-
/* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ jsx14(
|
|
903
1351
|
"button",
|
|
904
1352
|
{
|
|
905
1353
|
type: "button",
|
|
@@ -909,10 +1357,10 @@ var WithdrawAmountStep = ({
|
|
|
909
1357
|
}
|
|
910
1358
|
)
|
|
911
1359
|
] }),
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex-1 min-w-0", children: [
|
|
1361
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-baseline", children: [
|
|
1362
|
+
/* @__PURE__ */ jsx14("span", { className: "agg-type-display text-agg-foreground", children: "$" }),
|
|
1363
|
+
/* @__PURE__ */ jsx14(
|
|
916
1364
|
"input",
|
|
917
1365
|
{
|
|
918
1366
|
type: "text",
|
|
@@ -928,9 +1376,9 @@ var WithdrawAmountStep = ({
|
|
|
928
1376
|
}
|
|
929
1377
|
)
|
|
930
1378
|
] }),
|
|
931
|
-
exceedsBalance ? /* @__PURE__ */
|
|
1379
|
+
exceedsBalance ? /* @__PURE__ */ jsx14("p", { className: "agg-type-label mt-2 text-agg-error", children: "Amount exceeds available balance" }) : null
|
|
932
1380
|
] }),
|
|
933
|
-
/* @__PURE__ */
|
|
1381
|
+
/* @__PURE__ */ jsx14(
|
|
934
1382
|
Button,
|
|
935
1383
|
{
|
|
936
1384
|
variant: "primary",
|
|
@@ -946,30 +1394,30 @@ var WithdrawAmountStep = ({
|
|
|
946
1394
|
};
|
|
947
1395
|
|
|
948
1396
|
// src/withdraw/steps/kalshi-withdraw.tsx
|
|
949
|
-
import { Fragment as
|
|
1397
|
+
import { Fragment as Fragment12, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
950
1398
|
var KalshiStepCard2 = ({
|
|
951
1399
|
step,
|
|
952
1400
|
title,
|
|
953
1401
|
description,
|
|
954
1402
|
children
|
|
955
|
-
}) => /* @__PURE__ */
|
|
956
|
-
/* @__PURE__ */
|
|
1403
|
+
}) => /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-2 rounded-xl bg-agg-secondary-hover p-4", children: [
|
|
1404
|
+
/* @__PURE__ */ jsxs15("p", { className: "agg-type-caption-caps text-agg-muted-foreground", children: [
|
|
957
1405
|
"Step ",
|
|
958
1406
|
step
|
|
959
1407
|
] }),
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-1", children: [
|
|
1409
|
+
/* @__PURE__ */ jsx15("p", { className: "agg-type-label-strong text-agg-foreground", children: title }),
|
|
1410
|
+
/* @__PURE__ */ jsx15("p", { className: "agg-type-label text-agg-foreground", children: description })
|
|
963
1411
|
] }),
|
|
964
1412
|
children
|
|
965
1413
|
] });
|
|
966
1414
|
var KalshiWithdrawStep = ({
|
|
967
1415
|
withdrawUrl,
|
|
968
1416
|
onDone
|
|
969
|
-
}) => /* @__PURE__ */
|
|
970
|
-
/* @__PURE__ */
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
1417
|
+
}) => /* @__PURE__ */ jsxs15(Fragment12, { children: [
|
|
1418
|
+
/* @__PURE__ */ jsx15(Modal.Header, { title: "", hideBorder: true }),
|
|
1419
|
+
/* @__PURE__ */ jsx15(Modal.Body, { classNames: { root: "px-5 pt-0 pb-6 sm:px-8 sm:pt-0 sm:pb-8" }, children: /* @__PURE__ */ jsxs15("div", { className: "flex flex-col items-center gap-8", children: [
|
|
1420
|
+
/* @__PURE__ */ jsx15(
|
|
973
1421
|
VenueLogo,
|
|
974
1422
|
{
|
|
975
1423
|
venue: "kalshi",
|
|
@@ -977,23 +1425,23 @@ var KalshiWithdrawStep = ({
|
|
|
977
1425
|
className: "h-[60px] w-[60px] rounded-lg"
|
|
978
1426
|
}
|
|
979
1427
|
),
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-col items-center gap-4 text-center", children: [
|
|
1429
|
+
/* @__PURE__ */ jsx15("h2", { className: "agg-type-heading text-agg-foreground", children: "Withdraw from Kalshi" }),
|
|
1430
|
+
/* @__PURE__ */ jsx15("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." })
|
|
983
1431
|
] }),
|
|
984
|
-
/* @__PURE__ */
|
|
985
|
-
/* @__PURE__ */
|
|
1432
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex w-full flex-col gap-4", children: [
|
|
1433
|
+
/* @__PURE__ */ jsx15(
|
|
986
1434
|
KalshiStepCard2,
|
|
987
1435
|
{
|
|
988
1436
|
step: 1,
|
|
989
1437
|
title: "Open Kalshi Withdraw Page",
|
|
990
1438
|
description: "Sign in to your Kalshi account and go to Withdraw from your account menu.",
|
|
991
|
-
children: /* @__PURE__ */
|
|
1439
|
+
children: /* @__PURE__ */ jsx15("div", { className: "mt-1", children: /* @__PURE__ */ jsx15(
|
|
992
1440
|
Button,
|
|
993
1441
|
{
|
|
994
1442
|
variant: "secondary",
|
|
995
1443
|
size: "small",
|
|
996
|
-
suffix: /* @__PURE__ */
|
|
1444
|
+
suffix: /* @__PURE__ */ jsx15(ExternalLinkIcon, { className: "h-3.5 w-3.5" }),
|
|
997
1445
|
onClick: () => {
|
|
998
1446
|
window.open(withdrawUrl, "_blank", "noopener,noreferrer");
|
|
999
1447
|
},
|
|
@@ -1002,7 +1450,7 @@ var KalshiWithdrawStep = ({
|
|
|
1002
1450
|
) })
|
|
1003
1451
|
}
|
|
1004
1452
|
),
|
|
1005
|
-
/* @__PURE__ */
|
|
1453
|
+
/* @__PURE__ */ jsx15(
|
|
1006
1454
|
KalshiStepCard2,
|
|
1007
1455
|
{
|
|
1008
1456
|
step: 2,
|
|
@@ -1010,7 +1458,7 @@ var KalshiWithdrawStep = ({
|
|
|
1010
1458
|
description: "Select a withdrawal method: Bank transfer (ACH), Wire, or USDC (crypto)."
|
|
1011
1459
|
}
|
|
1012
1460
|
),
|
|
1013
|
-
/* @__PURE__ */
|
|
1461
|
+
/* @__PURE__ */ jsx15(
|
|
1014
1462
|
KalshiStepCard2,
|
|
1015
1463
|
{
|
|
1016
1464
|
step: 3,
|
|
@@ -1019,12 +1467,12 @@ var KalshiWithdrawStep = ({
|
|
|
1019
1467
|
}
|
|
1020
1468
|
)
|
|
1021
1469
|
] }),
|
|
1022
|
-
/* @__PURE__ */
|
|
1470
|
+
/* @__PURE__ */ jsx15(Button, { variant: "secondary", size: "large", onClick: onDone, children: "Done" })
|
|
1023
1471
|
] }) })
|
|
1024
1472
|
] });
|
|
1025
1473
|
|
|
1026
1474
|
// src/withdraw/index.tsx
|
|
1027
|
-
import { jsx as
|
|
1475
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1028
1476
|
var WithdrawModal = ({
|
|
1029
1477
|
open,
|
|
1030
1478
|
onOpenChange,
|
|
@@ -1036,9 +1484,9 @@ var WithdrawModal = ({
|
|
|
1036
1484
|
onDoneKalshi,
|
|
1037
1485
|
kalshiWithdrawUrl = KALSHI_WITHDRAW_URL_DEFAULT
|
|
1038
1486
|
}) => {
|
|
1039
|
-
const [step, setStep] =
|
|
1040
|
-
const [selectedVenue, setSelectedVenue] =
|
|
1041
|
-
const [selectedMethod, setSelectedMethod] =
|
|
1487
|
+
const [step, setStep] = useState6("venues");
|
|
1488
|
+
const [selectedVenue, setSelectedVenue] = useState6(null);
|
|
1489
|
+
const [selectedMethod, setSelectedMethod] = useState6(null);
|
|
1042
1490
|
const handleSelectVenue = (venueSlug) => {
|
|
1043
1491
|
onSelectVenue(venueSlug);
|
|
1044
1492
|
if (venueSlug === KALSHI_VENUE2) {
|
|
@@ -1088,9 +1536,9 @@ var WithdrawModal = ({
|
|
|
1088
1536
|
}
|
|
1089
1537
|
onOpenChange(isOpen);
|
|
1090
1538
|
};
|
|
1091
|
-
return /* @__PURE__ */
|
|
1092
|
-
step === "venues" ? /* @__PURE__ */
|
|
1093
|
-
step === "method" && selectedVenue ? /* @__PURE__ */
|
|
1539
|
+
return /* @__PURE__ */ jsx16(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs16(Modal.Container, { maxWidth: "600px", "aria-label": "Withdraw", children: [
|
|
1540
|
+
step === "venues" ? /* @__PURE__ */ jsx16(VenueSelectionStep2, { venues, onSelectVenue: handleSelectVenue }) : null,
|
|
1541
|
+
step === "method" && selectedVenue ? /* @__PURE__ */ jsx16(
|
|
1094
1542
|
WithdrawMethodStep,
|
|
1095
1543
|
{
|
|
1096
1544
|
venue: selectedVenue,
|
|
@@ -1098,7 +1546,7 @@ var WithdrawModal = ({
|
|
|
1098
1546
|
onSelectMethod: handleSelectMethod
|
|
1099
1547
|
}
|
|
1100
1548
|
) : null,
|
|
1101
|
-
step === "withdraw-amount" && selectedVenue && selectedMethod ? /* @__PURE__ */
|
|
1549
|
+
step === "withdraw-amount" && selectedVenue && selectedMethod ? /* @__PURE__ */ jsx16(
|
|
1102
1550
|
WithdrawAmountStep,
|
|
1103
1551
|
{
|
|
1104
1552
|
venue: selectedVenue,
|
|
@@ -1107,13 +1555,13 @@ var WithdrawModal = ({
|
|
|
1107
1555
|
onContinue: handleContinueWithdraw
|
|
1108
1556
|
}
|
|
1109
1557
|
) : null,
|
|
1110
|
-
step === "kalshi" ? /* @__PURE__ */
|
|
1558
|
+
step === "kalshi" ? /* @__PURE__ */ jsx16(KalshiWithdrawStep, { withdrawUrl: kalshiWithdrawUrl, onDone: handleDoneKalshi }) : null
|
|
1111
1559
|
] }) });
|
|
1112
1560
|
};
|
|
1113
1561
|
WithdrawModal.displayName = "WithdrawModal";
|
|
1114
1562
|
|
|
1115
1563
|
// src/onboarding/index.tsx
|
|
1116
|
-
import { useCallback as
|
|
1564
|
+
import { useCallback as useCallback10, useEffect, useState as useState11 } from "react";
|
|
1117
1565
|
import { useLabels as useLabels6 } from "@agg-market/hooks";
|
|
1118
1566
|
import * as Dialog3 from "@radix-ui/react-dialog";
|
|
1119
1567
|
|
|
@@ -1136,31 +1584,31 @@ var ONCHAIN_VENUES = [
|
|
|
1136
1584
|
];
|
|
1137
1585
|
|
|
1138
1586
|
// src/onboarding/steps/how-it-works.tsx
|
|
1139
|
-
import { useCallback as
|
|
1587
|
+
import { useCallback as useCallback6, useRef as useRef2, useState as useState7 } from "react";
|
|
1140
1588
|
import { useLabels } from "@agg-market/hooks";
|
|
1141
|
-
import { jsx as
|
|
1589
|
+
import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1142
1590
|
var defaultIcons = {
|
|
1143
|
-
createAccount: /* @__PURE__ */
|
|
1144
|
-
linkAccounts: /* @__PURE__ */
|
|
1145
|
-
bestPrices: /* @__PURE__ */
|
|
1146
|
-
stayInControl: /* @__PURE__ */
|
|
1591
|
+
createAccount: /* @__PURE__ */ jsx17(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
1592
|
+
linkAccounts: /* @__PURE__ */ jsx17(LinkAccountsIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
1593
|
+
bestPrices: /* @__PURE__ */ jsx17(BestPricesIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
1594
|
+
stayInControl: /* @__PURE__ */ jsx17(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
|
|
1147
1595
|
};
|
|
1148
1596
|
var HowItWorksStep = ({ onContinue, icons }) => {
|
|
1149
1597
|
const labels = useLabels();
|
|
1150
|
-
const scrollRef =
|
|
1151
|
-
const [showTopGradient, setShowTopGradient] =
|
|
1152
|
-
const [showBottomGradient, setShowBottomGradient] =
|
|
1153
|
-
const handleScroll =
|
|
1598
|
+
const scrollRef = useRef2(null);
|
|
1599
|
+
const [showTopGradient, setShowTopGradient] = useState7(false);
|
|
1600
|
+
const [showBottomGradient, setShowBottomGradient] = useState7(true);
|
|
1601
|
+
const handleScroll = useCallback6(() => {
|
|
1154
1602
|
const el = scrollRef.current;
|
|
1155
1603
|
if (!el)
|
|
1156
1604
|
return;
|
|
1157
1605
|
setShowTopGradient(el.scrollTop > 0);
|
|
1158
1606
|
setShowBottomGradient(el.scrollTop + el.clientHeight < el.scrollHeight - 1);
|
|
1159
1607
|
}, []);
|
|
1160
|
-
return /* @__PURE__ */
|
|
1161
|
-
/* @__PURE__ */
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
/* @__PURE__ */
|
|
1608
|
+
return /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-6 h-[600px] sm:h-auto", children: [
|
|
1609
|
+
/* @__PURE__ */ jsx17("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.howItWorks.title }),
|
|
1610
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative flex-1 min-h-0 sm:flex-initial", children: [
|
|
1611
|
+
/* @__PURE__ */ jsx17(
|
|
1164
1612
|
"div",
|
|
1165
1613
|
{
|
|
1166
1614
|
ref: scrollRef,
|
|
@@ -1170,7 +1618,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
1170
1618
|
var _a;
|
|
1171
1619
|
const icon = (_a = icons == null ? void 0 : icons[featureKey]) != null ? _a : defaultIcons[featureKey];
|
|
1172
1620
|
const feature = labels.onboarding.howItWorks.features[featureKey];
|
|
1173
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsxs17(
|
|
1174
1622
|
"div",
|
|
1175
1623
|
{
|
|
1176
1624
|
className: cn(
|
|
@@ -1179,11 +1627,11 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
1179
1627
|
"bg-agg-secondary-hover"
|
|
1180
1628
|
),
|
|
1181
1629
|
children: [
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1184
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex flex-col flex-1 min-w-0 gap-[6px]", children: [
|
|
1631
|
+
/* @__PURE__ */ jsx17("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: feature.title }),
|
|
1632
|
+
/* @__PURE__ */ jsx17("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: feature.description })
|
|
1185
1633
|
] }),
|
|
1186
|
-
icon ? /* @__PURE__ */
|
|
1634
|
+
icon ? /* @__PURE__ */ jsx17("div", { className: "hidden shrink-0 items-center justify-center text-agg-muted-foreground sm:flex", children: icon }) : null
|
|
1187
1635
|
]
|
|
1188
1636
|
},
|
|
1189
1637
|
featureKey
|
|
@@ -1191,7 +1639,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
1191
1639
|
})
|
|
1192
1640
|
}
|
|
1193
1641
|
),
|
|
1194
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ jsx17(
|
|
1195
1643
|
"div",
|
|
1196
1644
|
{
|
|
1197
1645
|
className: cn(
|
|
@@ -1202,7 +1650,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
1202
1650
|
)
|
|
1203
1651
|
}
|
|
1204
1652
|
),
|
|
1205
|
-
/* @__PURE__ */
|
|
1653
|
+
/* @__PURE__ */ jsx17(
|
|
1206
1654
|
"div",
|
|
1207
1655
|
{
|
|
1208
1656
|
className: cn(
|
|
@@ -1214,26 +1662,26 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
1214
1662
|
}
|
|
1215
1663
|
)
|
|
1216
1664
|
] }),
|
|
1217
|
-
/* @__PURE__ */
|
|
1665
|
+
/* @__PURE__ */ jsx17(Button, { variant: "primary", size: "large", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
|
|
1218
1666
|
] });
|
|
1219
1667
|
};
|
|
1220
1668
|
HowItWorksStep.displayName = "HowItWorksStep";
|
|
1221
1669
|
|
|
1222
1670
|
// src/onboarding/steps/profile-setup.tsx
|
|
1223
|
-
import { useCallback as
|
|
1671
|
+
import { useCallback as useCallback7, useRef as useRef3, useState as useState8 } from "react";
|
|
1224
1672
|
import { useLabels as useLabels2 } from "@agg-market/hooks";
|
|
1225
|
-
import { jsx as
|
|
1673
|
+
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1226
1674
|
var ProfileSetupStep = ({ onContinue }) => {
|
|
1227
1675
|
const labels = useLabels2();
|
|
1228
|
-
const [username, setUsername] =
|
|
1229
|
-
const [avatarFile, setAvatarFile] =
|
|
1230
|
-
const [avatarPreview, setAvatarPreview] =
|
|
1231
|
-
const fileInputRef =
|
|
1232
|
-
const handleAvatarClick =
|
|
1676
|
+
const [username, setUsername] = useState8("");
|
|
1677
|
+
const [avatarFile, setAvatarFile] = useState8();
|
|
1678
|
+
const [avatarPreview, setAvatarPreview] = useState8();
|
|
1679
|
+
const fileInputRef = useRef3(null);
|
|
1680
|
+
const handleAvatarClick = useCallback7(() => {
|
|
1233
1681
|
var _a;
|
|
1234
1682
|
(_a = fileInputRef.current) == null ? void 0 : _a.click();
|
|
1235
1683
|
}, []);
|
|
1236
|
-
const handleFileChange =
|
|
1684
|
+
const handleFileChange = useCallback7((e) => {
|
|
1237
1685
|
var _a;
|
|
1238
1686
|
const file = (_a = e.target.files) == null ? void 0 : _a[0];
|
|
1239
1687
|
if (!file)
|
|
@@ -1246,18 +1694,18 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
1246
1694
|
};
|
|
1247
1695
|
reader.readAsDataURL(file);
|
|
1248
1696
|
}, []);
|
|
1249
|
-
const handleContinue =
|
|
1697
|
+
const handleContinue = useCallback7(() => {
|
|
1250
1698
|
onContinue({
|
|
1251
1699
|
username,
|
|
1252
1700
|
avatarFile,
|
|
1253
1701
|
avatarPreview
|
|
1254
1702
|
});
|
|
1255
1703
|
}, [username, avatarFile, avatarPreview, onContinue]);
|
|
1256
|
-
return /* @__PURE__ */
|
|
1257
|
-
/* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */
|
|
1260
|
-
/* @__PURE__ */
|
|
1704
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-7", children: [
|
|
1705
|
+
/* @__PURE__ */ jsx18("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
|
|
1706
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-5 items-center w-full", children: [
|
|
1707
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex justify-center", children: [
|
|
1708
|
+
/* @__PURE__ */ jsx18(
|
|
1261
1709
|
"button",
|
|
1262
1710
|
{
|
|
1263
1711
|
type: "button",
|
|
@@ -1273,17 +1721,17 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
1273
1721
|
"overflow-hidden"
|
|
1274
1722
|
),
|
|
1275
1723
|
"aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
|
|
1276
|
-
children: avatarPreview ? /* @__PURE__ */
|
|
1724
|
+
children: avatarPreview ? /* @__PURE__ */ jsx18(
|
|
1277
1725
|
RemoteImage,
|
|
1278
1726
|
{
|
|
1279
1727
|
src: avatarPreview,
|
|
1280
1728
|
alt: labels.onboarding.profileSetup.profilePreviewAlt,
|
|
1281
1729
|
className: "h-full w-full object-cover"
|
|
1282
1730
|
}
|
|
1283
|
-
) : /* @__PURE__ */
|
|
1731
|
+
) : /* @__PURE__ */ jsx18(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
|
|
1284
1732
|
}
|
|
1285
1733
|
),
|
|
1286
|
-
/* @__PURE__ */
|
|
1734
|
+
/* @__PURE__ */ jsx18(
|
|
1287
1735
|
"input",
|
|
1288
1736
|
{
|
|
1289
1737
|
ref: fileInputRef,
|
|
@@ -1295,8 +1743,8 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
1295
1743
|
}
|
|
1296
1744
|
)
|
|
1297
1745
|
] }),
|
|
1298
|
-
/* @__PURE__ */
|
|
1299
|
-
/* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
1747
|
+
/* @__PURE__ */ jsx18(
|
|
1300
1748
|
"label",
|
|
1301
1749
|
{
|
|
1302
1750
|
htmlFor: "onboarding-username",
|
|
@@ -1304,7 +1752,7 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
1304
1752
|
children: labels.onboarding.profileSetup.usernameLabel
|
|
1305
1753
|
}
|
|
1306
1754
|
),
|
|
1307
|
-
/* @__PURE__ */
|
|
1755
|
+
/* @__PURE__ */ jsx18(
|
|
1308
1756
|
"input",
|
|
1309
1757
|
{
|
|
1310
1758
|
id: "onboarding-username",
|
|
@@ -1328,16 +1776,16 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
1328
1776
|
)
|
|
1329
1777
|
] })
|
|
1330
1778
|
] }),
|
|
1331
|
-
/* @__PURE__ */
|
|
1779
|
+
/* @__PURE__ */ jsx18(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
|
|
1332
1780
|
] });
|
|
1333
1781
|
};
|
|
1334
1782
|
ProfileSetupStep.displayName = "ProfileSetupStep";
|
|
1335
1783
|
|
|
1336
1784
|
// src/onboarding/steps/connect-accounts.tsx
|
|
1337
1785
|
import { useLabels as useLabels3 } from "@agg-market/hooks";
|
|
1338
|
-
import { jsx as
|
|
1786
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1339
1787
|
var OnchainVenueLogos = () => {
|
|
1340
|
-
return /* @__PURE__ */
|
|
1788
|
+
return /* @__PURE__ */ jsx19("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ jsx19("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ jsx19(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
|
|
1341
1789
|
};
|
|
1342
1790
|
var VenueCard = ({
|
|
1343
1791
|
logos,
|
|
@@ -1349,7 +1797,7 @@ var VenueCard = ({
|
|
|
1349
1797
|
connected = false
|
|
1350
1798
|
}) => {
|
|
1351
1799
|
const labels = useLabels3();
|
|
1352
|
-
const action = connected ? /* @__PURE__ */
|
|
1800
|
+
const action = connected ? /* @__PURE__ */ jsx19(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ jsx19(
|
|
1353
1801
|
Button,
|
|
1354
1802
|
{
|
|
1355
1803
|
variant: "tertiary",
|
|
@@ -1359,18 +1807,18 @@ var VenueCard = ({
|
|
|
1359
1807
|
children: labels.onboarding.connectAccounts.connect
|
|
1360
1808
|
}
|
|
1361
1809
|
);
|
|
1362
|
-
const mobileAction = connected ? /* @__PURE__ */
|
|
1810
|
+
const mobileAction = connected ? /* @__PURE__ */ jsx19(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ jsx19(
|
|
1363
1811
|
Button,
|
|
1364
1812
|
{
|
|
1365
1813
|
variant: "tertiary",
|
|
1366
1814
|
size: "medium",
|
|
1367
1815
|
className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
|
|
1368
1816
|
onClick: onConnect,
|
|
1369
|
-
suffix: /* @__PURE__ */
|
|
1817
|
+
suffix: /* @__PURE__ */ jsx19(ChevronRightIcon, { className: "h-4 w-4" }),
|
|
1370
1818
|
children: labels.onboarding.connectAccounts.connectAccount
|
|
1371
1819
|
}
|
|
1372
1820
|
);
|
|
1373
|
-
return /* @__PURE__ */
|
|
1821
|
+
return /* @__PURE__ */ jsxs19(
|
|
1374
1822
|
"div",
|
|
1375
1823
|
{
|
|
1376
1824
|
className: cn(
|
|
@@ -1378,23 +1826,23 @@ var VenueCard = ({
|
|
|
1378
1826
|
connected ? "bg-agg-success/5" : "bg-agg-secondary-hover hover:bg-agg-tertiary"
|
|
1379
1827
|
),
|
|
1380
1828
|
children: [
|
|
1381
|
-
/* @__PURE__ */
|
|
1382
|
-
/* @__PURE__ */
|
|
1383
|
-
/* @__PURE__ */
|
|
1384
|
-
/* @__PURE__ */
|
|
1385
|
-
/* @__PURE__ */
|
|
1386
|
-
/* @__PURE__ */
|
|
1829
|
+
/* @__PURE__ */ jsxs19("div", { className: "hidden sm:flex items-center justify-between", children: [
|
|
1830
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-5", children: [
|
|
1831
|
+
/* @__PURE__ */ jsx19("div", { className: "shrink-0", children: logos }),
|
|
1832
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-[2px]", children: [
|
|
1833
|
+
/* @__PURE__ */ jsx19("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title }),
|
|
1834
|
+
/* @__PURE__ */ jsx19("p", { className: "text-agg-sm text-agg-foreground", children: description })
|
|
1387
1835
|
] })
|
|
1388
1836
|
] }),
|
|
1389
|
-
/* @__PURE__ */
|
|
1837
|
+
/* @__PURE__ */ jsx19("div", { className: "shrink-0", children: action })
|
|
1390
1838
|
] }),
|
|
1391
|
-
/* @__PURE__ */
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
-
/* @__PURE__ */
|
|
1394
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-3 sm:hidden", children: [
|
|
1840
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-3", children: [
|
|
1841
|
+
/* @__PURE__ */ jsx19("div", { className: "shrink-0", children: logos }),
|
|
1842
|
+
/* @__PURE__ */ jsx19("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title })
|
|
1395
1843
|
] }),
|
|
1396
|
-
/* @__PURE__ */
|
|
1397
|
-
/* @__PURE__ */
|
|
1844
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-start gap-2", children: [
|
|
1845
|
+
/* @__PURE__ */ jsx19("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
|
|
1398
1846
|
mobileAction
|
|
1399
1847
|
] })
|
|
1400
1848
|
] })
|
|
@@ -1411,13 +1859,13 @@ var ConnectAccountsStep = ({
|
|
|
1411
1859
|
}) => {
|
|
1412
1860
|
const labels = useLabels3();
|
|
1413
1861
|
const canContinue = connectedOnchain || connectedKalshi;
|
|
1414
|
-
return /* @__PURE__ */
|
|
1415
|
-
/* @__PURE__ */
|
|
1416
|
-
/* @__PURE__ */
|
|
1417
|
-
/* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-6", children: [
|
|
1863
|
+
/* @__PURE__ */ jsx19("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
|
|
1864
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-4", children: [
|
|
1865
|
+
/* @__PURE__ */ jsx19(
|
|
1418
1866
|
VenueCard,
|
|
1419
1867
|
{
|
|
1420
|
-
logos: /* @__PURE__ */
|
|
1868
|
+
logos: /* @__PURE__ */ jsx19(OnchainVenueLogos, {}),
|
|
1421
1869
|
title: labels.onboarding.connectAccounts.onchainTitle,
|
|
1422
1870
|
mobileTitle: labels.onboarding.connectAccounts.onchainMobileTitle(
|
|
1423
1871
|
ONCHAIN_VENUES.length - 1
|
|
@@ -1428,10 +1876,10 @@ var ConnectAccountsStep = ({
|
|
|
1428
1876
|
connected: connectedOnchain
|
|
1429
1877
|
}
|
|
1430
1878
|
),
|
|
1431
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ jsx19(
|
|
1432
1880
|
VenueCard,
|
|
1433
1881
|
{
|
|
1434
|
-
logos: /* @__PURE__ */
|
|
1882
|
+
logos: /* @__PURE__ */ jsx19("div", { className: "sm:flex sm:w-14 sm:items-center sm:justify-center", children: /* @__PURE__ */ jsx19(
|
|
1435
1883
|
VenueLogo,
|
|
1436
1884
|
{
|
|
1437
1885
|
venue: "kalshi",
|
|
@@ -1449,7 +1897,7 @@ var ConnectAccountsStep = ({
|
|
|
1449
1897
|
}
|
|
1450
1898
|
)
|
|
1451
1899
|
] }),
|
|
1452
|
-
/* @__PURE__ */
|
|
1900
|
+
/* @__PURE__ */ jsx19(
|
|
1453
1901
|
Button,
|
|
1454
1902
|
{
|
|
1455
1903
|
variant: "primary",
|
|
@@ -1465,25 +1913,25 @@ var ConnectAccountsStep = ({
|
|
|
1465
1913
|
ConnectAccountsStep.displayName = "ConnectAccountsStep";
|
|
1466
1914
|
|
|
1467
1915
|
// src/onboarding/steps/connect-kalshi-modal.tsx
|
|
1468
|
-
import { useCallback as
|
|
1916
|
+
import { useCallback as useCallback8, useState as useState9 } from "react";
|
|
1469
1917
|
import { useLabels as useLabels4 } from "@agg-market/hooks";
|
|
1470
1918
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
1471
|
-
import { jsx as
|
|
1919
|
+
import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1472
1920
|
var ConnectKalshiModal = ({
|
|
1473
1921
|
open,
|
|
1474
1922
|
onOpenChange,
|
|
1475
1923
|
onVerify
|
|
1476
1924
|
}) => {
|
|
1477
1925
|
const labels = useLabels4();
|
|
1478
|
-
const [apiKeyId, setApiKeyId] =
|
|
1479
|
-
const [privateKey, setPrivateKey] =
|
|
1480
|
-
const [verifying, setVerifying] =
|
|
1481
|
-
const [error, setError] =
|
|
1926
|
+
const [apiKeyId, setApiKeyId] = useState9("");
|
|
1927
|
+
const [privateKey, setPrivateKey] = useState9("");
|
|
1928
|
+
const [verifying, setVerifying] = useState9(false);
|
|
1929
|
+
const [error, setError] = useState9();
|
|
1482
1930
|
const canVerify = apiKeyId.trim().length > 0 && privateKey.trim().length > 0;
|
|
1483
|
-
const handleCancel =
|
|
1931
|
+
const handleCancel = useCallback8(() => {
|
|
1484
1932
|
onOpenChange(false);
|
|
1485
1933
|
}, [onOpenChange]);
|
|
1486
|
-
const handleVerify =
|
|
1934
|
+
const handleVerify = useCallback8(() => __async(void 0, null, function* () {
|
|
1487
1935
|
if (!canVerify || verifying)
|
|
1488
1936
|
return;
|
|
1489
1937
|
setVerifying(true);
|
|
@@ -1513,7 +1961,7 @@ var ConnectKalshiModal = ({
|
|
|
1513
1961
|
privateKey,
|
|
1514
1962
|
verifying
|
|
1515
1963
|
]);
|
|
1516
|
-
const handleOpenChange =
|
|
1964
|
+
const handleOpenChange = useCallback8(
|
|
1517
1965
|
(value) => {
|
|
1518
1966
|
if (value) {
|
|
1519
1967
|
setApiKeyId("");
|
|
@@ -1525,15 +1973,15 @@ var ConnectKalshiModal = ({
|
|
|
1525
1973
|
},
|
|
1526
1974
|
[onOpenChange]
|
|
1527
1975
|
);
|
|
1528
|
-
return /* @__PURE__ */
|
|
1976
|
+
return /* @__PURE__ */ jsx20(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs20(
|
|
1529
1977
|
Modal.Container,
|
|
1530
1978
|
{
|
|
1531
1979
|
maxWidth: "600px",
|
|
1532
1980
|
"aria-label": labels.onboarding.connectKalshiModal.ariaLabel,
|
|
1533
1981
|
classNames: { container: "!rounded-agg-lg" },
|
|
1534
1982
|
children: [
|
|
1535
|
-
/* @__PURE__ */
|
|
1536
|
-
/* @__PURE__ */
|
|
1983
|
+
/* @__PURE__ */ jsx20(Dialog.Title, { className: "sr-only", children: labels.onboarding.connectKalshiModal.title }),
|
|
1984
|
+
/* @__PURE__ */ jsx20(
|
|
1537
1985
|
Modal.Header,
|
|
1538
1986
|
{
|
|
1539
1987
|
hideClose: false,
|
|
@@ -1544,8 +1992,8 @@ var ConnectKalshiModal = ({
|
|
|
1544
1992
|
}
|
|
1545
1993
|
}
|
|
1546
1994
|
),
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ jsx20(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-8 items-center", children: [
|
|
1996
|
+
/* @__PURE__ */ jsx20(
|
|
1549
1997
|
VenueLogo,
|
|
1550
1998
|
{
|
|
1551
1999
|
venue: "kalshi",
|
|
@@ -1554,54 +2002,54 @@ var ConnectKalshiModal = ({
|
|
|
1554
2002
|
className: "h-[60px] w-[60px]"
|
|
1555
2003
|
}
|
|
1556
2004
|
),
|
|
1557
|
-
/* @__PURE__ */
|
|
1558
|
-
/* @__PURE__ */
|
|
1559
|
-
/* @__PURE__ */
|
|
2005
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-4 items-center text-center", children: [
|
|
2006
|
+
/* @__PURE__ */ jsx20("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
|
|
2007
|
+
/* @__PURE__ */ jsx20("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
|
|
1560
2008
|
] }),
|
|
1561
|
-
/* @__PURE__ */
|
|
1562
|
-
/* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */
|
|
1564
|
-
/* @__PURE__ */
|
|
1565
|
-
/* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
2010
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-3 rounded-agg-lg bg-agg-secondary-hover p-4", children: [
|
|
2011
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
|
|
2012
|
+
/* @__PURE__ */ jsx20("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
|
|
2013
|
+
/* @__PURE__ */ jsx20("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
|
|
1566
2014
|
] }),
|
|
1567
|
-
/* @__PURE__ */
|
|
1568
|
-
/* @__PURE__ */
|
|
1569
|
-
/* @__PURE__ */
|
|
2015
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-0 text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
2016
|
+
/* @__PURE__ */ jsx20("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
|
|
2017
|
+
/* @__PURE__ */ jsxs20("p", { children: [
|
|
1570
2018
|
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
|
|
1571
2019
|
" ",
|
|
1572
|
-
/* @__PURE__ */
|
|
2020
|
+
/* @__PURE__ */ jsx20("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
|
|
1573
2021
|
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
|
|
1574
2022
|
" ",
|
|
1575
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ jsx20("span", { className: "text-agg-foreground underline", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl })
|
|
1576
2024
|
] }),
|
|
1577
|
-
/* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ jsxs20("p", { children: [
|
|
1578
2026
|
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
|
|
1579
2027
|
" ",
|
|
1580
|
-
/* @__PURE__ */
|
|
2028
|
+
/* @__PURE__ */ jsx20("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
|
|
1581
2029
|
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
|
|
1582
2030
|
] }),
|
|
1583
|
-
/* @__PURE__ */
|
|
2031
|
+
/* @__PURE__ */ jsxs20("p", { children: [
|
|
1584
2032
|
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
|
|
1585
2033
|
" ",
|
|
1586
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ jsx20("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
|
|
1587
2035
|
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
|
|
1588
2036
|
] }),
|
|
1589
|
-
/* @__PURE__ */
|
|
2037
|
+
/* @__PURE__ */ jsx20("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
|
|
1590
2038
|
] }),
|
|
1591
|
-
/* @__PURE__ */
|
|
2039
|
+
/* @__PURE__ */ jsxs20("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
1592
2040
|
labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
|
|
1593
|
-
/* @__PURE__ */
|
|
2041
|
+
/* @__PURE__ */ jsx20("br", {}),
|
|
1594
2042
|
labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
|
|
1595
2043
|
] })
|
|
1596
2044
|
] }),
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
/* @__PURE__ */
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */
|
|
2045
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-3 rounded-agg-lg bg-agg-secondary-hover p-4", children: [
|
|
2046
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
|
|
2047
|
+
/* @__PURE__ */ jsx20("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
|
|
2048
|
+
/* @__PURE__ */ jsx20("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
|
|
1601
2049
|
] }),
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
/* @__PURE__ */
|
|
1604
|
-
/* @__PURE__ */
|
|
2050
|
+
/* @__PURE__ */ jsx20("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
|
|
2051
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-2", children: [
|
|
2052
|
+
/* @__PURE__ */ jsx20(
|
|
1605
2053
|
"label",
|
|
1606
2054
|
{
|
|
1607
2055
|
htmlFor: "kalshi-api-key-id",
|
|
@@ -1609,7 +2057,7 @@ var ConnectKalshiModal = ({
|
|
|
1609
2057
|
children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
|
|
1610
2058
|
}
|
|
1611
2059
|
),
|
|
1612
|
-
/* @__PURE__ */
|
|
2060
|
+
/* @__PURE__ */ jsx20(
|
|
1613
2061
|
"input",
|
|
1614
2062
|
{
|
|
1615
2063
|
id: "kalshi-api-key-id",
|
|
@@ -1629,8 +2077,8 @@ var ConnectKalshiModal = ({
|
|
|
1629
2077
|
}
|
|
1630
2078
|
)
|
|
1631
2079
|
] }),
|
|
1632
|
-
/* @__PURE__ */
|
|
1633
|
-
/* @__PURE__ */
|
|
2080
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-2", children: [
|
|
2081
|
+
/* @__PURE__ */ jsx20(
|
|
1634
2082
|
"label",
|
|
1635
2083
|
{
|
|
1636
2084
|
htmlFor: "kalshi-private-key",
|
|
@@ -1638,7 +2086,7 @@ var ConnectKalshiModal = ({
|
|
|
1638
2086
|
children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
|
|
1639
2087
|
}
|
|
1640
2088
|
),
|
|
1641
|
-
/* @__PURE__ */
|
|
2089
|
+
/* @__PURE__ */ jsx20(
|
|
1642
2090
|
"textarea",
|
|
1643
2091
|
{
|
|
1644
2092
|
id: "kalshi-private-key",
|
|
@@ -1660,42 +2108,42 @@ var ConnectKalshiModal = ({
|
|
|
1660
2108
|
] })
|
|
1661
2109
|
] })
|
|
1662
2110
|
] }),
|
|
1663
|
-
/* @__PURE__ */
|
|
1664
|
-
/* @__PURE__ */
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between w-full", children: [
|
|
2112
|
+
/* @__PURE__ */ jsx20("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
|
|
2113
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-3", children: [
|
|
2114
|
+
/* @__PURE__ */ jsxs20(
|
|
1667
2115
|
"a",
|
|
1668
2116
|
{
|
|
1669
2117
|
href: "#",
|
|
1670
2118
|
className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary hover:text-agg-primary-hover",
|
|
1671
2119
|
children: [
|
|
1672
|
-
/* @__PURE__ */
|
|
2120
|
+
/* @__PURE__ */ jsx20(DocumentIcon, { className: "h-4 w-4" }),
|
|
1673
2121
|
labels.onboarding.connectKalshiModal.help.docsLinkLabel
|
|
1674
2122
|
]
|
|
1675
2123
|
}
|
|
1676
2124
|
),
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
2125
|
+
/* @__PURE__ */ jsx20("span", { className: "h-3 w-px bg-agg-separator" }),
|
|
2126
|
+
/* @__PURE__ */ jsxs20(
|
|
1679
2127
|
"a",
|
|
1680
2128
|
{
|
|
1681
2129
|
href: "#",
|
|
1682
2130
|
className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary hover:text-agg-primary-hover",
|
|
1683
2131
|
children: [
|
|
1684
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ jsx20(PlaySquareIcon, { className: "h-4 w-4" }),
|
|
1685
2133
|
labels.onboarding.connectKalshiModal.help.tutorialLinkLabel
|
|
1686
2134
|
]
|
|
1687
2135
|
}
|
|
1688
2136
|
)
|
|
1689
2137
|
] })
|
|
1690
2138
|
] }),
|
|
1691
|
-
/* @__PURE__ */
|
|
1692
|
-
error ? /* @__PURE__ */
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
2139
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-5 items-center", children: [
|
|
2140
|
+
error ? /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
|
|
2141
|
+
/* @__PURE__ */ jsx20(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
|
|
2142
|
+
/* @__PURE__ */ jsx20("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
|
|
1695
2143
|
] }) : null,
|
|
1696
|
-
/* @__PURE__ */
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
2144
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-3 justify-center", children: [
|
|
2145
|
+
/* @__PURE__ */ jsx20(Button, { variant: "secondary", size: "large", onClick: handleCancel, children: labels.onboarding.connectKalshiModal.actions.cancel }),
|
|
2146
|
+
/* @__PURE__ */ jsx20(
|
|
1699
2147
|
Button,
|
|
1700
2148
|
{
|
|
1701
2149
|
variant: "primary",
|
|
@@ -1716,22 +2164,22 @@ var ConnectKalshiModal = ({
|
|
|
1716
2164
|
ConnectKalshiModal.displayName = "ConnectKalshiModal";
|
|
1717
2165
|
|
|
1718
2166
|
// src/onboarding/steps/connect-onchain-modal.tsx
|
|
1719
|
-
import { useCallback as
|
|
2167
|
+
import { useCallback as useCallback9, useState as useState10 } from "react";
|
|
1720
2168
|
import { useLabels as useLabels5 } from "@agg-market/hooks";
|
|
1721
2169
|
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
1722
|
-
import { jsx as
|
|
2170
|
+
import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1723
2171
|
var ConnectOnchainModal = ({
|
|
1724
2172
|
open,
|
|
1725
2173
|
onOpenChange,
|
|
1726
2174
|
onConnect
|
|
1727
2175
|
}) => {
|
|
1728
2176
|
const labels = useLabels5();
|
|
1729
|
-
const [connecting, setConnecting] =
|
|
1730
|
-
const [error, setError] =
|
|
1731
|
-
const handleCancel =
|
|
2177
|
+
const [connecting, setConnecting] = useState10(false);
|
|
2178
|
+
const [error, setError] = useState10();
|
|
2179
|
+
const handleCancel = useCallback9(() => {
|
|
1732
2180
|
onOpenChange(false);
|
|
1733
2181
|
}, [onOpenChange]);
|
|
1734
|
-
const handleConnect =
|
|
2182
|
+
const handleConnect = useCallback9(() => __async(void 0, null, function* () {
|
|
1735
2183
|
if (connecting)
|
|
1736
2184
|
return;
|
|
1737
2185
|
setConnecting(true);
|
|
@@ -1747,7 +2195,7 @@ var ConnectOnchainModal = ({
|
|
|
1747
2195
|
setConnecting(false);
|
|
1748
2196
|
}
|
|
1749
2197
|
}), [connecting, labels.onboarding.connectOnchainModal.fallbackError, onConnect, onOpenChange]);
|
|
1750
|
-
const handleOpenChange =
|
|
2198
|
+
const handleOpenChange = useCallback9(
|
|
1751
2199
|
(value) => {
|
|
1752
2200
|
if (value) {
|
|
1753
2201
|
setError(void 0);
|
|
@@ -1757,15 +2205,15 @@ var ConnectOnchainModal = ({
|
|
|
1757
2205
|
},
|
|
1758
2206
|
[onOpenChange]
|
|
1759
2207
|
);
|
|
1760
|
-
return /* @__PURE__ */
|
|
2208
|
+
return /* @__PURE__ */ jsx21(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs21(
|
|
1761
2209
|
Modal.Container,
|
|
1762
2210
|
{
|
|
1763
2211
|
maxWidth: "600px",
|
|
1764
2212
|
"aria-label": labels.onboarding.connectOnchainModal.ariaLabel,
|
|
1765
2213
|
classNames: { container: "!rounded-agg-lg" },
|
|
1766
2214
|
children: [
|
|
1767
|
-
/* @__PURE__ */
|
|
1768
|
-
/* @__PURE__ */
|
|
2215
|
+
/* @__PURE__ */ jsx21(Dialog2.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
|
|
2216
|
+
/* @__PURE__ */ jsx21(
|
|
1769
2217
|
Modal.Header,
|
|
1770
2218
|
{
|
|
1771
2219
|
hideClose: false,
|
|
@@ -1776,26 +2224,26 @@ var ConnectOnchainModal = ({
|
|
|
1776
2224
|
}
|
|
1777
2225
|
}
|
|
1778
2226
|
),
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1781
|
-
/* @__PURE__ */
|
|
1782
|
-
/* @__PURE__ */
|
|
2227
|
+
/* @__PURE__ */ jsx21(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-8 items-center", children: [
|
|
2228
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-4 items-center text-center", children: [
|
|
2229
|
+
/* @__PURE__ */ jsx21("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
|
|
2230
|
+
/* @__PURE__ */ jsx21("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
|
|
1783
2231
|
] }),
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
/* @__PURE__ */
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
index > 0 && /* @__PURE__ */
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
/* @__PURE__ */
|
|
2232
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
|
|
2233
|
+
/* @__PURE__ */ jsx21("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
|
|
2234
|
+
/* @__PURE__ */ jsx21("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-[6px]", children: [
|
|
2235
|
+
index > 0 && /* @__PURE__ */ jsx21("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
|
|
2236
|
+
/* @__PURE__ */ jsx21(VenueLogo, { venue, size: "medium" }),
|
|
2237
|
+
/* @__PURE__ */ jsx21("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
|
|
1790
2238
|
] }, venue)) })
|
|
1791
2239
|
] }),
|
|
1792
|
-
/* @__PURE__ */
|
|
1793
|
-
/* @__PURE__ */
|
|
1794
|
-
error ? /* @__PURE__ */
|
|
1795
|
-
/* @__PURE__ */
|
|
1796
|
-
/* @__PURE__ */
|
|
2240
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-6 items-center", children: [
|
|
2241
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-3 items-center", children: [
|
|
2242
|
+
error ? /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
2243
|
+
/* @__PURE__ */ jsx21(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
|
|
2244
|
+
/* @__PURE__ */ jsx21("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
|
|
1797
2245
|
] }) : null,
|
|
1798
|
-
/* @__PURE__ */
|
|
2246
|
+
/* @__PURE__ */ jsx21(
|
|
1799
2247
|
Button,
|
|
1800
2248
|
{
|
|
1801
2249
|
variant: "primary",
|
|
@@ -1806,7 +2254,7 @@ var ConnectOnchainModal = ({
|
|
|
1806
2254
|
}
|
|
1807
2255
|
)
|
|
1808
2256
|
] }),
|
|
1809
|
-
/* @__PURE__ */
|
|
2257
|
+
/* @__PURE__ */ jsx21(
|
|
1810
2258
|
Button,
|
|
1811
2259
|
{
|
|
1812
2260
|
variant: "tertiary",
|
|
@@ -1825,7 +2273,7 @@ var ConnectOnchainModal = ({
|
|
|
1825
2273
|
ConnectOnchainModal.displayName = "ConnectOnchainModal";
|
|
1826
2274
|
|
|
1827
2275
|
// src/onboarding/index.tsx
|
|
1828
|
-
import { Fragment as
|
|
2276
|
+
import { Fragment as Fragment13, jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1829
2277
|
var OnboardingModal = ({
|
|
1830
2278
|
open,
|
|
1831
2279
|
onOpenChange,
|
|
@@ -1839,17 +2287,17 @@ var OnboardingModal = ({
|
|
|
1839
2287
|
}) => {
|
|
1840
2288
|
var _a;
|
|
1841
2289
|
const labels = useLabels6();
|
|
1842
|
-
const [step, setStep] =
|
|
2290
|
+
const [step, setStep] = useState11(ONBOARDING_STEPS.HOW_IT_WORKS);
|
|
1843
2291
|
const stepLabels = {
|
|
1844
2292
|
[ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
|
|
1845
2293
|
[ONBOARDING_STEPS.PROFILE_SETUP]: labels.onboarding.modal.stepProfileSetup,
|
|
1846
2294
|
[ONBOARDING_STEPS.CONNECT_ACCOUNTS]: labels.onboarding.modal.stepConnectAccounts
|
|
1847
2295
|
};
|
|
1848
2296
|
const resolvedTitle = (_a = stepLabels[step]) != null ? _a : labels.onboarding.modal.title;
|
|
1849
|
-
const [kalshiModalOpen, setKalshiModalOpen] =
|
|
1850
|
-
const [kalshiConnected, setKalshiConnected] =
|
|
1851
|
-
const [onchainModalOpen, setOnchainModalOpen] =
|
|
1852
|
-
const [onchainConnected, setOnchainConnected] =
|
|
2297
|
+
const [kalshiModalOpen, setKalshiModalOpen] = useState11(false);
|
|
2298
|
+
const [kalshiConnected, setKalshiConnected] = useState11(false);
|
|
2299
|
+
const [onchainModalOpen, setOnchainModalOpen] = useState11(false);
|
|
2300
|
+
const [onchainConnected, setOnchainConnected] = useState11(false);
|
|
1853
2301
|
useEffect(() => {
|
|
1854
2302
|
if (open) {
|
|
1855
2303
|
setStep(ONBOARDING_STEPS.HOW_IT_WORKS);
|
|
@@ -1857,49 +2305,49 @@ var OnboardingModal = ({
|
|
|
1857
2305
|
setOnchainConnected(false);
|
|
1858
2306
|
}
|
|
1859
2307
|
}, [open]);
|
|
1860
|
-
const handleHowItWorksContinue =
|
|
2308
|
+
const handleHowItWorksContinue = useCallback10(() => {
|
|
1861
2309
|
setStep(ONBOARDING_STEPS.PROFILE_SETUP);
|
|
1862
2310
|
}, []);
|
|
1863
|
-
const handleProfileContinue =
|
|
2311
|
+
const handleProfileContinue = useCallback10(
|
|
1864
2312
|
(data) => {
|
|
1865
2313
|
onProfileSubmit == null ? void 0 : onProfileSubmit(data);
|
|
1866
2314
|
setStep(ONBOARDING_STEPS.CONNECT_ACCOUNTS);
|
|
1867
2315
|
},
|
|
1868
2316
|
[onProfileSubmit]
|
|
1869
2317
|
);
|
|
1870
|
-
const handleConnectContinue =
|
|
2318
|
+
const handleConnectContinue = useCallback10(() => {
|
|
1871
2319
|
onComplete == null ? void 0 : onComplete();
|
|
1872
2320
|
}, [onComplete]);
|
|
1873
|
-
const handleOpenOnchainModal =
|
|
2321
|
+
const handleOpenOnchainModal = useCallback10(() => {
|
|
1874
2322
|
setOnchainModalOpen(true);
|
|
1875
2323
|
}, []);
|
|
1876
|
-
const handleOnchainConnect =
|
|
2324
|
+
const handleOnchainConnect = useCallback10(() => __async(void 0, null, function* () {
|
|
1877
2325
|
yield onConnectOnchain == null ? void 0 : onConnectOnchain();
|
|
1878
2326
|
setOnchainConnected(true);
|
|
1879
2327
|
}), [onConnectOnchain]);
|
|
1880
|
-
const handleOpenKalshiModal =
|
|
2328
|
+
const handleOpenKalshiModal = useCallback10(() => {
|
|
1881
2329
|
setKalshiModalOpen(true);
|
|
1882
2330
|
}, []);
|
|
1883
|
-
const handleKalshiVerify =
|
|
2331
|
+
const handleKalshiVerify = useCallback10(
|
|
1884
2332
|
(credentials) => __async(void 0, null, function* () {
|
|
1885
2333
|
yield onConnectKalshi == null ? void 0 : onConnectKalshi(credentials);
|
|
1886
2334
|
setKalshiConnected(true);
|
|
1887
2335
|
}),
|
|
1888
2336
|
[onConnectKalshi]
|
|
1889
2337
|
);
|
|
1890
|
-
return /* @__PURE__ */
|
|
1891
|
-
/* @__PURE__ */
|
|
2338
|
+
return /* @__PURE__ */ jsxs22(Fragment13, { children: [
|
|
2339
|
+
/* @__PURE__ */ jsx22(Modal, { open, onOpenChange, children: /* @__PURE__ */ jsxs22(
|
|
1892
2340
|
Modal.Container,
|
|
1893
2341
|
{
|
|
1894
2342
|
maxWidth: "600px",
|
|
1895
2343
|
"aria-label": resolvedTitle,
|
|
1896
2344
|
classNames: { container: "!rounded-agg-lg" },
|
|
1897
2345
|
children: [
|
|
1898
|
-
/* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */
|
|
1900
|
-
step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */
|
|
1901
|
-
step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */
|
|
1902
|
-
step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ jsx22(Dialog3.Title, { className: "sr-only", children: resolvedTitle }),
|
|
2347
|
+
/* @__PURE__ */ jsxs22(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
|
|
2348
|
+
step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ jsx22(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
|
|
2349
|
+
step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ jsx22(ProfileSetupStep, { onContinue: handleProfileContinue }),
|
|
2350
|
+
step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ jsx22(
|
|
1903
2351
|
ConnectAccountsStep,
|
|
1904
2352
|
{
|
|
1905
2353
|
onConnectOnchain: handleOpenOnchainModal,
|
|
@@ -1913,7 +2361,7 @@ var OnboardingModal = ({
|
|
|
1913
2361
|
]
|
|
1914
2362
|
}
|
|
1915
2363
|
) }),
|
|
1916
|
-
/* @__PURE__ */
|
|
2364
|
+
/* @__PURE__ */ jsx22(
|
|
1917
2365
|
ConnectOnchainModal,
|
|
1918
2366
|
{
|
|
1919
2367
|
open: onchainModalOpen,
|
|
@@ -1921,7 +2369,7 @@ var OnboardingModal = ({
|
|
|
1921
2369
|
onConnect: handleOnchainConnect
|
|
1922
2370
|
}
|
|
1923
2371
|
),
|
|
1924
|
-
/* @__PURE__ */
|
|
2372
|
+
/* @__PURE__ */ jsx22(
|
|
1925
2373
|
ConnectKalshiModal,
|
|
1926
2374
|
{
|
|
1927
2375
|
open: kalshiModalOpen,
|
|
@@ -1934,7 +2382,7 @@ var OnboardingModal = ({
|
|
|
1934
2382
|
OnboardingModal.displayName = "OnboardingModal";
|
|
1935
2383
|
|
|
1936
2384
|
// src/profile/index.tsx
|
|
1937
|
-
import { useState as
|
|
2385
|
+
import { useState as useState12, useEffect as useEffect2, useCallback as useCallback12 } from "react";
|
|
1938
2386
|
|
|
1939
2387
|
// src/profile/profile-modal.constants.ts
|
|
1940
2388
|
var PROFILE_TAB_KEYS = {
|
|
@@ -1947,9 +2395,9 @@ var PROFILE_TAB_ITEMS = [
|
|
|
1947
2395
|
];
|
|
1948
2396
|
|
|
1949
2397
|
// src/profile/tabs/about-tab.tsx
|
|
1950
|
-
import { useCallback as
|
|
2398
|
+
import { useCallback as useCallback11, useRef as useRef4 } from "react";
|
|
1951
2399
|
import { useLabels as useLabels7 } from "@agg-market/hooks";
|
|
1952
|
-
import { jsx as
|
|
2400
|
+
import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1953
2401
|
var AboutTab = ({
|
|
1954
2402
|
avatarPreview,
|
|
1955
2403
|
onDeleteProfile,
|
|
@@ -1959,12 +2407,12 @@ var AboutTab = ({
|
|
|
1959
2407
|
draftAvatarPreview
|
|
1960
2408
|
}) => {
|
|
1961
2409
|
const labels = useLabels7();
|
|
1962
|
-
const fileInputRef =
|
|
1963
|
-
const handleAvatarClick =
|
|
2410
|
+
const fileInputRef = useRef4(null);
|
|
2411
|
+
const handleAvatarClick = useCallback11(() => {
|
|
1964
2412
|
var _a;
|
|
1965
2413
|
(_a = fileInputRef.current) == null ? void 0 : _a.click();
|
|
1966
2414
|
}, []);
|
|
1967
|
-
const handleFileChange =
|
|
2415
|
+
const handleFileChange = useCallback11(
|
|
1968
2416
|
(e) => {
|
|
1969
2417
|
var _a;
|
|
1970
2418
|
const file = (_a = e.target.files) == null ? void 0 : _a[0];
|
|
@@ -1980,9 +2428,9 @@ var AboutTab = ({
|
|
|
1980
2428
|
[onDraftAvatarChange]
|
|
1981
2429
|
);
|
|
1982
2430
|
const resolvedPreview = draftAvatarPreview != null ? draftAvatarPreview : avatarPreview;
|
|
1983
|
-
return /* @__PURE__ */
|
|
1984
|
-
/* @__PURE__ */
|
|
1985
|
-
/* @__PURE__ */
|
|
2431
|
+
return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-8", children: [
|
|
2432
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex justify-center", children: [
|
|
2433
|
+
/* @__PURE__ */ jsx23(
|
|
1986
2434
|
"button",
|
|
1987
2435
|
{
|
|
1988
2436
|
type: "button",
|
|
@@ -1998,17 +2446,17 @@ var AboutTab = ({
|
|
|
1998
2446
|
"overflow-hidden"
|
|
1999
2447
|
),
|
|
2000
2448
|
"aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
|
|
2001
|
-
children: resolvedPreview ? /* @__PURE__ */
|
|
2449
|
+
children: resolvedPreview ? /* @__PURE__ */ jsx23(
|
|
2002
2450
|
RemoteImage,
|
|
2003
2451
|
{
|
|
2004
2452
|
src: resolvedPreview,
|
|
2005
2453
|
alt: labels.onboarding.profileSetup.profilePreviewAlt,
|
|
2006
2454
|
className: "h-full w-full object-cover"
|
|
2007
2455
|
}
|
|
2008
|
-
) : /* @__PURE__ */
|
|
2456
|
+
) : /* @__PURE__ */ jsx23(ProfileIcon, { className: "h-8 w-8 text-agg-muted-foreground" })
|
|
2009
2457
|
}
|
|
2010
2458
|
),
|
|
2011
|
-
/* @__PURE__ */
|
|
2459
|
+
/* @__PURE__ */ jsx23(
|
|
2012
2460
|
"input",
|
|
2013
2461
|
{
|
|
2014
2462
|
ref: fileInputRef,
|
|
@@ -2020,8 +2468,8 @@ var AboutTab = ({
|
|
|
2020
2468
|
}
|
|
2021
2469
|
)
|
|
2022
2470
|
] }),
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2471
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-2", children: [
|
|
2472
|
+
/* @__PURE__ */ jsx23(
|
|
2025
2473
|
"label",
|
|
2026
2474
|
{
|
|
2027
2475
|
htmlFor: "profile-username",
|
|
@@ -2029,7 +2477,7 @@ var AboutTab = ({
|
|
|
2029
2477
|
children: "Username"
|
|
2030
2478
|
}
|
|
2031
2479
|
),
|
|
2032
|
-
/* @__PURE__ */
|
|
2480
|
+
/* @__PURE__ */ jsx23(
|
|
2033
2481
|
"input",
|
|
2034
2482
|
{
|
|
2035
2483
|
id: "profile-username",
|
|
@@ -2051,12 +2499,12 @@ var AboutTab = ({
|
|
|
2051
2499
|
}
|
|
2052
2500
|
)
|
|
2053
2501
|
] }),
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
/* @__PURE__ */
|
|
2502
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4", children: [
|
|
2503
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1", children: [
|
|
2504
|
+
/* @__PURE__ */ jsx23("span", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: "Delete your profile" }),
|
|
2505
|
+
/* @__PURE__ */ jsx23("span", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: "This will permanently delete your account and all of its data. You will not be able to reactivate this account." })
|
|
2058
2506
|
] }),
|
|
2059
|
-
/* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ jsx23(
|
|
2060
2508
|
"button",
|
|
2061
2509
|
{
|
|
2062
2510
|
type: "button",
|
|
@@ -2078,9 +2526,9 @@ var AboutTab = ({
|
|
|
2078
2526
|
AboutTab.displayName = "AboutTab";
|
|
2079
2527
|
|
|
2080
2528
|
// src/profile/tabs/accounts-wallets-tab.tsx
|
|
2081
|
-
import { jsx as
|
|
2082
|
-
var SectionTitle = ({ children }) => /* @__PURE__ */
|
|
2083
|
-
var AccountRow = ({ children, className }) => /* @__PURE__ */
|
|
2529
|
+
import { jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2530
|
+
var SectionTitle = ({ children }) => /* @__PURE__ */ jsx24("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
|
|
2531
|
+
var AccountRow = ({ children, className }) => /* @__PURE__ */ jsx24(
|
|
2084
2532
|
"div",
|
|
2085
2533
|
{
|
|
2086
2534
|
className: cn(
|
|
@@ -2092,7 +2540,7 @@ var AccountRow = ({ children, className }) => /* @__PURE__ */ jsx19(
|
|
|
2092
2540
|
children
|
|
2093
2541
|
}
|
|
2094
2542
|
);
|
|
2095
|
-
var ConnectTextButton = ({ onClick }) => /* @__PURE__ */
|
|
2543
|
+
var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx24(
|
|
2096
2544
|
"button",
|
|
2097
2545
|
{
|
|
2098
2546
|
type: "button",
|
|
@@ -2101,7 +2549,7 @@ var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx19(
|
|
|
2101
2549
|
children: "Connect"
|
|
2102
2550
|
}
|
|
2103
2551
|
);
|
|
2104
|
-
var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */
|
|
2552
|
+
var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ jsx24(
|
|
2105
2553
|
"button",
|
|
2106
2554
|
{
|
|
2107
2555
|
type: "button",
|
|
@@ -2126,19 +2574,19 @@ var AccountsWalletsTab = ({
|
|
|
2126
2574
|
const twitter = socialAccounts == null ? void 0 : socialAccounts.twitter;
|
|
2127
2575
|
const discord = socialAccounts == null ? void 0 : socialAccounts.discord;
|
|
2128
2576
|
const telegram = socialAccounts == null ? void 0 : socialAccounts.telegram;
|
|
2129
|
-
return /* @__PURE__ */
|
|
2130
|
-
/* @__PURE__ */
|
|
2131
|
-
/* @__PURE__ */
|
|
2132
|
-
exchanges.length === 0 ? /* @__PURE__ */
|
|
2577
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-8", children: [
|
|
2578
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-3", children: [
|
|
2579
|
+
/* @__PURE__ */ jsx24(SectionTitle, { children: "Exchanges" }),
|
|
2580
|
+
exchanges.length === 0 ? /* @__PURE__ */ jsx24("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: "No exchange accounts connected." }) : /* @__PURE__ */ jsx24("div", { className: "flex flex-col gap-2", children: exchanges.map((account) => {
|
|
2133
2581
|
var _a;
|
|
2134
2582
|
const displayName = (_a = venueLogoLabels[account.venue]) != null ? _a : account.venue;
|
|
2135
|
-
return /* @__PURE__ */
|
|
2136
|
-
/* @__PURE__ */
|
|
2137
|
-
/* @__PURE__ */
|
|
2138
|
-
/* @__PURE__ */
|
|
2139
|
-
/* @__PURE__ */
|
|
2140
|
-
/* @__PURE__ */
|
|
2141
|
-
account.verified ? /* @__PURE__ */
|
|
2583
|
+
return /* @__PURE__ */ jsxs24(AccountRow, { children: [
|
|
2584
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
2585
|
+
/* @__PURE__ */ jsx24(VenueLogo, { venue: account.venue, size: "small" }),
|
|
2586
|
+
/* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: displayName }),
|
|
2587
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
2588
|
+
/* @__PURE__ */ jsx24("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: account.displayAddress }),
|
|
2589
|
+
account.verified ? /* @__PURE__ */ jsx24(
|
|
2142
2590
|
Icon,
|
|
2143
2591
|
{
|
|
2144
2592
|
name: "check-badge",
|
|
@@ -2148,39 +2596,39 @@ var AccountsWalletsTab = ({
|
|
|
2148
2596
|
) : null
|
|
2149
2597
|
] })
|
|
2150
2598
|
] }),
|
|
2151
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ jsx24(DisconnectTextButton, { onClick: () => onDisconnectExchange(account.venue) })
|
|
2152
2600
|
] }, account.venue);
|
|
2153
2601
|
}) })
|
|
2154
2602
|
] }),
|
|
2155
|
-
/* @__PURE__ */
|
|
2156
|
-
/* @__PURE__ */
|
|
2157
|
-
/* @__PURE__ */
|
|
2158
|
-
/* @__PURE__ */
|
|
2159
|
-
/* @__PURE__ */
|
|
2160
|
-
/* @__PURE__ */
|
|
2161
|
-
/* @__PURE__ */
|
|
2603
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-3", children: [
|
|
2604
|
+
/* @__PURE__ */ jsx24(SectionTitle, { children: "Social Accounts" }),
|
|
2605
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-2", children: [
|
|
2606
|
+
/* @__PURE__ */ jsxs24(AccountRow, { children: [
|
|
2607
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
|
|
2608
|
+
/* @__PURE__ */ jsx24("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx24(Icon, { name: "twitter", size: "small", color: "currentColor" }) }),
|
|
2609
|
+
/* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "X (Twitter)" })
|
|
2162
2610
|
] }),
|
|
2163
|
-
(twitter == null ? void 0 : twitter.connected) ? /* @__PURE__ */
|
|
2611
|
+
(twitter == null ? void 0 : twitter.connected) ? /* @__PURE__ */ jsx24(DisconnectTextButton, { onClick: onDisconnectTwitter }) : /* @__PURE__ */ jsx24(ConnectTextButton, { onClick: onConnectTwitter })
|
|
2164
2612
|
] }),
|
|
2165
|
-
/* @__PURE__ */
|
|
2166
|
-
/* @__PURE__ */
|
|
2167
|
-
/* @__PURE__ */
|
|
2168
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ jsxs24(AccountRow, { children: [
|
|
2614
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
|
|
2615
|
+
/* @__PURE__ */ jsx24("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-[#5865F2]", children: /* @__PURE__ */ jsx24(Icon, { name: "discord", size: "small", color: "currentColor" }) }),
|
|
2616
|
+
/* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "Discord" })
|
|
2169
2617
|
] }),
|
|
2170
|
-
(discord == null ? void 0 : discord.connected) ? /* @__PURE__ */
|
|
2618
|
+
(discord == null ? void 0 : discord.connected) ? /* @__PURE__ */ jsx24(DisconnectTextButton, { onClick: onDisconnectDiscord }) : /* @__PURE__ */ jsx24(ConnectTextButton, { onClick: onConnectDiscord })
|
|
2171
2619
|
] }),
|
|
2172
|
-
/* @__PURE__ */
|
|
2173
|
-
/* @__PURE__ */
|
|
2174
|
-
/* @__PURE__ */
|
|
2175
|
-
/* @__PURE__ */
|
|
2620
|
+
/* @__PURE__ */ jsxs24(AccountRow, { children: [
|
|
2621
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
|
|
2622
|
+
/* @__PURE__ */ jsx24("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-[#26A5E4]", children: /* @__PURE__ */ jsx24(Icon, { name: "telegram", size: "small", color: "currentColor" }) }),
|
|
2623
|
+
/* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: "Telegram" })
|
|
2176
2624
|
] }),
|
|
2177
|
-
(telegram == null ? void 0 : telegram.connected) ? /* @__PURE__ */
|
|
2625
|
+
(telegram == null ? void 0 : telegram.connected) ? /* @__PURE__ */ jsx24(DisconnectTextButton, { onClick: onDisconnectTelegram }) : /* @__PURE__ */ jsx24(ConnectTextButton, { onClick: onConnectTelegram })
|
|
2178
2626
|
] })
|
|
2179
2627
|
] })
|
|
2180
2628
|
] }),
|
|
2181
|
-
/* @__PURE__ */
|
|
2182
|
-
/* @__PURE__ */
|
|
2183
|
-
/* @__PURE__ */
|
|
2629
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-3", children: [
|
|
2630
|
+
/* @__PURE__ */ jsx24(SectionTitle, { children: "Email Address" }),
|
|
2631
|
+
/* @__PURE__ */ jsxs24(
|
|
2184
2632
|
"button",
|
|
2185
2633
|
{
|
|
2186
2634
|
type: "button",
|
|
@@ -2192,11 +2640,11 @@ var AccountsWalletsTab = ({
|
|
|
2192
2640
|
"cursor-pointer hover:bg-agg-secondary-hover"
|
|
2193
2641
|
),
|
|
2194
2642
|
children: [
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2643
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
|
|
2644
|
+
/* @__PURE__ */ jsx24("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-agg-foreground", children: /* @__PURE__ */ jsx24(Icon, { name: "email", size: "small", color: "currentColor" }) }),
|
|
2645
|
+
/* @__PURE__ */ jsx24("span", { className: "text-agg-base font-agg-normal leading-6 text-agg-foreground whitespace-nowrap", children: email != null ? email : "Connect email" })
|
|
2198
2646
|
] }),
|
|
2199
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ jsx24(Icon, { name: "chevron-right", size: "small", color: "currentColor" })
|
|
2200
2648
|
]
|
|
2201
2649
|
}
|
|
2202
2650
|
)
|
|
@@ -2206,7 +2654,7 @@ var AccountsWalletsTab = ({
|
|
|
2206
2654
|
AccountsWalletsTab.displayName = "AccountsWalletsTab";
|
|
2207
2655
|
|
|
2208
2656
|
// src/profile/index.tsx
|
|
2209
|
-
import { jsx as
|
|
2657
|
+
import { jsx as jsx25, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2210
2658
|
var ProfileModal = ({
|
|
2211
2659
|
open,
|
|
2212
2660
|
onOpenChange,
|
|
@@ -2226,15 +2674,15 @@ var ProfileModal = ({
|
|
|
2226
2674
|
onDisconnectTelegram,
|
|
2227
2675
|
onConnectEmail
|
|
2228
2676
|
}) => {
|
|
2229
|
-
const [activeTab, setActiveTab] =
|
|
2230
|
-
const [draftUsername, setDraftUsername] =
|
|
2231
|
-
const [draftAvatarFile, setDraftAvatarFile] =
|
|
2232
|
-
const [draftAvatarPreview, setDraftAvatarPreview] =
|
|
2233
|
-
const [isSaving, setIsSaving] =
|
|
2677
|
+
const [activeTab, setActiveTab] = useState12(PROFILE_TAB_KEYS.ABOUT);
|
|
2678
|
+
const [draftUsername, setDraftUsername] = useState12(username != null ? username : "");
|
|
2679
|
+
const [draftAvatarFile, setDraftAvatarFile] = useState12();
|
|
2680
|
+
const [draftAvatarPreview, setDraftAvatarPreview] = useState12();
|
|
2681
|
+
const [isSaving, setIsSaving] = useState12(false);
|
|
2234
2682
|
useEffect2(() => {
|
|
2235
2683
|
setDraftUsername(username != null ? username : "");
|
|
2236
2684
|
}, [username]);
|
|
2237
|
-
const handleOpenChange =
|
|
2685
|
+
const handleOpenChange = useCallback12(
|
|
2238
2686
|
(isOpen) => {
|
|
2239
2687
|
if (!isOpen) {
|
|
2240
2688
|
setActiveTab(PROFILE_TAB_KEYS.ABOUT);
|
|
@@ -2255,7 +2703,7 @@ var ProfileModal = ({
|
|
|
2255
2703
|
setDraftAvatarPreview
|
|
2256
2704
|
]
|
|
2257
2705
|
);
|
|
2258
|
-
const handleDraftAvatarChange =
|
|
2706
|
+
const handleDraftAvatarChange = useCallback12(
|
|
2259
2707
|
(file, preview) => {
|
|
2260
2708
|
setDraftAvatarFile(file);
|
|
2261
2709
|
setDraftAvatarPreview(preview);
|
|
@@ -2263,7 +2711,7 @@ var ProfileModal = ({
|
|
|
2263
2711
|
[]
|
|
2264
2712
|
);
|
|
2265
2713
|
const hasChanges = draftUsername !== (username != null ? username : "") || draftAvatarFile !== void 0;
|
|
2266
|
-
const handleSave =
|
|
2714
|
+
const handleSave = useCallback12(() => {
|
|
2267
2715
|
setIsSaving(true);
|
|
2268
2716
|
onSave({
|
|
2269
2717
|
username: draftUsername || void 0,
|
|
@@ -2275,16 +2723,16 @@ var ProfileModal = ({
|
|
|
2275
2723
|
onOpenChange(false);
|
|
2276
2724
|
}, 500);
|
|
2277
2725
|
}, [draftUsername, draftAvatarFile, draftAvatarPreview, onSave, onOpenChange]);
|
|
2278
|
-
const handleCancel =
|
|
2726
|
+
const handleCancel = useCallback12(() => {
|
|
2279
2727
|
handleOpenChange(false);
|
|
2280
2728
|
}, [handleOpenChange]);
|
|
2281
|
-
return /* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
/* @__PURE__ */
|
|
2285
|
-
/* @__PURE__ */
|
|
2729
|
+
return /* @__PURE__ */ jsx25(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs25(Modal.Container, { maxWidth: "800px", "aria-label": "Edit Profile", children: [
|
|
2730
|
+
/* @__PURE__ */ jsx25(Modal.Header, { title: "Edit Profile" }),
|
|
2731
|
+
/* @__PURE__ */ jsx25(Modal.Body, { children: /* @__PURE__ */ jsxs25("div", { className: "flex flex-col sm:flex-row sm:gap-10", children: [
|
|
2732
|
+
/* @__PURE__ */ jsxs25("div", { className: "shrink-0", children: [
|
|
2733
|
+
/* @__PURE__ */ jsx25("div", { className: "flex gap-2 sm:hidden mb-6", children: PROFILE_TAB_ITEMS.map((tab) => {
|
|
2286
2734
|
const isActive = activeTab === tab.value;
|
|
2287
|
-
return /* @__PURE__ */
|
|
2735
|
+
return /* @__PURE__ */ jsxs25(
|
|
2288
2736
|
"button",
|
|
2289
2737
|
{
|
|
2290
2738
|
type: "button",
|
|
@@ -2297,14 +2745,14 @@ var ProfileModal = ({
|
|
|
2297
2745
|
isActive ? "font-agg-normal text-agg-foreground bg-agg-secondary-hover border-agg-primary" : "font-agg-normal text-agg-foreground border-transparent"
|
|
2298
2746
|
),
|
|
2299
2747
|
children: [
|
|
2300
|
-
/* @__PURE__ */
|
|
2301
|
-
/* @__PURE__ */
|
|
2748
|
+
/* @__PURE__ */ jsx25(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
|
|
2749
|
+
/* @__PURE__ */ jsx25("span", { className: "whitespace-nowrap", children: tab.label })
|
|
2302
2750
|
]
|
|
2303
2751
|
},
|
|
2304
2752
|
tab.value
|
|
2305
2753
|
);
|
|
2306
2754
|
}) }),
|
|
2307
|
-
/* @__PURE__ */
|
|
2755
|
+
/* @__PURE__ */ jsx25(
|
|
2308
2756
|
"nav",
|
|
2309
2757
|
{
|
|
2310
2758
|
className: cn(
|
|
@@ -2319,7 +2767,7 @@ var ProfileModal = ({
|
|
|
2319
2767
|
"aria-label": "Profile sections",
|
|
2320
2768
|
children: PROFILE_TAB_ITEMS.map((tab) => {
|
|
2321
2769
|
const isActive = activeTab === tab.value;
|
|
2322
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ jsxs25(
|
|
2323
2771
|
"button",
|
|
2324
2772
|
{
|
|
2325
2773
|
type: "button",
|
|
@@ -2334,9 +2782,9 @@ var ProfileModal = ({
|
|
|
2334
2782
|
isActive ? "font-agg-normal text-agg-foreground bg-agg-secondary-hover" : "font-agg-normal text-agg-foreground"
|
|
2335
2783
|
),
|
|
2336
2784
|
children: [
|
|
2337
|
-
isActive ? /* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2785
|
+
isActive ? /* @__PURE__ */ jsx25("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-agg-primary" }) : null,
|
|
2786
|
+
/* @__PURE__ */ jsx25(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
|
|
2787
|
+
/* @__PURE__ */ jsx25("span", { className: "shrink-0 whitespace-nowrap", children: tab.label })
|
|
2340
2788
|
]
|
|
2341
2789
|
},
|
|
2342
2790
|
tab.value
|
|
@@ -2345,8 +2793,8 @@ var ProfileModal = ({
|
|
|
2345
2793
|
}
|
|
2346
2794
|
)
|
|
2347
2795
|
] }),
|
|
2348
|
-
/* @__PURE__ */
|
|
2349
|
-
activeTab === PROFILE_TAB_KEYS.ABOUT ? /* @__PURE__ */
|
|
2796
|
+
/* @__PURE__ */ jsxs25("div", { className: "min-w-0 flex-1", children: [
|
|
2797
|
+
activeTab === PROFILE_TAB_KEYS.ABOUT ? /* @__PURE__ */ jsx25(
|
|
2350
2798
|
AboutTab,
|
|
2351
2799
|
{
|
|
2352
2800
|
username,
|
|
@@ -2359,7 +2807,7 @@ var ProfileModal = ({
|
|
|
2359
2807
|
draftAvatarPreview
|
|
2360
2808
|
}
|
|
2361
2809
|
) : null,
|
|
2362
|
-
activeTab === PROFILE_TAB_KEYS.ACCOUNTS_WALLETS ? /* @__PURE__ */
|
|
2810
|
+
activeTab === PROFILE_TAB_KEYS.ACCOUNTS_WALLETS ? /* @__PURE__ */ jsx25(
|
|
2363
2811
|
AccountsWalletsTab,
|
|
2364
2812
|
{
|
|
2365
2813
|
exchanges,
|
|
@@ -2377,9 +2825,9 @@ var ProfileModal = ({
|
|
|
2377
2825
|
) : null
|
|
2378
2826
|
] })
|
|
2379
2827
|
] }) }),
|
|
2380
|
-
/* @__PURE__ */
|
|
2381
|
-
/* @__PURE__ */
|
|
2382
|
-
/* @__PURE__ */
|
|
2828
|
+
/* @__PURE__ */ jsxs25(Modal.Footer, { children: [
|
|
2829
|
+
/* @__PURE__ */ jsx25(Button, { variant: "secondary", size: "large", onClick: handleCancel, className: "min-w-[120px]", children: "Cancel" }),
|
|
2830
|
+
/* @__PURE__ */ jsx25(
|
|
2383
2831
|
Button,
|
|
2384
2832
|
{
|
|
2385
2833
|
variant: "primary",
|
|
@@ -2397,6 +2845,7 @@ ProfileModal.displayName = "ProfileModal";
|
|
|
2397
2845
|
|
|
2398
2846
|
export {
|
|
2399
2847
|
DepositModal,
|
|
2848
|
+
OnrampModal,
|
|
2400
2849
|
WithdrawModal,
|
|
2401
2850
|
HowItWorksStep,
|
|
2402
2851
|
ProfileSetupStep,
|