@hyperbridge/ui 0.0.3 → 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/index.mjs CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  __objRest,
30
30
  __spreadProps,
31
31
  __spreadValues
32
- } from "./chunk-O7MCYCGJ.mjs";
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
- "indent-[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]",
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
- disiplay: "text-display font-bold",
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-white rounded-[0.15625em] overflow-hidden outline outline-offset-[-1px] outline-neutral-900",
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
  }
@@ -266,7 +259,7 @@ var sharedButtonStyles = {
266
259
  level_1: "bg-brand-black-350 text-white focus-visible:ring-brand-black-200 disabled:text-brand-black-100 hover:bg-brand-black-300 disabled:opacity-100",
267
260
  level_2: "bg-brand-black-300 text-white focus-visible:ring-brand-black-200 disabled:text-brand-black-100 hover:bg-brand-black-200 disabled:opacity-100",
268
261
  primary: "bg-white text-brand-black-600 hover:bg-brand-white-400 focus-visible:ring-brand-neutral-200 disabled:opacity-100 disabled:bg-brand-black-500 disabled:text-brand-black-100",
269
- destructive: "bg-brand-danger-200 text-brand-danger-500 pointer-events-none focus-visible:ring-brand-danger-200 disabled:opacity-100",
262
+ destructive: "bg-brand-danger-200 text-brand-danger-500 focus-visible:ring-brand-danger-200 disabled:opacity-100",
270
263
  unstyled: ""
271
264
  };
272
265
 
@@ -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
- senderAddress,
609
- senderBalance = "0",
610
- senderAmount = "",
611
- senderUsdValue = "0",
612
- senderToken = {
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
- onReceiverTokenSelect,
634
- onReceiverAddressEdit,
635
- percentagePresets = [25, 50, 100],
636
- activePercentage = null,
637
- onPercentageClick,
638
- onPercentageReset,
611
+ onPercentageChange,
639
612
  onInvert,
640
- estimatedTime = "~ 10 min",
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 handlePercentageClick = (percentage) => {
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 = (percentage) => {
656
- return percentage === 100 ? "Max" : `${percentage}%`;
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("div", { className: "bg-brand-black-500 rounded-[14.5px] h-full p-3 relative", children: [
675
- /* @__PURE__ */ jsxs7("div", { className: "w-full flex justify-between", children: [
676
- /* @__PURE__ */ jsx10("div", { className: "w-1/2", children: /* @__PURE__ */ jsx10("p", { className: "text-caption text-brand-black-100 font-medium", children: "Send" }) }),
677
- /* @__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: [
678
- /* @__PURE__ */ jsx10("span", { className: "max-w-[100px] truncate", children: senderAddress ? senderAddress : "Balance" }),
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
- senderAddress && /* @__PURE__ */ jsx10("div", { className: "flex gap-[6px]", children: percentagePresets.map((percentage) => /* @__PURE__ */ jsx10(
732
- Button,
733
- {
734
- onClick: () => handlePercentageClick(percentage),
735
- disabled: isLoading,
736
- className: cn(
737
- "rounded-[60px] h-6 py-1 px-[9.5px] text-caption transition-colors",
738
- activePercentage === percentage ? "bg-white text-brand-black-500 hover:bg-white/90" : "text-brand-black-100 hover:text-white hover:bg-brand-black-200"
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
- variant: "message",
741
- size: "sm",
742
- children: formatPercentageLabel(percentage)
743
- },
744
- percentage
745
- )) })
746
- ] }),
747
- /* @__PURE__ */ jsx10(
748
- "button",
749
- {
750
- type: "button",
751
- onClick: handleInvert,
752
- disabled: isLoading,
753
- "aria-label": "ArrowDownUp",
754
- className: "absolute group -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",
755
- children: /* @__PURE__ */ jsx10(
756
- ArrowBottomTop_default,
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
- className: "text-brand-black-100 size-3.5 transition-transform duration-200"
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__ */ jsxs7("div", { className: "h-1/2 relative p-3", children: [
767
- /* @__PURE__ */ jsxs7("div", { className: "w-full flex justify-between", children: [
768
- /* @__PURE__ */ jsx10("div", { className: "w-1/2", children: /* @__PURE__ */ jsx10("div", { className: "text-caption text-brand-black-100 font-medium", children: "Receive" }) }),
769
- receiverAddress && /* @__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 justify-end", children: [
770
- /* @__PURE__ */ jsx10("span", { className: "max-w-[100px] truncate", children: receiverAddress }),
771
- " ",
772
- /* @__PURE__ */ jsx10(
773
- "button",
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
- "data-testid": "receiver-usd-value",
812
- className: "flex items-center text-caption text-brand-black-100 font-medium",
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
- isLoading ? /* @__PURE__ */ jsx10("div", { className: "w-8 h-3 bg-brand-black-200 animate-pulse rounded ml-1" }) : receiverUsdValue
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
- senderAddress && receiverAddress && /* @__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}` })
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 { motion, AnimatePresence } from "motion/react";
964
- import { useEffect, useState } from "react";
977
+ import { AnimatePresence, motion } from "motion/react";
978
+ import { useEffect as useEffect2 } from "react";
965
979
 
966
- // src/@/ui/drawer.tsx
967
- import { Drawer as DrawerPrimitive } from "vaul";
968
- import { Fragment, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
969
- function Drawer(_a) {
970
- var props = __objRest(_a, []);
971
- return /* @__PURE__ */ jsx14(DrawerPrimitive.Root, __spreadValues({ "data-slot": "drawer" }, props));
972
- }
973
- function DrawerOverlay(_a) {
974
- var _b = _a, {
975
- className
976
- } = _b, props = __objRest(_b, [
977
- "className"
978
- ]);
979
- return /* @__PURE__ */ jsx14(
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/components/molecules/modal.tsx
1133
- import { jsx as jsx15 } from "react/jsx-runtime";
1134
- var Modal = ({
1135
- isOpen,
1136
- children,
1137
- onClose,
1138
- className = "",
1139
- animationPreset = "modal"
1140
- }) => {
1141
- const [isMobile, setIsMobile] = useState(false);
1142
- useEffect(() => {
1143
- const checkMobile = () => {
1144
- setIsMobile(window.innerWidth < 768);
1145
- };
1146
- checkMobile();
1147
- window.addEventListener("resize", checkMobile);
1148
- return () => {
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
- "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",
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
- variants,
1177
- initial: "initial",
1178
- animate: "animate",
1179
- exit: "exit",
1180
- transition,
1181
- children
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 useState2, useRef, useEffect as useEffect2 } from "react";
1212
+ import { useState as useState4, useRef, useEffect as useEffect3 } from "react";
1188
1213
  var useScrollBorder = () => {
1189
- const [showHeaderBorder, setShowHeaderBorder] = useState2(false);
1214
+ const [showHeaderBorder, setShowHeaderBorder] = useState4(false);
1190
1215
  const scrollableRef = useRef(null);
1191
- useEffect2(() => {
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] = useState2("");
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 useState3 } from "react";
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] = useState3(false);
2207
- const [isGasHovered, setIsGasHovered] = useState3(false);
2208
- const [networkSelectorState, setNetworkSelectorState] = useState3(null);
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] = useState3(false);
2546
+ const [isTokenSelectorOpen, setIsTokenSelectorOpen] = useState5(false);
2520
2547
  const handleCloseTokenSelector = () => {
2521
2548
  setIsTokenSelectorOpen(false);
2522
2549
  };
@@ -2630,7 +2657,7 @@ function AssetListItem(props) {
2630
2657
  /* @__PURE__ */ jsxs18("div", { className: "flex flex-grow flex-col text-start gap-[0.125rem]", children: [
2631
2658
  /* @__PURE__ */ jsx27("span", { className: "text-brand-white-500 text-[0.875rem] h-[1.25rem]", children: caption }),
2632
2659
  /* @__PURE__ */ jsxs18("span", { className: "text-xs h-[1rem] flex items-center gap-[0.125rem]", children: [
2633
- props.amount,
2660
+ props.amountInUSD,
2634
2661
  " ",
2635
2662
  /* @__PURE__ */ jsxs18(if_default, { cond: Boolean(props.address), children: [
2636
2663
  "\u2022 ",
@@ -2638,7 +2665,7 @@ function AssetListItem(props) {
2638
2665
  ] })
2639
2666
  ] })
2640
2667
  ] }),
2641
- /* @__PURE__ */ jsx27("div", { className: "flex-col shrink-0 text-end", children: /* @__PURE__ */ jsx27("span", { className: "text-brand-white-500 text-[1rem] h-[1.25rem]", children: props.amountInUSD }) })
2668
+ /* @__PURE__ */ jsx27("div", { className: "flex-col shrink-0 text-end", children: /* @__PURE__ */ jsx27("span", { className: "text-brand-white-500 text-[1rem] h-[1.25rem]", children: props.amount }) })
2642
2669
  ] });
2643
2670
  }
2644
2671
  function AssetList(props) {
@@ -2829,7 +2856,22 @@ function WalletProviderItem(props) {
2829
2856
  children: status === "connecting" ? "Connecting" : "Connect"
2830
2857
  }
2831
2858
  ),
2832
- status === "connected" && /* @__PURE__ */ jsx29("span", { className: "text-brand-success-400 text-xs font-medium", children: "Connected" })
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: `group ${isActive ? "cursor-default" : "cursor-pointer"}`,
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__ */ jsxs20("div", { className: "flex items-center gap-[6px]", children: [
2878
- /* @__PURE__ */ jsx29("span", { className: "text-body", children: address != null ? address : "{{Address}}" }),
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-[auto] !gap-0 group cursor-pointer",
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);
@@ -2935,6 +2978,21 @@ function ReviewItem(props) {
2935
2978
  ] })
2936
2979
  ] });
2937
2980
  }
2981
+ var ReviewItemAddress = React10.forwardRef((props, ref) => {
2982
+ const _a = props, { address, tag } = _a, PROPS = __objRest(_a, ["address", "tag"]);
2983
+ return /* @__PURE__ */ jsx30(
2984
+ "span",
2985
+ __spreadProps(__spreadValues({
2986
+ ref
2987
+ }, PROPS), {
2988
+ className: cn(
2989
+ "rounded-full px-[6px] py-[3px] text-[calc(14rem/16)] inline-flex items-center gap-[calc(4rem/16)] bg-brand-black-300",
2990
+ props.className
2991
+ ),
2992
+ children: /* @__PURE__ */ jsx30("span", { className: "text-[calc(12rem/16)] not-sr-only leading-[1rem] text-brand-white-500", children: address })
2993
+ })
2994
+ );
2995
+ });
2938
2996
  var ReviewItemCopyAddressButton = React10.forwardRef((props, ref) => {
2939
2997
  const _a = props, { address, tag } = _a, PROPS = __objRest(_a, ["address", "tag"]);
2940
2998
  return /* @__PURE__ */ jsxs21(
@@ -2967,11 +3025,13 @@ function DialogMorphContent(_a) {
2967
3025
  var _b = _a, {
2968
3026
  className,
2969
3027
  children,
2970
- showCloseButton = true
3028
+ showCloseButton = true,
3029
+ onInteractOutside
2971
3030
  } = _b, props = __objRest(_b, [
2972
3031
  "className",
2973
3032
  "children",
2974
- "showCloseButton"
3033
+ "showCloseButton",
3034
+ "onInteractOutside"
2975
3035
  ]);
2976
3036
  const [mode, setViewMode] = React11.useState("card");
2977
3037
  React11.useEffect(() => {
@@ -2994,12 +3054,19 @@ function DialogMorphContent(_a) {
2994
3054
  controller.abort();
2995
3055
  };
2996
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
+ };
2997
3063
  const Content7 = /* @__PURE__ */ jsxs22(
2998
3064
  DialogPrimitive2.Content,
2999
3065
  __spreadProps(__spreadValues({
3066
+ onInteractOutside: handleInteractOutside,
3000
3067
  "data-slot": "dialog-content",
3001
3068
  className: cn(
3002
- "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",
3003
3070
  {
3004
3071
  "responsive-fullscren-dialog": mode === "fullscreen",
3005
3072
  "responsive-card-dialog": mode === "card"
@@ -3013,7 +3080,7 @@ function DialogMorphContent(_a) {
3013
3080
  DialogPrimitive2.Close,
3014
3081
  {
3015
3082
  "data-slot": "dialog-close",
3016
- 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",
3017
3084
  children: [
3018
3085
  /* @__PURE__ */ jsx31(XIcon_default, { width: "1rem", height: "1rem" }),
3019
3086
  /* @__PURE__ */ jsx31("span", { className: "sr-only", children: "Close" })
@@ -3031,626 +3098,278 @@ function DialogMorphContent(_a) {
3031
3098
 
3032
3099
  // src/components/molecules/manage-wallet.tsx
3033
3100
  import React12 from "react";
3034
- import { motion as motion3 } from "motion/react";
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
+ }
3035
3130
 
3036
- // src/@/ui/sheet.tsx
3037
- import * as SheetPrimitive from "@radix-ui/react-dialog";
3038
- import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
3039
- function Sheet(_a) {
3040
- var props = __objRest(_a, []);
3041
- 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 });
3042
3135
  }
3043
- function SheetTrigger(_a) {
3044
- var props = __objRest(_a, []);
3045
- return /* @__PURE__ */ jsx32(SheetPrimitive.Trigger, __spreadValues({ "data-slot": "sheet-trigger" }, props));
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
+ ] });
3046
3145
  }
3047
- function SheetPortal(_a) {
3048
- var props = __objRest(_a, []);
3049
- return /* @__PURE__ */ jsx32(SheetPrimitive.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
3146
+ function makeEntry({
3147
+ name,
3148
+ icon
3149
+ }) {
3150
+ return function Entry({ children }) {
3151
+ return /* @__PURE__ */ jsx33(SummaryEntry, { icon, name, children }, name);
3152
+ };
3050
3153
  }
3051
- function SheetOverlay(_a) {
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) {
3052
3217
  var _b = _a, {
3053
- className
3218
+ className,
3219
+ value
3054
3220
  } = _b, props = __objRest(_b, [
3055
- "className"
3221
+ "className",
3222
+ "value"
3056
3223
  ]);
3057
- return /* @__PURE__ */ jsx32(
3058
- SheetPrimitive.Overlay,
3059
- __spreadValues({
3060
- "data-slot": "sheet-overlay",
3224
+ return /* @__PURE__ */ jsx34(
3225
+ ProgressPrimitive.Root,
3226
+ __spreadProps(__spreadValues({
3227
+ "data-slot": "progress",
3061
3228
  className: cn(
3062
- "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",
3229
+ "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
3063
3230
  className
3064
3231
  )
3065
- }, props)
3066
- );
3067
- }
3068
- function SheetContent(_a) {
3069
- var _b = _a, {
3070
- className,
3071
- children,
3072
- side = "right"
3073
- } = _b, props = __objRest(_b, [
3074
- "className",
3075
- "children",
3076
- "side"
3077
- ]);
3078
- return /* @__PURE__ */ jsxs23(SheetPortal, { children: [
3079
- /* @__PURE__ */ jsx32(SheetOverlay, {}),
3080
- /* @__PURE__ */ jsxs23(
3081
- SheetPrimitive.Content,
3082
- __spreadProps(__spreadValues({
3083
- "data-slot": "sheet-content",
3084
- className: cn(
3085
- "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",
3086
- 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",
3087
- 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",
3088
- 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",
3089
- 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",
3090
- className
3091
- )
3092
- }, props), {
3093
- children: [
3094
- children,
3095
- /* @__PURE__ */ jsx32(
3096
- SheetPrimitive.Close,
3097
- {
3098
- asChild: true,
3099
- className: "absolute top-[1.625rem] -left-10",
3100
- children: /* @__PURE__ */ jsxs23(
3101
- IconButton,
3102
- {
3103
- className: "cursor-pointer",
3104
- variant: "secondary",
3105
- rounded: "full",
3106
- size: "sm",
3107
- children: [
3108
- /* @__PURE__ */ jsx32(ChevronDoubleRight_default, { className: "size-4 text-brand-black-100" }),
3109
- /* @__PURE__ */ jsx32("span", { className: "sr-only", children: "Close" })
3110
- ]
3111
- }
3112
- )
3113
- }
3114
- )
3115
- ]
3116
- })
3117
- )
3118
- ] });
3119
- }
3120
- function SheetHeader(_a) {
3121
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3122
- return /* @__PURE__ */ jsx32(
3123
- "div",
3124
- __spreadValues({
3125
- "data-slot": "sheet-header",
3126
- className: cn("flex flex-col gap-1.5 p-4", className)
3127
- }, props)
3128
- );
3129
- }
3130
- function SheetTitle(_a) {
3131
- var _b = _a, {
3132
- className
3133
- } = _b, props = __objRest(_b, [
3134
- "className"
3135
- ]);
3136
- return /* @__PURE__ */ jsx32(
3137
- SheetPrimitive.Title,
3138
- __spreadValues({
3139
- "data-slot": "sheet-title",
3140
- className: cn("text-foreground font-semibold", className)
3141
- }, props)
3142
- );
3143
- }
3144
- function SheetDescription(_a) {
3145
- var _b = _a, {
3146
- className
3147
- } = _b, props = __objRest(_b, [
3148
- "className"
3149
- ]);
3150
- return /* @__PURE__ */ jsx32(
3151
- SheetPrimitive.Description,
3152
- __spreadValues({
3153
- "data-slot": "sheet-description",
3154
- className: cn("text-muted-foreground text-sm", className)
3155
- }, 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
+ })
3156
3242
  );
3157
3243
  }
3158
3244
 
3159
- // src/components/organisms/manage-account.tsx
3160
- import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
3161
- function ManageAccounts() {
3162
- return /* @__PURE__ */ jsxs24(SheetHeader, { className: "p-[1rem] -mx-[1rem]", children: [
3163
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
3164
- /* @__PURE__ */ jsx33(
3165
- IconButton,
3166
- {
3167
- disabled: true,
3168
- className: "pointer-events-none !text-brand-white-500",
3169
- variant: "level_2",
3170
- rounded: "full",
3171
- size: "sm",
3172
- children: /* @__PURE__ */ jsx33(Wallet_default, { className: "size-5" })
3173
- }
3174
- ),
3175
- /* @__PURE__ */ jsx33(SheetTitle, { className: "text-brand-white-100", children: /* @__PURE__ */ jsx33("span", { className: "text-base font-medium", children: "Connect Your Wallet" }) })
3176
- ] }),
3177
- /* @__PURE__ */ jsx33(SheetDescription, { className: "sr-only", children: "Choose a wallet provider to connect to our application." })
3178
- ] });
3179
- }
3180
- function HeaderNested(props) {
3181
- var _a;
3182
- const { heading, image, onBack, hideBackButton } = props;
3183
- return /* @__PURE__ */ jsxs24("div", { className: "p-[1rem] -mx-[1rem]", children: [
3184
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
3185
- /* @__PURE__ */ jsx33(
3186
- TokenImage,
3187
- {
3188
- src: image.src,
3189
- className: "w-[2rem]",
3190
- alt: (_a = image.alt) != null ? _a : heading
3191
- }
3192
- ),
3193
- /* @__PURE__ */ jsx33(SheetTitle, { className: "text-brand-white-100 flex-1", children: /* @__PURE__ */ jsx33("span", { className: "text-base font-medium", children: heading }) }),
3194
- !hideBackButton && /* @__PURE__ */ jsx33(
3195
- IconButton,
3196
- {
3197
- variant: "level_1",
3198
- rounded: "full",
3199
- size: "sm",
3200
- onClick: onBack,
3201
- children: /* @__PURE__ */ jsx33(
3202
- StepBack_default,
3203
- {
3204
- width: "1rem",
3205
- height: "1rem",
3206
- className: "text-brand-black-100"
3207
- }
3208
- )
3209
- }
3210
- )
3211
- ] }),
3212
- /* @__PURE__ */ jsx33(SheetDescription, { className: "sr-only", children: "Choose a wallet provider to connect to our application." })
3213
- ] });
3214
- }
3215
- function ListSection({
3216
- children,
3217
- caption = "Heading"
3218
- }) {
3219
- return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-y-[0.375rem]", children: [
3220
- /* @__PURE__ */ jsx33("div", { className: "text-caption text-brand-black-100 select-none font-normal", children: caption }),
3221
- /* @__PURE__ */ jsx33("div", { className: "grid gap-2", children })
3222
- ] });
3223
- }
3224
- function CWDrawerContent(_a) {
3225
- var _b = _a, {
3226
- children
3227
- } = _b, props = __objRest(_b, [
3228
- "children"
3229
- ]);
3230
- return /* @__PURE__ */ jsx33(
3231
- SheetContent,
3232
- __spreadProps(__spreadValues({}, props), {
3233
- side: "right",
3234
- 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]",
3235
- children: /* @__PURE__ */ jsx33("div", { className: "bg-brand-black-550 flex-1 flex flex-col rounded-[1rem] w-[29.75rem] px-[1rem]", children })
3236
- })
3237
- );
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 });
3238
3249
  }
3239
-
3240
- // src/components/molecules/manage-wallet.tsx
3241
- import { Slot as Slot8 } from "@radix-ui/react-slot";
3242
- import { isHex } from "viem";
3243
- import { Fragment as Fragment8, jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
3244
- var slideDown = {
3245
- show: {
3246
- opacity: [0, 0.8, 1]
3247
- },
3248
- hide: {
3249
- opacity: [1, 0.25, 0]
3250
- }
3250
+ var StatusTextMap = {
3251
+ processing: "Processing",
3252
+ upcoming: "Upcoming",
3253
+ error: "Failed"
3251
3254
  };
3252
- function ConnectedHeader(props) {
3253
- const { show: open, setShow } = useManager();
3254
- const { accounts, onCopy, onDisconnect, onConnect, polkadotImage, evmImage } = props;
3255
- const containerRef = React12.useRef(null);
3256
- const parent = React12.useRef(null);
3257
- const hasEVM = accounts.some((account) => isHex(account.address));
3258
- const hasPolkadot = accounts.some((account) => !isHex(account.address));
3259
- const shouldShowPolkadotOption = hasEVM && !hasPolkadot;
3260
- const shouldShowEVMOption = hasPolkadot && !hasEVM;
3261
- const shouldShowNetworkGroup = shouldShowPolkadotOption || shouldShowEVMOption;
3262
- React12.useEffect(() => {
3263
- const updateHeight = () => {
3264
- if (containerRef.current && parent.current) {
3265
- const height = containerRef.current.offsetHeight;
3266
- parent.current.style.setProperty("--container-height", `${height}px`);
3267
- }
3268
- };
3269
- updateHeight();
3270
- const resizeObserver = new ResizeObserver(updateHeight);
3271
- if (containerRef.current) {
3272
- resizeObserver.observe(containerRef.current);
3273
- }
3274
- return () => {
3275
- if (containerRef.current) {
3276
- resizeObserver.unobserve(containerRef.current);
3277
- }
3278
- resizeObserver.disconnect();
3279
- };
3280
- }, []);
3281
- return /* @__PURE__ */ jsx34(Fragment8, { children: /* @__PURE__ */ jsxs25(
3282
- "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,
3283
3264
  {
3284
- ref: parent,
3285
- className: "bg-brand-black-550 z-50 relative rounded-t-[1rem] overflow-hidden -mx-[1rem]",
3286
- style: { "--container-height": "auto" },
3287
- children: [
3288
- /* @__PURE__ */ jsx34(
3289
- "button",
3290
- {
3291
- type: "button",
3292
- className: cn(
3293
- "p-[1rem] w-full cursor-pointer text-start appearance-none z-20 relative bg-gradient-to-b from-brand-black-550 to-transparent rounded-t-[1rem] border-b border-brand-black-350",
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,
3294
3278
  {
3295
- "hover:bg-brand-black-500 border-transparent": !open
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
+ )
3296
3298
  }
3297
3299
  ),
3298
- onClick: () => setShow((e) => !e),
3299
- children: /* @__PURE__ */ jsxs25("div", { className: "flex w-full gap-2 justify-between items-center", children: [
3300
- /* @__PURE__ */ jsx34(AccountStack, { items: accounts }),
3301
- /* @__PURE__ */ jsx34(
3302
- 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",
3303
3304
  {
3304
- variant: "level_1",
3305
- "data-open": open,
3306
- className: "data-[open=false]:rotate-180 shrink-0 transform transition-all",
3307
- rounded: "full",
3308
- size: "sm",
3309
- asChild: true,
3310
- children: /* @__PURE__ */ jsx34("span", { children: /* @__PURE__ */ jsx34(ChevronBottomDown_default, {}) })
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
+ ]
3311
3313
  }
3312
- )
3313
- ] })
3314
- }
3315
- ),
3316
- /* @__PURE__ */ jsx34(
3317
- motion3.div,
3318
- {
3319
- initial: { height: 0 },
3320
- animate: { height: open ? "var(--container-height)" : 0 },
3321
- className: cn("z-10 relative", {
3322
- "pointer-events-none": !open
3323
- }),
3324
- children: /* @__PURE__ */ jsx34(
3325
- motion3.div,
3326
- {
3327
- ref: containerRef,
3328
- initial: { opacity: 0 },
3329
- variants: slideDown,
3330
- transition: { duration: 0.4 },
3331
- animate: open ? "show" : "hide",
3332
- className: "border-brand-black-350 px-[1rem] border-b pb-[1rem]",
3333
- children: /* @__PURE__ */ jsxs25(ListSection, { caption: "Networks", children: [
3334
- accounts.map((account, index) => /* @__PURE__ */ jsx34(
3335
- WalletAccountItem,
3336
- {
3337
- address: shortenAccountAddress(account.address),
3338
- network: account.network,
3339
- wallet: account.wallet,
3340
- onCopy: () => onCopy == null ? void 0 : onCopy(account.address),
3341
- onDisconnect: () => onDisconnect == null ? void 0 : onDisconnect(account, index),
3342
- isActive: true
3343
- },
3344
- `${account.address}-${index}`
3345
- )),
3346
- shouldShowNetworkGroup && /* @__PURE__ */ jsxs25(Fragment8, { children: [
3347
- shouldShowPolkadotOption && /* @__PURE__ */ jsx34(
3348
- 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,
3349
3329
  {
3350
- image: polkadotImage || defaultPolkadotImage,
3351
- description: "Use Polkadot-compatible wallets",
3352
- onConnect: () => onConnect == null ? void 0 : onConnect("polkadot")
3330
+ height: "1rem",
3331
+ width: "1rem",
3332
+ className: "text-brand-success-400"
3353
3333
  }
3354
- ),
3355
- shouldShowEVMOption && /* @__PURE__ */ jsx34(
3356
- NetworkGroupItem,
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,
3357
3353
  {
3358
- image: evmImage || defaultEvmImage,
3359
- description: "Use Ethereum-compatible wallets",
3360
- onConnect: () => onConnect == null ? void 0 : onConnect("evm")
3354
+ size: "1rem",
3355
+ className: "animate text-brand-black-100 animate-spin"
3361
3356
  }
3362
3357
  )
3363
- ] })
3364
- ] })
3365
- }
3366
- )
3367
- }
3368
- )
3369
- ]
3358
+ ]
3359
+ }
3360
+ ) : null
3361
+ ] })
3362
+ ]
3363
+ }
3364
+ )
3370
3365
  }
3371
- ) });
3372
- }
3373
- function AccountStack({ items = [] }) {
3374
- var _a, _b, _c;
3375
- return /* @__PURE__ */ jsxs25("div", { className: "flex gap-[0.625rem] items-center", children: [
3376
- /* @__PURE__ */ jsx34("div", { className: "inline-flex -space-x-[0.3125rem]", children: items.map((item, index) => /* @__PURE__ */ jsx34(
3377
- "div",
3378
- {
3379
- style: { zIndex: items.length - index, position: "relative" },
3380
- children: /* @__PURE__ */ jsx34(
3381
- BadgeIcon,
3382
- {
3383
- outline: true,
3384
- src: item.wallet.image,
3385
- alt: item.wallet.name,
3386
- badgeSrc: item.network.image,
3387
- badgeAlt: item.network.name
3388
- }
3389
- )
3390
- },
3391
- item.address
3392
- )) }),
3393
- /* @__PURE__ */ jsxs25("span", { className: "flex flex-col whitespace-nowrap", children: [
3394
- /* @__PURE__ */ jsx34("span", { className: "text-base font-medium h-[1.25rem] text-brand-white-500", children: items.length > 1 ? /* @__PURE__ */ jsxs25(Fragment8, { children: [
3395
- items.length,
3396
- " wallets"
3397
- ] }) : /* @__PURE__ */ jsx34(Fragment8, { children: (_c = shortenAccountAddress((_b = (_a = items[0]) == null ? void 0 : _a.address) != null ? _b : "")) != null ? _c : "--" }) }),
3398
- /* @__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" })
3399
- ] })
3400
- ] });
3366
+ );
3401
3367
  }
3402
- function WalletManagerUIProvider(props) {
3403
- const { expand: open = false, children } = props;
3404
- const [show, setShow] = React12.useState(open);
3405
- return /* @__PURE__ */ jsx34(WalletManagerContext.Provider, { value: { show, setShow }, children });
3406
- }
3407
- var WalletManagerContext = React12.createContext({
3408
- show: false,
3409
- // @ts-expect-error
3410
- setShow: React12.Dispatch
3411
- });
3412
- function useManager() {
3413
- return React12.useContext(WalletManagerContext);
3414
- }
3415
- function WalletManagerUIContent({
3416
- children
3417
- }) {
3418
- const { show } = useManager();
3419
- return /* @__PURE__ */ jsx34(
3420
- Slot8,
3421
- {
3422
- className: cn("transition-all pt-[1rem] flex-1", {
3423
- "opacity-15 pointer-events-none filter blur-[2px]": show
3424
- }),
3425
- children
3426
- }
3427
- );
3428
- }
3429
-
3430
- // src/components/molecules/summary.tsx
3431
- import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
3432
- function BridgeSummary(props) {
3433
- return /* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-2 text-brand-black-100", children: props.children });
3434
- }
3435
- function SummaryEntry(props) {
3436
- const Icon = props.icon;
3437
- return /* @__PURE__ */ jsxs26("div", { className: "flex select-none items-center text-[calc(12rem/16)] font-medium", children: [
3438
- /* @__PURE__ */ jsxs26("dt", { className: "flex-1 gap-1 flex items-center", children: [
3439
- /* @__PURE__ */ jsx35(Icon, { size: "1.16em" }),
3440
- /* @__PURE__ */ jsx35("span", { className: "text-[1em] leading-[1rem]", children: props.name })
3441
- ] }),
3442
- /* @__PURE__ */ jsx35("dd", { children: props.children })
3443
- ] });
3444
- }
3445
- function makeEntry({
3446
- name,
3447
- icon
3448
- }) {
3449
- return function Entry({ children }) {
3450
- return /* @__PURE__ */ jsx35(SummaryEntry, { icon, name, children }, name);
3451
- };
3452
- }
3453
- var Bridge = makeEntry({
3454
- icon: ({ size }) => /* @__PURE__ */ jsx35(Percent_default, { width: size }),
3455
- name: "Bridge fee"
3456
- });
3457
- var GasEntry = makeEntry({
3458
- icon: ({ size }) => /* @__PURE__ */ jsx35(Gas_default, { width: size }),
3459
- name: "Gas costs"
3460
- });
3461
- var SpillageTolerance = makeEntry({
3462
- icon: ({ size }) => /* @__PURE__ */ jsx35(ArrowBottomTop_default, { width: size }),
3463
- name: "Spillage tolerance"
3464
- });
3465
- var Route = makeEntry({
3466
- icon: ({ size }) => /* @__PURE__ */ jsx35(ArrowSplit_default, { width: size }),
3467
- name: "Route"
3468
- });
3469
- var ETA = makeEntry({
3470
- icon: ({ size }) => /* @__PURE__ */ jsx35(Clock_default, { width: size }),
3471
- name: "Estimated time"
3472
- });
3473
- var SummaryValues = {
3474
- Key: {
3475
- Bridge,
3476
- GasEntry,
3477
- SpillageTolerance,
3478
- Route,
3479
- ETA
3480
- },
3481
- Values: {
3482
- Highlight: ({ children }) => {
3483
- return /* @__PURE__ */ jsx35("span", { className: "text-[inherit] text-brand-white-500", children });
3484
- },
3485
- Soft: ({ children }) => {
3486
- return /* @__PURE__ */ jsx35("span", { className: "text-[inherit]text-brand-black-50", children });
3487
- }
3488
- }
3489
- };
3490
-
3491
- // src/components/molecules/timeline.tsx
3492
- import React13 from "react";
3493
- import { Loader2 } from "lucide-react";
3494
- import { AnimatePresence as AnimatePresence2, motion as motion4 } from "motion/react";
3495
-
3496
- // src/@/ui/progress.tsx
3497
- import * as ProgressPrimitive from "@radix-ui/react-progress";
3498
- import { jsx as jsx36 } from "react/jsx-runtime";
3499
- function Progress(_a) {
3500
- var _b = _a, {
3501
- className,
3502
- value
3503
- } = _b, props = __objRest(_b, [
3504
- "className",
3505
- "value"
3506
- ]);
3507
- return /* @__PURE__ */ jsx36(
3508
- ProgressPrimitive.Root,
3509
- __spreadProps(__spreadValues({
3510
- "data-slot": "progress",
3511
- className: cn(
3512
- "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
3513
- className
3514
- )
3515
- }, props), {
3516
- children: /* @__PURE__ */ jsx36(
3517
- ProgressPrimitive.Indicator,
3518
- {
3519
- "data-slot": "progress-indicator",
3520
- className: "bg-[var(--track-color)] h-full w-full flex-1 transition-all",
3521
- style: { transform: `translateX(-${100 - (value || 0)}%)` }
3522
- }
3523
- )
3524
- })
3525
- );
3526
- }
3527
-
3528
- // src/components/molecules/timeline.tsx
3529
- import { Slot as Slot9 } from "@radix-ui/react-slot";
3530
- import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
3531
- function TimelineList(props) {
3532
- return /* @__PURE__ */ jsx37("ul", { className: "flex flex-col", children: props.children });
3533
- }
3534
- var StatusTextMap = {
3535
- processing: "Processing",
3536
- upcoming: "Upcoming",
3537
- error: "Failed"
3538
- };
3539
- function TimelineItem(props) {
3540
- var _a, _b, _c, _d;
3541
- const { processingStatus, caption } = props;
3542
- const is_visually_active = processingStatus !== "upcoming";
3543
- const id = React13.useId();
3544
- const layoutId = `${id}/${caption}/content-2`;
3545
- return /* @__PURE__ */ jsx37(
3546
- motion4.li,
3547
- {
3548
- "data-process-status": processingStatus,
3549
- className: "block bg-brand-black-350 cursor-default select-none font-medium text-brand-white-500",
3550
- children: /* @__PURE__ */ jsxs27(
3551
- motion4.div,
3552
- {
3553
- initial: { opacity: 0.5 },
3554
- animate: {
3555
- opacity: is_visually_active ? 1 : 0.5
3556
- },
3557
- className: "flex h-[3.5rem] items-center gap-[0.86rem] py-[0.5625rem] px-[0.75rem] ",
3558
- children: [
3559
- props.level === 0 ? /* @__PURE__ */ jsx37(BadgeIcon, __spreadValues({}, props.badge)) : /* @__PURE__ */ jsx37(
3560
- IconButton,
3561
- {
3562
- variant: "level_2",
3563
- size: "sm",
3564
- rounded: "full",
3565
- className: "pointer-events-none !bg-transparent backdrop-blur-[34px]",
3566
- style: {
3567
- boxShadow: "0 4px 24px 0 rgba(255, 255, 255, 0.05) inset"
3568
- },
3569
- children: /* @__PURE__ */ jsx37(
3570
- "span",
3571
- {
3572
- className: cn(
3573
- "w-[0.5rem] inline-block aspect-square rounded-lg bg-brand-white-500",
3574
- {
3575
- "bg-brand-success-400": processingStatus === "completed",
3576
- "bg-brand-danger-500": processingStatus === "error"
3577
- }
3578
- )
3579
- }
3580
- )
3581
- }
3582
- ),
3583
- /* @__PURE__ */ jsxs27("div", { className: "flex flex-col flex-1 gap-[calc(4/16rem)]", children: [
3584
- /* @__PURE__ */ jsx37("div", { className: "text-brand-white-500 text-[1rem] h-[1.25rem]", children: caption }),
3585
- /* @__PURE__ */ jsxs27("div", { className: "text-xs h-[1rem] text-brand-black-100", children: [
3586
- processingStatus === "completed" ? /* @__PURE__ */ jsx37("span", { children: /* @__PURE__ */ jsxs27(
3587
- "a",
3588
- {
3589
- href: (_a = props == null ? void 0 : props.data) == null ? void 0 : _a.transactionUrl,
3590
- className: "flex cursor-pointer gap-[calc(2rem/16)] items-center",
3591
- children: [
3592
- /* @__PURE__ */ jsx37("span", { children: "View in explorer " }),
3593
- /* @__PURE__ */ jsx37(ArrowUpRight_default, { width: "0.75rem", height: "0.75rem" })
3594
- ]
3595
- }
3596
- ) }) : null,
3597
- processingStatus === "completed" ? null : /* @__PURE__ */ jsx37("span", { children: /* @__PURE__ */ jsx37("span", { children: (_b = props == null ? void 0 : props.secondary) != null ? _b : StatusTextMap[processingStatus] }) })
3598
- ] })
3599
- ] }),
3600
- /* @__PURE__ */ jsxs27(AnimatePresence2, { children: [
3601
- processingStatus === "completed" ? /* @__PURE__ */ jsxs27(
3602
- motion4.div,
3603
- {
3604
- layoutId,
3605
- initial: { x: 10, opacity: 0 },
3606
- animate: { x: 0, opacity: 1 },
3607
- exit: { x: 10, opacity: 0 },
3608
- className: "flex gap-[calc(8rem/16)] items-center",
3609
- children: [
3610
- /* @__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 }),
3611
- /* @__PURE__ */ jsx37(
3612
- Check_default,
3613
- {
3614
- height: "1rem",
3615
- width: "1rem",
3616
- className: "text-brand-success-400"
3617
- }
3618
- )
3619
- ]
3620
- }
3621
- ) : null,
3622
- processingStatus === "processing" ? /* @__PURE__ */ jsxs27(
3623
- motion4.div,
3624
- {
3625
- initial: { x: 10, opacity: 0 },
3626
- animate: { x: 0, opacity: 1 },
3627
- exit: { x: 10, opacity: 0 },
3628
- layoutId,
3629
- className: "flex gap-[calc(10rem/16)] items-center",
3630
- children: [
3631
- /* @__PURE__ */ jsx37("span", { className: "text-[calc(13rem/16)]", children: (_d = props == null ? void 0 : props.data) == null ? void 0 : _d.eta }),
3632
- /* @__PURE__ */ jsx37(
3633
- Loader2,
3634
- {
3635
- size: "1rem",
3636
- className: "animate text-brand-black-100 animate-spin"
3637
- }
3638
- )
3639
- ]
3640
- }
3641
- ) : null
3642
- ] })
3643
- ]
3644
- }
3645
- )
3646
- }
3647
- );
3648
- }
3649
- function TimelineListGroup(props) {
3650
- return /* @__PURE__ */ jsx37("ul", { className: cn("flex flex-col"), children: props.children });
3368
+ function TimelineListGroup(props) {
3369
+ return /* @__PURE__ */ jsx35("ul", { className: cn("flex flex-col"), children: props.children });
3651
3370
  }
3652
3371
  var TimelineRoot = React13.forwardRef((props, ref) => {
3653
- return /* @__PURE__ */ jsx37(
3372
+ return /* @__PURE__ */ jsx35(
3654
3373
  "ul",
3655
3374
  __spreadProps(__spreadValues({
3656
3375
  ref
@@ -3670,8 +3389,8 @@ var trackColorMap = {
3670
3389
  };
3671
3390
  function TransactionTimer(props) {
3672
3391
  const { mins, hours, seconds, severity = "warning" } = props;
3673
- return /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-[calc(6rem/16)]", children: [
3674
- /* @__PURE__ */ jsxs27(
3392
+ return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-[calc(6rem/16)]", children: [
3393
+ /* @__PURE__ */ jsxs24(
3675
3394
  "div",
3676
3395
  {
3677
3396
  className: cn(
@@ -3682,19 +3401,19 @@ function TransactionTimer(props) {
3682
3401
  }
3683
3402
  ),
3684
3403
  children: [
3685
- /* @__PURE__ */ jsx37("span", { children: "Transaction will timeout in" }),
3686
- /* @__PURE__ */ jsxs27("span", { className: "text-brand-white-500", children: [
3404
+ /* @__PURE__ */ jsx35("span", { children: "Transaction will timeout in" }),
3405
+ /* @__PURE__ */ jsxs24("span", { className: "text-brand-white-500", children: [
3687
3406
  String(hours).padStart(2, "0"),
3688
3407
  ":",
3689
3408
  String(mins).padStart(2, "0"),
3690
3409
  ":",
3691
3410
  String(seconds).padStart(2, "0")
3692
3411
  ] }),
3693
- /* @__PURE__ */ jsx37("span", { children: /* @__PURE__ */ jsx37(CircleInfo_default, { width: "1em", height: "1em" }) })
3412
+ /* @__PURE__ */ jsx35("span", { children: /* @__PURE__ */ jsx35(CircleInfo_default, { width: "1em", height: "1em" }) })
3694
3413
  ]
3695
3414
  }
3696
3415
  ),
3697
- /* @__PURE__ */ jsx37(
3416
+ /* @__PURE__ */ jsx35(
3698
3417
  Progress,
3699
3418
  {
3700
3419
  value: props.progress,
@@ -3708,8 +3427,8 @@ function TransactionTimer(props) {
3708
3427
  }
3709
3428
  function TimerWrap(props) {
3710
3429
  const show = props.reveal;
3711
- return /* @__PURE__ */ jsxs27(
3712
- motion4.div,
3430
+ return /* @__PURE__ */ jsxs24(
3431
+ motion3.div,
3713
3432
  {
3714
3433
  initial: { paddingTop: 0 },
3715
3434
  animate: !show ? { paddingBlockStart: 0 } : { paddingBlockStart: "var(--timer-top)" },
@@ -3718,7 +3437,7 @@ function TimerWrap(props) {
3718
3437
  },
3719
3438
  className: "flex flex-col items-stretch justify-start relative",
3720
3439
  children: [
3721
- /* @__PURE__ */ jsx37(
3440
+ /* @__PURE__ */ jsx35(
3722
3441
  "div",
3723
3442
  {
3724
3443
  className: cn(
@@ -3728,7 +3447,7 @@ function TimerWrap(props) {
3728
3447
  children: props.Timer
3729
3448
  }
3730
3449
  ),
3731
- /* @__PURE__ */ jsx37(
3450
+ /* @__PURE__ */ jsx35(
3732
3451
  Slot9,
3733
3452
  {
3734
3453
  className: cn("min-h-[calc(56rem/11)] z-20 relative !rounded-[1rem]", {
@@ -3743,7 +3462,7 @@ function TimerWrap(props) {
3743
3462
  }
3744
3463
 
3745
3464
  // src/components/molecules/toast.tsx
3746
- import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
3465
+ import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
3747
3466
  var SeverityConfig = {
3748
3467
  error: {
3749
3468
  icon: Alert_default,
@@ -3769,58 +3488,65 @@ function ToastBox(props) {
3769
3488
  event.stopPropagation();
3770
3489
  onDismiss == null ? void 0 : onDismiss(event);
3771
3490
  };
3772
- return /* @__PURE__ */ jsx38(SmoothCorners, { size: "sm", children: /* @__PURE__ */ jsxs28("div", { 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", children: [
3773
- /* @__PURE__ */ jsx38(
3774
- "div",
3775
- {
3776
- className: cn("items-center justify-center shrink-0 grow-0", color),
3777
- style: { fontSize: "calc(calc(24/16) * 1rem)" },
3778
- children: /* @__PURE__ */ jsx38(Icon, { width: "1em", height: "1em" })
3779
- }
3780
- ),
3781
- /* @__PURE__ */ jsxs28("div", { className: "flex flex-col flex-1", children: [
3782
- /* @__PURE__ */ jsx38(Text, { variant: "body1", className: "text-foreground", children: props.heading }),
3783
- /* @__PURE__ */ jsx38(
3784
- Text,
3785
- {
3786
- variant: "caption2",
3787
- className: "text-muted-foreground text-balance",
3788
- children: props.children
3789
- }
3790
- )
3791
- ] }),
3792
- /* @__PURE__ */ jsx38("div", { className: "flex gap-[calc(6rem/16)] items-center self-center w-full md:w-auto", children: actions ? /* @__PURE__ */ jsxs28(Fragment9, { children: [
3793
- /* @__PURE__ */ jsx38("div", { className: "flex gap-[calc(6rem/16)] flex-1 items-center *:flex-1", children: actions }),
3794
- /* @__PURE__ */ jsx38(
3795
- IconButton,
3796
- {
3797
- className: "cursor-pointer",
3798
- onClick: handleDismiss,
3799
- size: "smx",
3800
- variant: "level_2",
3801
- rounded: "default",
3802
- children: /* @__PURE__ */ jsx38(XIcon_default, { width: "1rem" })
3803
- }
3804
- )
3805
- ] }) : /* @__PURE__ */ jsx38(
3806
- Button2,
3807
- {
3808
- size: "sm",
3809
- variant: "level_2",
3810
- className: "w-full cursor-pointer",
3811
- onClick: handleDismiss,
3812
- children: "Close"
3813
- }
3814
- ) })
3815
- ] }) });
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
+ ) });
3816
3542
  }
3817
3543
 
3818
3544
  // src/components/molecules/transaction-list.tsx
3819
- import { motion as motion5 } from "motion/react";
3820
- import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
3545
+ import { motion as motion4 } from "motion/react";
3546
+ import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
3821
3547
  function TxListItemProcessing(props) {
3822
- return /* @__PURE__ */ jsx39(GradientContainer, { children: /* @__PURE__ */ jsxs29("div", { className: "rounded-[1rem] bg-brand-black-350 px-[0.75rem] h-[3.75rem] flex items-center", children: [
3823
- /* @__PURE__ */ jsx39(
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(
3824
3550
  GradientLine,
3825
3551
  {
3826
3552
  behaviour: "progress",
@@ -3828,8 +3554,8 @@ function TxListItemProcessing(props) {
3828
3554
  mode: props.status === "failed" ? "error" : "default"
3829
3555
  }
3830
3556
  ),
3831
- /* @__PURE__ */ jsxs29("div", { className: "flex gap-[1rem] flex-1 z-20 text-brand-black-100 font-medium", children: [
3832
- /* @__PURE__ */ jsx39(
3557
+ /* @__PURE__ */ jsxs26("div", { className: "flex gap-[1rem] flex-1 z-20 text-brand-black-100 font-medium", children: [
3558
+ /* @__PURE__ */ jsx37(
3833
3559
  TokenTransferPair,
3834
3560
  {
3835
3561
  fromToken: props.from,
@@ -3837,48 +3563,48 @@ function TxListItemProcessing(props) {
3837
3563
  size: "2rem"
3838
3564
  }
3839
3565
  ),
3840
- /* @__PURE__ */ jsxs29("div", { className: "flex flex-grow flex-col text-start", children: [
3841
- /* @__PURE__ */ jsx39("span", { className: "text-brand-white-500 text-[0.875rem] h-[1.25rem]", children: props.caption }),
3842
- /* @__PURE__ */ jsxs29(StatusBadge, { variant: props.status === "failed" ? "error" : "none", children: [
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: [
3843
3569
  "~ ",
3844
3570
  props.eta
3845
3571
  ] })
3846
3572
  ] }),
3847
- /* @__PURE__ */ jsx39("div", { className: "basis-4/12 max-w-xs shrink-0 flex justify-end h-[2.25rem] whitespace-nowrap", children: /* @__PURE__ */ jsxs29(
3848
- motion5.div,
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,
3849
3575
  {
3850
3576
  initial: { y: 0 },
3851
3577
  animate: { y: props.status === "failed" ? "-100%" : 0 },
3852
3578
  className: "grid",
3853
3579
  children: [
3854
- /* @__PURE__ */ jsxs29(
3855
- motion5.div,
3580
+ /* @__PURE__ */ jsxs26(
3581
+ motion4.div,
3856
3582
  {
3857
3583
  animate: { opacity: props.status === "processing" ? 1 : 0 },
3858
3584
  className: "flex flex-col text-end h-[2.25rem]",
3859
3585
  children: [
3860
- /* @__PURE__ */ jsx39("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: props.amount }),
3861
- /* @__PURE__ */ jsxs29("span", { className: "text-xs h-[1rem]", children: [
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: [
3862
3588
  props.percentage,
3863
3589
  "%"
3864
3590
  ] })
3865
3591
  ]
3866
3592
  }
3867
3593
  ),
3868
- /* @__PURE__ */ jsxs29(
3869
- motion5.div,
3594
+ /* @__PURE__ */ jsxs26(
3595
+ motion4.div,
3870
3596
  {
3871
3597
  animate: { opacity: props.status === "failed" ? 1 : 0 },
3872
3598
  className: "flex gap-[0.75rem] items-center h-[2.25rem] justify-end",
3873
3599
  children: [
3874
- /* @__PURE__ */ jsx39("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: props.amount }),
3875
- /* @__PURE__ */ jsx39(
3600
+ /* @__PURE__ */ jsx37("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: props.amount }),
3601
+ /* @__PURE__ */ jsx37(
3876
3602
  IconButton,
3877
3603
  {
3878
3604
  variant: "destructive",
3879
3605
  rounded: "default",
3880
3606
  size: "smx",
3881
- children: /* @__PURE__ */ jsx39(RotateCcw_default, { className: "size-4 text-[currentColor]" })
3607
+ children: /* @__PURE__ */ jsx37(RotateCcw_default, { className: "size-4 text-[currentColor]" })
3882
3608
  }
3883
3609
  )
3884
3610
  ]
@@ -3892,20 +3618,23 @@ function TxListItemProcessing(props) {
3892
3618
  }
3893
3619
  var TxListItem = function TxListItem2(props) {
3894
3620
  const _a = props, { caption, completedAt, from, to, amount } = _a, rest = __objRest(_a, ["caption", "completedAt", "from", "to", "amount"]);
3895
- return /* @__PURE__ */ jsx39(
3621
+ return /* @__PURE__ */ jsx37(
3896
3622
  "button",
3897
3623
  __spreadProps(__spreadValues({}, rest), {
3898
3624
  type: "button",
3899
- className: "apperance-none rounded-[1rem] bg-brand-black-350 px-[0.75rem] h-[3.75rem] flex items-center",
3900
- children: /* @__PURE__ */ jsxs29("div", { className: "flex gap-[1rem] flex-1 z-20 text-brand-black-100 font-medium", children: [
3901
- /* @__PURE__ */ jsx39(TokenTransferPair, { fromToken: from, toToken: to, size: "2rem" }),
3902
- /* @__PURE__ */ jsxs29("div", { className: "flex flex-grow flex-col text-start", children: [
3903
- /* @__PURE__ */ jsx39("span", { className: "text-brand-white-500 text-[0.875rem] h-[1.25rem]", children: caption }),
3904
- /* @__PURE__ */ jsx39(StatusBadge, { variant: "success" })
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" })
3905
3634
  ] }),
3906
- /* @__PURE__ */ jsxs29("div", { className: "shrink-0 flex flex-col text-end", children: [
3907
- /* @__PURE__ */ jsx39("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: amount }),
3908
- /* @__PURE__ */ jsx39("span", { className: "text-xs h-[1rem]", children: completedAt })
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 })
3909
3638
  ] })
3910
3639
  ] })
3911
3640
  })
@@ -3915,14 +3644,14 @@ function StatusBadge({
3915
3644
  variant,
3916
3645
  children
3917
3646
  }) {
3918
- return /* @__PURE__ */ jsxs29("span", { className: "text-xs h-[1rem] flex items-center gap-[0.125rem]", children: [
3919
- variant === "success" ? /* @__PURE__ */ jsxs29(Fragment10, { children: [
3920
- /* @__PURE__ */ jsx39(Check_default, { width: "0.75rem", height: "0.75rem" }),
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" }),
3921
3650
  " ",
3922
- /* @__PURE__ */ jsx39("span", { children: "Success" })
3651
+ /* @__PURE__ */ jsx37("span", { children: "Success" })
3923
3652
  ] }) : null,
3924
- variant === "error" ? /* @__PURE__ */ jsxs29(Fragment10, { children: [
3925
- /* @__PURE__ */ jsx39(
3653
+ variant === "error" ? /* @__PURE__ */ jsxs26(Fragment9, { children: [
3654
+ /* @__PURE__ */ jsx37(
3926
3655
  Alert_default,
3927
3656
  {
3928
3657
  width: "0.75rem",
@@ -3930,18 +3659,18 @@ function StatusBadge({
3930
3659
  className: "text-brand-danger-500"
3931
3660
  }
3932
3661
  ),
3933
- /* @__PURE__ */ jsx39("span", { className: "text-brand-danger-500", children: "Order expired" })
3662
+ /* @__PURE__ */ jsx37("span", { className: "text-brand-danger-500", children: "Order expired" })
3934
3663
  ] }) : null,
3935
3664
  variant === "none" ? children : null
3936
3665
  ] });
3937
3666
  }
3938
3667
  function TxList({ children }) {
3939
- return /* @__PURE__ */ jsx39("ul", { className: "flex flex-col gap-[0.5rem]", children });
3668
+ return /* @__PURE__ */ jsx37("ul", { className: "flex flex-col gap-[0.5rem]", children });
3940
3669
  }
3941
3670
 
3942
3671
  // src/components/molecules/wallet-header.tsx
3943
3672
  import * as React14 from "react";
3944
- import { motion as motion6 } from "motion/react";
3673
+ import { motion as motion5 } from "motion/react";
3945
3674
  import { cva as cva6 } from "class-variance-authority";
3946
3675
  import { Slot as Slot10 } from "@radix-ui/react-slot";
3947
3676
 
@@ -3950,14 +3679,14 @@ import * as Tab_ from "@radix-ui/react-tabs";
3950
3679
 
3951
3680
  // src/@/ui/tabs.tsx
3952
3681
  import * as TabsPrimitive from "@radix-ui/react-tabs";
3953
- import { jsx as jsx40 } from "react/jsx-runtime";
3682
+ import { jsx as jsx38 } from "react/jsx-runtime";
3954
3683
  function Tabs(_a) {
3955
3684
  var _b = _a, {
3956
3685
  className
3957
3686
  } = _b, props = __objRest(_b, [
3958
3687
  "className"
3959
3688
  ]);
3960
- return /* @__PURE__ */ jsx40(
3689
+ return /* @__PURE__ */ jsx38(
3961
3690
  TabsPrimitive.Root,
3962
3691
  __spreadValues({
3963
3692
  "data-slot": "tabs",
@@ -3971,7 +3700,7 @@ function TabsContent(_a) {
3971
3700
  } = _b, props = __objRest(_b, [
3972
3701
  "className"
3973
3702
  ]);
3974
- return /* @__PURE__ */ jsx40(
3703
+ return /* @__PURE__ */ jsx38(
3975
3704
  TabsPrimitive.Content,
3976
3705
  __spreadValues({
3977
3706
  "data-slot": "tabs-content",
@@ -3981,12 +3710,12 @@ function TabsContent(_a) {
3981
3710
  }
3982
3711
 
3983
3712
  // src/components/organisms/assets-collection.tsx
3984
- import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
3713
+ import { jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
3985
3714
  function TabsList2(props) {
3986
- return /* @__PURE__ */ jsx41("nav", { className: "flex flex-col", children: /* @__PURE__ */ jsx41(Tab_.TabsList, { asChild: true, children: /* @__PURE__ */ jsx41("ul", { className: "flex p-0 bg-transparent gap-[0.5rem]", children: props.children }) }) });
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 }) }) });
3987
3716
  }
3988
3717
  function TabItem(props) {
3989
- return /* @__PURE__ */ jsx41(
3718
+ return /* @__PURE__ */ jsx39(
3990
3719
  Tab_.TabsTrigger,
3991
3720
  {
3992
3721
  value: props.value,
@@ -3999,7 +3728,7 @@ function AssetValueTrend(props) {
3999
3728
  const { percentage = 0, direction: dir, dollarValue = 0 } = props;
4000
3729
  const isZero = dollarValue === 0;
4001
3730
  const isUp = isZero ? "up" : dir === "up";
4002
- return /* @__PURE__ */ jsxs30(
3731
+ return /* @__PURE__ */ jsxs27(
4003
3732
  "div",
4004
3733
  {
4005
3734
  className: "inline-flex select-none gap-[0.125rem] text-brand-black-100 h-[1rem] text-[0.7rem] font-medium items-center",
@@ -4008,7 +3737,7 @@ function AssetValueTrend(props) {
4008
3737
  "--trend-color": isZero ? "inherit" : !isUp ? "var(--color-brand-danger-500, indigo)" : "var(--color-brand-success-400, cyan)"
4009
3738
  },
4010
3739
  children: [
4011
- /* @__PURE__ */ jsx41("span", { className: "text-[var(--trend-color)]", children: /* @__PURE__ */ jsx41(
3740
+ /* @__PURE__ */ jsx39("span", { className: "text-[var(--trend-color)]", children: /* @__PURE__ */ jsx39(
4012
3741
  ArrowTriangleBottom_default,
4013
3742
  {
4014
3743
  width: "0.75rem",
@@ -4019,13 +3748,13 @@ function AssetValueTrend(props) {
4019
3748
  )
4020
3749
  }
4021
3750
  ) }),
4022
- /* @__PURE__ */ jsxs30("span", { className: "flex items-center", children: [
4023
- /* @__PURE__ */ jsxs30("span", { className: "text-[var(--trend-color)]", children: [
3751
+ /* @__PURE__ */ jsxs27("span", { className: "flex items-center", children: [
3752
+ /* @__PURE__ */ jsxs27("span", { className: "text-[var(--trend-color)]", children: [
4024
3753
  "$",
4025
3754
  dollarValue
4026
3755
  ] }),
4027
3756
  "\xA0",
4028
- /* @__PURE__ */ jsxs30("span", { className: "text-[var(--trend-base)]", children: [
3757
+ /* @__PURE__ */ jsxs27("span", { className: "text-[var(--trend-base)]", children: [
4029
3758
  "(",
4030
3759
  percentage,
4031
3760
  "%)"
@@ -4043,8 +3772,8 @@ function Balance(props) {
4043
3772
  const [int_, decimal] = String(props.amount).split(".");
4044
3773
  const int = Number.isNaN(+int_) ? 0 : int_;
4045
3774
  const is_zero = props.amount === 0;
4046
- return /* @__PURE__ */ jsx41("div", { className: "select-none", children: /* @__PURE__ */ jsxs30("span", { className: "text-[2.375rem] font-medium leading-[2.875rem] whitespace-nowrap", children: [
4047
- /* @__PURE__ */ jsxs30(
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(
4048
3777
  "span",
4049
3778
  {
4050
3779
  className: cn(
@@ -4056,11 +3785,11 @@ function Balance(props) {
4056
3785
  ]
4057
3786
  }
4058
3787
  ),
4059
- /* @__PURE__ */ jsxs30("span", { className: "text-brand-black-100", children: [
3788
+ /* @__PURE__ */ jsxs27("span", { className: "text-brand-black-100", children: [
4060
3789
  ".",
4061
3790
  decimal != null ? decimal : "00"
4062
3791
  ] }),
4063
- /* @__PURE__ */ jsxs30("span", { className: "text-brand-white-500", children: [
3792
+ /* @__PURE__ */ jsxs27("span", { className: "text-brand-white-500", children: [
4064
3793
  "\xA0",
4065
3794
  suffix
4066
3795
  ] })
@@ -4068,7 +3797,7 @@ function Balance(props) {
4068
3797
  }
4069
3798
 
4070
3799
  // src/components/molecules/wallet-header.tsx
4071
- import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
3800
+ import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
4072
3801
  var WalletHeaderContext = React14.createContext(null);
4073
3802
  function useWalletHeader() {
4074
3803
  const context = React14.useContext(WalletHeaderContext);
@@ -4114,7 +3843,7 @@ var WalletHeader = React14.forwardRef(
4114
3843
  React14.useEffect(() => {
4115
3844
  globalWalletHeaderState = show;
4116
3845
  }, [show]);
4117
- return /* @__PURE__ */ jsx42(WalletHeaderContext.Provider, { value: { show, setShow }, children: /* @__PURE__ */ jsx42(
3846
+ return /* @__PURE__ */ jsx40(WalletHeaderContext.Provider, { value: { show, setShow }, children: /* @__PURE__ */ jsx40(
4118
3847
  Comp,
4119
3848
  __spreadProps(__spreadValues({
4120
3849
  ref,
@@ -4130,7 +3859,7 @@ WalletHeader.displayName = "WalletHeader";
4130
3859
  var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
4131
3860
  var _b = _a, { className, accounts, children } = _b, props = __objRest(_b, ["className", "accounts", "children"]);
4132
3861
  const { show: open, setShow } = useWalletHeader();
4133
- return /* @__PURE__ */ jsx42(
3862
+ return /* @__PURE__ */ jsx40(
4134
3863
  "button",
4135
3864
  __spreadProps(__spreadValues({
4136
3865
  ref,
@@ -4144,9 +3873,9 @@ var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
4144
3873
  ),
4145
3874
  onClick: () => setShow((e) => !e)
4146
3875
  }, props), {
4147
- children: /* @__PURE__ */ jsxs31("div", { className: "flex w-full gap-2 justify-between items-center", children: [
4148
- children || /* @__PURE__ */ jsx42(AccountStack2, { accounts }),
4149
- /* @__PURE__ */ jsx42(
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(
4150
3879
  IconButton,
4151
3880
  {
4152
3881
  variant: "level_1",
@@ -4155,7 +3884,7 @@ var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
4155
3884
  rounded: "full",
4156
3885
  size: "sm",
4157
3886
  asChild: true,
4158
- children: /* @__PURE__ */ jsx42("span", { children: /* @__PURE__ */ jsx42(ChevronBottomDown_default, {}) })
3887
+ children: /* @__PURE__ */ jsx40("span", { children: /* @__PURE__ */ jsx40(ChevronBottomDown_default, {}) })
4159
3888
  }
4160
3889
  )
4161
3890
  ] })
@@ -4168,7 +3897,7 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
4168
3897
  const { show: open } = useWalletHeader();
4169
3898
  const containerRef = React14.useRef(null);
4170
3899
  const parentRef = React14.useRef(null);
4171
- const slideDown2 = {
3900
+ const slideDown = {
4172
3901
  show: { opacity: [0, 0.8, 1] },
4173
3902
  hide: { opacity: [1, 0.25, 0] }
4174
3903
  };
@@ -4227,8 +3956,8 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
4227
3956
  "onTransitionRun",
4228
3957
  "onTransitionCancel"
4229
3958
  ]);
4230
- return /* @__PURE__ */ jsx42(
4231
- motion6.div,
3959
+ return /* @__PURE__ */ jsx40(
3960
+ motion5.div,
4232
3961
  {
4233
3962
  ref: parentRef,
4234
3963
  initial: { height: 0 },
@@ -4236,12 +3965,12 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
4236
3965
  className: cn("z-10 relative", {
4237
3966
  "pointer-events-none": !open
4238
3967
  }),
4239
- children: /* @__PURE__ */ jsx42(
4240
- motion6.div,
3968
+ children: /* @__PURE__ */ jsx40(
3969
+ motion5.div,
4241
3970
  __spreadProps(__spreadValues({
4242
3971
  ref: containerRef,
4243
3972
  initial: { opacity: 0 },
4244
- variants: slideDown2,
3973
+ variants: slideDown,
4245
3974
  transition: { duration: 0.4 },
4246
3975
  animate: open ? "show" : "hide",
4247
3976
  className: cn(
@@ -4256,18 +3985,18 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
4256
3985
  );
4257
3986
  });
4258
3987
  WalletHeaderContent.displayName = "WalletHeaderContent";
4259
- var AccountStack2 = React14.forwardRef(
3988
+ var AccountStack = React14.forwardRef(
4260
3989
  ({ accounts = [] }, ref) => {
4261
3990
  var _a, _b;
4262
- return /* @__PURE__ */ jsx42("div", { ref, className: "flex gap-[0.625rem] items-center", children: accounts.length > 0 ? /* @__PURE__ */ jsxs31(React14.Fragment, { children: [
4263
- /* @__PURE__ */ jsx42("div", { className: "inline-flex -space-x-[0.3125rem]", children: accounts.map((account, index) => /* @__PURE__ */ jsx42(
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(
4264
3993
  "div",
4265
3994
  {
4266
3995
  style: {
4267
3996
  zIndex: accounts.length - index,
4268
3997
  position: "relative"
4269
3998
  },
4270
- children: /* @__PURE__ */ jsx42(
3999
+ children: /* @__PURE__ */ jsx40(
4271
4000
  BadgeIcon,
4272
4001
  {
4273
4002
  outline: true,
@@ -4280,15 +4009,15 @@ var AccountStack2 = React14.forwardRef(
4280
4009
  },
4281
4010
  account.address
4282
4011
  )) }),
4283
- /* @__PURE__ */ jsxs31("span", { className: "flex flex-col whitespace-nowrap", children: [
4284
- /* @__PURE__ */ jsx42("span", { className: "text-base font-medium h-[1.25rem] text-brand-white-500", children: accounts.length > 1 ? /* @__PURE__ */ jsxs31(Fragment12, { children: [
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: [
4285
4014
  accounts.length,
4286
4015
  " wallets"
4287
- ] }) : /* @__PURE__ */ jsx42(Fragment12, { children: shortenAccountAddress((_b = (_a = accounts[0]) == null ? void 0 : _a.address) != null ? _b : "") || "--" }) }),
4288
- /* @__PURE__ */ jsx42("span", { className: "text-xs text-start h-[1rem] font-medium inline-flex items-center gap-[0.125rem] text-brand-black-100", children: "Connected" })
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" })
4289
4018
  ] })
4290
- ] }) : /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
4291
- /* @__PURE__ */ jsx42(
4019
+ ] }) : /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
4020
+ /* @__PURE__ */ jsx40(
4292
4021
  IconButton,
4293
4022
  {
4294
4023
  disabled: true,
@@ -4296,22 +4025,22 @@ var AccountStack2 = React14.forwardRef(
4296
4025
  variant: "level_2",
4297
4026
  rounded: "full",
4298
4027
  size: "sm",
4299
- children: /* @__PURE__ */ jsx42(Wallet_default, { className: "size-5" })
4028
+ children: /* @__PURE__ */ jsx40(Wallet_default, { className: "size-5" })
4300
4029
  }
4301
4030
  ),
4302
- /* @__PURE__ */ jsx42("p", { className: "text-base font-medium text-brand-white-100", children: "Connect Your Wallet" })
4031
+ /* @__PURE__ */ jsx40("p", { className: "text-base font-medium text-brand-white-100", children: "Connect Your Wallet" })
4303
4032
  ] }) });
4304
4033
  }
4305
4034
  );
4306
- AccountStack2.displayName = "AccountStack";
4035
+ AccountStack.displayName = "AccountStack";
4307
4036
  var WalletHeaderTabs = React14.forwardRef((_a, ref) => {
4308
4037
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
4309
- return /* @__PURE__ */ jsx42(Tabs, __spreadProps(__spreadValues({ ref, className: cn("gap-0 pt-3", className) }, props), { children }));
4038
+ return /* @__PURE__ */ jsx40(Tabs, __spreadProps(__spreadValues({ ref, className: cn("gap-0 pt-3", className) }, props), { children }));
4310
4039
  });
4311
4040
  WalletHeaderTabs.displayName = "WalletHeaderTabs";
4312
4041
  var WalletHeaderTabsList = React14.forwardRef((_a, ref) => {
4313
4042
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
4314
- return /* @__PURE__ */ jsx42(
4043
+ return /* @__PURE__ */ jsx40(
4315
4044
  TabsList2,
4316
4045
  __spreadProps(__spreadValues({
4317
4046
  ref,
@@ -4324,7 +4053,7 @@ var WalletHeaderTabsList = React14.forwardRef((_a, ref) => {
4324
4053
  WalletHeaderTabsList.displayName = "WalletHeaderTabsList";
4325
4054
  var WalletHeaderTabItem = React14.forwardRef((_a, ref) => {
4326
4055
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
4327
- return /* @__PURE__ */ jsx42(
4056
+ return /* @__PURE__ */ jsx40(
4328
4057
  TabItem,
4329
4058
  __spreadProps(__spreadValues({
4330
4059
  ref,
@@ -4340,7 +4069,7 @@ var WalletHeaderTabItem = React14.forwardRef((_a, ref) => {
4340
4069
  WalletHeaderTabItem.displayName = "WalletHeaderTabItem";
4341
4070
  var WalletHeaderTabsContent = React14.forwardRef((_a, ref) => {
4342
4071
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
4343
- return /* @__PURE__ */ jsx42(
4072
+ return /* @__PURE__ */ jsx40(
4344
4073
  TabsContent,
4345
4074
  __spreadProps(__spreadValues({
4346
4075
  ref,
@@ -4355,357 +4084,817 @@ var WalletHeaderContentBlur = React14.forwardRef((_a, ref) => {
4355
4084
  var _b = _a, { className, children, asChild = false } = _b, props = __objRest(_b, ["className", "children", "asChild"]);
4356
4085
  const { show: open } = useWalletHeader();
4357
4086
  const Comp = asChild ? Slot10 : "div";
4358
- return /* @__PURE__ */ jsx42(
4087
+ return /* @__PURE__ */ jsx40(
4359
4088
  Comp,
4360
4089
  __spreadProps(__spreadValues({
4361
4090
  ref,
4362
4091
  className: cn(
4363
- "transition-all pt-[1rem]",
4364
- {
4365
- "opacity-15 pointer-events-none filter blur-[2px]": open
4366
- },
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",
4367
4462
  className
4368
4463
  )
4369
- }, props), {
4370
- children
4371
- })
4464
+ }, props)
4372
4465
  );
4373
- });
4374
- WalletHeaderContentBlur.displayName = "WalletHeaderContentBlur";
4375
-
4376
- // src/components/navigation/header.tsx
4377
- import { jsx as jsx43 } from "react/jsx-runtime";
4378
- function HeaderGradient() {
4379
- return /* @__PURE__ */ jsx43("div", { className: "absolute inset-0 h-[3px] bg-gradient-brand-animated" });
4380
4466
  }
4381
- function HeaderContent({
4382
- children,
4383
- className
4384
- }) {
4385
- return /* @__PURE__ */ jsx43(
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(
4386
4522
  "div",
4387
- {
4388
- className: cn(
4389
- "header-container w-full h-full px-4 md:px-6 flex items-center justify-between mx-auto",
4390
- className
4391
- ),
4392
- children
4393
- }
4523
+ __spreadValues({
4524
+ "data-slot": "sheet-header",
4525
+ className: cn("flex flex-col gap-1.5 p-4", className)
4526
+ }, props)
4394
4527
  );
4395
4528
  }
4396
- function Header({
4397
- children,
4398
- className
4399
- }) {
4400
- return /* @__PURE__ */ jsx43(
4401
- "header",
4402
- {
4403
- className: cn(
4404
- "fixed top-0 left-0 z-50 h-20 backdrop-blur-sm w-full",
4405
- className
4406
- ),
4407
- children
4408
- }
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)
4409
4555
  );
4410
4556
  }
4411
4557
 
4412
- // src/components/navigation/tabs.tsx
4413
- import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
4414
- function TabAltHeader({
4415
- label,
4416
- isNew,
4417
- isActive,
4418
- onClick,
4419
- className = ""
4420
- }) {
4421
- return /* @__PURE__ */ jsx44(
4422
- "button",
4423
- {
4424
- type: "button",
4425
- onClick,
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",
4426
4587
  className: cn(
4427
- "relative cursor-pointer w-max duration-200 transition-colors",
4428
- 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",
4429
4589
  className
4430
- ),
4431
- children: /* @__PURE__ */ jsxs32("span", { className: "relative z-10 flex items-center gap-2", children: [
4432
- /* @__PURE__ */ jsx44("span", { className: "font-medium", children: label }),
4433
- isNew && /* @__PURE__ */ jsx44("span", { className: "text-brand-warning-500 caption-text absolute top-0 left-[100%] w-max", children: "New" })
4434
- ] })
4435
- }
4590
+ )
4591
+ }, props)
4436
4592
  );
4437
4593
  }
4438
- function TabAltHeaders({
4439
- children,
4440
- className = ""
4441
- }) {
4442
- return /* @__PURE__ */ jsx44("div", { className: cn("flex space-x-3 mb-6", className), children });
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
+ ] });
4443
4624
  }
4444
- function TabAltContent({
4445
- children,
4446
- className = ""
4447
- }) {
4448
- return /* @__PURE__ */ jsx44("div", { className, children });
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
+ );
4449
4637
  }
4450
- function TabAltPanel({
4451
- id,
4452
- activeTab,
4453
- children,
4454
- className = ""
4455
- }) {
4456
- if (activeTab !== id) return null;
4457
- return /* @__PURE__ */ jsx44("div", { className, children }, id);
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
+ );
4458
4647
  }
4459
- function TabAlt({
4460
- children,
4461
- className = ""
4462
- }) {
4463
- return /* @__PURE__ */ jsx44("div", { className: cn("w-full", className), children });
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
+ );
4464
4661
  }
4465
-
4466
- // src/@/ui/tooltip.tsx
4467
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4468
- import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
4469
- function TooltipProvider(_a) {
4662
+ function HBDrawerDescription(_a) {
4470
4663
  var _b = _a, {
4471
- delayDuration = 0
4664
+ className
4472
4665
  } = _b, props = __objRest(_b, [
4473
- "delayDuration"
4666
+ "className"
4474
4667
  ]);
4475
- return /* @__PURE__ */ jsx45(
4476
- TooltipPrimitive.Provider,
4668
+ return /* @__PURE__ */ jsx47(
4669
+ DrawerPrimitive2.Description,
4477
4670
  __spreadValues({
4478
- "data-slot": "tooltip-provider",
4479
- delayDuration
4671
+ "data-slot": "hb-drawer-description",
4672
+ className: cn("text-muted-foreground text-sm", className)
4480
4673
  }, props)
4481
4674
  );
4482
4675
  }
4483
- function Tooltip(_a) {
4484
- var props = __objRest(_a, []);
4485
- return /* @__PURE__ */ jsx45(TooltipProvider, { children: /* @__PURE__ */ jsx45(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
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
+ ] });
4486
4732
  }
4487
- function TooltipTrigger(_a) {
4488
- var props = __objRest(_a, []);
4489
- return /* @__PURE__ */ jsx45(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
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
+ ] });
4490
4742
  }
4491
- function TooltipContent(_a) {
4743
+ function CWDrawerContent(_a) {
4492
4744
  var _b = _a, {
4493
- className,
4494
- sideOffset = 0,
4495
4745
  children
4496
4746
  } = _b, props = __objRest(_b, [
4497
- "className",
4498
- "sideOffset",
4499
4747
  "children"
4500
4748
  ]);
4501
- return /* @__PURE__ */ jsx45(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs33(
4502
- TooltipPrimitive.Content,
4503
- __spreadProps(__spreadValues({
4504
- "data-slot": "tooltip-content",
4505
- sideOffset,
4506
- className: cn(
4507
- "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",
4508
- className
4509
- )
4510
- }, props), {
4511
- children: [
4512
- children,
4513
- /* @__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]" })
4514
- ]
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 })
4515
4759
  })
4516
- ) });
4760
+ );
4517
4761
  }
4518
4762
 
4519
- // src/components/organisms/settings.tsx
4520
- import { useState as useState5 } from "react";
4521
- import { jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
4522
- var PRESET_SLIPPAGES = ["Auto", "0.25%", "0.5%", "0.75%", "1%"];
4523
- var DEFAULT_TOOLTIP_TEXTS = {
4524
- bridge: {
4525
- slippage: "Bridge slippage tolerance helps protect against price changes during cross-chain transaction processing",
4526
- deadline: "Bridge deadline is the maximum time allowed before the transaction times out and is cancelled"
4527
- },
4528
- swap: {
4529
- slippage: "Swap slippage tolerance helps protect against price changes during token exchange",
4530
- deadline: "Swap deadline is the maximum time allowed before the transaction times out and is cancelled"
4531
- }
4532
- };
4533
- 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 = ({
4534
4767
  isOpen,
4535
4768
  onClose,
4536
- slippage = "Auto",
4537
- deadline,
4538
- onSlippageChange,
4539
- onDeadlineChange,
4540
- type,
4541
- slippageTooltipText,
4542
- deadlineTooltipText
4769
+ children,
4770
+ className
4543
4771
  }) => {
4544
- const [customSlippage, setCustomSlippage] = useState5("");
4545
- const [customDeadline, setCustomDeadline] = useState5(deadline);
4546
- const handleKeyDown = createKeyDownHandler();
4547
- const handleSlippageSelect = (selectedSlippage) => {
4548
- onSlippageChange == null ? void 0 : onSlippageChange(selectedSlippage);
4549
- if (selectedSlippage !== "Custom") {
4550
- setCustomSlippage("");
4551
- }
4552
- };
4553
- const handleCustomSlippageChange = (e) => {
4554
- const value = e.target.value;
4555
- setCustomSlippage(value);
4556
- if (value) {
4557
- onSlippageChange == null ? void 0 : onSlippageChange(`${value}%`);
4558
- }
4559
- };
4560
- const handleCustomSlippageBlur = (e) => {
4561
- const value = Number.parseFloat(e.target.value);
4562
- if (value > 100) {
4563
- e.target.value = "100";
4564
- setCustomSlippage("100");
4565
- onSlippageChange == null ? void 0 : onSlippageChange("100%");
4566
- } else if (value < 0) {
4567
- e.target.value = "0";
4568
- setCustomSlippage("0");
4569
- onSlippageChange == null ? void 0 : onSlippageChange("0%");
4570
- }
4571
- };
4572
- const handleDeadlineChange = (e) => {
4573
- const value = e.target.value;
4574
- setCustomDeadline(value);
4575
- onDeadlineChange == null ? void 0 : onDeadlineChange(value);
4576
- };
4577
- const handleDeadlineBlur = (e) => {
4578
- const value = Number.parseFloat(e.target.value);
4579
- if (value < 0) {
4580
- e.target.value = "0";
4581
- setCustomDeadline("0");
4582
- 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
+ ]
4583
4800
  }
4584
- };
4585
- const isSlippageSelected = (option) => {
4586
- if (option === "Custom") {
4587
- return slippage !== "Auto" && !PRESET_SLIPPAGES.includes(slippage);
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
4588
4841
  }
4589
- return slippage === option;
4590
- };
4591
- const isCustomSlippageActive = isSlippageSelected("Custom");
4592
- const title = type === "bridge" ? "Bridge" : "Swap";
4593
- const effectiveSlippageTooltip = slippageTooltipText || DEFAULT_TOOLTIP_TEXTS[type].slippage;
4594
- const effectiveDeadlineTooltip = deadlineTooltipText || DEFAULT_TOOLTIP_TEXTS[type].deadline;
4595
- return /* @__PURE__ */ jsxs34(Modal, { className: "p-4 !h-max", isOpen, onClose, children: [
4596
- /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between", children: [
4597
- /* @__PURE__ */ jsxs34("div", { className: "body-1 font-medium text-white max-w-[200px] break-words", children: [
4598
- title,
4599
- " settings"
4600
- ] }),
4601
- /* @__PURE__ */ jsx46(
4602
- XIcon_default,
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",
4603
4864
  {
4604
- className: "size-4 cursor-pointer text-brand-black-100 hover:text-white duration-200 transition-colors",
4605
- onClick: onClose
4606
- }
4607
- )
4608
- ] }),
4609
- /* @__PURE__ */ jsxs34("div", { className: "mt-4", children: [
4610
- /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-1 text-brand-black-100", children: [
4611
- /* @__PURE__ */ jsxs34("p", { className: "text-caption", children: [
4612
- title,
4613
- " Slippage"
4614
- ] }),
4615
- /* @__PURE__ */ jsxs34(Tooltip, { children: [
4616
- /* @__PURE__ */ jsx46(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(CircleInfo_default, { className: "size-[14px] cursor-pointer hover:text-white duration-200 transition-colors" }) }),
4617
- /* @__PURE__ */ jsx46(TooltipContent, { children: /* @__PURE__ */ jsx46("p", { className: "text-caption", children: effectiveSlippageTooltip }) })
4618
- ] })
4619
- ] }),
4620
- /* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-3 gap-2 mt-3", children: [
4621
- PRESET_SLIPPAGES.map((option) => /* @__PURE__ */ jsx46(
4622
- "div",
4623
- {
4624
- className: cn(
4625
- "relative rounded-2xl p-[1.5px]",
4626
- isSlippageSelected(option) ? "animated-gradient-border" : "bg-transparent"
4627
- ),
4628
- children: /* @__PURE__ */ jsx46(
4629
- "button",
4630
- {
4631
- type: "button",
4632
- onClick: () => handleSlippageSelect(option),
4633
- 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",
4634
- children: /* @__PURE__ */ jsx46("p", { className: "body-1 font-medium", children: option })
4635
- }
4636
- )
4637
- },
4638
- option
4639
- )),
4640
- /* @__PURE__ */ jsx46(
4641
- "div",
4642
- {
4643
- className: cn(
4644
- "relative rounded-2xl p-[1.5px]",
4645
- isCustomSlippageActive ? "animated-gradient-border" : "bg-transparent"
4646
- ),
4647
- children: /* @__PURE__ */ jsxs34("div", { className: "relative bg-brand-card-100 rounded-[16px]", children: [
4648
- /* @__PURE__ */ jsx46(
4649
- 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,
4650
4872
  {
4651
- min: 0,
4652
- max: 100,
4653
- value: customSlippage,
4654
- onChange: handleCustomSlippageChange,
4655
- onBlur: handleCustomSlippageBlur,
4656
- onFocus: () => handleSlippageSelect("Custom"),
4657
- 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",
4658
- placeholder: "Custom",
4659
- type: "number",
4660
- onKeyDown: handleKeyDown
4873
+ src: token.image,
4874
+ alt: token.symbol,
4875
+ badgeSrc: network.image,
4876
+ badgeAlt: network.name
4661
4877
  }
4662
4878
  ),
4663
- /* @__PURE__ */ jsx46("span", { className: "body-1 absolute right-4 top-1/2 -translate-y-1/2 text-brand-black-100", children: "%" })
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 })
4664
4887
  ] })
4665
- }
4666
- )
4667
- ] })
4668
- ] }),
4669
- /* @__PURE__ */ jsxs34("div", { className: "mt-6", children: [
4670
- /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-1 text-brand-black-100", children: [
4671
- /* @__PURE__ */ jsxs34("p", { className: "text-caption", children: [
4672
- title,
4673
- " deadline"
4674
- ] }),
4675
- /* @__PURE__ */ jsxs34(Tooltip, { children: [
4676
- /* @__PURE__ */ jsx46(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(CircleInfo_default, { className: "size-[14px] cursor-pointer hover:text-white duration-200 transition-colors" }) }),
4677
- /* @__PURE__ */ jsx46(TooltipContent, { children: /* @__PURE__ */ jsx46("p", { className: "text-caption", children: effectiveDeadlineTooltip }) })
4678
- ] })
4679
- ] }),
4680
- /* @__PURE__ */ jsxs34("div", { className: "relative mt-3", children: [
4681
- /* @__PURE__ */ jsx46(
4682
- Input,
4683
- {
4684
- value: customDeadline,
4685
- onChange: handleDeadlineChange,
4686
- onBlur: handleDeadlineBlur,
4687
- onKeyDown: handleKeyDown,
4688
- 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",
4689
- placeholder: "Enter deadline",
4690
- type: "number",
4691
- min: 0
4692
- }
4693
- ),
4694
- /* @__PURE__ */ jsx46("span", { className: "body-1 absolute right-4 top-1/2 -translate-y-1/2 text-brand-black-100", children: "minutes" })
4695
- ] })
4696
- ] })
4697
- ] });
4698
- };
4699
-
4700
- // src/components/organisms/bridge-settings.tsx
4701
- import { jsx as jsx47 } from "react/jsx-runtime";
4702
- var BridgeSettings = (props) => {
4703
- return /* @__PURE__ */ jsx47(Settings, __spreadProps(__spreadValues({}, props), { type: "bridge" }));
4888
+ ]
4889
+ }
4890
+ )
4891
+ }
4892
+ );
4704
4893
  };
4705
4894
  export {
4706
4895
  AccessoryButton,
4707
4896
  AccountItem,
4708
- AccountStack2 as AccountStack,
4897
+ AccountStack,
4709
4898
  AddressInput,
4710
4899
  AddressInputFocusBehaviour,
4711
4900
  AssetList,
@@ -4716,11 +4905,9 @@ export {
4716
4905
  BridgeForm,
4717
4906
  BridgeInput,
4718
4907
  BridgeSettings,
4719
- BridgeSummary,
4720
4908
  BridgeTokenButton,
4721
4909
  Button2 as Button,
4722
4910
  CWDrawerContent,
4723
- ConnectedHeader,
4724
4911
  Dialog,
4725
4912
  DialogClose,
4726
4913
  DialogContent,
@@ -4740,6 +4927,16 @@ export {
4740
4927
  EmptyStateDescription,
4741
4928
  EmptyStateTitle,
4742
4929
  GradientButton,
4930
+ HBDrawer,
4931
+ HBDrawerClose,
4932
+ HBDrawerContent,
4933
+ HBDrawerDescription,
4934
+ HBDrawerFooter,
4935
+ HBDrawerHeader,
4936
+ HBDrawerOverlay,
4937
+ HBDrawerPortal,
4938
+ HBDrawerTitle,
4939
+ HBDrawerTrigger,
4743
4940
  Header,
4744
4941
  HeaderContent,
4745
4942
  HeaderGradient,
@@ -4757,6 +4954,7 @@ export {
4757
4954
  NetworkSwitcher,
4758
4955
  NetworkSwitcherButton,
4759
4956
  ReviewItem,
4957
+ ReviewItemAddress,
4760
4958
  ReviewItemCopyAddressButton,
4761
4959
  ScrollAwareSeparator,
4762
4960
  SearchInput,
@@ -4764,9 +4962,17 @@ export {
4764
4962
  Sheet,
4765
4963
  SheetContent,
4766
4964
  SheetTrigger,
4965
+ Summary,
4767
4966
  SummaryValues,
4768
4967
  SwapForm,
4769
4968
  SwapTokenButton,
4969
+ SwapTokenItem,
4970
+ SwapTokenSelector,
4971
+ SwapTokenSelectorContent,
4972
+ SwapTokenSelectorEmpty,
4973
+ SwapTokenSelectorHeader,
4974
+ SwapTokenSelectorSearch,
4975
+ SwapTokenSelectorSection,
4770
4976
  TabAlt,
4771
4977
  TabAltContent,
4772
4978
  TabAltHeader,