@gearbox-protocol/ui-kit 3.14.0-next.2 → 3.14.0-next.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),I=require("class-variance-authority"),A=require("react"),ee=require("react-dom"),te=require("../currency-button/currency-button.cjs"),ne=require("@fortawesome/free-solid-svg-icons"),re=require("../icons/fa-icon.cjs"),y=require("../../hooks/use-media-query.cjs"),h=require("../../test-ids/smart-number-input.cjs"),se=require("../../utils/bn-to-input-view.cjs");require("@gearbox-protocol/sdk");const ae=require("../../utils/parse-input-to-bn.cjs"),w=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../utils/z-index.cjs");const oe=require("./balance-indicator.cjs");function ie(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const i in o)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(o,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>o[i]})}}return r.default=o,Object.freeze(r)}const a=ie(A),ce=I.cva("relative w-full text-foreground bg-gray-20 border border-gray-30 transition-[background-color] duration-100 ease-linear [&:hover]:bg-gray-30 [&:hover]:border-gray-40 data-[active=true]:bg-gray-30 data-[active=true]:outline data-[active=true]:outline-2 data-[active=true]:outline-primary data-[active=true]:outline-offset-[-2px] data-[disabled=true]:cursor-not-allowed",{variants:{size:{sm:"px-3 py-[7px] h-[60px] rounded-[8px]",md:"pl-4 pr-3 py-[10px] h-[82px] rounded-lg"}},defaultVariants:{size:"md"}}),ue=I.cva("font-medium text-foreground",{variants:{size:{sm:"text-xs",md:"text-sm"}},defaultVariants:{size:"md"}}),le=I.cva("w-full p-0 bg-transparent border-none outline-none text-foreground placeholder:text-secondary-foreground focus:outline-none",{variants:{size:{sm:"text-[18px]! leading-[21px]!",md:"text-[28px]! leading-[33px]!"}},defaultVariants:{size:"md"}}),_=a.forwardRef(({amount:o,token:r,label:i="Amount",maxAmount:s,maxAmountLimit:x,maxButtonLabel:k,chainId:B,network:L,maxButton:M=!0,disabled:c=!1,active:S=!1,size:T="md",symbolMaxLength:V,tokenOptions:b,onSetAmount:l,onShowSelectDialog:N,onRemove:j,onFocus:E,onBlur:R},O)=>{const q=r?.decimals??18,D=e=>{const n=e.target.value,[m,g]=ae.parseInputToBN(n,q);m===null||g===null||l&&l(m,g)},F=()=>{if(l){const e=s&&x&&s>x?x:s||0n,n=se.bnToInputView(e,q);l(e,n)}},[P,z]=a.useState(!1),W=()=>{z(!0),E?.()},Q=()=>{z(!1),R?.()},d=T??"md",X=y.useIsMobile(),$=y.useIsTablet(),G=y.useIsDesktop(),H=V??(X?20:$?30:G?22:30),[u,v]=a.useState(!1),f=a.useRef(null),C=a.useRef(null),[J,K]=a.useState({});a.useLayoutEffect(()=>{if(!u||!f.current)return;const e=()=>{const n=f.current?.getBoundingClientRect();n&&K({position:"fixed",top:n.bottom+4,right:window.innerWidth-n.right,minWidth:n.width,zIndex:9999})};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[u]),a.useEffect(()=>{if(!u)return;const e=n=>{const m=n.target,g=f.current?.contains(m),Z=C.current?.contains(m);!g&&!Z&&v(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[u]);const p=!!(b&&b.length>0),U=!c&&p?()=>v(e=>!e):N,Y=!!(r||N||p);return t.jsxs("div",{ref:O,className:ce({size:d}),"data-testid":h.smartNumberInputTestIds.root,"data-active":P,"data-disabled":c,children:[j&&t.jsx("div",{className:"absolute top-0 right-0 flex h-5 w-5 translate-x-1/2 -translate-y-1/2 items-center justify-center","data-testid":h.smartNumberInputTestIds.close,children:t.jsx("button",{type:"button",onClick:j,className:"flex h-5 w-5 items-center justify-center rounded-full bg-muted hover:bg-muted/80 text-muted-foreground",children:t.jsx(re.FaIcon,{icon:ne.faXmark,className:"size-3"})})}),t.jsxs("div",{className:"mb-2 flex justify-between text-sm leading-[120%]",children:[t.jsx("span",{className:w.cn(ue({size:d}),"grow shrink-0 basis-0"),"data-testid":h.smartNumberInputTestIds.label,children:i}),s!==void 0&&r&&t.jsx(oe.BalanceIndicator,{title:k,token:r,maxAmount:s,size:d,disabled:c,maxButton:M,onMaxButtonClick:F})]}),t.jsxs("div",{className:w.cn("flex w-full max-w-full shrink-0 basis-full items-center"),children:[t.jsx("div",{className:"mr-3 grow shrink-0 basis-0",children:t.jsx("input",{type:"text",inputMode:"decimal",autoComplete:"off",autoCorrect:"off",spellCheck:"false",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:"0",value:o,onChange:D,onFocus:W,onBlur:Q,disabled:c||!l,className:w.cn(le({size:d}),c&&"cursor-not-allowed"),"data-testid":h.smartNumberInputTestIds.input,minLength:1,maxLength:79,title:"Amount"})}),Y?t.jsxs("div",{ref:f,className:"shrink-0",children:[t.jsx(te.CurrencyButton,{active:p?u:S,size:d,disabled:c,token:r,showSelectDialog:U,chainId:B,network:L,maxLength:H,children:r?.symbol??"Select token"}),p&&u&&ee.createPortal(t.jsx("div",{ref:C,style:J,className:"overflow-hidden rounded-lg border border-gray-30 bg-gray-20 shadow-lg",children:b?.map((e,n)=>t.jsxs("button",{type:"button",onClick:()=>{e.onSelect(),v(!1)},className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-gray-30 text-left",children:[e.icon?t.jsx("span",{className:"inline-flex shrink-0 items-center",children:e.icon}):null,t.jsx("span",{className:"truncate",children:e.label})]},n))}),document.body)]}):null]})]})});_.displayName="SmartNumberInput";exports.SmartNumberInput=_;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cva as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cva as b } from "class-variance-authority";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { createPortal as _ } from "react-dom";
|
|
5
|
+
import { CurrencyButton as A } from "../currency-button/currency-button.js";
|
|
6
|
+
import { faXmark as ee } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
+
import { FaIcon as te } from "../icons/fa-icon.js";
|
|
8
|
+
import { useIsMobile as re, useIsTablet as ne, useIsDesktop as se } from "../../hooks/use-media-query.js";
|
|
9
|
+
import { smartNumberInputTestIds as h } from "../../test-ids/smart-number-input.js";
|
|
10
|
+
import { bnToInputView as oe } from "../../utils/bn-to-input-view.js";
|
|
10
11
|
import "@gearbox-protocol/sdk";
|
|
11
|
-
import { parseInputToBN as
|
|
12
|
-
import { cn as
|
|
12
|
+
import { parseInputToBN as ae } from "../../utils/parse-input-to-bn.js";
|
|
13
|
+
import { cn as w } from "../../utils/cn.js";
|
|
13
14
|
import "sonner";
|
|
14
15
|
import "@gearbox-protocol/sdk/common-utils";
|
|
15
16
|
import "luxon";
|
|
16
17
|
import "../../utils/z-index.js";
|
|
17
|
-
import { BalanceIndicator as
|
|
18
|
-
const
|
|
18
|
+
import { BalanceIndicator as ie } from "./balance-indicator.js";
|
|
19
|
+
const le = b(
|
|
19
20
|
"relative w-full text-foreground bg-gray-20 border border-gray-30 transition-[background-color] duration-100 ease-linear [&:hover]:bg-gray-30 [&:hover]:border-gray-40 data-[active=true]:bg-gray-30 data-[active=true]:outline data-[active=true]:outline-2 data-[active=true]:outline-primary data-[active=true]:outline-offset-[-2px] data-[disabled=true]:cursor-not-allowed",
|
|
20
21
|
{
|
|
21
22
|
variants: {
|
|
@@ -26,7 +27,7 @@ const Y = m(
|
|
|
26
27
|
},
|
|
27
28
|
defaultVariants: { size: "md" }
|
|
28
29
|
}
|
|
29
|
-
),
|
|
30
|
+
), ce = b("font-medium text-foreground", {
|
|
30
31
|
variants: {
|
|
31
32
|
size: {
|
|
32
33
|
sm: "text-xs",
|
|
@@ -34,7 +35,7 @@ const Y = m(
|
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
37
|
defaultVariants: { size: "md" }
|
|
37
|
-
}),
|
|
38
|
+
}), de = b(
|
|
38
39
|
"w-full p-0 bg-transparent border-none outline-none text-foreground placeholder:text-secondary-foreground focus:outline-none",
|
|
39
40
|
{
|
|
40
41
|
variants: {
|
|
@@ -45,97 +46,123 @@ const Y = m(
|
|
|
45
46
|
},
|
|
46
47
|
defaultVariants: { size: "md" }
|
|
47
48
|
}
|
|
48
|
-
),
|
|
49
|
+
), ue = n.forwardRef(
|
|
49
50
|
({
|
|
50
|
-
amount:
|
|
51
|
-
token:
|
|
52
|
-
label:
|
|
53
|
-
maxAmount:
|
|
54
|
-
maxAmountLimit:
|
|
55
|
-
maxButtonLabel:
|
|
56
|
-
chainId:
|
|
57
|
-
network:
|
|
58
|
-
maxButton:
|
|
59
|
-
disabled:
|
|
60
|
-
active:
|
|
61
|
-
size:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
51
|
+
amount: I,
|
|
52
|
+
token: s,
|
|
53
|
+
label: k = "Amount",
|
|
54
|
+
maxAmount: i,
|
|
55
|
+
maxAmountLimit: g,
|
|
56
|
+
maxButtonLabel: B,
|
|
57
|
+
chainId: M,
|
|
58
|
+
network: V,
|
|
59
|
+
maxButton: E = !0,
|
|
60
|
+
disabled: o = !1,
|
|
61
|
+
active: R = !1,
|
|
62
|
+
size: S = "md",
|
|
63
|
+
symbolMaxLength: T,
|
|
64
|
+
tokenOptions: x,
|
|
65
|
+
onSetAmount: l,
|
|
66
|
+
onShowSelectDialog: y,
|
|
67
|
+
onRemove: N,
|
|
68
|
+
onFocus: j,
|
|
69
|
+
onBlur: F
|
|
70
|
+
}, D) => {
|
|
71
|
+
const z = s?.decimals ?? 18, W = (e) => {
|
|
72
|
+
const t = e.target.value, [d, p] = ae(t, z);
|
|
73
|
+
d === null || p === null || l && l(d, p);
|
|
74
|
+
}, O = () => {
|
|
75
|
+
if (l) {
|
|
76
|
+
const e = i && g && i > g ? g : i || 0n, t = oe(e, z);
|
|
77
|
+
l(e, t);
|
|
75
78
|
}
|
|
76
|
-
}, [
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
79
|
+
}, [P, C] = n.useState(!1), X = () => {
|
|
80
|
+
C(!0), j?.();
|
|
81
|
+
}, $ = () => {
|
|
82
|
+
C(!1), F?.();
|
|
83
|
+
}, c = S ?? "md", q = re(), G = ne(), H = se(), J = T ?? (q ? 20 : G ? 30 : H ? 22 : 30), [a, v] = n.useState(!1), m = n.useRef(null), L = n.useRef(null), [K, Q] = n.useState({});
|
|
84
|
+
n.useLayoutEffect(() => {
|
|
85
|
+
if (!a || !m.current) return;
|
|
86
|
+
const e = () => {
|
|
87
|
+
const t = m.current?.getBoundingClientRect();
|
|
88
|
+
t && Q({
|
|
89
|
+
position: "fixed",
|
|
90
|
+
top: t.bottom + 4,
|
|
91
|
+
right: window.innerWidth - t.right,
|
|
92
|
+
minWidth: t.width,
|
|
93
|
+
zIndex: 9999
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
97
|
+
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
98
|
+
};
|
|
99
|
+
}, [a]), n.useEffect(() => {
|
|
100
|
+
if (!a) return;
|
|
101
|
+
const e = (t) => {
|
|
102
|
+
const d = t.target, p = m.current?.contains(d), Z = L.current?.contains(d);
|
|
103
|
+
!p && !Z && v(!1);
|
|
104
|
+
};
|
|
105
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
106
|
+
}, [a]);
|
|
107
|
+
const f = !!(x && x.length > 0), U = !o && f ? () => v((e) => !e) : y, Y = !!(s || y || f);
|
|
108
|
+
return /* @__PURE__ */ u(
|
|
82
109
|
"div",
|
|
83
110
|
{
|
|
84
|
-
ref:
|
|
85
|
-
className:
|
|
86
|
-
"data-testid":
|
|
87
|
-
"data-active":
|
|
88
|
-
"data-disabled":
|
|
111
|
+
ref: D,
|
|
112
|
+
className: le({ size: c }),
|
|
113
|
+
"data-testid": h.root,
|
|
114
|
+
"data-active": P,
|
|
115
|
+
"data-disabled": o,
|
|
89
116
|
children: [
|
|
90
|
-
|
|
117
|
+
N && /* @__PURE__ */ r(
|
|
91
118
|
"div",
|
|
92
119
|
{
|
|
93
120
|
className: "absolute top-0 right-0 flex h-5 w-5 translate-x-1/2 -translate-y-1/2 items-center justify-center",
|
|
94
|
-
"data-testid":
|
|
95
|
-
children: /* @__PURE__ */
|
|
121
|
+
"data-testid": h.close,
|
|
122
|
+
children: /* @__PURE__ */ r(
|
|
96
123
|
"button",
|
|
97
124
|
{
|
|
98
125
|
type: "button",
|
|
99
|
-
onClick:
|
|
126
|
+
onClick: N,
|
|
100
127
|
className: "flex h-5 w-5 items-center justify-center rounded-full bg-muted hover:bg-muted/80 text-muted-foreground",
|
|
101
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ r(te, { icon: ee, className: "size-3" })
|
|
102
129
|
}
|
|
103
130
|
)
|
|
104
131
|
}
|
|
105
132
|
),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ u("div", { className: "mb-2 flex justify-between text-sm leading-[120%]", children: [
|
|
134
|
+
/* @__PURE__ */ r(
|
|
108
135
|
"span",
|
|
109
136
|
{
|
|
110
|
-
className:
|
|
111
|
-
|
|
137
|
+
className: w(
|
|
138
|
+
ce({ size: c }),
|
|
112
139
|
"grow shrink-0 basis-0"
|
|
113
140
|
),
|
|
114
|
-
"data-testid":
|
|
115
|
-
children:
|
|
141
|
+
"data-testid": h.label,
|
|
142
|
+
children: k
|
|
116
143
|
}
|
|
117
144
|
),
|
|
118
|
-
|
|
119
|
-
|
|
145
|
+
i !== void 0 && s && /* @__PURE__ */ r(
|
|
146
|
+
ie,
|
|
120
147
|
{
|
|
121
|
-
title:
|
|
122
|
-
token:
|
|
123
|
-
maxAmount:
|
|
124
|
-
size:
|
|
125
|
-
disabled:
|
|
126
|
-
maxButton:
|
|
127
|
-
onMaxButtonClick:
|
|
148
|
+
title: B,
|
|
149
|
+
token: s,
|
|
150
|
+
maxAmount: i,
|
|
151
|
+
size: c,
|
|
152
|
+
disabled: o,
|
|
153
|
+
maxButton: E,
|
|
154
|
+
onMaxButtonClick: O
|
|
128
155
|
}
|
|
129
156
|
)
|
|
130
157
|
] }),
|
|
131
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ u(
|
|
132
159
|
"div",
|
|
133
160
|
{
|
|
134
|
-
className:
|
|
161
|
+
className: w(
|
|
135
162
|
"flex w-full max-w-full shrink-0 basis-full items-center"
|
|
136
163
|
),
|
|
137
164
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ r("div", { className: "mr-3 grow shrink-0 basis-0", children: /* @__PURE__ */ r(
|
|
139
166
|
"input",
|
|
140
167
|
{
|
|
141
168
|
type: "text",
|
|
@@ -145,35 +172,63 @@ const Y = m(
|
|
|
145
172
|
spellCheck: "false",
|
|
146
173
|
pattern: "^[0-9]*[.,]?[0-9]*$",
|
|
147
174
|
placeholder: "0",
|
|
148
|
-
value:
|
|
149
|
-
onChange:
|
|
150
|
-
onFocus:
|
|
151
|
-
onBlur:
|
|
152
|
-
disabled:
|
|
153
|
-
className:
|
|
154
|
-
|
|
155
|
-
|
|
175
|
+
value: I,
|
|
176
|
+
onChange: W,
|
|
177
|
+
onFocus: X,
|
|
178
|
+
onBlur: $,
|
|
179
|
+
disabled: o || !l,
|
|
180
|
+
className: w(
|
|
181
|
+
de({ size: c }),
|
|
182
|
+
o && "cursor-not-allowed"
|
|
156
183
|
),
|
|
157
|
-
"data-testid":
|
|
184
|
+
"data-testid": h.input,
|
|
158
185
|
minLength: 1,
|
|
159
186
|
maxLength: 79,
|
|
160
187
|
title: "Amount"
|
|
161
188
|
}
|
|
162
189
|
) }),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
190
|
+
Y ? /* @__PURE__ */ u("div", { ref: m, className: "shrink-0", children: [
|
|
191
|
+
/* @__PURE__ */ r(
|
|
192
|
+
A,
|
|
193
|
+
{
|
|
194
|
+
active: f ? a : R,
|
|
195
|
+
size: c,
|
|
196
|
+
disabled: o,
|
|
197
|
+
token: s,
|
|
198
|
+
showSelectDialog: U,
|
|
199
|
+
chainId: M,
|
|
200
|
+
network: V,
|
|
201
|
+
maxLength: J,
|
|
202
|
+
children: s?.symbol ?? "Select token"
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
f && a && _(
|
|
206
|
+
/* @__PURE__ */ r(
|
|
207
|
+
"div",
|
|
208
|
+
{
|
|
209
|
+
ref: L,
|
|
210
|
+
style: K,
|
|
211
|
+
className: "overflow-hidden rounded-lg border border-gray-30 bg-gray-20 shadow-lg",
|
|
212
|
+
children: x?.map((e, t) => /* @__PURE__ */ u(
|
|
213
|
+
"button",
|
|
214
|
+
{
|
|
215
|
+
type: "button",
|
|
216
|
+
onClick: () => {
|
|
217
|
+
e.onSelect(), v(!1);
|
|
218
|
+
},
|
|
219
|
+
className: "flex w-full items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-gray-30 text-left",
|
|
220
|
+
children: [
|
|
221
|
+
e.icon ? /* @__PURE__ */ r("span", { className: "inline-flex shrink-0 items-center", children: e.icon }) : null,
|
|
222
|
+
/* @__PURE__ */ r("span", { className: "truncate", children: e.label })
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
t
|
|
226
|
+
))
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
document.body
|
|
230
|
+
)
|
|
231
|
+
] }) : null
|
|
177
232
|
]
|
|
178
233
|
}
|
|
179
234
|
)
|
|
@@ -182,7 +237,7 @@ const Y = m(
|
|
|
182
237
|
);
|
|
183
238
|
}
|
|
184
239
|
);
|
|
185
|
-
|
|
240
|
+
ue.displayName = "SmartNumberInput";
|
|
186
241
|
export {
|
|
187
|
-
|
|
242
|
+
ue as SmartNumberInput
|
|
188
243
|
};
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { TokenFullData } from '../../types/common';
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
export interface TokenOption {
|
|
5
|
+
/** Display label for this option. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Optional icon to display before the label. */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** Called when this option is selected. */
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
}
|
|
4
12
|
/** A-matching SmartNumberInput size for layout (styles.tsx). */
|
|
5
13
|
export type SmartNumberInputSize = "sm" | "md";
|
|
6
14
|
export interface SmartNumberInputProps {
|
|
@@ -28,6 +36,10 @@ export interface SmartNumberInputProps {
|
|
|
28
36
|
size?: SmartNumberInputSize;
|
|
29
37
|
/** When true, currency dropdown is open (expand icon rotated). */
|
|
30
38
|
active?: boolean;
|
|
39
|
+
/** Override max character length for token symbol display. When omitted, computed from viewport width. */
|
|
40
|
+
symbolMaxLength?: number;
|
|
41
|
+
/** Inline token options for dropdown selection (alternative to onShowSelectDialog). */
|
|
42
|
+
tokenOptions?: TokenOption[];
|
|
31
43
|
/** Callback when amount changes. Called with (value: bigint, valueView: string). */
|
|
32
44
|
onSetAmount?: (value: bigint, valueView: string) => void;
|
|
33
45
|
/** Callback to show token select dialog. */
|