@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.
@@ -26,7 +26,6 @@ const tooltip = require("@/components/ui/tooltip");
26
26
  const alert = require("@/components/ui/alert");
27
27
  const sonner = require("sonner");
28
28
  const badge = require("@/components/ui/badge");
29
- const reactDialog = require("@radix-ui/react-dialog");
30
29
  const viem = require("viem");
31
30
  const tronwalletAdapters = require("@tronweb3/tronwallet-adapters");
32
31
  const tronweb = require("tronweb");
@@ -2644,7 +2643,7 @@ const ChainSelectModal = ({
2644
2643
  chain2.chainKey
2645
2644
  );
2646
2645
  };
2647
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.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: [
2646
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.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: [
2648
2647
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { className: "text-left pb-0", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { className: "text-xl leading-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0", children: [
2649
2648
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: t2("bridge.select") }),
2650
2649
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: t2(isSource ? "bridge.sourceNetwork" : "bridge.destinationNetwork") })
@@ -4320,7 +4319,7 @@ const WalletSelectModal = () => {
4320
4319
  }
4321
4320
  return a2.order - b2.order;
4322
4321
  });
4323
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.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: [
4322
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.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: [
4324
4323
  /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogHeader, { className: "text-left", children: [
4325
4324
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { className: "text-2xl leading-8", children: t2("wallets.chooseWallet") }),
4326
4325
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogDescription, { children: t2("wallets.oneWalletPerEnv") })
@@ -4441,25 +4440,6 @@ const ProgressStep = ({
4441
4440
  ] })
4442
4441
  ] }) });
4443
4442
  };
4444
- const FailedStep = ({
4445
- icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircleIcon, { className: "w-16 h-16" })
4446
- }) => {
4447
- const { current, reset } = useTransactionStore();
4448
- const { t: t2 } = useBridgeTranslation();
4449
- return /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { showCloseButton: true, className: "overflow-hidden md:max-w-[420px] p-10", children: [
4450
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center", children: [
4451
- icon,
4452
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pb-2 text-center", children: [
4453
- /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.failed") }),
4454
- current?.errorCode && /* @__PURE__ */ jsxRuntime.jsx(reactDialog.DialogDescription, { children: t2(
4455
- `errors.${current.errorCode}`,
4456
- current.errorParams || {}
4457
- ) })
4458
- ] })
4459
- ] }),
4460
- /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outline", className: "w-full min-w-40", onClick: reset, children: t2("common.close") }) })
4461
- ] });
4462
- };
4463
4443
  const EXPLORER_CONFIGS = {
4464
4444
  // TON
4465
4445
  ton: {
@@ -4593,7 +4573,7 @@ const SuccessStep = ({
4593
4573
  dialog.DialogContent,
4594
4574
  {
4595
4575
  showCloseButton: true,
4596
- className: "overflow-hidden md:max-w-[420px] p-10",
4576
+ className: "overflow-hidden md:max-w-[420px] p-10 noise",
4597
4577
  children: [
4598
4578
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 flex-1 justify-start items-center text-center bg-background", children: [
4599
4579
  icon,
@@ -4710,7 +4690,7 @@ const StatusStepsDialog = ({
4710
4690
  step = /* @__PURE__ */ jsxRuntime.jsx(SuccessStep, { icon: icons?.success });
4711
4691
  }
4712
4692
  if (status === "failed") {
4713
- step = /* @__PURE__ */ jsxRuntime.jsx(FailedStep, { icon: icons?.failed });
4693
+ step = /* @__PURE__ */ jsxRuntime.jsx(SuccessStep, { icon: icons?.failed });
4714
4694
  }
4715
4695
  return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: true, onOpenChange: () => reset(), children: step });
4716
4696
  };
@@ -6674,7 +6654,7 @@ const SettingsModal = ({ isOpen, onClose }) => {
6674
6654
  dialog.DialogContent,
6675
6655
  {
6676
6656
  onOpenAutoFocus: (e2) => e2.preventDefault(),
6677
- className: "flex flex-col fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 p-10 pt-7",
6657
+ 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",
6678
6658
  children: [
6679
6659
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { className: "text-left", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { className: "text-2xl leading-8", children: t2("settings.title") }) }),
6680
6660
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
@@ -7062,7 +7042,7 @@ const TokenSelectModal = ({
7062
7042
  },
7063
7043
  [effectiveTab, virtualItems]
7064
7044
  );
7065
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.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: [
7045
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.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: [
7066
7046
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { className: "text-left", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { className: "text-2xl leading-8", children: t2("bridge.selectToken") }) }),
7067
7047
  /* @__PURE__ */ jsxRuntime.jsx(
7068
7048
  SearchInput,
@@ -25966,7 +25946,7 @@ class WalletConnectModal {
25966
25946
  }
25967
25947
  async initUi() {
25968
25948
  if (typeof window !== "undefined") {
25969
- await Promise.resolve().then(() => require("./index-B5vNvuoh.cjs"));
25949
+ await Promise.resolve().then(() => require("./index-cwbvJJQ3.cjs"));
25970
25950
  const modal = document.createElement("wcm-modal");
25971
25951
  document.body.insertAdjacentElement("beforeend", modal);
25972
25952
  OptionsCtrl.setIsUiLoaded(true);
@@ -26723,4 +26703,4 @@ exports.useSettingsStore = useSettingsStore;
26723
26703
  exports.useSwapModel = useSwapModel;
26724
26704
  exports.useTokensStore = useTokensStore;
26725
26705
  exports.useTransactionStore = useTransactionStore;
26726
- //# sourceMappingURL=index-WWRuIbp4.cjs.map
26706
+ //# sourceMappingURL=index-YRPetPqF.cjs.map