@blockend/widget 1.0.31 → 1.0.32
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/AllRoutes-CPwuTwqd.js +2209 -0
- package/dist/Box-CIChapvH.js +55 -0
- package/dist/EstGas-CEFILtyf.js +12867 -0
- package/dist/Grow-DJZj9zjv.js +1656 -0
- package/dist/InputComp-DqF1JGIu.js +106 -0
- package/dist/LoadRoute-r3sHTYXM.js +126 -0
- package/dist/QuotesProgress-BXVLxZ8U.js +28 -0
- package/dist/SwapAsset-07WvVwl-.js +64 -0
- package/dist/Tooltip-CNAsCF8n.js +572 -0
- package/dist/TxnButton-D2TTkFYA.js +207 -0
- package/dist/WidgetForm.module-QHJ0-m5f.js +9 -0
- package/dist/{add-B8AfyNIx.js → add-t2GqC9VA.js} +3 -3
- package/dist/{all-wallets-BaLLU39i.js → all-wallets-DFyf0q31.js} +3 -3
- package/dist/{app-store-DNpoABj1.js → app-store-aAahwmBP.js} +3 -3
- package/dist/{apple-DzzHtaL4.js → apple-DeRgpwlc.js} +3 -3
- package/dist/{arrow-bottom-D2c13c51.js → arrow-bottom-DdEOkaAj.js} +3 -3
- package/dist/{arrow-bottom-circle-ls9OCLx1.js → arrow-bottom-circle-BWwREWcv.js} +3 -3
- package/dist/{arrow-left-BI3rQkNI.js → arrow-left-CulyLmoH.js} +3 -3
- package/dist/{arrow-right-rnMzhVod.js → arrow-right-Dwr7TISn.js} +3 -3
- package/dist/{arrow-top-CfA6PVMz.js → arrow-top-pL4rM_y8.js} +3 -3
- package/dist/{bank-CmpAmHgg.js → bank-CPuyK_08.js} +3 -3
- package/dist/basic-CVc9xEvb.js +5783 -0
- package/dist/{browser-mEcjgS1H.js → browser-Cbq2Zbp4.js} +3 -3
- package/dist/{card-DkgIWcMc.js → card-B_hUtPWK.js} +3 -3
- package/dist/ccip-BLVGcR4A.js +228 -0
- package/dist/{checkmark-B_A013n2.js → checkmark-WEqTsFAc.js} +3 -3
- package/dist/{checkmark-bold-DestuG2T.js → checkmark-bold-Du_ZvhqM.js} +3 -3
- package/dist/{chevron-bottom-Di3S86dj.js → chevron-bottom-C-s-lv4L.js} +3 -3
- package/dist/{chevron-left-A9Wj-3tj.js → chevron-left-C7NcRElx.js} +3 -3
- package/dist/{chevron-right-UFxJogOZ.js → chevron-right-CSzmAmdn.js} +3 -3
- package/dist/{chevron-top-BbZs3eaC.js → chevron-top-Dd99Wfel.js} +3 -3
- package/dist/{chrome-store-B4F6hJmy.js → chrome-store-C4p77Of0.js} +3 -3
- package/dist/{clock-BbAQ09uV.js → clock-Cib24qjH.js} +3 -3
- package/dist/clockIcon-C2W5xvyt.js +76 -0
- package/dist/{close-CY3oZP_D.js → close-BXjEkTvS.js} +3 -3
- package/dist/{coinPlaceholder-DpfsobZT.js → coinPlaceholder-BFNC7cQN.js} +3 -3
- package/dist/{compass-CHS7RZFk.js → compass-CXPX5Ycp.js} +3 -3
- package/dist/{copy-CEd4nGhs.js → copy-BEawMbmF.js} +3 -3
- package/dist/core-Bez9Ow7F.js +14967 -0
- package/dist/cursor-Cxq4Q9jk.js +7 -0
- package/dist/{cursor-transparent-Tm6k6Ws4.js → cursor-transparent-ZjJ0P2vr.js} +3 -3
- package/dist/{desktop-CrSyXZkL.js → desktop-BhZVovAp.js} +3 -3
- package/dist/{disconnect-BooT10E1.js → disconnect-AC-bffZO.js} +3 -3
- package/dist/{discord-B982Qaml.js → discord-dT97h-CC.js} +3 -3
- package/dist/down-DP56YSKp.js +606 -0
- package/dist/{etherscan-CFL0IcNl.js → etherscan-rYFRhRTM.js} +3 -3
- package/dist/ethertousd-CC_ezooz.js +6 -0
- package/dist/{exclamation-triangle-BBeGXYgt.js → exclamation-triangle-C-pCuC08.js} +3 -3
- package/dist/{extension-C5WqJw73.js → extension-BnqauLSn.js} +3 -3
- package/dist/{external-link-CcSxVDcd.js → external-link-M9D6e_F3.js} +3 -3
- package/dist/{facebook-DF0v9ED8.js → facebook-DHezcoD-.js} +3 -3
- package/dist/{farcaster-Boq7M4VK.js → farcaster-D0Ky-Imv.js} +3 -3
- package/dist/{filters-DfeymbPx.js → filters-B02NYLWq.js} +3 -3
- package/dist/getChainIds-CJd2TZYT.js +1888 -0
- package/dist/getCosmosAddress-DTZfw04G.js +9565 -0
- package/dist/{github-DQ8FV4bD.js → github-BzQkIMuE.js} +3 -3
- package/dist/{google-Dm8FDDZR.js → google-BpwCJ4Fs.js} +3 -3
- package/dist/hamburger-BzqwkUjE.js +3915 -0
- package/dist/{help-circle-CbgiAebR.js → help-circle-C0nOySHC.js} +3 -3
- package/dist/{id-CzqxUksI.js → id-DFP_kFd4.js} +3 -3
- package/dist/{image-CsCGTIN-.js → image-QiYOAGjM.js} +3 -3
- package/dist/index-CDq3vNnP.js +22 -0
- package/dist/index-CLzkn733.js +28223 -0
- package/dist/index-CjtwASJt.js +252 -0
- package/dist/index-CrC4B7xn.js +331 -0
- package/dist/index-D5hLIe-N.js +9 -0
- package/dist/index-DDk00SOL.js +159 -0
- package/dist/index-DTish3yr.js +1014 -0
- package/dist/index-DW3W7zaF.js +473 -0
- package/dist/index-DXdD3L9f.js +1460 -0
- package/dist/index-DaJ1272l.js +18613 -0
- package/dist/index-DxPp2gBS.js +992 -0
- package/dist/index-Dy_n2MPD.js +3010 -0
- package/dist/index-oc8HPfOF.js +13583 -0
- package/dist/index.es-Bsr7zP98.js +366 -0
- package/dist/index.es-C-j-Ghef.js +11678 -0
- package/dist/index.es.js +4 -4
- package/dist/{info-fKCfLW0k.js → info-BTLQJ-wd.js} +3 -3
- package/dist/{info-circle-Bt350Yzj.js → info-circle-Dla9169_.js} +3 -3
- package/dist/{lightbulb-BL9YBxiA.js → lightbulb-PN8DA_Wh.js} +3 -3
- package/dist/{mail-_g6CHQeQ.js → mail-BGYZut_4.js} +3 -3
- package/dist/{mobile-B-EQ4IcH.js → mobile-BM760ZzX.js} +3 -3
- package/dist/{more-C3rpOdUy.js → more-rHGnl2ck.js} +3 -3
- package/dist/{network-placeholder-D9Ak7Xj_.js → network-placeholder-CyQl-3_2.js} +3 -3
- package/dist/{nftPlaceholder-CIIm2V_o.js → nftPlaceholder-nuUJ8nKY.js} +3 -3
- package/dist/{off-DZjgI0eE.js → off-GYlwYDrT.js} +3 -3
- package/dist/{play-store-DvRnagoF.js → play-store-Ck01Ez1F.js} +3 -3
- package/dist/{plus-C2jN2huZ.js → plus-CQfXWgLw.js} +3 -3
- package/dist/{qr-code-B64HnZgi.js → qr-code-CyLVwLY7.js} +3 -3
- package/dist/{recycle-horizontal-CovcJGa_.js → recycle-horizontal-DvnWPcEQ.js} +3 -3
- package/dist/{refresh-J1Vw6QMA.js → refresh-BOxj8b2n.js} +3 -3
- package/dist/{reown-logo-BsXoZ3KT.js → reown-logo-D1iprOTg.js} +3 -3
- package/dist/{search-BC86wYXR.js → search-DrPaZPnc.js} +3 -3
- package/dist/secp256k1-DgmH1qVg.js +1251 -0
- package/dist/{send-BPA1bK5G.js → send-ybBREe4b.js} +3 -3
- package/dist/shareicon-D3Qj5j1T.js +262 -0
- package/dist/{sortDown-cDA6MpOw.js → sortDown-CjBaDQTU.js} +13 -13
- package/dist/{swapHorizontal-47_8ePle.js → swapHorizontal-BddjZdXK.js} +3 -3
- package/dist/{swapHorizontalBold-CJ7TzeQP.js → swapHorizontalBold-B6AWjPZ9.js} +3 -3
- package/dist/{swapHorizontalMedium-CTACgUR9.js → swapHorizontalMedium-CNacWoBn.js} +3 -3
- package/dist/{swapHorizontalRoundedBold-Ht3_LABp.js → swapHorizontalRoundedBold-B8VcPnqt.js} +3 -3
- package/dist/{swapVertical-DlS0V6DD.js → swapVertical-zY2BbSyQ.js} +3 -3
- package/dist/{telegram-UZ00kvIE.js → telegram-DS4l-8Oc.js} +3 -3
- package/dist/{three-dots-D9zVXr1j.js → three-dots-RctNqamK.js} +3 -3
- package/dist/truncate-D9t92mVX.js +7 -0
- package/dist/{twitch-CP6rpz4m.js → twitch-CJ0llIIH.js} +3 -3
- package/dist/{twitterIcon-Cm3I3FRU.js → twitterIcon-pgvN9-bP.js} +3 -3
- package/dist/unsupportedProp-BJVuEW_b.js +10 -0
- package/dist/useRegisterError-C_YLA1dw.js +9857 -0
- package/dist/validError-CDlJpg_f.js +6 -0
- package/dist/{verify-DuUE85WT.js → verify-BeZLo1Fq.js} +3 -3
- package/dist/{verify-filled-CfgydKPa.js → verify-filled-meyb7E16.js} +3 -3
- package/dist/w3m-modal-C-Jp9NVv.js +1471 -0
- package/dist/{wallet-BC2LSDlF.js → wallet-CFcOgSsz.js} +3 -3
- package/dist/{wallet-placeholder-DugEJ7xM.js → wallet-placeholder-CeUMILZq.js} +3 -3
- package/dist/{walletconnect-wayCaYfk.js → walletconnect-D6LB1PyC.js} +7 -9
- package/dist/{warning-circle-Cy9YuvwU.js → warning-circle-BRtzofvT.js} +3 -3
- package/dist/{x-jggPFiy-.js → x-DKQAOOh3.js} +3 -3
- package/package.json +1 -1
- package/dist/AllRoutes-Bdi5ZW8W.js +0 -2604
- package/dist/Box-e4gA-y_H.js +0 -60
- package/dist/EstGas-C5ihS0Mw.js +0 -17108
- package/dist/Grow-B4K-I-E-.js +0 -2212
- package/dist/InputComp-C_UUZxNU.js +0 -114
- package/dist/LoadRoute-CnDhVKdh.js +0 -142
- package/dist/QuotesProgress-DxgPgPJE.js +0 -29
- package/dist/SwapAsset-CmmuxeQF.js +0 -65
- package/dist/Tooltip-D8YjOOKU.js +0 -718
- package/dist/TxnButton-CF-TLZrD.js +0 -302
- package/dist/WidgetForm.module-DhUUlwZP.js +0 -13
- package/dist/basic-Cx2xxgd9.js +0 -7109
- package/dist/ccip-BKpquA5i.js +0 -250
- package/dist/clockIcon-jSNFFrLy.js +0 -76
- package/dist/core-C-gr9X18.js +0 -17217
- package/dist/cursor-BTtIlTHP.js +0 -7
- package/dist/down-DDk8OoJG.js +0 -809
- package/dist/ethertousd-BOknTgU4.js +0 -7
- package/dist/getChainIds-6iugk2h0.js +0 -2431
- package/dist/getCosmosAddress-BgD5iV6f.js +0 -13998
- package/dist/hamburger-BYe_G11E.js +0 -4562
- package/dist/index-BAmjBHYR.js +0 -1087
- package/dist/index-BxHeZ9IF.js +0 -543
- package/dist/index-C7cb2O7r.js +0 -16078
- package/dist/index-CF9p4S_X.js +0 -11
- package/dist/index-C_vo1L7p.js +0 -24384
- package/dist/index-Ch7w83dW.js +0 -4217
- package/dist/index-Crhenmgw.js +0 -188
- package/dist/index-Cz5Dosd2.js +0 -412
- package/dist/index-D5OnT-__.js +0 -35858
- package/dist/index-DArR1lwi.js +0 -1759
- package/dist/index-hEJSpZe-.js +0 -308
- package/dist/index-m2O0cbD8.js +0 -1883
- package/dist/index-sLx4Edw4.js +0 -22
- package/dist/index.es-DIbGJsfa.js +0 -475
- package/dist/index.es-t6sHlseh.js +0 -12916
- package/dist/secp256k1-BkBK0mD5.js +0 -1681
- package/dist/shareicon-C88Wx-AM.js +0 -314
- package/dist/truncate-DSxFWEga.js +0 -7
- package/dist/unsupportedProp-DkeDzLfM.js +0 -14
- package/dist/useRegisterError-W_UfecIN.js +0 -19288
- package/dist/validError-rariWQ7G.js +0 -14
- package/dist/w3m-modal-Bl-DPlah.js +0 -1721
@@ -0,0 +1,106 @@
|
|
1
|
+
import { jsxs as b, jsx as t, Fragment as k } from "react/jsx-runtime";
|
2
|
+
import { u as s } from "./index-CLzkn733.js";
|
3
|
+
import { useState as W, useRef as x } from "react";
|
4
|
+
import { u as j, i as S, W as I, F as D, f as p, j as u, O as F } from "./useRegisterError-C_YLA1dw.js";
|
5
|
+
import { useAccount as R, useBalance as T } from "wagmi";
|
6
|
+
import "@dynamic-labs/sdk-react-core";
|
7
|
+
import { c as A, r as B } from "./index-DXdD3L9f.js";
|
8
|
+
import { a as G } from "./shareicon-D3Qj5j1T.js";
|
9
|
+
function H({ amount: w, setAmount: l, fetchBalance: M, getCoinBalance: h, isBalanceLoading: f }) {
|
10
|
+
var d, o;
|
11
|
+
const n = s((a) => a.configuration), e = s((a) => a.fromCoin), r = s((a) => a.fromChain), { isAnyWalletConnected: g } = j({ chainData: r }), [$, K] = W(40), { address: N } = R(), v = x(), { defaultCoin: y } = S;
|
12
|
+
T({
|
13
|
+
address: N,
|
14
|
+
token: A((e == null ? void 0 : e.address) || ""),
|
15
|
+
chainId: Number((r == null ? void 0 : r.chainId) || 0),
|
16
|
+
enabled: (r == null ? void 0 : r.networkType) == "evm"
|
17
|
+
});
|
18
|
+
const i = x(), c = h;
|
19
|
+
return /* @__PURE__ */ b("div", { className: " bw-mb-5 bw-mt-4", children: [
|
20
|
+
/* @__PURE__ */ b("p", { className: "bw-text-sm bw-text-left bw-font-medium bw-mb-1 bw-text-text-secondary", children: [
|
21
|
+
"Give ",
|
22
|
+
(e == null ? void 0 : e.name) || ""
|
23
|
+
] }),
|
24
|
+
/* @__PURE__ */ b(
|
25
|
+
"div",
|
26
|
+
{
|
27
|
+
style: {
|
28
|
+
boxShadow: n && n.customTheme && ((o = (d = n.customTheme) == null ? void 0 : d.shadow) == null ? void 0 : o.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
29
|
+
},
|
30
|
+
className: "bw-w-full bw-h-[80px] bw-flex bw-gap-x-1 bw-items-center bw-px-2 bw-bg-background-card bw-rounded-md bw-border bw-border-border-primary",
|
31
|
+
children: [
|
32
|
+
/* @__PURE__ */ b("div", { className: "bw-w-full bw-flex bw-gap-x-2 bw-mt-5 bw-items-start bw-h-full", children: [
|
33
|
+
/* @__PURE__ */ t("div", { className: " bw-flex bw-items-center", children: e != null && e.image ? /* @__PURE__ */ t("div", { className: "bw-rounded-[50%] bw-bg-background-coin bw-min-w-[40px] bw-w-[40px] bw-min-h-[40px] bw-flex bw-justify-center bw-items-center bw-border bw-border-border-primary", children: /* @__PURE__ */ t("img", { src: e == null ? void 0 : e.image, width: 39, height: 39, alt: "img", className: "bw-rounded-[50%] bw-max-w-[39px] bw-max-h-[39px] bw-object-contain bw-min-w-[39px] bw-min-h-[39px]" }) }) : /* @__PURE__ */ t("div", { className: "bw-min-w-[40px] bw-w-[40px] bw-border bw-border-border-primary bw-min-h-[40px] bw-rounded-[50%] ", children: /* @__PURE__ */ t("img", { src: y, width: 39, height: 39, alt: "img", className: "bw-rounded-[50%] bw-min-w-[38px] bw-min-h-[39px]" }) }) }),
|
34
|
+
/* @__PURE__ */ b("div", { className: "bw-w-full", children: [
|
35
|
+
/* @__PURE__ */ t(
|
36
|
+
"div",
|
37
|
+
{
|
38
|
+
onClick: () => {
|
39
|
+
i.current.focus();
|
40
|
+
},
|
41
|
+
className: " ",
|
42
|
+
children: /* @__PURE__ */ b("div", { children: [
|
43
|
+
/* @__PURE__ */ b("span", { className: "bw-invisible bw-absolute", ref: v, children: [
|
44
|
+
w,
|
45
|
+
"0"
|
46
|
+
] }),
|
47
|
+
/* @__PURE__ */ t(
|
48
|
+
"input",
|
49
|
+
{
|
50
|
+
ref: i,
|
51
|
+
pattern: "[0-9]*",
|
52
|
+
inputMode: "decimal",
|
53
|
+
autoFocus: !0,
|
54
|
+
onWheel: (a) => a.target.blur(),
|
55
|
+
type: "number",
|
56
|
+
value: w,
|
57
|
+
onChange: (a) => {
|
58
|
+
let m = a.target.value;
|
59
|
+
m.length <= 11 && l(m);
|
60
|
+
},
|
61
|
+
onKeyDown: (a) => {
|
62
|
+
B(a);
|
63
|
+
},
|
64
|
+
placeholder: "0.0",
|
65
|
+
className: "bw-text-3xl bw-border-none focus:bw-placeholder:bw-opacity-0 placeholder:bw-text-left bw-h-[36px] bw-ml-auto bw-mb-1 bw-pl-1 bw-min-w-[45px] bw-max-w-[200px] bw-font-medium placeholder:bw-text-text-placeholder bw-text-text-primary bw-bg-transparent"
|
66
|
+
}
|
67
|
+
)
|
68
|
+
] })
|
69
|
+
}
|
70
|
+
),
|
71
|
+
/* @__PURE__ */ t("div", { children: e.coin.length && g ? f ? /* @__PURE__ */ t(G, { className: "bw-bg-background-loaderbar bw-rounded-md bw-h-[18px] bw-w-[100px]" }) : /* @__PURE__ */ b("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
72
|
+
/* @__PURE__ */ t(I, { fill: "var(--tw-text-secondary)" }),
|
73
|
+
/* @__PURE__ */ t("p", { className: "bw-text-xs bw-font-medium bw-text-text-secondary", children: /* @__PURE__ */ t(
|
74
|
+
D,
|
75
|
+
{
|
76
|
+
value: p(c),
|
77
|
+
options: {
|
78
|
+
maxDecimals: 10
|
79
|
+
}
|
80
|
+
}
|
81
|
+
) }),
|
82
|
+
/* @__PURE__ */ t(
|
83
|
+
"button",
|
84
|
+
{
|
85
|
+
className: "bw-text-xs bw-font-normal bw-min-w-[37px] bw-h-[18px] bw-rounded-[4px] bw-px-1 bw-border bw-border-border-primary bw-text-text-secondary",
|
86
|
+
onClick: () => {
|
87
|
+
l(u(p(c), 10));
|
88
|
+
},
|
89
|
+
children: "MAX"
|
90
|
+
}
|
91
|
+
)
|
92
|
+
] }) : /* @__PURE__ */ t(k, {}) })
|
93
|
+
] })
|
94
|
+
] }),
|
95
|
+
/* @__PURE__ */ t("div", { className: "bw-flex bw-justify-between bw-items-center", children: /* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: /* @__PURE__ */ b("p", { className: ` bw-font-normal bw-pl-2 ${w.length ? "bw-text-text-secondary bw-text-sm" : "bw-text-text-placeholder bw-text-[10px]"}`, children: [
|
96
|
+
"$",
|
97
|
+
u(F(w * (e == null ? void 0 : e.lastPrice)), 10)
|
98
|
+
] }) }) })
|
99
|
+
]
|
100
|
+
}
|
101
|
+
)
|
102
|
+
] });
|
103
|
+
}
|
104
|
+
export {
|
105
|
+
H as default
|
106
|
+
};
|
@@ -0,0 +1,126 @@
|
|
1
|
+
import { jsx as e, jsxs as w, Fragment as m } from "react/jsx-runtime";
|
2
|
+
import { t as we } from "./truncate-D9t92mVX.js";
|
3
|
+
import { u as r, l as te } from "./index-CLzkn733.js";
|
4
|
+
import { useState as ie, useEffect as le } from "react";
|
5
|
+
import { s } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
|
+
import { G as ce, C as de, S as me } from "./clockIcon-C2W5xvyt.js";
|
7
|
+
import { S as re } from "./down-DP56YSKp.js";
|
8
|
+
import { e as ae } from "./ethertousd-CC_ezooz.js";
|
9
|
+
import { O as H } from "./index-D5hLIe-N.js";
|
10
|
+
import { O as se, F as J, i as oe } from "./useRegisterError-C_YLA1dw.js";
|
11
|
+
import { a as o } from "./shareicon-D3Qj5j1T.js";
|
12
|
+
function xe({ fill: n }) {
|
13
|
+
return /* @__PURE__ */ e(
|
14
|
+
"svg",
|
15
|
+
{
|
16
|
+
width: "14",
|
17
|
+
height: "13",
|
18
|
+
viewBox: "0 0 14 13",
|
19
|
+
fill: "none",
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
21
|
+
children: /* @__PURE__ */ e(
|
22
|
+
"path",
|
23
|
+
{
|
24
|
+
d: "M8.96762 0.608257C9.75204 0.81844 10.4162 1.32448 10.8223 2.02798C11.1795 2.64657 11.3164 3.35994 11.2014 4.05707C11.8556 4.29389 12.405 4.76918 12.7621 5.38777L12.7691 5.3999C13.1753 6.10339 13.2814 6.93156 13.0713 7.71597C12.8611 8.50039 12.355 9.16451 11.6515 9.57067L6.18127 12.7289C5.64759 13.0371 4.95884 12.8525 4.65071 12.3188C4.34259 11.7851 4.52714 11.0964 5.06083 10.7883L10.5311 7.63C10.9192 7.40591 11.0525 6.90848 10.8284 6.52034L10.8214 6.50821C10.5973 6.12008 10.0999 5.98679 9.71177 6.21088L4.2415 9.36915C3.70781 9.67727 3.01906 9.49272 2.71094 8.95903C2.39581 8.41322 2.58736 7.7366 3.12105 7.42847L8.59132 4.27021C8.97946 4.04612 9.11274 3.54869 8.88165 3.14842C8.65756 2.76029 8.16013 2.627 7.77199 2.85109L2.30172 6.00936C1.76804 6.31748 1.08629 6.14506 0.771161 5.59924C0.463038 5.06556 0.647589 4.37681 1.18127 4.06868L6.65155 0.910419C7.35504 0.504257 8.18321 0.398074 8.96762 0.608257Z",
|
25
|
+
fill: n,
|
26
|
+
"fill-opacity": "1"
|
27
|
+
}
|
28
|
+
)
|
29
|
+
}
|
30
|
+
);
|
31
|
+
}
|
32
|
+
function Ce({ routes: n, handleShowAllRoutes: K, routesData: b, price: Q, amount: X, isRoutesEnabled: v }) {
|
33
|
+
var y, N, F, u, S, k, C, $, E, j, I, L, U, A, G, O, T, z, M, R, _, B, V, q, W, P;
|
34
|
+
const x = n.data, [c, Y] = ie(), l = r((i) => i.gradient), t = r((i) => i.configuration), h = r((i) => i.fromChain), g = r((i) => i.fromCoin), p = r((i) => i.toChain), d = r((i) => i.toCoin), { defaultCoin: D } = oe;
|
35
|
+
le(() => {
|
36
|
+
var i;
|
37
|
+
if (b) {
|
38
|
+
let f = { amountInUSD: 0, amountInNative: 0 }, Z = {};
|
39
|
+
(i = b == null ? void 0 : b.fee) == null || i.forEach((a) => {
|
40
|
+
a.source == "FROM_SOURCE_WALLET" && (f.amountInUSD += Number(a.amountInUSD), f.amountInNative += Number(ae(a.amountInToken, a.token.decimals)), Z = { ...a });
|
41
|
+
}), Y({ tempGasObj: f, token: Z });
|
42
|
+
}
|
43
|
+
}, [b]);
|
44
|
+
let ee = (b == null ? void 0 : b.outputAmountDisplay) || "", be = se(Q), ne = (N = (y = b == null ? void 0 : b.providerDetails) == null ? void 0 : y.logoUrl) != null && N.length ? (F = b == null ? void 0 : b.providerDetails) == null ? void 0 : F.logoUrl : D;
|
45
|
+
return /* @__PURE__ */ e("div", { className: "bw-mt-2", children: (u = h == null ? void 0 : h.chain) != null && u.length && ((S = g == null ? void 0 : g.coin) != null && S.length) && ((k = p == null ? void 0 : p.chain) != null && k.length) && ((C = d == null ? void 0 : d.coin) != null && C.length) && X.length && v ? n.isSuccess && !((j = (E = ($ = n.data) == null ? void 0 : $.data) == null ? void 0 : E.quotes) != null && j.length) ? /* @__PURE__ */ e("div", { className: "bw-bg-background-container bw-text-text-secondary bw-flex bw-justify-center bw-items-center bw-h-[80px] bw-relative bw-flex-col bw-border bw-border-border-primary", children: "No Routes Available" }) : n.isSuccess || n.isLoading || n.isFetching ? /* @__PURE__ */ w("div", { children: [
|
46
|
+
/* @__PURE__ */ w("div", { className: "bw-flex bw-items-center bw-justify-between", children: [
|
47
|
+
" ",
|
48
|
+
/* @__PURE__ */ w("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: [
|
49
|
+
"Get ",
|
50
|
+
d.name
|
51
|
+
] }),
|
52
|
+
n.isFetching ? /* @__PURE__ */ e(m, {}) : /* @__PURE__ */ e("div", { onClick: K, style: { ...t.gradientStyle }, className: `bw-w-[130px] bw-cursor-pointer bw-relative bw-p-[1px] bw-text-transparent bw-text-sm bw-font-normal bw-h-[18px] bw-rounded-xl ${l || `${s.overlayshow} ${(I = t.gradientStyle) != null && I.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"}`}`, children: /* @__PURE__ */ e("div", { className: " bw-w-full bw-h-full bw-text-text-secondary bw-relative bw-z-10 bw-bg-background-container bw-flex bw-justify-center bw-items-center bw-text-xs bw-font-normal bw-rounded-xl", children: "Show All Routes" }) })
|
53
|
+
] }),
|
54
|
+
/* @__PURE__ */ w("div", { className: " bw-mt-2", children: [
|
55
|
+
/* @__PURE__ */ w("div", { style: n.isFetching ? {} : { ...t.gradientStyle }, className: ` ${n.isFetching ? "bw-bg-background-secondary" : ` ${l || `${(L = t.gradientStyle) != null && L.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"} ${s.overlay}`} `} bw-relative bw-flex bw-justify-center bw-rounded-[8px] bw-w-full bw-p-[1px] bw-h-[86px] `, children: [
|
56
|
+
/* @__PURE__ */ w("div", { className: "bw-w-full bw-h-full bw-flex bw-px-2 bw-pb-3 bw-items-center bw-justify-between bw-bg-background-card rbw-elative bw-z-10 bw-rounded-[8px]", children: [
|
57
|
+
/* @__PURE__ */ w("div", { className: "bw-flex bw-items-start bw-gap-x-2", children: [
|
58
|
+
d != null && d.image && !n.isFetching ? /* @__PURE__ */ e("img", { src: d.image, width: 30, height: 30, className: "bw-mt-1 bw-max-w-[30px] bw-max-h-[30px] bw-object-contain bw-bg-background-coin bw-rounded-[50%]" }) : /* @__PURE__ */ e(m, {}),
|
59
|
+
/* @__PURE__ */ w("div", { children: [
|
60
|
+
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-loaderbar bw-mt-3 bw-rounded-sm bw-h-[36px] bw-min-h-[36px]", animation: "wave", variant: "rectangular", height: 36, width: 250 }) : /* @__PURE__ */ e("p", { className: "bw-text-3xl bw-mb-1 bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(H, { value: ee, decimal: 12 }) }),
|
61
|
+
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-loaderbar bw-mt-2 bw-rounded-sm bw-h-[20px] bw-w-[100px] bw-min-h-[20px]", variant: "rectangular", animation: "wave", height: 20, width: 100 }) : /* @__PURE__ */ w("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
62
|
+
/* @__PURE__ */ e(ce, { fill: "var(--tw-text-primary)" }),
|
63
|
+
/* @__PURE__ */ w("p", { className: "bw-text-sm bw-font-medium bw-text-text-primary", children: [
|
64
|
+
"Total Fee:",
|
65
|
+
" $",
|
66
|
+
/* @__PURE__ */ e(J, { value: ((U = c == null ? void 0 : c.tempGasObj) == null ? void 0 : U.amountInUSD) || 0, options: { maxDecimals: 8 } }),
|
67
|
+
" (",
|
68
|
+
/* @__PURE__ */ e(J, { value: ((A = c == null ? void 0 : c.tempGasObj) == null ? void 0 : A.amountInNative) || 0, options: { maxDecimals: 8 } }),
|
69
|
+
` ${((O = (G = c == null ? void 0 : c.token) == null ? void 0 : G.token) == null ? void 0 : O.symbol) || ""})`
|
70
|
+
] })
|
71
|
+
] })
|
72
|
+
] })
|
73
|
+
] }),
|
74
|
+
/* @__PURE__ */ w("div", { className: " bw-text-sm bw-font-medium bw-mt-2 bw-text-text-loaderbar ", children: [
|
75
|
+
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-loaderbar bw-w-[50px] bw-rounded-sm bw-h-[20px] bw-min-h-[20px]", variant: "rectangular", animation: "wave", height: 20, width: 50 }) : /* @__PURE__ */ w("p", { className: "bw-text-text-secondary bw-font-medium bw-text-sm", children: [
|
76
|
+
"$",
|
77
|
+
/* @__PURE__ */ e(H, { value: be, decimal: 8 })
|
78
|
+
] }),
|
79
|
+
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-loaderbar bw-w-[50px] bw-mt-2 bw-rounded-sm bw-h-[20px] bw-min-h-[20px] ", variant: "rectangular", animation: "wave", height: 20, width: 50 }) : ((M = (z = (T = x == null ? void 0 : x.data) == null ? void 0 : T.quotes) == null ? void 0 : z[0]) == null ? void 0 : M._id) === b._id ? /* @__PURE__ */ e("div", { style: { ...t.gradientStyle }, className: `${l || `${(R = t.gradientStyle) != null && R.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"} `} bw-mt-3 bw-text-right bw-text-transparent bw-text-[10px] bw-font-bold bw-bg-clip-text ${s.gradienttext}`, children: "BEST" }) : /* @__PURE__ */ e(m, {})
|
80
|
+
] })
|
81
|
+
] }),
|
82
|
+
n.isFetching ? /* @__PURE__ */ e("div", { className: "bw-absolute bw-w-[40px] bw-h-[40px] bw-bottom-[-35%] bw-z-20 ", children: /* @__PURE__ */ e(re, {}) }) : /* @__PURE__ */ e(m, {}),
|
83
|
+
/* @__PURE__ */ w("div", { className: "bw-h-[18px] bw-w-max bw-z-10 bw-min-w-[200px] bw-bg-background-card bw-flex bw-items-center bw-absolute bw-bottom-[-10%]", children: [
|
84
|
+
!n.isFetching && !te.isEmpty(b) ? /* @__PURE__ */ w("div", { className: "bw-flex bw-w-full bw-px-6 bw-items-center bw-gap-x-1", children: [
|
85
|
+
" ",
|
86
|
+
/* @__PURE__ */ w("p", { className: "bw-text-sm bw-w-full bw-text-center bw-flex bw-justify-center bw-items-center bw-font-normal bw-my-1 bw-text-text-secondary", children: [
|
87
|
+
/* @__PURE__ */ e("span", { className: "bw-text-sm bw-font-light", children: "via" }),
|
88
|
+
" ",
|
89
|
+
/* @__PURE__ */ e("img", { src: ne, className: "bw-rounded-[50%] bw-mx-[4px] bw-min-w-[18px] bw-max-h-[18px] bw-min-h-[18px]", width: 18, height: 18 }),
|
90
|
+
((_ = b == null ? void 0 : b.providerDetails) == null ? void 0 : _.name) || "",
|
91
|
+
": ",
|
92
|
+
b == null ? void 0 : b.protocolsUsed[0],
|
93
|
+
((B = b == null ? void 0 : b.protocolsUsed) == null ? void 0 : B.length) <= 1 ? "" : /* @__PURE__ */ w("span", { className: "bw-ml-1 bw-text-xs bw-font-normal", children: [
|
94
|
+
`+${((V = b == null ? void 0 : b.protocolsUsed) == null ? void 0 : V.length) - 1}`,
|
95
|
+
" More"
|
96
|
+
] }),
|
97
|
+
" "
|
98
|
+
] }),
|
99
|
+
" "
|
100
|
+
] }) : /* @__PURE__ */ e(m, {}),
|
101
|
+
/* @__PURE__ */ e("div", { style: n.isFetching ? {} : { ...t.gradientStyle }, className: ` ${n.isFetching ? "bw-bg-background-secondary" : ` ${l || ` ${s.overlay} ${(q = t == null ? void 0 : t.gradientStyle) != null && q.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"}`}`} bw-absolute bw-right-0 bw-rounded-[50%] bw-w-[4px] bw-h-[4px] ` }),
|
102
|
+
/* @__PURE__ */ e("div", { style: n.isFetching ? {} : { ...t.gradientStyle }, className: ` ${n.isFetching ? "bw-bg-background-secondary" : ` ${l || ` ${s.overlay} ${(W = t == null ? void 0 : t.gradientStyle) != null && W.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"}`}`} bw-absolute bw-rounded-[50%] bw-w-[4px] bw-h-[4px] ` })
|
103
|
+
] })
|
104
|
+
] }),
|
105
|
+
/* @__PURE__ */ e("div", { className: "bw-bg-background-card bw-flex bw-items-center bw-w-[85%] bw-mx-auto bw-rounded-b-md bw-justify-center bw-h-[60px]", children: n.isFetching ? /* @__PURE__ */ e("div", { className: "bw-mt-6 bw-w-full bw-h-[20px]" }) : /* @__PURE__ */ w("div", { className: "bw-flex bw-items-center bw-gap-x-4 bw-mt-2 bw-bg-background-card bw-justify-center ", children: [
|
106
|
+
/* @__PURE__ */ w("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
107
|
+
/* @__PURE__ */ e(xe, { fill: "var(--tw-text-secondary)" }),
|
108
|
+
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "Fee" }),
|
109
|
+
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-line-through bw-font-medium bw-text-text-secondary", children: "0.1%" }),
|
110
|
+
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "0" })
|
111
|
+
] }),
|
112
|
+
/* @__PURE__ */ w("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
113
|
+
/* @__PURE__ */ e(de, { fill: "var(--tw-text-secondary)" }),
|
114
|
+
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: (b == null ? void 0 : b.estimatedTimeInSeconds) >= 90 ? `${Math.round(we(((b == null ? void 0 : b.estimatedTimeInSeconds) || 60) / 60, 2) || 0)}min` : `${(b == null ? void 0 : b.estimatedTimeInSeconds) || 60} secs` })
|
115
|
+
] }),
|
116
|
+
/* @__PURE__ */ w("div", { className: " bw-gap-x-1 bw-flex bw-items-center bw-text-xs bw-font-normal bw-text-text-primary", children: [
|
117
|
+
/* @__PURE__ */ e(me, { fill: "var(--tw-text-secondary)" }),
|
118
|
+
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: `${((P = b == null ? void 0 : b.steps) == null ? void 0 : P.length) || ""} step` })
|
119
|
+
] })
|
120
|
+
] }) })
|
121
|
+
] })
|
122
|
+
] }) : v ? /* @__PURE__ */ e("div", { className: "bw-bg-background-container bw-text-text-secondary bw-justify-center bw-items-center bw-h-[80px] bw-relative bw-flex bw-flex-col bw-border bw-border-border-primary", children: "Failed to load routes" }) : /* @__PURE__ */ e(m, {}) : /* @__PURE__ */ e(m, {}) });
|
123
|
+
}
|
124
|
+
export {
|
125
|
+
Ce as default
|
126
|
+
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { jsxs as w, jsx as t, Fragment as d } from "react/jsx-runtime";
|
2
|
+
import { s as o } from "./WidgetForm.module-QHJ0-m5f.js";
|
3
|
+
import { u as l, l as c } from "./index-CLzkn733.js";
|
4
|
+
function f({ routesData: i, routes: a, quoteTimer: n }) {
|
5
|
+
var b;
|
6
|
+
const r = l((s) => s.configuration), e = l((s) => s.gradient);
|
7
|
+
return !c.isEmpty(i) && !a.isFetching && a.isSuccess ? /* @__PURE__ */ w("div", { className: "bw-flex bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
8
|
+
/* @__PURE__ */ t("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "New Quote in" }),
|
9
|
+
/* @__PURE__ */ t("div", { className: " bw-w-[250px] bw-flex-1 bw-bg-border-primary bw-h-[3px] bw-overflow-x-hidden", children: /* @__PURE__ */ t(
|
10
|
+
"div",
|
11
|
+
{
|
12
|
+
style: {
|
13
|
+
height: "100%",
|
14
|
+
...r.gradientStyle,
|
15
|
+
width: `${100 - n / i.deadline * 100}%`
|
16
|
+
},
|
17
|
+
className: ` ${e || `${(b = r.gradientStyle) != null && b.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"} ${o.overlay}`} bw-relative `
|
18
|
+
}
|
19
|
+
) }),
|
20
|
+
/* @__PURE__ */ w("div", { style: { ...r.gradientStyle }, className: `${e ? `${e} bw-bg-clip-text bw-text-transparent` : o.gradienttext} bw-relative bw-text-right bw-w-max bw-text-2xl bw-font-semibold bw-text-transparent `, children: [
|
21
|
+
n,
|
22
|
+
"s"
|
23
|
+
] })
|
24
|
+
] }) : /* @__PURE__ */ t(d, {});
|
25
|
+
}
|
26
|
+
export {
|
27
|
+
f as default
|
28
|
+
};
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { u as a } from "./index-CLzkn733.js";
|
3
|
+
function w({ fill1: o, fill2: r }) {
|
4
|
+
return /* @__PURE__ */ s(
|
5
|
+
"svg",
|
6
|
+
{
|
7
|
+
width: "37",
|
8
|
+
height: "37",
|
9
|
+
viewBox: "0 0 37 37",
|
10
|
+
fill: "none",
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
12
|
+
children: [
|
13
|
+
/* @__PURE__ */ t(
|
14
|
+
"circle",
|
15
|
+
{
|
16
|
+
cx: "18.5027",
|
17
|
+
cy: "18.6207",
|
18
|
+
r: "18.2551",
|
19
|
+
transform: "rotate(90 18.5027 18.6207)",
|
20
|
+
fill: o
|
21
|
+
}
|
22
|
+
),
|
23
|
+
/* @__PURE__ */ t(
|
24
|
+
"path",
|
25
|
+
{
|
26
|
+
d: "M14.3655 7.6488L7.58782 16.5705L28.9581 16.5705L28.9581 12.7663L14.3655 12.7663L14.3655 7.6488Z",
|
27
|
+
fill: r,
|
28
|
+
"fill-opacity": "1"
|
29
|
+
}
|
30
|
+
),
|
31
|
+
/* @__PURE__ */ t(
|
32
|
+
"path",
|
33
|
+
{
|
34
|
+
d: "M22.2517 29.0189L29.0294 20.0972L7.65911 20.0972L7.65911 23.9014L22.2517 23.9014L22.2517 29.0189Z",
|
35
|
+
fill: r,
|
36
|
+
"fill-opacity": "1"
|
37
|
+
}
|
38
|
+
)
|
39
|
+
]
|
40
|
+
}
|
41
|
+
);
|
42
|
+
}
|
43
|
+
function p({ handleSwap: o }) {
|
44
|
+
var i, l;
|
45
|
+
const r = a((e) => e.fromCoin), c = a((e) => e.toCoin);
|
46
|
+
let n = ((i = r == null ? void 0 : r.coin) == null ? void 0 : i.length) && ((l = c.coin) == null ? void 0 : l.length);
|
47
|
+
return /* @__PURE__ */ t(
|
48
|
+
"div",
|
49
|
+
{
|
50
|
+
onClick: o,
|
51
|
+
className: `${n ? "" : "bw-pointer-events-none"} bw-absolute hover:bw-scale-[0.95] bw-border bw-border-border-primary bw-rounded-[50%] bw-cursor-pointer bw-bg-background-container bw-top-[33%] bw-right-[45%] `,
|
52
|
+
children: /* @__PURE__ */ t(
|
53
|
+
w,
|
54
|
+
{
|
55
|
+
fill1: "var(--tw-background-card)",
|
56
|
+
fill2: n ? "var(--tw-text-primary)" : "var(--tw-text-secondary)"
|
57
|
+
}
|
58
|
+
)
|
59
|
+
}
|
60
|
+
);
|
61
|
+
}
|
62
|
+
export {
|
63
|
+
p as default
|
64
|
+
};
|