@gardenfi/swap 0.0.1-beta.1

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.
Files changed (94) hide show
  1. package/README.md +65 -0
  2. package/dist/index.cjs +1 -0
  3. package/dist/index.js +5 -0
  4. package/dist/index10.cjs +1 -0
  5. package/dist/index10.js +33 -0
  6. package/dist/index11.cjs +1 -0
  7. package/dist/index11.js +36 -0
  8. package/dist/index12.cjs +1 -0
  9. package/dist/index12.js +65 -0
  10. package/dist/index13.cjs +1 -0
  11. package/dist/index13.js +33 -0
  12. package/dist/index14.cjs +1 -0
  13. package/dist/index14.js +190 -0
  14. package/dist/index15.cjs +1 -0
  15. package/dist/index15.js +51 -0
  16. package/dist/index16.cjs +1 -0
  17. package/dist/index16.js +313 -0
  18. package/dist/index17.cjs +1 -0
  19. package/dist/index17.js +29 -0
  20. package/dist/index18.cjs +1 -0
  21. package/dist/index18.js +17 -0
  22. package/dist/index19.cjs +1 -0
  23. package/dist/index19.js +229 -0
  24. package/dist/index20.cjs +1 -0
  25. package/dist/index20.js +15 -0
  26. package/dist/index21.cjs +1 -0
  27. package/dist/index21.js +92 -0
  28. package/dist/index22.cjs +1 -0
  29. package/dist/index22.js +143 -0
  30. package/dist/index23.cjs +1 -0
  31. package/dist/index23.js +22 -0
  32. package/dist/index24.cjs +1 -0
  33. package/dist/index24.js +20 -0
  34. package/dist/index25.cjs +1 -0
  35. package/dist/index25.js +108 -0
  36. package/dist/index26.cjs +1 -0
  37. package/dist/index26.js +85 -0
  38. package/dist/index27.cjs +1 -0
  39. package/dist/index27.js +15 -0
  40. package/dist/index28.cjs +1 -0
  41. package/dist/index28.js +54 -0
  42. package/dist/index29.cjs +1 -0
  43. package/dist/index29.js +63 -0
  44. package/dist/index3.cjs +1 -0
  45. package/dist/index3.js +7 -0
  46. package/dist/index30.cjs +1 -0
  47. package/dist/index30.js +44 -0
  48. package/dist/index31.cjs +1 -0
  49. package/dist/index31.js +43 -0
  50. package/dist/index4.cjs +1 -0
  51. package/dist/index4.js +26 -0
  52. package/dist/index5.cjs +1 -0
  53. package/dist/index5.js +250 -0
  54. package/dist/index6.cjs +1 -0
  55. package/dist/index6.js +98 -0
  56. package/dist/index7.cjs +1 -0
  57. package/dist/index7.js +51 -0
  58. package/dist/index8.cjs +1 -0
  59. package/dist/index8.js +51 -0
  60. package/dist/index9.cjs +1 -0
  61. package/dist/index9.js +101 -0
  62. package/dist/src/index.d.ts +2 -0
  63. package/dist/src/lib/GardenComponent.d.ts +6 -0
  64. package/dist/src/lib/common/AddressDetails.d.ts +8 -0
  65. package/dist/src/lib/common/ChainsToolTip.d.ts +8 -0
  66. package/dist/src/lib/common/Modal.d.ts +9 -0
  67. package/dist/src/lib/common/ModalComponent.d.ts +7 -0
  68. package/dist/src/lib/common/Navbar.d.ts +10 -0
  69. package/dist/src/lib/common/SwapInput.d.ts +17 -0
  70. package/dist/src/lib/components/CreateSwap.d.ts +4 -0
  71. package/dist/src/lib/components/SwapSavingsAndAddresses.d.ts +10 -0
  72. package/dist/src/lib/components/SwapWidget.d.ts +7 -0
  73. package/dist/src/lib/components/assetSelection/AssetModal.d.ts +8 -0
  74. package/dist/src/lib/components/assetSelection/AvailableChainsSidebar.d.ts +11 -0
  75. package/dist/src/lib/components/feesAndRateDetails/FeeAndRateDetails.d.ts +3 -0
  76. package/dist/src/lib/components/feesAndRateDetails/InputAddress.d.ts +3 -0
  77. package/dist/src/lib/components/feesAndRateDetails/InputAddressAndFeeRateDetails.d.ts +3 -0
  78. package/dist/src/lib/components/transactions/SwapInfo.d.ts +12 -0
  79. package/dist/src/lib/components/transactions/TransactionHistory.d.ts +7 -0
  80. package/dist/src/lib/components/transactions/TransactionRow.d.ts +11 -0
  81. package/dist/src/lib/components/transactions/TransactionSkeleton.d.ts +3 -0
  82. package/dist/src/lib/components/transactions/Transactions.d.ts +4 -0
  83. package/dist/src/lib/constants/animations.d.ts +7 -0
  84. package/dist/src/lib/constants/constants.d.ts +29 -0
  85. package/dist/src/lib/constants/network.d.ts +0 -0
  86. package/dist/src/lib/hooks/useSwap.d.ts +29 -0
  87. package/dist/src/lib/store/assetStore.d.ts +23 -0
  88. package/dist/src/lib/store/swapStore.d.ts +79 -0
  89. package/dist/src/lib/store/transactionHistoryStore.d.ts +17 -0
  90. package/dist/src/lib/store/viewPortStore.d.ts +17 -0
  91. package/dist/src/lib/types/types.d.ts +54 -0
  92. package/dist/src/lib/utils/utils.d.ts +14 -0
  93. package/dist/style.css +1 -0
  94. package/package.json +62 -0
@@ -0,0 +1,92 @@
1
+ import t, { useRef as w, useId as y, useMemo as s } from "react";
2
+ import { Typography as u } from "@gardenfi/garden-book";
3
+ import { isBitcoin as n } from "@gardenfi/orderbook";
4
+ import { validateBTCAddress as B } from "@gardenfi/core";
5
+ import { swapStore as E } from "./index5.js";
6
+ import { AnimatePresence as O, motion as R } from "framer-motion";
7
+ const k = () => {
8
+ const o = w(null), m = y(), {
9
+ inputAsset: e,
10
+ outputAsset: i,
11
+ btcAddress: a,
12
+ setBtcAddress: h,
13
+ currentNetwork: d
14
+ } = E(), p = !0, c = "", l = s(
15
+ () => !!(e && n(e.chain)),
16
+ [e]
17
+ ), g = s(() => (e == null ? void 0 : e.chain) && n(e.chain) || (i == null ? void 0 : i.chain) && n(i.chain), [p, c, e, i]), f = (A) => {
18
+ let r = A.target.value;
19
+ /^[a-zA-Z0-9]$/.test(r.at(-1) || "") || (r = r.slice(0, -1)), h(r);
20
+ }, v = a || c || "", x = s(() => a ? B(
21
+ a,
22
+ d
23
+ ) : !0, [a, d]);
24
+ return /* @__PURE__ */ t.createElement(O, { mode: "wait" }, g && /* @__PURE__ */ t.createElement(
25
+ R.div,
26
+ {
27
+ variants: {
28
+ hidden: {
29
+ opacity: 0,
30
+ height: 0,
31
+ marginBottom: "0",
32
+ pointerEvents: "none",
33
+ transition: {
34
+ duration: 0.3,
35
+ ease: "easeOut",
36
+ height: { duration: 0.2, ease: "easeOut" }
37
+ }
38
+ },
39
+ visible: {
40
+ opacity: 1,
41
+ height: "auto",
42
+ marginBottom: "12px",
43
+ pointerEvents: "auto",
44
+ transition: {
45
+ duration: 0.3,
46
+ ease: "easeOut",
47
+ height: { duration: 0.2, ease: "easeOut" }
48
+ }
49
+ },
50
+ exit: {
51
+ opacity: 0,
52
+ height: 0,
53
+ marginBottom: "0",
54
+ pointerEvents: "none",
55
+ transition: {
56
+ duration: 0.3,
57
+ ease: "easeOut",
58
+ opacity: { duration: 0.2, ease: "easeOut" }
59
+ }
60
+ }
61
+ },
62
+ initial: "hidden",
63
+ animate: "visible",
64
+ exit: "exit"
65
+ },
66
+ /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2 rounded-2xl bg-white p-4" }, /* @__PURE__ */ t.createElement(
67
+ u,
68
+ {
69
+ "data-tooltip-id": l ? m : "",
70
+ size: "h5",
71
+ weight: "medium",
72
+ onClick: () => o.current.focus(),
73
+ className: "w-fit"
74
+ },
75
+ l ? "Refund" : "Receive",
76
+ " address"
77
+ ), /* @__PURE__ */ t.createElement(u, { size: "h3", weight: "regular" }, /* @__PURE__ */ t.createElement(
78
+ "input",
79
+ {
80
+ ref: o,
81
+ className: `w-full outline-none placeholder:text-mid-grey ${!x && a ? "text-red-500" : ""}`,
82
+ type: "text",
83
+ value: v,
84
+ placeholder: "Your Bitcoin address",
85
+ onChange: f
86
+ }
87
+ )))
88
+ ));
89
+ };
90
+ export {
91
+ k as InputAddress
92
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),n=require("@gardenfi/garden-book"),a=require("framer-motion"),d=require("./index17.cjs"),c=require("./index28.cjs"),f=require("./index5.cjs"),p=require("./index29.cjs"),u=({inputAsset:t,outputAsset:s,formattedRate:r,formattedTokenPrice:l,className:i=""})=>e.createElement("div",{className:"flex min-w-fit items-center gap-1"},e.createElement(n.Typography,{size:"h5",weight:"regular",className:`!text-nowrap ${i}`},"1 ",t==null?void 0:t.symbol," ≈"),e.createElement(n.Typography,{size:"h5",weight:"regular",className:`!text-nowrap ${i}`},r&&`${r} ${s==null?void 0:s.symbol}`,l&&`$${l}`)),w=()=>{const[t,s]=e.useState(!1),[,r]=e.useState(!1),l=e.useRef(null),i=e.useMemo(()=>d.formatAmount(2e3,0,2),[]),{inputAsset:o,outputAsset:m}=f.swapStore();return e.createElement("div",{className:"flex flex-col rounded-2xl bg-white/50 pb-4 transition-all duration-200"},e.createElement("div",{className:"flex w-full items-center justify-between rounded-2xl px-4 pt-4"},e.createElement("div",{className:"relative flex w-full items-center justify-start gap-1"},e.createElement(a.AnimatePresence,{mode:"wait"},t?e.createElement(a.motion.div,{key:"expanded",className:"w-fit",...c.delayedFadeAnimation},e.createElement("div",{className:"flex items-center gap-1"},e.createElement(n.Typography,{size:"h5",weight:"regular",className:"!text-mid-grey"},"Rate"),e.createElement("span",{ref:l,className:"inline-block cursor-pointer",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},e.createElement(n.InfoIcon,{className:"h-3 w-3 !fill-mid-grey"})))):e.createElement(a.motion.div,{key:"collapsed",className:"w-fit",...c.delayedFadeAnimation},e.createElement(u,{inputAsset:o,outputAsset:m,formattedTokenPrice:i,className:"!text-mid-grey"})))),e.createElement("div",{className:"flex w-full items-center justify-end gap-1"},e.createElement(a.AnimatePresence,{mode:"wait"},t?e.createElement(a.motion.div,{key:"expanded",className:"w-fit",...c.delayedFadeAnimation},e.createElement(u,{inputAsset:o,outputAsset:m,formattedTokenPrice:i})):e.createElement(a.motion.div,{key:"collapsed",className:"w-fit",...c.delayedFadeAnimation},e.createElement("div",{className:"flex min-w-fit items-center gap-1"},e.createElement(n.GasStationIcon,{className:"h-3 w-3"}),e.createElement(n.Typography,{size:"h5",weight:"regular",className:"!text-nowrap"},"Free"))))),e.createElement(a.motion.div,{initial:{width:0,scale:0,opacity:0},animate:{width:"auto",scale:1,opacity:1},exit:{width:0,scale:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"pl-1"},e.createElement(n.KeyboardDownIcon,{className:`h-4 w-4 cursor-pointer px-1 transition-transform duration-300 ${t?"rotate-180":""}`,onClick:()=>s(!t)}))),e.createElement(a.AnimatePresence,null,t&&e.createElement(p.SwapSavingsAndAddresses,{refundAddress:"jhgvfb",receiveAddress:"nbvcx",showComparison:()=>{},networkFeesValue:d.formatAmount(2e3,0,2)})))};exports.FeesAndRateDetails=w;
@@ -0,0 +1,143 @@
1
+ import e, { useState as f, useRef as E, useMemo as x } from "react";
2
+ import { Typography as m, InfoIcon as u, GasStationIcon as g, KeyboardDownIcon as y } from "@gardenfi/garden-book";
3
+ import { AnimatePresence as c, motion as s } from "framer-motion";
4
+ import { formatAmount as p } from "./index17.js";
5
+ import { delayedFadeAnimation as i } from "./index28.js";
6
+ import { swapStore as N } from "./index5.js";
7
+ import { SwapSavingsAndAddresses as v } from "./index29.js";
8
+ const w = ({
9
+ inputAsset: t,
10
+ outputAsset: a,
11
+ formattedRate: l,
12
+ formattedTokenPrice: n,
13
+ className: r = ""
14
+ }) => /* @__PURE__ */ e.createElement("div", { className: "flex min-w-fit items-center gap-1" }, /* @__PURE__ */ e.createElement(
15
+ m,
16
+ {
17
+ size: "h5",
18
+ weight: "regular",
19
+ className: `!text-nowrap ${r}`
20
+ },
21
+ "1 ",
22
+ t == null ? void 0 : t.symbol,
23
+ " ≈"
24
+ ), /* @__PURE__ */ e.createElement(
25
+ m,
26
+ {
27
+ size: "h5",
28
+ weight: "regular",
29
+ className: `!text-nowrap ${r}`
30
+ },
31
+ l && `${l} ${a == null ? void 0 : a.symbol}`,
32
+ n && `$${n}`
33
+ )), S = () => {
34
+ const [t, a] = f(!1), [, l] = f(!1), n = E(null), r = x(() => p(2e3, 0, 2), []), {
35
+ inputAsset: o,
36
+ outputAsset: d
37
+ // rate,
38
+ // networkFees,
39
+ // showComparisonHandler,
40
+ // fiatTokenPrices,
41
+ } = N();
42
+ return /* @__PURE__ */ e.createElement("div", { className: "flex flex-col rounded-2xl bg-white/50 pb-4 transition-all duration-200" }, /* @__PURE__ */ e.createElement("div", { className: "flex w-full items-center justify-between rounded-2xl px-4 pt-4" }, /* @__PURE__ */ e.createElement("div", { className: "relative flex w-full items-center justify-start gap-1" }, /* @__PURE__ */ e.createElement(c, { mode: "wait" }, t ? /* @__PURE__ */ e.createElement(
43
+ s.div,
44
+ {
45
+ key: "expanded",
46
+ className: "w-fit",
47
+ ...i
48
+ },
49
+ /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ e.createElement(
50
+ m,
51
+ {
52
+ size: "h5",
53
+ weight: "regular",
54
+ className: "!text-mid-grey"
55
+ },
56
+ "Rate"
57
+ ), /* @__PURE__ */ e.createElement(
58
+ "span",
59
+ {
60
+ ref: n,
61
+ className: "inline-block cursor-pointer",
62
+ onMouseEnter: () => l(!0),
63
+ onMouseLeave: () => l(!1)
64
+ },
65
+ /* @__PURE__ */ e.createElement(u, { className: "h-3 w-3 !fill-mid-grey" })
66
+ ))
67
+ ) : /* @__PURE__ */ e.createElement(
68
+ s.div,
69
+ {
70
+ key: "collapsed",
71
+ className: "w-fit",
72
+ ...i
73
+ },
74
+ /* @__PURE__ */ e.createElement(
75
+ w,
76
+ {
77
+ inputAsset: o,
78
+ outputAsset: d,
79
+ formattedTokenPrice: r,
80
+ className: "!text-mid-grey"
81
+ }
82
+ )
83
+ ))), /* @__PURE__ */ e.createElement("div", { className: "flex w-full items-center justify-end gap-1" }, /* @__PURE__ */ e.createElement(c, { mode: "wait" }, t ? /* @__PURE__ */ e.createElement(
84
+ s.div,
85
+ {
86
+ key: "expanded",
87
+ className: "w-fit",
88
+ ...i
89
+ },
90
+ /* @__PURE__ */ e.createElement(
91
+ w,
92
+ {
93
+ inputAsset: o,
94
+ outputAsset: d,
95
+ formattedTokenPrice: r
96
+ }
97
+ )
98
+ ) : /* @__PURE__ */ e.createElement(
99
+ s.div,
100
+ {
101
+ key: "collapsed",
102
+ className: "w-fit",
103
+ ...i
104
+ },
105
+ /* @__PURE__ */ e.createElement("div", { className: "flex min-w-fit items-center gap-1" }, /* @__PURE__ */ e.createElement(g, { className: "h-3 w-3" }), /* @__PURE__ */ e.createElement(
106
+ m,
107
+ {
108
+ size: "h5",
109
+ weight: "regular",
110
+ className: "!text-nowrap"
111
+ },
112
+ "Free"
113
+ ))
114
+ ))), /* @__PURE__ */ e.createElement(
115
+ s.div,
116
+ {
117
+ initial: { width: 0, scale: 0, opacity: 0 },
118
+ animate: { width: "auto", scale: 1, opacity: 1 },
119
+ exit: { width: 0, scale: 0, opacity: 0 },
120
+ transition: { duration: 0.2, ease: "easeInOut" },
121
+ className: "pl-1"
122
+ },
123
+ /* @__PURE__ */ e.createElement(
124
+ y,
125
+ {
126
+ className: `h-4 w-4 cursor-pointer px-1 transition-transform duration-300 ${t ? "rotate-180" : ""}`,
127
+ onClick: () => a(!t)
128
+ }
129
+ )
130
+ )), /* @__PURE__ */ e.createElement(c, null, t && /* @__PURE__ */ e.createElement(
131
+ v,
132
+ {
133
+ refundAddress: "jhgvfb",
134
+ receiveAddress: "nbvcx",
135
+ showComparison: () => {
136
+ },
137
+ networkFeesValue: p(2e3, 0, 2)
138
+ }
139
+ )));
140
+ };
141
+ export {
142
+ S as FeesAndRateDetails
143
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("zustand"),i={sm:600,md:900},d=n.create()(e=>({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0,isMobile:typeof window<"u"?/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||window.innerWidth<i.sm:!1,isTab:typeof window<"u"?window.innerWidth>=i.md:!1,updateViewport:()=>{typeof window<"u"&&e({width:window.innerWidth,height:window.innerHeight,isMobile:/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||window.innerWidth<i.sm,isTab:window.innerWidth>=i.md})}}));exports.BREAKPOINTS=i;exports.viewPortStore=d;
@@ -0,0 +1,22 @@
1
+ import { create as e } from "zustand";
2
+ const i = {
3
+ sm: 600,
4
+ md: 900
5
+ }, o = e()((n) => ({
6
+ width: typeof window < "u" ? window.innerWidth : 0,
7
+ height: typeof window < "u" ? window.innerHeight : 0,
8
+ isMobile: typeof window < "u" ? /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) || window.innerWidth < i.sm : !1,
9
+ isTab: typeof window < "u" ? window.innerWidth >= i.md : !1,
10
+ updateViewport: () => {
11
+ typeof window < "u" && n({
12
+ width: window.innerWidth,
13
+ height: window.innerHeight,
14
+ isMobile: /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) || window.innerWidth < i.sm,
15
+ isTab: window.innerWidth >= i.md
16
+ });
17
+ }
18
+ }));
19
+ export {
20
+ i as BREAKPOINTS,
21
+ o as viewPortStore
22
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("@gardenfi/garden-book"),o=({chain:t,className:a})=>e.createElement("div",{className:"absolute z-50 mx-auto -mt-[84px]"},e.createElement("div",{className:"absolute left-1/2 z-50 mt-6 h-3 w-3 -translate-x-1/2 rotate-45 rounded-sm bg-white"}),e.createElement("div",{className:`flex text-nowrap rounded-2xl bg-white px-3 py-2 shadow-custom ${a}`},e.createElement(r.Typography,{size:"h5",weight:"medium",className:"text-center !text-dark-grey"},t)));exports.ChainsTooltip=o;
@@ -0,0 +1,20 @@
1
+ import e from "react";
2
+ import { Typography as r } from "@gardenfi/garden-book";
3
+ const s = ({ chain: t, className: a }) => /* @__PURE__ */ e.createElement("div", { className: "absolute z-50 mx-auto -mt-[84px]" }, /* @__PURE__ */ e.createElement("div", { className: "absolute left-1/2 z-50 mt-6 h-3 w-3 -translate-x-1/2 rotate-45 rounded-sm bg-white" }), /* @__PURE__ */ e.createElement(
4
+ "div",
5
+ {
6
+ className: `flex text-nowrap rounded-2xl bg-white px-3 py-2 shadow-custom ${a}`
7
+ },
8
+ /* @__PURE__ */ e.createElement(
9
+ r,
10
+ {
11
+ size: "h5",
12
+ weight: "medium",
13
+ className: "text-center !text-dark-grey"
14
+ },
15
+ t
16
+ )
17
+ ));
18
+ export {
19
+ s as ChainsTooltip
20
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),a=require("@gardenfi/garden-book"),c=require("framer-motion"),x=require("./index23.cjs"),y=({show:n,chains:i,hide:m,onClick:u})=>{const[l,f]=e.useState(""),p=e.useRef(null),{isMobile:r}=x.viewPortStore(),d={initial:{x:"100%",opacity:0},animate:{x:n?0:"100%",opacity:n?1:0},transition:{type:"tween",ease:"easeInOut",stiffness:200,damping:25,mass:.8,duration:.4}},h={initial:{y:"100%",opacity:0},animate:{y:n?0:"100%",opacity:n?1:0},transition:{type:"tween",ease:"easeInOut",stiffness:200,damping:25,mass:.8,duration:.4}},o=e.useMemo(()=>l?i.filter(t=>t.chainName.toLowerCase().includes(l.toLowerCase())).sort((t,s)=>t.chainName.localeCompare(s.chainName)):i.sort((t,s)=>t.chainName.localeCompare(s.chainName)),[i,l]),g=t=>{f(t.target.value)};return e.createElement(c.AnimatePresence,null,e.createElement(c.motion.div,{...r?h:d,className:`absolute left-0 top-0 z-50 w-full rounded-[16px] p-3 ${r?"pt-7":""}`},e.createElement("div",{className:"transition-left left-auto top-60 z-40 m-1 flex w-full flex-col gap-3 pr-2 duration-700 ease-cubic-in-out"},e.createElement("div",{className:"flex items-center justify-between p-1"},e.createElement(a.Typography,{size:"h4",weight:"medium"},"Select chain"),e.createElement(a.ArrowLeftIcon,{onClick:m,className:"cursor-pointer"})),e.createElement("div",{className:"flex w-full items-center justify-between rounded-2xl bg-white/50 px-4 py-[10px]"},e.createElement("div",{className:"flex flex-grow items-center"},e.createElement(a.Typography,{size:"h4",weight:"medium",className:"gf-w-full"},e.createElement("input",{ref:p,className:"w-full bg-transparent outline-none placeholder:text-mid-grey focus:outline-none",type:"text",value:l,placeholder:"Search chains",onChange:g}))),e.createElement(a.SearchIcon,null)),e.createElement("div",{className:"flex h-full max-h-[388px] flex-col overflow-auto rounded-2xl bg-white"},e.createElement(a.GradientScroll,{height:r?384:376,gradientHeight:42,className:"rounded-2xl"},e.createElement("div",{className:"flex w-full flex-col pb-2 pt-2"},o.length>0?o.map(t=>e.createElement("div",{key:t.chainId,className:"flex w-full cursor-pointer items-center justify-between hover:bg-off-white",onClick:()=>u(t)},e.createElement("div",{className:"flex w-full items-center gap-4 px-[14px] py-2"},e.createElement("img",{src:t.iconUrl,alt:t.chainName,className:"h-5 w-5 rounded-full"}),e.createElement(a.Typography,{size:"h5",breakpoints:{sm:"h4"},weight:"regular"},t.chainName)))):e.createElement("div",{className:"flex min-h-[334px] w-full items-center justify-center"},e.createElement(a.Typography,{size:"h4",weight:"medium",className:"text-center text-mid-grey"},"No chains found."))))))))};exports.AvailableChainsSidebar=y;
@@ -0,0 +1,108 @@
1
+ import e, { useState as x, useRef as g, useMemo as w } from "react";
2
+ import { Typography as l, ArrowLeftIcon as N, SearchIcon as y, GradientScroll as E } from "@gardenfi/garden-book";
3
+ import { AnimatePresence as v, motion as b } from "framer-motion";
4
+ import { viewPortStore as C } from "./index23.js";
5
+ const k = ({
6
+ show: a,
7
+ chains: i,
8
+ hide: o,
9
+ onClick: m
10
+ }) => {
11
+ const [n, u] = x(""), f = g(null), { isMobile: r } = C(), p = {
12
+ initial: { x: "100%", opacity: 0 },
13
+ animate: {
14
+ x: a ? 0 : "100%",
15
+ opacity: a ? 1 : 0
16
+ },
17
+ transition: {
18
+ type: "tween",
19
+ ease: "easeInOut",
20
+ stiffness: 200,
21
+ damping: 25,
22
+ mass: 0.8,
23
+ duration: 0.4
24
+ }
25
+ }, d = {
26
+ initial: { y: "100%", opacity: 0 },
27
+ animate: {
28
+ y: a ? 0 : "100%",
29
+ opacity: a ? 1 : 0
30
+ },
31
+ transition: {
32
+ type: "tween",
33
+ ease: "easeInOut",
34
+ stiffness: 200,
35
+ damping: 25,
36
+ mass: 0.8,
37
+ duration: 0.4
38
+ }
39
+ }, c = w(() => n ? i.filter((t) => t.chainName.toLowerCase().includes(n.toLowerCase())).sort((t, s) => t.chainName.localeCompare(s.chainName)) : i.sort((t, s) => t.chainName.localeCompare(s.chainName)), [i, n]), h = (t) => {
40
+ u(t.target.value);
41
+ };
42
+ return /* @__PURE__ */ e.createElement(v, null, /* @__PURE__ */ e.createElement(
43
+ b.div,
44
+ {
45
+ ...r ? d : p,
46
+ className: `absolute left-0 top-0 z-50 w-full rounded-[16px] p-3 ${r ? "pt-7" : ""}`
47
+ },
48
+ /* @__PURE__ */ e.createElement("div", { className: "transition-left left-auto top-60 z-40 m-1 flex w-full flex-col gap-3 pr-2 duration-700 ease-cubic-in-out" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-between p-1" }, /* @__PURE__ */ e.createElement(l, { size: "h4", weight: "medium" }, "Select chain"), /* @__PURE__ */ e.createElement(N, { onClick: o, className: "cursor-pointer" })), /* @__PURE__ */ e.createElement("div", { className: "flex w-full items-center justify-between rounded-2xl bg-white/50 px-4 py-[10px]" }, /* @__PURE__ */ e.createElement("div", { className: "flex flex-grow items-center" }, /* @__PURE__ */ e.createElement(l, { size: "h4", weight: "medium", className: "gf-w-full" }, /* @__PURE__ */ e.createElement(
49
+ "input",
50
+ {
51
+ ref: f,
52
+ className: "w-full bg-transparent outline-none placeholder:text-mid-grey focus:outline-none",
53
+ type: "text",
54
+ value: n,
55
+ placeholder: "Search chains",
56
+ onChange: h
57
+ }
58
+ ))), /* @__PURE__ */ e.createElement(y, null)), /* @__PURE__ */ e.createElement(
59
+ "div",
60
+ {
61
+ className: "flex h-full max-h-[388px] flex-col overflow-auto rounded-2xl bg-white"
62
+ },
63
+ /* @__PURE__ */ e.createElement(
64
+ E,
65
+ {
66
+ height: r ? 384 : 376,
67
+ gradientHeight: 42,
68
+ className: "rounded-2xl"
69
+ },
70
+ /* @__PURE__ */ e.createElement("div", { className: "flex w-full flex-col pb-2 pt-2" }, c.length > 0 ? c.map((t) => /* @__PURE__ */ e.createElement(
71
+ "div",
72
+ {
73
+ key: t.chainId,
74
+ className: "flex w-full cursor-pointer items-center justify-between hover:bg-off-white",
75
+ onClick: () => m(t)
76
+ },
77
+ /* @__PURE__ */ e.createElement("div", { className: "flex w-full items-center gap-4 px-[14px] py-2" }, /* @__PURE__ */ e.createElement(
78
+ "img",
79
+ {
80
+ src: t.iconUrl,
81
+ alt: t.chainName,
82
+ className: "h-5 w-5 rounded-full"
83
+ }
84
+ ), /* @__PURE__ */ e.createElement(
85
+ l,
86
+ {
87
+ size: "h5",
88
+ breakpoints: { sm: "h4" },
89
+ weight: "regular"
90
+ },
91
+ t.chainName
92
+ ))
93
+ )) : /* @__PURE__ */ e.createElement("div", { className: "flex min-h-[334px] w-full items-center justify-center" }, /* @__PURE__ */ e.createElement(
94
+ l,
95
+ {
96
+ size: "h4",
97
+ weight: "medium",
98
+ className: "text-center text-mid-grey"
99
+ },
100
+ "No chains found."
101
+ )))
102
+ )
103
+ ))
104
+ ));
105
+ };
106
+ export {
107
+ k as AvailableChainsSidebar
108
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),p=require("@gardenfi/garden-book"),x=require("./index30.cjs"),n=require("@gardenfi/orderbook"),b=require("./index6.cjs"),s=require("./index17.cjs"),O=require("./index5.cjs"),y=require("./index11.cjs"),M=a=>{switch(a){case n.OrderStatus.Created:return"Detecting deposit";case n.OrderStatus.Expired:return"Expired";case n.OrderStatus.Initiated:return"Deposit detected (0/1)";case n.OrderStatus.InitiateDetected:return"Deposit detected (0/1)";case n.OrderStatus.AwaitingRedeem:return"Redeeming";case n.OrderStatus.Refunded:case n.OrderStatus.AwaitingRefund:case n.OrderStatus.Redeemed:return"Completed";default:return"In progress..."}},q=({order:a,status:u,isLast:g,isFirst:f})=>{const{source_swap:o,destination_swap:c}=a,{allAssets:i}=b.assetInfoStore(),{currentNetwork:w}=O.swapStore(),t=e.useMemo(()=>s.getAssetFromSwap(o,i),[o,i]),r=e.useMemo(()=>s.getAssetFromSwap(c,i),[c,i]),d=e.useMemo(()=>u&&M(u),[u]),l=e.useMemo(()=>t&&s.formatAmount(o.amount,(t==null?void 0:t.decimals)??0,Math.min(t.decimals,8)),[o.amount,t]),m=e.useMemo(()=>r&&s.formatAmount(c.amount,(r==null?void 0:r.decimals)??0,Math.min(r.decimals,8)),[c.amount,r]),S=e.useMemo(()=>s.getDayDifference(a.created_at),[a.created_at]),h=()=>{if(a.order_id){const E=y.getApiEndpoint(w).explorer;window.open(`${E}/order/${a.order_id}`,"_blank")}};return!t||!r?null:e.createElement("div",null,!f&&e.createElement("div",{className:"h-px w-full bg-white/50"}),e.createElement("div",{className:`flex flex-col gap-1 p-4 ${g?"rounded-b-2xl":""} ${d!=="Expired"?"cursor-pointer hover:bg-white/50":""}`,onClick:h},e.createElement("div",{className:"flex flex-col gap-1"},l&&m&&e.createElement(x.SwapInfo,{sendAsset:t,receiveAsset:r,sendAmount:l,receiveAmount:m}),e.createElement("div",{className:"flex justify-between"},e.createElement(p.Typography,{size:"h5",weight:"regular"},d),e.createElement(p.Typography,{size:"h5",weight:"regular"},S)))))};exports.TransactionRow=q;
@@ -0,0 +1,85 @@
1
+ import r, { useMemo as o } from "react";
2
+ import { Typography as u } from "@gardenfi/garden-book";
3
+ import { SwapInfo as R } from "./index30.js";
4
+ import { OrderStatus as n } from "@gardenfi/orderbook";
5
+ import { assetInfoStore as _ } from "./index6.js";
6
+ import { getAssetFromSwap as f, formatAmount as g, getDayDifference as v } from "./index17.js";
7
+ import { swapStore as A } from "./index5.js";
8
+ import { getApiEndpoint as S } from "./index11.js";
9
+ const y = (a) => {
10
+ switch (a) {
11
+ case n.Created:
12
+ return "Detecting deposit";
13
+ case n.Expired:
14
+ return "Expired";
15
+ case n.Initiated:
16
+ return "Deposit detected (0/1)";
17
+ case n.InitiateDetected:
18
+ return "Deposit detected (0/1)";
19
+ case n.AwaitingRedeem:
20
+ return "Redeeming";
21
+ case n.Refunded:
22
+ case n.AwaitingRefund:
23
+ case n.Redeemed:
24
+ return "Completed";
25
+ default:
26
+ return "In progress...";
27
+ }
28
+ }, L = ({
29
+ order: a,
30
+ status: m,
31
+ isLast: w,
32
+ isFirst: h
33
+ }) => {
34
+ const { source_swap: i, destination_swap: c } = a, { allAssets: s } = _(), { currentNetwork: x } = A(), e = o(
35
+ () => f(i, s),
36
+ [i, s]
37
+ ), t = o(
38
+ () => f(c, s),
39
+ [c, s]
40
+ ), l = o(
41
+ () => m && y(m),
42
+ [m]
43
+ ), d = o(
44
+ () => e && g(
45
+ i.amount,
46
+ (e == null ? void 0 : e.decimals) ?? 0,
47
+ Math.min(e.decimals, 8)
48
+ ),
49
+ [i.amount, e]
50
+ ), p = o(
51
+ () => t && g(
52
+ c.amount,
53
+ (t == null ? void 0 : t.decimals) ?? 0,
54
+ Math.min(t.decimals, 8)
55
+ ),
56
+ [c.amount, t]
57
+ ), E = o(
58
+ () => v(a.created_at),
59
+ [a.created_at]
60
+ ), b = () => {
61
+ if (a.order_id) {
62
+ const D = S(x).explorer;
63
+ window.open(`${D}/order/${a.order_id}`, "_blank");
64
+ }
65
+ };
66
+ return !e || !t ? null : /* @__PURE__ */ r.createElement("div", null, !h && /* @__PURE__ */ r.createElement("div", { className: "h-px w-full bg-white/50" }), /* @__PURE__ */ r.createElement(
67
+ "div",
68
+ {
69
+ className: `flex flex-col gap-1 p-4 ${w ? "rounded-b-2xl" : ""} ${l !== "Expired" ? "cursor-pointer hover:bg-white/50" : ""}`,
70
+ onClick: b
71
+ },
72
+ /* @__PURE__ */ r.createElement("div", { className: "flex flex-col gap-1" }, d && p && /* @__PURE__ */ r.createElement(
73
+ R,
74
+ {
75
+ sendAsset: e,
76
+ receiveAsset: t,
77
+ sendAmount: d,
78
+ receiveAmount: p
79
+ }
80
+ ), /* @__PURE__ */ r.createElement("div", { className: "flex justify-between" }, /* @__PURE__ */ r.createElement(u, { size: "h5", weight: "regular" }, l), /* @__PURE__ */ r.createElement(u, { size: "h5", weight: "regular" }, E)))
81
+ ));
82
+ };
83
+ export {
84
+ L as TransactionRow
85
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),l=()=>{const t=()=>e.createElement("div",{className:"flex flex-col gap-1 pb-4"},e.createElement("div",{className:"flex justify-between gap-4"},e.createElement("div",{className:"h-6 w-24 animate-pulse rounded-md bg-gray-200"}),e.createElement("div",{className:"h-6 w-6 animate-pulse rounded-full bg-gray-200"}),e.createElement("div",{className:"h-6 w-24 animate-pulse rounded-md bg-gray-200"})),e.createElement("div",{className:"flex justify-between"},e.createElement("div",{className:"h-4 w-28 animate-pulse rounded-md bg-gray-200"}),e.createElement("div",{className:"h-4 w-20 animate-pulse rounded-md bg-gray-200"})));return e.createElement("div",{className:"flex flex-col"},Array.from({length:4}).map((n,a)=>e.createElement("div",{key:a,className:`bg-white/50 p-4 ${a===3?"rounded-b-2xl":""}`},t())))};exports.TransactionsSkeleton=l;
@@ -0,0 +1,15 @@
1
+ import e from "react";
2
+ const r = () => {
3
+ const t = () => /* @__PURE__ */ e.createElement("div", { className: "flex flex-col gap-1 pb-4" }, /* @__PURE__ */ e.createElement("div", { className: "flex justify-between gap-4" }, /* @__PURE__ */ e.createElement("div", { className: "h-6 w-24 animate-pulse rounded-md bg-gray-200" }), /* @__PURE__ */ e.createElement("div", { className: "h-6 w-6 animate-pulse rounded-full bg-gray-200" }), /* @__PURE__ */ e.createElement("div", { className: "h-6 w-24 animate-pulse rounded-md bg-gray-200" })), /* @__PURE__ */ e.createElement("div", { className: "flex justify-between" }, /* @__PURE__ */ e.createElement("div", { className: "h-4 w-28 animate-pulse rounded-md bg-gray-200" }), /* @__PURE__ */ e.createElement("div", { className: "h-4 w-20 animate-pulse rounded-md bg-gray-200" })));
4
+ return /* @__PURE__ */ e.createElement("div", { className: "flex flex-col" }, Array.from({ length: 4 }).map((l, a) => /* @__PURE__ */ e.createElement(
5
+ "div",
6
+ {
7
+ key: a,
8
+ className: `bg-white/50 p-4 ${a === 3 ? "rounded-b-2xl" : ""}`
9
+ },
10
+ t()
11
+ )));
12
+ };
13
+ export {
14
+ r as TransactionsSkeleton
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={initial:{opacity:0},animate:{opacity:1,transition:{duration:.2,ease:"easeInOut"}},exit:{opacity:0,transition:{duration:.2,ease:"easeInOut"}}},a={initial:{opacity:0,height:0},animate:{opacity:1,height:"auto",transition:{duration:.4,opacity:{delay:.23,ease:"easeOut"},ease:"easeOut"}},exit:{opacity:0,height:0,transition:{duration:.2,height:{delay:.23,ease:"easeOut"},ease:"easeOut"}}},i={initial:{opacity:0,height:0},animate:{opacity:1,height:"auto",transition:{duration:.3,ease:"easeInOut"}},exit:{opacity:0,height:0,transition:{duration:.15,ease:"easeInOut"}}};exports.delayedFadeAnimation=t;exports.expandAnimation=i;exports.expandWithDelayAnimation=a;
@@ -0,0 +1,54 @@
1
+ const t = {
2
+ initial: { opacity: 0 },
3
+ animate: {
4
+ opacity: 1,
5
+ transition: { duration: 0.2, ease: "easeInOut" }
6
+ },
7
+ exit: {
8
+ opacity: 0,
9
+ transition: { duration: 0.2, ease: "easeInOut" }
10
+ }
11
+ }, a = {
12
+ initial: { opacity: 0, height: 0 },
13
+ animate: {
14
+ opacity: 1,
15
+ height: "auto",
16
+ transition: {
17
+ duration: 0.4,
18
+ opacity: { delay: 0.23, ease: "easeOut" },
19
+ ease: "easeOut"
20
+ }
21
+ },
22
+ exit: {
23
+ opacity: 0,
24
+ height: 0,
25
+ transition: {
26
+ duration: 0.2,
27
+ height: { delay: 0.23, ease: "easeOut" },
28
+ ease: "easeOut"
29
+ }
30
+ }
31
+ }, i = {
32
+ initial: { opacity: 0, height: 0 },
33
+ animate: {
34
+ opacity: 1,
35
+ height: "auto",
36
+ transition: {
37
+ duration: 0.3,
38
+ ease: "easeInOut"
39
+ }
40
+ },
41
+ exit: {
42
+ opacity: 0,
43
+ height: 0,
44
+ transition: {
45
+ duration: 0.15,
46
+ ease: "easeInOut"
47
+ }
48
+ }
49
+ };
50
+ export {
51
+ t as delayedFadeAnimation,
52
+ i as expandAnimation,
53
+ a as expandWithDelayAnimation
54
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("@gardenfi/garden-book"),a=require("framer-motion"),r=require("./index28.cjs"),d=require("./index5.cjs"),o=require("./index31.cjs"),g=require("./index17.cjs"),u=({refundAddress:i,receiveAddress:s,showComparison:m,networkFeesValue:c})=>{const{outputAsset:l,outputAmount:p}=d.swapStore();return e.createElement(a.motion.div,{className:"flex flex-col",...r.expandWithDelayAnimation},e.createElement("div",{className:"h-full"},e.createElement("div",{className:"flex items-center justify-between px-4 pt-1"},e.createElement("div",{className:"flex items-center gap-1"},e.createElement(t.Typography,{size:"h5",weight:"regular",className:"!text-mid-grey"},"Network fee")),e.createElement("div",{className:"flex gap-5 py-1"},e.createElement(t.Typography,{size:"h5",weight:"regular"},c===0?"Free":"$"+c))),e.createElement("div",{className:"flex items-center justify-between px-4"},e.createElement("div",{className:"flex items-center gap-1"},e.createElement(t.Typography,{size:"h5",weight:"regular",className:"!text-mid-grey"},"Minimum received")),e.createElement("div",{className:"flex gap-5 py-1"},e.createElement(t.Typography,{size:"h5",weight:"regular"},p," ",l==null?void 0:l.symbol))),(s||i)&&e.createElement(e.Fragment,null,e.createElement("div",{className:"flex flex-col items-stretch justify-center"},s&&e.createElement(o.AddressDetails,{address:s}),i&&e.createElement(o.AddressDetails,{address:i,isRefund:!0})))),e.createElement(a.AnimatePresence,{mode:"wait"},e.createElement(a.motion.div,{...r.expandAnimation},e.createElement("div",{className:"z-10",...r.expandAnimation}),e.createElement(a.motion.div,{key:"time-saved",...r.expandAnimation,className:"h-full w-full"},e.createElement("div",{className:"relative z-10 flex cursor-pointer items-center justify-between gap-0 px-4 py-[3px] transition-all duration-200 ease-in-out hover:bg-white",onClick:n=>{n.stopPropagation(),m("time")}},e.createElement(t.Typography,{size:"h5",weight:"regular",className:"!text-mid-grey"},"Time saved"),e.createElement("div",{className:"flex gap-5"},e.createElement(t.Typography,{size:"h4",weight:"regular",className:" !text-light-green"},g.formatTime(2e4))))),e.createElement(a.motion.div,{key:"cost-saved",...r.expandAnimation,className:"w-full"},e.createElement("div",{className:"flex cursor-pointer items-center justify-between gap-0 px-4 py-[3px] transition-all duration-200 ease-in-out hover:bg-white",onClick:n=>{n.stopPropagation(),m("fees")}},e.createElement(t.Typography,{size:"h5",weight:"regular",className:"!text-mid-grey"},"Cost saved"),e.createElement("div",{className:"flex gap-5"},e.createElement(t.Typography,{size:"h4",weight:"regular",className:"!text-light-green"},`$${g.formatAmount(5e3,0,2)}`)))))))};exports.SwapSavingsAndAddresses=u;
@@ -0,0 +1,63 @@
1
+ import e from "react";
2
+ import { Typography as t } from "@gardenfi/garden-book";
3
+ import { motion as a, AnimatePresence as p } from "framer-motion";
4
+ import { expandWithDelayAnimation as f, expandAnimation as l } from "./index28.js";
5
+ import { swapStore as d } from "./index5.js";
6
+ import { AddressDetails as o } from "./index31.js";
7
+ import { formatTime as x, formatAmount as E } from "./index17.js";
8
+ const b = ({
9
+ refundAddress: r,
10
+ receiveAddress: m,
11
+ showComparison: n,
12
+ networkFeesValue: c
13
+ }) => {
14
+ const { outputAsset: i, outputAmount: g } = d();
15
+ return /* @__PURE__ */ e.createElement(a.div, { className: "flex flex-col", ...f }, /* @__PURE__ */ e.createElement("div", { className: "h-full" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-between px-4 pt-1" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular", className: "!text-mid-grey" }, "Network fee")), /* @__PURE__ */ e.createElement("div", { className: "flex gap-5 py-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular" }, c === 0 ? "Free" : "$" + c))), /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-between px-4" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular", className: "!text-mid-grey" }, "Minimum received")), /* @__PURE__ */ e.createElement("div", { className: "flex gap-5 py-1" }, /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular" }, g, " ", i == null ? void 0 : i.symbol))), (m || r) && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: "flex flex-col items-stretch justify-center" }, m && /* @__PURE__ */ e.createElement(o, { address: m }), r && /* @__PURE__ */ e.createElement(o, { address: r, isRefund: !0 })))), /* @__PURE__ */ e.createElement(p, { mode: "wait" }, /* @__PURE__ */ e.createElement(a.div, { ...l }, /* @__PURE__ */ e.createElement("div", { className: "z-10", ...l }), /* @__PURE__ */ e.createElement(
16
+ a.div,
17
+ {
18
+ key: "time-saved",
19
+ ...l,
20
+ className: "h-full w-full"
21
+ },
22
+ /* @__PURE__ */ e.createElement(
23
+ "div",
24
+ {
25
+ className: "relative z-10 flex cursor-pointer items-center justify-between gap-0 px-4 py-[3px] transition-all duration-200 ease-in-out hover:bg-white",
26
+ onClick: (s) => {
27
+ s.stopPropagation(), n("time");
28
+ }
29
+ },
30
+ /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular", className: "!text-mid-grey" }, "Time saved"),
31
+ /* @__PURE__ */ e.createElement("div", { className: "flex gap-5" }, /* @__PURE__ */ e.createElement(
32
+ t,
33
+ {
34
+ size: "h4",
35
+ weight: "regular",
36
+ className: " !text-light-green"
37
+ },
38
+ x(2e4)
39
+ ))
40
+ )
41
+ ), /* @__PURE__ */ e.createElement(a.div, { key: "cost-saved", ...l, className: "w-full" }, /* @__PURE__ */ e.createElement(
42
+ "div",
43
+ {
44
+ className: "flex cursor-pointer items-center justify-between gap-0 px-4 py-[3px] transition-all duration-200 ease-in-out hover:bg-white",
45
+ onClick: (s) => {
46
+ s.stopPropagation(), n("fees");
47
+ }
48
+ },
49
+ /* @__PURE__ */ e.createElement(t, { size: "h5", weight: "regular", className: "!text-mid-grey" }, "Cost saved"),
50
+ /* @__PURE__ */ e.createElement("div", { className: "flex gap-5" }, /* @__PURE__ */ e.createElement(
51
+ t,
52
+ {
53
+ size: "h4",
54
+ weight: "regular",
55
+ className: "!text-light-green"
56
+ },
57
+ `$${E(5e3, 0, 2)}`
58
+ ))
59
+ )))));
60
+ };
61
+ export {
62
+ b as SwapSavingsAndAddresses
63
+ };