@hyperbridge/ui 0.0.4 → 0.0.5
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-O7MCYCGJ.mjs → chunk-WFUCFRU6.mjs} +12 -23
- package/dist/icons/index.mjs +1 -1
- package/dist/index.d.mts +103 -52
- package/dist/index.mjs +1570 -1380
- package/package.json +3 -3
- package/styles/base.css +3 -0
package/dist/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
__objRest,
|
|
30
30
|
__spreadProps,
|
|
31
31
|
__spreadValues
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-WFUCFRU6.mjs";
|
|
33
33
|
|
|
34
34
|
// src/components/atoms/search-input.tsx
|
|
35
35
|
import { cva } from "class-variance-authority";
|
|
@@ -48,14 +48,6 @@ function shortenAccountAddress(address, length = 6) {
|
|
|
48
48
|
address.length - length
|
|
49
49
|
)}`;
|
|
50
50
|
}
|
|
51
|
-
var defaultPolkadotImage = {
|
|
52
|
-
name: "Polkadot",
|
|
53
|
-
src: "https://app.hyperbridge.network/networks/polkadot.png"
|
|
54
|
-
};
|
|
55
|
-
var defaultEvmImage = {
|
|
56
|
-
name: "Ethereum",
|
|
57
|
-
src: "https://app.hyperbridge.network/networks/ethereum.png"
|
|
58
|
-
};
|
|
59
51
|
|
|
60
52
|
// src/components/atoms/search-input.tsx
|
|
61
53
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -97,7 +89,7 @@ function SearchInput(_a) {
|
|
|
97
89
|
);
|
|
98
90
|
}
|
|
99
91
|
var searchInput = cva(
|
|
100
|
-
"
|
|
92
|
+
"pl-[1.875rem] text-white py-[0.5rem] flex-1 h-full !outline-none rounded-md ring-1 ring-transparent focus:text-brand-white-500 focus-visible:ring-brand-black-300 placeholder:text-brand-black-100 pr-[0.625rem]",
|
|
101
93
|
{
|
|
102
94
|
variants: {
|
|
103
95
|
size: {
|
|
@@ -126,7 +118,7 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
126
118
|
import { cva as cva2 } from "class-variance-authority";
|
|
127
119
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
128
120
|
var variant_ = {
|
|
129
|
-
|
|
121
|
+
display: "text-display font-bold",
|
|
130
122
|
h1: "text-h1 font-bold",
|
|
131
123
|
h2: "text-h2 font-medium",
|
|
132
124
|
h3: "text-h3 font-bold",
|
|
@@ -134,6 +126,7 @@ var variant_ = {
|
|
|
134
126
|
h5: "text-h5 font-bold",
|
|
135
127
|
h6: "text-h6 font-bold",
|
|
136
128
|
h7: "text-[1.25rem] font-medium",
|
|
129
|
+
title: "text-title",
|
|
137
130
|
body1: "text-body-2 font-medium",
|
|
138
131
|
body2: "text-body font-medium",
|
|
139
132
|
p: "text-base font-normal",
|
|
@@ -189,7 +182,7 @@ function BadgeIcon(props) {
|
|
|
189
182
|
{
|
|
190
183
|
"data-chain": "true",
|
|
191
184
|
"data-token": "BNC",
|
|
192
|
-
className: "relative rounded-full w-[var(--badge-size)] h-[var(--badge-size)]",
|
|
185
|
+
className: "relative rounded-full w-[var(--badge-size)] h-[var(--badge-size)] shrink-0",
|
|
193
186
|
style: {
|
|
194
187
|
fontSize: size,
|
|
195
188
|
"--badge-size": size
|
|
@@ -218,7 +211,7 @@ function BadgeIcon(props) {
|
|
|
218
211
|
"div",
|
|
219
212
|
{
|
|
220
213
|
className: cn(
|
|
221
|
-
"w-[0.4375em] h-[0.4375em] right-0 bottom-0 absolute bg-
|
|
214
|
+
"w-[0.4375em] h-[0.4375em] right-0 bottom-0 absolute bg-brand-black-300 rounded-[0.15625em] overflow-hidden outline outline-offset-[-1px] outline-neutral-900",
|
|
222
215
|
{
|
|
223
216
|
"outline-brand-black-600": outline
|
|
224
217
|
}
|
|
@@ -500,7 +493,7 @@ function TagButton(props) {
|
|
|
500
493
|
}
|
|
501
494
|
function SwapTokenButton(props) {
|
|
502
495
|
const _a = props, { token, network } = _a, _props = __objRest(_a, ["token", "network"]);
|
|
503
|
-
return /* @__PURE__ */ jsxs6(BaseButton, __spreadProps(__spreadValues({}, _props), { children: [
|
|
496
|
+
return /* @__PURE__ */ jsxs6(BaseButton, __spreadProps(__spreadValues({ className: "cursor-pointer" }, _props), { children: [
|
|
504
497
|
/* @__PURE__ */ jsx7("span", { className: "inline-flex text-[0.875rem]", children: /* @__PURE__ */ jsx7(
|
|
505
498
|
BadgeIcon,
|
|
506
499
|
{
|
|
@@ -596,6 +589,9 @@ function Input(_a) {
|
|
|
596
589
|
// src/lib/form-utils.ts
|
|
597
590
|
var createKeyDownHandler = () => {
|
|
598
591
|
return (e) => {
|
|
592
|
+
if (e.ctrlKey || e.metaKey || e.altKey) {
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
599
595
|
if (["e", "E", "+", "-"].includes(e.key) || /^[a-zA-Z]$/.test(e.key)) {
|
|
600
596
|
e.preventDefault();
|
|
601
597
|
}
|
|
@@ -603,57 +599,30 @@ var createKeyDownHandler = () => {
|
|
|
603
599
|
};
|
|
604
600
|
|
|
605
601
|
// src/components/form/swap-form.tsx
|
|
602
|
+
import { useState } from "react";
|
|
606
603
|
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
607
604
|
function SwapForm({
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
symbol: "DOT",
|
|
614
|
-
image: "https://app.hyperbridge.network/networks/polkadot.png",
|
|
615
|
-
network: {
|
|
616
|
-
name: "Polkadot",
|
|
617
|
-
image: "https://app.hyperbridge.network/networks/polkadot.png"
|
|
618
|
-
}
|
|
619
|
-
},
|
|
620
|
-
onSenderAmountChange,
|
|
621
|
-
onSenderTokenSelect,
|
|
622
|
-
receiverAddress,
|
|
623
|
-
receiverAmount = "0",
|
|
624
|
-
receiverUsdValue = "0",
|
|
625
|
-
receiverToken = {
|
|
626
|
-
symbol: "DOT",
|
|
627
|
-
image: "https://app.hyperbridge.network/networks/polkadot.png",
|
|
628
|
-
network: {
|
|
629
|
-
name: "Ethereum",
|
|
630
|
-
image: "https://app.hyperbridge.network/networks/ethereum.png"
|
|
631
|
-
}
|
|
605
|
+
sender,
|
|
606
|
+
receiver,
|
|
607
|
+
percentage = {
|
|
608
|
+
options: [25, 50, 100],
|
|
609
|
+
value: null
|
|
632
610
|
},
|
|
633
|
-
|
|
634
|
-
onReceiverAddressEdit,
|
|
635
|
-
percentagePresets = [25, 50, 100],
|
|
636
|
-
activePercentage = null,
|
|
637
|
-
onPercentageClick,
|
|
638
|
-
onPercentageReset,
|
|
611
|
+
onPercentageChange,
|
|
639
612
|
onInvert,
|
|
640
|
-
estimatedTime = "
|
|
613
|
+
estimatedTime = "",
|
|
641
614
|
isLoading = false,
|
|
642
615
|
className,
|
|
643
616
|
error = false
|
|
644
617
|
}) {
|
|
618
|
+
var _a;
|
|
645
619
|
const handleKeyDown = createKeyDownHandler();
|
|
646
|
-
const
|
|
647
|
-
const numericBalance = Number.parseFloat(senderBalance.replace(/[^\d.]/g, "")) || 0;
|
|
648
|
-
const amount = numericBalance * percentage / 100;
|
|
649
|
-
onSenderAmountChange == null ? void 0 : onSenderAmountChange(amount.toString());
|
|
650
|
-
onPercentageClick == null ? void 0 : onPercentageClick(percentage);
|
|
651
|
-
};
|
|
620
|
+
const [focusedSection, setFocusedSection] = useState("sender");
|
|
652
621
|
const handleInvert = () => {
|
|
653
622
|
onInvert == null ? void 0 : onInvert();
|
|
654
623
|
};
|
|
655
|
-
const formatPercentageLabel = (
|
|
656
|
-
return
|
|
624
|
+
const formatPercentageLabel = (percentage2) => {
|
|
625
|
+
return percentage2 === 100 ? "Max" : `${percentage2}%`;
|
|
657
626
|
};
|
|
658
627
|
return /* @__PURE__ */ jsxs7(
|
|
659
628
|
"div",
|
|
@@ -671,154 +640,199 @@ function SwapForm({
|
|
|
671
640
|
"relative h-1/2 -mx-[1.5px] rounded-[16px] p-[1.5px] transition-all duration-200",
|
|
672
641
|
error ? "bg-brand-danger-500 focus-within:bg-brand-danger-500/60 hover:bg-brand-danger-500/60" : "bridge-form-border"
|
|
673
642
|
),
|
|
674
|
-
children: /* @__PURE__ */ jsxs7(
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
" "
|
|
680
|
-
/* @__PURE__ */ jsx10("span", { className: "text-white max-w-[100px] truncate", children: isLoading ? /* @__PURE__ */ jsx10(
|
|
681
|
-
"div",
|
|
682
|
-
{
|
|
683
|
-
className: cn(
|
|
684
|
-
"w-8 h-3 bg-brand-black-200 animate-pulse rounded",
|
|
685
|
-
error && "text-danger-500"
|
|
686
|
-
)
|
|
687
|
-
}
|
|
688
|
-
) : senderBalance })
|
|
689
|
-
] }) })
|
|
690
|
-
] }),
|
|
691
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex mt-3", children: [
|
|
692
|
-
/* @__PURE__ */ jsx10(
|
|
693
|
-
Input,
|
|
694
|
-
{
|
|
695
|
-
min: 0,
|
|
696
|
-
type: "number",
|
|
697
|
-
placeholder: "0",
|
|
698
|
-
value: senderAmount,
|
|
699
|
-
onChange: (event) => {
|
|
700
|
-
onSenderAmountChange == null ? void 0 : onSenderAmountChange(event.target.value, event);
|
|
701
|
-
onPercentageReset == null ? void 0 : onPercentageReset();
|
|
702
|
-
},
|
|
703
|
-
onKeyDown: handleKeyDown,
|
|
704
|
-
disabled: isLoading,
|
|
705
|
-
"data-testid": "sender-amount-input",
|
|
706
|
-
className: "border-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 text-[48px] leading-[1.2] h-[58px] p-0 text-white placeholder:text-brand-black-100 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50"
|
|
707
|
-
}
|
|
708
|
-
),
|
|
709
|
-
/* @__PURE__ */ jsx10("div", { className: "w-[170px] pl-3 py-[13px]", children: /* @__PURE__ */ jsx10(
|
|
710
|
-
SwapTokenButton,
|
|
711
|
-
{
|
|
712
|
-
network: senderToken.network,
|
|
713
|
-
token: { image: senderToken.image, symbol: senderToken.symbol },
|
|
714
|
-
onClick: onSenderTokenSelect,
|
|
715
|
-
disabled: isLoading
|
|
716
|
-
}
|
|
717
|
-
) })
|
|
718
|
-
] }),
|
|
719
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex justify-between pt-1 pb-3", children: [
|
|
720
|
-
/* @__PURE__ */ jsxs7(
|
|
721
|
-
"div",
|
|
722
|
-
{
|
|
723
|
-
"data-testid": "sender-usd-value",
|
|
724
|
-
className: "flex items-center text-caption text-brand-black-100 font-medium min-h-6",
|
|
725
|
-
children: [
|
|
726
|
-
"$",
|
|
727
|
-
isLoading ? /* @__PURE__ */ jsx10("div", { className: "w-8 h-3 bg-brand-black-200 animate-pulse rounded ml-1" }) : senderUsdValue
|
|
728
|
-
]
|
|
729
|
-
}
|
|
643
|
+
children: /* @__PURE__ */ jsxs7(
|
|
644
|
+
"div",
|
|
645
|
+
{
|
|
646
|
+
className: cn(
|
|
647
|
+
"rounded-[14.5px] h-full p-3 relative transition-colors duration-200",
|
|
648
|
+
focusedSection === "sender" ? "bg-brand-black-500" : "bg-brand-black-550"
|
|
730
649
|
),
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
"
|
|
738
|
-
|
|
650
|
+
children: [
|
|
651
|
+
/* @__PURE__ */ jsxs7("div", { className: "w-full flex justify-between", children: [
|
|
652
|
+
/* @__PURE__ */ jsx10("div", { className: "w-1/2", children: /* @__PURE__ */ jsx10("p", { className: "text-caption text-brand-black-100 font-medium", children: "Send" }) }),
|
|
653
|
+
/* @__PURE__ */ jsx10("div", { className: "w-1/2", children: /* @__PURE__ */ jsxs7("div", { className: "text-caption text-brand-black-100 font-medium text-right flex items-center gap-1 justify-end", children: [
|
|
654
|
+
/* @__PURE__ */ jsx10("span", { className: "max-w-[100px] truncate", children: (_a = sender.address) != null ? _a : "Balance" }),
|
|
655
|
+
" ",
|
|
656
|
+
/* @__PURE__ */ jsx10("span", { className: "text-white max-w-[100px] truncate", children: isLoading ? /* @__PURE__ */ jsx10(
|
|
657
|
+
"div",
|
|
658
|
+
{
|
|
659
|
+
className: cn(
|
|
660
|
+
"w-8 h-3 bg-brand-black-200 animate-pulse rounded",
|
|
661
|
+
error && "text-danger-500"
|
|
662
|
+
)
|
|
663
|
+
}
|
|
664
|
+
) : sender.balance })
|
|
665
|
+
] }) })
|
|
666
|
+
] }),
|
|
667
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex mt-3", children: [
|
|
668
|
+
/* @__PURE__ */ jsx10(
|
|
669
|
+
Input,
|
|
670
|
+
{
|
|
671
|
+
min: 0,
|
|
672
|
+
type: "number",
|
|
673
|
+
placeholder: "0",
|
|
674
|
+
value: sender.amount,
|
|
675
|
+
onChange: (event) => {
|
|
676
|
+
var _a2;
|
|
677
|
+
(_a2 = sender.onAmountChange) == null ? void 0 : _a2.call(sender, event.target.value, event);
|
|
678
|
+
onPercentageChange == null ? void 0 : onPercentageChange(null);
|
|
679
|
+
},
|
|
680
|
+
onKeyDown: handleKeyDown,
|
|
681
|
+
onFocus: () => setFocusedSection("sender"),
|
|
682
|
+
onBlur: () => setFocusedSection(null),
|
|
683
|
+
disabled: isLoading,
|
|
684
|
+
"data-testid": "sender-amount-input",
|
|
685
|
+
className: "border-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 text-[48px] leading-[1.2] h-[58px] p-0 text-white placeholder:text-brand-black-100 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50 !rounded-none"
|
|
686
|
+
}
|
|
739
687
|
),
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
"
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
688
|
+
/* @__PURE__ */ jsx10("div", { className: "w-[170px] pl-3 py-[13px]", children: /* @__PURE__ */ jsx10(
|
|
689
|
+
SwapTokenButton,
|
|
690
|
+
{
|
|
691
|
+
network: sender.token.network,
|
|
692
|
+
token: {
|
|
693
|
+
image: sender.token.image,
|
|
694
|
+
symbol: sender.token.symbol
|
|
695
|
+
},
|
|
696
|
+
onClick: sender.onTokenSelect,
|
|
697
|
+
disabled: isLoading
|
|
698
|
+
}
|
|
699
|
+
) })
|
|
700
|
+
] }),
|
|
701
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex justify-between pt-1 pb-3", children: [
|
|
702
|
+
/* @__PURE__ */ jsx10(
|
|
703
|
+
"div",
|
|
704
|
+
{
|
|
705
|
+
"data-testid": "sender-usd-value",
|
|
706
|
+
className: "flex items-center text-caption text-brand-black-100 font-medium min-h-6",
|
|
707
|
+
children: isLoading ? /* @__PURE__ */ jsx10("div", { className: "w-8 h-3 bg-brand-black-200 animate-pulse rounded ml-1" }) : sender.usdValue
|
|
708
|
+
}
|
|
709
|
+
),
|
|
710
|
+
sender.address && /* @__PURE__ */ jsx10("div", { className: "flex gap-[6px]", children: percentage.options.map((percent_value) => /* @__PURE__ */ jsx10(
|
|
711
|
+
Button,
|
|
712
|
+
{
|
|
713
|
+
onClick: () => onPercentageChange == null ? void 0 : onPercentageChange(percent_value),
|
|
714
|
+
disabled: isLoading,
|
|
715
|
+
className: cn(
|
|
716
|
+
"rounded-[60px] h-6 py-1 px-[9.5px] text-caption transition-colors",
|
|
717
|
+
percentage.value === percent_value ? "bg-white text-brand-black-500 hover:bg-white/90" : "text-brand-black-100 hover:text-white hover:bg-brand-black-200"
|
|
718
|
+
),
|
|
719
|
+
variant: "message",
|
|
720
|
+
size: "sm",
|
|
721
|
+
children: formatPercentageLabel(percent_value)
|
|
722
|
+
},
|
|
723
|
+
percent_value
|
|
724
|
+
)) })
|
|
725
|
+
] }),
|
|
726
|
+
/* @__PURE__ */ jsx10(
|
|
727
|
+
"button",
|
|
757
728
|
{
|
|
758
|
-
|
|
729
|
+
type: "button",
|
|
730
|
+
onClick: handleInvert,
|
|
731
|
+
disabled: isLoading,
|
|
732
|
+
"aria-label": "ArrowDownUp",
|
|
733
|
+
className: "absolute group z-[2] -bottom-[15px] left-1/2 -translate-x-1/2 bg-brand-black-200 rounded-[8px] p-[6px] border-[3px] border-brand-black-500 cursor-pointer hover:scale-105 transition-all duration-200 disabled:cursor-not-allowed disabled:hover:scale-100",
|
|
734
|
+
children: /* @__PURE__ */ jsx10(
|
|
735
|
+
ArrowBottomTop_default,
|
|
736
|
+
{
|
|
737
|
+
className: "text-brand-black-100 size-3.5 transition-transform duration-200"
|
|
738
|
+
}
|
|
739
|
+
)
|
|
759
740
|
}
|
|
760
741
|
)
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
)
|
|
764
745
|
}
|
|
765
746
|
),
|
|
766
|
-
/* @__PURE__ */
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
" ",
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
type: "button",
|
|
776
|
-
onClick: onReceiverAddressEdit,
|
|
777
|
-
disabled: isLoading,
|
|
778
|
-
"aria-label": "Edit receiver's address",
|
|
779
|
-
className: "cursor-pointer hover:scale-110 transition-transform disabled:opacity-50 ml-1",
|
|
780
|
-
children: /* @__PURE__ */ jsx10(Pen_default, { className: "size-3.5" })
|
|
781
|
-
}
|
|
782
|
-
)
|
|
783
|
-
] }) })
|
|
784
|
-
] }),
|
|
785
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex mt-3", children: [
|
|
786
|
-
/* @__PURE__ */ jsx10("div", { className: "w-full text-[48px] leading-[1.2] h-[58px] flex items-center", children: isLoading ? /* @__PURE__ */ jsx10("div", { className: "w-16 h-12 bg-brand-black-200 animate-pulse rounded" }) : /* @__PURE__ */ jsx10(
|
|
787
|
-
"span",
|
|
788
|
-
{
|
|
789
|
-
"data-testid": "receiver-amount",
|
|
790
|
-
className: "text-brand-black-100 max-w-[250px] truncate",
|
|
791
|
-
children: receiverAmount
|
|
792
|
-
}
|
|
793
|
-
) }),
|
|
794
|
-
/* @__PURE__ */ jsx10("div", { className: "w-[170px] pl-3 py-[13px]", children: /* @__PURE__ */ jsx10(
|
|
795
|
-
SwapTokenButton,
|
|
796
|
-
{
|
|
797
|
-
network: receiverToken.network,
|
|
798
|
-
token: {
|
|
799
|
-
image: receiverToken.image,
|
|
800
|
-
symbol: receiverToken.symbol
|
|
801
|
-
},
|
|
802
|
-
onClick: onReceiverTokenSelect,
|
|
803
|
-
disabled: isLoading
|
|
804
|
-
}
|
|
805
|
-
) })
|
|
806
|
-
] }),
|
|
807
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex justify-between pt-1 pb-3", children: [
|
|
808
|
-
/* @__PURE__ */ jsxs7(
|
|
747
|
+
/* @__PURE__ */ jsx10(
|
|
748
|
+
"div",
|
|
749
|
+
{
|
|
750
|
+
"data-testid": "receive-section",
|
|
751
|
+
className: cn(
|
|
752
|
+
"relative mt-0.5 h-1/2 -mx-[1.5px] rounded-[16px] p-[1.5px] transition-all duration-200",
|
|
753
|
+
error ? "bg-brand-danger-500 focus-within:bg-brand-danger-500/60 hover:bg-brand-danger-500/60" : "bridge-form-border"
|
|
754
|
+
),
|
|
755
|
+
children: /* @__PURE__ */ jsxs7(
|
|
809
756
|
"div",
|
|
810
757
|
{
|
|
811
|
-
|
|
812
|
-
|
|
758
|
+
className: cn(
|
|
759
|
+
"rounded-[14.5px] h-full p-3 relative transition-colors duration-200",
|
|
760
|
+
focusedSection === "receiver" ? "bg-brand-black-500" : "bg-brand-black-550"
|
|
761
|
+
),
|
|
813
762
|
children: [
|
|
814
|
-
"
|
|
815
|
-
|
|
763
|
+
/* @__PURE__ */ jsxs7("div", { className: "w-full flex justify-between", children: [
|
|
764
|
+
/* @__PURE__ */ jsx10("div", { className: "w-1/2", children: /* @__PURE__ */ jsx10("div", { className: "text-caption text-brand-black-100 font-medium", children: "Receive" }) }),
|
|
765
|
+
receiver.address && /* @__PURE__ */ jsx10("div", { className: "w-1/2", children: /* @__PURE__ */ jsx10("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs7(
|
|
766
|
+
"button",
|
|
767
|
+
{
|
|
768
|
+
type: "button",
|
|
769
|
+
disabled: isLoading,
|
|
770
|
+
onClick: receiver.onAddressEdit,
|
|
771
|
+
"aria-label": "Edit receiver address",
|
|
772
|
+
className: "cursor-pointer flex !gap-1.5 !text-caption text-brand-black-100 font-medium text-right items-center justify-end w-1/2",
|
|
773
|
+
children: [
|
|
774
|
+
/* @__PURE__ */ jsx10("span", { className: "max-w-[100px]", children: receiver.address }),
|
|
775
|
+
/* @__PURE__ */ jsx10(
|
|
776
|
+
"span",
|
|
777
|
+
{
|
|
778
|
+
"aria-label": "Edit address",
|
|
779
|
+
className: "cursor-pointer text-foreground hover:scale-110 transition-transform disabled:opacity-50",
|
|
780
|
+
children: /* @__PURE__ */ jsx10(Pen_default, { className: "size-[0.875rem]" })
|
|
781
|
+
}
|
|
782
|
+
)
|
|
783
|
+
]
|
|
784
|
+
}
|
|
785
|
+
) }) })
|
|
786
|
+
] }),
|
|
787
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex mt-3", children: [
|
|
788
|
+
/* @__PURE__ */ jsx10(
|
|
789
|
+
Input,
|
|
790
|
+
{
|
|
791
|
+
min: 0,
|
|
792
|
+
type: "number",
|
|
793
|
+
placeholder: "0",
|
|
794
|
+
value: receiver.amount,
|
|
795
|
+
onChange: (event) => {
|
|
796
|
+
var _a2;
|
|
797
|
+
(_a2 = receiver.onAmountChange) == null ? void 0 : _a2.call(receiver, event.target.value, event);
|
|
798
|
+
},
|
|
799
|
+
onKeyDown: handleKeyDown,
|
|
800
|
+
onFocus: () => setFocusedSection("receiver"),
|
|
801
|
+
onBlur: () => setFocusedSection(null),
|
|
802
|
+
disabled: isLoading,
|
|
803
|
+
"data-testid": "receiver-amount-input",
|
|
804
|
+
className: "border-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 text-[48px] leading-[1.2] h-[58px] p-0 text-brand-black-100 placeholder:text-brand-black-100 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50 !rounded-none"
|
|
805
|
+
}
|
|
806
|
+
),
|
|
807
|
+
/* @__PURE__ */ jsx10("div", { className: "w-[170px] pl-3 py-[13px]", children: /* @__PURE__ */ jsx10(
|
|
808
|
+
SwapTokenButton,
|
|
809
|
+
{
|
|
810
|
+
network: receiver.token.network,
|
|
811
|
+
token: {
|
|
812
|
+
image: receiver.token.image,
|
|
813
|
+
symbol: receiver.token.symbol
|
|
814
|
+
},
|
|
815
|
+
onClick: receiver.onTokenSelect,
|
|
816
|
+
disabled: isLoading
|
|
817
|
+
}
|
|
818
|
+
) })
|
|
819
|
+
] }),
|
|
820
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex justify-between pt-1 pb-3", children: [
|
|
821
|
+
/* @__PURE__ */ jsx10(
|
|
822
|
+
"div",
|
|
823
|
+
{
|
|
824
|
+
"data-testid": "receiver-usd-value",
|
|
825
|
+
className: "flex items-center text-caption text-brand-black-100 font-medium",
|
|
826
|
+
children: isLoading ? /* @__PURE__ */ jsx10("div", { className: "w-8 h-3 bg-brand-black-200 animate-pulse rounded ml-1" }) : receiver.usdValue
|
|
827
|
+
}
|
|
828
|
+
),
|
|
829
|
+
sender.address && receiver.address && /* @__PURE__ */ jsx10("div", { className: "text-brand-black-100 text-caption font-medium", children: isLoading ? /* @__PURE__ */ jsx10("div", { className: "w-12 h-3 bg-brand-black-200 animate-pulse rounded" }) : `~ ${estimatedTime}` })
|
|
830
|
+
] })
|
|
816
831
|
]
|
|
817
832
|
}
|
|
818
|
-
)
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
] })
|
|
833
|
+
)
|
|
834
|
+
}
|
|
835
|
+
)
|
|
822
836
|
]
|
|
823
837
|
}
|
|
824
838
|
);
|
|
@@ -960,64 +974,23 @@ function NetworkSwitcherButton(props) {
|
|
|
960
974
|
import { useMemo } from "react";
|
|
961
975
|
|
|
962
976
|
// src/components/molecules/modal.tsx
|
|
963
|
-
import {
|
|
964
|
-
import { useEffect
|
|
977
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
978
|
+
import { useEffect as useEffect2 } from "react";
|
|
965
979
|
|
|
966
|
-
// src
|
|
967
|
-
import {
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
DrawerPrimitive.Overlay,
|
|
981
|
-
__spreadValues({
|
|
982
|
-
"data-slot": "drawer-overlay",
|
|
983
|
-
className: cn(
|
|
984
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
985
|
-
className
|
|
986
|
-
)
|
|
987
|
-
}, props)
|
|
988
|
-
);
|
|
989
|
-
}
|
|
990
|
-
function DrawerContent(_a) {
|
|
991
|
-
var _b = _a, {
|
|
992
|
-
className,
|
|
993
|
-
children
|
|
994
|
-
} = _b, props = __objRest(_b, [
|
|
995
|
-
"className",
|
|
996
|
-
"children"
|
|
997
|
-
]);
|
|
998
|
-
return /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
999
|
-
/* @__PURE__ */ jsx14(DrawerOverlay, {}),
|
|
1000
|
-
/* @__PURE__ */ jsxs9(
|
|
1001
|
-
DrawerPrimitive.Content,
|
|
1002
|
-
__spreadProps(__spreadValues({
|
|
1003
|
-
"data-slot": "drawer-content",
|
|
1004
|
-
className: cn(
|
|
1005
|
-
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
1006
|
-
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
1007
|
-
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
1008
|
-
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
1009
|
-
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
1010
|
-
className
|
|
1011
|
-
)
|
|
1012
|
-
}, props), {
|
|
1013
|
-
children: [
|
|
1014
|
-
/* @__PURE__ */ jsx14("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
1015
|
-
children
|
|
1016
|
-
]
|
|
1017
|
-
})
|
|
1018
|
-
)
|
|
1019
|
-
] });
|
|
1020
|
-
}
|
|
980
|
+
// src/hooks/is-mobile.ts
|
|
981
|
+
import { useEffect, useState as useState2 } from "react";
|
|
982
|
+
var useIsMobile = () => {
|
|
983
|
+
const [isMobile, setIsMobile] = useState2(false);
|
|
984
|
+
useEffect(() => {
|
|
985
|
+
const checkIsMobile = () => {
|
|
986
|
+
setIsMobile(window.innerWidth < 768);
|
|
987
|
+
};
|
|
988
|
+
checkIsMobile();
|
|
989
|
+
window.addEventListener("resize", checkIsMobile);
|
|
990
|
+
return () => window.removeEventListener("resize", checkIsMobile);
|
|
991
|
+
}, []);
|
|
992
|
+
return isMobile;
|
|
993
|
+
};
|
|
1021
994
|
|
|
1022
995
|
// src/lib/animations.ts
|
|
1023
996
|
var modalVariants = {
|
|
@@ -1129,66 +1102,118 @@ var animationPresets = {
|
|
|
1129
1102
|
}
|
|
1130
1103
|
};
|
|
1131
1104
|
|
|
1132
|
-
// src/
|
|
1133
|
-
import {
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
window.removeEventListener("resize", checkMobile);
|
|
1150
|
-
};
|
|
1151
|
-
}, []);
|
|
1152
|
-
useEffect(() => {
|
|
1153
|
-
const handleEscapeKey = (event) => {
|
|
1154
|
-
if (event.key === "Escape" && isOpen && onClose && !isMobile) {
|
|
1155
|
-
onClose();
|
|
1156
|
-
}
|
|
1157
|
-
};
|
|
1158
|
-
if (isOpen && !isMobile) {
|
|
1159
|
-
document.addEventListener("keydown", handleEscapeKey);
|
|
1160
|
-
}
|
|
1161
|
-
return () => {
|
|
1162
|
-
document.removeEventListener("keydown", handleEscapeKey);
|
|
1163
|
-
};
|
|
1164
|
-
}, [isOpen, onClose, isMobile]);
|
|
1165
|
-
const { variants, transition } = animationPresets[animationPreset];
|
|
1166
|
-
if (isMobile) {
|
|
1167
|
-
return /* @__PURE__ */ jsx15(Drawer, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsx15(DrawerContent, { className: "bg-brand-black-550 border-brand-black-300 min-h-[90dvh]", children }) });
|
|
1168
|
-
}
|
|
1169
|
-
return /* @__PURE__ */ jsx15(AnimatePresence, { mode: "wait", children: isOpen && /* @__PURE__ */ jsx15(
|
|
1170
|
-
motion.div,
|
|
1171
|
-
{
|
|
1105
|
+
// src/@/ui/drawer.tsx
|
|
1106
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
1107
|
+
import { Fragment, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1108
|
+
function Drawer(_a) {
|
|
1109
|
+
var props = __objRest(_a, []);
|
|
1110
|
+
return /* @__PURE__ */ jsx14(DrawerPrimitive.Root, __spreadValues({ "data-slot": "drawer" }, props));
|
|
1111
|
+
}
|
|
1112
|
+
function DrawerOverlay(_a) {
|
|
1113
|
+
var _b = _a, {
|
|
1114
|
+
className
|
|
1115
|
+
} = _b, props = __objRest(_b, [
|
|
1116
|
+
"className"
|
|
1117
|
+
]);
|
|
1118
|
+
return /* @__PURE__ */ jsx14(
|
|
1119
|
+
DrawerPrimitive.Overlay,
|
|
1120
|
+
__spreadValues({
|
|
1121
|
+
"data-slot": "drawer-overlay",
|
|
1172
1122
|
className: cn(
|
|
1173
|
-
"
|
|
1123
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1174
1124
|
className
|
|
1175
|
-
)
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1125
|
+
)
|
|
1126
|
+
}, props)
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
function DrawerContent(_a) {
|
|
1130
|
+
var _b = _a, {
|
|
1131
|
+
className,
|
|
1132
|
+
children
|
|
1133
|
+
} = _b, props = __objRest(_b, [
|
|
1134
|
+
"className",
|
|
1135
|
+
"children"
|
|
1136
|
+
]);
|
|
1137
|
+
return /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
1138
|
+
/* @__PURE__ */ jsx14(DrawerOverlay, {}),
|
|
1139
|
+
/* @__PURE__ */ jsxs9(
|
|
1140
|
+
DrawerPrimitive.Content,
|
|
1141
|
+
__spreadProps(__spreadValues({
|
|
1142
|
+
"data-slot": "drawer-content",
|
|
1143
|
+
className: cn(
|
|
1144
|
+
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
1145
|
+
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
1146
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
1147
|
+
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
1148
|
+
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
1149
|
+
className
|
|
1150
|
+
)
|
|
1151
|
+
}, props), {
|
|
1152
|
+
children: [
|
|
1153
|
+
/* @__PURE__ */ jsx14("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
1154
|
+
children
|
|
1155
|
+
]
|
|
1156
|
+
})
|
|
1157
|
+
)
|
|
1158
|
+
] });
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
// src/components/molecules/modal.tsx
|
|
1162
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1163
|
+
var Modal = (props) => {
|
|
1164
|
+
const { isOpen, children, onClose } = props;
|
|
1165
|
+
const isMobile = useIsMobile();
|
|
1166
|
+
if (isMobile) {
|
|
1167
|
+
return /* @__PURE__ */ jsx15(Drawer, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsx15(DrawerContent, { className: "bg-brand-black-550 border-brand-black-300 min-h-[90dvh]", children }) });
|
|
1168
|
+
}
|
|
1169
|
+
return /* @__PURE__ */ jsx15(DestkopModal, __spreadValues({}, props));
|
|
1184
1170
|
};
|
|
1171
|
+
function DestkopModal(props) {
|
|
1172
|
+
const {
|
|
1173
|
+
children,
|
|
1174
|
+
animationPreset = "modal",
|
|
1175
|
+
isOpen,
|
|
1176
|
+
onClose,
|
|
1177
|
+
className
|
|
1178
|
+
} = props;
|
|
1179
|
+
const { variants, transition } = animationPresets[animationPreset];
|
|
1180
|
+
useEffect2(() => {
|
|
1181
|
+
const handleEscapeKey = (event) => {
|
|
1182
|
+
if (event.key === "Escape" && isOpen && onClose) {
|
|
1183
|
+
onClose();
|
|
1184
|
+
}
|
|
1185
|
+
};
|
|
1186
|
+
if (isOpen) {
|
|
1187
|
+
document.addEventListener("keydown", handleEscapeKey);
|
|
1188
|
+
}
|
|
1189
|
+
return () => {
|
|
1190
|
+
document.removeEventListener("keydown", handleEscapeKey);
|
|
1191
|
+
};
|
|
1192
|
+
}, [isOpen, onClose]);
|
|
1193
|
+
return /* @__PURE__ */ jsx15(AnimatePresence, { mode: "wait", children: isOpen && /* @__PURE__ */ jsx15(
|
|
1194
|
+
motion.div,
|
|
1195
|
+
{
|
|
1196
|
+
"data-modal": "true",
|
|
1197
|
+
className: cn(
|
|
1198
|
+
"absolute inset-0 z-50 bg-brand-black-550 rounded-xl w-full max-w-[440px] mx-auto overflow-hidden h-[min(515px,90vh)] flex flex-col ring-3 ring-brand-black-550",
|
|
1199
|
+
className
|
|
1200
|
+
),
|
|
1201
|
+
variants,
|
|
1202
|
+
initial: "initial",
|
|
1203
|
+
animate: "animate",
|
|
1204
|
+
exit: "exit",
|
|
1205
|
+
transition,
|
|
1206
|
+
children
|
|
1207
|
+
}
|
|
1208
|
+
) });
|
|
1209
|
+
}
|
|
1185
1210
|
|
|
1186
1211
|
// src/hooks/selector-hooks.ts
|
|
1187
|
-
import { useState as
|
|
1212
|
+
import { useState as useState4, useRef, useEffect as useEffect3 } from "react";
|
|
1188
1213
|
var useScrollBorder = () => {
|
|
1189
|
-
const [showHeaderBorder, setShowHeaderBorder] =
|
|
1214
|
+
const [showHeaderBorder, setShowHeaderBorder] = useState4(false);
|
|
1190
1215
|
const scrollableRef = useRef(null);
|
|
1191
|
-
|
|
1216
|
+
useEffect3(() => {
|
|
1192
1217
|
const scrollableElement = scrollableRef.current;
|
|
1193
1218
|
if (!scrollableElement) return;
|
|
1194
1219
|
const handleScroll = () => {
|
|
@@ -1209,7 +1234,7 @@ var useScrollBorder = () => {
|
|
|
1209
1234
|
return { showHeaderBorder, scrollableRef };
|
|
1210
1235
|
};
|
|
1211
1236
|
var useSearch = () => {
|
|
1212
|
-
const [searchQuery, setSearchQuery] =
|
|
1237
|
+
const [searchQuery, setSearchQuery] = useState4("");
|
|
1213
1238
|
const resetSearch = () => setSearchQuery("");
|
|
1214
1239
|
return { searchQuery, setSearchQuery, resetSearch };
|
|
1215
1240
|
};
|
|
@@ -1781,7 +1806,10 @@ function TokenSelectionItem(props) {
|
|
|
1781
1806
|
}
|
|
1782
1807
|
|
|
1783
1808
|
// src/components/form/bridge-form.tsx
|
|
1784
|
-
import { useState as
|
|
1809
|
+
import { useState as useState5 } from "react";
|
|
1810
|
+
|
|
1811
|
+
// src/components/form/bridge-input.tsx
|
|
1812
|
+
import React8 from "react";
|
|
1785
1813
|
|
|
1786
1814
|
// src/components/input/input.tsx
|
|
1787
1815
|
import * as React7 from "react";
|
|
@@ -1824,7 +1852,6 @@ var Input2 = React7.forwardRef((_a, ref) => {
|
|
|
1824
1852
|
Input2.displayName = "Input";
|
|
1825
1853
|
|
|
1826
1854
|
// src/components/form/bridge-input.tsx
|
|
1827
|
-
import React8 from "react";
|
|
1828
1855
|
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1829
1856
|
function BridgeInput(props) {
|
|
1830
1857
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
@@ -2203,9 +2230,9 @@ function BridgeForm({
|
|
|
2203
2230
|
onSourceNetworkSelect,
|
|
2204
2231
|
onDestinationNetworkSelect
|
|
2205
2232
|
}) {
|
|
2206
|
-
const [showDetails, setShowDetails] =
|
|
2207
|
-
const [isGasHovered, setIsGasHovered] =
|
|
2208
|
-
const [networkSelectorState, setNetworkSelectorState] =
|
|
2233
|
+
const [showDetails, setShowDetails] = useState5(false);
|
|
2234
|
+
const [isGasHovered, setIsGasHovered] = useState5(false);
|
|
2235
|
+
const [networkSelectorState, setNetworkSelectorState] = useState5(null);
|
|
2209
2236
|
const isConnected = !!senderAddress;
|
|
2210
2237
|
const handleSubmit = (e) => {
|
|
2211
2238
|
e.preventDefault();
|
|
@@ -2516,7 +2543,7 @@ function TokenSelectorDialog(props) {
|
|
|
2516
2543
|
onAddToWallet,
|
|
2517
2544
|
children
|
|
2518
2545
|
} = props;
|
|
2519
|
-
const [isTokenSelectorOpen, setIsTokenSelectorOpen] =
|
|
2546
|
+
const [isTokenSelectorOpen, setIsTokenSelectorOpen] = useState5(false);
|
|
2520
2547
|
const handleCloseTokenSelector = () => {
|
|
2521
2548
|
setIsTokenSelectorOpen(false);
|
|
2522
2549
|
};
|
|
@@ -2829,7 +2856,22 @@ function WalletProviderItem(props) {
|
|
|
2829
2856
|
children: status === "connecting" ? "Connecting" : "Connect"
|
|
2830
2857
|
}
|
|
2831
2858
|
),
|
|
2832
|
-
status === "connected" && /* @__PURE__ */
|
|
2859
|
+
status === "connected" && /* @__PURE__ */ jsxs20(
|
|
2860
|
+
Button,
|
|
2861
|
+
{
|
|
2862
|
+
size: "sm",
|
|
2863
|
+
variant: "level_2",
|
|
2864
|
+
className: "!h-8 min-w-8 !gap-0 group cursor-pointer",
|
|
2865
|
+
onClick: () => {
|
|
2866
|
+
var _a;
|
|
2867
|
+
return (_a = props == null ? void 0 : props.onDisconnect) == null ? void 0 : _a.call(props);
|
|
2868
|
+
},
|
|
2869
|
+
children: [
|
|
2870
|
+
/* @__PURE__ */ jsx29(Power_default, { className: "size-4 text-brand-black-100" }),
|
|
2871
|
+
/* @__PURE__ */ jsx29("span", { className: "w-0 transition-all overflow-hidden group-hover:w-[10ch]", children: "Disconnect" })
|
|
2872
|
+
]
|
|
2873
|
+
}
|
|
2874
|
+
)
|
|
2833
2875
|
] })
|
|
2834
2876
|
] })
|
|
2835
2877
|
] }) });
|
|
@@ -2857,7 +2899,10 @@ function AccountItem(props) {
|
|
|
2857
2899
|
/* @__PURE__ */ jsx29(
|
|
2858
2900
|
IconButton,
|
|
2859
2901
|
{
|
|
2860
|
-
className:
|
|
2902
|
+
className: cn(
|
|
2903
|
+
"group shrink-0 !size-[1.875rem] !rounded-[10px]",
|
|
2904
|
+
isActive ? "cursor-default" : "cursor-pointer"
|
|
2905
|
+
),
|
|
2861
2906
|
variant: "secondary",
|
|
2862
2907
|
onClick: handleSelect,
|
|
2863
2908
|
title: isActive ? "Already active" : "Activate this account",
|
|
@@ -2870,15 +2915,13 @@ function AccountItem(props) {
|
|
|
2870
2915
|
src: wallet.image,
|
|
2871
2916
|
alt: wallet.name,
|
|
2872
2917
|
badgeSrc: network.image,
|
|
2873
|
-
badgeAlt: network.name
|
|
2918
|
+
badgeAlt: network.name,
|
|
2919
|
+
className: "shrink-0"
|
|
2874
2920
|
}
|
|
2875
2921
|
),
|
|
2876
2922
|
/* @__PURE__ */ jsxs20(Fragment6, { children: [
|
|
2877
|
-
/* @__PURE__ */ jsx29("div", { className: "flex grow-1 flex-col font-medium text-brand-white-500", children: /* @__PURE__ */
|
|
2878
|
-
|
|
2879
|
-
isActive && /* @__PURE__ */ jsx29("span", { className: "bg-brand-success-400/10 text-brand-success-400 px-[6px] py-[3px] rounded-[60px]", children: /* @__PURE__ */ jsx29(Text, { variant: "caption2", className: "font-semibold", children: "Active" }) })
|
|
2880
|
-
] }) }),
|
|
2881
|
-
/* @__PURE__ */ jsxs20("div", { className: "flex gap-[6px] grow-0 h-[2rem] items-stretch shrink-0 *:shrink-0", children: [
|
|
2923
|
+
/* @__PURE__ */ jsx29("div", { className: "flex grow-1 flex-col font-medium text-brand-white-500", children: /* @__PURE__ */ jsx29("div", { className: "flex items-center gap-[6px]", children: /* @__PURE__ */ jsx29("span", { className: "text-body", children: address != null ? address : "{{Address}}" }) }) }),
|
|
2924
|
+
/* @__PURE__ */ jsxs20("div", { className: "relative flex gap-[6px] grow-0 h-[2rem] items-stretch shrink-0 *:shrink-0 pr-[45px]", children: [
|
|
2882
2925
|
/* @__PURE__ */ jsx29(
|
|
2883
2926
|
IconButton,
|
|
2884
2927
|
{
|
|
@@ -2898,7 +2941,7 @@ function AccountItem(props) {
|
|
|
2898
2941
|
{
|
|
2899
2942
|
size: "sm",
|
|
2900
2943
|
variant: "level_2",
|
|
2901
|
-
className: "h-
|
|
2944
|
+
className: "!min-w-8 !h-8 !gap-0 group cursor-pointer absolute right-0",
|
|
2902
2945
|
onClick: () => {
|
|
2903
2946
|
var _a;
|
|
2904
2947
|
return (_a = props == null ? void 0 : props.onDisconnect) == null ? void 0 : _a.call(props);
|
|
@@ -2982,11 +3025,13 @@ function DialogMorphContent(_a) {
|
|
|
2982
3025
|
var _b = _a, {
|
|
2983
3026
|
className,
|
|
2984
3027
|
children,
|
|
2985
|
-
showCloseButton = true
|
|
3028
|
+
showCloseButton = true,
|
|
3029
|
+
onInteractOutside
|
|
2986
3030
|
} = _b, props = __objRest(_b, [
|
|
2987
3031
|
"className",
|
|
2988
3032
|
"children",
|
|
2989
|
-
"showCloseButton"
|
|
3033
|
+
"showCloseButton",
|
|
3034
|
+
"onInteractOutside"
|
|
2990
3035
|
]);
|
|
2991
3036
|
const [mode, setViewMode] = React11.useState("card");
|
|
2992
3037
|
React11.useEffect(() => {
|
|
@@ -3009,12 +3054,19 @@ function DialogMorphContent(_a) {
|
|
|
3009
3054
|
controller.abort();
|
|
3010
3055
|
};
|
|
3011
3056
|
}, []);
|
|
3057
|
+
const handleInteractOutside = (event) => {
|
|
3058
|
+
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
|
3059
|
+
if (event.target.closest('[data-is-toast="true"]')) {
|
|
3060
|
+
event.preventDefault();
|
|
3061
|
+
}
|
|
3062
|
+
};
|
|
3012
3063
|
const Content7 = /* @__PURE__ */ jsxs22(
|
|
3013
3064
|
DialogPrimitive2.Content,
|
|
3014
3065
|
__spreadProps(__spreadValues({
|
|
3066
|
+
onInteractOutside: handleInteractOutside,
|
|
3015
3067
|
"data-slot": "dialog-content",
|
|
3016
3068
|
className: cn(
|
|
3017
|
-
"bg-brand-black-600 text-brand-black-100 data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 grid w-full gap-4 pt-4 p-6 duration-200",
|
|
3069
|
+
"review-dialog bg-brand-black-600 text-brand-black-100 data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 grid w-full gap-4 pt-4 p-6 duration-200",
|
|
3018
3070
|
{
|
|
3019
3071
|
"responsive-fullscren-dialog": mode === "fullscreen",
|
|
3020
3072
|
"responsive-card-dialog": mode === "card"
|
|
@@ -3028,7 +3080,7 @@ function DialogMorphContent(_a) {
|
|
|
3028
3080
|
DialogPrimitive2.Close,
|
|
3029
3081
|
{
|
|
3030
3082
|
"data-slot": "dialog-close",
|
|
3031
|
-
className: "ring-offset-background w-[calc(32rem/16)] inline-flex items-center justify-center rounded-full text-brand-black-100 aspect-square focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3083
|
+
className: "ring-offset-background cursor-pointer w-[calc(32rem/16)] inline-flex items-center justify-center rounded-full text-brand-black-100 aspect-square focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3032
3084
|
children: [
|
|
3033
3085
|
/* @__PURE__ */ jsx31(XIcon_default, { width: "1rem", height: "1rem" }),
|
|
3034
3086
|
/* @__PURE__ */ jsx31("span", { className: "sr-only", children: "Close" })
|
|
@@ -3046,670 +3098,322 @@ function DialogMorphContent(_a) {
|
|
|
3046
3098
|
|
|
3047
3099
|
// src/components/molecules/manage-wallet.tsx
|
|
3048
3100
|
import React12 from "react";
|
|
3049
|
-
import {
|
|
3101
|
+
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
3102
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3103
|
+
function WalletManagerUIProvider(props) {
|
|
3104
|
+
const { expand: open = false, children } = props;
|
|
3105
|
+
const [show, setShow] = React12.useState(open);
|
|
3106
|
+
return /* @__PURE__ */ jsx32(WalletManagerContext.Provider, { value: { show, setShow }, children });
|
|
3107
|
+
}
|
|
3108
|
+
var WalletManagerContext = React12.createContext({
|
|
3109
|
+
show: false,
|
|
3110
|
+
// @ts-expect-error
|
|
3111
|
+
setShow: React12.Dispatch
|
|
3112
|
+
});
|
|
3113
|
+
function useManager() {
|
|
3114
|
+
return React12.useContext(WalletManagerContext);
|
|
3115
|
+
}
|
|
3116
|
+
function WalletManagerUIContent({
|
|
3117
|
+
children
|
|
3118
|
+
}) {
|
|
3119
|
+
const { show } = useManager();
|
|
3120
|
+
return /* @__PURE__ */ jsx32(
|
|
3121
|
+
Slot8,
|
|
3122
|
+
{
|
|
3123
|
+
className: cn("transition-all pt-[1rem] flex-1", {
|
|
3124
|
+
"opacity-15 pointer-events-none filter blur-[2px]": show
|
|
3125
|
+
}),
|
|
3126
|
+
children
|
|
3127
|
+
}
|
|
3128
|
+
);
|
|
3129
|
+
}
|
|
3050
3130
|
|
|
3051
|
-
// src
|
|
3052
|
-
import
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
var props = __objRest(_a, []);
|
|
3056
|
-
return /* @__PURE__ */ jsx32(SheetPrimitive.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
3131
|
+
// src/components/molecules/summary.tsx
|
|
3132
|
+
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3133
|
+
function Summary(props) {
|
|
3134
|
+
return /* @__PURE__ */ jsx33("div", { className: "flex flex-col gap-2 text-brand-black-100", children: props.children });
|
|
3057
3135
|
}
|
|
3058
|
-
function
|
|
3059
|
-
|
|
3060
|
-
return /* @__PURE__ */
|
|
3136
|
+
function SummaryEntry(props) {
|
|
3137
|
+
const Icon = props.icon;
|
|
3138
|
+
return /* @__PURE__ */ jsxs23("div", { className: "flex select-none items-center text-[calc(12rem/16)] font-medium", children: [
|
|
3139
|
+
/* @__PURE__ */ jsxs23("dt", { className: "flex-1 gap-1 flex items-center", children: [
|
|
3140
|
+
/* @__PURE__ */ jsx33(Icon, { size: "1.16em" }),
|
|
3141
|
+
/* @__PURE__ */ jsx33("span", { className: "text-[1em] leading-[1rem]", children: props.name })
|
|
3142
|
+
] }),
|
|
3143
|
+
/* @__PURE__ */ jsx33("dd", { children: props.children })
|
|
3144
|
+
] });
|
|
3061
3145
|
}
|
|
3062
|
-
function
|
|
3063
|
-
|
|
3064
|
-
|
|
3146
|
+
function makeEntry({
|
|
3147
|
+
name,
|
|
3148
|
+
icon
|
|
3149
|
+
}) {
|
|
3150
|
+
return function Entry({ children }) {
|
|
3151
|
+
return /* @__PURE__ */ jsx33(SummaryEntry, { icon, name, children }, name);
|
|
3152
|
+
};
|
|
3065
3153
|
}
|
|
3066
|
-
|
|
3154
|
+
var Bridge = makeEntry({
|
|
3155
|
+
icon: ({ size }) => /* @__PURE__ */ jsx33(Percent_default, { width: size }),
|
|
3156
|
+
name: "Bridge fee"
|
|
3157
|
+
});
|
|
3158
|
+
var RecipientAddress = makeEntry({
|
|
3159
|
+
icon: ({ size }) => /* @__PURE__ */ jsx33(Wallet_default, { width: size }),
|
|
3160
|
+
name: "Recipient Address"
|
|
3161
|
+
});
|
|
3162
|
+
var GasEntry = makeEntry({
|
|
3163
|
+
icon: ({ size }) => /* @__PURE__ */ jsx33(Gas_default, { width: size }),
|
|
3164
|
+
name: "Gas costs"
|
|
3165
|
+
});
|
|
3166
|
+
var SpillageTolerance = makeEntry({
|
|
3167
|
+
icon: ({ size }) => /* @__PURE__ */ jsx33(ArrowBottomTop_default, { width: size }),
|
|
3168
|
+
name: "Spillage tolerance"
|
|
3169
|
+
});
|
|
3170
|
+
var Route = makeEntry({
|
|
3171
|
+
icon: ({ size }) => /* @__PURE__ */ jsx33(ArrowSplit_default, { width: size }),
|
|
3172
|
+
name: "Route"
|
|
3173
|
+
});
|
|
3174
|
+
var Rate = makeEntry({
|
|
3175
|
+
icon: ({ size }) => /* @__PURE__ */ jsx33(Percent_default, { width: size }),
|
|
3176
|
+
name: "Rate"
|
|
3177
|
+
});
|
|
3178
|
+
var Fee = makeEntry({
|
|
3179
|
+
icon: ({ size }) => /* @__PURE__ */ jsx33(ArrowBottomTop_default, { width: size }),
|
|
3180
|
+
name: "Fee"
|
|
3181
|
+
});
|
|
3182
|
+
var ETA = makeEntry({
|
|
3183
|
+
icon: ({ size }) => /* @__PURE__ */ jsx33(Clock_default, { width: size }),
|
|
3184
|
+
name: "Estimated time"
|
|
3185
|
+
});
|
|
3186
|
+
var SummaryValues = {
|
|
3187
|
+
Key: {
|
|
3188
|
+
Bridge,
|
|
3189
|
+
GasEntry,
|
|
3190
|
+
Rate,
|
|
3191
|
+
SpillageTolerance,
|
|
3192
|
+
Route,
|
|
3193
|
+
ETA,
|
|
3194
|
+
RecipientAddress,
|
|
3195
|
+
Fee
|
|
3196
|
+
},
|
|
3197
|
+
Values: {
|
|
3198
|
+
Highlight: ({ children }) => {
|
|
3199
|
+
return /* @__PURE__ */ jsx33("span", { className: "text-[inherit] text-brand-white-500", children });
|
|
3200
|
+
},
|
|
3201
|
+
Soft: ({ children }) => {
|
|
3202
|
+
return /* @__PURE__ */ jsx33("span", { className: "text-[inherit]text-brand-black-50", children });
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
};
|
|
3206
|
+
|
|
3207
|
+
// src/components/molecules/timeline.tsx
|
|
3208
|
+
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
3209
|
+
import { Loader2 } from "lucide-react";
|
|
3210
|
+
import { AnimatePresence as AnimatePresence2, motion as motion3 } from "motion/react";
|
|
3211
|
+
import React13 from "react";
|
|
3212
|
+
|
|
3213
|
+
// src/@/ui/progress.tsx
|
|
3214
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3215
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3216
|
+
function Progress(_a) {
|
|
3067
3217
|
var _b = _a, {
|
|
3068
|
-
className
|
|
3218
|
+
className,
|
|
3219
|
+
value
|
|
3069
3220
|
} = _b, props = __objRest(_b, [
|
|
3070
|
-
"className"
|
|
3221
|
+
"className",
|
|
3222
|
+
"value"
|
|
3071
3223
|
]);
|
|
3072
|
-
return /* @__PURE__ */
|
|
3073
|
-
|
|
3074
|
-
__spreadValues({
|
|
3075
|
-
"data-slot": "
|
|
3224
|
+
return /* @__PURE__ */ jsx34(
|
|
3225
|
+
ProgressPrimitive.Root,
|
|
3226
|
+
__spreadProps(__spreadValues({
|
|
3227
|
+
"data-slot": "progress",
|
|
3076
3228
|
className: cn(
|
|
3077
|
-
"
|
|
3229
|
+
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
3078
3230
|
className
|
|
3079
3231
|
)
|
|
3080
|
-
}, props)
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
"children",
|
|
3091
|
-
"side"
|
|
3092
|
-
]);
|
|
3093
|
-
return /* @__PURE__ */ jsxs23(SheetPortal, { children: [
|
|
3094
|
-
/* @__PURE__ */ jsx32(SheetOverlay, {}),
|
|
3095
|
-
/* @__PURE__ */ jsxs23(
|
|
3096
|
-
SheetPrimitive.Content,
|
|
3097
|
-
__spreadProps(__spreadValues({
|
|
3098
|
-
"data-slot": "sheet-content",
|
|
3099
|
-
className: cn(
|
|
3100
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
3101
|
-
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-sm",
|
|
3102
|
-
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
3103
|
-
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
3104
|
-
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
3105
|
-
className
|
|
3106
|
-
)
|
|
3107
|
-
}, props), {
|
|
3108
|
-
children: [
|
|
3109
|
-
children,
|
|
3110
|
-
/* @__PURE__ */ jsx32(
|
|
3111
|
-
SheetPrimitive.Close,
|
|
3112
|
-
{
|
|
3113
|
-
asChild: true,
|
|
3114
|
-
className: "absolute top-[1.625rem] -left-10",
|
|
3115
|
-
children: /* @__PURE__ */ jsxs23(
|
|
3116
|
-
IconButton,
|
|
3117
|
-
{
|
|
3118
|
-
className: "cursor-pointer",
|
|
3119
|
-
variant: "secondary",
|
|
3120
|
-
rounded: "full",
|
|
3121
|
-
size: "sm",
|
|
3122
|
-
children: [
|
|
3123
|
-
/* @__PURE__ */ jsx32(ChevronDoubleRight_default, { className: "size-4 text-brand-black-100" }),
|
|
3124
|
-
/* @__PURE__ */ jsx32("span", { className: "sr-only", children: "Close" })
|
|
3125
|
-
]
|
|
3126
|
-
}
|
|
3127
|
-
)
|
|
3128
|
-
}
|
|
3129
|
-
)
|
|
3130
|
-
]
|
|
3131
|
-
})
|
|
3132
|
-
)
|
|
3133
|
-
] });
|
|
3134
|
-
}
|
|
3135
|
-
function SheetHeader(_a) {
|
|
3136
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3137
|
-
return /* @__PURE__ */ jsx32(
|
|
3138
|
-
"div",
|
|
3139
|
-
__spreadValues({
|
|
3140
|
-
"data-slot": "sheet-header",
|
|
3141
|
-
className: cn("flex flex-col gap-1.5 p-4", className)
|
|
3142
|
-
}, props)
|
|
3143
|
-
);
|
|
3144
|
-
}
|
|
3145
|
-
function SheetTitle(_a) {
|
|
3146
|
-
var _b = _a, {
|
|
3147
|
-
className
|
|
3148
|
-
} = _b, props = __objRest(_b, [
|
|
3149
|
-
"className"
|
|
3150
|
-
]);
|
|
3151
|
-
return /* @__PURE__ */ jsx32(
|
|
3152
|
-
SheetPrimitive.Title,
|
|
3153
|
-
__spreadValues({
|
|
3154
|
-
"data-slot": "sheet-title",
|
|
3155
|
-
className: cn("text-foreground font-semibold", className)
|
|
3156
|
-
}, props)
|
|
3157
|
-
);
|
|
3158
|
-
}
|
|
3159
|
-
function SheetDescription(_a) {
|
|
3160
|
-
var _b = _a, {
|
|
3161
|
-
className
|
|
3162
|
-
} = _b, props = __objRest(_b, [
|
|
3163
|
-
"className"
|
|
3164
|
-
]);
|
|
3165
|
-
return /* @__PURE__ */ jsx32(
|
|
3166
|
-
SheetPrimitive.Description,
|
|
3167
|
-
__spreadValues({
|
|
3168
|
-
"data-slot": "sheet-description",
|
|
3169
|
-
className: cn("text-muted-foreground text-sm", className)
|
|
3170
|
-
}, props)
|
|
3232
|
+
}, props), {
|
|
3233
|
+
children: /* @__PURE__ */ jsx34(
|
|
3234
|
+
ProgressPrimitive.Indicator,
|
|
3235
|
+
{
|
|
3236
|
+
"data-slot": "progress-indicator",
|
|
3237
|
+
className: "bg-[var(--track-color)] h-full w-full flex-1 transition-all",
|
|
3238
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
3239
|
+
}
|
|
3240
|
+
)
|
|
3241
|
+
})
|
|
3171
3242
|
);
|
|
3172
3243
|
}
|
|
3173
3244
|
|
|
3174
|
-
// src/components/
|
|
3175
|
-
import { jsx as
|
|
3176
|
-
function
|
|
3177
|
-
return /* @__PURE__ */
|
|
3178
|
-
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
|
|
3179
|
-
/* @__PURE__ */ jsx33(
|
|
3180
|
-
IconButton,
|
|
3181
|
-
{
|
|
3182
|
-
disabled: true,
|
|
3183
|
-
className: "pointer-events-none !text-brand-white-500",
|
|
3184
|
-
variant: "level_2",
|
|
3185
|
-
rounded: "full",
|
|
3186
|
-
size: "sm",
|
|
3187
|
-
children: /* @__PURE__ */ jsx33(Wallet_default, { className: "size-5" })
|
|
3188
|
-
}
|
|
3189
|
-
),
|
|
3190
|
-
/* @__PURE__ */ jsx33(SheetTitle, { className: "text-brand-white-100", children: /* @__PURE__ */ jsx33("span", { className: "text-base font-medium", children: "Connect Your Wallet" }) })
|
|
3191
|
-
] }),
|
|
3192
|
-
/* @__PURE__ */ jsx33(SheetDescription, { className: "sr-only", children: "Choose a wallet provider to connect to our application." })
|
|
3193
|
-
] });
|
|
3194
|
-
}
|
|
3195
|
-
function HeaderNested(props) {
|
|
3196
|
-
var _a;
|
|
3197
|
-
const { heading, image, onBack, hideBackButton } = props;
|
|
3198
|
-
return /* @__PURE__ */ jsxs24("div", { className: "p-[1rem] -mx-[1rem]", children: [
|
|
3199
|
-
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
|
|
3200
|
-
/* @__PURE__ */ jsx33(
|
|
3201
|
-
TokenImage,
|
|
3202
|
-
{
|
|
3203
|
-
src: image.src,
|
|
3204
|
-
className: "w-[2rem]",
|
|
3205
|
-
alt: (_a = image.alt) != null ? _a : heading
|
|
3206
|
-
}
|
|
3207
|
-
),
|
|
3208
|
-
/* @__PURE__ */ jsx33(SheetTitle, { className: "text-brand-white-100 flex-1", children: /* @__PURE__ */ jsx33("span", { className: "text-base font-medium", children: heading }) }),
|
|
3209
|
-
!hideBackButton && /* @__PURE__ */ jsx33(
|
|
3210
|
-
IconButton,
|
|
3211
|
-
{
|
|
3212
|
-
variant: "level_1",
|
|
3213
|
-
rounded: "full",
|
|
3214
|
-
size: "sm",
|
|
3215
|
-
onClick: onBack,
|
|
3216
|
-
children: /* @__PURE__ */ jsx33(
|
|
3217
|
-
StepBack_default,
|
|
3218
|
-
{
|
|
3219
|
-
width: "1rem",
|
|
3220
|
-
height: "1rem",
|
|
3221
|
-
className: "text-brand-black-100"
|
|
3222
|
-
}
|
|
3223
|
-
)
|
|
3224
|
-
}
|
|
3225
|
-
)
|
|
3226
|
-
] }),
|
|
3227
|
-
/* @__PURE__ */ jsx33(SheetDescription, { className: "sr-only", children: "Choose a wallet provider to connect to our application." })
|
|
3228
|
-
] });
|
|
3229
|
-
}
|
|
3230
|
-
function ListSection({
|
|
3231
|
-
children,
|
|
3232
|
-
caption = "Heading"
|
|
3233
|
-
}) {
|
|
3234
|
-
return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-y-[0.375rem]", children: [
|
|
3235
|
-
/* @__PURE__ */ jsx33("div", { className: "text-caption text-brand-black-100 select-none font-normal", children: caption }),
|
|
3236
|
-
/* @__PURE__ */ jsx33("div", { className: "grid gap-2", children })
|
|
3237
|
-
] });
|
|
3238
|
-
}
|
|
3239
|
-
function CWDrawerContent(_a) {
|
|
3240
|
-
var _b = _a, {
|
|
3241
|
-
children
|
|
3242
|
-
} = _b, props = __objRest(_b, [
|
|
3243
|
-
"children"
|
|
3244
|
-
]);
|
|
3245
|
-
return /* @__PURE__ */ jsx33(
|
|
3246
|
-
SheetContent,
|
|
3247
|
-
__spreadProps(__spreadValues({}, props), {
|
|
3248
|
-
side: "right",
|
|
3249
|
-
className: "max-w-[calc(29.75rem_+_1.25rem)] select-none border-none shadow-none text-brand-white-500 sm:w-[540px] bg-transparent p-[0.625rem]",
|
|
3250
|
-
children: /* @__PURE__ */ jsx33("div", { className: "bg-brand-black-550 flex-1 flex flex-col rounded-[1rem] w-[29.75rem] px-[1rem]", children })
|
|
3251
|
-
})
|
|
3252
|
-
);
|
|
3245
|
+
// src/components/molecules/timeline.tsx
|
|
3246
|
+
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3247
|
+
function TimelineList(props) {
|
|
3248
|
+
return /* @__PURE__ */ jsx35("ul", { className: "flex flex-col", children: props.children });
|
|
3253
3249
|
}
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
import { Fragment as Fragment8, jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3259
|
-
var slideDown = {
|
|
3260
|
-
show: {
|
|
3261
|
-
opacity: [0, 0.8, 1]
|
|
3262
|
-
},
|
|
3263
|
-
hide: {
|
|
3264
|
-
opacity: [1, 0.25, 0]
|
|
3265
|
-
}
|
|
3250
|
+
var StatusTextMap = {
|
|
3251
|
+
processing: "Processing",
|
|
3252
|
+
upcoming: "Upcoming",
|
|
3253
|
+
error: "Failed"
|
|
3266
3254
|
};
|
|
3267
|
-
function
|
|
3268
|
-
|
|
3269
|
-
const {
|
|
3270
|
-
const
|
|
3271
|
-
const
|
|
3272
|
-
const
|
|
3273
|
-
const
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
const shouldShowNetworkGroup = shouldShowPolkadotOption || shouldShowEVMOption;
|
|
3277
|
-
React12.useEffect(() => {
|
|
3278
|
-
const updateHeight = () => {
|
|
3279
|
-
if (containerRef.current && parent.current) {
|
|
3280
|
-
const height = containerRef.current.offsetHeight;
|
|
3281
|
-
parent.current.style.setProperty("--container-height", `${height}px`);
|
|
3282
|
-
}
|
|
3283
|
-
};
|
|
3284
|
-
updateHeight();
|
|
3285
|
-
const resizeObserver = new ResizeObserver(updateHeight);
|
|
3286
|
-
if (containerRef.current) {
|
|
3287
|
-
resizeObserver.observe(containerRef.current);
|
|
3288
|
-
}
|
|
3289
|
-
return () => {
|
|
3290
|
-
if (containerRef.current) {
|
|
3291
|
-
resizeObserver.unobserve(containerRef.current);
|
|
3292
|
-
}
|
|
3293
|
-
resizeObserver.disconnect();
|
|
3294
|
-
};
|
|
3295
|
-
}, []);
|
|
3296
|
-
return /* @__PURE__ */ jsx34(Fragment8, { children: /* @__PURE__ */ jsxs25(
|
|
3297
|
-
"div",
|
|
3255
|
+
function TimelineItem(props) {
|
|
3256
|
+
var _a, _b, _c, _d;
|
|
3257
|
+
const { processingStatus, caption, durationMode = "none" } = props;
|
|
3258
|
+
const is_visually_active = processingStatus !== "upcoming";
|
|
3259
|
+
const id = React13.useId();
|
|
3260
|
+
const layoutId = `${id}/${caption}/content-2`;
|
|
3261
|
+
const hideTime = durationMode === "none";
|
|
3262
|
+
return /* @__PURE__ */ jsx35(
|
|
3263
|
+
motion3.li,
|
|
3298
3264
|
{
|
|
3299
|
-
|
|
3300
|
-
className: "bg-brand-black-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
{
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3265
|
+
"data-process-status": processingStatus,
|
|
3266
|
+
className: "block bg-brand-black-350 cursor-default select-none font-medium text-brand-white-500",
|
|
3267
|
+
children: /* @__PURE__ */ jsxs24(
|
|
3268
|
+
motion3.div,
|
|
3269
|
+
{
|
|
3270
|
+
initial: { opacity: 0.5 },
|
|
3271
|
+
animate: {
|
|
3272
|
+
opacity: is_visually_active ? 1 : 0.5
|
|
3273
|
+
},
|
|
3274
|
+
className: "flex h-[3.5rem] items-center gap-[0.86rem] py-[0.5625rem] px-[0.75rem] ",
|
|
3275
|
+
children: [
|
|
3276
|
+
props.level === 0 ? /* @__PURE__ */ jsx35(BadgeIcon, __spreadValues({}, props.badge)) : /* @__PURE__ */ jsx35(
|
|
3277
|
+
IconButton,
|
|
3309
3278
|
{
|
|
3310
|
-
|
|
3279
|
+
variant: "level_2",
|
|
3280
|
+
size: "sm",
|
|
3281
|
+
rounded: "full",
|
|
3282
|
+
className: "pointer-events-none !bg-transparent backdrop-blur-[34px]",
|
|
3283
|
+
style: {
|
|
3284
|
+
boxShadow: "0 4px 24px 0 rgba(255, 255, 255, 0.05) inset"
|
|
3285
|
+
},
|
|
3286
|
+
children: /* @__PURE__ */ jsx35(
|
|
3287
|
+
"span",
|
|
3288
|
+
{
|
|
3289
|
+
className: cn(
|
|
3290
|
+
"w-[0.5rem] inline-block aspect-square rounded-lg bg-brand-white-500",
|
|
3291
|
+
{
|
|
3292
|
+
"bg-brand-success-400": processingStatus === "completed",
|
|
3293
|
+
"bg-brand-danger-500": processingStatus === "error"
|
|
3294
|
+
}
|
|
3295
|
+
)
|
|
3296
|
+
}
|
|
3297
|
+
)
|
|
3311
3298
|
}
|
|
3312
3299
|
),
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
|
|
3317
|
-
IconButton,
|
|
3300
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col flex-1 gap-[calc(4/16rem)]", children: [
|
|
3301
|
+
/* @__PURE__ */ jsx35("div", { className: "text-brand-white-500 text-[1rem] h-[1.25rem]", children: caption }),
|
|
3302
|
+
/* @__PURE__ */ jsx35("div", { className: "text-xs h-[1rem] text-brand-black-100", children: processingStatus === "completed" ? ((_a = props.data) == null ? void 0 : _a.transactionUrl) ? /* @__PURE__ */ jsxs24(
|
|
3303
|
+
"a",
|
|
3318
3304
|
{
|
|
3319
|
-
|
|
3320
|
-
"
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3305
|
+
href: props.data.transactionUrl,
|
|
3306
|
+
className: "flex cursor-pointer gap-[calc(2rem/16)] items-center",
|
|
3307
|
+
target: "_blank",
|
|
3308
|
+
rel: "noopener noreferrer",
|
|
3309
|
+
children: [
|
|
3310
|
+
/* @__PURE__ */ jsx35("span", { children: "View in explorer " }),
|
|
3311
|
+
/* @__PURE__ */ jsx35(ArrowUpRight_default, { width: "0.75rem", height: "0.75rem" })
|
|
3312
|
+
]
|
|
3326
3313
|
}
|
|
3327
|
-
)
|
|
3328
|
-
] })
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
ref: containerRef,
|
|
3343
|
-
initial: { opacity: 0 },
|
|
3344
|
-
variants: slideDown,
|
|
3345
|
-
transition: { duration: 0.4 },
|
|
3346
|
-
animate: open ? "show" : "hide",
|
|
3347
|
-
className: "border-brand-black-350 px-[1rem] border-b pb-[1rem]",
|
|
3348
|
-
children: /* @__PURE__ */ jsxs25(ListSection, { caption: "Networks", children: [
|
|
3349
|
-
accounts.map((account, index) => /* @__PURE__ */ jsx34(
|
|
3350
|
-
WalletAccountItem,
|
|
3351
|
-
{
|
|
3352
|
-
address: shortenAccountAddress(account.address),
|
|
3353
|
-
network: account.network,
|
|
3354
|
-
wallet: account.wallet,
|
|
3355
|
-
onCopy: () => onCopy == null ? void 0 : onCopy(account.address),
|
|
3356
|
-
onDisconnect: () => onDisconnect == null ? void 0 : onDisconnect(account, index),
|
|
3357
|
-
isActive: true
|
|
3358
|
-
},
|
|
3359
|
-
`${account.address}-${index}`
|
|
3360
|
-
)),
|
|
3361
|
-
shouldShowNetworkGroup && /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
3362
|
-
shouldShowPolkadotOption && /* @__PURE__ */ jsx34(
|
|
3363
|
-
NetworkGroupItem,
|
|
3314
|
+
) : /* @__PURE__ */ jsx35("span", { children: props.secondary }) : /* @__PURE__ */ jsx35("span", { children: (_b = props == null ? void 0 : props.secondary) != null ? _b : StatusTextMap[processingStatus] }) })
|
|
3315
|
+
] }),
|
|
3316
|
+
/* @__PURE__ */ jsxs24(AnimatePresence2, { children: [
|
|
3317
|
+
processingStatus === "completed" ? /* @__PURE__ */ jsxs24(
|
|
3318
|
+
motion3.div,
|
|
3319
|
+
{
|
|
3320
|
+
layoutId,
|
|
3321
|
+
initial: { x: 10, opacity: 0 },
|
|
3322
|
+
animate: { x: 0, opacity: 1 },
|
|
3323
|
+
exit: { x: 10, opacity: 0 },
|
|
3324
|
+
className: "flex gap-[calc(8rem/16)] items-center",
|
|
3325
|
+
children: [
|
|
3326
|
+
hideTime && /* @__PURE__ */ jsx35("span", { className: "text-[calc(13rem/16)] text-brand-black-100", children: (_c = props == null ? void 0 : props.data) == null ? void 0 : _c.completedIn }),
|
|
3327
|
+
/* @__PURE__ */ jsx35(
|
|
3328
|
+
Check_default,
|
|
3364
3329
|
{
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3330
|
+
height: "1rem",
|
|
3331
|
+
width: "1rem",
|
|
3332
|
+
className: "text-brand-success-400"
|
|
3368
3333
|
}
|
|
3369
|
-
)
|
|
3370
|
-
|
|
3371
|
-
|
|
3334
|
+
)
|
|
3335
|
+
]
|
|
3336
|
+
}
|
|
3337
|
+
) : null,
|
|
3338
|
+
processingStatus === "processing" ? /* @__PURE__ */ jsxs24(
|
|
3339
|
+
motion3.div,
|
|
3340
|
+
{
|
|
3341
|
+
initial: { x: 10, opacity: 0 },
|
|
3342
|
+
animate: { x: 0, opacity: 1 },
|
|
3343
|
+
exit: { x: 10, opacity: 0 },
|
|
3344
|
+
layoutId,
|
|
3345
|
+
className: "flex gap-[calc(10rem/16)] items-center",
|
|
3346
|
+
children: [
|
|
3347
|
+
hideTime && /* @__PURE__ */ jsxs24("span", { className: "text-[calc(13rem/16)]", children: [
|
|
3348
|
+
"~ ",
|
|
3349
|
+
(_d = props == null ? void 0 : props.data) == null ? void 0 : _d.eta
|
|
3350
|
+
] }),
|
|
3351
|
+
/* @__PURE__ */ jsx35(
|
|
3352
|
+
Loader2,
|
|
3372
3353
|
{
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
onConnect: () => onConnect == null ? void 0 : onConnect("evm")
|
|
3354
|
+
size: "1rem",
|
|
3355
|
+
className: "animate text-brand-black-100 animate-spin"
|
|
3376
3356
|
}
|
|
3377
3357
|
)
|
|
3378
|
-
]
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
)
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3358
|
+
]
|
|
3359
|
+
}
|
|
3360
|
+
) : null
|
|
3361
|
+
] })
|
|
3362
|
+
]
|
|
3363
|
+
}
|
|
3364
|
+
)
|
|
3385
3365
|
}
|
|
3386
|
-
)
|
|
3366
|
+
);
|
|
3387
3367
|
}
|
|
3388
|
-
function
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3368
|
+
function TimelineListGroup(props) {
|
|
3369
|
+
return /* @__PURE__ */ jsx35("ul", { className: cn("flex flex-col"), children: props.children });
|
|
3370
|
+
}
|
|
3371
|
+
var TimelineRoot = React13.forwardRef((props, ref) => {
|
|
3372
|
+
return /* @__PURE__ */ jsx35(
|
|
3373
|
+
"ul",
|
|
3374
|
+
__spreadProps(__spreadValues({
|
|
3375
|
+
ref
|
|
3376
|
+
}, props), {
|
|
3377
|
+
className: cn(
|
|
3378
|
+
"flex flex-col gap-y-[calc(2rem/16)] *:first:rounded-t-[1rem] *:last:rounded-b-[1rem]",
|
|
3379
|
+
props.className
|
|
3380
|
+
),
|
|
3381
|
+
children: props.children
|
|
3382
|
+
})
|
|
3383
|
+
);
|
|
3384
|
+
});
|
|
3385
|
+
TimelineRoot.displayName = "TimelineRoot";
|
|
3386
|
+
var trackColorMap = {
|
|
3387
|
+
warning: "var(--color-brand-warning-500)",
|
|
3388
|
+
default: "var(--color-brand-black-100)"
|
|
3389
|
+
};
|
|
3390
|
+
function TransactionTimer(props) {
|
|
3391
|
+
const { mins, hours, seconds, severity = "warning" } = props;
|
|
3392
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-[calc(6rem/16)]", children: [
|
|
3393
|
+
/* @__PURE__ */ jsxs24(
|
|
3392
3394
|
"div",
|
|
3393
3395
|
{
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
BadgeIcon,
|
|
3396
|
+
className: cn(
|
|
3397
|
+
"flex gap-[calc(4rem/16)] font-medium h-[1rem] text-xs items-center",
|
|
3397
3398
|
{
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
alt: item.wallet.name,
|
|
3401
|
-
badgeSrc: item.network.image,
|
|
3402
|
-
badgeAlt: item.network.name
|
|
3403
|
-
}
|
|
3404
|
-
)
|
|
3405
|
-
},
|
|
3406
|
-
item.address
|
|
3407
|
-
)) }),
|
|
3408
|
-
/* @__PURE__ */ jsxs25("span", { className: "flex flex-col whitespace-nowrap", children: [
|
|
3409
|
-
/* @__PURE__ */ jsx34("span", { className: "text-base font-medium h-[1.25rem] text-brand-white-500", children: items.length > 1 ? /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
3410
|
-
items.length,
|
|
3411
|
-
" wallets"
|
|
3412
|
-
] }) : /* @__PURE__ */ jsx34(Fragment8, { children: (_c = shortenAccountAddress((_b = (_a = items[0]) == null ? void 0 : _a.address) != null ? _b : "")) != null ? _c : "--" }) }),
|
|
3413
|
-
/* @__PURE__ */ jsx34("span", { className: "text-xs text-start h-[1rem] font-medium inline-flex items-center gap-[0.125rem] text-brand-black-100", children: "Connected" })
|
|
3414
|
-
] })
|
|
3415
|
-
] });
|
|
3416
|
-
}
|
|
3417
|
-
function WalletManagerUIProvider(props) {
|
|
3418
|
-
const { expand: open = false, children } = props;
|
|
3419
|
-
const [show, setShow] = React12.useState(open);
|
|
3420
|
-
return /* @__PURE__ */ jsx34(WalletManagerContext.Provider, { value: { show, setShow }, children });
|
|
3421
|
-
}
|
|
3422
|
-
var WalletManagerContext = React12.createContext({
|
|
3423
|
-
show: false,
|
|
3424
|
-
// @ts-expect-error
|
|
3425
|
-
setShow: React12.Dispatch
|
|
3426
|
-
});
|
|
3427
|
-
function useManager() {
|
|
3428
|
-
return React12.useContext(WalletManagerContext);
|
|
3429
|
-
}
|
|
3430
|
-
function WalletManagerUIContent({
|
|
3431
|
-
children
|
|
3432
|
-
}) {
|
|
3433
|
-
const { show } = useManager();
|
|
3434
|
-
return /* @__PURE__ */ jsx34(
|
|
3435
|
-
Slot8,
|
|
3436
|
-
{
|
|
3437
|
-
className: cn("transition-all pt-[1rem] flex-1", {
|
|
3438
|
-
"opacity-15 pointer-events-none filter blur-[2px]": show
|
|
3439
|
-
}),
|
|
3440
|
-
children
|
|
3441
|
-
}
|
|
3442
|
-
);
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
// src/components/molecules/summary.tsx
|
|
3446
|
-
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3447
|
-
function BridgeSummary(props) {
|
|
3448
|
-
return /* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-2 text-brand-black-100", children: props.children });
|
|
3449
|
-
}
|
|
3450
|
-
function SummaryEntry(props) {
|
|
3451
|
-
const Icon = props.icon;
|
|
3452
|
-
return /* @__PURE__ */ jsxs26("div", { className: "flex select-none items-center text-[calc(12rem/16)] font-medium", children: [
|
|
3453
|
-
/* @__PURE__ */ jsxs26("dt", { className: "flex-1 gap-1 flex items-center", children: [
|
|
3454
|
-
/* @__PURE__ */ jsx35(Icon, { size: "1.16em" }),
|
|
3455
|
-
/* @__PURE__ */ jsx35("span", { className: "text-[1em] leading-[1rem]", children: props.name })
|
|
3456
|
-
] }),
|
|
3457
|
-
/* @__PURE__ */ jsx35("dd", { children: props.children })
|
|
3458
|
-
] });
|
|
3459
|
-
}
|
|
3460
|
-
function makeEntry({
|
|
3461
|
-
name,
|
|
3462
|
-
icon
|
|
3463
|
-
}) {
|
|
3464
|
-
return function Entry({ children }) {
|
|
3465
|
-
return /* @__PURE__ */ jsx35(SummaryEntry, { icon, name, children }, name);
|
|
3466
|
-
};
|
|
3467
|
-
}
|
|
3468
|
-
var Bridge = makeEntry({
|
|
3469
|
-
icon: ({ size }) => /* @__PURE__ */ jsx35(Percent_default, { width: size }),
|
|
3470
|
-
name: "Bridge fee"
|
|
3471
|
-
});
|
|
3472
|
-
var GasEntry = makeEntry({
|
|
3473
|
-
icon: ({ size }) => /* @__PURE__ */ jsx35(Gas_default, { width: size }),
|
|
3474
|
-
name: "Gas costs"
|
|
3475
|
-
});
|
|
3476
|
-
var SpillageTolerance = makeEntry({
|
|
3477
|
-
icon: ({ size }) => /* @__PURE__ */ jsx35(ArrowBottomTop_default, { width: size }),
|
|
3478
|
-
name: "Spillage tolerance"
|
|
3479
|
-
});
|
|
3480
|
-
var Route = makeEntry({
|
|
3481
|
-
icon: ({ size }) => /* @__PURE__ */ jsx35(ArrowSplit_default, { width: size }),
|
|
3482
|
-
name: "Route"
|
|
3483
|
-
});
|
|
3484
|
-
var ETA = makeEntry({
|
|
3485
|
-
icon: ({ size }) => /* @__PURE__ */ jsx35(Clock_default, { width: size }),
|
|
3486
|
-
name: "Estimated time"
|
|
3487
|
-
});
|
|
3488
|
-
var SummaryValues = {
|
|
3489
|
-
Key: {
|
|
3490
|
-
Bridge,
|
|
3491
|
-
GasEntry,
|
|
3492
|
-
SpillageTolerance,
|
|
3493
|
-
Route,
|
|
3494
|
-
ETA
|
|
3495
|
-
},
|
|
3496
|
-
Values: {
|
|
3497
|
-
Highlight: ({ children }) => {
|
|
3498
|
-
return /* @__PURE__ */ jsx35("span", { className: "text-[inherit] text-brand-white-500", children });
|
|
3499
|
-
},
|
|
3500
|
-
Soft: ({ children }) => {
|
|
3501
|
-
return /* @__PURE__ */ jsx35("span", { className: "text-[inherit]text-brand-black-50", children });
|
|
3502
|
-
}
|
|
3503
|
-
}
|
|
3504
|
-
};
|
|
3505
|
-
|
|
3506
|
-
// src/components/molecules/timeline.tsx
|
|
3507
|
-
import React13 from "react";
|
|
3508
|
-
import { Loader2 } from "lucide-react";
|
|
3509
|
-
import { AnimatePresence as AnimatePresence2, motion as motion4 } from "motion/react";
|
|
3510
|
-
|
|
3511
|
-
// src/@/ui/progress.tsx
|
|
3512
|
-
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3513
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3514
|
-
function Progress(_a) {
|
|
3515
|
-
var _b = _a, {
|
|
3516
|
-
className,
|
|
3517
|
-
value
|
|
3518
|
-
} = _b, props = __objRest(_b, [
|
|
3519
|
-
"className",
|
|
3520
|
-
"value"
|
|
3521
|
-
]);
|
|
3522
|
-
return /* @__PURE__ */ jsx36(
|
|
3523
|
-
ProgressPrimitive.Root,
|
|
3524
|
-
__spreadProps(__spreadValues({
|
|
3525
|
-
"data-slot": "progress",
|
|
3526
|
-
className: cn(
|
|
3527
|
-
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
3528
|
-
className
|
|
3529
|
-
)
|
|
3530
|
-
}, props), {
|
|
3531
|
-
children: /* @__PURE__ */ jsx36(
|
|
3532
|
-
ProgressPrimitive.Indicator,
|
|
3533
|
-
{
|
|
3534
|
-
"data-slot": "progress-indicator",
|
|
3535
|
-
className: "bg-[var(--track-color)] h-full w-full flex-1 transition-all",
|
|
3536
|
-
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
3537
|
-
}
|
|
3538
|
-
)
|
|
3539
|
-
})
|
|
3540
|
-
);
|
|
3541
|
-
}
|
|
3542
|
-
|
|
3543
|
-
// src/components/molecules/timeline.tsx
|
|
3544
|
-
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
3545
|
-
import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3546
|
-
function TimelineList(props) {
|
|
3547
|
-
return /* @__PURE__ */ jsx37("ul", { className: "flex flex-col", children: props.children });
|
|
3548
|
-
}
|
|
3549
|
-
var StatusTextMap = {
|
|
3550
|
-
processing: "Processing",
|
|
3551
|
-
upcoming: "Upcoming",
|
|
3552
|
-
error: "Failed"
|
|
3553
|
-
};
|
|
3554
|
-
function TimelineItem(props) {
|
|
3555
|
-
var _a, _b, _c, _d;
|
|
3556
|
-
const { processingStatus, caption } = props;
|
|
3557
|
-
const is_visually_active = processingStatus !== "upcoming";
|
|
3558
|
-
const id = React13.useId();
|
|
3559
|
-
const layoutId = `${id}/${caption}/content-2`;
|
|
3560
|
-
return /* @__PURE__ */ jsx37(
|
|
3561
|
-
motion4.li,
|
|
3562
|
-
{
|
|
3563
|
-
"data-process-status": processingStatus,
|
|
3564
|
-
className: "block bg-brand-black-350 cursor-default select-none font-medium text-brand-white-500",
|
|
3565
|
-
children: /* @__PURE__ */ jsxs27(
|
|
3566
|
-
motion4.div,
|
|
3567
|
-
{
|
|
3568
|
-
initial: { opacity: 0.5 },
|
|
3569
|
-
animate: {
|
|
3570
|
-
opacity: is_visually_active ? 1 : 0.5
|
|
3571
|
-
},
|
|
3572
|
-
className: "flex h-[3.5rem] items-center gap-[0.86rem] py-[0.5625rem] px-[0.75rem] ",
|
|
3573
|
-
children: [
|
|
3574
|
-
props.level === 0 ? /* @__PURE__ */ jsx37(BadgeIcon, __spreadValues({}, props.badge)) : /* @__PURE__ */ jsx37(
|
|
3575
|
-
IconButton,
|
|
3576
|
-
{
|
|
3577
|
-
variant: "level_2",
|
|
3578
|
-
size: "sm",
|
|
3579
|
-
rounded: "full",
|
|
3580
|
-
className: "pointer-events-none !bg-transparent backdrop-blur-[34px]",
|
|
3581
|
-
style: {
|
|
3582
|
-
boxShadow: "0 4px 24px 0 rgba(255, 255, 255, 0.05) inset"
|
|
3583
|
-
},
|
|
3584
|
-
children: /* @__PURE__ */ jsx37(
|
|
3585
|
-
"span",
|
|
3586
|
-
{
|
|
3587
|
-
className: cn(
|
|
3588
|
-
"w-[0.5rem] inline-block aspect-square rounded-lg bg-brand-white-500",
|
|
3589
|
-
{
|
|
3590
|
-
"bg-brand-success-400": processingStatus === "completed",
|
|
3591
|
-
"bg-brand-danger-500": processingStatus === "error"
|
|
3592
|
-
}
|
|
3593
|
-
)
|
|
3594
|
-
}
|
|
3595
|
-
)
|
|
3596
|
-
}
|
|
3597
|
-
),
|
|
3598
|
-
/* @__PURE__ */ jsxs27("div", { className: "flex flex-col flex-1 gap-[calc(4/16rem)]", children: [
|
|
3599
|
-
/* @__PURE__ */ jsx37("div", { className: "text-brand-white-500 text-[1rem] h-[1.25rem]", children: caption }),
|
|
3600
|
-
/* @__PURE__ */ jsxs27("div", { className: "text-xs h-[1rem] text-brand-black-100", children: [
|
|
3601
|
-
processingStatus === "completed" ? /* @__PURE__ */ jsx37("span", { children: /* @__PURE__ */ jsxs27(
|
|
3602
|
-
"a",
|
|
3603
|
-
{
|
|
3604
|
-
href: (_a = props == null ? void 0 : props.data) == null ? void 0 : _a.transactionUrl,
|
|
3605
|
-
className: "flex cursor-pointer gap-[calc(2rem/16)] items-center",
|
|
3606
|
-
children: [
|
|
3607
|
-
/* @__PURE__ */ jsx37("span", { children: "View in explorer " }),
|
|
3608
|
-
/* @__PURE__ */ jsx37(ArrowUpRight_default, { width: "0.75rem", height: "0.75rem" })
|
|
3609
|
-
]
|
|
3610
|
-
}
|
|
3611
|
-
) }) : null,
|
|
3612
|
-
processingStatus === "completed" ? null : /* @__PURE__ */ jsx37("span", { children: /* @__PURE__ */ jsx37("span", { children: (_b = props == null ? void 0 : props.secondary) != null ? _b : StatusTextMap[processingStatus] }) })
|
|
3613
|
-
] })
|
|
3614
|
-
] }),
|
|
3615
|
-
/* @__PURE__ */ jsxs27(AnimatePresence2, { children: [
|
|
3616
|
-
processingStatus === "completed" ? /* @__PURE__ */ jsxs27(
|
|
3617
|
-
motion4.div,
|
|
3618
|
-
{
|
|
3619
|
-
layoutId,
|
|
3620
|
-
initial: { x: 10, opacity: 0 },
|
|
3621
|
-
animate: { x: 0, opacity: 1 },
|
|
3622
|
-
exit: { x: 10, opacity: 0 },
|
|
3623
|
-
className: "flex gap-[calc(8rem/16)] items-center",
|
|
3624
|
-
children: [
|
|
3625
|
-
/* @__PURE__ */ jsx37("span", { className: "text-[calc(13rem/16)] text-brand-black-100", children: (_c = props == null ? void 0 : props.data) == null ? void 0 : _c.completedIn }),
|
|
3626
|
-
/* @__PURE__ */ jsx37(
|
|
3627
|
-
Check_default,
|
|
3628
|
-
{
|
|
3629
|
-
height: "1rem",
|
|
3630
|
-
width: "1rem",
|
|
3631
|
-
className: "text-brand-success-400"
|
|
3632
|
-
}
|
|
3633
|
-
)
|
|
3634
|
-
]
|
|
3635
|
-
}
|
|
3636
|
-
) : null,
|
|
3637
|
-
processingStatus === "processing" ? /* @__PURE__ */ jsxs27(
|
|
3638
|
-
motion4.div,
|
|
3639
|
-
{
|
|
3640
|
-
initial: { x: 10, opacity: 0 },
|
|
3641
|
-
animate: { x: 0, opacity: 1 },
|
|
3642
|
-
exit: { x: 10, opacity: 0 },
|
|
3643
|
-
layoutId,
|
|
3644
|
-
className: "flex gap-[calc(10rem/16)] items-center",
|
|
3645
|
-
children: [
|
|
3646
|
-
/* @__PURE__ */ jsx37("span", { className: "text-[calc(13rem/16)]", children: (_d = props == null ? void 0 : props.data) == null ? void 0 : _d.eta }),
|
|
3647
|
-
/* @__PURE__ */ jsx37(
|
|
3648
|
-
Loader2,
|
|
3649
|
-
{
|
|
3650
|
-
size: "1rem",
|
|
3651
|
-
className: "animate text-brand-black-100 animate-spin"
|
|
3652
|
-
}
|
|
3653
|
-
)
|
|
3654
|
-
]
|
|
3655
|
-
}
|
|
3656
|
-
) : null
|
|
3657
|
-
] })
|
|
3658
|
-
]
|
|
3659
|
-
}
|
|
3660
|
-
)
|
|
3661
|
-
}
|
|
3662
|
-
);
|
|
3663
|
-
}
|
|
3664
|
-
function TimelineListGroup(props) {
|
|
3665
|
-
return /* @__PURE__ */ jsx37("ul", { className: cn("flex flex-col"), children: props.children });
|
|
3666
|
-
}
|
|
3667
|
-
var TimelineRoot = React13.forwardRef((props, ref) => {
|
|
3668
|
-
return /* @__PURE__ */ jsx37(
|
|
3669
|
-
"ul",
|
|
3670
|
-
__spreadProps(__spreadValues({
|
|
3671
|
-
ref
|
|
3672
|
-
}, props), {
|
|
3673
|
-
className: cn(
|
|
3674
|
-
"flex flex-col gap-y-[calc(2rem/16)] *:first:rounded-t-[1rem] *:last:rounded-b-[1rem]",
|
|
3675
|
-
props.className
|
|
3676
|
-
),
|
|
3677
|
-
children: props.children
|
|
3678
|
-
})
|
|
3679
|
-
);
|
|
3680
|
-
});
|
|
3681
|
-
TimelineRoot.displayName = "TimelineRoot";
|
|
3682
|
-
var trackColorMap = {
|
|
3683
|
-
warning: "var(--color-brand-warning-500)",
|
|
3684
|
-
default: "var(--color-brand-black-100)"
|
|
3685
|
-
};
|
|
3686
|
-
function TransactionTimer(props) {
|
|
3687
|
-
const { mins, hours, seconds, severity = "warning" } = props;
|
|
3688
|
-
return /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-[calc(6rem/16)]", children: [
|
|
3689
|
-
/* @__PURE__ */ jsxs27(
|
|
3690
|
-
"div",
|
|
3691
|
-
{
|
|
3692
|
-
className: cn(
|
|
3693
|
-
"flex gap-[calc(4rem/16)] font-medium h-[1rem] text-xs items-center",
|
|
3694
|
-
{
|
|
3695
|
-
"text-[#7A775F]": severity === "warning",
|
|
3696
|
-
"text-brand-black-100": severity === "default"
|
|
3399
|
+
"text-[#7A775F]": severity === "warning",
|
|
3400
|
+
"text-brand-black-100": severity === "default"
|
|
3697
3401
|
}
|
|
3698
3402
|
),
|
|
3699
3403
|
children: [
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
/* @__PURE__ */
|
|
3404
|
+
/* @__PURE__ */ jsx35("span", { children: "Transaction will timeout in" }),
|
|
3405
|
+
/* @__PURE__ */ jsxs24("span", { className: "text-brand-white-500", children: [
|
|
3702
3406
|
String(hours).padStart(2, "0"),
|
|
3703
3407
|
":",
|
|
3704
3408
|
String(mins).padStart(2, "0"),
|
|
3705
3409
|
":",
|
|
3706
3410
|
String(seconds).padStart(2, "0")
|
|
3707
3411
|
] }),
|
|
3708
|
-
/* @__PURE__ */
|
|
3412
|
+
/* @__PURE__ */ jsx35("span", { children: /* @__PURE__ */ jsx35(CircleInfo_default, { width: "1em", height: "1em" }) })
|
|
3709
3413
|
]
|
|
3710
3414
|
}
|
|
3711
3415
|
),
|
|
3712
|
-
/* @__PURE__ */
|
|
3416
|
+
/* @__PURE__ */ jsx35(
|
|
3713
3417
|
Progress,
|
|
3714
3418
|
{
|
|
3715
3419
|
value: props.progress,
|
|
@@ -3723,8 +3427,8 @@ function TransactionTimer(props) {
|
|
|
3723
3427
|
}
|
|
3724
3428
|
function TimerWrap(props) {
|
|
3725
3429
|
const show = props.reveal;
|
|
3726
|
-
return /* @__PURE__ */
|
|
3727
|
-
|
|
3430
|
+
return /* @__PURE__ */ jsxs24(
|
|
3431
|
+
motion3.div,
|
|
3728
3432
|
{
|
|
3729
3433
|
initial: { paddingTop: 0 },
|
|
3730
3434
|
animate: !show ? { paddingBlockStart: 0 } : { paddingBlockStart: "var(--timer-top)" },
|
|
@@ -3733,7 +3437,7 @@ function TimerWrap(props) {
|
|
|
3733
3437
|
},
|
|
3734
3438
|
className: "flex flex-col items-stretch justify-start relative",
|
|
3735
3439
|
children: [
|
|
3736
|
-
/* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ jsx35(
|
|
3737
3441
|
"div",
|
|
3738
3442
|
{
|
|
3739
3443
|
className: cn(
|
|
@@ -3743,7 +3447,7 @@ function TimerWrap(props) {
|
|
|
3743
3447
|
children: props.Timer
|
|
3744
3448
|
}
|
|
3745
3449
|
),
|
|
3746
|
-
/* @__PURE__ */
|
|
3450
|
+
/* @__PURE__ */ jsx35(
|
|
3747
3451
|
Slot9,
|
|
3748
3452
|
{
|
|
3749
3453
|
className: cn("min-h-[calc(56rem/11)] z-20 relative !rounded-[1rem]", {
|
|
@@ -3758,7 +3462,7 @@ function TimerWrap(props) {
|
|
|
3758
3462
|
}
|
|
3759
3463
|
|
|
3760
3464
|
// src/components/molecules/toast.tsx
|
|
3761
|
-
import { Fragment as
|
|
3465
|
+
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3762
3466
|
var SeverityConfig = {
|
|
3763
3467
|
error: {
|
|
3764
3468
|
icon: Alert_default,
|
|
@@ -3784,67 +3488,74 @@ function ToastBox(props) {
|
|
|
3784
3488
|
event.stopPropagation();
|
|
3785
3489
|
onDismiss == null ? void 0 : onDismiss(event);
|
|
3786
3490
|
};
|
|
3787
|
-
return /* @__PURE__ */
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
className: "text-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3491
|
+
return /* @__PURE__ */ jsx36(SmoothCorners, { size: "sm", children: /* @__PURE__ */ jsxs25(
|
|
3492
|
+
"div",
|
|
3493
|
+
{
|
|
3494
|
+
"data-is-toast": "true",
|
|
3495
|
+
className: "bg-brand-black-500 flex flex-col md:flex-row gap-[0.75rem] items-start py-[calc(10rem/16)] px-[calc(12rem/16)] text-muted-foreground",
|
|
3496
|
+
children: [
|
|
3497
|
+
/* @__PURE__ */ jsx36(
|
|
3498
|
+
"div",
|
|
3499
|
+
{
|
|
3500
|
+
className: cn("items-center justify-center shrink-0 grow-0", color),
|
|
3501
|
+
style: { fontSize: "calc(calc(24/16) * 1rem)" },
|
|
3502
|
+
children: /* @__PURE__ */ jsx36(Icon, { width: "1em", height: "1em" })
|
|
3503
|
+
}
|
|
3504
|
+
),
|
|
3505
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col flex-1", children: [
|
|
3506
|
+
/* @__PURE__ */ jsx36(Text, { variant: "body1", className: "text-foreground", children: props.heading }),
|
|
3507
|
+
/* @__PURE__ */ jsx36(
|
|
3508
|
+
Text,
|
|
3509
|
+
{
|
|
3510
|
+
variant: "caption2",
|
|
3511
|
+
className: "text-muted-foreground text-balance",
|
|
3512
|
+
children: props.children
|
|
3513
|
+
}
|
|
3514
|
+
)
|
|
3515
|
+
] }),
|
|
3516
|
+
/* @__PURE__ */ jsx36("div", { className: "flex gap-[calc(6rem/16)] items-center self-center w-full md:w-auto", children: actions ? /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
3517
|
+
/* @__PURE__ */ jsx36("div", { className: "flex gap-[calc(6rem/16)] flex-1 items-center *:flex-1", children: actions }),
|
|
3518
|
+
/* @__PURE__ */ jsx36(
|
|
3519
|
+
IconButton,
|
|
3520
|
+
{
|
|
3521
|
+
className: "cursor-pointer",
|
|
3522
|
+
onClick: handleDismiss,
|
|
3523
|
+
size: "smx",
|
|
3524
|
+
variant: "level_2",
|
|
3525
|
+
rounded: "default",
|
|
3526
|
+
children: /* @__PURE__ */ jsx36(XIcon_default, { width: "1rem" })
|
|
3527
|
+
}
|
|
3528
|
+
)
|
|
3529
|
+
] }) : /* @__PURE__ */ jsx36(
|
|
3530
|
+
Button2,
|
|
3531
|
+
{
|
|
3532
|
+
size: "sm",
|
|
3533
|
+
variant: "level_2",
|
|
3534
|
+
className: "w-full cursor-pointer",
|
|
3535
|
+
onClick: handleDismiss,
|
|
3536
|
+
children: "Close"
|
|
3537
|
+
}
|
|
3538
|
+
) })
|
|
3539
|
+
]
|
|
3540
|
+
}
|
|
3541
|
+
) });
|
|
3542
|
+
}
|
|
3543
|
+
|
|
3544
|
+
// src/components/molecules/transaction-list.tsx
|
|
3545
|
+
import { motion as motion4 } from "motion/react";
|
|
3546
|
+
import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3547
|
+
function TxListItemProcessing(props) {
|
|
3548
|
+
return /* @__PURE__ */ jsx37(GradientContainer, { children: /* @__PURE__ */ jsxs26("div", { className: "rounded-[1rem] bg-brand-black-350 px-[0.75rem] h-[3.75rem] flex items-center", children: [
|
|
3549
|
+
/* @__PURE__ */ jsx37(
|
|
3550
|
+
GradientLine,
|
|
3551
|
+
{
|
|
3552
|
+
behaviour: "progress",
|
|
3842
3553
|
value: props.percentage,
|
|
3843
3554
|
mode: props.status === "failed" ? "error" : "default"
|
|
3844
3555
|
}
|
|
3845
3556
|
),
|
|
3846
|
-
/* @__PURE__ */
|
|
3847
|
-
/* @__PURE__ */
|
|
3557
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex gap-[1rem] flex-1 z-20 text-brand-black-100 font-medium", children: [
|
|
3558
|
+
/* @__PURE__ */ jsx37(
|
|
3848
3559
|
TokenTransferPair,
|
|
3849
3560
|
{
|
|
3850
3561
|
fromToken: props.from,
|
|
@@ -3852,48 +3563,48 @@ function TxListItemProcessing(props) {
|
|
|
3852
3563
|
size: "2rem"
|
|
3853
3564
|
}
|
|
3854
3565
|
),
|
|
3855
|
-
/* @__PURE__ */
|
|
3856
|
-
/* @__PURE__ */
|
|
3857
|
-
/* @__PURE__ */
|
|
3566
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex flex-grow flex-col text-start", children: [
|
|
3567
|
+
/* @__PURE__ */ jsx37("span", { className: "text-brand-white-500 text-[0.875rem] h-[1.25rem]", children: props.caption }),
|
|
3568
|
+
/* @__PURE__ */ jsxs26(StatusBadge, { variant: props.status === "failed" ? "error" : "none", children: [
|
|
3858
3569
|
"~ ",
|
|
3859
3570
|
props.eta
|
|
3860
3571
|
] })
|
|
3861
3572
|
] }),
|
|
3862
|
-
/* @__PURE__ */
|
|
3863
|
-
|
|
3573
|
+
/* @__PURE__ */ jsx37("div", { className: "basis-4/12 max-w-xs shrink-0 flex justify-end h-[2.25rem] whitespace-nowrap", children: /* @__PURE__ */ jsxs26(
|
|
3574
|
+
motion4.div,
|
|
3864
3575
|
{
|
|
3865
3576
|
initial: { y: 0 },
|
|
3866
3577
|
animate: { y: props.status === "failed" ? "-100%" : 0 },
|
|
3867
3578
|
className: "grid",
|
|
3868
3579
|
children: [
|
|
3869
|
-
/* @__PURE__ */
|
|
3870
|
-
|
|
3580
|
+
/* @__PURE__ */ jsxs26(
|
|
3581
|
+
motion4.div,
|
|
3871
3582
|
{
|
|
3872
3583
|
animate: { opacity: props.status === "processing" ? 1 : 0 },
|
|
3873
3584
|
className: "flex flex-col text-end h-[2.25rem]",
|
|
3874
3585
|
children: [
|
|
3875
|
-
/* @__PURE__ */
|
|
3876
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ jsx37("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: props.amount }),
|
|
3587
|
+
/* @__PURE__ */ jsxs26("span", { className: "text-xs h-[1rem]", children: [
|
|
3877
3588
|
props.percentage,
|
|
3878
3589
|
"%"
|
|
3879
3590
|
] })
|
|
3880
3591
|
]
|
|
3881
3592
|
}
|
|
3882
3593
|
),
|
|
3883
|
-
/* @__PURE__ */
|
|
3884
|
-
|
|
3594
|
+
/* @__PURE__ */ jsxs26(
|
|
3595
|
+
motion4.div,
|
|
3885
3596
|
{
|
|
3886
3597
|
animate: { opacity: props.status === "failed" ? 1 : 0 },
|
|
3887
3598
|
className: "flex gap-[0.75rem] items-center h-[2.25rem] justify-end",
|
|
3888
3599
|
children: [
|
|
3889
|
-
/* @__PURE__ */
|
|
3890
|
-
/* @__PURE__ */
|
|
3600
|
+
/* @__PURE__ */ jsx37("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: props.amount }),
|
|
3601
|
+
/* @__PURE__ */ jsx37(
|
|
3891
3602
|
IconButton,
|
|
3892
3603
|
{
|
|
3893
3604
|
variant: "destructive",
|
|
3894
3605
|
rounded: "default",
|
|
3895
3606
|
size: "smx",
|
|
3896
|
-
children: /* @__PURE__ */
|
|
3607
|
+
children: /* @__PURE__ */ jsx37(RotateCcw_default, { className: "size-4 text-[currentColor]" })
|
|
3897
3608
|
}
|
|
3898
3609
|
)
|
|
3899
3610
|
]
|
|
@@ -3907,20 +3618,23 @@ function TxListItemProcessing(props) {
|
|
|
3907
3618
|
}
|
|
3908
3619
|
var TxListItem = function TxListItem2(props) {
|
|
3909
3620
|
const _a = props, { caption, completedAt, from, to, amount } = _a, rest = __objRest(_a, ["caption", "completedAt", "from", "to", "amount"]);
|
|
3910
|
-
return /* @__PURE__ */
|
|
3621
|
+
return /* @__PURE__ */ jsx37(
|
|
3911
3622
|
"button",
|
|
3912
3623
|
__spreadProps(__spreadValues({}, rest), {
|
|
3913
3624
|
type: "button",
|
|
3914
|
-
className:
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3625
|
+
className: cn(
|
|
3626
|
+
"apperance-none rounded-[1rem] bg-brand-black-350 px-[0.75rem] h-[3.75rem] flex items-center",
|
|
3627
|
+
props.className
|
|
3628
|
+
),
|
|
3629
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "flex gap-[1rem] flex-1 z-20 text-brand-black-100 font-medium", children: [
|
|
3630
|
+
/* @__PURE__ */ jsx37(TokenTransferPair, { fromToken: from, toToken: to, size: "2rem" }),
|
|
3631
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex flex-grow flex-col text-start", children: [
|
|
3632
|
+
/* @__PURE__ */ jsx37("span", { className: "text-brand-white-500 text-[0.875rem] h-[1.25rem]", children: caption }),
|
|
3633
|
+
/* @__PURE__ */ jsx37(StatusBadge, { variant: "success" })
|
|
3920
3634
|
] }),
|
|
3921
|
-
/* @__PURE__ */
|
|
3922
|
-
/* @__PURE__ */
|
|
3923
|
-
/* @__PURE__ */
|
|
3635
|
+
/* @__PURE__ */ jsxs26("div", { className: "shrink-0 flex flex-col text-end", children: [
|
|
3636
|
+
/* @__PURE__ */ jsx37("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: amount }),
|
|
3637
|
+
/* @__PURE__ */ jsx37("span", { className: "text-xs h-[1rem]", children: completedAt })
|
|
3924
3638
|
] })
|
|
3925
3639
|
] })
|
|
3926
3640
|
})
|
|
@@ -3930,14 +3644,14 @@ function StatusBadge({
|
|
|
3930
3644
|
variant,
|
|
3931
3645
|
children
|
|
3932
3646
|
}) {
|
|
3933
|
-
return /* @__PURE__ */
|
|
3934
|
-
variant === "success" ? /* @__PURE__ */
|
|
3935
|
-
/* @__PURE__ */
|
|
3647
|
+
return /* @__PURE__ */ jsxs26("span", { className: "text-xs h-[1rem] flex items-center gap-[0.125rem]", children: [
|
|
3648
|
+
variant === "success" ? /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
|
3649
|
+
/* @__PURE__ */ jsx37(Check_default, { width: "0.75rem", height: "0.75rem" }),
|
|
3936
3650
|
" ",
|
|
3937
|
-
/* @__PURE__ */
|
|
3651
|
+
/* @__PURE__ */ jsx37("span", { children: "Success" })
|
|
3938
3652
|
] }) : null,
|
|
3939
|
-
variant === "error" ? /* @__PURE__ */
|
|
3940
|
-
/* @__PURE__ */
|
|
3653
|
+
variant === "error" ? /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
|
3654
|
+
/* @__PURE__ */ jsx37(
|
|
3941
3655
|
Alert_default,
|
|
3942
3656
|
{
|
|
3943
3657
|
width: "0.75rem",
|
|
@@ -3945,18 +3659,18 @@ function StatusBadge({
|
|
|
3945
3659
|
className: "text-brand-danger-500"
|
|
3946
3660
|
}
|
|
3947
3661
|
),
|
|
3948
|
-
/* @__PURE__ */
|
|
3662
|
+
/* @__PURE__ */ jsx37("span", { className: "text-brand-danger-500", children: "Order expired" })
|
|
3949
3663
|
] }) : null,
|
|
3950
3664
|
variant === "none" ? children : null
|
|
3951
3665
|
] });
|
|
3952
3666
|
}
|
|
3953
3667
|
function TxList({ children }) {
|
|
3954
|
-
return /* @__PURE__ */
|
|
3668
|
+
return /* @__PURE__ */ jsx37("ul", { className: "flex flex-col gap-[0.5rem]", children });
|
|
3955
3669
|
}
|
|
3956
3670
|
|
|
3957
3671
|
// src/components/molecules/wallet-header.tsx
|
|
3958
3672
|
import * as React14 from "react";
|
|
3959
|
-
import { motion as
|
|
3673
|
+
import { motion as motion5 } from "motion/react";
|
|
3960
3674
|
import { cva as cva6 } from "class-variance-authority";
|
|
3961
3675
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
3962
3676
|
|
|
@@ -3965,14 +3679,14 @@ import * as Tab_ from "@radix-ui/react-tabs";
|
|
|
3965
3679
|
|
|
3966
3680
|
// src/@/ui/tabs.tsx
|
|
3967
3681
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3968
|
-
import { jsx as
|
|
3682
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3969
3683
|
function Tabs(_a) {
|
|
3970
3684
|
var _b = _a, {
|
|
3971
3685
|
className
|
|
3972
3686
|
} = _b, props = __objRest(_b, [
|
|
3973
3687
|
"className"
|
|
3974
3688
|
]);
|
|
3975
|
-
return /* @__PURE__ */
|
|
3689
|
+
return /* @__PURE__ */ jsx38(
|
|
3976
3690
|
TabsPrimitive.Root,
|
|
3977
3691
|
__spreadValues({
|
|
3978
3692
|
"data-slot": "tabs",
|
|
@@ -3986,7 +3700,7 @@ function TabsContent(_a) {
|
|
|
3986
3700
|
} = _b, props = __objRest(_b, [
|
|
3987
3701
|
"className"
|
|
3988
3702
|
]);
|
|
3989
|
-
return /* @__PURE__ */
|
|
3703
|
+
return /* @__PURE__ */ jsx38(
|
|
3990
3704
|
TabsPrimitive.Content,
|
|
3991
3705
|
__spreadValues({
|
|
3992
3706
|
"data-slot": "tabs-content",
|
|
@@ -3996,12 +3710,12 @@ function TabsContent(_a) {
|
|
|
3996
3710
|
}
|
|
3997
3711
|
|
|
3998
3712
|
// src/components/organisms/assets-collection.tsx
|
|
3999
|
-
import { jsx as
|
|
3713
|
+
import { jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4000
3714
|
function TabsList2(props) {
|
|
4001
|
-
return /* @__PURE__ */
|
|
3715
|
+
return /* @__PURE__ */ jsx39("nav", { className: "flex flex-col", children: /* @__PURE__ */ jsx39(Tab_.TabsList, { asChild: true, children: /* @__PURE__ */ jsx39("ul", { className: "flex p-0 bg-transparent gap-3", children: props.children }) }) });
|
|
4002
3716
|
}
|
|
4003
3717
|
function TabItem(props) {
|
|
4004
|
-
return /* @__PURE__ */
|
|
3718
|
+
return /* @__PURE__ */ jsx39(
|
|
4005
3719
|
Tab_.TabsTrigger,
|
|
4006
3720
|
{
|
|
4007
3721
|
value: props.value,
|
|
@@ -4014,7 +3728,7 @@ function AssetValueTrend(props) {
|
|
|
4014
3728
|
const { percentage = 0, direction: dir, dollarValue = 0 } = props;
|
|
4015
3729
|
const isZero = dollarValue === 0;
|
|
4016
3730
|
const isUp = isZero ? "up" : dir === "up";
|
|
4017
|
-
return /* @__PURE__ */
|
|
3731
|
+
return /* @__PURE__ */ jsxs27(
|
|
4018
3732
|
"div",
|
|
4019
3733
|
{
|
|
4020
3734
|
className: "inline-flex select-none gap-[0.125rem] text-brand-black-100 h-[1rem] text-[0.7rem] font-medium items-center",
|
|
@@ -4023,7 +3737,7 @@ function AssetValueTrend(props) {
|
|
|
4023
3737
|
"--trend-color": isZero ? "inherit" : !isUp ? "var(--color-brand-danger-500, indigo)" : "var(--color-brand-success-400, cyan)"
|
|
4024
3738
|
},
|
|
4025
3739
|
children: [
|
|
4026
|
-
/* @__PURE__ */
|
|
3740
|
+
/* @__PURE__ */ jsx39("span", { className: "text-[var(--trend-color)]", children: /* @__PURE__ */ jsx39(
|
|
4027
3741
|
ArrowTriangleBottom_default,
|
|
4028
3742
|
{
|
|
4029
3743
|
width: "0.75rem",
|
|
@@ -4034,13 +3748,13 @@ function AssetValueTrend(props) {
|
|
|
4034
3748
|
)
|
|
4035
3749
|
}
|
|
4036
3750
|
) }),
|
|
4037
|
-
/* @__PURE__ */
|
|
4038
|
-
/* @__PURE__ */
|
|
3751
|
+
/* @__PURE__ */ jsxs27("span", { className: "flex items-center", children: [
|
|
3752
|
+
/* @__PURE__ */ jsxs27("span", { className: "text-[var(--trend-color)]", children: [
|
|
4039
3753
|
"$",
|
|
4040
3754
|
dollarValue
|
|
4041
3755
|
] }),
|
|
4042
3756
|
"\xA0",
|
|
4043
|
-
/* @__PURE__ */
|
|
3757
|
+
/* @__PURE__ */ jsxs27("span", { className: "text-[var(--trend-base)]", children: [
|
|
4044
3758
|
"(",
|
|
4045
3759
|
percentage,
|
|
4046
3760
|
"%)"
|
|
@@ -4058,8 +3772,8 @@ function Balance(props) {
|
|
|
4058
3772
|
const [int_, decimal] = String(props.amount).split(".");
|
|
4059
3773
|
const int = Number.isNaN(+int_) ? 0 : int_;
|
|
4060
3774
|
const is_zero = props.amount === 0;
|
|
4061
|
-
return /* @__PURE__ */
|
|
4062
|
-
/* @__PURE__ */
|
|
3775
|
+
return /* @__PURE__ */ jsx39("div", { className: "select-none", children: /* @__PURE__ */ jsxs27("span", { className: "text-[2.375rem] font-medium leading-[2.875rem] whitespace-nowrap", children: [
|
|
3776
|
+
/* @__PURE__ */ jsxs27(
|
|
4063
3777
|
"span",
|
|
4064
3778
|
{
|
|
4065
3779
|
className: cn(
|
|
@@ -4071,11 +3785,11 @@ function Balance(props) {
|
|
|
4071
3785
|
]
|
|
4072
3786
|
}
|
|
4073
3787
|
),
|
|
4074
|
-
/* @__PURE__ */
|
|
3788
|
+
/* @__PURE__ */ jsxs27("span", { className: "text-brand-black-100", children: [
|
|
4075
3789
|
".",
|
|
4076
3790
|
decimal != null ? decimal : "00"
|
|
4077
3791
|
] }),
|
|
4078
|
-
/* @__PURE__ */
|
|
3792
|
+
/* @__PURE__ */ jsxs27("span", { className: "text-brand-white-500", children: [
|
|
4079
3793
|
"\xA0",
|
|
4080
3794
|
suffix
|
|
4081
3795
|
] })
|
|
@@ -4083,7 +3797,7 @@ function Balance(props) {
|
|
|
4083
3797
|
}
|
|
4084
3798
|
|
|
4085
3799
|
// src/components/molecules/wallet-header.tsx
|
|
4086
|
-
import { Fragment as
|
|
3800
|
+
import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4087
3801
|
var WalletHeaderContext = React14.createContext(null);
|
|
4088
3802
|
function useWalletHeader() {
|
|
4089
3803
|
const context = React14.useContext(WalletHeaderContext);
|
|
@@ -4129,7 +3843,7 @@ var WalletHeader = React14.forwardRef(
|
|
|
4129
3843
|
React14.useEffect(() => {
|
|
4130
3844
|
globalWalletHeaderState = show;
|
|
4131
3845
|
}, [show]);
|
|
4132
|
-
return /* @__PURE__ */
|
|
3846
|
+
return /* @__PURE__ */ jsx40(WalletHeaderContext.Provider, { value: { show, setShow }, children: /* @__PURE__ */ jsx40(
|
|
4133
3847
|
Comp,
|
|
4134
3848
|
__spreadProps(__spreadValues({
|
|
4135
3849
|
ref,
|
|
@@ -4145,7 +3859,7 @@ WalletHeader.displayName = "WalletHeader";
|
|
|
4145
3859
|
var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
|
|
4146
3860
|
var _b = _a, { className, accounts, children } = _b, props = __objRest(_b, ["className", "accounts", "children"]);
|
|
4147
3861
|
const { show: open, setShow } = useWalletHeader();
|
|
4148
|
-
return /* @__PURE__ */
|
|
3862
|
+
return /* @__PURE__ */ jsx40(
|
|
4149
3863
|
"button",
|
|
4150
3864
|
__spreadProps(__spreadValues({
|
|
4151
3865
|
ref,
|
|
@@ -4159,9 +3873,9 @@ var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
|
|
|
4159
3873
|
),
|
|
4160
3874
|
onClick: () => setShow((e) => !e)
|
|
4161
3875
|
}, props), {
|
|
4162
|
-
children: /* @__PURE__ */
|
|
4163
|
-
children || /* @__PURE__ */
|
|
4164
|
-
/* @__PURE__ */
|
|
3876
|
+
children: /* @__PURE__ */ jsxs28("div", { className: "flex w-full gap-2 justify-between items-center", children: [
|
|
3877
|
+
children || /* @__PURE__ */ jsx40(AccountStack, { accounts }),
|
|
3878
|
+
/* @__PURE__ */ jsx40(
|
|
4165
3879
|
IconButton,
|
|
4166
3880
|
{
|
|
4167
3881
|
variant: "level_1",
|
|
@@ -4170,7 +3884,7 @@ var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
|
|
|
4170
3884
|
rounded: "full",
|
|
4171
3885
|
size: "sm",
|
|
4172
3886
|
asChild: true,
|
|
4173
|
-
children: /* @__PURE__ */
|
|
3887
|
+
children: /* @__PURE__ */ jsx40("span", { children: /* @__PURE__ */ jsx40(ChevronBottomDown_default, {}) })
|
|
4174
3888
|
}
|
|
4175
3889
|
)
|
|
4176
3890
|
] })
|
|
@@ -4183,7 +3897,7 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
|
|
|
4183
3897
|
const { show: open } = useWalletHeader();
|
|
4184
3898
|
const containerRef = React14.useRef(null);
|
|
4185
3899
|
const parentRef = React14.useRef(null);
|
|
4186
|
-
const
|
|
3900
|
+
const slideDown = {
|
|
4187
3901
|
show: { opacity: [0, 0.8, 1] },
|
|
4188
3902
|
hide: { opacity: [1, 0.25, 0] }
|
|
4189
3903
|
};
|
|
@@ -4242,8 +3956,8 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
|
|
|
4242
3956
|
"onTransitionRun",
|
|
4243
3957
|
"onTransitionCancel"
|
|
4244
3958
|
]);
|
|
4245
|
-
return /* @__PURE__ */
|
|
4246
|
-
|
|
3959
|
+
return /* @__PURE__ */ jsx40(
|
|
3960
|
+
motion5.div,
|
|
4247
3961
|
{
|
|
4248
3962
|
ref: parentRef,
|
|
4249
3963
|
initial: { height: 0 },
|
|
@@ -4251,12 +3965,12 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
|
|
|
4251
3965
|
className: cn("z-10 relative", {
|
|
4252
3966
|
"pointer-events-none": !open
|
|
4253
3967
|
}),
|
|
4254
|
-
children: /* @__PURE__ */
|
|
4255
|
-
|
|
3968
|
+
children: /* @__PURE__ */ jsx40(
|
|
3969
|
+
motion5.div,
|
|
4256
3970
|
__spreadProps(__spreadValues({
|
|
4257
3971
|
ref: containerRef,
|
|
4258
3972
|
initial: { opacity: 0 },
|
|
4259
|
-
variants:
|
|
3973
|
+
variants: slideDown,
|
|
4260
3974
|
transition: { duration: 0.4 },
|
|
4261
3975
|
animate: open ? "show" : "hide",
|
|
4262
3976
|
className: cn(
|
|
@@ -4271,18 +3985,18 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
|
|
|
4271
3985
|
);
|
|
4272
3986
|
});
|
|
4273
3987
|
WalletHeaderContent.displayName = "WalletHeaderContent";
|
|
4274
|
-
var
|
|
3988
|
+
var AccountStack = React14.forwardRef(
|
|
4275
3989
|
({ accounts = [] }, ref) => {
|
|
4276
3990
|
var _a, _b;
|
|
4277
|
-
return /* @__PURE__ */
|
|
4278
|
-
/* @__PURE__ */
|
|
3991
|
+
return /* @__PURE__ */ jsx40("div", { ref, className: "flex gap-[0.625rem] items-center", children: accounts.length > 0 ? /* @__PURE__ */ jsxs28(React14.Fragment, { children: [
|
|
3992
|
+
/* @__PURE__ */ jsx40("div", { className: "inline-flex -space-x-[0.3125rem]", children: accounts.map((account, index) => /* @__PURE__ */ jsx40(
|
|
4279
3993
|
"div",
|
|
4280
3994
|
{
|
|
4281
3995
|
style: {
|
|
4282
3996
|
zIndex: accounts.length - index,
|
|
4283
3997
|
position: "relative"
|
|
4284
3998
|
},
|
|
4285
|
-
children: /* @__PURE__ */
|
|
3999
|
+
children: /* @__PURE__ */ jsx40(
|
|
4286
4000
|
BadgeIcon,
|
|
4287
4001
|
{
|
|
4288
4002
|
outline: true,
|
|
@@ -4295,15 +4009,15 @@ var AccountStack2 = React14.forwardRef(
|
|
|
4295
4009
|
},
|
|
4296
4010
|
account.address
|
|
4297
4011
|
)) }),
|
|
4298
|
-
/* @__PURE__ */
|
|
4299
|
-
/* @__PURE__ */
|
|
4012
|
+
/* @__PURE__ */ jsxs28("span", { className: "flex flex-col whitespace-nowrap", children: [
|
|
4013
|
+
/* @__PURE__ */ jsx40("span", { className: "text-base font-medium h-[1.25rem] text-brand-white-500", children: accounts.length > 1 ? /* @__PURE__ */ jsxs28(Fragment11, { children: [
|
|
4300
4014
|
accounts.length,
|
|
4301
4015
|
" wallets"
|
|
4302
|
-
] }) : /* @__PURE__ */
|
|
4303
|
-
/* @__PURE__ */
|
|
4016
|
+
] }) : /* @__PURE__ */ jsx40(Fragment11, { children: shortenAccountAddress((_b = (_a = accounts[0]) == null ? void 0 : _a.address) != null ? _b : "") || "--" }) }),
|
|
4017
|
+
/* @__PURE__ */ jsx40("span", { className: "text-xs text-start h-[1rem] font-medium inline-flex items-center gap-[0.125rem] text-brand-black-100", children: "Connected" })
|
|
4304
4018
|
] })
|
|
4305
|
-
] }) : /* @__PURE__ */
|
|
4306
|
-
/* @__PURE__ */
|
|
4019
|
+
] }) : /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
|
|
4020
|
+
/* @__PURE__ */ jsx40(
|
|
4307
4021
|
IconButton,
|
|
4308
4022
|
{
|
|
4309
4023
|
disabled: true,
|
|
@@ -4311,22 +4025,22 @@ var AccountStack2 = React14.forwardRef(
|
|
|
4311
4025
|
variant: "level_2",
|
|
4312
4026
|
rounded: "full",
|
|
4313
4027
|
size: "sm",
|
|
4314
|
-
children: /* @__PURE__ */
|
|
4028
|
+
children: /* @__PURE__ */ jsx40(Wallet_default, { className: "size-5" })
|
|
4315
4029
|
}
|
|
4316
4030
|
),
|
|
4317
|
-
/* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ jsx40("p", { className: "text-base font-medium text-brand-white-100", children: "Connect Your Wallet" })
|
|
4318
4032
|
] }) });
|
|
4319
4033
|
}
|
|
4320
4034
|
);
|
|
4321
|
-
|
|
4035
|
+
AccountStack.displayName = "AccountStack";
|
|
4322
4036
|
var WalletHeaderTabs = React14.forwardRef((_a, ref) => {
|
|
4323
4037
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4324
|
-
return /* @__PURE__ */
|
|
4038
|
+
return /* @__PURE__ */ jsx40(Tabs, __spreadProps(__spreadValues({ ref, className: cn("gap-0 pt-3", className) }, props), { children }));
|
|
4325
4039
|
});
|
|
4326
4040
|
WalletHeaderTabs.displayName = "WalletHeaderTabs";
|
|
4327
4041
|
var WalletHeaderTabsList = React14.forwardRef((_a, ref) => {
|
|
4328
4042
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4329
|
-
return /* @__PURE__ */
|
|
4043
|
+
return /* @__PURE__ */ jsx40(
|
|
4330
4044
|
TabsList2,
|
|
4331
4045
|
__spreadProps(__spreadValues({
|
|
4332
4046
|
ref,
|
|
@@ -4339,7 +4053,7 @@ var WalletHeaderTabsList = React14.forwardRef((_a, ref) => {
|
|
|
4339
4053
|
WalletHeaderTabsList.displayName = "WalletHeaderTabsList";
|
|
4340
4054
|
var WalletHeaderTabItem = React14.forwardRef((_a, ref) => {
|
|
4341
4055
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4342
|
-
return /* @__PURE__ */
|
|
4056
|
+
return /* @__PURE__ */ jsx40(
|
|
4343
4057
|
TabItem,
|
|
4344
4058
|
__spreadProps(__spreadValues({
|
|
4345
4059
|
ref,
|
|
@@ -4355,7 +4069,7 @@ var WalletHeaderTabItem = React14.forwardRef((_a, ref) => {
|
|
|
4355
4069
|
WalletHeaderTabItem.displayName = "WalletHeaderTabItem";
|
|
4356
4070
|
var WalletHeaderTabsContent = React14.forwardRef((_a, ref) => {
|
|
4357
4071
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4358
|
-
return /* @__PURE__ */
|
|
4072
|
+
return /* @__PURE__ */ jsx40(
|
|
4359
4073
|
TabsContent,
|
|
4360
4074
|
__spreadProps(__spreadValues({
|
|
4361
4075
|
ref,
|
|
@@ -4370,357 +4084,817 @@ var WalletHeaderContentBlur = React14.forwardRef((_a, ref) => {
|
|
|
4370
4084
|
var _b = _a, { className, children, asChild = false } = _b, props = __objRest(_b, ["className", "children", "asChild"]);
|
|
4371
4085
|
const { show: open } = useWalletHeader();
|
|
4372
4086
|
const Comp = asChild ? Slot10 : "div";
|
|
4373
|
-
return /* @__PURE__ */
|
|
4087
|
+
return /* @__PURE__ */ jsx40(
|
|
4374
4088
|
Comp,
|
|
4375
4089
|
__spreadProps(__spreadValues({
|
|
4376
4090
|
ref,
|
|
4377
4091
|
className: cn(
|
|
4378
|
-
"transition-all pt-[1rem]",
|
|
4379
|
-
{
|
|
4380
|
-
"opacity-15 pointer-events-none filter blur-[2px]": open
|
|
4381
|
-
},
|
|
4092
|
+
"transition-all pt-[1rem]",
|
|
4093
|
+
{
|
|
4094
|
+
"opacity-15 pointer-events-none filter blur-[2px]": open
|
|
4095
|
+
},
|
|
4096
|
+
className
|
|
4097
|
+
)
|
|
4098
|
+
}, props), {
|
|
4099
|
+
children
|
|
4100
|
+
})
|
|
4101
|
+
);
|
|
4102
|
+
});
|
|
4103
|
+
WalletHeaderContentBlur.displayName = "WalletHeaderContentBlur";
|
|
4104
|
+
|
|
4105
|
+
// src/components/navigation/header.tsx
|
|
4106
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
4107
|
+
function HeaderGradient() {
|
|
4108
|
+
return /* @__PURE__ */ jsx41("div", { className: "absolute inset-0 h-[3px] bg-gradient-brand-animated" });
|
|
4109
|
+
}
|
|
4110
|
+
function HeaderContent({
|
|
4111
|
+
children,
|
|
4112
|
+
className
|
|
4113
|
+
}) {
|
|
4114
|
+
return /* @__PURE__ */ jsx41(
|
|
4115
|
+
"div",
|
|
4116
|
+
{
|
|
4117
|
+
className: cn(
|
|
4118
|
+
"header-container w-full h-full px-4 md:px-6 flex items-center justify-between mx-auto",
|
|
4119
|
+
className
|
|
4120
|
+
),
|
|
4121
|
+
children
|
|
4122
|
+
}
|
|
4123
|
+
);
|
|
4124
|
+
}
|
|
4125
|
+
function Header({
|
|
4126
|
+
children,
|
|
4127
|
+
className
|
|
4128
|
+
}) {
|
|
4129
|
+
return /* @__PURE__ */ jsx41(
|
|
4130
|
+
"header",
|
|
4131
|
+
{
|
|
4132
|
+
className: cn(
|
|
4133
|
+
"fixed top-0 left-0 z-50 h-20 backdrop-blur-sm w-full",
|
|
4134
|
+
className
|
|
4135
|
+
),
|
|
4136
|
+
children
|
|
4137
|
+
}
|
|
4138
|
+
);
|
|
4139
|
+
}
|
|
4140
|
+
|
|
4141
|
+
// src/components/navigation/tabs.tsx
|
|
4142
|
+
import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4143
|
+
function TabAltHeader({
|
|
4144
|
+
label,
|
|
4145
|
+
isNew,
|
|
4146
|
+
isActive,
|
|
4147
|
+
onClick,
|
|
4148
|
+
className = ""
|
|
4149
|
+
}) {
|
|
4150
|
+
return /* @__PURE__ */ jsx42(
|
|
4151
|
+
"button",
|
|
4152
|
+
{
|
|
4153
|
+
type: "button",
|
|
4154
|
+
onClick,
|
|
4155
|
+
className: cn(
|
|
4156
|
+
"relative cursor-pointer w-max duration-200 transition-colors",
|
|
4157
|
+
isActive ? "text-white" : "text-brand-black-100 hover:text-white",
|
|
4158
|
+
className
|
|
4159
|
+
),
|
|
4160
|
+
children: /* @__PURE__ */ jsxs29("span", { className: "relative z-10 flex items-center gap-2", children: [
|
|
4161
|
+
/* @__PURE__ */ jsx42("span", { className: "font-medium", children: label }),
|
|
4162
|
+
isNew && /* @__PURE__ */ jsx42("span", { className: "text-brand-warning-500 caption-text absolute top-0 left-[100%] w-max", children: "New" })
|
|
4163
|
+
] })
|
|
4164
|
+
}
|
|
4165
|
+
);
|
|
4166
|
+
}
|
|
4167
|
+
function TabAltHeaders({
|
|
4168
|
+
children,
|
|
4169
|
+
className = ""
|
|
4170
|
+
}) {
|
|
4171
|
+
return /* @__PURE__ */ jsx42("div", { className: cn("flex space-x-3 mb-6", className), children });
|
|
4172
|
+
}
|
|
4173
|
+
function TabAltContent({
|
|
4174
|
+
children,
|
|
4175
|
+
className = ""
|
|
4176
|
+
}) {
|
|
4177
|
+
return /* @__PURE__ */ jsx42("div", { className, children });
|
|
4178
|
+
}
|
|
4179
|
+
function TabAltPanel({
|
|
4180
|
+
id,
|
|
4181
|
+
activeTab,
|
|
4182
|
+
children,
|
|
4183
|
+
className = ""
|
|
4184
|
+
}) {
|
|
4185
|
+
if (activeTab !== id) return null;
|
|
4186
|
+
return /* @__PURE__ */ jsx42("div", { className, children }, id);
|
|
4187
|
+
}
|
|
4188
|
+
function TabAlt({
|
|
4189
|
+
children,
|
|
4190
|
+
className = ""
|
|
4191
|
+
}) {
|
|
4192
|
+
return /* @__PURE__ */ jsx42("div", { className: cn("w-full", className), children });
|
|
4193
|
+
}
|
|
4194
|
+
|
|
4195
|
+
// src/@/ui/tooltip.tsx
|
|
4196
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4197
|
+
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4198
|
+
function TooltipProvider(_a) {
|
|
4199
|
+
var _b = _a, {
|
|
4200
|
+
delayDuration = 0
|
|
4201
|
+
} = _b, props = __objRest(_b, [
|
|
4202
|
+
"delayDuration"
|
|
4203
|
+
]);
|
|
4204
|
+
return /* @__PURE__ */ jsx43(
|
|
4205
|
+
TooltipPrimitive.Provider,
|
|
4206
|
+
__spreadValues({
|
|
4207
|
+
"data-slot": "tooltip-provider",
|
|
4208
|
+
delayDuration
|
|
4209
|
+
}, props)
|
|
4210
|
+
);
|
|
4211
|
+
}
|
|
4212
|
+
function Tooltip(_a) {
|
|
4213
|
+
var props = __objRest(_a, []);
|
|
4214
|
+
return /* @__PURE__ */ jsx43(TooltipProvider, { children: /* @__PURE__ */ jsx43(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
|
|
4215
|
+
}
|
|
4216
|
+
function TooltipTrigger(_a) {
|
|
4217
|
+
var props = __objRest(_a, []);
|
|
4218
|
+
return /* @__PURE__ */ jsx43(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
4219
|
+
}
|
|
4220
|
+
function TooltipContent(_a) {
|
|
4221
|
+
var _b = _a, {
|
|
4222
|
+
className,
|
|
4223
|
+
sideOffset = 0,
|
|
4224
|
+
children
|
|
4225
|
+
} = _b, props = __objRest(_b, [
|
|
4226
|
+
"className",
|
|
4227
|
+
"sideOffset",
|
|
4228
|
+
"children"
|
|
4229
|
+
]);
|
|
4230
|
+
return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs30(
|
|
4231
|
+
TooltipPrimitive.Content,
|
|
4232
|
+
__spreadProps(__spreadValues({
|
|
4233
|
+
"data-slot": "tooltip-content",
|
|
4234
|
+
sideOffset,
|
|
4235
|
+
className: cn(
|
|
4236
|
+
"bg-brand-black-600 text-brand-black-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
4237
|
+
className
|
|
4238
|
+
)
|
|
4239
|
+
}, props), {
|
|
4240
|
+
children: [
|
|
4241
|
+
children,
|
|
4242
|
+
/* @__PURE__ */ jsx43(TooltipPrimitive.Arrow, { className: "bg-brand-black-600 fill-brand-black-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
4243
|
+
]
|
|
4244
|
+
})
|
|
4245
|
+
) });
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4248
|
+
// src/components/organisms/settings.tsx
|
|
4249
|
+
import { useState as useState7 } from "react";
|
|
4250
|
+
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4251
|
+
var PRESET_SLIPPAGES = ["Auto", "0.25%", "0.5%", "0.75%", "1%"];
|
|
4252
|
+
var DEFAULT_TOOLTIP_TEXTS = {
|
|
4253
|
+
bridge: {
|
|
4254
|
+
slippage: "Bridge slippage tolerance helps protect against price changes during cross-chain transaction processing",
|
|
4255
|
+
deadline: "Bridge deadline is the maximum time allowed before the transaction times out and is cancelled"
|
|
4256
|
+
},
|
|
4257
|
+
swap: {
|
|
4258
|
+
slippage: "Swap slippage tolerance helps protect against price changes during token exchange",
|
|
4259
|
+
deadline: "Swap deadline is the maximum time allowed before the transaction times out and is cancelled"
|
|
4260
|
+
}
|
|
4261
|
+
};
|
|
4262
|
+
var Settings = ({
|
|
4263
|
+
isOpen,
|
|
4264
|
+
onClose,
|
|
4265
|
+
slippage = "Auto",
|
|
4266
|
+
deadline,
|
|
4267
|
+
onSlippageChange,
|
|
4268
|
+
onDeadlineChange,
|
|
4269
|
+
type,
|
|
4270
|
+
slippageTooltipText,
|
|
4271
|
+
deadlineTooltipText
|
|
4272
|
+
}) => {
|
|
4273
|
+
const [customSlippage, setCustomSlippage] = useState7("");
|
|
4274
|
+
const [customDeadline, setCustomDeadline] = useState7(deadline);
|
|
4275
|
+
const handleKeyDown = createKeyDownHandler();
|
|
4276
|
+
const handleSlippageSelect = (selectedSlippage) => {
|
|
4277
|
+
onSlippageChange == null ? void 0 : onSlippageChange(selectedSlippage);
|
|
4278
|
+
if (selectedSlippage !== "Custom") {
|
|
4279
|
+
setCustomSlippage("");
|
|
4280
|
+
}
|
|
4281
|
+
};
|
|
4282
|
+
const handleCustomSlippageChange = (e) => {
|
|
4283
|
+
const value = e.target.value;
|
|
4284
|
+
setCustomSlippage(value);
|
|
4285
|
+
if (value) {
|
|
4286
|
+
onSlippageChange == null ? void 0 : onSlippageChange(`${value}%`);
|
|
4287
|
+
}
|
|
4288
|
+
};
|
|
4289
|
+
const handleCustomSlippageBlur = (e) => {
|
|
4290
|
+
const value = Number.parseFloat(e.target.value);
|
|
4291
|
+
if (value > 100) {
|
|
4292
|
+
e.target.value = "100";
|
|
4293
|
+
setCustomSlippage("100");
|
|
4294
|
+
onSlippageChange == null ? void 0 : onSlippageChange("100%");
|
|
4295
|
+
} else if (value < 0) {
|
|
4296
|
+
e.target.value = "0";
|
|
4297
|
+
setCustomSlippage("0");
|
|
4298
|
+
onSlippageChange == null ? void 0 : onSlippageChange("0%");
|
|
4299
|
+
}
|
|
4300
|
+
};
|
|
4301
|
+
const handleDeadlineChange = (e) => {
|
|
4302
|
+
const value = e.target.value;
|
|
4303
|
+
setCustomDeadline(value);
|
|
4304
|
+
onDeadlineChange == null ? void 0 : onDeadlineChange(value);
|
|
4305
|
+
};
|
|
4306
|
+
const handleDeadlineBlur = (e) => {
|
|
4307
|
+
const value = Number.parseFloat(e.target.value);
|
|
4308
|
+
if (value < 0) {
|
|
4309
|
+
e.target.value = "0";
|
|
4310
|
+
setCustomDeadline("0");
|
|
4311
|
+
onDeadlineChange == null ? void 0 : onDeadlineChange("0");
|
|
4312
|
+
}
|
|
4313
|
+
};
|
|
4314
|
+
const isSlippageSelected = (option) => {
|
|
4315
|
+
if (option === "Custom") {
|
|
4316
|
+
return slippage !== "Auto" && !PRESET_SLIPPAGES.includes(slippage);
|
|
4317
|
+
}
|
|
4318
|
+
return slippage === option;
|
|
4319
|
+
};
|
|
4320
|
+
const isCustomSlippageActive = isSlippageSelected("Custom");
|
|
4321
|
+
const title = type === "bridge" ? "Bridge" : "Swap";
|
|
4322
|
+
const effectiveSlippageTooltip = slippageTooltipText || DEFAULT_TOOLTIP_TEXTS[type].slippage;
|
|
4323
|
+
const effectiveDeadlineTooltip = deadlineTooltipText || DEFAULT_TOOLTIP_TEXTS[type].deadline;
|
|
4324
|
+
return /* @__PURE__ */ jsxs31(Modal, { className: "p-4 !h-max", isOpen, onClose, children: [
|
|
4325
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between", children: [
|
|
4326
|
+
/* @__PURE__ */ jsxs31("div", { className: "body-1 font-medium text-white max-w-[200px] break-words", children: [
|
|
4327
|
+
title,
|
|
4328
|
+
" settings"
|
|
4329
|
+
] }),
|
|
4330
|
+
/* @__PURE__ */ jsx44(
|
|
4331
|
+
XIcon_default,
|
|
4332
|
+
{
|
|
4333
|
+
className: "size-4 cursor-pointer text-brand-black-100 hover:text-white duration-200 transition-colors",
|
|
4334
|
+
onClick: onClose
|
|
4335
|
+
}
|
|
4336
|
+
)
|
|
4337
|
+
] }),
|
|
4338
|
+
/* @__PURE__ */ jsxs31("div", { className: "mt-4", children: [
|
|
4339
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-1 text-brand-black-100", children: [
|
|
4340
|
+
/* @__PURE__ */ jsxs31("p", { className: "text-caption", children: [
|
|
4341
|
+
title,
|
|
4342
|
+
" Slippage"
|
|
4343
|
+
] }),
|
|
4344
|
+
/* @__PURE__ */ jsxs31(Tooltip, { children: [
|
|
4345
|
+
/* @__PURE__ */ jsx44(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx44(CircleInfo_default, { className: "size-[14px] cursor-pointer hover:text-white duration-200 transition-colors" }) }),
|
|
4346
|
+
/* @__PURE__ */ jsx44(TooltipContent, { children: /* @__PURE__ */ jsx44("p", { className: "text-caption", children: effectiveSlippageTooltip }) })
|
|
4347
|
+
] })
|
|
4348
|
+
] }),
|
|
4349
|
+
/* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-3 gap-2 mt-3", children: [
|
|
4350
|
+
PRESET_SLIPPAGES.map((option) => /* @__PURE__ */ jsx44(
|
|
4351
|
+
"div",
|
|
4352
|
+
{
|
|
4353
|
+
className: cn(
|
|
4354
|
+
"relative rounded-2xl p-[1.5px]",
|
|
4355
|
+
isSlippageSelected(option) ? "animated-gradient-border" : "bg-transparent"
|
|
4356
|
+
),
|
|
4357
|
+
children: /* @__PURE__ */ jsx44(
|
|
4358
|
+
"button",
|
|
4359
|
+
{
|
|
4360
|
+
type: "button",
|
|
4361
|
+
onClick: () => handleSlippageSelect(option),
|
|
4362
|
+
className: "cursor-pointer w-full rounded-[16px] bg-brand-card-100 hover:bg-brand-card-100/80 transition-colors duration-200 p-[14px] flex items-center justify-center min-h-12",
|
|
4363
|
+
children: /* @__PURE__ */ jsx44("p", { className: "body-1 font-medium", children: option })
|
|
4364
|
+
}
|
|
4365
|
+
)
|
|
4366
|
+
},
|
|
4367
|
+
option
|
|
4368
|
+
)),
|
|
4369
|
+
/* @__PURE__ */ jsx44(
|
|
4370
|
+
"div",
|
|
4371
|
+
{
|
|
4372
|
+
className: cn(
|
|
4373
|
+
"relative rounded-2xl p-[1.5px]",
|
|
4374
|
+
isCustomSlippageActive ? "animated-gradient-border" : "bg-transparent"
|
|
4375
|
+
),
|
|
4376
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "relative bg-brand-card-100 rounded-[16px]", children: [
|
|
4377
|
+
/* @__PURE__ */ jsx44(
|
|
4378
|
+
Input,
|
|
4379
|
+
{
|
|
4380
|
+
min: 0,
|
|
4381
|
+
max: 100,
|
|
4382
|
+
value: customSlippage,
|
|
4383
|
+
onChange: handleCustomSlippageChange,
|
|
4384
|
+
onBlur: handleCustomSlippageBlur,
|
|
4385
|
+
onFocus: () => handleSlippageSelect("Custom"),
|
|
4386
|
+
className: "bg-transparent focus-visible:ring-1 focus-visible:ring-brand-black-100 h-12 border-none rounded-[16px] w-full p-4 body-1 pr-8",
|
|
4387
|
+
placeholder: "Custom",
|
|
4388
|
+
type: "number",
|
|
4389
|
+
onKeyDown: handleKeyDown
|
|
4390
|
+
}
|
|
4391
|
+
),
|
|
4392
|
+
/* @__PURE__ */ jsx44("span", { className: "body-1 absolute right-4 top-1/2 -translate-y-1/2 text-brand-black-100", children: "%" })
|
|
4393
|
+
] })
|
|
4394
|
+
}
|
|
4395
|
+
)
|
|
4396
|
+
] })
|
|
4397
|
+
] }),
|
|
4398
|
+
/* @__PURE__ */ jsxs31("div", { className: "mt-6", children: [
|
|
4399
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-1 text-brand-black-100", children: [
|
|
4400
|
+
/* @__PURE__ */ jsxs31("p", { className: "text-caption", children: [
|
|
4401
|
+
title,
|
|
4402
|
+
" deadline"
|
|
4403
|
+
] }),
|
|
4404
|
+
/* @__PURE__ */ jsxs31(Tooltip, { children: [
|
|
4405
|
+
/* @__PURE__ */ jsx44(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx44(CircleInfo_default, { className: "size-[14px] cursor-pointer hover:text-white duration-200 transition-colors" }) }),
|
|
4406
|
+
/* @__PURE__ */ jsx44(TooltipContent, { children: /* @__PURE__ */ jsx44("p", { className: "text-caption", children: effectiveDeadlineTooltip }) })
|
|
4407
|
+
] })
|
|
4408
|
+
] }),
|
|
4409
|
+
/* @__PURE__ */ jsxs31("div", { className: "relative mt-3", children: [
|
|
4410
|
+
/* @__PURE__ */ jsx44(
|
|
4411
|
+
Input,
|
|
4412
|
+
{
|
|
4413
|
+
value: customDeadline,
|
|
4414
|
+
onChange: handleDeadlineChange,
|
|
4415
|
+
onBlur: handleDeadlineBlur,
|
|
4416
|
+
onKeyDown: handleKeyDown,
|
|
4417
|
+
className: "bg-brand-card-100 focus-visible:ring-1 focus-visible:ring-brand-black-100 h-12 border-none rounded-[16px] w-full p-4 body-1 pr-18",
|
|
4418
|
+
placeholder: "Enter deadline",
|
|
4419
|
+
type: "number",
|
|
4420
|
+
min: 0
|
|
4421
|
+
}
|
|
4422
|
+
),
|
|
4423
|
+
/* @__PURE__ */ jsx44("span", { className: "body-1 absolute right-4 top-1/2 -translate-y-1/2 text-brand-black-100", children: "minutes" })
|
|
4424
|
+
] })
|
|
4425
|
+
] })
|
|
4426
|
+
] });
|
|
4427
|
+
};
|
|
4428
|
+
|
|
4429
|
+
// src/components/organisms/bridge-settings.tsx
|
|
4430
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
4431
|
+
var BridgeSettings = (props) => {
|
|
4432
|
+
return /* @__PURE__ */ jsx45(Settings, __spreadProps(__spreadValues({}, props), { type: "bridge" }));
|
|
4433
|
+
};
|
|
4434
|
+
|
|
4435
|
+
// src/@/ui/sheet.tsx
|
|
4436
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4437
|
+
import { jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4438
|
+
function Sheet(_a) {
|
|
4439
|
+
var props = __objRest(_a, []);
|
|
4440
|
+
return /* @__PURE__ */ jsx46(SheetPrimitive.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
4441
|
+
}
|
|
4442
|
+
function SheetTrigger(_a) {
|
|
4443
|
+
var props = __objRest(_a, []);
|
|
4444
|
+
return /* @__PURE__ */ jsx46(SheetPrimitive.Trigger, __spreadValues({ "data-slot": "sheet-trigger" }, props));
|
|
4445
|
+
}
|
|
4446
|
+
function SheetPortal(_a) {
|
|
4447
|
+
var props = __objRest(_a, []);
|
|
4448
|
+
return /* @__PURE__ */ jsx46(SheetPrimitive.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
4449
|
+
}
|
|
4450
|
+
function SheetOverlay(_a) {
|
|
4451
|
+
var _b = _a, {
|
|
4452
|
+
className
|
|
4453
|
+
} = _b, props = __objRest(_b, [
|
|
4454
|
+
"className"
|
|
4455
|
+
]);
|
|
4456
|
+
return /* @__PURE__ */ jsx46(
|
|
4457
|
+
SheetPrimitive.Overlay,
|
|
4458
|
+
__spreadValues({
|
|
4459
|
+
"data-slot": "sheet-overlay",
|
|
4460
|
+
className: cn(
|
|
4461
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
4382
4462
|
className
|
|
4383
4463
|
)
|
|
4384
|
-
}, props)
|
|
4385
|
-
children
|
|
4386
|
-
})
|
|
4464
|
+
}, props)
|
|
4387
4465
|
);
|
|
4388
|
-
});
|
|
4389
|
-
WalletHeaderContentBlur.displayName = "WalletHeaderContentBlur";
|
|
4390
|
-
|
|
4391
|
-
// src/components/navigation/header.tsx
|
|
4392
|
-
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
4393
|
-
function HeaderGradient() {
|
|
4394
|
-
return /* @__PURE__ */ jsx43("div", { className: "absolute inset-0 h-[3px] bg-gradient-brand-animated" });
|
|
4395
4466
|
}
|
|
4396
|
-
function
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4467
|
+
function SheetContent(_a) {
|
|
4468
|
+
var _b = _a, {
|
|
4469
|
+
className,
|
|
4470
|
+
children,
|
|
4471
|
+
side = "right"
|
|
4472
|
+
} = _b, props = __objRest(_b, [
|
|
4473
|
+
"className",
|
|
4474
|
+
"children",
|
|
4475
|
+
"side"
|
|
4476
|
+
]);
|
|
4477
|
+
return /* @__PURE__ */ jsxs32(SheetPortal, { children: [
|
|
4478
|
+
/* @__PURE__ */ jsx46(SheetOverlay, {}),
|
|
4479
|
+
/* @__PURE__ */ jsxs32(
|
|
4480
|
+
SheetPrimitive.Content,
|
|
4481
|
+
__spreadProps(__spreadValues({
|
|
4482
|
+
"data-slot": "sheet-content",
|
|
4483
|
+
className: cn(
|
|
4484
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
4485
|
+
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-sm",
|
|
4486
|
+
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
4487
|
+
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
4488
|
+
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
4489
|
+
className
|
|
4490
|
+
)
|
|
4491
|
+
}, props), {
|
|
4492
|
+
children: [
|
|
4493
|
+
children,
|
|
4494
|
+
/* @__PURE__ */ jsx46(
|
|
4495
|
+
SheetPrimitive.Close,
|
|
4496
|
+
{
|
|
4497
|
+
asChild: true,
|
|
4498
|
+
className: "absolute top-[1.625rem] -left-10",
|
|
4499
|
+
children: /* @__PURE__ */ jsxs32(
|
|
4500
|
+
IconButton,
|
|
4501
|
+
{
|
|
4502
|
+
className: "cursor-pointer",
|
|
4503
|
+
variant: "secondary",
|
|
4504
|
+
rounded: "full",
|
|
4505
|
+
size: "sm",
|
|
4506
|
+
children: [
|
|
4507
|
+
/* @__PURE__ */ jsx46(ChevronDoubleRight_default, { className: "size-4 text-brand-black-100" }),
|
|
4508
|
+
/* @__PURE__ */ jsx46("span", { className: "sr-only", children: "Close" })
|
|
4509
|
+
]
|
|
4510
|
+
}
|
|
4511
|
+
)
|
|
4512
|
+
}
|
|
4513
|
+
)
|
|
4514
|
+
]
|
|
4515
|
+
})
|
|
4516
|
+
)
|
|
4517
|
+
] });
|
|
4518
|
+
}
|
|
4519
|
+
function SheetHeader(_a) {
|
|
4520
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4521
|
+
return /* @__PURE__ */ jsx46(
|
|
4401
4522
|
"div",
|
|
4402
|
-
{
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
),
|
|
4407
|
-
children
|
|
4408
|
-
}
|
|
4523
|
+
__spreadValues({
|
|
4524
|
+
"data-slot": "sheet-header",
|
|
4525
|
+
className: cn("flex flex-col gap-1.5 p-4", className)
|
|
4526
|
+
}, props)
|
|
4409
4527
|
);
|
|
4410
4528
|
}
|
|
4411
|
-
function
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
}
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
)
|
|
4422
|
-
|
|
4423
|
-
|
|
4529
|
+
function SheetTitle(_a) {
|
|
4530
|
+
var _b = _a, {
|
|
4531
|
+
className
|
|
4532
|
+
} = _b, props = __objRest(_b, [
|
|
4533
|
+
"className"
|
|
4534
|
+
]);
|
|
4535
|
+
return /* @__PURE__ */ jsx46(
|
|
4536
|
+
SheetPrimitive.Title,
|
|
4537
|
+
__spreadValues({
|
|
4538
|
+
"data-slot": "sheet-title",
|
|
4539
|
+
className: cn("text-foreground font-semibold", className)
|
|
4540
|
+
}, props)
|
|
4541
|
+
);
|
|
4542
|
+
}
|
|
4543
|
+
function SheetDescription(_a) {
|
|
4544
|
+
var _b = _a, {
|
|
4545
|
+
className
|
|
4546
|
+
} = _b, props = __objRest(_b, [
|
|
4547
|
+
"className"
|
|
4548
|
+
]);
|
|
4549
|
+
return /* @__PURE__ */ jsx46(
|
|
4550
|
+
SheetPrimitive.Description,
|
|
4551
|
+
__spreadValues({
|
|
4552
|
+
"data-slot": "sheet-description",
|
|
4553
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
4554
|
+
}, props)
|
|
4424
4555
|
);
|
|
4425
4556
|
}
|
|
4426
4557
|
|
|
4427
|
-
// src/components/navigation/
|
|
4428
|
-
import {
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
return /* @__PURE__ */
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4558
|
+
// src/components/navigation/hyperbridge-drawer.tsx
|
|
4559
|
+
import { Drawer as DrawerPrimitive2 } from "vaul";
|
|
4560
|
+
import { Fragment as Fragment12, jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4561
|
+
function HBDrawer(_a) {
|
|
4562
|
+
var props = __objRest(_a, []);
|
|
4563
|
+
return /* @__PURE__ */ jsx47(DrawerPrimitive2.Root, __spreadValues({ "data-slot": "hb-drawer" }, props));
|
|
4564
|
+
}
|
|
4565
|
+
function HBDrawerTrigger(_a) {
|
|
4566
|
+
var props = __objRest(_a, []);
|
|
4567
|
+
return /* @__PURE__ */ jsx47(DrawerPrimitive2.Trigger, __spreadValues({ "data-slot": "hb-drawer-trigger" }, props));
|
|
4568
|
+
}
|
|
4569
|
+
function HBDrawerPortal(_a) {
|
|
4570
|
+
var props = __objRest(_a, []);
|
|
4571
|
+
return /* @__PURE__ */ jsx47(DrawerPrimitive2.Portal, __spreadValues({ "data-slot": "hb-drawer-portal" }, props));
|
|
4572
|
+
}
|
|
4573
|
+
function HBDrawerClose(_a) {
|
|
4574
|
+
var props = __objRest(_a, []);
|
|
4575
|
+
return /* @__PURE__ */ jsx47(DrawerPrimitive2.Close, __spreadValues({ "data-slot": "hb-drawer-close" }, props));
|
|
4576
|
+
}
|
|
4577
|
+
function HBDrawerOverlay(_a) {
|
|
4578
|
+
var _b = _a, {
|
|
4579
|
+
className
|
|
4580
|
+
} = _b, props = __objRest(_b, [
|
|
4581
|
+
"className"
|
|
4582
|
+
]);
|
|
4583
|
+
return /* @__PURE__ */ jsx47(
|
|
4584
|
+
DrawerPrimitive2.Overlay,
|
|
4585
|
+
__spreadValues({
|
|
4586
|
+
"data-slot": "hb-drawer-overlay",
|
|
4441
4587
|
className: cn(
|
|
4442
|
-
"
|
|
4443
|
-
isActive ? "text-white" : "text-brand-black-100 hover:text-white",
|
|
4588
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
4444
4589
|
className
|
|
4445
|
-
)
|
|
4446
|
-
|
|
4447
|
-
/* @__PURE__ */ jsx44("span", { className: "font-medium", children: label }),
|
|
4448
|
-
isNew && /* @__PURE__ */ jsx44("span", { className: "text-brand-warning-500 caption-text absolute top-0 left-[100%] w-max", children: "New" })
|
|
4449
|
-
] })
|
|
4450
|
-
}
|
|
4590
|
+
)
|
|
4591
|
+
}, props)
|
|
4451
4592
|
);
|
|
4452
4593
|
}
|
|
4453
|
-
function
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4594
|
+
function HBDrawerContent(_a) {
|
|
4595
|
+
var _b = _a, {
|
|
4596
|
+
className,
|
|
4597
|
+
children
|
|
4598
|
+
} = _b, props = __objRest(_b, [
|
|
4599
|
+
"className",
|
|
4600
|
+
"children"
|
|
4601
|
+
]);
|
|
4602
|
+
return /* @__PURE__ */ jsxs33(Fragment12, { children: [
|
|
4603
|
+
/* @__PURE__ */ jsx47(HBDrawerOverlay, {}),
|
|
4604
|
+
/* @__PURE__ */ jsxs33(
|
|
4605
|
+
DrawerPrimitive2.Content,
|
|
4606
|
+
__spreadProps(__spreadValues({
|
|
4607
|
+
"data-slot": "hb-drawer-content",
|
|
4608
|
+
className: cn(
|
|
4609
|
+
"group/drawer-content bg-brand-black-550 fixed z-50 flex h-auto flex-col rounded-t-2xl px-4 pb-4 pt-0 border-brand-black-300",
|
|
4610
|
+
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
4611
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
4612
|
+
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
4613
|
+
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
4614
|
+
className
|
|
4615
|
+
)
|
|
4616
|
+
}, props), {
|
|
4617
|
+
children: [
|
|
4618
|
+
/* @__PURE__ */ jsx47("div", { className: "bg-brand-black-350 mx-auto my-2 hidden h-[5px] w-16 shrink-0 rounded-[2.5px] group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
4619
|
+
children
|
|
4620
|
+
]
|
|
4621
|
+
})
|
|
4622
|
+
)
|
|
4623
|
+
] });
|
|
4458
4624
|
}
|
|
4459
|
-
function
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4625
|
+
function HBDrawerHeader(_a) {
|
|
4626
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4627
|
+
return /* @__PURE__ */ jsx47(
|
|
4628
|
+
"div",
|
|
4629
|
+
__spreadValues({
|
|
4630
|
+
"data-slot": "hb-drawer-header",
|
|
4631
|
+
className: cn(
|
|
4632
|
+
"flex items-center justify-between py-5 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center",
|
|
4633
|
+
className
|
|
4634
|
+
)
|
|
4635
|
+
}, props)
|
|
4636
|
+
);
|
|
4464
4637
|
}
|
|
4465
|
-
function
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4638
|
+
function HBDrawerFooter(_a) {
|
|
4639
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4640
|
+
return /* @__PURE__ */ jsx47(
|
|
4641
|
+
"div",
|
|
4642
|
+
__spreadValues({
|
|
4643
|
+
"data-slot": "hb-drawer-footer",
|
|
4644
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className)
|
|
4645
|
+
}, props)
|
|
4646
|
+
);
|
|
4473
4647
|
}
|
|
4474
|
-
function
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
}
|
|
4478
|
-
|
|
4648
|
+
function HBDrawerTitle(_a) {
|
|
4649
|
+
var _b = _a, {
|
|
4650
|
+
className
|
|
4651
|
+
} = _b, props = __objRest(_b, [
|
|
4652
|
+
"className"
|
|
4653
|
+
]);
|
|
4654
|
+
return /* @__PURE__ */ jsx47(
|
|
4655
|
+
DrawerPrimitive2.Title,
|
|
4656
|
+
__spreadValues({
|
|
4657
|
+
"data-slot": "hb-drawer-title",
|
|
4658
|
+
className: cn("text-foreground font-semibold", className)
|
|
4659
|
+
}, props)
|
|
4660
|
+
);
|
|
4479
4661
|
}
|
|
4480
|
-
|
|
4481
|
-
// src/@/ui/tooltip.tsx
|
|
4482
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4483
|
-
import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4484
|
-
function TooltipProvider(_a) {
|
|
4662
|
+
function HBDrawerDescription(_a) {
|
|
4485
4663
|
var _b = _a, {
|
|
4486
|
-
|
|
4664
|
+
className
|
|
4487
4665
|
} = _b, props = __objRest(_b, [
|
|
4488
|
-
"
|
|
4666
|
+
"className"
|
|
4489
4667
|
]);
|
|
4490
|
-
return /* @__PURE__ */
|
|
4491
|
-
|
|
4668
|
+
return /* @__PURE__ */ jsx47(
|
|
4669
|
+
DrawerPrimitive2.Description,
|
|
4492
4670
|
__spreadValues({
|
|
4493
|
-
"data-slot": "
|
|
4494
|
-
|
|
4671
|
+
"data-slot": "hb-drawer-description",
|
|
4672
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
4495
4673
|
}, props)
|
|
4496
4674
|
);
|
|
4497
4675
|
}
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4676
|
+
|
|
4677
|
+
// src/components/organisms/manage-account.tsx
|
|
4678
|
+
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4679
|
+
function ManageAccounts() {
|
|
4680
|
+
return /* @__PURE__ */ jsxs34(SheetHeader, { className: "p-[1rem] -mx-[1rem]", children: [
|
|
4681
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
|
|
4682
|
+
/* @__PURE__ */ jsx48(
|
|
4683
|
+
IconButton,
|
|
4684
|
+
{
|
|
4685
|
+
disabled: true,
|
|
4686
|
+
className: "pointer-events-none !text-brand-white-500",
|
|
4687
|
+
variant: "level_2",
|
|
4688
|
+
rounded: "full",
|
|
4689
|
+
size: "sm",
|
|
4690
|
+
children: /* @__PURE__ */ jsx48(Wallet_default, { className: "size-5" })
|
|
4691
|
+
}
|
|
4692
|
+
),
|
|
4693
|
+
/* @__PURE__ */ jsx48(SheetTitle, { className: "text-brand-white-100", children: /* @__PURE__ */ jsx48("span", { className: "text-base font-medium", children: "Connect Your Wallet" }) })
|
|
4694
|
+
] }),
|
|
4695
|
+
/* @__PURE__ */ jsx48(SheetDescription, { className: "sr-only", children: "Choose a wallet provider to connect to our application." })
|
|
4696
|
+
] });
|
|
4697
|
+
}
|
|
4698
|
+
function HeaderNested(props) {
|
|
4699
|
+
var _a;
|
|
4700
|
+
const { heading, image, onBack, hideBackButton } = props;
|
|
4701
|
+
return /* @__PURE__ */ jsxs34("div", { className: "p-[1rem] -mx-[1rem]", children: [
|
|
4702
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
|
|
4703
|
+
/* @__PURE__ */ jsx48(
|
|
4704
|
+
TokenImage,
|
|
4705
|
+
{
|
|
4706
|
+
src: image.src,
|
|
4707
|
+
className: "w-[2rem]",
|
|
4708
|
+
alt: (_a = image.alt) != null ? _a : heading
|
|
4709
|
+
}
|
|
4710
|
+
),
|
|
4711
|
+
/* @__PURE__ */ jsx48(SheetTitle, { className: "text-brand-white-100 flex-1", children: /* @__PURE__ */ jsx48("span", { className: "text-base font-medium", children: heading }) }),
|
|
4712
|
+
!hideBackButton && /* @__PURE__ */ jsx48(
|
|
4713
|
+
IconButton,
|
|
4714
|
+
{
|
|
4715
|
+
variant: "level_1",
|
|
4716
|
+
rounded: "full",
|
|
4717
|
+
size: "sm",
|
|
4718
|
+
onClick: onBack,
|
|
4719
|
+
children: /* @__PURE__ */ jsx48(
|
|
4720
|
+
StepBack_default,
|
|
4721
|
+
{
|
|
4722
|
+
width: "1rem",
|
|
4723
|
+
height: "1rem",
|
|
4724
|
+
className: "text-brand-black-100"
|
|
4725
|
+
}
|
|
4726
|
+
)
|
|
4727
|
+
}
|
|
4728
|
+
)
|
|
4729
|
+
] }),
|
|
4730
|
+
/* @__PURE__ */ jsx48(SheetDescription, { className: "sr-only", children: "Choose a wallet provider to connect to our application." })
|
|
4731
|
+
] });
|
|
4501
4732
|
}
|
|
4502
|
-
function
|
|
4503
|
-
|
|
4504
|
-
|
|
4733
|
+
function ListSection({
|
|
4734
|
+
children,
|
|
4735
|
+
caption = "Heading",
|
|
4736
|
+
contentClassName
|
|
4737
|
+
}) {
|
|
4738
|
+
return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-y-[0.375rem]", children: [
|
|
4739
|
+
/* @__PURE__ */ jsx48("div", { className: "text-caption text-brand-black-100 select-none font-normal", children: caption }),
|
|
4740
|
+
/* @__PURE__ */ jsx48("div", { className: cn("flex flex-col gap-2", contentClassName), children })
|
|
4741
|
+
] });
|
|
4505
4742
|
}
|
|
4506
|
-
function
|
|
4743
|
+
function CWDrawerContent(_a) {
|
|
4507
4744
|
var _b = _a, {
|
|
4508
|
-
className,
|
|
4509
|
-
sideOffset = 0,
|
|
4510
4745
|
children
|
|
4511
4746
|
} = _b, props = __objRest(_b, [
|
|
4512
|
-
"className",
|
|
4513
|
-
"sideOffset",
|
|
4514
4747
|
"children"
|
|
4515
4748
|
]);
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
)
|
|
4525
|
-
|
|
4526
|
-
children: [
|
|
4527
|
-
children,
|
|
4528
|
-
/* @__PURE__ */ jsx45(TooltipPrimitive.Arrow, { className: "bg-brand-black-600 fill-brand-black-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
4529
|
-
]
|
|
4749
|
+
const isMobile = useIsMobile();
|
|
4750
|
+
if (isMobile) {
|
|
4751
|
+
return /* @__PURE__ */ jsx48(HBDrawer, { open: true, children: /* @__PURE__ */ jsx48(HBDrawerContent, { className: "bg-brand-black-550 rounded-t-[1rem] w-full px-[1rem] !max-h-[95vh] h-full border-t border-brand-black-300", children: /* @__PURE__ */ jsx48("div", { className: "flex flex-col", children }) }) });
|
|
4752
|
+
}
|
|
4753
|
+
return /* @__PURE__ */ jsx48(
|
|
4754
|
+
SheetContent,
|
|
4755
|
+
__spreadProps(__spreadValues({}, props), {
|
|
4756
|
+
side: "right",
|
|
4757
|
+
className: "h-full max-h-auto max-w-[calc(29.75rem_+_1.25rem)] select-none border-none shadow-none text-brand-white-500 w-full sm:w-[540px] bg-transparent p-[0.625rem]",
|
|
4758
|
+
children: /* @__PURE__ */ jsx48("div", { className: "bg-brand-black-550 flex-1 flex flex-col rounded-[1rem] w-[23.75rem] px-[1rem]", children })
|
|
4530
4759
|
})
|
|
4531
|
-
)
|
|
4760
|
+
);
|
|
4532
4761
|
}
|
|
4533
4762
|
|
|
4534
|
-
// src/components/
|
|
4535
|
-
import {
|
|
4536
|
-
import { jsx as
|
|
4537
|
-
var
|
|
4538
|
-
var DEFAULT_TOOLTIP_TEXTS = {
|
|
4539
|
-
bridge: {
|
|
4540
|
-
slippage: "Bridge slippage tolerance helps protect against price changes during cross-chain transaction processing",
|
|
4541
|
-
deadline: "Bridge deadline is the maximum time allowed before the transaction times out and is cancelled"
|
|
4542
|
-
},
|
|
4543
|
-
swap: {
|
|
4544
|
-
slippage: "Swap slippage tolerance helps protect against price changes during token exchange",
|
|
4545
|
-
deadline: "Swap deadline is the maximum time allowed before the transaction times out and is cancelled"
|
|
4546
|
-
}
|
|
4547
|
-
};
|
|
4548
|
-
var Settings = ({
|
|
4763
|
+
// src/components/tokens/swap-token-selector.tsx
|
|
4764
|
+
import { useRef as useRef3 } from "react";
|
|
4765
|
+
import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4766
|
+
var SwapTokenSelector = ({
|
|
4549
4767
|
isOpen,
|
|
4550
4768
|
onClose,
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
onSlippageChange,
|
|
4554
|
-
onDeadlineChange,
|
|
4555
|
-
type,
|
|
4556
|
-
slippageTooltipText,
|
|
4557
|
-
deadlineTooltipText
|
|
4769
|
+
children,
|
|
4770
|
+
className
|
|
4558
4771
|
}) => {
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
const handleDeadlineChange = (e) => {
|
|
4588
|
-
const value = e.target.value;
|
|
4589
|
-
setCustomDeadline(value);
|
|
4590
|
-
onDeadlineChange == null ? void 0 : onDeadlineChange(value);
|
|
4591
|
-
};
|
|
4592
|
-
const handleDeadlineBlur = (e) => {
|
|
4593
|
-
const value = Number.parseFloat(e.target.value);
|
|
4594
|
-
if (value < 0) {
|
|
4595
|
-
e.target.value = "0";
|
|
4596
|
-
setCustomDeadline("0");
|
|
4597
|
-
onDeadlineChange == null ? void 0 : onDeadlineChange("0");
|
|
4772
|
+
return /* @__PURE__ */ jsx49(Modal, { isOpen, onClose, className, children });
|
|
4773
|
+
};
|
|
4774
|
+
var SwapTokenSelectorHeader = ({
|
|
4775
|
+
title,
|
|
4776
|
+
onClose,
|
|
4777
|
+
children,
|
|
4778
|
+
className
|
|
4779
|
+
}) => {
|
|
4780
|
+
return /* @__PURE__ */ jsxs35(
|
|
4781
|
+
"div",
|
|
4782
|
+
{
|
|
4783
|
+
className: cn(
|
|
4784
|
+
"bg-brand-black-550 px-6 pt-6 pb-4 transition-all duration-200",
|
|
4785
|
+
className
|
|
4786
|
+
),
|
|
4787
|
+
children: [
|
|
4788
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between", children: [
|
|
4789
|
+
title && /* @__PURE__ */ jsx49("div", { className: "body-1 font-medium text-white max-w-[200px] break-words", children: title }),
|
|
4790
|
+
onClose && /* @__PURE__ */ jsx49(
|
|
4791
|
+
XIcon_default,
|
|
4792
|
+
{
|
|
4793
|
+
className: "size-4 cursor-pointer text-brand-black-100 hover:text-white duration-200 transition-colors",
|
|
4794
|
+
onClick: onClose
|
|
4795
|
+
}
|
|
4796
|
+
)
|
|
4797
|
+
] }),
|
|
4798
|
+
children
|
|
4799
|
+
]
|
|
4598
4800
|
}
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4801
|
+
);
|
|
4802
|
+
};
|
|
4803
|
+
var SwapTokenSelectorSearch = ({
|
|
4804
|
+
children,
|
|
4805
|
+
className
|
|
4806
|
+
}) => {
|
|
4807
|
+
return /* @__PURE__ */ jsx49("div", { className: cn("mt-4", className), children });
|
|
4808
|
+
};
|
|
4809
|
+
var SwapTokenSelectorContent = ({
|
|
4810
|
+
children,
|
|
4811
|
+
className
|
|
4812
|
+
}) => {
|
|
4813
|
+
const scrollRef = useRef3(null);
|
|
4814
|
+
return /* @__PURE__ */ jsxs35("div", { className: "relative flex-1 flex flex-col min-h-0", children: [
|
|
4815
|
+
/* @__PURE__ */ jsx49(ScrollAwareSeparator, { scrollRef }),
|
|
4816
|
+
/* @__PURE__ */ jsx49(ScrollArea, { ref: scrollRef, className: "h-full", children: /* @__PURE__ */ jsx49("div", { className: cn("px-6 pb-6 space-y-4", className), children }) })
|
|
4817
|
+
] });
|
|
4818
|
+
};
|
|
4819
|
+
var SwapTokenSelectorSection = ({
|
|
4820
|
+
title,
|
|
4821
|
+
children,
|
|
4822
|
+
className
|
|
4823
|
+
}) => {
|
|
4824
|
+
return /* @__PURE__ */ jsxs35("div", { className: cn("flex flex-col", className), children: [
|
|
4825
|
+
title && /* @__PURE__ */ jsx49("p", { className: "text-caption text-brand-black-100 mb-2", children: title }),
|
|
4826
|
+
/* @__PURE__ */ jsx49("div", { className: "space-y-2", children })
|
|
4827
|
+
] });
|
|
4828
|
+
};
|
|
4829
|
+
var SwapTokenSelectorEmpty = ({
|
|
4830
|
+
children,
|
|
4831
|
+
className
|
|
4832
|
+
}) => {
|
|
4833
|
+
return /* @__PURE__ */ jsx49(
|
|
4834
|
+
"div",
|
|
4835
|
+
{
|
|
4836
|
+
className: cn(
|
|
4837
|
+
"text-center py-8 h-full flex items-center justify-center",
|
|
4838
|
+
className
|
|
4839
|
+
),
|
|
4840
|
+
children
|
|
4603
4841
|
}
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4842
|
+
);
|
|
4843
|
+
};
|
|
4844
|
+
var SwapTokenItem = ({
|
|
4845
|
+
token,
|
|
4846
|
+
network,
|
|
4847
|
+
address,
|
|
4848
|
+
isActive = false,
|
|
4849
|
+
onClick,
|
|
4850
|
+
className,
|
|
4851
|
+
amount,
|
|
4852
|
+
usdValue
|
|
4853
|
+
}) => {
|
|
4854
|
+
return /* @__PURE__ */ jsx49(
|
|
4855
|
+
"div",
|
|
4856
|
+
{
|
|
4857
|
+
className: cn(
|
|
4858
|
+
"relative p-[1.5px] rounded-[16px]",
|
|
4859
|
+
isActive && "animated-gradient-border",
|
|
4860
|
+
className
|
|
4861
|
+
),
|
|
4862
|
+
children: /* @__PURE__ */ jsxs35(
|
|
4863
|
+
"button",
|
|
4618
4864
|
{
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
/* @__PURE__ */ jsxs34("p", { className: "text-caption", children: [
|
|
4627
|
-
title,
|
|
4628
|
-
" Slippage"
|
|
4629
|
-
] }),
|
|
4630
|
-
/* @__PURE__ */ jsxs34(Tooltip, { children: [
|
|
4631
|
-
/* @__PURE__ */ jsx46(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(CircleInfo_default, { className: "size-[14px] cursor-pointer hover:text-white duration-200 transition-colors" }) }),
|
|
4632
|
-
/* @__PURE__ */ jsx46(TooltipContent, { children: /* @__PURE__ */ jsx46("p", { className: "text-caption", children: effectiveSlippageTooltip }) })
|
|
4633
|
-
] })
|
|
4634
|
-
] }),
|
|
4635
|
-
/* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-3 gap-2 mt-3", children: [
|
|
4636
|
-
PRESET_SLIPPAGES.map((option) => /* @__PURE__ */ jsx46(
|
|
4637
|
-
"div",
|
|
4638
|
-
{
|
|
4639
|
-
className: cn(
|
|
4640
|
-
"relative rounded-2xl p-[1.5px]",
|
|
4641
|
-
isSlippageSelected(option) ? "animated-gradient-border" : "bg-transparent"
|
|
4642
|
-
),
|
|
4643
|
-
children: /* @__PURE__ */ jsx46(
|
|
4644
|
-
"button",
|
|
4645
|
-
{
|
|
4646
|
-
type: "button",
|
|
4647
|
-
onClick: () => handleSlippageSelect(option),
|
|
4648
|
-
className: "cursor-pointer w-full rounded-[16px] bg-brand-card-100 hover:bg-brand-card-100/80 transition-colors duration-200 p-[14px] flex items-center justify-center min-h-12",
|
|
4649
|
-
children: /* @__PURE__ */ jsx46("p", { className: "body-1 font-medium", children: option })
|
|
4650
|
-
}
|
|
4651
|
-
)
|
|
4652
|
-
},
|
|
4653
|
-
option
|
|
4654
|
-
)),
|
|
4655
|
-
/* @__PURE__ */ jsx46(
|
|
4656
|
-
"div",
|
|
4657
|
-
{
|
|
4658
|
-
className: cn(
|
|
4659
|
-
"relative rounded-2xl p-[1.5px]",
|
|
4660
|
-
isCustomSlippageActive ? "animated-gradient-border" : "bg-transparent"
|
|
4661
|
-
),
|
|
4662
|
-
children: /* @__PURE__ */ jsxs34("div", { className: "relative bg-brand-card-100 rounded-[16px]", children: [
|
|
4663
|
-
/* @__PURE__ */ jsx46(
|
|
4664
|
-
Input,
|
|
4865
|
+
type: "button",
|
|
4866
|
+
className: "cursor-pointer flex items-center justify-between w-full bg-brand-black-500 hover:bg-brand-black-300 duration-200 transition-colors p-3 rounded-[16px]",
|
|
4867
|
+
onClick,
|
|
4868
|
+
children: [
|
|
4869
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center text-start gap-3", children: [
|
|
4870
|
+
/* @__PURE__ */ jsx49(
|
|
4871
|
+
BadgeIcon,
|
|
4665
4872
|
{
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
onBlur: handleCustomSlippageBlur,
|
|
4671
|
-
onFocus: () => handleSlippageSelect("Custom"),
|
|
4672
|
-
className: "bg-transparent focus-visible:ring-1 focus-visible:ring-brand-black-100 h-12 border-none rounded-[16px] w-full p-4 body-1 pr-8",
|
|
4673
|
-
placeholder: "Custom",
|
|
4674
|
-
type: "number",
|
|
4675
|
-
onKeyDown: handleKeyDown
|
|
4873
|
+
src: token.image,
|
|
4874
|
+
alt: token.symbol,
|
|
4875
|
+
badgeSrc: network.image,
|
|
4876
|
+
badgeAlt: network.name
|
|
4676
4877
|
}
|
|
4677
4878
|
),
|
|
4678
|
-
/* @__PURE__ */
|
|
4879
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-[2px] items-start", children: [
|
|
4880
|
+
/* @__PURE__ */ jsx49("p", { className: "body-1 font-medium text-white", children: token.name }),
|
|
4881
|
+
address
|
|
4882
|
+
] })
|
|
4883
|
+
] }),
|
|
4884
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col items-end gap-[2px]", children: [
|
|
4885
|
+
/* @__PURE__ */ jsx49("p", { className: "body-1 font-medium text-white", children: amount }),
|
|
4886
|
+
/* @__PURE__ */ jsx49("p", { className: "text-caption text-brand-black-100", children: usdValue })
|
|
4679
4887
|
] })
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-1 text-brand-black-100", children: [
|
|
4686
|
-
/* @__PURE__ */ jsxs34("p", { className: "text-caption", children: [
|
|
4687
|
-
title,
|
|
4688
|
-
" deadline"
|
|
4689
|
-
] }),
|
|
4690
|
-
/* @__PURE__ */ jsxs34(Tooltip, { children: [
|
|
4691
|
-
/* @__PURE__ */ jsx46(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(CircleInfo_default, { className: "size-[14px] cursor-pointer hover:text-white duration-200 transition-colors" }) }),
|
|
4692
|
-
/* @__PURE__ */ jsx46(TooltipContent, { children: /* @__PURE__ */ jsx46("p", { className: "text-caption", children: effectiveDeadlineTooltip }) })
|
|
4693
|
-
] })
|
|
4694
|
-
] }),
|
|
4695
|
-
/* @__PURE__ */ jsxs34("div", { className: "relative mt-3", children: [
|
|
4696
|
-
/* @__PURE__ */ jsx46(
|
|
4697
|
-
Input,
|
|
4698
|
-
{
|
|
4699
|
-
value: customDeadline,
|
|
4700
|
-
onChange: handleDeadlineChange,
|
|
4701
|
-
onBlur: handleDeadlineBlur,
|
|
4702
|
-
onKeyDown: handleKeyDown,
|
|
4703
|
-
className: "bg-brand-card-100 focus-visible:ring-1 focus-visible:ring-brand-black-100 h-12 border-none rounded-[16px] w-full p-4 body-1 pr-18",
|
|
4704
|
-
placeholder: "Enter deadline",
|
|
4705
|
-
type: "number",
|
|
4706
|
-
min: 0
|
|
4707
|
-
}
|
|
4708
|
-
),
|
|
4709
|
-
/* @__PURE__ */ jsx46("span", { className: "body-1 absolute right-4 top-1/2 -translate-y-1/2 text-brand-black-100", children: "minutes" })
|
|
4710
|
-
] })
|
|
4711
|
-
] })
|
|
4712
|
-
] });
|
|
4713
|
-
};
|
|
4714
|
-
|
|
4715
|
-
// src/components/organisms/bridge-settings.tsx
|
|
4716
|
-
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
4717
|
-
var BridgeSettings = (props) => {
|
|
4718
|
-
return /* @__PURE__ */ jsx47(Settings, __spreadProps(__spreadValues({}, props), { type: "bridge" }));
|
|
4888
|
+
]
|
|
4889
|
+
}
|
|
4890
|
+
)
|
|
4891
|
+
}
|
|
4892
|
+
);
|
|
4719
4893
|
};
|
|
4720
4894
|
export {
|
|
4721
4895
|
AccessoryButton,
|
|
4722
4896
|
AccountItem,
|
|
4723
|
-
|
|
4897
|
+
AccountStack,
|
|
4724
4898
|
AddressInput,
|
|
4725
4899
|
AddressInputFocusBehaviour,
|
|
4726
4900
|
AssetList,
|
|
@@ -4731,11 +4905,9 @@ export {
|
|
|
4731
4905
|
BridgeForm,
|
|
4732
4906
|
BridgeInput,
|
|
4733
4907
|
BridgeSettings,
|
|
4734
|
-
BridgeSummary,
|
|
4735
4908
|
BridgeTokenButton,
|
|
4736
4909
|
Button2 as Button,
|
|
4737
4910
|
CWDrawerContent,
|
|
4738
|
-
ConnectedHeader,
|
|
4739
4911
|
Dialog,
|
|
4740
4912
|
DialogClose,
|
|
4741
4913
|
DialogContent,
|
|
@@ -4755,6 +4927,16 @@ export {
|
|
|
4755
4927
|
EmptyStateDescription,
|
|
4756
4928
|
EmptyStateTitle,
|
|
4757
4929
|
GradientButton,
|
|
4930
|
+
HBDrawer,
|
|
4931
|
+
HBDrawerClose,
|
|
4932
|
+
HBDrawerContent,
|
|
4933
|
+
HBDrawerDescription,
|
|
4934
|
+
HBDrawerFooter,
|
|
4935
|
+
HBDrawerHeader,
|
|
4936
|
+
HBDrawerOverlay,
|
|
4937
|
+
HBDrawerPortal,
|
|
4938
|
+
HBDrawerTitle,
|
|
4939
|
+
HBDrawerTrigger,
|
|
4758
4940
|
Header,
|
|
4759
4941
|
HeaderContent,
|
|
4760
4942
|
HeaderGradient,
|
|
@@ -4780,9 +4962,17 @@ export {
|
|
|
4780
4962
|
Sheet,
|
|
4781
4963
|
SheetContent,
|
|
4782
4964
|
SheetTrigger,
|
|
4965
|
+
Summary,
|
|
4783
4966
|
SummaryValues,
|
|
4784
4967
|
SwapForm,
|
|
4785
4968
|
SwapTokenButton,
|
|
4969
|
+
SwapTokenItem,
|
|
4970
|
+
SwapTokenSelector,
|
|
4971
|
+
SwapTokenSelectorContent,
|
|
4972
|
+
SwapTokenSelectorEmpty,
|
|
4973
|
+
SwapTokenSelectorHeader,
|
|
4974
|
+
SwapTokenSelectorSearch,
|
|
4975
|
+
SwapTokenSelectorSection,
|
|
4786
4976
|
TabAlt,
|
|
4787
4977
|
TabAltContent,
|
|
4788
4978
|
TabAltHeader,
|