@turtleclub/ui 0.2.0 → 0.3.0-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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +13 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +321 -323
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/src/components/molecules/swap-input.tsx +1 -1
- package/src/components/molecules/token-selector.tsx +26 -22
- package/src/components/ui/info-card.tsx +7 -18
- package/src/components/ui/opportunity-details-v1.tsx +4 -4
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { clsx as
|
|
2
|
-
import { twMerge as
|
|
3
|
-
import { jsxs as
|
|
1
|
+
import { clsx as U } from "clsx";
|
|
2
|
+
import { twMerge as X } from "tailwind-merge";
|
|
3
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
4
4
|
import * as b from "react";
|
|
5
|
-
import { useState as
|
|
5
|
+
import { useState as j, useEffect as q } from "react";
|
|
6
6
|
import { cva as N } from "class-variance-authority";
|
|
7
|
-
import * as
|
|
7
|
+
import * as J from "@radix-ui/react-label";
|
|
8
8
|
import * as C from "@radix-ui/react-scroll-area";
|
|
9
9
|
import * as v from "@radix-ui/react-select";
|
|
10
|
-
import { ChevronDownIcon as D, ChevronUpIcon as
|
|
10
|
+
import { ChevronDownIcon as D, ChevronUpIcon as Q, ExternalLinkIcon as ee, XIcon as te, CheckIcon as re, TurtleIcon as ae, ChevronDown as ne, ChevronsRight as oe, Edit3 as se } from "lucide-react";
|
|
11
11
|
import * as ie from "@radix-ui/react-separator";
|
|
12
12
|
import { useTheme as le } from "next-themes";
|
|
13
13
|
import { Toaster as de } from "sonner";
|
|
@@ -16,8 +16,8 @@ import * as H from "@radix-ui/react-toggle-group";
|
|
|
16
16
|
import * as ce from "@radix-ui/react-toggle";
|
|
17
17
|
import * as L from "@radix-ui/react-tooltip";
|
|
18
18
|
import { Slot as me } from "@radix-ui/react-slot";
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function i(...t) {
|
|
20
|
+
return X(U(t));
|
|
21
21
|
}
|
|
22
22
|
const A = N(
|
|
23
23
|
"flex w-full bg-transparent text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -50,26 +50,26 @@ const A = N(
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
), G = b.forwardRef(
|
|
53
|
-
({ className: t, variant: r, size: a, cursor:
|
|
53
|
+
({ className: t, variant: r, size: a, cursor: s, type: l, prompt: c, ...d }, n) => c ? /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
54
54
|
/* @__PURE__ */ e("span", { className: "text-primary text-sm font-medium shrink-0", children: c }),
|
|
55
55
|
/* @__PURE__ */ e(
|
|
56
56
|
"input",
|
|
57
57
|
{
|
|
58
|
-
type:
|
|
58
|
+
type: l,
|
|
59
59
|
"data-slot": "input",
|
|
60
|
-
className:
|
|
60
|
+
className: i(A({ variant: r, size: a, cursor: s, className: t })),
|
|
61
61
|
ref: n,
|
|
62
|
-
...
|
|
62
|
+
...d
|
|
63
63
|
}
|
|
64
64
|
)
|
|
65
65
|
] }) : /* @__PURE__ */ e(
|
|
66
66
|
"input",
|
|
67
67
|
{
|
|
68
|
-
type:
|
|
68
|
+
type: l,
|
|
69
69
|
"data-slot": "input",
|
|
70
|
-
className:
|
|
70
|
+
className: i(A({ variant: r, size: a, cursor: s, className: t })),
|
|
71
71
|
ref: n,
|
|
72
|
-
...
|
|
72
|
+
...d
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
75
|
);
|
|
@@ -79,10 +79,10 @@ function Ye({
|
|
|
79
79
|
...r
|
|
80
80
|
}) {
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
|
-
|
|
82
|
+
J.Root,
|
|
83
83
|
{
|
|
84
84
|
"data-slot": "label",
|
|
85
|
-
className:
|
|
85
|
+
className: i(
|
|
86
86
|
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
87
87
|
t
|
|
88
88
|
),
|
|
@@ -95,11 +95,11 @@ function ue({
|
|
|
95
95
|
children: r,
|
|
96
96
|
...a
|
|
97
97
|
}) {
|
|
98
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ o(
|
|
99
99
|
C.Root,
|
|
100
100
|
{
|
|
101
101
|
"data-slot": "scroll-area",
|
|
102
|
-
className:
|
|
102
|
+
className: i("relative overflow-hidden", t),
|
|
103
103
|
...a,
|
|
104
104
|
children: [
|
|
105
105
|
/* @__PURE__ */ e(
|
|
@@ -126,7 +126,7 @@ function fe({
|
|
|
126
126
|
{
|
|
127
127
|
"data-slot": "scroll-area-scrollbar",
|
|
128
128
|
orientation: r,
|
|
129
|
-
className:
|
|
129
|
+
className: i(
|
|
130
130
|
"flex touch-none p-px transition-colors select-none",
|
|
131
131
|
r === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
132
132
|
r === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
@@ -149,23 +149,23 @@ function pe({ ...t }) {
|
|
|
149
149
|
function Ze({ ...t }) {
|
|
150
150
|
return /* @__PURE__ */ e(v.Group, { "data-slot": "select-group", ...t });
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Ue({ ...t }) {
|
|
153
153
|
return /* @__PURE__ */ e(v.Value, { "data-slot": "select-value", ...t });
|
|
154
154
|
}
|
|
155
155
|
function xe({
|
|
156
156
|
className: t,
|
|
157
157
|
size: r = "default",
|
|
158
158
|
variant: a = "bordered",
|
|
159
|
-
children:
|
|
160
|
-
...
|
|
159
|
+
children: s,
|
|
160
|
+
...l
|
|
161
161
|
}) {
|
|
162
|
-
return /* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ o(
|
|
163
163
|
v.Trigger,
|
|
164
164
|
{
|
|
165
165
|
"data-slot": "select-trigger",
|
|
166
166
|
"data-size": r,
|
|
167
167
|
"data-variant": a,
|
|
168
|
-
className:
|
|
168
|
+
className: i(
|
|
169
169
|
// Turtle Design System - transparent trigger with wise white text
|
|
170
170
|
"flex w-fit items-center justify-between gap-2 bg-transparent px-3 py-2 text-sm text-foreground whitespace-nowrap transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 data-[size=xs]:h-8 data-[size=xs]:px-4 data-[size=xs]:py-2 data-[size=xs]:text-xs focus:ring-0",
|
|
171
171
|
// Border variants
|
|
@@ -176,9 +176,9 @@ function xe({
|
|
|
176
176
|
"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
177
177
|
t
|
|
178
178
|
),
|
|
179
|
-
...
|
|
179
|
+
...l,
|
|
180
180
|
children: [
|
|
181
|
-
|
|
181
|
+
s,
|
|
182
182
|
/* @__PURE__ */ e(v.Icon, { asChild: !0, children: /* @__PURE__ */ e(D, { className: "size-4 opacity-50" }) })
|
|
183
183
|
]
|
|
184
184
|
}
|
|
@@ -188,26 +188,26 @@ function he({
|
|
|
188
188
|
className: t,
|
|
189
189
|
children: r,
|
|
190
190
|
position: a = "popper",
|
|
191
|
-
...
|
|
191
|
+
...s
|
|
192
192
|
}) {
|
|
193
|
-
return /* @__PURE__ */ e(v.Portal, { children: /* @__PURE__ */
|
|
193
|
+
return /* @__PURE__ */ e(v.Portal, { children: /* @__PURE__ */ o(
|
|
194
194
|
v.Content,
|
|
195
195
|
{
|
|
196
196
|
"data-slot": "select-content",
|
|
197
|
-
className:
|
|
197
|
+
className: i(
|
|
198
198
|
// Turtle Design System - ninja black background for content
|
|
199
199
|
"bg-background text-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border shadow-md",
|
|
200
200
|
a === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
201
201
|
t
|
|
202
202
|
),
|
|
203
203
|
position: a,
|
|
204
|
-
...
|
|
204
|
+
...s,
|
|
205
205
|
children: [
|
|
206
206
|
/* @__PURE__ */ e(be, {}),
|
|
207
207
|
/* @__PURE__ */ e(
|
|
208
208
|
v.Viewport,
|
|
209
209
|
{
|
|
210
|
-
className:
|
|
210
|
+
className: i(
|
|
211
211
|
"p-1",
|
|
212
212
|
a === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
213
213
|
),
|
|
@@ -219,12 +219,12 @@ function he({
|
|
|
219
219
|
}
|
|
220
220
|
) });
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function Xe({ className: t, ...r }) {
|
|
223
223
|
return /* @__PURE__ */ e(
|
|
224
224
|
v.Label,
|
|
225
225
|
{
|
|
226
226
|
"data-slot": "select-label",
|
|
227
|
-
className:
|
|
227
|
+
className: i("text-muted-foreground px-2 py-1.5 text-xs", t),
|
|
228
228
|
...r
|
|
229
229
|
}
|
|
230
230
|
);
|
|
@@ -234,11 +234,11 @@ function ge({
|
|
|
234
234
|
children: r,
|
|
235
235
|
...a
|
|
236
236
|
}) {
|
|
237
|
-
return /* @__PURE__ */
|
|
237
|
+
return /* @__PURE__ */ o(
|
|
238
238
|
v.Item,
|
|
239
239
|
{
|
|
240
240
|
"data-slot": "select-item",
|
|
241
|
-
className:
|
|
241
|
+
className: i(
|
|
242
242
|
// Turtle Design System - items with wise white alpha (2%) background and ninja black text
|
|
243
243
|
"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm text-foreground outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
244
244
|
"bg-muted hover:bg-muted/80 focus:bg-muted/80",
|
|
@@ -249,7 +249,7 @@ function ge({
|
|
|
249
249
|
),
|
|
250
250
|
...a,
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ o("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: [
|
|
253
253
|
/* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-muted-foreground/30 transition-colors" }),
|
|
254
254
|
/* @__PURE__ */ e(v.ItemIndicator, { className: "absolute", children: /* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-primary" }) })
|
|
255
255
|
] }),
|
|
@@ -258,7 +258,7 @@ function ge({
|
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function qe({
|
|
262
262
|
className: t,
|
|
263
263
|
...r
|
|
264
264
|
}) {
|
|
@@ -266,7 +266,7 @@ function Je({
|
|
|
266
266
|
v.Separator,
|
|
267
267
|
{
|
|
268
268
|
"data-slot": "select-separator",
|
|
269
|
-
className:
|
|
269
|
+
className: i("bg-border pointer-events-none -mx-1 my-1 h-px", t),
|
|
270
270
|
...r
|
|
271
271
|
}
|
|
272
272
|
);
|
|
@@ -279,9 +279,9 @@ function be({
|
|
|
279
279
|
v.ScrollUpButton,
|
|
280
280
|
{
|
|
281
281
|
"data-slot": "select-scroll-up-button",
|
|
282
|
-
className:
|
|
282
|
+
className: i("flex cursor-default items-center justify-center py-1", t),
|
|
283
283
|
...r,
|
|
284
|
-
children: /* @__PURE__ */ e(
|
|
284
|
+
children: /* @__PURE__ */ e(Q, { className: "size-4" })
|
|
285
285
|
}
|
|
286
286
|
);
|
|
287
287
|
}
|
|
@@ -293,17 +293,17 @@ function ve({
|
|
|
293
293
|
v.ScrollDownButton,
|
|
294
294
|
{
|
|
295
295
|
"data-slot": "select-scroll-down-button",
|
|
296
|
-
className:
|
|
296
|
+
className: i("flex cursor-default items-center justify-center py-1", t),
|
|
297
297
|
...r,
|
|
298
298
|
children: /* @__PURE__ */ e(D, { className: "size-4" })
|
|
299
299
|
}
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Je({
|
|
303
303
|
className: t,
|
|
304
304
|
orientation: r = "horizontal",
|
|
305
305
|
decorative: a = !0,
|
|
306
|
-
...
|
|
306
|
+
...s
|
|
307
307
|
}) {
|
|
308
308
|
return /* @__PURE__ */ e(
|
|
309
309
|
ie.Root,
|
|
@@ -311,15 +311,15 @@ function Qe({
|
|
|
311
311
|
"data-slot": "separator",
|
|
312
312
|
decorative: a,
|
|
313
313
|
orientation: r,
|
|
314
|
-
className:
|
|
314
|
+
className: i(
|
|
315
315
|
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
316
316
|
t
|
|
317
317
|
),
|
|
318
|
-
...
|
|
318
|
+
...s
|
|
319
319
|
}
|
|
320
320
|
);
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const Qe = ({ ...t }) => {
|
|
323
323
|
const { theme: r = "system" } = le();
|
|
324
324
|
return /* @__PURE__ */ e(
|
|
325
325
|
de,
|
|
@@ -343,7 +343,7 @@ function et({
|
|
|
343
343
|
$.Root,
|
|
344
344
|
{
|
|
345
345
|
"data-slot": "switch",
|
|
346
|
-
className:
|
|
346
|
+
className: i(
|
|
347
347
|
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
348
348
|
t
|
|
349
349
|
),
|
|
@@ -352,7 +352,7 @@ function et({
|
|
|
352
352
|
$.Thumb,
|
|
353
353
|
{
|
|
354
354
|
"data-slot": "switch-thumb",
|
|
355
|
-
className:
|
|
355
|
+
className: i(
|
|
356
356
|
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
357
357
|
)
|
|
358
358
|
}
|
|
@@ -384,14 +384,14 @@ function tt({
|
|
|
384
384
|
className: t,
|
|
385
385
|
variant: r,
|
|
386
386
|
size: a,
|
|
387
|
-
...
|
|
387
|
+
...s
|
|
388
388
|
}) {
|
|
389
389
|
return /* @__PURE__ */ e(
|
|
390
390
|
ce.Root,
|
|
391
391
|
{
|
|
392
392
|
"data-slot": "toggle",
|
|
393
|
-
className:
|
|
394
|
-
...
|
|
393
|
+
className: i(M({ variant: r, size: a, className: t })),
|
|
394
|
+
...s
|
|
395
395
|
}
|
|
396
396
|
);
|
|
397
397
|
}
|
|
@@ -403,8 +403,8 @@ function rt({
|
|
|
403
403
|
className: t,
|
|
404
404
|
variant: r,
|
|
405
405
|
size: a,
|
|
406
|
-
children:
|
|
407
|
-
...
|
|
406
|
+
children: s,
|
|
407
|
+
...l
|
|
408
408
|
}) {
|
|
409
409
|
return /* @__PURE__ */ e(
|
|
410
410
|
H.Root,
|
|
@@ -412,12 +412,12 @@ function rt({
|
|
|
412
412
|
"data-slot": "toggle-group",
|
|
413
413
|
"data-variant": r,
|
|
414
414
|
"data-size": a,
|
|
415
|
-
className:
|
|
415
|
+
className: i(
|
|
416
416
|
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
417
417
|
t
|
|
418
418
|
),
|
|
419
|
-
...
|
|
420
|
-
children: /* @__PURE__ */ e(W.Provider, { value: { variant: r, size: a }, children:
|
|
419
|
+
...l,
|
|
420
|
+
children: /* @__PURE__ */ e(W.Provider, { value: { variant: r, size: a }, children: s })
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
423
|
}
|
|
@@ -425,8 +425,8 @@ function at({
|
|
|
425
425
|
className: t,
|
|
426
426
|
children: r,
|
|
427
427
|
variant: a,
|
|
428
|
-
size:
|
|
429
|
-
...
|
|
428
|
+
size: s,
|
|
429
|
+
...l
|
|
430
430
|
}) {
|
|
431
431
|
const c = b.useContext(W);
|
|
432
432
|
return /* @__PURE__ */ e(
|
|
@@ -434,16 +434,16 @@ function at({
|
|
|
434
434
|
{
|
|
435
435
|
"data-slot": "toggle-group-item",
|
|
436
436
|
"data-variant": c.variant || a,
|
|
437
|
-
"data-size": c.size ||
|
|
438
|
-
className:
|
|
437
|
+
"data-size": c.size || s,
|
|
438
|
+
className: i(
|
|
439
439
|
M({
|
|
440
440
|
variant: c.variant || a,
|
|
441
|
-
size: c.size ||
|
|
441
|
+
size: c.size || s
|
|
442
442
|
}),
|
|
443
443
|
"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
444
444
|
t
|
|
445
445
|
),
|
|
446
|
-
...
|
|
446
|
+
...l,
|
|
447
447
|
children: r
|
|
448
448
|
}
|
|
449
449
|
);
|
|
@@ -475,18 +475,18 @@ function st({
|
|
|
475
475
|
className: t,
|
|
476
476
|
sideOffset: r = 0,
|
|
477
477
|
children: a,
|
|
478
|
-
...
|
|
478
|
+
...s
|
|
479
479
|
}) {
|
|
480
|
-
return /* @__PURE__ */ e(L.Portal, { children: /* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ e(L.Portal, { children: /* @__PURE__ */ o(
|
|
481
481
|
L.Content,
|
|
482
482
|
{
|
|
483
483
|
"data-slot": "tooltip-content",
|
|
484
484
|
sideOffset: r,
|
|
485
|
-
className:
|
|
485
|
+
className: i(
|
|
486
486
|
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
487
487
|
t
|
|
488
488
|
),
|
|
489
|
-
...
|
|
489
|
+
...s,
|
|
490
490
|
children: [
|
|
491
491
|
a,
|
|
492
492
|
/* @__PURE__ */ e(L.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
@@ -531,15 +531,15 @@ function V({
|
|
|
531
531
|
className: t,
|
|
532
532
|
variant: r,
|
|
533
533
|
size: a,
|
|
534
|
-
rounded:
|
|
535
|
-
asChild:
|
|
534
|
+
rounded: s,
|
|
535
|
+
asChild: l = !1,
|
|
536
536
|
...c
|
|
537
537
|
}) {
|
|
538
538
|
return /* @__PURE__ */ e(
|
|
539
|
-
|
|
539
|
+
l ? me : "button",
|
|
540
540
|
{
|
|
541
541
|
"data-slot": "button",
|
|
542
|
-
className:
|
|
542
|
+
className: i(Ne({ variant: r, size: a, rounded: s, className: t })),
|
|
543
543
|
...c
|
|
544
544
|
}
|
|
545
545
|
);
|
|
@@ -586,16 +586,16 @@ function w({
|
|
|
586
586
|
className: t,
|
|
587
587
|
variant: r,
|
|
588
588
|
padding: a,
|
|
589
|
-
rounded:
|
|
590
|
-
gradientBorder:
|
|
589
|
+
rounded: s,
|
|
590
|
+
gradientBorder: l,
|
|
591
591
|
...c
|
|
592
592
|
}) {
|
|
593
|
-
const
|
|
594
|
-
T({ variant: r, padding: a, rounded:
|
|
593
|
+
const d = l ?? (r === "container" ? "white" : "none"), n = d !== "none", f = T({ gradientBorder: d }), p = i(
|
|
594
|
+
T({ variant: r, padding: a, rounded: s, gradientBorder: "none", className: t })
|
|
595
595
|
);
|
|
596
596
|
if (n) {
|
|
597
|
-
const u = T({ rounded:
|
|
598
|
-
return /* @__PURE__ */ e("div", { className:
|
|
597
|
+
const u = T({ rounded: s });
|
|
598
|
+
return /* @__PURE__ */ e("div", { className: i(f, u, "p-[1px] h-full"), "data-slot": "card-wrapper", children: /* @__PURE__ */ e("div", { "data-slot": "card", className: i(p, "h-full"), ...c }) });
|
|
599
599
|
}
|
|
600
600
|
return /* @__PURE__ */ e("div", { "data-slot": "card", className: p, ...c });
|
|
601
601
|
}
|
|
@@ -604,7 +604,7 @@ function it({ className: t, ...r }) {
|
|
|
604
604
|
"div",
|
|
605
605
|
{
|
|
606
606
|
"data-slot": "card-header",
|
|
607
|
-
className:
|
|
607
|
+
className: i("flex flex-col space-y-1.5 p-6", t),
|
|
608
608
|
...r
|
|
609
609
|
}
|
|
610
610
|
);
|
|
@@ -614,7 +614,7 @@ function lt({ className: t, children: r, ...a }) {
|
|
|
614
614
|
"h3",
|
|
615
615
|
{
|
|
616
616
|
"data-slot": "card-title",
|
|
617
|
-
className:
|
|
617
|
+
className: i("text-2xl font-semibold leading-none tracking-tight", t),
|
|
618
618
|
...a,
|
|
619
619
|
children: r
|
|
620
620
|
}
|
|
@@ -625,20 +625,20 @@ function dt({ className: t, ...r }) {
|
|
|
625
625
|
"p",
|
|
626
626
|
{
|
|
627
627
|
"data-slot": "card-description",
|
|
628
|
-
className:
|
|
628
|
+
className: i("text-sm text-muted-foreground", t),
|
|
629
629
|
...r
|
|
630
630
|
}
|
|
631
631
|
);
|
|
632
632
|
}
|
|
633
633
|
function ct({ className: t, ...r }) {
|
|
634
|
-
return /* @__PURE__ */ e("div", { "data-slot": "card-content", className:
|
|
634
|
+
return /* @__PURE__ */ e("div", { "data-slot": "card-content", className: i("p-6 pt-0", t), ...r });
|
|
635
635
|
}
|
|
636
636
|
function mt({ className: t, ...r }) {
|
|
637
637
|
return /* @__PURE__ */ e(
|
|
638
638
|
"div",
|
|
639
639
|
{
|
|
640
640
|
"data-slot": "card-footer",
|
|
641
|
-
className:
|
|
641
|
+
className: i("flex items-center p-6 pt-0", t),
|
|
642
642
|
...r
|
|
643
643
|
}
|
|
644
644
|
);
|
|
@@ -665,13 +665,13 @@ const we = N(
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
), O = b.forwardRef(
|
|
668
|
-
({ className: t, variant: r, size: a, asChild:
|
|
668
|
+
({ className: t, variant: r, size: a, asChild: s = !1, ...l }, c) => /* @__PURE__ */ e(
|
|
669
669
|
"div",
|
|
670
670
|
{
|
|
671
671
|
"data-slot": "chip",
|
|
672
|
-
className:
|
|
672
|
+
className: i(we({ variant: r, size: a, className: t })),
|
|
673
673
|
ref: c,
|
|
674
|
-
...
|
|
674
|
+
...l
|
|
675
675
|
}
|
|
676
676
|
)
|
|
677
677
|
);
|
|
@@ -697,34 +697,34 @@ const ke = N(
|
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
), K = b.forwardRef(
|
|
700
|
-
({ className: t, size: r, variant: a, children:
|
|
700
|
+
({ className: t, size: r, variant: a, children: s, spinning: l = !0, ...c }, d) => /* @__PURE__ */ o(
|
|
701
701
|
"div",
|
|
702
702
|
{
|
|
703
|
-
ref:
|
|
704
|
-
className:
|
|
703
|
+
ref: d,
|
|
704
|
+
className: i(ke({ size: r, variant: a }), t),
|
|
705
705
|
...c,
|
|
706
706
|
children: [
|
|
707
707
|
/* @__PURE__ */ e(
|
|
708
708
|
"div",
|
|
709
709
|
{
|
|
710
|
-
className:
|
|
710
|
+
className: i(
|
|
711
711
|
"absolute inset-0 rounded-full",
|
|
712
712
|
"bg-gradient-to-r from-transparent via-primary to-transparent",
|
|
713
713
|
"animate-spin",
|
|
714
714
|
{
|
|
715
|
-
"animate-spin":
|
|
716
|
-
"animate-none": !
|
|
715
|
+
"animate-spin": l,
|
|
716
|
+
"animate-none": !l
|
|
717
717
|
}
|
|
718
718
|
),
|
|
719
719
|
style: {
|
|
720
|
-
background:
|
|
720
|
+
background: l ? "conic-gradient(from 0deg, transparent 0deg, var(--primary) 180deg, transparent 360deg)" : "conic-gradient(from 0deg, var(--primary) 0deg, var(--primary) 360deg)",
|
|
721
721
|
padding: "1px",
|
|
722
722
|
borderRadius: "9999px"
|
|
723
723
|
},
|
|
724
724
|
children: /* @__PURE__ */ e(
|
|
725
725
|
"div",
|
|
726
726
|
{
|
|
727
|
-
className:
|
|
727
|
+
className: i(
|
|
728
728
|
"w-full h-full rounded-full",
|
|
729
729
|
a === "transparent" ? "bg-transparent" : "bg-background"
|
|
730
730
|
)
|
|
@@ -732,7 +732,7 @@ const ke = N(
|
|
|
732
732
|
)
|
|
733
733
|
}
|
|
734
734
|
),
|
|
735
|
-
/* @__PURE__ */ e("div", { className: "relative z-10 flex items-center justify-center", children:
|
|
735
|
+
/* @__PURE__ */ e("div", { className: "relative z-10 flex items-center justify-center", children: s })
|
|
736
736
|
]
|
|
737
737
|
}
|
|
738
738
|
)
|
|
@@ -771,36 +771,36 @@ const Se = N("inline-flex items-center gap-2 font-medium", {
|
|
|
771
771
|
base: "w-5 h-5",
|
|
772
772
|
lg: "w-6 h-6",
|
|
773
773
|
xl: "w-8 h-8"
|
|
774
|
-
},
|
|
774
|
+
}, I = b.forwardRef(
|
|
775
775
|
({
|
|
776
776
|
className: t,
|
|
777
777
|
variant: r,
|
|
778
778
|
textSize: a,
|
|
779
|
-
icon:
|
|
780
|
-
children:
|
|
779
|
+
icon: s,
|
|
780
|
+
children: l,
|
|
781
781
|
iconPosition: c = "left",
|
|
782
|
-
iconSize:
|
|
782
|
+
iconSize: d = "sm",
|
|
783
783
|
iconClassName: n,
|
|
784
784
|
...f
|
|
785
785
|
}, p) => {
|
|
786
786
|
const u = () => {
|
|
787
787
|
var m;
|
|
788
|
-
return typeof
|
|
788
|
+
return typeof s == "string" ? /* @__PURE__ */ e(
|
|
789
789
|
"img",
|
|
790
790
|
{
|
|
791
|
-
src:
|
|
791
|
+
src: s,
|
|
792
792
|
alt: "",
|
|
793
|
-
className:
|
|
793
|
+
className: i(E[d], "object-contain", n)
|
|
794
794
|
}
|
|
795
|
-
) : /* @__PURE__ */ e("span", { className:
|
|
796
|
-
className:
|
|
797
|
-
}) :
|
|
795
|
+
) : /* @__PURE__ */ e("span", { className: i("shrink-0", n), children: b.isValidElement(s) ? b.cloneElement(s, {
|
|
796
|
+
className: i(E[d], (m = s.props) == null ? void 0 : m.className)
|
|
797
|
+
}) : s });
|
|
798
798
|
};
|
|
799
|
-
return /* @__PURE__ */
|
|
799
|
+
return /* @__PURE__ */ o(
|
|
800
800
|
"div",
|
|
801
801
|
{
|
|
802
802
|
ref: p,
|
|
803
|
-
className:
|
|
803
|
+
className: i(
|
|
804
804
|
Se({ variant: r, textSize: a }),
|
|
805
805
|
c === "right" && "flex-row-reverse",
|
|
806
806
|
t
|
|
@@ -808,13 +808,13 @@ const Se = N("inline-flex items-center gap-2 font-medium", {
|
|
|
808
808
|
...f,
|
|
809
809
|
children: [
|
|
810
810
|
u(),
|
|
811
|
-
/* @__PURE__ */ e("span", { children:
|
|
811
|
+
/* @__PURE__ */ e("span", { children: l })
|
|
812
812
|
]
|
|
813
813
|
}
|
|
814
814
|
);
|
|
815
815
|
}
|
|
816
816
|
);
|
|
817
|
-
|
|
817
|
+
I.displayName = "LabelWithIcon";
|
|
818
818
|
const ze = N("flex w-full", {
|
|
819
819
|
variants: {
|
|
820
820
|
variant: {
|
|
@@ -842,25 +842,25 @@ const ze = N("flex w-full", {
|
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
), _e = b.forwardRef(
|
|
845
|
-
({ className: t, variant: r, activeValue: a, children:
|
|
846
|
-
const
|
|
847
|
-
if (r !== "menuBar" || !
|
|
848
|
-
const p =
|
|
845
|
+
({ className: t, variant: r, activeValue: a, children: s, ...l }, c) => {
|
|
846
|
+
const d = b.useRef(null), n = b.useRef(null), f = b.useCallback(() => {
|
|
847
|
+
if (r !== "menuBar" || !d.current || !n.current) return;
|
|
848
|
+
const p = d.current.querySelector('[data-active="true"]');
|
|
849
849
|
p && (n.current.style.width = `${p.offsetWidth}px`, n.current.style.left = `${p.offsetLeft}px`);
|
|
850
850
|
}, [r]);
|
|
851
851
|
return b.useEffect(() => {
|
|
852
852
|
if (r !== "menuBar") return;
|
|
853
853
|
f();
|
|
854
854
|
const p = new ResizeObserver(f);
|
|
855
|
-
return
|
|
855
|
+
return d.current && p.observe(d.current), () => {
|
|
856
856
|
p.disconnect();
|
|
857
857
|
};
|
|
858
|
-
}, [a, f, r]), /* @__PURE__ */
|
|
858
|
+
}, [a, f, r]), /* @__PURE__ */ o(
|
|
859
859
|
"nav",
|
|
860
860
|
{
|
|
861
|
-
ref: c ||
|
|
862
|
-
className:
|
|
863
|
-
...
|
|
861
|
+
ref: c || d,
|
|
862
|
+
className: i(ze({ variant: r, className: t })),
|
|
863
|
+
...l,
|
|
864
864
|
children: [
|
|
865
865
|
r === "menuBar" && /* @__PURE__ */ e(
|
|
866
866
|
"div",
|
|
@@ -869,7 +869,7 @@ const ze = N("flex w-full", {
|
|
|
869
869
|
className: "absolute bottom-0 h-full origin-left rounded-full bg-secondary transition-all duration-300"
|
|
870
870
|
}
|
|
871
871
|
),
|
|
872
|
-
|
|
872
|
+
s
|
|
873
873
|
]
|
|
874
874
|
}
|
|
875
875
|
);
|
|
@@ -877,28 +877,28 @@ const ze = N("flex w-full", {
|
|
|
877
877
|
);
|
|
878
878
|
_e.displayName = "NavigationBar";
|
|
879
879
|
const Ce = b.forwardRef(
|
|
880
|
-
({ className: t, variant: r, active: a, value:
|
|
880
|
+
({ className: t, variant: r, active: a, value: s, ...l }, c) => {
|
|
881
881
|
const n = r === "menuBarDefault" || r === "menuBarActive" ? a ? "menuBarActive" : "menuBarDefault" : a ? "active" : r || "default", f = n === "menuBarDefault" || n === "menuBarActive";
|
|
882
882
|
return /* @__PURE__ */ e(
|
|
883
883
|
"button",
|
|
884
884
|
{
|
|
885
885
|
ref: c,
|
|
886
886
|
"data-active": a,
|
|
887
|
-
"data-value":
|
|
888
|
-
className:
|
|
887
|
+
"data-value": s,
|
|
888
|
+
className: i(
|
|
889
889
|
Le({
|
|
890
890
|
variant: n,
|
|
891
891
|
className: t
|
|
892
892
|
}),
|
|
893
893
|
!f && "px-4 py-2 rounded-md"
|
|
894
894
|
),
|
|
895
|
-
...
|
|
895
|
+
...l
|
|
896
896
|
}
|
|
897
897
|
);
|
|
898
898
|
}
|
|
899
899
|
);
|
|
900
900
|
Ce.displayName = "NavigationItem";
|
|
901
|
-
const
|
|
901
|
+
const Ie = N("space-y-1", {
|
|
902
902
|
variants: {
|
|
903
903
|
size: {
|
|
904
904
|
sm: "p-2",
|
|
@@ -915,7 +915,7 @@ const je = N("space-y-1", {
|
|
|
915
915
|
size: "default",
|
|
916
916
|
align: "center"
|
|
917
917
|
}
|
|
918
|
-
}),
|
|
918
|
+
}), je = N("font-bold", {
|
|
919
919
|
variants: {
|
|
920
920
|
color: {
|
|
921
921
|
primary: "text-foreground",
|
|
@@ -952,36 +952,27 @@ const je = N("space-y-1", {
|
|
|
952
952
|
title: t,
|
|
953
953
|
value: r,
|
|
954
954
|
color: a = "primary",
|
|
955
|
-
valueSize:
|
|
956
|
-
titleSize:
|
|
955
|
+
valueSize: s = "default",
|
|
956
|
+
titleSize: l = "default",
|
|
957
957
|
size: c = "default",
|
|
958
|
-
align:
|
|
959
|
-
|
|
958
|
+
align: d = "center",
|
|
959
|
+
iconUrl: n,
|
|
960
960
|
subtitle: f,
|
|
961
961
|
className: p,
|
|
962
962
|
...u
|
|
963
|
-
}, m) => /* @__PURE__ */
|
|
963
|
+
}, m) => /* @__PURE__ */ o(
|
|
964
964
|
w,
|
|
965
965
|
{
|
|
966
966
|
ref: m,
|
|
967
967
|
variant: "item",
|
|
968
|
-
className:
|
|
968
|
+
className: i(Ie({ size: c, align: d }), p),
|
|
969
969
|
...u,
|
|
970
970
|
children: [
|
|
971
|
-
|
|
972
|
-
"
|
|
973
|
-
{
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
l === "left" && "justify-start",
|
|
977
|
-
l === "center" && "justify-center",
|
|
978
|
-
l === "right" && "justify-end"
|
|
979
|
-
),
|
|
980
|
-
children: n
|
|
981
|
-
}
|
|
982
|
-
),
|
|
983
|
-
/* @__PURE__ */ e("p", { className: Be({ size: d }), children: t }),
|
|
984
|
-
/* @__PURE__ */ e("p", { className: Ie({ color: a, size: o }), children: r }),
|
|
971
|
+
/* @__PURE__ */ o("div", { className: "flex gap-2", children: [
|
|
972
|
+
n && /* @__PURE__ */ e("img", { src: n, alt: `${t}-icon`, className: "w-5 h-5 rounded-full" }),
|
|
973
|
+
/* @__PURE__ */ e("p", { className: Be({ size: l }), children: t })
|
|
974
|
+
] }),
|
|
975
|
+
/* @__PURE__ */ e("p", { className: je({ color: a, size: s }), children: r }),
|
|
985
976
|
f && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground/70", children: f })
|
|
986
977
|
]
|
|
987
978
|
}
|
|
@@ -992,23 +983,23 @@ function ut({
|
|
|
992
983
|
className: t,
|
|
993
984
|
title: r,
|
|
994
985
|
titleIcon: a,
|
|
995
|
-
url:
|
|
996
|
-
topCards:
|
|
986
|
+
url: s,
|
|
987
|
+
topCards: l,
|
|
997
988
|
bottomCards: c
|
|
998
989
|
}) {
|
|
999
|
-
const
|
|
1000
|
-
return /* @__PURE__ */ e(w, { variant: "container", className:
|
|
1001
|
-
(r || a) && /* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */ e(
|
|
1003
|
-
|
|
990
|
+
const d = /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center", children: /* @__PURE__ */ e("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z" }) }) });
|
|
991
|
+
return /* @__PURE__ */ e(w, { variant: "container", className: i("space-y-4", t), children: /* @__PURE__ */ e("div", { className: "h-full overflow-y-auto", children: /* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
992
|
+
(r || a) && /* @__PURE__ */ o("div", { className: "flex items-center", children: [
|
|
993
|
+
/* @__PURE__ */ e(I, { icon: a || d, textSize: "lg", iconSize: "lg", children: r }),
|
|
994
|
+
s && /* @__PURE__ */ e(V, { variant: "transparentWhite", size: "icon", className: "ml-auto", children: /* @__PURE__ */ e("a", { href: s, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(ee, {}) }) })
|
|
1004
995
|
] }),
|
|
1005
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-3", children:
|
|
996
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-3", children: l.map((n, f) => /* @__PURE__ */ e(
|
|
1006
997
|
R,
|
|
1007
998
|
{
|
|
1008
999
|
title: n.title,
|
|
1009
1000
|
value: n.value,
|
|
1010
1001
|
color: n.color || "primary",
|
|
1011
|
-
|
|
1002
|
+
iconUrl: n.iconUrl,
|
|
1012
1003
|
size: "sm",
|
|
1013
1004
|
valueSize: "sm",
|
|
1014
1005
|
titleSize: "sm",
|
|
@@ -1019,6 +1010,7 @@ function ut({
|
|
|
1019
1010
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: c.map((n, f) => /* @__PURE__ */ e(
|
|
1020
1011
|
R,
|
|
1021
1012
|
{
|
|
1013
|
+
iconUrl: n.iconUrl,
|
|
1022
1014
|
title: n.title,
|
|
1023
1015
|
value: n.value,
|
|
1024
1016
|
color: n.color || "primary",
|
|
@@ -1036,12 +1028,12 @@ function ft({
|
|
|
1036
1028
|
items: t,
|
|
1037
1029
|
itemKey: r,
|
|
1038
1030
|
columns: a,
|
|
1039
|
-
defaultComparator:
|
|
1040
|
-
hasScrollableContainer:
|
|
1031
|
+
defaultComparator: s,
|
|
1032
|
+
hasScrollableContainer: l,
|
|
1041
1033
|
render: c,
|
|
1042
|
-
className:
|
|
1034
|
+
className: d
|
|
1043
1035
|
}) {
|
|
1044
|
-
const [n, f] =
|
|
1036
|
+
const [n, f] = j(s || null), [p, u] = j("desc"), m = (g) => {
|
|
1045
1037
|
n === g ? u(p === "asc" ? "desc" : "asc") : (f(g), u("desc"));
|
|
1046
1038
|
}, x = [...t].sort((g, k) => {
|
|
1047
1039
|
if (!n) return 0;
|
|
@@ -1053,21 +1045,21 @@ function ft({
|
|
|
1053
1045
|
return /* @__PURE__ */ e(
|
|
1054
1046
|
"div",
|
|
1055
1047
|
{
|
|
1056
|
-
className:
|
|
1048
|
+
className: i(
|
|
1057
1049
|
"w-full overflow-auto",
|
|
1058
|
-
|
|
1059
|
-
|
|
1050
|
+
l && "max-h-[600px] overflow-y-auto",
|
|
1051
|
+
d
|
|
1060
1052
|
),
|
|
1061
|
-
children: /* @__PURE__ */
|
|
1053
|
+
children: /* @__PURE__ */ o("table", { className: "managed-table w-full", children: [
|
|
1062
1054
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: a.map((g) => /* @__PURE__ */ e(
|
|
1063
1055
|
"th",
|
|
1064
1056
|
{
|
|
1065
|
-
className:
|
|
1057
|
+
className: i(
|
|
1066
1058
|
"px-3 py-1 text-left text-xs font-normal text-muted-foreground h-6",
|
|
1067
1059
|
g.comparator && "cursor-pointer select-none"
|
|
1068
1060
|
),
|
|
1069
1061
|
onClick: () => g.comparator && m(g.name),
|
|
1070
|
-
children: /* @__PURE__ */
|
|
1062
|
+
children: /* @__PURE__ */ o("span", { className: "flex items-center gap-1", children: [
|
|
1071
1063
|
g.name,
|
|
1072
1064
|
g.comparator && n === g.name && /* @__PURE__ */ e("span", { className: "text-xs", children: p === "asc" ? "↑" : "↓" })
|
|
1073
1065
|
] })
|
|
@@ -1080,17 +1072,17 @@ function ft({
|
|
|
1080
1072
|
);
|
|
1081
1073
|
}
|
|
1082
1074
|
function pt({ children: t, className: r, ...a }) {
|
|
1083
|
-
return /* @__PURE__ */ e("td", { className:
|
|
1075
|
+
return /* @__PURE__ */ e("td", { className: i("p-2 align-middle text-foreground", r), ...a, children: t });
|
|
1084
1076
|
}
|
|
1085
1077
|
const Te = b.forwardRef(
|
|
1086
1078
|
({
|
|
1087
1079
|
className: t,
|
|
1088
1080
|
icon: r,
|
|
1089
1081
|
name: a,
|
|
1090
|
-
tvl:
|
|
1091
|
-
turtleBoost:
|
|
1082
|
+
tvl: s,
|
|
1083
|
+
turtleBoost: l,
|
|
1092
1084
|
yield: c,
|
|
1093
|
-
onSelect:
|
|
1085
|
+
onSelect: d,
|
|
1094
1086
|
selected: n = !1,
|
|
1095
1087
|
...f
|
|
1096
1088
|
}, p) => {
|
|
@@ -1101,25 +1093,25 @@ const Te = b.forwardRef(
|
|
|
1101
1093
|
ref: p,
|
|
1102
1094
|
variant: "container",
|
|
1103
1095
|
padding: "sm",
|
|
1104
|
-
className:
|
|
1096
|
+
className: i(
|
|
1105
1097
|
"cursor-pointer transition-all duration-200 hover:shadow-md w-full",
|
|
1106
1098
|
n && "ring-2 ring-primary ring-offset-2",
|
|
1107
1099
|
t
|
|
1108
1100
|
),
|
|
1109
|
-
onClick:
|
|
1101
|
+
onClick: d,
|
|
1110
1102
|
...f,
|
|
1111
|
-
children: /* @__PURE__ */
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground truncate", children: /* @__PURE__ */ e(
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
|
|
1103
|
+
children: /* @__PURE__ */ o("div", { className: "flex gap-4 items-start justify-between", children: [
|
|
1104
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col min-w-0 flex-1 items-start justify-start gap-1", children: [
|
|
1105
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground truncate", children: /* @__PURE__ */ e(I, { icon: r || u, textSize: "sm", iconSize: "sm", children: a }) }),
|
|
1106
|
+
/* @__PURE__ */ o("div", { className: "flex gap-2", children: [
|
|
1107
|
+
s && /* @__PURE__ */ o("span", { className: "text-xs text-muted-foreground", children: [
|
|
1116
1108
|
"TVL: ",
|
|
1117
|
-
|
|
1109
|
+
s
|
|
1118
1110
|
] }),
|
|
1119
|
-
|
|
1120
|
-
|
|
1111
|
+
l && /* @__PURE__ */ o("span", { className: "text-xs text-muted-foreground", children: [
|
|
1112
|
+
s ? " | " : "",
|
|
1121
1113
|
" Turtle Boost: ",
|
|
1122
|
-
|
|
1114
|
+
l
|
|
1123
1115
|
] })
|
|
1124
1116
|
] })
|
|
1125
1117
|
] }),
|
|
@@ -1135,10 +1127,10 @@ const Ve = b.forwardRef(
|
|
|
1135
1127
|
className: t,
|
|
1136
1128
|
title: r,
|
|
1137
1129
|
titleIcon: a,
|
|
1138
|
-
yield:
|
|
1139
|
-
details:
|
|
1130
|
+
yield: s,
|
|
1131
|
+
details: l = [],
|
|
1140
1132
|
badges: c = [],
|
|
1141
|
-
externalLink:
|
|
1133
|
+
externalLink: d,
|
|
1142
1134
|
...n
|
|
1143
1135
|
}, f) => {
|
|
1144
1136
|
const p = /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center", children: /* @__PURE__ */ e("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z" }) }) }), u = () => /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e(
|
|
@@ -1150,25 +1142,25 @@ const Ve = b.forwardRef(
|
|
|
1150
1142
|
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
1151
1143
|
}
|
|
1152
1144
|
) });
|
|
1153
|
-
return /* @__PURE__ */
|
|
1154
|
-
(r || a) && /* @__PURE__ */
|
|
1155
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-3", children: /* @__PURE__ */ e(
|
|
1156
|
-
|
|
1157
|
-
/* @__PURE__ */ e("div", { className: "text-2xl font-bold text-primary", children:
|
|
1145
|
+
return /* @__PURE__ */ o(w, { ref: f, className: i("p-4 space-y-4", t), ...n, children: [
|
|
1146
|
+
(r || a) && /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
1147
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-3", children: /* @__PURE__ */ e(I, { icon: a || p, textSize: "lg", iconSize: "lg", children: r }) }),
|
|
1148
|
+
s && /* @__PURE__ */ o("div", { className: "text-right", children: [
|
|
1149
|
+
/* @__PURE__ */ e("div", { className: "text-2xl font-bold text-primary", children: s }),
|
|
1158
1150
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "APY" })
|
|
1159
1151
|
] })
|
|
1160
1152
|
] }),
|
|
1161
|
-
|
|
1162
|
-
/* @__PURE__ */
|
|
1153
|
+
l.length > 0 && /* @__PURE__ */ e("div", { className: "space-y-3", children: l.map((m, x) => /* @__PURE__ */ e("div", { className: "space-y-2", children: /* @__PURE__ */ e(w, { className: "p-3", children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
1154
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
1163
1155
|
m.icon,
|
|
1164
1156
|
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: m.label })
|
|
1165
1157
|
] }),
|
|
1166
|
-
/* @__PURE__ */ e("span", { className:
|
|
1158
|
+
/* @__PURE__ */ e("span", { className: i("text-sm font-medium", m.highlight && "text-primary"), children: m.value })
|
|
1167
1159
|
] }) }) }, x)) }),
|
|
1168
|
-
c.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: c.map((m, x) => /* @__PURE__ */
|
|
1160
|
+
c.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: c.map((m, x) => /* @__PURE__ */ o(
|
|
1169
1161
|
"div",
|
|
1170
1162
|
{
|
|
1171
|
-
className:
|
|
1163
|
+
className: i(
|
|
1172
1164
|
"inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-medium",
|
|
1173
1165
|
m.variant === "secondary" && "bg-secondary text-secondary-foreground",
|
|
1174
1166
|
m.variant === "outline" && "border border-border bg-background",
|
|
@@ -1181,16 +1173,16 @@ const Ve = b.forwardRef(
|
|
|
1181
1173
|
},
|
|
1182
1174
|
x
|
|
1183
1175
|
)) }),
|
|
1184
|
-
|
|
1176
|
+
d && /* @__PURE__ */ e("div", { className: "pt-2 border-t border-border", children: /* @__PURE__ */ o(
|
|
1185
1177
|
"a",
|
|
1186
1178
|
{
|
|
1187
|
-
href:
|
|
1179
|
+
href: d.href,
|
|
1188
1180
|
target: "_blank",
|
|
1189
1181
|
rel: "noopener noreferrer",
|
|
1190
1182
|
className: "inline-flex items-center gap-2 text-sm text-primary hover:text-primary/80 transition-colors",
|
|
1191
1183
|
children: [
|
|
1192
|
-
|
|
1193
|
-
|
|
1184
|
+
d.icon,
|
|
1185
|
+
d.text,
|
|
1194
1186
|
/* @__PURE__ */ e(u, {})
|
|
1195
1187
|
]
|
|
1196
1188
|
}
|
|
@@ -1204,10 +1196,10 @@ const Re = b.forwardRef(
|
|
|
1204
1196
|
className: t,
|
|
1205
1197
|
title: r,
|
|
1206
1198
|
description: a,
|
|
1207
|
-
txHash:
|
|
1208
|
-
explorerUrl:
|
|
1199
|
+
txHash: s,
|
|
1200
|
+
explorerUrl: l,
|
|
1209
1201
|
estimatedTime: c,
|
|
1210
|
-
amount:
|
|
1202
|
+
amount: d,
|
|
1211
1203
|
token: n,
|
|
1212
1204
|
protocol: f,
|
|
1213
1205
|
steps: p = [],
|
|
@@ -1228,69 +1220,69 @@ const Re = b.forwardRef(
|
|
|
1228
1220
|
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
1229
1221
|
}
|
|
1230
1222
|
) }), Y = () => /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }), P = (h) => h.length <= 12 ? h : `${h.slice(0, 6)}...${h.slice(-6)}`;
|
|
1231
|
-
return /* @__PURE__ */
|
|
1223
|
+
return /* @__PURE__ */ o(
|
|
1232
1224
|
w,
|
|
1233
1225
|
{
|
|
1234
1226
|
ref: S,
|
|
1235
|
-
className:
|
|
1227
|
+
className: i(
|
|
1236
1228
|
"p-4 text-center space-y-3",
|
|
1237
1229
|
u === "compact" && "p-3 space-y-2",
|
|
1238
1230
|
t
|
|
1239
1231
|
),
|
|
1240
1232
|
..._,
|
|
1241
1233
|
children: [
|
|
1242
|
-
/* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ e(K, { spinning: !m && !x, size: u === "compact" ? "sm" : "default", children: x ? /* @__PURE__ */ e(te, { className:
|
|
1243
|
-
/* @__PURE__ */
|
|
1234
|
+
/* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ e(K, { spinning: !m && !x, size: u === "compact" ? "sm" : "default", children: x ? /* @__PURE__ */ e(te, { className: i(u === "compact" ? "w-5 h-5" : "w-6 h-6", "text-destructive") }) : m ? /* @__PURE__ */ e(re, { className: i(u === "compact" ? "w-5 h-5" : "w-6 h-6", "text-primary") }) : /* @__PURE__ */ e(ae, { className: i(u === "compact" ? "w-5 h-5" : "w-6 h-6", "text-primary") }) }) }),
|
|
1235
|
+
/* @__PURE__ */ o("div", { className: "space-y-1", children: [
|
|
1244
1236
|
/* @__PURE__ */ e(
|
|
1245
1237
|
"h3",
|
|
1246
1238
|
{
|
|
1247
|
-
className:
|
|
1239
|
+
className: i(
|
|
1248
1240
|
"font-medium text-foreground",
|
|
1249
1241
|
u === "compact" ? "text-xs" : "text-sm"
|
|
1250
1242
|
),
|
|
1251
1243
|
children: r || z
|
|
1252
1244
|
}
|
|
1253
1245
|
),
|
|
1254
|
-
/* @__PURE__ */ e("p", { className:
|
|
1246
|
+
/* @__PURE__ */ e("p", { className: i("text-muted-foreground", "text-xs"), children: a || B })
|
|
1255
1247
|
] }),
|
|
1256
|
-
m && !x && (
|
|
1257
|
-
|
|
1258
|
-
|
|
1248
|
+
m && !x && (d || n || f) && /* @__PURE__ */ o("div", { className: "p-2 bg-muted/50 rounded-lg space-y-1", children: [
|
|
1249
|
+
d && n && /* @__PURE__ */ o("div", { className: "text-xs font-medium", children: [
|
|
1250
|
+
d,
|
|
1259
1251
|
" ",
|
|
1260
1252
|
n
|
|
1261
1253
|
] }),
|
|
1262
|
-
f && /* @__PURE__ */
|
|
1254
|
+
f && /* @__PURE__ */ o("div", { className: "text-xs text-muted-foreground", children: [
|
|
1263
1255
|
"via ",
|
|
1264
1256
|
f
|
|
1265
1257
|
] })
|
|
1266
1258
|
] }),
|
|
1267
|
-
|
|
1259
|
+
s && !x && /* @__PURE__ */ o("div", { className: "space-y-1", children: [
|
|
1268
1260
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Transaction Hash" }),
|
|
1269
|
-
|
|
1261
|
+
l ? /* @__PURE__ */ o(
|
|
1270
1262
|
"a",
|
|
1271
1263
|
{
|
|
1272
|
-
href: `${
|
|
1264
|
+
href: `${l}/tx/${s}`,
|
|
1273
1265
|
target: "_blank",
|
|
1274
1266
|
rel: "noopener noreferrer",
|
|
1275
1267
|
className: "inline-flex items-center gap-2 text-xs text-primary hover:text-primary/80 transition-colors",
|
|
1276
1268
|
children: [
|
|
1277
|
-
P(
|
|
1269
|
+
P(s),
|
|
1278
1270
|
/* @__PURE__ */ e(F, {})
|
|
1279
1271
|
]
|
|
1280
1272
|
}
|
|
1281
|
-
) : /* @__PURE__ */ e("div", { className: "text-xs font-mono text-foreground", children: P(
|
|
1273
|
+
) : /* @__PURE__ */ e("div", { className: "text-xs font-mono text-foreground", children: P(s) })
|
|
1282
1274
|
] }),
|
|
1283
|
-
!m && !x && c && /* @__PURE__ */
|
|
1275
|
+
!m && !x && c && /* @__PURE__ */ o("div", { className: "text-xs text-muted-foreground", children: [
|
|
1284
1276
|
"Estimated time: ",
|
|
1285
1277
|
c
|
|
1286
1278
|
] }),
|
|
1287
|
-
!m && !x && p.length > 0 && /* @__PURE__ */
|
|
1279
|
+
!m && !x && p.length > 0 && /* @__PURE__ */ o("div", { className: "space-y-2 pt-2 border-t border-border", children: [
|
|
1288
1280
|
/* @__PURE__ */ e("div", { className: "text-xs font-medium text-muted-foreground text-left", children: "Progress" }),
|
|
1289
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: p.map((h, Z) => /* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ e("div", { className: "space-y-2", children: p.map((h, Z) => /* @__PURE__ */ o("div", { className: "flex items-center gap-3 text-left", children: [
|
|
1290
1282
|
/* @__PURE__ */ e(
|
|
1291
1283
|
"div",
|
|
1292
1284
|
{
|
|
1293
|
-
className:
|
|
1285
|
+
className: i(
|
|
1294
1286
|
"flex items-center justify-center w-5 h-5 rounded-full border-2 flex-shrink-0",
|
|
1295
1287
|
h.completed && "bg-primary border-primary text-primary-foreground",
|
|
1296
1288
|
h.current && !h.completed && "border-primary text-primary animate-pulse",
|
|
@@ -1299,11 +1291,11 @@ const Re = b.forwardRef(
|
|
|
1299
1291
|
children: h.completed ? /* @__PURE__ */ e(Y, {}) : h.current ? /* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-primary animate-pulse" }) : /* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-muted-foreground/30" })
|
|
1300
1292
|
}
|
|
1301
1293
|
),
|
|
1302
|
-
/* @__PURE__ */
|
|
1294
|
+
/* @__PURE__ */ o("div", { className: "flex-1 flex items-center justify-between", children: [
|
|
1303
1295
|
/* @__PURE__ */ e(
|
|
1304
1296
|
"span",
|
|
1305
1297
|
{
|
|
1306
|
-
className:
|
|
1298
|
+
className: i(
|
|
1307
1299
|
"text-xs",
|
|
1308
1300
|
h.completed && "text-foreground",
|
|
1309
1301
|
h.current && !h.completed && "text-foreground font-medium",
|
|
@@ -1312,16 +1304,16 @@ const Re = b.forwardRef(
|
|
|
1312
1304
|
children: h.label
|
|
1313
1305
|
}
|
|
1314
1306
|
),
|
|
1315
|
-
h.txHash &&
|
|
1307
|
+
h.txHash && l && /* @__PURE__ */ o(
|
|
1316
1308
|
"a",
|
|
1317
1309
|
{
|
|
1318
|
-
href: `${
|
|
1310
|
+
href: `${l}/tx/${h.txHash}`,
|
|
1319
1311
|
target: "_blank",
|
|
1320
1312
|
rel: "noopener noreferrer",
|
|
1321
1313
|
className: "inline-flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors ml-2",
|
|
1322
1314
|
title: `View transaction: ${h.txHash}`,
|
|
1323
1315
|
children: [
|
|
1324
|
-
/* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ o("span", { className: "font-mono", children: [
|
|
1325
1317
|
h.txHash.slice(0, 6),
|
|
1326
1318
|
"...",
|
|
1327
1319
|
h.txHash.slice(-4)
|
|
@@ -1333,10 +1325,10 @@ const Re = b.forwardRef(
|
|
|
1333
1325
|
] })
|
|
1334
1326
|
] }, Z)) })
|
|
1335
1327
|
] }),
|
|
1336
|
-
(m || x) && y && (g || k) && /* @__PURE__ */
|
|
1328
|
+
(m || x) && y && (g || k) && /* @__PURE__ */ o(
|
|
1337
1329
|
"div",
|
|
1338
1330
|
{
|
|
1339
|
-
className:
|
|
1331
|
+
className: i(
|
|
1340
1332
|
"flex gap-2 pt-2",
|
|
1341
1333
|
u === "compact" ? "flex-col" : "flex-row justify-center"
|
|
1342
1334
|
),
|
|
@@ -1372,22 +1364,22 @@ const De = ({
|
|
|
1372
1364
|
tokens: t,
|
|
1373
1365
|
value: r,
|
|
1374
1366
|
onValueChange: a,
|
|
1375
|
-
placeholder:
|
|
1376
|
-
disabled:
|
|
1367
|
+
placeholder: s = "Select token",
|
|
1368
|
+
disabled: l,
|
|
1377
1369
|
className: c,
|
|
1378
|
-
variant:
|
|
1370
|
+
variant: d = "bordered",
|
|
1379
1371
|
size: n = "default"
|
|
1380
1372
|
}) => {
|
|
1381
1373
|
const f = r || (t.length > 0 ? t[0].address : void 0), p = t.find((u) => u.address === f);
|
|
1382
|
-
return
|
|
1374
|
+
return q(() => {
|
|
1383
1375
|
!r && t.length > 0 && a && a(t[0].address);
|
|
1384
|
-
}, [r, t, a]), /* @__PURE__ */
|
|
1376
|
+
}, [r, t, a]), /* @__PURE__ */ o(pe, { value: f, onValueChange: a, disabled: l, children: [
|
|
1385
1377
|
/* @__PURE__ */ e(
|
|
1386
1378
|
xe,
|
|
1387
1379
|
{
|
|
1388
|
-
variant:
|
|
1380
|
+
variant: d,
|
|
1389
1381
|
size: n,
|
|
1390
|
-
className:
|
|
1382
|
+
className: i(
|
|
1391
1383
|
"w-auto min-w-[80px] bg-muted hover:bg-muted/80 rounded-md font-medium",
|
|
1392
1384
|
"focus:ring-2 focus:ring-primary/20 focus:outline-none",
|
|
1393
1385
|
n === "xs" && "min-w-[80px] gap-2",
|
|
@@ -1395,10 +1387,10 @@ const De = ({
|
|
|
1395
1387
|
n === "default" && "min-w-[80px] gap-1.5",
|
|
1396
1388
|
c
|
|
1397
1389
|
),
|
|
1398
|
-
children: p ? /* @__PURE__ */
|
|
1390
|
+
children: p ? /* @__PURE__ */ o(
|
|
1399
1391
|
"div",
|
|
1400
1392
|
{
|
|
1401
|
-
className:
|
|
1393
|
+
className: i(
|
|
1402
1394
|
"flex items-center",
|
|
1403
1395
|
n === "xs" && "gap-2",
|
|
1404
1396
|
n === "sm" && "gap-1.5",
|
|
@@ -1408,7 +1400,7 @@ const De = ({
|
|
|
1408
1400
|
/* @__PURE__ */ e(
|
|
1409
1401
|
"span",
|
|
1410
1402
|
{
|
|
1411
|
-
className:
|
|
1403
|
+
className: i(
|
|
1412
1404
|
"flex items-center justify-center",
|
|
1413
1405
|
n === "xs" && "w-3.5 h-3",
|
|
1414
1406
|
n === "sm" && "w-4 h-3.5",
|
|
@@ -1420,7 +1412,7 @@ const De = ({
|
|
|
1420
1412
|
/* @__PURE__ */ e(
|
|
1421
1413
|
"span",
|
|
1422
1414
|
{
|
|
1423
|
-
className:
|
|
1415
|
+
className: i(
|
|
1424
1416
|
"font-medium",
|
|
1425
1417
|
n === "xs" && "text-xs",
|
|
1426
1418
|
n === "sm" && "text-sm",
|
|
@@ -1434,42 +1426,48 @@ const De = ({
|
|
|
1434
1426
|
) : /* @__PURE__ */ e(
|
|
1435
1427
|
"span",
|
|
1436
1428
|
{
|
|
1437
|
-
className:
|
|
1429
|
+
className: i(
|
|
1438
1430
|
"text-muted-foreground",
|
|
1439
1431
|
n === "xs" && "text-xs",
|
|
1440
1432
|
n === "sm" && "text-sm",
|
|
1441
1433
|
n === "default" && "text-sm"
|
|
1442
1434
|
),
|
|
1443
|
-
children:
|
|
1435
|
+
children: s
|
|
1444
1436
|
}
|
|
1445
1437
|
)
|
|
1446
1438
|
}
|
|
1447
1439
|
),
|
|
1448
|
-
/* @__PURE__ */ e(he, { className: "border border-muted", children: t.map((u) => /* @__PURE__ */ e(ge, { value: u.address, className: "cursor-pointer py-2", children: /* @__PURE__ */
|
|
1449
|
-
/* @__PURE__ */
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1440
|
+
/* @__PURE__ */ e(he, { className: "border border-muted gap-2", children: t.map((u) => /* @__PURE__ */ e(ge, { value: u.address, className: "cursor-pointer py-2", children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: [
|
|
1441
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
1442
|
+
/* @__PURE__ */ e(
|
|
1443
|
+
"span",
|
|
1444
|
+
{
|
|
1445
|
+
className: i(
|
|
1446
|
+
"flex items-center justify-center",
|
|
1447
|
+
n === "xs" && "w-3.5 h-3.5",
|
|
1448
|
+
n === "sm" && "w-4 h-4",
|
|
1449
|
+
n === "default" && "w-5 h-4"
|
|
1450
|
+
),
|
|
1451
|
+
children: u.icon
|
|
1452
|
+
}
|
|
1453
|
+
),
|
|
1454
|
+
/* @__PURE__ */ e(
|
|
1455
|
+
"span",
|
|
1456
|
+
{
|
|
1457
|
+
className: i(
|
|
1458
|
+
"font-medium",
|
|
1459
|
+
n === "xs" && "text-xs",
|
|
1460
|
+
n === "sm" && "text-sm",
|
|
1461
|
+
n === "default" && "text-sm"
|
|
1462
|
+
),
|
|
1463
|
+
children: u.symbol
|
|
1464
|
+
}
|
|
1465
|
+
)
|
|
1466
|
+
] }),
|
|
1467
|
+
/* @__PURE__ */ o("span", { className: "text-white/80 text-xs", children: [
|
|
1468
|
+
"≈ ",
|
|
1469
|
+
u.balance
|
|
1470
|
+
] })
|
|
1473
1471
|
] }) }, u.address)) })
|
|
1474
1472
|
] });
|
|
1475
1473
|
}, Fe = b.forwardRef(
|
|
@@ -1477,10 +1475,10 @@ const De = ({
|
|
|
1477
1475
|
className: t,
|
|
1478
1476
|
value: r = "",
|
|
1479
1477
|
onChange: a,
|
|
1480
|
-
tokens:
|
|
1481
|
-
selectedToken:
|
|
1478
|
+
tokens: s,
|
|
1479
|
+
selectedToken: l,
|
|
1482
1480
|
onTokenChange: c,
|
|
1483
|
-
usdValue:
|
|
1481
|
+
usdValue: d,
|
|
1484
1482
|
balance: n,
|
|
1485
1483
|
onMaxClick: f,
|
|
1486
1484
|
placeholder: p = "0",
|
|
@@ -1489,12 +1487,12 @@ const De = ({
|
|
|
1489
1487
|
isWalletConnected: x = !0,
|
|
1490
1488
|
...g
|
|
1491
1489
|
}, k) => {
|
|
1492
|
-
const y =
|
|
1490
|
+
const y = s.find((S) => S.address === l), _ = (S) => {
|
|
1493
1491
|
const z = S.target.value;
|
|
1494
1492
|
/^\d*\.?\d*$/.test(z) && (a == null || a(z));
|
|
1495
1493
|
};
|
|
1496
|
-
return x ? /* @__PURE__ */
|
|
1497
|
-
/* @__PURE__ */
|
|
1494
|
+
return x ? /* @__PURE__ */ o(w, { ref: k, className: i("space-y-3", u && "opacity-50", t), ...g, children: [
|
|
1495
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-3", children: [
|
|
1498
1496
|
/* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
|
|
1499
1497
|
G,
|
|
1500
1498
|
{
|
|
@@ -1509,8 +1507,8 @@ const De = ({
|
|
|
1509
1507
|
!m && /* @__PURE__ */ e(
|
|
1510
1508
|
De,
|
|
1511
1509
|
{
|
|
1512
|
-
tokens:
|
|
1513
|
-
value:
|
|
1510
|
+
tokens: s,
|
|
1511
|
+
value: l,
|
|
1514
1512
|
onValueChange: c,
|
|
1515
1513
|
disabled: u,
|
|
1516
1514
|
placeholder: "Select token",
|
|
@@ -1520,13 +1518,13 @@ const De = ({
|
|
|
1520
1518
|
}
|
|
1521
1519
|
)
|
|
1522
1520
|
] }),
|
|
1523
|
-
/* @__PURE__ */
|
|
1524
|
-
/* @__PURE__ */ e("div", { children:
|
|
1525
|
-
"≈
|
|
1526
|
-
|
|
1521
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: [
|
|
1522
|
+
/* @__PURE__ */ e("div", { children: d && /* @__PURE__ */ o("span", { children: [
|
|
1523
|
+
"≈ ",
|
|
1524
|
+
d
|
|
1527
1525
|
] }) }),
|
|
1528
|
-
/* @__PURE__ */
|
|
1529
|
-
n && /* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
1527
|
+
n && /* @__PURE__ */ o("span", { className: "text-xs", children: [
|
|
1530
1528
|
"Balance: ",
|
|
1531
1529
|
n,
|
|
1532
1530
|
" ",
|
|
@@ -1538,7 +1536,7 @@ const De = ({
|
|
|
1538
1536
|
variant: "default",
|
|
1539
1537
|
size: "xs",
|
|
1540
1538
|
onClick: f,
|
|
1541
|
-
className:
|
|
1539
|
+
className: i(
|
|
1542
1540
|
"cursor-pointer hover:bg-primary hover:text-primary-foreground transition-colors text-xs px-2 py-0.5 h-5",
|
|
1543
1541
|
u && "cursor-not-allowed opacity-50"
|
|
1544
1542
|
),
|
|
@@ -1551,7 +1549,7 @@ const De = ({
|
|
|
1551
1549
|
w,
|
|
1552
1550
|
{
|
|
1553
1551
|
ref: k,
|
|
1554
|
-
className:
|
|
1552
|
+
className: i("flex items-center justify-center py-8", t),
|
|
1555
1553
|
...g,
|
|
1556
1554
|
children: /* @__PURE__ */ e("div", { className: "text-center", children: /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Connect your wallet to continue" }) })
|
|
1557
1555
|
}
|
|
@@ -1564,37 +1562,37 @@ const Pe = b.forwardRef(
|
|
|
1564
1562
|
className: t,
|
|
1565
1563
|
swapFee: r,
|
|
1566
1564
|
slippageInUsd: a,
|
|
1567
|
-
deposit:
|
|
1568
|
-
receive:
|
|
1565
|
+
deposit: s,
|
|
1566
|
+
receive: l,
|
|
1569
1567
|
equivalentInUsd: c,
|
|
1570
|
-
networkFee:
|
|
1568
|
+
networkFee: d,
|
|
1571
1569
|
networkFeeInUsd: n,
|
|
1572
1570
|
defaultOpen: f = !1,
|
|
1573
1571
|
slippageSelector: p,
|
|
1574
1572
|
...u
|
|
1575
1573
|
}, m) => {
|
|
1576
1574
|
const [x, g] = b.useState(f);
|
|
1577
|
-
return /* @__PURE__ */
|
|
1578
|
-
/* @__PURE__ */
|
|
1575
|
+
return /* @__PURE__ */ o(w, { ref: m, className: i("overflow-hidden", t), ...u, children: [
|
|
1576
|
+
/* @__PURE__ */ o(
|
|
1579
1577
|
"button",
|
|
1580
1578
|
{
|
|
1581
1579
|
onClick: () => g(!x),
|
|
1582
1580
|
className: "w-full flex items-center justify-between p-1 hover:bg-muted/50 transition-colors",
|
|
1583
1581
|
children: [
|
|
1584
|
-
/* @__PURE__ */
|
|
1585
|
-
/* @__PURE__ */
|
|
1586
|
-
|
|
1582
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
1583
|
+
/* @__PURE__ */ o("span", { className: "text-sm font-medium", children: [
|
|
1584
|
+
s,
|
|
1587
1585
|
" = ",
|
|
1588
|
-
|
|
1586
|
+
l
|
|
1589
1587
|
] }),
|
|
1590
|
-
/* @__PURE__ */
|
|
1588
|
+
/* @__PURE__ */ o("span", { className: "text-xs text-muted-foreground", children: [
|
|
1591
1589
|
"(≈ $",
|
|
1592
1590
|
c,
|
|
1593
1591
|
")"
|
|
1594
1592
|
] })
|
|
1595
1593
|
] }),
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
/* @__PURE__ */
|
|
1594
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
|
|
1595
|
+
/* @__PURE__ */ o("span", { className: "text-xs text-muted-foreground", children: [
|
|
1598
1596
|
"≈ $",
|
|
1599
1597
|
a
|
|
1600
1598
|
] }),
|
|
@@ -1603,20 +1601,20 @@ const Pe = b.forwardRef(
|
|
|
1603
1601
|
]
|
|
1604
1602
|
}
|
|
1605
1603
|
),
|
|
1606
|
-
x && /* @__PURE__ */
|
|
1604
|
+
x && /* @__PURE__ */ o("div", { className: "transition-all animate-in fade-in-0 duration-300 px-2 py-4 space-y-2", children: [
|
|
1607
1605
|
p && /* @__PURE__ */ e("div", { className: "text-sm", children: p }),
|
|
1608
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between text-sm", children: [
|
|
1609
1607
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground text-xs", children: "Swap Fee" }),
|
|
1610
|
-
r ? /* @__PURE__ */
|
|
1608
|
+
r ? /* @__PURE__ */ o("span", { className: "font-medium", children: [
|
|
1611
1609
|
r,
|
|
1612
1610
|
"%"
|
|
1613
1611
|
] }) : /* @__PURE__ */ e("span", { className: "text-xs px-2 py-1 bg-primary/10 text-primary rounded-full font-medium", children: "FREE" })
|
|
1614
1612
|
] }),
|
|
1615
|
-
!!
|
|
1613
|
+
!!d && /* @__PURE__ */ o("div", { className: "flex items-center justify-between text-sm", children: [
|
|
1616
1614
|
/* @__PURE__ */ e("span", { className: "text-muted-foreground text-xs", children: "Network Fee" }),
|
|
1617
|
-
/* @__PURE__ */
|
|
1618
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-foreground", children:
|
|
1619
|
-
n && /* @__PURE__ */
|
|
1615
|
+
/* @__PURE__ */ o("span", { className: "font-medium", children: [
|
|
1616
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-foreground", children: d }),
|
|
1617
|
+
n && /* @__PURE__ */ o("span", { className: "text-xs text-muted-foreground", children: [
|
|
1620
1618
|
"(≈ $",
|
|
1621
1619
|
n,
|
|
1622
1620
|
")"
|
|
@@ -1629,12 +1627,12 @@ const Pe = b.forwardRef(
|
|
|
1629
1627
|
);
|
|
1630
1628
|
Pe.displayName = "SwapDetails";
|
|
1631
1629
|
const xt = ({ className: t, tokens: r = [], defaultOpen: a = !1 }) => {
|
|
1632
|
-
const [
|
|
1633
|
-
return r.length === 0 ? null : /* @__PURE__ */
|
|
1634
|
-
/* @__PURE__ */
|
|
1630
|
+
const [s, l] = b.useState(a), c = (d) => /* @__PURE__ */ e("div", { className: "w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center", children: /* @__PURE__ */ e("span", { className: "text-xs font-bold text-primary", children: d.charAt(0) }) });
|
|
1631
|
+
return r.length === 0 ? null : /* @__PURE__ */ o(w, { className: i("overflow-hidden", t), children: [
|
|
1632
|
+
/* @__PURE__ */ o(
|
|
1635
1633
|
"button",
|
|
1636
1634
|
{
|
|
1637
|
-
onClick: () =>
|
|
1635
|
+
onClick: () => l(!s),
|
|
1638
1636
|
className: "w-full flex items-center justify-between p-1 hover:bg-muted/50 transition-colors",
|
|
1639
1637
|
children: [
|
|
1640
1638
|
/* @__PURE__ */ e("span", { className: "text-xs font-medium", children: "Swap Route" }),
|
|
@@ -1642,41 +1640,41 @@ const xt = ({ className: t, tokens: r = [], defaultOpen: a = !1 }) => {
|
|
|
1642
1640
|
]
|
|
1643
1641
|
}
|
|
1644
1642
|
),
|
|
1645
|
-
|
|
1643
|
+
s && /* @__PURE__ */ e("div", { className: "px-3 pb-3", children: /* @__PURE__ */ e(ue, { className: "rounded-md whitespace-nowrap", children: /* @__PURE__ */ e("div", { className: "flex flex-row items-center justify-center gap-2 overflow-x-auto py-2 w-full", children: r.map((d, n) => /* @__PURE__ */ o(b.Fragment, { children: [
|
|
1646
1644
|
/* @__PURE__ */ e(w, { variant: "item", className: "rounded-full flex-shrink-0 p-2", children: /* @__PURE__ */ e(
|
|
1647
|
-
|
|
1645
|
+
I,
|
|
1648
1646
|
{
|
|
1649
|
-
icon:
|
|
1647
|
+
icon: d.icon || c(d.symbol),
|
|
1650
1648
|
textSize: "xs",
|
|
1651
1649
|
iconSize: "xs",
|
|
1652
|
-
children: /* @__PURE__ */ e("span", { className: "gap-2", children:
|
|
1650
|
+
children: /* @__PURE__ */ e("span", { className: "gap-2", children: d.symbol })
|
|
1653
1651
|
}
|
|
1654
1652
|
) }),
|
|
1655
1653
|
n < r.length - 1 && /* @__PURE__ */ e(oe, { className: "w-3 h-3 text-primary flex-shrink-0" })
|
|
1656
|
-
] }, `${
|
|
1654
|
+
] }, `${d.symbol}-${n}`)) }) }) })
|
|
1657
1655
|
] });
|
|
1658
1656
|
};
|
|
1659
1657
|
function ht({ value: t, onChange: r }) {
|
|
1660
|
-
const [a,
|
|
1661
|
-
|
|
1658
|
+
const [a, s] = j(!1), [l, c] = j(t.toString()), d = () => {
|
|
1659
|
+
s(!0), c(t.toString());
|
|
1662
1660
|
}, n = (m) => {
|
|
1663
1661
|
const x = m.target.value;
|
|
1664
1662
|
/^\d*\.?\d*$/.test(x) && c(x);
|
|
1665
1663
|
}, f = () => {
|
|
1666
|
-
const m = parseFloat(
|
|
1667
|
-
!isNaN(m) && m >= 0.1 && m <= 100 ? (r(m),
|
|
1664
|
+
const m = parseFloat(l);
|
|
1665
|
+
!isNaN(m) && m >= 0.1 && m <= 100 ? (r(m), s(!1)) : (c(t.toString()), s(!1));
|
|
1668
1666
|
};
|
|
1669
|
-
return /* @__PURE__ */
|
|
1667
|
+
return /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
1670
1668
|
/* @__PURE__ */ e("span", { className: "text-xs font-medium text-muted-foreground", children: "Max Slippage" }),
|
|
1671
|
-
/* @__PURE__ */
|
|
1669
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
|
|
1672
1670
|
a ? /* @__PURE__ */ e(
|
|
1673
1671
|
"input",
|
|
1674
1672
|
{
|
|
1675
1673
|
type: "text",
|
|
1676
|
-
value:
|
|
1674
|
+
value: l,
|
|
1677
1675
|
onChange: n,
|
|
1678
1676
|
onKeyDown: (m) => {
|
|
1679
|
-
m.key === "Enter" ? f() : m.key === "Escape" && (c(t.toString()),
|
|
1677
|
+
m.key === "Enter" ? f() : m.key === "Escape" && (c(t.toString()), s(!1));
|
|
1680
1678
|
},
|
|
1681
1679
|
onBlur: () => {
|
|
1682
1680
|
f();
|
|
@@ -1684,14 +1682,14 @@ function ht({ value: t, onChange: r }) {
|
|
|
1684
1682
|
className: "w-10 h-5 text-xs text-right bg-transparent border-none outline-none text-foreground focus:ring-0",
|
|
1685
1683
|
autoFocus: !0
|
|
1686
1684
|
}
|
|
1687
|
-
) : /* @__PURE__ */
|
|
1685
|
+
) : /* @__PURE__ */ o("span", { className: "text-xs font-medium text-foreground", children: [
|
|
1688
1686
|
t,
|
|
1689
1687
|
"%"
|
|
1690
1688
|
] }),
|
|
1691
1689
|
/* @__PURE__ */ e(
|
|
1692
1690
|
"button",
|
|
1693
1691
|
{
|
|
1694
|
-
onClick:
|
|
1692
|
+
onClick: d,
|
|
1695
1693
|
className: "p-1 hover:bg-muted rounded text-muted-foreground hover:text-foreground transition-colors",
|
|
1696
1694
|
children: /* @__PURE__ */ e(se, { size: 10 })
|
|
1697
1695
|
}
|
|
@@ -1816,7 +1814,7 @@ export {
|
|
|
1816
1814
|
R as InfoCard,
|
|
1817
1815
|
G as Input,
|
|
1818
1816
|
Ye as Label,
|
|
1819
|
-
|
|
1817
|
+
I as LabelWithIcon,
|
|
1820
1818
|
ft as ManagedTable,
|
|
1821
1819
|
_e as NavigationBar,
|
|
1822
1820
|
Ce as NavigationItem,
|
|
@@ -1830,19 +1828,19 @@ export {
|
|
|
1830
1828
|
he as SelectContent,
|
|
1831
1829
|
Ze as SelectGroup,
|
|
1832
1830
|
ge as SelectItem,
|
|
1833
|
-
|
|
1831
|
+
Xe as SelectLabel,
|
|
1834
1832
|
ve as SelectScrollDownButton,
|
|
1835
1833
|
be as SelectScrollUpButton,
|
|
1836
|
-
|
|
1834
|
+
qe as SelectSeparator,
|
|
1837
1835
|
xe as SelectTrigger,
|
|
1838
|
-
|
|
1839
|
-
|
|
1836
|
+
Ue as SelectValue,
|
|
1837
|
+
Je as Separator,
|
|
1840
1838
|
ht as SlippageSelector,
|
|
1841
1839
|
Pe as SwapDetails,
|
|
1842
1840
|
Fe as SwapInput,
|
|
1843
1841
|
et as Switch,
|
|
1844
1842
|
pt as TableCell,
|
|
1845
|
-
|
|
1843
|
+
Qe as Toaster,
|
|
1846
1844
|
tt as Toggle,
|
|
1847
1845
|
rt as ToggleGroup,
|
|
1848
1846
|
at as ToggleGroupItem,
|
|
@@ -1855,7 +1853,7 @@ export {
|
|
|
1855
1853
|
Ne as buttonVariants,
|
|
1856
1854
|
T as cardVariants,
|
|
1857
1855
|
we as chipVariants,
|
|
1858
|
-
|
|
1856
|
+
i as cn,
|
|
1859
1857
|
ke as iconAnimationVariants,
|
|
1860
1858
|
A as inputVariants,
|
|
1861
1859
|
Se as labelWithIconVariants,
|