@rash2x/bridge-widget 0.6.38 → 0.6.41

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.
@@ -18,14 +18,13 @@ import { Skeleton } from "@/components/ui/skeleton";
18
18
  import { Input } from "@/components/ui/input";
19
19
  import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from "@/components/ui/dialog";
20
20
  import { Switch } from "@/components/ui/switch";
21
- import { X as X$3, Loader2, AlertCircleIcon, ArrowRight, CheckCircle2, Clock } from "lucide-react";
21
+ import { X as X$3, Loader2, ArrowRight, CheckCircle2, Clock } from "lucide-react";
22
22
  import { AnimatePresence, motion } from "framer-motion";
23
23
  import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@/components/ui/accordion";
24
24
  import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
25
25
  import { Alert, AlertDescription } from "@/components/ui/alert";
26
26
  import { toast, Toaster } from "sonner";
27
27
  import { Badge } from "@/components/ui/badge";
28
- import { DialogDescription as DialogDescription$1 } from "@radix-ui/react-dialog";
29
28
  import { isAddress, formatUnits, parseUnits } from "viem";
30
29
  import { TronLinkAdapterName } from "@tronweb3/tronwallet-adapters";
31
30
  import { TronWeb } from "tronweb";
@@ -2643,7 +2642,7 @@ const ChainSelectModal = ({
2643
2642
  chain2.chainKey
2644
2643
  );
2645
2644
  };
2646
- return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "md:max-h-[90dvh] md:h-[90dvh] fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 overflow-hidden flex flex-col p-10 pt-7", children: [
2645
+ return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "md:max-h-[90dvh] md:h-[90dvh] fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 md:left-[50%] md:top-[50%] md:translate-x-[-50%] md:translate-y-[-50%] overflow-hidden flex flex-col p-10 pt-7 rounded-none md:rounded-lg", children: [
2647
2646
  /* @__PURE__ */ jsx(DialogHeader, { className: "text-left pb-0", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-xl leading-8", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0", children: [
2648
2647
  /* @__PURE__ */ jsx("div", { children: t2("bridge.select") }),
2649
2648
  /* @__PURE__ */ jsx("div", { children: t2(isSource ? "bridge.sourceNetwork" : "bridge.destinationNetwork") })
@@ -4319,7 +4318,7 @@ const WalletSelectModal = () => {
4319
4318
  }
4320
4319
  return a2.order - b2.order;
4321
4320
  });
4322
- return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "flex flex-col fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 p-10 pt-7", children: [
4321
+ return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "flex flex-col fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 md:left-[50%] md:top-[50%] md:translate-x-[-50%] md:translate-y-[-50%] md:bottom-auto p-10 pt-7 rounded-none md:rounded-lg", children: [
4323
4322
  /* @__PURE__ */ jsxs(DialogHeader, { className: "text-left", children: [
4324
4323
  /* @__PURE__ */ jsx(DialogTitle, { className: "text-2xl leading-8", children: t2("wallets.chooseWallet") }),
4325
4324
  /* @__PURE__ */ jsx(DialogDescription, { children: t2("wallets.oneWalletPerEnv") })
@@ -4440,25 +4439,6 @@ const ProgressStep = ({
4440
4439
  ] })
4441
4440
  ] }) });
4442
4441
  };
4443
- const FailedStep = ({
4444
- icon = /* @__PURE__ */ jsx(AlertCircleIcon, { className: "w-16 h-16" })
4445
- }) => {
4446
- const { current, reset } = useTransactionStore();
4447
- const { t: t2 } = useBridgeTranslation();
4448
- return /* @__PURE__ */ jsxs(DialogContent, { showCloseButton: true, className: "overflow-hidden md:max-w-[420px] p-10", children: [
4449
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center", children: [
4450
- icon,
4451
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 pb-2 text-center", children: [
4452
- /* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.failed") }),
4453
- current?.errorCode && /* @__PURE__ */ jsx(DialogDescription$1, { children: t2(
4454
- `errors.${current.errorCode}`,
4455
- current.errorParams || {}
4456
- ) })
4457
- ] })
4458
- ] }),
4459
- /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(Button, { variant: "outline", className: "w-full min-w-40", onClick: reset, children: t2("common.close") }) })
4460
- ] });
4461
- };
4462
4442
  const EXPLORER_CONFIGS = {
4463
4443
  // TON
4464
4444
  ton: {
@@ -4592,7 +4572,7 @@ const SuccessStep = ({
4592
4572
  DialogContent,
4593
4573
  {
4594
4574
  showCloseButton: true,
4595
- className: "overflow-hidden md:max-w-[420px] p-10",
4575
+ className: "overflow-hidden md:max-w-[420px] p-10 noise",
4596
4576
  children: [
4597
4577
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 flex-1 justify-start items-center text-center bg-background", children: [
4598
4578
  icon,
@@ -4709,7 +4689,7 @@ const StatusStepsDialog = ({
4709
4689
  step = /* @__PURE__ */ jsx(SuccessStep, { icon: icons?.success });
4710
4690
  }
4711
4691
  if (status === "failed") {
4712
- step = /* @__PURE__ */ jsx(FailedStep, { icon: icons?.failed });
4692
+ step = /* @__PURE__ */ jsx(SuccessStep, { icon: icons?.failed });
4713
4693
  }
4714
4694
  return /* @__PURE__ */ jsx(Dialog, { open: true, onOpenChange: () => reset(), children: step });
4715
4695
  };
@@ -6673,7 +6653,7 @@ const SettingsModal = ({ isOpen, onClose }) => {
6673
6653
  DialogContent,
6674
6654
  {
6675
6655
  onOpenAutoFocus: (e2) => e2.preventDefault(),
6676
- className: "flex flex-col fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 p-10 pt-7",
6656
+ className: "flex flex-col fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 md:left-[50%] md:top-[50%] md:translate-x-[-50%] md:translate-y-[-50%] p-10 pt-7 rounded-none md:rounded-lg",
6677
6657
  children: [
6678
6658
  /* @__PURE__ */ jsx(DialogHeader, { className: "text-left", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-2xl leading-8", children: t2("settings.title") }) }),
6679
6659
  /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
@@ -7061,7 +7041,7 @@ const TokenSelectModal = ({
7061
7041
  },
7062
7042
  [effectiveTab, virtualItems]
7063
7043
  );
7064
- return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "md:max-h-[90dvh] md:h-[90dvh] overflow-hidden flex flex-col fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 p-10 pt-7", children: [
7044
+ return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "md:max-h-[90dvh] md:h-[90dvh] overflow-hidden flex flex-col fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 md:left-[50%] md:top-[50%] md:translate-x-[-50%] md:translate-y-[-50%] p-10 pt-7 rounded-none md:rounded-lg", children: [
7065
7045
  /* @__PURE__ */ jsx(DialogHeader, { className: "text-left", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-2xl leading-8", children: t2("bridge.selectToken") }) }),
7066
7046
  /* @__PURE__ */ jsx(
7067
7047
  SearchInput,
@@ -25965,7 +25945,7 @@ class WalletConnectModal {
25965
25945
  }
25966
25946
  async initUi() {
25967
25947
  if (typeof window !== "undefined") {
25968
- await import("./index-o59p5965.js");
25948
+ await import("./index-BTonxSuI.js");
25969
25949
  const modal = document.createElement("wcm-modal");
25970
25950
  document.body.insertAdjacentElement("beforeend", modal);
25971
25951
  OptionsCtrl.setIsUiLoaded(true);
@@ -26724,4 +26704,4 @@ export {
26724
26704
  getQuoteFees as y,
26725
26705
  calculateMinReceived as z
26726
26706
  };
26727
- //# sourceMappingURL=index-D8iMibBn.js.map
26707
+ //# sourceMappingURL=index-DL1Vrqi9.js.map