@deframe-sdk/components 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +91 -113
- package/dist/index.d.ts +91 -113
- package/dist/index.js +672 -747
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +674 -745
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1041 -934
- package/package.json +4 -1
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { twMerge } from 'tailwind-merge';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import * as React6 from 'react';
|
|
4
|
-
import React6__default, { useState, useEffect
|
|
4
|
+
import React6__default, { useState, useEffect } from 'react';
|
|
5
5
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
6
6
|
import { MdClose, MdOutlineSearch, MdOutlineSearchOff, MdOutlineSwapHoriz, MdHistory, MdCheckCircleOutline, MdErrorOutline, MdWarningAmber, MdInfoOutline } from 'react-icons/md';
|
|
7
|
-
import { HiChevronUp, HiChevronDown, HiChevronLeft,
|
|
7
|
+
import { HiChevronUp, HiChevronDown, HiChevronLeft, HiArrowRight, HiXMark } from 'react-icons/hi2';
|
|
8
8
|
import { IoAlertCircleOutline, IoTimeOutline, IoCheckmarkOutline } from 'react-icons/io5';
|
|
9
9
|
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
@@ -50,24 +50,30 @@ function ActionButton(_a) {
|
|
|
50
50
|
"className",
|
|
51
51
|
"type"
|
|
52
52
|
]);
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
const baseClasses = [
|
|
54
|
+
"flex-1 inline-flex items-center justify-center overflow-hidden",
|
|
55
|
+
"h-[var(--deframe-widget-font-leading-lg)]",
|
|
56
|
+
"px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)]",
|
|
57
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
58
|
+
"border border-[color:var(--deframe-widget-color-border-tertiary)]",
|
|
59
|
+
"font-[var(--deframe-widget-font-family)] [font-size:var(--deframe-widget-font-size-lg)] [line-height:var(--deframe-widget-font-leading-lg)] [font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
60
|
+
"transition-[background,border-color,box-shadow,opacity] duration-200",
|
|
61
|
+
"focus:outline-none focus:ring-2 focus:ring-[color:var(--deframe-widget-color-brand-primary)]"
|
|
62
|
+
].join(" ");
|
|
63
|
+
const stateClasses = disabled ? [
|
|
64
|
+
"cursor-not-allowed",
|
|
65
|
+
"bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
66
|
+
"text-[color:var(--deframe-widget-color-text-primary-disabled)]"
|
|
67
|
+
].join(" ") : [
|
|
68
|
+
"cursor-pointer",
|
|
69
|
+
"bg-[var(--deframe-widget-color-brand-primary)]",
|
|
70
|
+
"text-[color:var(--deframe-widget-color-text-primary-dark)]",
|
|
71
|
+
"hover:opacity-90",
|
|
72
|
+
"hover:shadow-[0_2px_8px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_18%,transparent)]"
|
|
73
|
+
].join(" ");
|
|
68
74
|
const containerClasses = twMerge(
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
baseClasses,
|
|
76
|
+
stateClasses,
|
|
71
77
|
className
|
|
72
78
|
);
|
|
73
79
|
return /* @__PURE__ */ jsx(
|
|
@@ -77,7 +83,7 @@ function ActionButton(_a) {
|
|
|
77
83
|
className: containerClasses,
|
|
78
84
|
disabled
|
|
79
85
|
}, props), {
|
|
80
|
-
children
|
|
86
|
+
children
|
|
81
87
|
})
|
|
82
88
|
);
|
|
83
89
|
}
|
|
@@ -94,7 +100,13 @@ function PercentageButton(_a) {
|
|
|
94
100
|
"type"
|
|
95
101
|
]);
|
|
96
102
|
const containerClasses = twMerge(
|
|
97
|
-
"flex-1
|
|
103
|
+
"flex-1 inline-flex items-center justify-center",
|
|
104
|
+
"px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)]",
|
|
105
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
106
|
+
"border border-[color:var(--deframe-widget-color-border-tertiary)]",
|
|
107
|
+
"bg-[var(--deframe-widget-color-bg-tertiary)] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
108
|
+
"font-[var(--deframe-widget-font-family)] [font-size:var(--deframe-widget-font-size-lg)] [line-height:var(--deframe-widget-font-leading-lg)] [font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
109
|
+
"hover:border-[color:var(--deframe-widget-color-border-secondary)] focus:outline-none focus:ring-2 focus:ring-[color:var(--deframe-widget-color-brand-primary)]",
|
|
98
110
|
disabled && "cursor-not-allowed",
|
|
99
111
|
className
|
|
100
112
|
);
|
|
@@ -125,7 +137,7 @@ function PrimaryButton(_a) {
|
|
|
125
137
|
/** layout */
|
|
126
138
|
"overflow-hidden w-full flex items-center justify-center transition-all duration-200",
|
|
127
139
|
/** typography */
|
|
128
|
-
"font-[var(--deframe-widget-font-family
|
|
140
|
+
"font-[var(--deframe-widget-font-family)]",
|
|
129
141
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
130
142
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
131
143
|
"[font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
@@ -189,7 +201,7 @@ function SecondaryButton(_a) {
|
|
|
189
201
|
/** layout */
|
|
190
202
|
"overflow-hidden w-full flex items-center justify-center transition-all duration-200",
|
|
191
203
|
/** typography */
|
|
192
|
-
"font-[var(--deframe-widget-font-family
|
|
204
|
+
"font-[var(--deframe-widget-font-family)]",
|
|
193
205
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
194
206
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
195
207
|
"[font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
@@ -250,7 +262,7 @@ function TertiaryButton(_a) {
|
|
|
250
262
|
/** layout */
|
|
251
263
|
"overflow-hidden w-full flex items-center justify-center transition-all duration-200",
|
|
252
264
|
/** typography */
|
|
253
|
-
"font-[var(--deframe-widget-font-family
|
|
265
|
+
"font-[var(--deframe-widget-font-family)]",
|
|
254
266
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
255
267
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
256
268
|
"[font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
@@ -310,7 +322,7 @@ function Input(_a) {
|
|
|
310
322
|
function InputLabel(_a) {
|
|
311
323
|
var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
|
|
312
324
|
const baseClasses = [
|
|
313
|
-
"[font-family:var(--deframe-widget-font-family
|
|
325
|
+
"[font-family:var(--deframe-widget-font-family)]",
|
|
314
326
|
"[font-size:var(--deframe-widget-font-size-xs)]",
|
|
315
327
|
"[font-weight:var(--deframe-widget-font-weight-medium)]",
|
|
316
328
|
"text-[var(--deframe-widget-color-text-primary)]"
|
|
@@ -328,7 +340,7 @@ function InputField(_a) {
|
|
|
328
340
|
var _b = _a, { hasError = false, disabled, className = "" } = _b, props = __objRest(_b, ["hasError", "disabled", "className"]);
|
|
329
341
|
const baseClasses = [
|
|
330
342
|
"w-full",
|
|
331
|
-
"[font-family:var(--deframe-widget-font-family
|
|
343
|
+
"[font-family:var(--deframe-widget-font-family)]",
|
|
332
344
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
333
345
|
"[font-weight:var(--deframe-widget-font-weight-regular)]",
|
|
334
346
|
"text-[var(--deframe-widget-color-text-primary)]",
|
|
@@ -384,19 +396,19 @@ function Link(_a) {
|
|
|
384
396
|
"scroll"
|
|
385
397
|
]);
|
|
386
398
|
const baseClasses = [
|
|
387
|
-
"[font-family:var(--deframe-widget-font-family
|
|
399
|
+
"[font-family:var(--deframe-widget-font-family)]",
|
|
388
400
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
389
401
|
"[font-weight:var(--deframe-widget-font-weight-medium)]",
|
|
390
402
|
"[line-height:var(--deframe-widget-font-leading-lg)]"
|
|
391
403
|
].join(" ");
|
|
392
404
|
const stateClasses = {
|
|
393
405
|
enabled: [
|
|
394
|
-
"text-[var(--deframe-widget-color-
|
|
406
|
+
"text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
395
407
|
"underline",
|
|
396
408
|
"cursor-pointer"
|
|
397
409
|
].join(" "),
|
|
398
410
|
disabled: [
|
|
399
|
-
"text-[var(--deframe-widget-color-
|
|
411
|
+
"text-[var(--deframe-widget-color-brand-primary-disabled)]",
|
|
400
412
|
"cursor-not-allowed",
|
|
401
413
|
"pointer-events-none"
|
|
402
414
|
].join(" ")
|
|
@@ -474,7 +486,8 @@ function Input2(_a) {
|
|
|
474
486
|
className: "text-right",
|
|
475
487
|
children: /* @__PURE__ */ jsx(Link_default, { href, disabled, children: repassword })
|
|
476
488
|
}
|
|
477
|
-
)
|
|
489
|
+
),
|
|
490
|
+
error && /* @__PURE__ */ jsx("p", { className: "mt-[var(--deframe-widget-size-gap-xs)] text-[color:var(--deframe-widget-color-state-error)] [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", children: error })
|
|
478
491
|
] });
|
|
479
492
|
}
|
|
480
493
|
function ListItem(_a) {
|
|
@@ -483,52 +496,32 @@ function ListItem(_a) {
|
|
|
483
496
|
className,
|
|
484
497
|
containerClassName,
|
|
485
498
|
onClick
|
|
486
|
-
} = _b
|
|
499
|
+
} = _b; __objRest(_b, [
|
|
487
500
|
"children",
|
|
488
501
|
"className",
|
|
489
502
|
"containerClassName",
|
|
490
503
|
"onClick"
|
|
491
504
|
]);
|
|
492
|
-
const baseClasses = [
|
|
493
|
-
"self-stretch min-h-16 relative",
|
|
494
|
-
"rounded-[var(--deframe-widget-size-radius-xs)]",
|
|
495
|
-
"border-[length:var(--deframe-widget-size-border-xs)]",
|
|
496
|
-
"border-[var(--deframe-widget-color-border-primary)]",
|
|
497
|
-
"flex flex-col justify-center items-center",
|
|
498
|
-
"transition-colors",
|
|
499
|
-
"bg-[var(--deframe-widget-color-bg-primary)]"
|
|
500
|
-
].join(" ");
|
|
501
|
-
const stateClasses = {
|
|
502
|
-
clickable: "cursor-pointer hover:border-[var(--deframe-widget-color-border-secondary)]",
|
|
503
|
-
static: ""
|
|
504
|
-
};
|
|
505
505
|
const containerClasses = twMerge(
|
|
506
|
-
|
|
507
|
-
|
|
506
|
+
"self-stretch min-h-16 relative rounded-[var(--deframe-widget-size-radius-sm)] border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
507
|
+
"text-[color:var(--deframe-widget-color-text-primary)] flex flex-col justify-center items-center transition-colors",
|
|
508
|
+
"hover:border-[color:var(--deframe-widget-color-border-primary)] bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
509
|
+
onClick && "cursor-pointer",
|
|
508
510
|
containerClassName
|
|
509
511
|
);
|
|
510
|
-
|
|
511
|
-
"
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
className: containerClasses,
|
|
524
|
-
onClick,
|
|
525
|
-
tabIndex: onClick ? 0 : void 0,
|
|
526
|
-
role: onClick ? "button" : void 0,
|
|
527
|
-
onKeyDown: onClick ? (e) => e.key === "Enter" && onClick() : void 0
|
|
528
|
-
}, props), {
|
|
529
|
-
children: /* @__PURE__ */ jsx("div", { className: innerClasses, children })
|
|
530
|
-
})
|
|
531
|
-
);
|
|
512
|
+
return /* @__PURE__ */ jsx("div", { className: containerClasses, onClick, children: /* @__PURE__ */ jsx(
|
|
513
|
+
"div",
|
|
514
|
+
{
|
|
515
|
+
className: twMerge(
|
|
516
|
+
"self-stretch inline-flex justify-between items-center",
|
|
517
|
+
"gap-[var(--deframe-widget-size-gap-md)]",
|
|
518
|
+
"px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-sm)]",
|
|
519
|
+
"text-[color:var(--deframe-widget-color-text-primary)]",
|
|
520
|
+
className
|
|
521
|
+
),
|
|
522
|
+
children
|
|
523
|
+
}
|
|
524
|
+
) });
|
|
532
525
|
}
|
|
533
526
|
function ListItemLeftSide(_a) {
|
|
534
527
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
@@ -585,7 +578,292 @@ function WalletListContainer({
|
|
|
585
578
|
children,
|
|
586
579
|
className
|
|
587
580
|
}) {
|
|
588
|
-
return /* @__PURE__ */ jsx(
|
|
581
|
+
return /* @__PURE__ */ jsx(
|
|
582
|
+
"div",
|
|
583
|
+
{
|
|
584
|
+
"data-slot": "wallet-list-container",
|
|
585
|
+
className: twMerge("w-full flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", className),
|
|
586
|
+
children
|
|
587
|
+
}
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
function WalletItem({
|
|
591
|
+
id,
|
|
592
|
+
name,
|
|
593
|
+
icon,
|
|
594
|
+
onClick,
|
|
595
|
+
className
|
|
596
|
+
}) {
|
|
597
|
+
return /* @__PURE__ */ jsxs(
|
|
598
|
+
"button",
|
|
599
|
+
{
|
|
600
|
+
"data-slot": "wallet-item",
|
|
601
|
+
"data-test-id": "wallet-item",
|
|
602
|
+
"aria-label": `Connect ${name} wallet`,
|
|
603
|
+
onClick,
|
|
604
|
+
className: twMerge(
|
|
605
|
+
"w-full flex items-center gap-[var(--deframe-widget-size-gap-sm)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
|
|
606
|
+
"bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
607
|
+
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
608
|
+
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)] active:scale-[0.99]",
|
|
609
|
+
"transition-[background,border-color] duration-150",
|
|
610
|
+
"cursor-pointer outline-none text-left",
|
|
611
|
+
"font-[var(--deframe-widget-font-family)]",
|
|
612
|
+
className
|
|
613
|
+
),
|
|
614
|
+
children: [
|
|
615
|
+
/* @__PURE__ */ jsx(
|
|
616
|
+
"div",
|
|
617
|
+
{
|
|
618
|
+
"data-slot": "wallet-item-icon",
|
|
619
|
+
"data-test-id": "wallet-item-icon",
|
|
620
|
+
className: "shrink-0 w-12 h-12 rounded-[var(--deframe-widget-size-radius-full)] overflow-hidden flex items-center justify-center",
|
|
621
|
+
children: typeof icon === "string" ? /* @__PURE__ */ jsx(
|
|
622
|
+
"img",
|
|
623
|
+
{
|
|
624
|
+
src: icon,
|
|
625
|
+
alt: name,
|
|
626
|
+
className: "object-cover w-full h-full"
|
|
627
|
+
}
|
|
628
|
+
) : icon
|
|
629
|
+
}
|
|
630
|
+
),
|
|
631
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 text-[17px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[1.3] [font-family:inherit]", children: name }),
|
|
632
|
+
/* @__PURE__ */ jsx(
|
|
633
|
+
"svg",
|
|
634
|
+
{
|
|
635
|
+
"data-slot": "wallet-item-chevron",
|
|
636
|
+
"data-test-id": "wallet-item-chevron",
|
|
637
|
+
fill: "none",
|
|
638
|
+
"aria-hidden": "true",
|
|
639
|
+
className: "flex-shrink-0 text-(--deframe-widget-color-text-secondary)",
|
|
640
|
+
children: /* @__PURE__ */ jsx(
|
|
641
|
+
"path",
|
|
642
|
+
{
|
|
643
|
+
d: "M7.5 5L12.5 10L7.5 15",
|
|
644
|
+
stroke: "currentColor",
|
|
645
|
+
strokeWidth: "1.5",
|
|
646
|
+
strokeLinecap: "round",
|
|
647
|
+
strokeLinejoin: "round"
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
}
|
|
651
|
+
)
|
|
652
|
+
]
|
|
653
|
+
},
|
|
654
|
+
id
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
function ConnectWalletList({
|
|
658
|
+
wallets,
|
|
659
|
+
title,
|
|
660
|
+
subtitle,
|
|
661
|
+
className
|
|
662
|
+
}) {
|
|
663
|
+
return /* @__PURE__ */ jsxs(
|
|
664
|
+
"div",
|
|
665
|
+
{
|
|
666
|
+
"data-slot": "connect-wallet-list",
|
|
667
|
+
className: twMerge("w-full flex flex-col gap-[var(--deframe-widget-size-gap-md)]", className),
|
|
668
|
+
children: [
|
|
669
|
+
(title != null || subtitle != null) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
670
|
+
title != null && /* @__PURE__ */ jsx("h2", { className: "text-[color:var(--deframe-widget-color-text-primary)] text-[20px] [font-weight:var(--deframe-widget-font-weight-bold)] leading-[1.25] font-[var(--deframe-widget-font-family)]", children: title }),
|
|
671
|
+
subtitle != null && /* @__PURE__ */ jsx("p", { className: "text-[color:var(--deframe-widget-color-text-secondary)] text-[14px] leading-[1.5] font-[var(--deframe-widget-font-family)]", children: subtitle })
|
|
672
|
+
] }),
|
|
673
|
+
/* @__PURE__ */ jsx(WalletListContainer, { children: wallets.map((wallet) => /* @__PURE__ */ jsx(
|
|
674
|
+
WalletItem,
|
|
675
|
+
{
|
|
676
|
+
id: wallet.id,
|
|
677
|
+
name: wallet.name,
|
|
678
|
+
icon: wallet.icon,
|
|
679
|
+
onClick: () => {
|
|
680
|
+
var _a;
|
|
681
|
+
return (_a = wallet.onClick) == null ? void 0 : _a.call(wallet);
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
wallet.id
|
|
685
|
+
)) })
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
function WalletConnectPanel({
|
|
691
|
+
wallets,
|
|
692
|
+
title,
|
|
693
|
+
subtitle,
|
|
694
|
+
onClose,
|
|
695
|
+
className
|
|
696
|
+
}) {
|
|
697
|
+
return /* @__PURE__ */ jsxs(
|
|
698
|
+
"div",
|
|
699
|
+
{
|
|
700
|
+
"data-slot": "wallet-connect-panel",
|
|
701
|
+
"data-test-id": "wallet-connect-panel",
|
|
702
|
+
className: twMerge(
|
|
703
|
+
"w-full flex flex-col gap-[var(--deframe-widget-size-gap-md)] px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)]",
|
|
704
|
+
"bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
705
|
+
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
706
|
+
"font-[var(--deframe-widget-font-family)]",
|
|
707
|
+
className
|
|
708
|
+
),
|
|
709
|
+
children: [
|
|
710
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-[var(--deframe-widget-size-gap-md)]", children: [
|
|
711
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[color:var(--deframe-widget-color-text-primary)] text-[20px] [font-weight:var(--deframe-widget-font-weight-bold)] leading-[1.25] [font-family:inherit]", children: title != null ? title : "Conectar Carteira" }),
|
|
712
|
+
onClose != null && /* @__PURE__ */ jsx(
|
|
713
|
+
"button",
|
|
714
|
+
{
|
|
715
|
+
type: "button",
|
|
716
|
+
"data-slot": "wallet-connect-close",
|
|
717
|
+
"data-test-id": "wallet-connect-close",
|
|
718
|
+
onClick: onClose,
|
|
719
|
+
className: twMerge(
|
|
720
|
+
"text-[color:var(--deframe-widget-color-text-secondary)] text-[15px] [font-weight:var(--deframe-widget-font-weight-medium)] leading-none",
|
|
721
|
+
"hover:text-[color:var(--deframe-widget-color-text-primary)] transition-colors duration-150",
|
|
722
|
+
"cursor-pointer outline-none bg-transparent border-none px-[var(--deframe-widget-size-padding-x-none)] py-[var(--deframe-widget-size-padding-y-none)]",
|
|
723
|
+
"flex-shrink-0 [font-family:inherit]"
|
|
724
|
+
),
|
|
725
|
+
children: "Sair"
|
|
726
|
+
}
|
|
727
|
+
)
|
|
728
|
+
] }),
|
|
729
|
+
/* @__PURE__ */ jsx("p", { className: "text-[color:var(--deframe-widget-color-text-secondary)] text-[14px] leading-[1.5] [font-family:inherit] -mt-[var(--deframe-widget-size-gap-sm)]", children: subtitle != null ? subtitle : "Escolha sua carteira preferida para conectar" }),
|
|
730
|
+
/* @__PURE__ */ jsx(WalletListContainer, { children: wallets.map((wallet) => /* @__PURE__ */ jsx(
|
|
731
|
+
WalletItem,
|
|
732
|
+
{
|
|
733
|
+
id: wallet.id,
|
|
734
|
+
name: wallet.name,
|
|
735
|
+
icon: wallet.icon,
|
|
736
|
+
onClick: () => {
|
|
737
|
+
var _a;
|
|
738
|
+
return (_a = wallet.onClick) == null ? void 0 : _a.call(wallet);
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
wallet.id
|
|
742
|
+
)) })
|
|
743
|
+
]
|
|
744
|
+
}
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
var CURRENCY_CONFIG = {
|
|
748
|
+
symbols: {
|
|
749
|
+
USD: "$",
|
|
750
|
+
BRL: "R$",
|
|
751
|
+
EUR: "\u20AC",
|
|
752
|
+
BTC: "\u20BF",
|
|
753
|
+
ETH: "\u039E",
|
|
754
|
+
USDC: "$",
|
|
755
|
+
USDT: "$"
|
|
756
|
+
},
|
|
757
|
+
labels: {
|
|
758
|
+
USD: "USD",
|
|
759
|
+
BRL: "BRL",
|
|
760
|
+
EUR: "EUR",
|
|
761
|
+
BTC: "BTC",
|
|
762
|
+
ETH: "ETH",
|
|
763
|
+
USDC: "USDC",
|
|
764
|
+
USDT: "USDT"
|
|
765
|
+
}
|
|
766
|
+
};
|
|
767
|
+
var STYLE_CONFIG = {
|
|
768
|
+
alignment: {
|
|
769
|
+
left: "items-start",
|
|
770
|
+
center: "items-center",
|
|
771
|
+
right: "items-end"
|
|
772
|
+
},
|
|
773
|
+
size: {
|
|
774
|
+
sm: {
|
|
775
|
+
primary: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)]",
|
|
776
|
+
secondary: "[font-size:var(--deframe-widget-font-size-lg)] [line-height:var(--deframe-widget-font-leading-lg)]",
|
|
777
|
+
gap: "gap-[var(--deframe-widget-size-gap-xs)]"
|
|
778
|
+
},
|
|
779
|
+
md: {
|
|
780
|
+
primary: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)]",
|
|
781
|
+
secondary: "[font-size:var(--deframe-widget-font-size-xl)] [line-height:var(--deframe-widget-font-leading-xl)]",
|
|
782
|
+
gap: "gap-[var(--deframe-widget-size-gap-xs)]"
|
|
783
|
+
},
|
|
784
|
+
lg: {
|
|
785
|
+
primary: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)]",
|
|
786
|
+
secondary: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)]",
|
|
787
|
+
gap: "gap-[var(--deframe-widget-size-gap-xs)]"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
};
|
|
791
|
+
function Currency(props) {
|
|
792
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
793
|
+
const normalizedProps = "usdValue" in props ? {
|
|
794
|
+
amount: props.amount,
|
|
795
|
+
currency: "USD",
|
|
796
|
+
secondaryAmount: props.usdValue,
|
|
797
|
+
secondaryCurrency: void 0,
|
|
798
|
+
align: (_a = props.align) != null ? _a : "right",
|
|
799
|
+
size: (_b = props.size) != null ? _b : "lg",
|
|
800
|
+
showSymbol: false,
|
|
801
|
+
showLabel: false,
|
|
802
|
+
className: (_c = props.className) != null ? _c : ""
|
|
803
|
+
} : {
|
|
804
|
+
amount: props.amount,
|
|
805
|
+
currency: (_d = props.currency) != null ? _d : "USD",
|
|
806
|
+
secondaryAmount: props.secondaryAmount,
|
|
807
|
+
secondaryCurrency: props.secondaryCurrency,
|
|
808
|
+
align: (_e = props.align) != null ? _e : "right",
|
|
809
|
+
size: (_f = props.size) != null ? _f : "lg",
|
|
810
|
+
showSymbol: (_g = props.showSymbol) != null ? _g : true,
|
|
811
|
+
showLabel: (_h = props.showLabel) != null ? _h : false,
|
|
812
|
+
className: (_i = props.className) != null ? _i : ""
|
|
813
|
+
};
|
|
814
|
+
const {
|
|
815
|
+
amount,
|
|
816
|
+
currency,
|
|
817
|
+
secondaryAmount,
|
|
818
|
+
secondaryCurrency,
|
|
819
|
+
align,
|
|
820
|
+
size,
|
|
821
|
+
showSymbol,
|
|
822
|
+
showLabel,
|
|
823
|
+
className
|
|
824
|
+
} = normalizedProps;
|
|
825
|
+
const formatAmount = (value, curr, displaySymbol) => {
|
|
826
|
+
if (!displaySymbol && !showLabel) return value;
|
|
827
|
+
const symbol = displaySymbol ? CURRENCY_CONFIG.symbols[curr] : "";
|
|
828
|
+
const label = showLabel ? ` ${CURRENCY_CONFIG.labels[curr]}` : "";
|
|
829
|
+
if (["BTC", "ETH"].includes(curr) && !value.includes(".") && !value.includes(",")) {
|
|
830
|
+
return `${symbol}${value}${label}`;
|
|
831
|
+
}
|
|
832
|
+
return `${symbol} ${value}${label}`.trim();
|
|
833
|
+
};
|
|
834
|
+
return /* @__PURE__ */ jsxs(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
className: twMerge(
|
|
838
|
+
"flex flex-col",
|
|
839
|
+
STYLE_CONFIG.alignment[align],
|
|
840
|
+
STYLE_CONFIG.size[size].gap,
|
|
841
|
+
className
|
|
842
|
+
),
|
|
843
|
+
children: [
|
|
844
|
+
/* @__PURE__ */ jsx(
|
|
845
|
+
"div",
|
|
846
|
+
{
|
|
847
|
+
className: twMerge(
|
|
848
|
+
"[font-weight:var(--deframe-widget-font-weight-bold)] text-[color:var(--deframe-widget-color-text-primary)] font-[var(--deframe-widget-font-family)]",
|
|
849
|
+
STYLE_CONFIG.size[size].primary
|
|
850
|
+
),
|
|
851
|
+
children: formatAmount(amount, currency, showSymbol)
|
|
852
|
+
}
|
|
853
|
+
),
|
|
854
|
+
secondaryAmount && /* @__PURE__ */ jsx(
|
|
855
|
+
"div",
|
|
856
|
+
{
|
|
857
|
+
className: twMerge(
|
|
858
|
+
"text-[color:var(--deframe-widget-color-text-secondary)] font-[var(--deframe-widget-font-family)]",
|
|
859
|
+
STYLE_CONFIG.size[size].secondary
|
|
860
|
+
),
|
|
861
|
+
children: secondaryCurrency ? formatAmount(secondaryAmount, secondaryCurrency, true) : secondaryAmount
|
|
862
|
+
}
|
|
863
|
+
)
|
|
864
|
+
]
|
|
865
|
+
}
|
|
866
|
+
);
|
|
589
867
|
}
|
|
590
868
|
var Text = React6.forwardRef(
|
|
591
869
|
(_a, ref) => {
|
|
@@ -599,7 +877,7 @@ var Text = React6.forwardRef(
|
|
|
599
877
|
"className"
|
|
600
878
|
]);
|
|
601
879
|
const baseClasses = [
|
|
602
|
-
"[font-family:var(--deframe-widget-font-family
|
|
880
|
+
"[font-family:var(--deframe-widget-font-family)]",
|
|
603
881
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
604
882
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
605
883
|
"[font-weight:var(--deframe-widget-font-weight-regular)]",
|
|
@@ -637,12 +915,12 @@ var TextAccent = React6.forwardRef(
|
|
|
637
915
|
].join(" "),
|
|
638
916
|
"accent-medium": [
|
|
639
917
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
640
|
-
"[line-height:var(--deframe-widget-font-leading-
|
|
918
|
+
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
641
919
|
"[font-weight:var(--deframe-widget-font-weight-semibold)]"
|
|
642
920
|
].join(" "),
|
|
643
921
|
"accent-small": [
|
|
644
922
|
"[font-size:var(--deframe-widget-font-size-sm)]",
|
|
645
|
-
"[line-height:var(--deframe-widget-font-leading-
|
|
923
|
+
"[line-height:var(--deframe-widget-font-leading-sm)]",
|
|
646
924
|
"[font-weight:var(--deframe-widget-font-weight-semibold)]"
|
|
647
925
|
].join(" ")
|
|
648
926
|
};
|
|
@@ -673,6 +951,11 @@ var TextBody = React6.forwardRef(
|
|
|
673
951
|
"className"
|
|
674
952
|
]);
|
|
675
953
|
const bodyVariants = {
|
|
954
|
+
"[font-size:var(--deframe-widget-font-size-lg)] [line-height:var(--deframe-widget-font-leading-lg)]": [
|
|
955
|
+
"[font-size:var(--deframe-widget-font-size-lg)]",
|
|
956
|
+
"[line-height:var(--deframe-widget-font-leading-lg)]",
|
|
957
|
+
"[font-weight:var(--deframe-widget-font-weight-regular)]"
|
|
958
|
+
].join(" "),
|
|
676
959
|
"text-large": [
|
|
677
960
|
"[font-size:var(--deframe-widget-font-size-lg)]",
|
|
678
961
|
"[line-height:var(--deframe-widget-font-leading-lg)]",
|
|
@@ -680,12 +963,12 @@ var TextBody = React6.forwardRef(
|
|
|
680
963
|
].join(" "),
|
|
681
964
|
"text-medium": [
|
|
682
965
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
683
|
-
"[line-height:var(--deframe-widget-font-leading-
|
|
966
|
+
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
684
967
|
"[font-weight:var(--deframe-widget-font-weight-regular)]"
|
|
685
968
|
].join(" "),
|
|
686
969
|
"text-small": [
|
|
687
970
|
"[font-size:var(--deframe-widget-font-size-sm)]",
|
|
688
|
-
"[line-height:var(--deframe-widget-font-leading-
|
|
971
|
+
"[line-height:var(--deframe-widget-font-leading-sm)]",
|
|
689
972
|
"[font-weight:var(--deframe-widget-font-weight-regular)]"
|
|
690
973
|
].join(" ")
|
|
691
974
|
};
|
|
@@ -717,32 +1000,32 @@ var TextHeading = React6.forwardRef(
|
|
|
717
1000
|
]);
|
|
718
1001
|
const headingVariants = {
|
|
719
1002
|
"h-large": [
|
|
720
|
-
"[font-size:var(--deframe-widget-font-size-
|
|
1003
|
+
"[font-size:var(--deframe-widget-font-size-xxl)]",
|
|
721
1004
|
"[line-height:var(--deframe-widget-font-leading-sm)]",
|
|
722
1005
|
"[font-weight:var(--deframe-widget-font-weight-extrabold)]"
|
|
723
1006
|
].join(" "),
|
|
724
1007
|
h1: [
|
|
725
|
-
"[font-size:var(--deframe-widget-font-size-
|
|
1008
|
+
"[font-size:var(--deframe-widget-font-size-xxl)]",
|
|
726
1009
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
727
1010
|
"[font-weight:var(--deframe-widget-font-weight-extrabold)]"
|
|
728
1011
|
].join(" "),
|
|
729
1012
|
h2: [
|
|
730
|
-
"[font-size:var(--deframe-widget-font-size-
|
|
1013
|
+
"[font-size:var(--deframe-widget-font-size-xxl)]",
|
|
731
1014
|
"[line-height:var(--deframe-widget-font-leading-lg)]",
|
|
732
1015
|
"[font-weight:var(--deframe-widget-font-weight-extrabold)]"
|
|
733
1016
|
].join(" "),
|
|
734
1017
|
h3: [
|
|
735
|
-
"[font-size:var(--deframe-widget-font-size-
|
|
1018
|
+
"[font-size:var(--deframe-widget-font-size-xl)]",
|
|
736
1019
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
737
1020
|
"[font-weight:var(--deframe-widget-font-weight-bold)]"
|
|
738
1021
|
].join(" "),
|
|
739
1022
|
h4: [
|
|
740
|
-
"[font-size:var(--deframe-widget-font-size-
|
|
1023
|
+
"[font-size:var(--deframe-widget-font-size-xl)]",
|
|
741
1024
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
742
1025
|
"[font-weight:var(--deframe-widget-font-weight-bold)]"
|
|
743
1026
|
].join(" "),
|
|
744
1027
|
h5: [
|
|
745
|
-
"[font-size:var(--deframe-widget-font-size-
|
|
1028
|
+
"[font-size:var(--deframe-widget-font-size-lg)]",
|
|
746
1029
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
747
1030
|
"[font-weight:var(--deframe-widget-font-weight-bold)]"
|
|
748
1031
|
].join(" ")
|
|
@@ -773,232 +1056,6 @@ function Title(_a) {
|
|
|
773
1056
|
]);
|
|
774
1057
|
return /* @__PURE__ */ jsx(TextHeading_default, __spreadValues({ variant, className }, props));
|
|
775
1058
|
}
|
|
776
|
-
function ConnectWalletList({
|
|
777
|
-
wallets,
|
|
778
|
-
className
|
|
779
|
-
}) {
|
|
780
|
-
const handleWalletClick = (wallet) => {
|
|
781
|
-
var _a;
|
|
782
|
-
(_a = wallet.onClick) == null ? void 0 : _a.call(wallet);
|
|
783
|
-
};
|
|
784
|
-
return /* @__PURE__ */ jsx("div", { className: twMerge("w-full", className), children: /* @__PURE__ */ jsx(WalletListContainer, { children: wallets.map((wallet) => /* @__PURE__ */ jsxs(ListItem, { onClick: () => handleWalletClick(wallet), children: [
|
|
785
|
-
/* @__PURE__ */ jsx(ListItemLeftSide, { children: typeof wallet.icon === "string" ? /* @__PURE__ */ jsx(
|
|
786
|
-
"img",
|
|
787
|
-
{
|
|
788
|
-
src: wallet.icon,
|
|
789
|
-
alt: wallet.name,
|
|
790
|
-
className: "w-10 h-10 rounded-full"
|
|
791
|
-
}
|
|
792
|
-
) : wallet.icon }),
|
|
793
|
-
/* @__PURE__ */ jsx(ListItemContent, { children: /* @__PURE__ */ jsx(TextBody, { variant: "text-medium", children: wallet.name }) }),
|
|
794
|
-
/* @__PURE__ */ jsx(ListItemRightSide, { children: /* @__PURE__ */ jsx(
|
|
795
|
-
"svg",
|
|
796
|
-
{
|
|
797
|
-
className: "flex-shrink-0 w-5 h-5 text-gray-400",
|
|
798
|
-
fill: "none",
|
|
799
|
-
viewBox: "0 0 24 24",
|
|
800
|
-
stroke: "currentColor",
|
|
801
|
-
children: /* @__PURE__ */ jsx(
|
|
802
|
-
"path",
|
|
803
|
-
{
|
|
804
|
-
strokeLinecap: "round",
|
|
805
|
-
strokeLinejoin: "round",
|
|
806
|
-
strokeWidth: 2,
|
|
807
|
-
d: "M9 5l7 7-7 7"
|
|
808
|
-
}
|
|
809
|
-
)
|
|
810
|
-
}
|
|
811
|
-
) })
|
|
812
|
-
] }, wallet.id)) }) });
|
|
813
|
-
}
|
|
814
|
-
function WalletItem({
|
|
815
|
-
id,
|
|
816
|
-
name,
|
|
817
|
-
icon,
|
|
818
|
-
onClick,
|
|
819
|
-
className
|
|
820
|
-
}) {
|
|
821
|
-
const baseClasses = [
|
|
822
|
-
"w-full flex items-center",
|
|
823
|
-
"[gap:var(--deframe-widget-size-gap-md)]",
|
|
824
|
-
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
825
|
-
"py-[var(--deframe-widget-size-padding-y-sm)]",
|
|
826
|
-
"rounded-[var(--deframe-widget-size-radius-xs)]",
|
|
827
|
-
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
828
|
-
"cursor-pointer",
|
|
829
|
-
"transition-colors",
|
|
830
|
-
"hover:bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
831
|
-
"focus:outline-none"
|
|
832
|
-
].join(" ");
|
|
833
|
-
return /* @__PURE__ */ jsxs(
|
|
834
|
-
"button",
|
|
835
|
-
{
|
|
836
|
-
"data-slot": "wallet-item",
|
|
837
|
-
"data-test-id": "wallet-item",
|
|
838
|
-
"aria-label": `Connect ${name} wallet`,
|
|
839
|
-
onClick,
|
|
840
|
-
className: twMerge(baseClasses, className),
|
|
841
|
-
children: [
|
|
842
|
-
/* @__PURE__ */ jsx(
|
|
843
|
-
"div",
|
|
844
|
-
{
|
|
845
|
-
"data-slot": "wallet-item-icon",
|
|
846
|
-
"data-test-id": "wallet-item-icon",
|
|
847
|
-
className: "flex-shrink-0 w-12 h-12 rounded-[var(--deframe-widget-size-radius-full)] overflow-hidden flex items-center justify-center",
|
|
848
|
-
children: typeof icon === "string" ? /* @__PURE__ */ jsx(
|
|
849
|
-
"img",
|
|
850
|
-
{
|
|
851
|
-
src: icon,
|
|
852
|
-
alt: name,
|
|
853
|
-
className: "w-full h-full object-cover"
|
|
854
|
-
}
|
|
855
|
-
) : icon
|
|
856
|
-
}
|
|
857
|
-
),
|
|
858
|
-
/* @__PURE__ */ jsx(
|
|
859
|
-
TextBody,
|
|
860
|
-
{
|
|
861
|
-
"data-slot": "wallet-item-name",
|
|
862
|
-
"data-test-id": "wallet-item-name",
|
|
863
|
-
variant: "text-medium",
|
|
864
|
-
className: "flex-1 text-left text-[var(--deframe-widget-color-text-primary)]",
|
|
865
|
-
children: name
|
|
866
|
-
}
|
|
867
|
-
),
|
|
868
|
-
/* @__PURE__ */ jsx(
|
|
869
|
-
"svg",
|
|
870
|
-
{
|
|
871
|
-
"data-slot": "wallet-item-chevron",
|
|
872
|
-
"data-test-id": "wallet-item-chevron",
|
|
873
|
-
className: "flex-shrink-0 w-5 h-5 text-[var(--deframe-widget-color-text-secondary)]",
|
|
874
|
-
fill: "none",
|
|
875
|
-
viewBox: "0 0 24 24",
|
|
876
|
-
stroke: "currentColor",
|
|
877
|
-
children: /* @__PURE__ */ jsx(
|
|
878
|
-
"path",
|
|
879
|
-
{
|
|
880
|
-
strokeLinecap: "round",
|
|
881
|
-
strokeLinejoin: "round",
|
|
882
|
-
strokeWidth: 2,
|
|
883
|
-
d: "M9 5l7 7-7 7"
|
|
884
|
-
}
|
|
885
|
-
)
|
|
886
|
-
}
|
|
887
|
-
)
|
|
888
|
-
]
|
|
889
|
-
},
|
|
890
|
-
id
|
|
891
|
-
);
|
|
892
|
-
}
|
|
893
|
-
var CURRENCY_CONFIG = {
|
|
894
|
-
symbols: {
|
|
895
|
-
USD: "$",
|
|
896
|
-
BRL: "R$",
|
|
897
|
-
EUR: "\u20AC",
|
|
898
|
-
BTC: "\u20BF",
|
|
899
|
-
ETH: "\u039E",
|
|
900
|
-
USDC: "$",
|
|
901
|
-
USDT: "$"
|
|
902
|
-
},
|
|
903
|
-
labels: {
|
|
904
|
-
USD: "USD",
|
|
905
|
-
BRL: "BRL",
|
|
906
|
-
EUR: "EUR",
|
|
907
|
-
BTC: "BTC",
|
|
908
|
-
ETH: "ETH",
|
|
909
|
-
USDC: "USDC",
|
|
910
|
-
USDT: "USDT"
|
|
911
|
-
}
|
|
912
|
-
};
|
|
913
|
-
var STYLE_CONFIG = {
|
|
914
|
-
alignment: {
|
|
915
|
-
left: "items-start",
|
|
916
|
-
center: "items-center",
|
|
917
|
-
right: "items-end"
|
|
918
|
-
},
|
|
919
|
-
size: {
|
|
920
|
-
sm: { primary: "text-3xl", secondary: "text-sm", gap: "gap-0.5" },
|
|
921
|
-
md: { primary: "text-5xl", secondary: "text-base", gap: "gap-1" },
|
|
922
|
-
lg: { primary: "text-6xl", secondary: "text-lg", gap: "gap-1" }
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
function Currency(props) {
|
|
926
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
927
|
-
const normalizedProps = "usdValue" in props ? {
|
|
928
|
-
amount: props.amount,
|
|
929
|
-
currency: "USD",
|
|
930
|
-
secondaryAmount: props.usdValue,
|
|
931
|
-
secondaryCurrency: void 0,
|
|
932
|
-
align: (_a = props.align) != null ? _a : "right",
|
|
933
|
-
size: (_b = props.size) != null ? _b : "lg",
|
|
934
|
-
showSymbol: false,
|
|
935
|
-
showLabel: false,
|
|
936
|
-
className: (_c = props.className) != null ? _c : ""
|
|
937
|
-
} : {
|
|
938
|
-
amount: props.amount,
|
|
939
|
-
currency: (_d = props.currency) != null ? _d : "USD",
|
|
940
|
-
secondaryAmount: props.secondaryAmount,
|
|
941
|
-
secondaryCurrency: props.secondaryCurrency,
|
|
942
|
-
align: (_e = props.align) != null ? _e : "right",
|
|
943
|
-
size: (_f = props.size) != null ? _f : "lg",
|
|
944
|
-
showSymbol: (_g = props.showSymbol) != null ? _g : true,
|
|
945
|
-
showLabel: (_h = props.showLabel) != null ? _h : false,
|
|
946
|
-
className: (_i = props.className) != null ? _i : ""
|
|
947
|
-
};
|
|
948
|
-
const {
|
|
949
|
-
amount,
|
|
950
|
-
currency,
|
|
951
|
-
secondaryAmount,
|
|
952
|
-
secondaryCurrency,
|
|
953
|
-
align,
|
|
954
|
-
size,
|
|
955
|
-
showSymbol,
|
|
956
|
-
showLabel,
|
|
957
|
-
className
|
|
958
|
-
} = normalizedProps;
|
|
959
|
-
const formatAmount = (value, curr, displaySymbol) => {
|
|
960
|
-
if (!displaySymbol && !showLabel) return value;
|
|
961
|
-
const symbol = displaySymbol ? CURRENCY_CONFIG.symbols[curr] : "";
|
|
962
|
-
const label = showLabel ? ` ${CURRENCY_CONFIG.labels[curr]}` : "";
|
|
963
|
-
if (["BTC", "ETH"].includes(curr) && !value.includes(".") && !value.includes(",")) {
|
|
964
|
-
return `${symbol}${value}${label}`;
|
|
965
|
-
}
|
|
966
|
-
return `${symbol} ${value}${label}`.trim();
|
|
967
|
-
};
|
|
968
|
-
return /* @__PURE__ */ jsxs(
|
|
969
|
-
"div",
|
|
970
|
-
{
|
|
971
|
-
className: twMerge(
|
|
972
|
-
"flex flex-col",
|
|
973
|
-
STYLE_CONFIG.alignment[align],
|
|
974
|
-
STYLE_CONFIG.size[size].gap,
|
|
975
|
-
className
|
|
976
|
-
),
|
|
977
|
-
children: [
|
|
978
|
-
/* @__PURE__ */ jsx(
|
|
979
|
-
"div",
|
|
980
|
-
{
|
|
981
|
-
className: twMerge(
|
|
982
|
-
"font-bold text-text-primary dark:text-text-primary-dark font-poppins",
|
|
983
|
-
STYLE_CONFIG.size[size].primary
|
|
984
|
-
),
|
|
985
|
-
children: formatAmount(amount, currency, showSymbol)
|
|
986
|
-
}
|
|
987
|
-
),
|
|
988
|
-
secondaryAmount && /* @__PURE__ */ jsx(
|
|
989
|
-
"div",
|
|
990
|
-
{
|
|
991
|
-
className: twMerge(
|
|
992
|
-
"text-text-secondary dark:text-text-secondary-dark font-poppins",
|
|
993
|
-
STYLE_CONFIG.size[size].secondary
|
|
994
|
-
),
|
|
995
|
-
children: secondaryCurrency ? formatAmount(secondaryAmount, secondaryCurrency, true) : secondaryAmount
|
|
996
|
-
}
|
|
997
|
-
)
|
|
998
|
-
]
|
|
999
|
-
}
|
|
1000
|
-
);
|
|
1001
|
-
}
|
|
1002
1059
|
var TabsContext = React6.createContext(
|
|
1003
1060
|
void 0
|
|
1004
1061
|
);
|
|
@@ -1058,14 +1115,12 @@ var TabsList = React6.forwardRef(
|
|
|
1058
1115
|
ref,
|
|
1059
1116
|
role: "tablist",
|
|
1060
1117
|
className: twMerge(
|
|
1061
|
-
"relative w-full flex items-center justify-between
|
|
1118
|
+
"relative w-full flex items-center justify-between",
|
|
1119
|
+
"pt-[var(--deframe-widget-size-padding-y-sm)]",
|
|
1120
|
+
"px-[var(--deframe-widget-size-padding-x-lg)]",
|
|
1121
|
+
"bg-[var(--deframe-widget-color-bg-primary)]",
|
|
1062
1122
|
className
|
|
1063
|
-
)
|
|
1064
|
-
style: {
|
|
1065
|
-
paddingLeft: "var(--spacing-md, 16px)",
|
|
1066
|
-
paddingRight: "var(--spacing-md, 16px)",
|
|
1067
|
-
backgroundColor: "var(--color-bg-default, transparent)"
|
|
1068
|
-
}
|
|
1123
|
+
)
|
|
1069
1124
|
}, props), {
|
|
1070
1125
|
children
|
|
1071
1126
|
})
|
|
@@ -1077,8 +1132,8 @@ var TabsList = React6.forwardRef(
|
|
|
1077
1132
|
ref,
|
|
1078
1133
|
role: "tablist",
|
|
1079
1134
|
className: twMerge(
|
|
1080
|
-
"relative w-full flex items-center bg-transparent border-b border-
|
|
1081
|
-
variant === "primary" ? "h-[72px] gap-
|
|
1135
|
+
"relative w-full flex items-center bg-transparent border-b border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
1136
|
+
variant === "primary" ? "h-[72px] gap-[var(--deframe-widget-size-gap-lg)]" : "h-12",
|
|
1082
1137
|
className
|
|
1083
1138
|
)
|
|
1084
1139
|
}, props), {
|
|
@@ -1093,19 +1148,14 @@ var TabsTrigger = React6.forwardRef(
|
|
|
1093
1148
|
var _b = _a, {
|
|
1094
1149
|
value,
|
|
1095
1150
|
className,
|
|
1096
|
-
children
|
|
1097
|
-
style
|
|
1151
|
+
children
|
|
1098
1152
|
} = _b, props = __objRest(_b, [
|
|
1099
1153
|
"value",
|
|
1100
1154
|
"className",
|
|
1101
|
-
"children"
|
|
1102
|
-
"style"
|
|
1155
|
+
"children"
|
|
1103
1156
|
]);
|
|
1104
1157
|
const { value: activeValue, onValueChange, variant } = useTabs();
|
|
1105
1158
|
const isActive = activeValue === value;
|
|
1106
|
-
const headerStyle = variant === "header" ? __spreadValues({
|
|
1107
|
-
color: isActive ? "var(--color-brand-primary)" : "var(--color-text-secondary)"
|
|
1108
|
-
}, style) : style;
|
|
1109
1159
|
return /* @__PURE__ */ jsxs(
|
|
1110
1160
|
"button",
|
|
1111
1161
|
__spreadProps(__spreadValues({
|
|
@@ -1114,12 +1164,11 @@ var TabsTrigger = React6.forwardRef(
|
|
|
1114
1164
|
"aria-selected": isActive,
|
|
1115
1165
|
onClick: () => onValueChange(value),
|
|
1116
1166
|
className: twMerge(
|
|
1117
|
-
"relative inline-flex flex-col items-center justify-center whitespace-nowrap font-
|
|
1118
|
-
variant === "header" ? "flex-1
|
|
1119
|
-
variant
|
|
1167
|
+
"relative inline-flex flex-col items-center justify-center whitespace-nowrap font-[var(--deframe-widget-font-family)] transition-colors cursor-pointer disabled:pointer-events-none disabled:opacity-50 outline-none",
|
|
1168
|
+
variant === "header" ? "flex-1 [font-size:var(--deframe-widget-font-size-lg)] [font-weight:var(--deframe-widget-font-weight-semibold)] py-[var(--deframe-widget-size-padding-y-md)]" : variant === "primary" ? "h-[72px] [font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)] [font-weight:var(--deframe-widget-font-weight-medium)] px-[var(--deframe-widget-size-padding-x-none)] pb-[var(--deframe-widget-size-padding-y-sm)] pt-[var(--deframe-widget-size-padding-y-sm)] flex-none" : "h-12 text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)] px-[var(--deframe-widget-size-padding-x-md)] flex-none",
|
|
1169
|
+
variant === "header" ? isActive ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)]" : isActive ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)]",
|
|
1120
1170
|
className
|
|
1121
|
-
)
|
|
1122
|
-
style: headerStyle
|
|
1171
|
+
)
|
|
1123
1172
|
}, props), {
|
|
1124
1173
|
children: [
|
|
1125
1174
|
/* @__PURE__ */ jsx("span", { children }),
|
|
@@ -1127,17 +1176,7 @@ var TabsTrigger = React6.forwardRef(
|
|
|
1127
1176
|
motion.span,
|
|
1128
1177
|
{
|
|
1129
1178
|
layoutId: "header-tab-indicator",
|
|
1130
|
-
className: "absolute rounded-t-full",
|
|
1131
|
-
style: {
|
|
1132
|
-
bottom: 0,
|
|
1133
|
-
left: 0,
|
|
1134
|
-
right: 0,
|
|
1135
|
-
marginLeft: "auto",
|
|
1136
|
-
marginRight: "auto",
|
|
1137
|
-
width: "3.5rem",
|
|
1138
|
-
height: "3px",
|
|
1139
|
-
backgroundColor: "var(--color-brand-primary)"
|
|
1140
|
-
},
|
|
1179
|
+
className: "absolute bottom-0 left-1/2 -translate-x-1/2 w-14 h-[3px] rounded-t-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-brand-primary)]",
|
|
1141
1180
|
transition: { type: "spring", bounce: 0.2, duration: 0.6 }
|
|
1142
1181
|
}
|
|
1143
1182
|
),
|
|
@@ -1145,7 +1184,7 @@ var TabsTrigger = React6.forwardRef(
|
|
|
1145
1184
|
motion.span,
|
|
1146
1185
|
{
|
|
1147
1186
|
layoutId: "tab-indicator",
|
|
1148
|
-
className: "absolute bottom-0 left-0 right-0 h-0.5 bg-brand-primary z-10",
|
|
1187
|
+
className: "absolute bottom-0 left-0 right-0 h-0.5 bg-[var(--deframe-widget-color-brand-primary)] z-10",
|
|
1149
1188
|
transition: { type: "spring", bounce: 0.2, duration: 0.6 }
|
|
1150
1189
|
}
|
|
1151
1190
|
)
|
|
@@ -1167,7 +1206,7 @@ var TabsContent = React6.forwardRef(
|
|
|
1167
1206
|
role: "tabpanel",
|
|
1168
1207
|
className: twMerge(
|
|
1169
1208
|
"focus-visible:outline-none",
|
|
1170
|
-
variant === "primary" || variant === "header" ? "mt-
|
|
1209
|
+
variant === "primary" || variant === "header" ? "mt-[var(--deframe-widget-size-gap-none)]" : "mt-[var(--deframe-widget-size-gap-lg)]",
|
|
1171
1210
|
className
|
|
1172
1211
|
)
|
|
1173
1212
|
}, props), {
|
|
@@ -1283,12 +1322,12 @@ var SelectTrigger = React6.forwardRef(
|
|
|
1283
1322
|
"aria-haspopup": "listbox",
|
|
1284
1323
|
"aria-expanded": _isOpen,
|
|
1285
1324
|
className: twMerge(
|
|
1286
|
-
"w-full flex items-center justify-between gap-
|
|
1287
|
-
"bg-[var(--color-bg-
|
|
1288
|
-
"
|
|
1325
|
+
"w-full flex items-center justify-between gap-[var(--deframe-widget-size-gap-sm)]",
|
|
1326
|
+
"bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)] rounded-[var(--deframe-widget-size-radius-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)].5",
|
|
1327
|
+
"[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-primary)] text-left",
|
|
1289
1328
|
"transition-colors cursor-pointer",
|
|
1290
|
-
"hover:border-[var(--color-border-
|
|
1291
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-brand-primary
|
|
1329
|
+
"hover:border-[color:var(--deframe-widget-color-border-primary)]",
|
|
1330
|
+
"focus:outline-none focus:ring-2 focus:ring-[color:var(--deframe-widget-color-brand-primary)] focus:border-[color:var(--deframe-widget-color-brand-primary)]",
|
|
1292
1331
|
_disabled && "opacity-50 cursor-not-allowed",
|
|
1293
1332
|
className
|
|
1294
1333
|
),
|
|
@@ -1296,7 +1335,7 @@ var SelectTrigger = React6.forwardRef(
|
|
|
1296
1335
|
/* @__PURE__ */ jsx(
|
|
1297
1336
|
"span",
|
|
1298
1337
|
{
|
|
1299
|
-
className: !hasChildren ? "text-[var(--color-text-tertiary
|
|
1338
|
+
className: !hasChildren ? "text-[color:var(--deframe-widget-color-text-tertiary)]" : void 0,
|
|
1300
1339
|
children: hasChildren ? children : placeholder
|
|
1301
1340
|
}
|
|
1302
1341
|
),
|
|
@@ -1304,7 +1343,7 @@ var SelectTrigger = React6.forwardRef(
|
|
|
1304
1343
|
ChevronDownIcon,
|
|
1305
1344
|
{
|
|
1306
1345
|
className: twMerge(
|
|
1307
|
-
"w-4 h-4 text-[var(--color-text-secondary
|
|
1346
|
+
"w-4 h-4 text-[color:var(--deframe-widget-color-text-secondary)] transition-transform",
|
|
1308
1347
|
_isOpen && "rotate-180"
|
|
1309
1348
|
)
|
|
1310
1349
|
}
|
|
@@ -1380,10 +1419,10 @@ var SelectContent = React6.forwardRef(
|
|
|
1380
1419
|
animate: "visible",
|
|
1381
1420
|
exit: "exit",
|
|
1382
1421
|
className: twMerge(
|
|
1383
|
-
"absolute z-50 w-full mt-
|
|
1384
|
-
"bg-[var(--color-bg-
|
|
1422
|
+
"absolute z-50 w-full mt-[var(--deframe-widget-size-gap-xs)]",
|
|
1423
|
+
"bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)] rounded-[var(--deframe-widget-size-radius-xs)] shadow-[0_20px_50px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_28%,transparent)]",
|
|
1385
1424
|
"max-h-60 overflow-auto",
|
|
1386
|
-
"py-
|
|
1425
|
+
"py-[var(--deframe-widget-size-padding-y-xs)]",
|
|
1387
1426
|
className
|
|
1388
1427
|
),
|
|
1389
1428
|
children: enhancedChildren
|
|
@@ -1424,10 +1463,10 @@ var SelectItem = React6.forwardRef(
|
|
|
1424
1463
|
onClick: handleClick,
|
|
1425
1464
|
onMouseEnter: handleMouseEnter,
|
|
1426
1465
|
className: twMerge(
|
|
1427
|
-
"px-
|
|
1428
|
-
"text-[var(--color-text-primary
|
|
1429
|
-
_isSelected && "text-[var(--color-
|
|
1430
|
-
_isHighlighted && "bg-[var(--color-bg-
|
|
1466
|
+
"px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)] [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] cursor-pointer transition-colors",
|
|
1467
|
+
"text-[color:var(--deframe-widget-color-text-primary)]",
|
|
1468
|
+
_isSelected && "text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
1469
|
+
_isHighlighted && "bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
1431
1470
|
disabled && "opacity-50 cursor-not-allowed",
|
|
1432
1471
|
className
|
|
1433
1472
|
),
|
|
@@ -1453,13 +1492,13 @@ var Skeleton = (_a) => {
|
|
|
1453
1492
|
"className",
|
|
1454
1493
|
"style"
|
|
1455
1494
|
]);
|
|
1456
|
-
const defaultGradient = "linear-gradient(25deg,
|
|
1495
|
+
const defaultGradient = "linear-gradient(25deg, var(--deframe-widget-color-bg-tertiary) 0%, var(--deframe-widget-color-bg-tertiary) 60%, var(--deframe-widget-color-bg-secondary) 100%)";
|
|
1457
1496
|
return /* @__PURE__ */ jsx(
|
|
1458
1497
|
"div",
|
|
1459
1498
|
__spreadProps(__spreadValues({
|
|
1460
1499
|
className: twMerge(
|
|
1461
1500
|
"relative overflow-hidden animate-fade-in",
|
|
1462
|
-
variant === "circle" ? "rounded-full" : "rounded",
|
|
1501
|
+
variant === "circle" ? "rounded-[var(--deframe-widget-size-radius-full)]" : "rounded-[var(--deframe-widget-size-radius-xs)]",
|
|
1463
1502
|
className
|
|
1464
1503
|
),
|
|
1465
1504
|
style: __spreadValues({
|
|
@@ -1468,7 +1507,7 @@ var Skeleton = (_a) => {
|
|
|
1468
1507
|
background: defaultGradient
|
|
1469
1508
|
}, style)
|
|
1470
1509
|
}, props), {
|
|
1471
|
-
children: shimmer && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-
|
|
1510
|
+
children: shimmer && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 animate-shimmer bg-gradient-to-r from-transparent via-[color-mix(in srgb, var(--deframe-widget-color-bg-tertiary) 92%, transparent)] to-transparent" })
|
|
1472
1511
|
})
|
|
1473
1512
|
);
|
|
1474
1513
|
};
|
|
@@ -1491,7 +1530,7 @@ function BannerNotificationIcon(_a) {
|
|
|
1491
1530
|
}
|
|
1492
1531
|
function BannerNotificationContent(_a) {
|
|
1493
1532
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1494
|
-
const baseClasses = "flex-1 min-w-0
|
|
1533
|
+
const baseClasses = "flex-1 min-w-0 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)]";
|
|
1495
1534
|
return /* @__PURE__ */ jsx(
|
|
1496
1535
|
"div",
|
|
1497
1536
|
__spreadValues({
|
|
@@ -1519,7 +1558,7 @@ function BannerNotificationMessage(_a) {
|
|
|
1519
1558
|
return /* @__PURE__ */ jsx(
|
|
1520
1559
|
TextBody,
|
|
1521
1560
|
__spreadValues({
|
|
1522
|
-
variant: "
|
|
1561
|
+
variant: "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
|
|
1523
1562
|
"data-slot": "banner-notification-message",
|
|
1524
1563
|
"data-test-id": "banner-notification-message",
|
|
1525
1564
|
className: twMerge("text-inherit", className)
|
|
@@ -1544,7 +1583,7 @@ function BannerNotificationClose(_a) {
|
|
|
1544
1583
|
}, props)
|
|
1545
1584
|
);
|
|
1546
1585
|
}
|
|
1547
|
-
|
|
1586
|
+
var BannerNotification = (_a) => {
|
|
1548
1587
|
var _b = _a, {
|
|
1549
1588
|
type = "inline",
|
|
1550
1589
|
variant = "info",
|
|
@@ -1652,7 +1691,7 @@ function BannerNotification(_a) {
|
|
|
1652
1691
|
inline: variantInlineClasses[v],
|
|
1653
1692
|
toast: [
|
|
1654
1693
|
variantToastClasses[v],
|
|
1655
|
-
"fixed z-50 w-[clamp(18rem,40vw,30rem)] shadow-
|
|
1694
|
+
"fixed z-50 w-[clamp(18rem,40vw,30rem)] shadow-[0_20px_50px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_28%,transparent)]",
|
|
1656
1695
|
positionClasses[p]
|
|
1657
1696
|
].join(" ")
|
|
1658
1697
|
};
|
|
@@ -1683,7 +1722,7 @@ function BannerNotification(_a) {
|
|
|
1683
1722
|
]
|
|
1684
1723
|
})
|
|
1685
1724
|
);
|
|
1686
|
-
}
|
|
1725
|
+
};
|
|
1687
1726
|
BannerNotification.displayName = "BannerNotification";
|
|
1688
1727
|
var AddressDisplay = ({
|
|
1689
1728
|
address,
|
|
@@ -1707,7 +1746,10 @@ var AddressDisplay = ({
|
|
|
1707
1746
|
"div",
|
|
1708
1747
|
{
|
|
1709
1748
|
className: twMerge(
|
|
1710
|
-
"bg-[
|
|
1749
|
+
"bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
1750
|
+
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
|
|
1751
|
+
"flex items-center justify-between gap-[var(--deframe-widget-size-gap-sm)]",
|
|
1752
|
+
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
1711
1753
|
className
|
|
1712
1754
|
),
|
|
1713
1755
|
children: [
|
|
@@ -1725,12 +1767,12 @@ var AddressDisplay = ({
|
|
|
1725
1767
|
"button",
|
|
1726
1768
|
{
|
|
1727
1769
|
onClick: handleCopy,
|
|
1728
|
-
className: "text-
|
|
1770
|
+
className: "text-[color:var(--deframe-widget-color-text-tertiary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition-colors flex-shrink-0 cursor-pointer",
|
|
1729
1771
|
"aria-label": "Copy address",
|
|
1730
1772
|
children: copied ? /* @__PURE__ */ jsx(
|
|
1731
1773
|
"svg",
|
|
1732
1774
|
{
|
|
1733
|
-
className: "w-5 h-5 text-
|
|
1775
|
+
className: "w-5 h-5 text-[color:var(--deframe-widget-color-state-success)]",
|
|
1734
1776
|
fill: "none",
|
|
1735
1777
|
stroke: "currentColor",
|
|
1736
1778
|
viewBox: "0 0 24 24",
|
|
@@ -1781,15 +1823,19 @@ var SummaryDetails = ({
|
|
|
1781
1823
|
return /* @__PURE__ */ jsxs(
|
|
1782
1824
|
"details",
|
|
1783
1825
|
{
|
|
1784
|
-
className: twMerge(
|
|
1826
|
+
className: twMerge(
|
|
1827
|
+
"bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
1828
|
+
"p-[var(--deframe-widget-size-gap-lg)] group",
|
|
1829
|
+
className
|
|
1830
|
+
),
|
|
1785
1831
|
open: defaultOpen,
|
|
1786
1832
|
children: [
|
|
1787
1833
|
/* @__PURE__ */ jsx("summary", { className: twMerge("cursor-pointer block ", summaryClassName), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1788
|
-
/* @__PURE__ */ jsx(TextBody, { className: "text-
|
|
1834
|
+
/* @__PURE__ */ jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-primary)] [font-weight:var(--deframe-widget-font-weight-medium)]", children: title }),
|
|
1789
1835
|
/* @__PURE__ */ jsx(
|
|
1790
1836
|
"svg",
|
|
1791
1837
|
{
|
|
1792
|
-
className: "w-5 h-5 text-
|
|
1838
|
+
className: "w-5 h-5 text-[color:var(--deframe-widget-color-text-tertiary)] transition-transform duration-300 group-open:rotate-180",
|
|
1793
1839
|
fill: "none",
|
|
1794
1840
|
stroke: "currentColor",
|
|
1795
1841
|
viewBox: "0 0 24 24",
|
|
@@ -1810,24 +1856,24 @@ var SummaryDetails = ({
|
|
|
1810
1856
|
"div",
|
|
1811
1857
|
{
|
|
1812
1858
|
className: twMerge(
|
|
1813
|
-
"mt-
|
|
1814
|
-
showDividers && "divide-y divide-[
|
|
1859
|
+
"mt-[var(--deframe-widget-size-gap-lg)]",
|
|
1860
|
+
showDividers && "divide-y divide-[color:var(--deframe-widget-color-border-tertiary)]",
|
|
1815
1861
|
contentClassName
|
|
1816
1862
|
),
|
|
1817
|
-
children: items.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "flex justify-between py-
|
|
1863
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "flex justify-between py-[var(--deframe-widget-size-padding-y-sm)]", children: [
|
|
1818
1864
|
/* @__PURE__ */ jsx(
|
|
1819
1865
|
TextBody,
|
|
1820
1866
|
{
|
|
1821
|
-
variant: "
|
|
1822
|
-
className: twMerge("text-
|
|
1867
|
+
variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]",
|
|
1868
|
+
className: twMerge("text-[color:var(--deframe-widget-color-text-tertiary)]", item.labelClassName),
|
|
1823
1869
|
children: item.label
|
|
1824
1870
|
}
|
|
1825
1871
|
),
|
|
1826
1872
|
typeof item.value === "string" ? /* @__PURE__ */ jsx(
|
|
1827
1873
|
TextBody,
|
|
1828
1874
|
{
|
|
1829
|
-
variant: "
|
|
1830
|
-
className: twMerge("text-text-primary
|
|
1875
|
+
variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]",
|
|
1876
|
+
className: twMerge("text-[color:var(--deframe-widget-color-text-primary)] [font-weight:var(--deframe-widget-font-weight-medium)]", item.valueClassName),
|
|
1831
1877
|
children: item.value
|
|
1832
1878
|
}
|
|
1833
1879
|
) : /* @__PURE__ */ jsx("div", { className: item.valueClassName, children: item.value })
|
|
@@ -1853,7 +1899,7 @@ var SummaryDetailsCryptoControlV2 = ({
|
|
|
1853
1899
|
"data-test-id": "summary-details-v2",
|
|
1854
1900
|
"data-slot": "summary-details-v2",
|
|
1855
1901
|
className: twMerge(
|
|
1856
|
-
"bg-[var(--color-bg-
|
|
1902
|
+
"bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)] w-full max-w-[320px] group",
|
|
1857
1903
|
className
|
|
1858
1904
|
),
|
|
1859
1905
|
open: defaultOpen,
|
|
@@ -1870,7 +1916,7 @@ var SummaryDetailsCryptoControlV2 = ({
|
|
|
1870
1916
|
{
|
|
1871
1917
|
"data-test-id": "summary-details-v2-title",
|
|
1872
1918
|
"data-slot": "summary-details-v2-title",
|
|
1873
|
-
className: "text-[15px] font-semibold text-
|
|
1919
|
+
className: "text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)]",
|
|
1874
1920
|
children: title
|
|
1875
1921
|
}
|
|
1876
1922
|
),
|
|
@@ -1879,7 +1925,7 @@ var SummaryDetailsCryptoControlV2 = ({
|
|
|
1879
1925
|
{
|
|
1880
1926
|
"data-test-id": "summary-details-v2-chevron",
|
|
1881
1927
|
"data-slot": "summary-details-v2-chevron",
|
|
1882
|
-
className: "w-4 h-4 text-
|
|
1928
|
+
className: "w-4 h-4 text-[color:var(--deframe-widget-color-text-secondary)] transition-transform duration-300 group-open:rotate-180 flex-shrink-0",
|
|
1883
1929
|
viewBox: "0 0 24 24",
|
|
1884
1930
|
fill: "none",
|
|
1885
1931
|
stroke: "currentColor",
|
|
@@ -1895,7 +1941,7 @@ var SummaryDetailsCryptoControlV2 = ({
|
|
|
1895
1941
|
{
|
|
1896
1942
|
"data-test-id": "summary-details-v2-top-divider",
|
|
1897
1943
|
"data-slot": "summary-details-v2-top-divider",
|
|
1898
|
-
className: "h-px bg-
|
|
1944
|
+
className: "h-px bg-[var(--deframe-widget-color-border-secondary)] mt-[var(--deframe-widget-size-gap-sm)]"
|
|
1899
1945
|
}
|
|
1900
1946
|
),
|
|
1901
1947
|
/* @__PURE__ */ jsx(
|
|
@@ -1903,14 +1949,14 @@ var SummaryDetailsCryptoControlV2 = ({
|
|
|
1903
1949
|
{
|
|
1904
1950
|
"data-test-id": "summary-details-v2-content",
|
|
1905
1951
|
"data-slot": "summary-details-v2-content",
|
|
1906
|
-
className: twMerge("mt-
|
|
1952
|
+
className: twMerge("mt-[var(--deframe-widget-size-gap-none)]", contentClassName),
|
|
1907
1953
|
children: items.map((item, i) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
1908
1954
|
/* @__PURE__ */ jsxs(
|
|
1909
1955
|
"div",
|
|
1910
1956
|
{
|
|
1911
1957
|
"data-test-id": "summary-details-v2-row",
|
|
1912
1958
|
"data-slot": "summary-details-v2-row",
|
|
1913
|
-
className: "flex justify-between items-center py-[10px] gap-
|
|
1959
|
+
className: "flex justify-between items-center py-[10px] gap-[var(--deframe-widget-size-gap-sm)]",
|
|
1914
1960
|
children: [
|
|
1915
1961
|
/* @__PURE__ */ jsx(
|
|
1916
1962
|
"span",
|
|
@@ -1918,7 +1964,7 @@ var SummaryDetailsCryptoControlV2 = ({
|
|
|
1918
1964
|
"data-test-id": "summary-details-v2-row-label",
|
|
1919
1965
|
"data-slot": "summary-details-v2-row-label",
|
|
1920
1966
|
className: twMerge(
|
|
1921
|
-
"text-[11px] font-medium uppercase tracking-[0.07em] text-
|
|
1967
|
+
"text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.07em] text-[color:var(--deframe-widget-color-text-tertiary)] flex-shrink-0",
|
|
1922
1968
|
item.labelClassName
|
|
1923
1969
|
),
|
|
1924
1970
|
children: item.label
|
|
@@ -1930,7 +1976,7 @@ var SummaryDetailsCryptoControlV2 = ({
|
|
|
1930
1976
|
"data-test-id": "summary-details-v2-row-value",
|
|
1931
1977
|
"data-slot": "summary-details-v2-row-value",
|
|
1932
1978
|
className: twMerge(
|
|
1933
|
-
"text-[13px] font-semibold text-
|
|
1979
|
+
"text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] text-right",
|
|
1934
1980
|
item.valueClassName
|
|
1935
1981
|
),
|
|
1936
1982
|
children: item.value
|
|
@@ -1952,7 +1998,7 @@ var SummaryDetailsCryptoControlV2 = ({
|
|
|
1952
1998
|
{
|
|
1953
1999
|
"data-test-id": "summary-details-v2-row-divider",
|
|
1954
2000
|
"data-slot": "summary-details-v2-row-divider",
|
|
1955
|
-
className: "h-px bg-
|
|
2001
|
+
className: "h-px bg-[var(--deframe-widget-color-border-secondary)]"
|
|
1956
2002
|
}
|
|
1957
2003
|
)
|
|
1958
2004
|
] }, i))
|
|
@@ -2075,7 +2121,7 @@ var ActionSheet = ({
|
|
|
2075
2121
|
/* @__PURE__ */ jsx(
|
|
2076
2122
|
"div",
|
|
2077
2123
|
{
|
|
2078
|
-
className: "absolute inset-0 bg-
|
|
2124
|
+
className: "absolute inset-0 bg-[var(--deframe-widget-color-bg-primary)]/50 backdrop-blur-sm",
|
|
2079
2125
|
"aria-hidden": "true"
|
|
2080
2126
|
}
|
|
2081
2127
|
),
|
|
@@ -2083,8 +2129,8 @@ var ActionSheet = ({
|
|
|
2083
2129
|
motion.div,
|
|
2084
2130
|
{
|
|
2085
2131
|
className: twMerge(
|
|
2086
|
-
"relative w-full bg-[var(--
|
|
2087
|
-
position === "bottom" ? "max-w-full rounded-t-[
|
|
2132
|
+
"relative w-full bg-[var(--deframe-widget-color-bg-secondary)] shadow-[0_20px_50px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_28%,transparent)] overflow-hidden",
|
|
2133
|
+
position === "bottom" ? "max-w-full rounded-t-[var(--deframe-widget-size-radius-xl)]" : "max-w-lg rounded-[var(--deframe-widget-size-radius-xl)] mx-[var(--deframe-widget-size-gap-md)]",
|
|
2088
2134
|
getHeightClass(),
|
|
2089
2135
|
contentClassName
|
|
2090
2136
|
),
|
|
@@ -2099,168 +2145,51 @@ var ActionSheet = ({
|
|
|
2099
2145
|
}
|
|
2100
2146
|
) });
|
|
2101
2147
|
};
|
|
2102
|
-
|
|
2103
|
-
// src/stories/providers/types.ts
|
|
2104
|
-
var defaultThemeColors = {
|
|
2105
|
-
// Brand
|
|
2106
|
-
brandPrimary: "#405EFF",
|
|
2107
|
-
brandSecondary: "#A9ABF7",
|
|
2108
|
-
// Backgrounds
|
|
2109
|
-
bgDefault: "#FFFFFF",
|
|
2110
|
-
bgSubtle: "#F8F9FA",
|
|
2111
|
-
bgMuted: "#E3E4E8",
|
|
2112
|
-
// Text
|
|
2113
|
-
textPrimary: "#252050",
|
|
2114
|
-
textSecondary: "#5C5F66",
|
|
2115
|
-
textDisabled: "#C6C8CC",
|
|
2116
|
-
textInverse: "#FFFFFF",
|
|
2117
|
-
// States
|
|
2118
|
-
stateSuccess: "#2BA176",
|
|
2119
|
-
stateError: "#FF4D4F",
|
|
2120
|
-
stateWarning: "#F6A700"
|
|
2121
|
-
};
|
|
2122
|
-
var darkThemeColors = {
|
|
2123
|
-
// Brand
|
|
2124
|
-
brandPrimary: "#405EFF",
|
|
2125
|
-
brandSecondary: "#A9ABF7",
|
|
2126
|
-
// Backgrounds
|
|
2127
|
-
bgDefault: "#121212",
|
|
2128
|
-
bgSubtle: "#1E1E1E",
|
|
2129
|
-
bgMuted: "#2C2C2C",
|
|
2130
|
-
// Text
|
|
2131
|
-
textPrimary: "#FFFFFF",
|
|
2132
|
-
textSecondary: "#E3E4E8",
|
|
2133
|
-
textDisabled: "#898D95",
|
|
2134
|
-
textInverse: "#252050",
|
|
2135
|
-
// States
|
|
2136
|
-
stateSuccess: "#2BA176",
|
|
2137
|
-
stateError: "#FF4D4F",
|
|
2138
|
-
stateWarning: "#F6A700"
|
|
2139
|
-
};
|
|
2140
|
-
var cryptocontrolThemeColors = {
|
|
2141
|
-
// Brand - green primary for cryptocontrol
|
|
2142
|
-
brandPrimary: "#1FC16B",
|
|
2143
|
-
brandSecondary: "#A9ABF7",
|
|
2144
|
-
// Backgrounds (same as dark)
|
|
2145
|
-
bgDefault: "#121212",
|
|
2146
|
-
bgSubtle: "#1E1E1E",
|
|
2147
|
-
bgMuted: "#2C2C2C",
|
|
2148
|
-
// Text (same as dark)
|
|
2149
|
-
textPrimary: "#FFFFFF",
|
|
2150
|
-
textSecondary: "#E3E4E8",
|
|
2151
|
-
textDisabled: "#898D95",
|
|
2152
|
-
textInverse: "#252050",
|
|
2153
|
-
// States
|
|
2154
|
-
stateSuccess: "#2BA176",
|
|
2155
|
-
stateError: "#FF4D4F",
|
|
2156
|
-
stateWarning: "#F6A700"
|
|
2157
|
-
};
|
|
2158
|
-
function themeToCSS(theme) {
|
|
2159
|
-
if (!(theme == null ? void 0 : theme.colors)) return {};
|
|
2160
|
-
const vars = {};
|
|
2161
|
-
const colors = theme.colors;
|
|
2162
|
-
if (colors.brandPrimary) vars["--deframe-brand-primary"] = colors.brandPrimary;
|
|
2163
|
-
if (colors.brandSecondary) vars["--deframe-brand-secondary"] = colors.brandSecondary;
|
|
2164
|
-
if (colors.bgDefault) vars["--deframe-bg-default"] = colors.bgDefault;
|
|
2165
|
-
if (colors.bgSubtle) vars["--deframe-bg-subtle"] = colors.bgSubtle;
|
|
2166
|
-
if (colors.bgMuted) vars["--deframe-bg-muted"] = colors.bgMuted;
|
|
2167
|
-
if (colors.textPrimary) vars["--deframe-text-primary"] = colors.textPrimary;
|
|
2168
|
-
if (colors.textSecondary) vars["--deframe-text-secondary"] = colors.textSecondary;
|
|
2169
|
-
if (colors.textDisabled) vars["--deframe-text-disabled"] = colors.textDisabled;
|
|
2170
|
-
if (colors.textInverse) vars["--deframe-text-inverse"] = colors.textInverse;
|
|
2171
|
-
if (colors.stateSuccess) vars["--deframe-state-success"] = colors.stateSuccess;
|
|
2172
|
-
if (colors.stateError) vars["--deframe-state-error"] = colors.stateError;
|
|
2173
|
-
if (colors.stateWarning) vars["--deframe-state-warning"] = colors.stateWarning;
|
|
2174
|
-
return vars;
|
|
2175
|
-
}
|
|
2176
|
-
function getSystemColorMode() {
|
|
2177
|
-
if (typeof window === "undefined" || !window.matchMedia) return "light";
|
|
2178
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2179
|
-
}
|
|
2180
|
-
function resolveThemeConfig(config, systemMode) {
|
|
2181
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2182
|
-
const mode = (config == null ? void 0 : config.mode) === "auto" ? systemMode : (_a = config == null ? void 0 : config.mode) != null ? _a : "light";
|
|
2183
|
-
const preset = (_b = config == null ? void 0 : config.preset) != null ? _b : "default";
|
|
2184
|
-
const providerTheme = preset === "cryptocontrol" ? "cryptocontrol" : mode === "dark" ? "dark" : "light";
|
|
2185
|
-
const overrideColors = mode === "dark" ? (_d = (_c = config == null ? void 0 : config.overrides) == null ? void 0 : _c.dark) == null ? void 0 : _d.colors : (_f = (_e = config == null ? void 0 : config.overrides) == null ? void 0 : _e.light) == null ? void 0 : _f.colors;
|
|
2186
|
-
const customTheme = overrideColors ? { colors: overrideColors } : void 0;
|
|
2187
|
-
return { providerTheme, customTheme };
|
|
2188
|
-
}
|
|
2189
2148
|
function DeframeComponentsProvider({
|
|
2190
|
-
theme = "light",
|
|
2191
|
-
themeConfig,
|
|
2192
|
-
customTheme,
|
|
2193
2149
|
className,
|
|
2194
2150
|
children
|
|
2195
2151
|
}) {
|
|
2196
|
-
const [systemMode, setSystemMode] = useState(() => getSystemColorMode());
|
|
2197
|
-
useEffect(() => {
|
|
2198
|
-
var _a;
|
|
2199
|
-
const needsSystem = (themeConfig == null ? void 0 : themeConfig.mode) === "auto";
|
|
2200
|
-
if (!needsSystem || typeof window === "undefined" || !window.matchMedia) return;
|
|
2201
|
-
const mq = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2202
|
-
const handler = () => setSystemMode(mq.matches ? "dark" : "light");
|
|
2203
|
-
handler();
|
|
2204
|
-
(_a = mq.addEventListener) == null ? void 0 : _a.call(mq, "change", handler);
|
|
2205
|
-
return () => {
|
|
2206
|
-
var _a2;
|
|
2207
|
-
return (_a2 = mq.removeEventListener) == null ? void 0 : _a2.call(mq, "change", handler);
|
|
2208
|
-
};
|
|
2209
|
-
}, [themeConfig == null ? void 0 : themeConfig.mode]);
|
|
2210
|
-
const resolvedTheme = useMemo(() => {
|
|
2211
|
-
if (themeConfig) {
|
|
2212
|
-
return resolveThemeConfig(themeConfig, systemMode);
|
|
2213
|
-
}
|
|
2214
|
-
return {
|
|
2215
|
-
providerTheme: theme,
|
|
2216
|
-
customTheme
|
|
2217
|
-
};
|
|
2218
|
-
}, [themeConfig, theme, customTheme, systemMode]);
|
|
2219
|
-
const themeClass = resolvedTheme.providerTheme === "light" ? "" : resolvedTheme.providerTheme;
|
|
2220
|
-
const colorScheme = resolvedTheme.providerTheme === "light" ? "light" : "dark";
|
|
2221
|
-
const customCSSVars = themeToCSS(resolvedTheme.customTheme);
|
|
2222
2152
|
return /* @__PURE__ */ jsx(
|
|
2223
2153
|
"div",
|
|
2224
2154
|
{
|
|
2225
|
-
className: twMerge("deframe-widget",
|
|
2226
|
-
style: __spreadValues({ colorScheme }, customCSSVars),
|
|
2155
|
+
className: twMerge("deframe-widget", className),
|
|
2227
2156
|
children
|
|
2228
2157
|
}
|
|
2229
2158
|
);
|
|
2230
2159
|
}
|
|
2231
2160
|
var InfoRow = ({ children, borderBottom, className }) => {
|
|
2232
2161
|
const baseClasses = "self-stretch inline-flex justify-between items-start";
|
|
2233
|
-
const borderClasses = borderBottom ? "border-b border-
|
|
2162
|
+
const borderClasses = borderBottom ? "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]" : "";
|
|
2234
2163
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row", className: twMerge(baseClasses, borderClasses, className), children });
|
|
2235
2164
|
};
|
|
2236
2165
|
var InfoLabel = ({ children, className }) => {
|
|
2237
|
-
const baseClasses = "
|
|
2166
|
+
const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]";
|
|
2238
2167
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "info-label", className: twMerge(baseClasses, className), children });
|
|
2239
2168
|
};
|
|
2240
2169
|
var variantClasses = {
|
|
2241
|
-
default: "text-
|
|
2242
|
-
success: "text-state-success",
|
|
2243
|
-
warning: "text-state-warning",
|
|
2244
|
-
error: "text-state-error"
|
|
2170
|
+
default: "text-[color:var(--deframe-widget-color-text-primary)]",
|
|
2171
|
+
success: "text-[color:var(--deframe-widget-color-state-success)]",
|
|
2172
|
+
warning: "text-[color:var(--deframe-widget-color-state-warning)]",
|
|
2173
|
+
error: "text-[color:var(--deframe-widget-color-state-error)]"
|
|
2245
2174
|
};
|
|
2246
2175
|
var InfoValue = ({ children, variant = "default", className }) => {
|
|
2247
|
-
const baseClasses = "
|
|
2176
|
+
const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)]";
|
|
2248
2177
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "info-value", className: twMerge(baseClasses, variantClasses[variant], className), children });
|
|
2249
2178
|
};
|
|
2250
2179
|
var InfoRowWithIcon = ({ children, borderBottom, className }) => {
|
|
2251
2180
|
const baseClasses = "flex items-start justify-between h-[17px]";
|
|
2252
|
-
const borderClasses = borderBottom ? "border-b border-
|
|
2181
|
+
const borderClasses = borderBottom ? "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]" : "";
|
|
2253
2182
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row-with-icon", className: twMerge(baseClasses, borderClasses, className), children });
|
|
2254
2183
|
};
|
|
2255
2184
|
var InfoRowIconLabel = ({ children, className }) => {
|
|
2256
|
-
const baseClasses = "
|
|
2185
|
+
const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]";
|
|
2257
2186
|
return /* @__PURE__ */ jsxs("div", { "data-test-id": "info-row-icon-label", className: twMerge(baseClasses, className), children: [
|
|
2258
2187
|
"\u2022 ",
|
|
2259
2188
|
children
|
|
2260
2189
|
] });
|
|
2261
2190
|
};
|
|
2262
2191
|
var InfoRowIconValue = ({ children, className }) => {
|
|
2263
|
-
const baseClasses = "
|
|
2192
|
+
const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)]";
|
|
2264
2193
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row-icon-value", className: twMerge(baseClasses, className), children });
|
|
2265
2194
|
};
|
|
2266
2195
|
var CollapsibleInfoRow = ({
|
|
@@ -2273,7 +2202,7 @@ var CollapsibleInfoRow = ({
|
|
|
2273
2202
|
expandLabel
|
|
2274
2203
|
}) => {
|
|
2275
2204
|
const [isOpen, setIsOpen] = React6__default.useState(defaultOpen);
|
|
2276
|
-
const baseClasses = "flex flex-col gap-sm w-full";
|
|
2205
|
+
const baseClasses = "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] w-full";
|
|
2277
2206
|
return /* @__PURE__ */ jsxs("div", { "data-test-id": "collapsible-info-row", className: twMerge(baseClasses, className), children: [
|
|
2278
2207
|
/* @__PURE__ */ jsxs(
|
|
2279
2208
|
"button",
|
|
@@ -2285,10 +2214,10 @@ var CollapsibleInfoRow = ({
|
|
|
2285
2214
|
"aria-label": `${isOpen ? collapseLabel : expandLabel} ${label}`,
|
|
2286
2215
|
children: [
|
|
2287
2216
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-[2px]", children: [
|
|
2288
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
2289
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: isOpen ? /* @__PURE__ */ jsx(HiChevronUp, { className: "w-3 h-3 text-
|
|
2217
|
+
/* @__PURE__ */ jsx("span", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: label }),
|
|
2218
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: isOpen ? /* @__PURE__ */ jsx(HiChevronUp, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-secondary)]" }) : /* @__PURE__ */ jsx(HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-secondary)]" }) })
|
|
2290
2219
|
] }),
|
|
2291
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
2220
|
+
/* @__PURE__ */ jsx("span", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-secondary)]", children: value })
|
|
2292
2221
|
]
|
|
2293
2222
|
}
|
|
2294
2223
|
),
|
|
@@ -2296,116 +2225,103 @@ var CollapsibleInfoRow = ({
|
|
|
2296
2225
|
] });
|
|
2297
2226
|
};
|
|
2298
2227
|
var BackgroundContainer = ({ children, className }) => {
|
|
2299
|
-
const baseClasses = "w-full flex-1 min-h-0 px-md bg-
|
|
2228
|
+
const baseClasses = "w-full flex-1 min-h-0 px-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] text-[color:var(--deframe-widget-color-text-primary)] flex flex-col relative overflow-y-auto";
|
|
2300
2229
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "background-container", className: twMerge(baseClasses, className), children });
|
|
2301
2230
|
};
|
|
2302
2231
|
var SectionCard = ({ children, className }) => {
|
|
2303
|
-
const baseClasses = "bg-
|
|
2232
|
+
const baseClasses = "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-xs)] shadow-[0_2px_8px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_18%,transparent)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)] flex flex-col gap-[var(--deframe-widget-size-gap-sm)]";
|
|
2304
2233
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "section-card", className: twMerge(baseClasses, className), children });
|
|
2305
2234
|
};
|
|
2306
2235
|
var Navbar = ({ children, className }) => {
|
|
2307
|
-
const baseClasses = "w-full px-sm pr-md pt-sm pb-md border-b items-center border-
|
|
2236
|
+
const baseClasses = "w-full px-[var(--deframe-widget-size-padding-x-sm)] pr-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-md)] border-b items-center border-[color:var(--deframe-widget-color-border-tertiary)] flex";
|
|
2308
2237
|
return /* @__PURE__ */ jsx("nav", { "data-test-id": "navbar", className: twMerge(baseClasses, className), children });
|
|
2309
2238
|
};
|
|
2310
2239
|
var gapClasses = {
|
|
2311
|
-
xs: "gap-xs",
|
|
2312
|
-
sm: "gap-sm",
|
|
2313
|
-
md: "gap-md",
|
|
2314
|
-
lg: "gap-lg"
|
|
2240
|
+
xs: "gap-[var(--deframe-widget-size-gap-xs)]",
|
|
2241
|
+
sm: "gap-[var(--deframe-widget-size-gap-sm)]",
|
|
2242
|
+
md: "gap-[var(--deframe-widget-size-gap-md)]",
|
|
2243
|
+
lg: "gap-[var(--deframe-widget-size-gap-lg)]"
|
|
2315
2244
|
};
|
|
2316
2245
|
var FlexCol = ({ children, className, gap = "xs" }) => {
|
|
2317
2246
|
const baseClasses = "flex flex-col";
|
|
2318
2247
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "flex-col", className: twMerge(baseClasses, gapClasses[gap], className), children });
|
|
2319
2248
|
};
|
|
2320
2249
|
var gapClasses2 = {
|
|
2321
|
-
xs: "gap-xs",
|
|
2322
|
-
sm: "gap-sm",
|
|
2323
|
-
md: "gap-md",
|
|
2324
|
-
lg: "gap-lg"
|
|
2250
|
+
xs: "gap-[var(--deframe-widget-size-gap-xs)]",
|
|
2251
|
+
sm: "gap-[var(--deframe-widget-size-gap-sm)]",
|
|
2252
|
+
md: "gap-[var(--deframe-widget-size-gap-md)]",
|
|
2253
|
+
lg: "gap-[var(--deframe-widget-size-gap-lg)]"
|
|
2325
2254
|
};
|
|
2326
2255
|
var FlexRow = ({ children, className, gap = "xs" }) => {
|
|
2327
2256
|
const baseClasses = "flex items-center";
|
|
2328
2257
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "flex-row", className: twMerge(baseClasses, gapClasses2[gap], className), children });
|
|
2329
2258
|
};
|
|
2330
2259
|
var ScrollableContent = ({ children, className }) => {
|
|
2331
|
-
const baseClasses = "flex-1 overflow-y-auto px-md py-lg";
|
|
2260
|
+
const baseClasses = "flex-1 overflow-y-auto px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]";
|
|
2332
2261
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "scrollable-content", className: twMerge(baseClasses, className), children });
|
|
2333
2262
|
};
|
|
2334
2263
|
var DetailsHeader = ({ title, onBack, className, backAriaLabel = "Back" }) => {
|
|
2335
|
-
const baseClasses = "w-full px-sm pr-md pt-sm pb-md border-b border-
|
|
2264
|
+
const baseClasses = "w-full px-[var(--deframe-widget-size-padding-x-sm)] pr-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-md)] border-b border-[color:var(--deframe-widget-color-border-tertiary)] flex items-center";
|
|
2336
2265
|
return /* @__PURE__ */ jsxs("div", { "data-test-id": "details-header", className: twMerge(baseClasses, className), children: [
|
|
2337
2266
|
/* @__PURE__ */ jsx(
|
|
2338
2267
|
"button",
|
|
2339
2268
|
{
|
|
2340
2269
|
"data-test-id": "details-header-back-button",
|
|
2341
2270
|
onClick: onBack,
|
|
2342
|
-
className: "w-12 h-12 rounded-full flex items-center justify-center text-
|
|
2271
|
+
className: "w-12 h-12 rounded-[var(--deframe-widget-size-radius-full)] flex items-center justify-center text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-brand-primary)] cursor-pointer",
|
|
2343
2272
|
"aria-label": backAriaLabel,
|
|
2344
|
-
children: /* @__PURE__ */ jsx(HiChevronLeft, { className: "w-6 h-6 text-
|
|
2273
|
+
children: /* @__PURE__ */ jsx(HiChevronLeft, { className: "w-6 h-6 text-[color:var(--deframe-widget-color-text-tertiary)]" })
|
|
2345
2274
|
}
|
|
2346
2275
|
),
|
|
2347
2276
|
/* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center", children: /* @__PURE__ */ jsx(TextHeading, { variant: "h-large", children: title }) })
|
|
2348
2277
|
] });
|
|
2349
2278
|
};
|
|
2350
|
-
var CloseButton = ({ onClick, testId, ariaLabel = "Close", className }) => {
|
|
2351
|
-
const baseClasses = "w-12 h-12 rounded-full flex items-center justify-center text-text-secondary dark:text-text-secondary-dark hover:text-brand-primary transition-colors cursor-pointer";
|
|
2352
|
-
return /* @__PURE__ */ jsx(
|
|
2353
|
-
"button",
|
|
2354
|
-
{
|
|
2355
|
-
"data-test-id": testId != null ? testId : "close-button",
|
|
2356
|
-
onClick,
|
|
2357
|
-
className: twMerge(baseClasses, className),
|
|
2358
|
-
"aria-label": ariaLabel,
|
|
2359
|
-
children: /* @__PURE__ */ jsx(HiXMark, { className: "w-6 h-6" })
|
|
2360
|
-
}
|
|
2361
|
-
);
|
|
2362
|
-
};
|
|
2363
2279
|
var HighRiskBadge = ({ className, label }) => {
|
|
2364
|
-
const baseClasses = "inline-flex justify-start items-start gap-
|
|
2280
|
+
const baseClasses = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
|
|
2365
2281
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "high-risk-badge", className: twMerge(baseClasses, className), children: /* @__PURE__ */ jsx(
|
|
2366
2282
|
"div",
|
|
2367
2283
|
{
|
|
2368
2284
|
"data-size": "Small",
|
|
2369
2285
|
"data-type": "Failed",
|
|
2370
|
-
className: "h-6 px-
|
|
2371
|
-
children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-
|
|
2286
|
+
className: "h-6 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-95 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_20%,transparent)] rounded-[var(--deframe-widget-size-radius-md)] outline outline-1 outline-offset-[-1px] outline-[color:var(--deframe-widget-color-state-error)] flex justify-center items-center gap-[var(--deframe-widget-size-gap-xs)]",
|
|
2287
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-[var(--deframe-widget-size-gap-sm)].5", children: /* @__PURE__ */ jsx("div", { className: "justify-start text-[color:var(--deframe-widget-color-state-error)] [font-size:var(--deframe-widget-font-size-xs)] [line-height:var(--deframe-widget-font-leading-xs)] [font-weight:var(--deframe-widget-font-weight-regular)] font-[var(--deframe-widget-font-family)] leading-4", children: label }) })
|
|
2372
2288
|
}
|
|
2373
2289
|
) });
|
|
2374
2290
|
};
|
|
2375
2291
|
var MediumRiskBadge = ({ className, label }) => {
|
|
2376
|
-
const baseClasses = "inline-flex justify-start items-start gap-
|
|
2292
|
+
const baseClasses = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
|
|
2377
2293
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "medium-risk-badge", className: twMerge(baseClasses, className), children: /* @__PURE__ */ jsx(
|
|
2378
2294
|
"div",
|
|
2379
2295
|
{
|
|
2380
2296
|
"data-size": "Small",
|
|
2381
2297
|
"data-type": "Warning",
|
|
2382
|
-
className: "h-6 px-
|
|
2383
|
-
children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-
|
|
2298
|
+
className: "h-6 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-95 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_20%,transparent)] rounded-[var(--deframe-widget-size-radius-md)] outline outline-1 outline-offset-[-1px] outline-[color:var(--deframe-widget-color-state-warning)] flex justify-center items-center gap-[var(--deframe-widget-size-gap-xs)]",
|
|
2299
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-[var(--deframe-widget-size-gap-sm)].5", children: /* @__PURE__ */ jsx("div", { className: "justify-start text-[color:var(--deframe-widget-color-state-warning)] [font-size:var(--deframe-widget-font-size-xs)] [line-height:var(--deframe-widget-font-leading-xs)] [font-weight:var(--deframe-widget-font-weight-regular)] font-[var(--deframe-widget-font-family)] leading-4", children: label }) })
|
|
2384
2300
|
}
|
|
2385
2301
|
) });
|
|
2386
2302
|
};
|
|
2387
2303
|
var LowRiskBadge = ({ className, label }) => {
|
|
2388
|
-
const baseClasses = "inline-flex justify-start items-start gap-
|
|
2304
|
+
const baseClasses = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
|
|
2389
2305
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "low-risk-badge", className: twMerge(baseClasses, className), children: /* @__PURE__ */ jsx(
|
|
2390
2306
|
"div",
|
|
2391
2307
|
{
|
|
2392
2308
|
"data-size": "Small",
|
|
2393
2309
|
"data-type": "Completed",
|
|
2394
|
-
className: "h-6 px-
|
|
2395
|
-
children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-
|
|
2310
|
+
className: "h-6 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-95 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_20%,transparent)] rounded-[var(--deframe-widget-size-radius-md)] outline outline-1 outline-offset-[-1px] outline-[color:var(--deframe-widget-color-state-success)] flex justify-center items-center gap-[var(--deframe-widget-size-gap-xs)]",
|
|
2311
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-[var(--deframe-widget-size-gap-sm)].5", children: /* @__PURE__ */ jsx("div", { className: "justify-start text-[color:var(--deframe-widget-color-state-success)] [font-size:var(--deframe-widget-font-size-xs)] [line-height:var(--deframe-widget-font-leading-xs)] [font-weight:var(--deframe-widget-font-weight-regular)] font-[var(--deframe-widget-font-family)] leading-4", children: label }) })
|
|
2396
2312
|
}
|
|
2397
2313
|
) });
|
|
2398
2314
|
};
|
|
2399
2315
|
var gapClasses3 = {
|
|
2400
|
-
xs: "gap-xs",
|
|
2401
|
-
sm: "gap-sm",
|
|
2402
|
-
md: "gap-md",
|
|
2403
|
-
lg: "gap-lg"
|
|
2316
|
+
xs: "gap-[var(--deframe-widget-size-gap-xs)]",
|
|
2317
|
+
sm: "gap-[var(--deframe-widget-size-gap-sm)]",
|
|
2318
|
+
md: "gap-[var(--deframe-widget-size-gap-md)]",
|
|
2319
|
+
lg: "gap-[var(--deframe-widget-size-gap-lg)]"
|
|
2404
2320
|
};
|
|
2405
2321
|
var HistoryFlexCol = ({ children, className, gap = "xs" }) => /* @__PURE__ */ jsx("div", { "data-test-id": "history-flex-col", className: twMerge("flex flex-col", gapClasses3[gap], className), children });
|
|
2406
|
-
var TransactionTypeLabel = ({ children }) => /* @__PURE__ */ jsx("p", { "data-test-id": "transaction-type-label", className: "
|
|
2407
|
-
var Amount = ({ children }) => /* @__PURE__ */ jsx("p", { "data-test-id": "amount", className: "
|
|
2408
|
-
var AmountInUsd = ({ children }) => /* @__PURE__ */ jsxs("p", { "data-test-id": "amount-in-usd", className: "
|
|
2322
|
+
var TransactionTypeLabel = ({ children }) => /* @__PURE__ */ jsx("p", { "data-test-id": "transaction-type-label", className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children });
|
|
2323
|
+
var Amount = ({ children }) => /* @__PURE__ */ jsx("p", { "data-test-id": "amount", className: "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-secondary)]", children });
|
|
2324
|
+
var AmountInUsd = ({ children }) => /* @__PURE__ */ jsxs("p", { "data-test-id": "amount-in-usd", className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
2409
2325
|
"~ ",
|
|
2410
2326
|
children
|
|
2411
2327
|
] });
|
|
@@ -2415,16 +2331,16 @@ var TokenIcon = ({ src, alt }) => /* @__PURE__ */ jsx(
|
|
|
2415
2331
|
"data-test-id": "token-icon",
|
|
2416
2332
|
src,
|
|
2417
2333
|
alt,
|
|
2418
|
-
className: "w-8 h-8 rounded-full",
|
|
2334
|
+
className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]",
|
|
2419
2335
|
onError: (e) => {
|
|
2420
2336
|
const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
|
|
2421
2337
|
e.target.src = `https://placehold.co/40x40?text=${fallbackText}`;
|
|
2422
2338
|
}
|
|
2423
2339
|
}
|
|
2424
2340
|
);
|
|
2425
|
-
var SuccessBadge = ({ children }) => /* @__PURE__ */ jsxs("div", { "data-test-id": "success-badge", className: "bg-[
|
|
2426
|
-
/* @__PURE__ */ jsx("span", { className: "w-2 h-2 rounded-full bg-state-success" }),
|
|
2427
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
2341
|
+
var SuccessBadge = ({ children }) => /* @__PURE__ */ jsxs("div", { "data-test-id": "success-badge", className: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_12%,transparent)] flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] rounded-[var(--deframe-widget-size-radius-lg)]", children: [
|
|
2342
|
+
/* @__PURE__ */ jsx("span", { className: "w-2 h-2 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-state-success)]" }),
|
|
2343
|
+
/* @__PURE__ */ jsx("span", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-primary)]", children })
|
|
2428
2344
|
] });
|
|
2429
2345
|
var truncateHash = (hash, chars = 6) => {
|
|
2430
2346
|
if (hash.length <= chars * 2 + 3) return hash;
|
|
@@ -2432,15 +2348,15 @@ var truncateHash = (hash, chars = 6) => {
|
|
|
2432
2348
|
};
|
|
2433
2349
|
var TransactionId = ({ hash }) => {
|
|
2434
2350
|
if (!hash) {
|
|
2435
|
-
return /* @__PURE__ */ jsx("span", { "data-test-id": "transaction-id", className: "
|
|
2351
|
+
return /* @__PURE__ */ jsx("span", { "data-test-id": "transaction-id", className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-primary)]", children: "-" });
|
|
2436
2352
|
}
|
|
2437
|
-
return /* @__PURE__ */ jsxs("div", { "data-test-id": "transaction-id", className: "flex items-center gap-xs", children: [
|
|
2438
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
2353
|
+
return /* @__PURE__ */ jsxs("div", { "data-test-id": "transaction-id", className: "flex items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
2354
|
+
/* @__PURE__ */ jsx("span", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-primary)]", children: truncateHash(hash) }),
|
|
2439
2355
|
/* @__PURE__ */ jsx(
|
|
2440
2356
|
AddressDisplay,
|
|
2441
2357
|
{
|
|
2442
2358
|
address: hash,
|
|
2443
|
-
className: "border-none bg-transparent
|
|
2359
|
+
className: "border-none bg-transparent px-[var(--deframe-widget-size-padding-x-none)] py-[var(--deframe-widget-size-padding-y-none)] gap-[var(--deframe-widget-size-gap-none)]",
|
|
2444
2360
|
textClassName: "hidden"
|
|
2445
2361
|
}
|
|
2446
2362
|
)
|
|
@@ -2453,13 +2369,13 @@ var ExplorerLink = ({ href, children }) => /* @__PURE__ */ jsx(
|
|
|
2453
2369
|
href,
|
|
2454
2370
|
target: "_blank",
|
|
2455
2371
|
rel: "noopener noreferrer",
|
|
2456
|
-
className: "text-brand-primary underline
|
|
2372
|
+
className: "text-[color:var(--deframe-widget-color-brand-primary)] underline [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)]",
|
|
2457
2373
|
children
|
|
2458
2374
|
}
|
|
2459
2375
|
);
|
|
2460
2376
|
var TwoLineValue = ({ primary, secondary }) => /* @__PURE__ */ jsxs(HistoryFlexCol, { className: "items-end", children: [
|
|
2461
|
-
/* @__PURE__ */ jsx("p", { "data-test-id": "two-line-value-primary", className: "
|
|
2462
|
-
/* @__PURE__ */ jsx("p", { "data-test-id": "two-line-value-secondary", className: "
|
|
2377
|
+
/* @__PURE__ */ jsx("p", { "data-test-id": "two-line-value-primary", className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)] [font-weight:var(--deframe-widget-font-weight-semibold)]", children: primary }),
|
|
2378
|
+
/* @__PURE__ */ jsx("p", { "data-test-id": "two-line-value-secondary", className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: secondary })
|
|
2463
2379
|
] });
|
|
2464
2380
|
var HistoryDepositDetailsView = ({
|
|
2465
2381
|
transactionTypeLabel,
|
|
@@ -2514,7 +2430,7 @@ var HistoryDepositDetailsView = ({
|
|
|
2514
2430
|
] }) })
|
|
2515
2431
|
] })
|
|
2516
2432
|
] }) }),
|
|
2517
|
-
/* @__PURE__ */ jsx(SectionCard, { className: "!
|
|
2433
|
+
/* @__PURE__ */ jsx(SectionCard, { className: "!px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]", children: /* @__PURE__ */ jsxs(FlexCol, { gap: "sm", children: [
|
|
2518
2434
|
/* @__PURE__ */ jsxs(InfoRow, { borderBottom: true, children: [
|
|
2519
2435
|
/* @__PURE__ */ jsx(InfoLabel, { children: labels.currencyLabel }),
|
|
2520
2436
|
/* @__PURE__ */ jsx(InfoValue, { children: symbol })
|
|
@@ -2604,7 +2520,7 @@ var HistoryWithdrawDetailsView = ({
|
|
|
2604
2520
|
] }) })
|
|
2605
2521
|
] })
|
|
2606
2522
|
] }) }),
|
|
2607
|
-
/* @__PURE__ */ jsx(SectionCard, { className: "!
|
|
2523
|
+
/* @__PURE__ */ jsx(SectionCard, { className: "!px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]", children: /* @__PURE__ */ jsxs(FlexCol, { gap: "sm", children: [
|
|
2608
2524
|
/* @__PURE__ */ jsxs(InfoRow, { borderBottom: true, children: [
|
|
2609
2525
|
/* @__PURE__ */ jsx(InfoLabel, { children: labels.currencyLabel }),
|
|
2610
2526
|
/* @__PURE__ */ jsx(InfoValue, { children: symbol })
|
|
@@ -2649,21 +2565,21 @@ var SwapNetworkSelectorView = ({
|
|
|
2649
2565
|
testId = "swap-network-selector",
|
|
2650
2566
|
className
|
|
2651
2567
|
}) => {
|
|
2652
|
-
const baseClasses = "flex flex-row items-center gap-xs";
|
|
2568
|
+
const baseClasses = "flex flex-row items-center gap-[var(--deframe-widget-size-gap-xs)]";
|
|
2653
2569
|
return /* @__PURE__ */ jsxs("div", { "data-test-id": testId, className: twMerge(baseClasses, className), children: [
|
|
2654
|
-
/* @__PURE__ */ jsx(TextBody, { as: "span", variant: "
|
|
2570
|
+
/* @__PURE__ */ jsx(TextBody, { as: "span", variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", className: "tracking-wide text-[color:var(--deframe-widget-color-text-tertiary)]", children: directionLabel }),
|
|
2655
2571
|
/* @__PURE__ */ jsxs(
|
|
2656
2572
|
"button",
|
|
2657
2573
|
{
|
|
2658
2574
|
"data-testid": testId,
|
|
2659
2575
|
type: "button",
|
|
2660
2576
|
onClick,
|
|
2661
|
-
className: "ml-
|
|
2577
|
+
className: "ml-[var(--deframe-widget-size-gap-lg)] bg-[var(--deframe-widget-color-bg-tertiary)] border border-[color:var(--deframe-widget-color-border-tertiary)] rounded-[var(--deframe-widget-size-radius-md)] flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] hover:border-[color:var(--deframe-widget-color-border-secondary)] transition-colors [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)] cursor-pointer",
|
|
2662
2578
|
"aria-label": `${directionLabel} ${chainLabel}`,
|
|
2663
2579
|
children: [
|
|
2664
|
-
chainImage ? /* @__PURE__ */ jsx("img", { src: chainImage, alt: chainLabel, className: "w-3 h-3 rounded-full" }) : null,
|
|
2580
|
+
chainImage ? /* @__PURE__ */ jsx("img", { src: chainImage, alt: chainLabel, className: "w-3 h-3 rounded-[var(--deframe-widget-size-radius-full)]" }) : null,
|
|
2665
2581
|
/* @__PURE__ */ jsx("span", { children: chainLabel }),
|
|
2666
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(HiChevronDown, { className: "w-3 h-3 text-
|
|
2582
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
|
|
2667
2583
|
]
|
|
2668
2584
|
}
|
|
2669
2585
|
)
|
|
@@ -2674,10 +2590,10 @@ var SwapQuoteHeaderView = ({
|
|
|
2674
2590
|
timerElement,
|
|
2675
2591
|
className
|
|
2676
2592
|
}) => {
|
|
2677
|
-
const baseClasses = "border-b border-
|
|
2593
|
+
const baseClasses = "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]";
|
|
2678
2594
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "swap-quote-header", className: twMerge(baseClasses, className), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2679
|
-
/* @__PURE__ */ jsx(TextBody, { as: "span", variant: "
|
|
2680
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-md", children: timerElement })
|
|
2595
|
+
/* @__PURE__ */ jsx(TextBody, { as: "span", variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", className: "[font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-secondary)] inline-flex items-center", children: label }),
|
|
2596
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-md)]", children: timerElement })
|
|
2681
2597
|
] }) });
|
|
2682
2598
|
};
|
|
2683
2599
|
var SwapAmountInputView = ({
|
|
@@ -2708,8 +2624,8 @@ var SwapAmountInputView = ({
|
|
|
2708
2624
|
}
|
|
2709
2625
|
return val;
|
|
2710
2626
|
};
|
|
2711
|
-
const baseClasses = "
|
|
2712
|
-
const colorClasses = hasError ? "text-
|
|
2627
|
+
const baseClasses = "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] bg-transparent outline-none text-right w-full min-w-[120px] placeholder:text-[color:var(--deframe-widget-color-text-primary-disabled)]";
|
|
2628
|
+
const colorClasses = hasError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-primary)]";
|
|
2713
2629
|
return /* @__PURE__ */ jsx(
|
|
2714
2630
|
"input",
|
|
2715
2631
|
__spreadProps(__spreadValues({
|
|
@@ -2744,8 +2660,8 @@ var SwapOutputAmountView = ({
|
|
|
2744
2660
|
searchingQuoteLabel = "Searching quote...",
|
|
2745
2661
|
className
|
|
2746
2662
|
}) => {
|
|
2747
|
-
const baseClasses = "
|
|
2748
|
-
return /* @__PURE__ */ jsx("div", { "data-test-id": "swap-flow-output-amount", className: twMerge(baseClasses, className), children: isLoading ? /* @__PURE__ */ jsx(TextBody, { as: "span", variant: "
|
|
2663
|
+
const baseClasses = "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] text-right w-full min-w-[120px] text-[color:var(--deframe-widget-color-text-primary)]";
|
|
2664
|
+
return /* @__PURE__ */ jsx("div", { "data-test-id": "swap-flow-output-amount", className: twMerge(baseClasses, className), children: isLoading ? /* @__PURE__ */ jsx(TextBody, { as: "span", variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", className: "text-[color:var(--deframe-widget-color-text-primary-disabled)] inline-flex items-center", children: loadingElement != null ? loadingElement : searchingQuoteLabel }) : displayOutput });
|
|
2749
2665
|
};
|
|
2750
2666
|
var SwapQuoteErrorsView = ({
|
|
2751
2667
|
hasQuoteError,
|
|
@@ -2779,12 +2695,12 @@ var SwapSlippageToleranceButtonsView = ({
|
|
|
2779
2695
|
formatPercentage,
|
|
2780
2696
|
className
|
|
2781
2697
|
}) => {
|
|
2782
|
-
const baseClasses = "flex gap-xs";
|
|
2698
|
+
const baseClasses = "flex gap-[var(--deframe-widget-size-gap-xs)]";
|
|
2783
2699
|
return /* @__PURE__ */ jsx("div", { "data-test-id": "swap-slippage-tolerance-buttons", className: twMerge(baseClasses, className), children: SLIPPAGE_OPTIONS.map((option) => {
|
|
2784
2700
|
const isActive = slippageBps === option;
|
|
2785
|
-
const activeClasses = "border-brand-primary text-brand-primary bg-
|
|
2786
|
-
const inactiveClasses = "border-
|
|
2787
|
-
const buttonBase = "px-sm py-xs rounded border
|
|
2701
|
+
const activeClasses = "border-[color:var(--deframe-widget-color-brand-primary)] text-[color:var(--deframe-widget-color-brand-primary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_18%,transparent)]";
|
|
2702
|
+
const inactiveClasses = "border-[color:var(--deframe-widget-color-border-tertiary)] text-[color:var(--deframe-widget-color-text-secondary)] bg-[var(--deframe-widget-color-bg-primary)]";
|
|
2703
|
+
const buttonBase = "px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] rounded-[var(--deframe-widget-size-radius-xs)] border [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] cursor-pointer";
|
|
2788
2704
|
return /* @__PURE__ */ jsx(
|
|
2789
2705
|
"button",
|
|
2790
2706
|
{
|
|
@@ -2807,7 +2723,7 @@ var SwapTokenSelectorView = ({
|
|
|
2807
2723
|
selectTokenLabel = "Select token",
|
|
2808
2724
|
className
|
|
2809
2725
|
}) => {
|
|
2810
|
-
const baseClasses = "h-[56px] border border-border-
|
|
2726
|
+
const baseClasses = "h-[56px] border border-[color:var(--deframe-widget-color-border-secondary)] rounded-[var(--deframe-widget-size-radius-xs)] overflow-hidden hover:border-[color:var(--deframe-widget-color-border-primary)] transition-colors flex items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[6px] w-full cursor-pointer";
|
|
2811
2727
|
return /* @__PURE__ */ jsxs(
|
|
2812
2728
|
"button",
|
|
2813
2729
|
{
|
|
@@ -2817,11 +2733,11 @@ var SwapTokenSelectorView = ({
|
|
|
2817
2733
|
className: twMerge(baseClasses, className),
|
|
2818
2734
|
"aria-label": token ? token.symbol : selectTokenLabel,
|
|
2819
2735
|
children: [
|
|
2820
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-sm flex-1", children: token ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2821
|
-
token.logoURI ? /* @__PURE__ */ jsx("img", { src: token.logoURI, alt: token.symbol, className: "w-6 h-6 rounded-full" }) : /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-
|
|
2822
|
-
/* @__PURE__ */ jsx(TextBody, { as: "span", className: "text-
|
|
2823
|
-
] }) : /* @__PURE__ */ jsx(TextBody, { as: "span", className: "text-
|
|
2824
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(HiChevronDown, { className: "w-3 h-3 text-
|
|
2736
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: token ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2737
|
+
token.logoURI ? /* @__PURE__ */ jsx("img", { src: token.logoURI, alt: token.symbol, className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)]" }) : /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-secondary)] text-[color:var(--deframe-widget-color-text-secondary)] flex items-center justify-center text-[10px] [font-weight:var(--deframe-widget-font-weight-semibold)]", children: (token.symbol || "").slice(0, 3).toUpperCase() }),
|
|
2738
|
+
/* @__PURE__ */ jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-primary)]", children: token.symbol })
|
|
2739
|
+
] }) : /* @__PURE__ */ jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: selectTokenLabel }) }),
|
|
2740
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsx(HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
|
|
2825
2741
|
]
|
|
2826
2742
|
}
|
|
2827
2743
|
);
|
|
@@ -2845,7 +2761,7 @@ var SwapQuoteBlockchainCostsView = ({
|
|
|
2845
2761
|
defaultOpen: true,
|
|
2846
2762
|
collapseLabel,
|
|
2847
2763
|
expandLabel,
|
|
2848
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-sm", children: [
|
|
2764
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
2849
2765
|
/* @__PURE__ */ jsxs(InfoRowWithIcon, { children: [
|
|
2850
2766
|
/* @__PURE__ */ jsx(InfoRowIconLabel, { children: networkGasLabel }),
|
|
2851
2767
|
/* @__PURE__ */ jsx(InfoRowIconValue, { children: gasCostFormatted })
|
|
@@ -2858,6 +2774,19 @@ var SwapQuoteBlockchainCostsView = ({
|
|
|
2858
2774
|
}
|
|
2859
2775
|
) });
|
|
2860
2776
|
};
|
|
2777
|
+
var CloseButton = ({ onClick, testId, ariaLabel = "Close", className }) => {
|
|
2778
|
+
const baseClasses = "w-12 h-12 rounded-[var(--deframe-widget-size-radius-full)] flex items-center justify-center text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-brand-primary)] transition-colors cursor-pointer";
|
|
2779
|
+
return /* @__PURE__ */ jsx(
|
|
2780
|
+
"button",
|
|
2781
|
+
{
|
|
2782
|
+
"data-test-id": testId != null ? testId : "close-button",
|
|
2783
|
+
onClick,
|
|
2784
|
+
className: twMerge(baseClasses, className),
|
|
2785
|
+
"aria-label": ariaLabel,
|
|
2786
|
+
children: /* @__PURE__ */ jsx(HiXMark, { className: "w-6 h-6" })
|
|
2787
|
+
}
|
|
2788
|
+
);
|
|
2789
|
+
};
|
|
2861
2790
|
var ChooseAStrategyActionsheetView = ({
|
|
2862
2791
|
isOpen,
|
|
2863
2792
|
currentActionSheetId,
|
|
@@ -2891,19 +2820,19 @@ var ChooseAStrategyActionsheetView = ({
|
|
|
2891
2820
|
contentClassName: "w-full max-w-[620px] mx-auto",
|
|
2892
2821
|
children: /* @__PURE__ */ jsxs(BackgroundContainer, { className: "flex flex-col h-full", children: [
|
|
2893
2822
|
/* @__PURE__ */ jsx(Navbar, { children: /* @__PURE__ */ jsx(CloseButton, { onClick: onClose, ariaLabel: closeAriaLabel }) }),
|
|
2894
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full
|
|
2823
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)] overflow-hidden", children: [
|
|
2895
2824
|
/* @__PURE__ */ jsxs("div", { className: "flex-shrink-0", children: [
|
|
2896
2825
|
/* @__PURE__ */ jsx(TextHeading, { children: resolvedYieldLabel }),
|
|
2897
2826
|
/* @__PURE__ */ jsx("br", {})
|
|
2898
2827
|
] }),
|
|
2899
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-
|
|
2900
|
-
/* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: logoUrl, alt: assetName, className: "w-10 h-10 rounded-full" }) }),
|
|
2901
|
-
/* @__PURE__ */ jsxs(ListItemContent, { className: "gap-
|
|
2828
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] w-full mt-[var(--deframe-widget-size-gap-md)] overflow-y-auto flex-1 min-h-0", children: /* @__PURE__ */ jsxs(ListItem, { className: "flex-shrink-0", onClick: onStrategyClick, children: [
|
|
2829
|
+
/* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: logoUrl, alt: assetName, className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)]" }) }),
|
|
2830
|
+
/* @__PURE__ */ jsxs(ListItemContent, { className: "gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
2902
2831
|
/* @__PURE__ */ jsx(TextBody, { children: resolvedYieldLabel }),
|
|
2903
|
-
/* @__PURE__ */ jsx(TextBody, { variant: "
|
|
2832
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", children: Badge })
|
|
2904
2833
|
] }),
|
|
2905
|
-
/* @__PURE__ */ jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-center items-center gap-
|
|
2906
|
-
/* @__PURE__ */ jsxs("span", { className: "text-state-success", children: [
|
|
2834
|
+
/* @__PURE__ */ jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-center items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
2835
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[color:var(--deframe-widget-color-state-success)]", children: [
|
|
2907
2836
|
apy,
|
|
2908
2837
|
"% ",
|
|
2909
2838
|
apyLabel
|
|
@@ -2930,23 +2859,23 @@ var StrategyDetailsView = ({
|
|
|
2930
2859
|
}) => {
|
|
2931
2860
|
return /* @__PURE__ */ jsxs(BackgroundContainer, { children: [
|
|
2932
2861
|
/* @__PURE__ */ jsx(DetailsHeader, { title: headerTitle, onBack, backAriaLabel }),
|
|
2933
|
-
/* @__PURE__ */ jsx("div", { "data-test-id": "strategy-details-content", className: "flex-1 min-h-0 overflow-y-auto
|
|
2934
|
-
/* @__PURE__ */ jsxs("div", { className: "inline-flex flex-col items-start gap-sm", children: [
|
|
2935
|
-
/* @__PURE__ */ jsx("img", { "data-test-id": "strategy-logo", src: logoUrl, alt: title, className: "w-20 h-20 rounded-full" }),
|
|
2862
|
+
/* @__PURE__ */ jsx("div", { "data-test-id": "strategy-details-content", className: "flex-1 min-h-0 overflow-y-auto px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)] py-[var(--deframe-widget-size-padding-y-lg)] pb-[var(--deframe-widget-size-padding-y-xxl)]", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-lg)] min-h-full", children: [
|
|
2863
|
+
/* @__PURE__ */ jsxs("div", { className: "inline-flex flex-col items-start gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
2864
|
+
/* @__PURE__ */ jsx("img", { "data-test-id": "strategy-logo", src: logoUrl, alt: title, className: "w-20 h-20 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
2936
2865
|
/* @__PURE__ */ jsx(TextHeading, { variant: "h5", children: title })
|
|
2937
2866
|
] }),
|
|
2938
|
-
/* @__PURE__ */ jsx(TextBody, { variant: "
|
|
2867
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", children: description }),
|
|
2939
2868
|
/* @__PURE__ */ jsx(
|
|
2940
2869
|
SummaryDetails,
|
|
2941
2870
|
{
|
|
2942
2871
|
title: strategyInfoTitle,
|
|
2943
2872
|
items: strategyInfo,
|
|
2944
2873
|
defaultOpen: true,
|
|
2945
|
-
className: "bg-
|
|
2874
|
+
className: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)]"
|
|
2946
2875
|
}
|
|
2947
2876
|
)
|
|
2948
2877
|
] }) }),
|
|
2949
|
-
/* @__PURE__ */ jsx("div", { "data-test-id": "strategy-details-footer", className: "sticky bottom-0 left-0 right-0 border-t border-
|
|
2878
|
+
/* @__PURE__ */ jsx("div", { "data-test-id": "strategy-details-footer", className: "sticky bottom-0 left-0 right-0 border-t border-[color:var(--deframe-widget-color-border-tertiary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: onDeposit, className: "w-full", children: depositButtonLabel }) })
|
|
2950
2879
|
] });
|
|
2951
2880
|
};
|
|
2952
2881
|
var ProgressIndicator = ({
|
|
@@ -2958,15 +2887,15 @@ var ProgressIndicator = ({
|
|
|
2958
2887
|
/* @__PURE__ */ jsx(
|
|
2959
2888
|
"div",
|
|
2960
2889
|
{
|
|
2961
|
-
className: "h-[4px] bg-brand-primary rounded-
|
|
2890
|
+
className: "h-[4px] bg-[var(--deframe-widget-color-brand-primary)] rounded-[var(--deframe-widget-size-radius-md)] transition-all duration-300",
|
|
2962
2891
|
style: { width: `${clampedProgress}%` }
|
|
2963
2892
|
}
|
|
2964
2893
|
),
|
|
2965
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 h-[4px] bg-
|
|
2894
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 h-[4px] bg-[var(--deframe-widget-color-bg-tertiary)] rounded-[var(--deframe-widget-size-radius-md)] ml-[var(--deframe-widget-size-gap-xs)]" })
|
|
2966
2895
|
] }) });
|
|
2967
2896
|
};
|
|
2968
2897
|
var LoadingDots = ({ className = "" }) => {
|
|
2969
|
-
return /* @__PURE__ */ jsxs("span", { className: `flex gap-
|
|
2898
|
+
return /* @__PURE__ */ jsxs("span", { className: `flex gap-[var(--deframe-widget-size-gap-none)].5 ${className}`, children: [
|
|
2970
2899
|
/* @__PURE__ */ jsx("span", { className: "animate-bounce", style: { animationDelay: "0ms", animationDuration: "1.4s" }, children: "." }),
|
|
2971
2900
|
/* @__PURE__ */ jsx("span", { className: "animate-bounce", style: { animationDelay: "200ms", animationDuration: "1.4s" }, children: "." }),
|
|
2972
2901
|
/* @__PURE__ */ jsx("span", { className: "animate-bounce", style: { animationDelay: "400ms", animationDuration: "1.4s" }, children: "." })
|
|
@@ -3007,28 +2936,28 @@ var SearchInput = ({
|
|
|
3007
2936
|
autoFocus,
|
|
3008
2937
|
onChange: (e) => handleInputChange(e.target.value),
|
|
3009
2938
|
className: [
|
|
3010
|
-
"w-full h-full rounded
|
|
3011
|
-
!inputClassName ? "bg-
|
|
3012
|
-
"placeholder:text-
|
|
2939
|
+
"w-full h-full rounded-[var(--deframe-widget-size-radius-xs)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)] pr-[var(--deframe-widget-size-padding-x-xxl)] leading-normal tracking-wide",
|
|
2940
|
+
!inputClassName ? "bg-[var(--deframe-widget-color-bg-secondary)]" : "",
|
|
2941
|
+
"placeholder:text-[color:var(--deframe-widget-color-text-primary-disabled)] text-[color:var(--deframe-widget-color-text-primary)]",
|
|
3013
2942
|
"focus:outline-none focus:ring-2 focus:ring-brand-primary",
|
|
3014
2943
|
disabled ? "cursor-not-allowed opacity-50" : "",
|
|
3015
2944
|
inputClassName || ""
|
|
3016
2945
|
].filter(Boolean).join(" ")
|
|
3017
2946
|
}
|
|
3018
2947
|
),
|
|
3019
|
-
/* @__PURE__ */ jsx(MdOutlineSearch, { className: "w-4 h-4 text-text-secondary absolute right-4" })
|
|
2948
|
+
/* @__PURE__ */ jsx(MdOutlineSearch, { className: "w-4 h-4 text-[color:var(--deframe-widget-color-text-secondary)] absolute right-4" })
|
|
3020
2949
|
] });
|
|
3021
2950
|
};
|
|
3022
2951
|
var SearchEmptyState = ({
|
|
3023
2952
|
title,
|
|
3024
2953
|
description
|
|
3025
2954
|
}) => {
|
|
3026
|
-
return /* @__PURE__ */ jsx("div", { className: "w-full py-md bg-
|
|
3027
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center items-center gap-md text-center", children: [
|
|
3028
|
-
/* @__PURE__ */ jsx("div", { className: "w-20 h-20 bg-
|
|
2955
|
+
return /* @__PURE__ */ jsx("div", { className: "w-full py-[var(--deframe-widget-size-padding-y-md)] bg-[var(--deframe-widget-color-bg-primary)] rounded-[var(--deframe-widget-size-radius-md)] flex flex-col justify-center items-center gap-[var(--deframe-widget-size-gap-sm)] h-full", children: /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col justify-center items-center gap-[var(--deframe-widget-size-gap-md)] py-[var(--deframe-widget-size-padding-y-xxl)]", children: [
|
|
2956
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center items-center gap-[var(--deframe-widget-size-gap-md)] text-center", children: [
|
|
2957
|
+
/* @__PURE__ */ jsx("div", { className: "w-20 h-20 bg-[var(--deframe-widget-color-bg-tertiary)] rounded-[var(--deframe-widget-size-radius-full)] flex justify-center items-center", children: /* @__PURE__ */ jsx(MdOutlineSearchOff, { className: "w-10 h-10 text-[color:var(--deframe-widget-color-text-tertiary)]" }) }),
|
|
3029
2958
|
/* @__PURE__ */ jsx(TextHeading, { variant: "h3", children: title })
|
|
3030
2959
|
] }),
|
|
3031
|
-
/* @__PURE__ */ jsx("div", { className: "self-stretch text-center", children: /* @__PURE__ */ jsx(TextBody, { variant: "
|
|
2960
|
+
/* @__PURE__ */ jsx("div", { className: "self-stretch text-center", children: /* @__PURE__ */ jsx(TextBody, { variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", children: description }) })
|
|
3032
2961
|
] }) });
|
|
3033
2962
|
};
|
|
3034
2963
|
var CollapsibleSection = ({
|
|
@@ -3051,7 +2980,7 @@ var CollapsibleSection = ({
|
|
|
3051
2980
|
}
|
|
3052
2981
|
onOpenChange == null ? void 0 : onOpenChange(newOpenState);
|
|
3053
2982
|
};
|
|
3054
|
-
return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-sm w-full ${className}`, children: [
|
|
2983
|
+
return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-[var(--deframe-widget-size-gap-sm)] w-full ${className}`, children: [
|
|
3055
2984
|
/* @__PURE__ */ jsxs(
|
|
3056
2985
|
"button",
|
|
3057
2986
|
{
|
|
@@ -3061,13 +2990,13 @@ var CollapsibleSection = ({
|
|
|
3061
2990
|
"aria-expanded": isOpen,
|
|
3062
2991
|
"aria-label": `${isOpen ? collapseText : expandText} ${title}`,
|
|
3063
2992
|
children: [
|
|
3064
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-xs", children: /* @__PURE__ */ jsx(TextBody, { className: "text-
|
|
3065
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-xs", children: [
|
|
3066
|
-
subtitle && /* @__PURE__ */ jsx(TextBody, { variant: "
|
|
2993
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-xs)]", children: /* @__PURE__ */ jsx(TextBody, { className: "text-[color:var(--deframe-widget-color-text-primary-dark)] [font-weight:var(--deframe-widget-font-weight-medium)]", children: title }) }),
|
|
2994
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
2995
|
+
subtitle && /* @__PURE__ */ jsx(TextBody, { variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", children: subtitle }),
|
|
3067
2996
|
/* @__PURE__ */ jsx(
|
|
3068
2997
|
motion.svg,
|
|
3069
2998
|
{
|
|
3070
|
-
className: "w-5 h-5 text-
|
|
2999
|
+
className: "w-5 h-5 text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
3071
3000
|
fill: "none",
|
|
3072
3001
|
stroke: "currentColor",
|
|
3073
3002
|
viewBox: "0 0 24 24",
|
|
@@ -3095,15 +3024,15 @@ var CollapsibleSection = ({
|
|
|
3095
3024
|
};
|
|
3096
3025
|
var TransactionScreenIcon = ({
|
|
3097
3026
|
type,
|
|
3098
|
-
gradient = "linear-gradient(135deg,
|
|
3027
|
+
gradient = "linear-gradient(135deg, var(--deframe-widget-color-state-warning) 0%, color-mix(in srgb, var(--deframe-widget-color-state-warning) 78%, black) 100%)"
|
|
3099
3028
|
}) => {
|
|
3100
3029
|
if (type === "success") {
|
|
3101
|
-
return /* @__PURE__ */ jsx("div", { className: "relative w-20 h-20", children: /* @__PURE__ */ jsx("div", { className: "w-full h-full rounded-full bg-brand-primary flex items-center justify-center", children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8 text-
|
|
3030
|
+
return /* @__PURE__ */ jsx("div", { className: "relative w-20 h-20", children: /* @__PURE__ */ jsx("div", { className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-brand-primary)] flex items-center justify-center", children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8 text-[color:var(--deframe-widget-color-text-primary-dark)]", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) }) });
|
|
3102
3031
|
}
|
|
3103
3032
|
if (type === "warning") {
|
|
3104
|
-
return /* @__PURE__ */ jsx("div", { className: "relative w-[83px] h-[83px]", children: /* @__PURE__ */ jsx("div", { className: "w-full h-full rounded-full flex items-center justify-center", style: { background: gradient }, children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8 text-
|
|
3033
|
+
return /* @__PURE__ */ jsx("div", { className: "relative w-[83px] h-[83px]", children: /* @__PURE__ */ jsx("div", { className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] flex items-center justify-center", style: { background: gradient }, children: /* @__PURE__ */ jsx("svg", { className: "w-8 h-8 text-[color:var(--deframe-widget-color-bg-primary)]", fill: "currentColor", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M16 5.33334C15.6444 5.33334 15.3111 5.51112 15.1111 5.8L5.11112 21.8C4.91112 22.0889 4.91112 22.4667 5.11112 22.7556C5.31112 23.0444 5.64445 23.2222 6.00001 23.2222H26C26.3556 23.2222 26.6889 23.0444 26.8889 22.7556C27.0889 22.4667 27.0889 22.0889 26.8889 21.8L16.8889 5.8C16.6889 5.51112 16.3556 5.33334 16 5.33334ZM16 10.6667C16.5333 10.6667 17 11.1333 17 11.6667V16C17 16.5333 16.5333 17 16 17C15.4667 17 15 16.5333 15 16V11.6667C15 11.1333 15.4667 10.6667 16 10.6667ZM16 19.3333C16.7333 19.3333 17.3333 19.9333 17.3333 20.6667C17.3333 21.4 16.7333 22 16 22C15.2667 22 14.6667 21.4 14.6667 20.6667C14.6667 19.9333 15.2667 19.3333 16 19.3333Z" }) }) }) });
|
|
3105
3034
|
}
|
|
3106
|
-
return /* @__PURE__ */ jsx("div", { className: "relative w-[83px] h-[83px]", children: /* @__PURE__ */ jsx("div", { className: "w-full h-full rounded-full flex items-center justify-center", style: { background: gradient }, children: /* @__PURE__ */ jsx("svg", { width: "11", height: "10", viewBox: "0 0 11 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "w-8 h-8 text-
|
|
3035
|
+
return /* @__PURE__ */ jsx("div", { className: "relative w-[83px] h-[83px]", children: /* @__PURE__ */ jsx("div", { className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] flex items-center justify-center", style: { background: gradient }, children: /* @__PURE__ */ jsx("svg", { width: "11", height: "10", viewBox: "0 0 11 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "w-8 h-8 text-[color:var(--deframe-widget-color-text-primary-dark)]", children: /* @__PURE__ */ jsx("path", { d: "M3.66659 8.33301H7.33325V7.08301C7.33325 6.62468 7.15374 6.23231 6.79471 5.90593C6.43568 5.57954 6.00409 5.41634 5.49992 5.41634C4.99575 5.41634 4.56415 5.57954 4.20513 5.90593C3.8461 6.23231 3.66659 6.62468 3.66659 7.08301V8.33301ZM5.49992 4.58301C6.00409 4.58301 6.43568 4.41981 6.79471 4.09342C7.15374 3.76704 7.33325 3.37467 7.33325 2.91634V1.66634H3.66659V2.91634C3.66659 3.37467 3.8461 3.76704 4.20513 4.09342C4.56415 4.41981 4.99575 4.58301 5.49992 4.58301ZM2.29159 9.16634C2.16172 9.16634 2.05287 9.12641 1.96502 9.04655C1.87718 8.96669 1.83325 8.86773 1.83325 8.74968C1.83325 8.63162 1.87718 8.53266 1.96502 8.4528C2.05287 8.37294 2.16172 8.33301 2.29159 8.33301H2.74992V7.08301C2.74992 6.6594 2.85877 6.26183 3.07648 5.8903C3.29419 5.51877 3.59784 5.2219 3.98742 4.99967C3.59784 4.77745 3.29419 4.48058 3.07648 4.10905C2.85877 3.73752 2.74992 3.33995 2.74992 2.91634V1.66634H2.29159C2.16172 1.66634 2.05287 1.62641 1.96502 1.54655C1.87718 1.46669 1.83325 1.36773 1.83325 1.24967C1.83325 1.13162 1.87718 1.03266 1.96502 0.952799C2.05287 0.872938 2.16172 0.833008 2.29159 0.833008H8.70825C8.83811 0.833008 8.94697 0.872938 9.03481 0.952799C9.12266 1.03266 9.16659 1.13162 9.16659 1.24967C9.16659 1.36773 9.12266 1.46669 9.03481 1.54655C8.94697 1.62641 8.83811 1.66634 8.70825 1.66634H8.24992V2.91634C8.24992 3.33995 8.14106 3.73752 7.92336 4.10905C7.70565 4.48058 7.402 4.77745 7.01242 4.99967C7.402 5.2219 7.70565 5.51877 7.92336 5.8903C8.14106 6.26183 8.24992 6.6594 8.24992 7.08301V8.33301H8.70825C8.83811 8.33301 8.94697 8.37294 9.03481 8.4528C9.12266 8.53266 9.16659 8.63162 9.16659 8.74968C9.16659 8.86773 9.12266 8.96669 9.03481 9.04655C8.94697 9.12641 8.83811 9.16634 8.70825 9.16634H2.29159Z", fill: "currentColor" }) }) }) });
|
|
3107
3036
|
};
|
|
3108
3037
|
var TransactionScreen = ({
|
|
3109
3038
|
progress,
|
|
@@ -3120,18 +3049,18 @@ var TransactionScreen = ({
|
|
|
3120
3049
|
}) => {
|
|
3121
3050
|
return /* @__PURE__ */ jsx(BackgroundContainer, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full", children: [
|
|
3122
3051
|
onBack && /* @__PURE__ */ jsx(DetailsHeader, { title: backTitle, onBack }),
|
|
3123
|
-
onClose && /* @__PURE__ */ jsx("div", { "data-testid": testId, className: "flex justify-start px-md pt-md", children: /* @__PURE__ */ jsx(CloseButton, { onClick: onClose }) }),
|
|
3124
|
-
/* @__PURE__ */ jsx("div", { className: "w-full px-md pt-sm", children: /* @__PURE__ */ jsx(ProgressIndicator, { progress }) }),
|
|
3125
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-md py-lg flex flex-col gap-lg", children: [
|
|
3126
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-md pt-lg", children: [
|
|
3052
|
+
onClose && /* @__PURE__ */ jsx("div", { "data-testid": testId, className: "flex justify-start px-[var(--deframe-widget-size-padding-x-md)] pt-md", children: /* @__PURE__ */ jsx(CloseButton, { onClick: onClose }) }),
|
|
3053
|
+
/* @__PURE__ */ jsx("div", { className: "w-full px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)]", children: /* @__PURE__ */ jsx(ProgressIndicator, { progress }) }),
|
|
3054
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)] flex flex-col gap-[var(--deframe-widget-size-gap-lg)]", children: [
|
|
3055
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-md)] pt-lg", children: [
|
|
3127
3056
|
/* @__PURE__ */ jsx(TransactionScreenIcon, { type: iconType, gradient: iconGradient }),
|
|
3128
3057
|
/* @__PURE__ */ jsx(TextHeading, { variant: "h-large", children: title }),
|
|
3129
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3058
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)] text-center", style: { maxWidth: "350px" }, children: description })
|
|
3130
3059
|
] }),
|
|
3131
3060
|
children,
|
|
3132
3061
|
/* @__PURE__ */ jsx("div", { className: "flex-1" })
|
|
3133
3062
|
] }),
|
|
3134
|
-
actions && /* @__PURE__ */ jsx("div", { className: "px-md pb-md", children: actions })
|
|
3063
|
+
actions && /* @__PURE__ */ jsx("div", { className: "px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-md)]", children: actions })
|
|
3135
3064
|
] }) });
|
|
3136
3065
|
};
|
|
3137
3066
|
var TransactionScreenInvestmentCard = ({
|
|
@@ -3150,19 +3079,19 @@ var TransactionScreenInvestmentCard = ({
|
|
|
3150
3079
|
const shouldShowImage = Boolean(iconSrc) && !hasImageError;
|
|
3151
3080
|
const fallbackLabel = (iconAlt || "?").slice(0, 1).toUpperCase();
|
|
3152
3081
|
return /* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3153
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-xs", children: [
|
|
3154
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3155
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3082
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3083
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-lg)] [line-height:var(--deframe-widget-font-leading-lg)] [font-weight:var(--deframe-widget-font-weight-medium)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: strategyName }),
|
|
3084
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3156
3085
|
apyLabel,
|
|
3157
3086
|
" ",
|
|
3158
|
-
/* @__PURE__ */ jsx(TextBody, { as: "span", className: "text-state-success", children: apyValue })
|
|
3087
|
+
/* @__PURE__ */ jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-state-success)]", children: apyValue })
|
|
3159
3088
|
] })
|
|
3160
3089
|
] }),
|
|
3161
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-sm", children: [
|
|
3162
|
-
/* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-full bg-
|
|
3090
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3091
|
+
/* @__PURE__ */ jsx("div", { className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center", children: shouldShowImage ? /* @__PURE__ */ jsx("img", { src: iconSrc, alt: iconAlt, className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)]", onError: () => setHasImageError(true) }) : /* @__PURE__ */ jsx("span", { className: "[font-size:var(--deframe-widget-font-size-xs)] [line-height:var(--deframe-widget-font-leading-xs)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-secondary)]", children: fallbackLabel }) }),
|
|
3163
3092
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end", children: [
|
|
3164
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3165
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3093
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: amountUSD }),
|
|
3094
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: amountToken })
|
|
3166
3095
|
] })
|
|
3167
3096
|
] })
|
|
3168
3097
|
] }) });
|
|
@@ -3170,11 +3099,11 @@ var TransactionScreenInvestmentCard = ({
|
|
|
3170
3099
|
function StepStatusIcon({ status }) {
|
|
3171
3100
|
switch (status) {
|
|
3172
3101
|
case "completed":
|
|
3173
|
-
return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-
|
|
3102
|
+
return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(IoCheckmarkOutline, { className: "w-4 h-4 text-[color:var(--deframe-widget-color-state-success)]" }) });
|
|
3174
3103
|
case "processing":
|
|
3175
|
-
return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-
|
|
3104
|
+
return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(IoTimeOutline, { className: "w-4 h-4 text-[color:var(--deframe-widget-color-state-warning)]" }) });
|
|
3176
3105
|
case "failed":
|
|
3177
|
-
return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-full bg-
|
|
3106
|
+
return /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(IoAlertCircleOutline, { className: "w-4 h-4 text-[color:var(--deframe-widget-color-state-error)]" }) });
|
|
3178
3107
|
}
|
|
3179
3108
|
}
|
|
3180
3109
|
function StepStatusText({
|
|
@@ -3185,8 +3114,8 @@ function StepStatusText({
|
|
|
3185
3114
|
viewOnExplorerText
|
|
3186
3115
|
}) {
|
|
3187
3116
|
if (step.statusText) {
|
|
3188
|
-
const textColorClass2 = step.status === "completed" ? "text-
|
|
3189
|
-
return /* @__PURE__ */ jsx("span", { className: `
|
|
3117
|
+
const textColorClass2 = step.status === "completed" ? "text-[color:var(--deframe-widget-color-text-primary)]" : step.status === "processing" ? "text-[color:var(--deframe-widget-color-text-secondary)]" : step.status === "failed" ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-primary-disabled)]";
|
|
3118
|
+
return /* @__PURE__ */ jsx("span", { className: `[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] ${textColorClass2}`, children: step.statusText });
|
|
3190
3119
|
}
|
|
3191
3120
|
if (step.status === "completed" && step.explorerUrl) {
|
|
3192
3121
|
return /* @__PURE__ */ jsx(
|
|
@@ -3195,24 +3124,24 @@ function StepStatusText({
|
|
|
3195
3124
|
href: step.explorerUrl,
|
|
3196
3125
|
target: "_blank",
|
|
3197
3126
|
rel: "noopener noreferrer",
|
|
3198
|
-
className: "
|
|
3127
|
+
className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-brand-primary)] underline hover:no-underline",
|
|
3199
3128
|
children: viewOnExplorerText
|
|
3200
3129
|
}
|
|
3201
3130
|
);
|
|
3202
3131
|
}
|
|
3203
3132
|
const defaultText = step.status === "completed" ? completedText : step.status === "processing" ? processingText : failedText;
|
|
3204
|
-
const textColorClass = step.status === "completed" ? "text-
|
|
3205
|
-
return /* @__PURE__ */ jsx("span", { className: `
|
|
3133
|
+
const textColorClass = step.status === "completed" ? "text-[color:var(--deframe-widget-color-text-primary)]" : step.status === "processing" ? "text-[color:var(--deframe-widget-color-text-secondary)]" : "text-[color:var(--deframe-widget-color-state-error)]";
|
|
3134
|
+
return /* @__PURE__ */ jsx("span", { className: `[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] ${textColorClass}`, children: defaultText });
|
|
3206
3135
|
}
|
|
3207
3136
|
function StepDisplay({ step, completedText, processingText, failedText, viewOnExplorerText }) {
|
|
3208
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-
|
|
3209
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx("p", { className: "
|
|
3210
|
-
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: step.value ? /* @__PURE__ */ jsx("span", { className: "
|
|
3137
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-[var(--deframe-widget-size-gap-md)] w-full", children: [
|
|
3138
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx("p", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-primary)] [font-weight:var(--deframe-widget-font-weight-medium)]", children: step.label }) }),
|
|
3139
|
+
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: step.value ? /* @__PURE__ */ jsx("span", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: step.value }) : /* @__PURE__ */ jsx(StepStatusText, { step, completedText, processingText, failedText, viewOnExplorerText }) })
|
|
3211
3140
|
] });
|
|
3212
3141
|
}
|
|
3213
3142
|
function TransactionProcessingDetails({
|
|
3214
3143
|
steps,
|
|
3215
|
-
className = "bg-
|
|
3144
|
+
className = "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
3216
3145
|
defaultOpen = true,
|
|
3217
3146
|
labels
|
|
3218
3147
|
}) {
|
|
@@ -3220,19 +3149,19 @@ function TransactionProcessingDetails({
|
|
|
3220
3149
|
return null;
|
|
3221
3150
|
}
|
|
3222
3151
|
const getProcessingSteps = () => {
|
|
3223
|
-
return /* @__PURE__ */ jsx("div", { className: "flex flex-col w-full", children: steps.map((step, index) => /* @__PURE__ */ jsxs("div", { className: "flex gap-
|
|
3152
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col w-full", children: steps.map((step, index) => /* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3224
3153
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
3225
3154
|
step.status && /* @__PURE__ */ jsx(StepStatusIcon, { status: step.status }),
|
|
3226
|
-
index < steps.length - 1 && step.status && /* @__PURE__ */ jsx("div", { className: "w-px flex-1 min-h-[16px] bg-
|
|
3155
|
+
index < steps.length - 1 && step.status && /* @__PURE__ */ jsx("div", { className: "w-px flex-1 min-h-[16px] bg-[var(--deframe-widget-color-bg-primary-dark)] my-[var(--deframe-widget-size-gap-xs)]" })
|
|
3227
3156
|
] }),
|
|
3228
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 pb-
|
|
3157
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 pb-[var(--deframe-widget-size-padding-y-sm)] min-w-0", children: /* @__PURE__ */ jsx(StepDisplay, { step, completedText: labels.completedText, processingText: labels.processingText, failedText: labels.failedText, viewOnExplorerText: labels.viewOnExplorerText }) })
|
|
3229
3158
|
] }, `step-${index}`)) });
|
|
3230
3159
|
};
|
|
3231
3160
|
const items = [
|
|
3232
3161
|
{
|
|
3233
3162
|
label: "",
|
|
3234
3163
|
value: getProcessingSteps(),
|
|
3235
|
-
valueClassName: "flex flex-col gap-
|
|
3164
|
+
valueClassName: "flex flex-col gap-[var(--deframe-widget-size-gap-none)] w-full"
|
|
3236
3165
|
}
|
|
3237
3166
|
];
|
|
3238
3167
|
return /* @__PURE__ */ jsx(
|
|
@@ -3259,7 +3188,7 @@ var TokenWithChainBadge = ({
|
|
|
3259
3188
|
{
|
|
3260
3189
|
src: tokenLogoUrl || fallbackSrc,
|
|
3261
3190
|
alt: tokenAlt || "",
|
|
3262
|
-
className: "object-cover w-10 h-10 rounded-full",
|
|
3191
|
+
className: "object-cover w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)]",
|
|
3263
3192
|
onError: (e) => {
|
|
3264
3193
|
e.target.src = fallbackSrc;
|
|
3265
3194
|
}
|
|
@@ -3270,7 +3199,7 @@ var TokenWithChainBadge = ({
|
|
|
3270
3199
|
{
|
|
3271
3200
|
src: chainLogoUrl,
|
|
3272
3201
|
alt: chainName,
|
|
3273
|
-
className: "absolute object-cover w-6 h-6 p-px bg-
|
|
3202
|
+
className: "absolute object-cover w-6 h-6 p-px bg-[var(--deframe-widget-color-bg-primary-dark)] border rounded-[var(--deframe-widget-size-radius-full)] -bottom-1 -right-1 border-bg-default",
|
|
3274
3203
|
onError: (e) => {
|
|
3275
3204
|
e.target.style.display = "none";
|
|
3276
3205
|
}
|
|
@@ -3310,7 +3239,7 @@ var SwapProcessingView = ({
|
|
|
3310
3239
|
/* @__PURE__ */ jsxs(
|
|
3311
3240
|
"span",
|
|
3312
3241
|
{
|
|
3313
|
-
className: "font-semibold underline underline-offset-2 cursor-pointer text-brand-primary",
|
|
3242
|
+
className: "[font-weight:var(--deframe-widget-font-weight-semibold)] underline underline-offset-2 cursor-pointer text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
3314
3243
|
onClick: onGoToHistory,
|
|
3315
3244
|
children: [
|
|
3316
3245
|
activityHistoryText,
|
|
@@ -3320,29 +3249,29 @@ var SwapProcessingView = ({
|
|
|
3320
3249
|
)
|
|
3321
3250
|
] }),
|
|
3322
3251
|
children: [
|
|
3323
|
-
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full relative px-md", children: [
|
|
3324
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3325
|
-
/* @__PURE__ */ jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3326
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3327
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3252
|
+
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full relative px-[var(--deframe-widget-size-padding-x-md)]", children: [
|
|
3253
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3254
|
+
/* @__PURE__ */ jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
3255
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3256
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3328
3257
|
formattedInputAmount,
|
|
3329
3258
|
" ",
|
|
3330
3259
|
fromTokenSymbol
|
|
3331
3260
|
] }),
|
|
3332
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3261
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedInputAmountUSD })
|
|
3333
3262
|
] })
|
|
3334
3263
|
] }),
|
|
3335
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-brand-secondary rounded-full
|
|
3336
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3337
|
-
/* @__PURE__ */ jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3338
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3339
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3264
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-[var(--deframe-widget-color-brand-secondary)] rounded-[var(--deframe-widget-size-radius-full)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)] shadow-[0_10px_30px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_22%,transparent)] z-10", children: /* @__PURE__ */ jsx(MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3265
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3266
|
+
/* @__PURE__ */ jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
3267
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3268
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3340
3269
|
"~",
|
|
3341
3270
|
formattedOutputAmount,
|
|
3342
3271
|
" ",
|
|
3343
3272
|
toTokenSymbol
|
|
3344
3273
|
] }),
|
|
3345
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3274
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedOutputAmountUSD })
|
|
3346
3275
|
] })
|
|
3347
3276
|
] })
|
|
3348
3277
|
] }) }),
|
|
@@ -3350,7 +3279,7 @@ var SwapProcessingView = ({
|
|
|
3350
3279
|
TransactionProcessingDetails,
|
|
3351
3280
|
{
|
|
3352
3281
|
steps: transactionSteps,
|
|
3353
|
-
className: "bg-
|
|
3282
|
+
className: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
3354
3283
|
labels: processingDetailsLabels
|
|
3355
3284
|
}
|
|
3356
3285
|
)
|
|
@@ -3395,7 +3324,7 @@ var SwapCrossChainProcessingView = ({
|
|
|
3395
3324
|
/* @__PURE__ */ jsx(
|
|
3396
3325
|
"span",
|
|
3397
3326
|
{
|
|
3398
|
-
className: "font-semibold underline cursor-pointer underline-offset-2 text-brand-primary",
|
|
3327
|
+
className: "[font-weight:var(--deframe-widget-font-weight-semibold)] underline cursor-pointer underline-offset-2 text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
3399
3328
|
onClick: onGoToHistory,
|
|
3400
3329
|
children: viewHistoryText
|
|
3401
3330
|
}
|
|
@@ -3403,8 +3332,8 @@ var SwapCrossChainProcessingView = ({
|
|
|
3403
3332
|
"."
|
|
3404
3333
|
] }),
|
|
3405
3334
|
children: [
|
|
3406
|
-
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center justify-between w-full px-md", children: [
|
|
3407
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3335
|
+
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center justify-between w-full px-[var(--deframe-widget-size-padding-x-md)]", children: [
|
|
3336
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3408
3337
|
/* @__PURE__ */ jsx(
|
|
3409
3338
|
TokenWithChainBadge,
|
|
3410
3339
|
{
|
|
@@ -3415,17 +3344,17 @@ var SwapCrossChainProcessingView = ({
|
|
|
3415
3344
|
chainName: originChainName
|
|
3416
3345
|
}
|
|
3417
3346
|
),
|
|
3418
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3419
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3347
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3348
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3420
3349
|
formattedInputAmount,
|
|
3421
3350
|
" ",
|
|
3422
3351
|
fromTokenSymbol
|
|
3423
3352
|
] }),
|
|
3424
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3353
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedInputAmountUSD })
|
|
3425
3354
|
] })
|
|
3426
3355
|
] }),
|
|
3427
|
-
/* @__PURE__ */ jsx("div", { className: "absolute z-10
|
|
3428
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3356
|
+
/* @__PURE__ */ jsx("div", { className: "absolute z-10 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)] -translate-x-1/2 -translate-y-1/2 rounded-[var(--deframe-widget-size-radius-full)] shadow-[0_10px_30px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_22%,transparent)] left-1/2 top-1/2 bg-[var(--deframe-widget-color-brand-secondary)]", children: /* @__PURE__ */ jsx(MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3357
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3429
3358
|
/* @__PURE__ */ jsx(
|
|
3430
3359
|
TokenWithChainBadge,
|
|
3431
3360
|
{
|
|
@@ -3436,14 +3365,14 @@ var SwapCrossChainProcessingView = ({
|
|
|
3436
3365
|
chainName: destinationChainName
|
|
3437
3366
|
}
|
|
3438
3367
|
),
|
|
3439
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3440
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3368
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3369
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3441
3370
|
"~",
|
|
3442
3371
|
formattedOutputAmount,
|
|
3443
3372
|
" ",
|
|
3444
3373
|
toTokenSymbol
|
|
3445
3374
|
] }),
|
|
3446
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3375
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedOutputAmountUSD })
|
|
3447
3376
|
] })
|
|
3448
3377
|
] })
|
|
3449
3378
|
] }) }),
|
|
@@ -3451,7 +3380,7 @@ var SwapCrossChainProcessingView = ({
|
|
|
3451
3380
|
TransactionProcessingDetails,
|
|
3452
3381
|
{
|
|
3453
3382
|
steps: transactionSteps,
|
|
3454
|
-
className: "bg-
|
|
3383
|
+
className: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
3455
3384
|
labels: processingDetailsLabels
|
|
3456
3385
|
}
|
|
3457
3386
|
)
|
|
@@ -3487,34 +3416,34 @@ var SwapSignatureWarningView = ({
|
|
|
3487
3416
|
iconType: "warning",
|
|
3488
3417
|
title: /* @__PURE__ */ jsx("span", { "data-testid": "swap-signature-warning-title", children: errorTitle }),
|
|
3489
3418
|
description: errorDescription,
|
|
3490
|
-
actions: /* @__PURE__ */ jsxs("div", { "data-testid": "swap-signature-warning-actions", className: "flex gap-sm w-full", children: [
|
|
3419
|
+
actions: /* @__PURE__ */ jsxs("div", { "data-testid": "swap-signature-warning-actions", className: "flex gap-[var(--deframe-widget-size-gap-sm)] w-full", children: [
|
|
3491
3420
|
/* @__PURE__ */ jsx(SecondaryButton, { "data-testid": "swap-signature-warning-cancel", className: "flex-1", onClick: onCancel, children: cancelButtonText }),
|
|
3492
3421
|
/* @__PURE__ */ jsx(PrimaryButton, { "data-testid": "swap-signature-warning-retry", className: "flex-1", onClick: onTryAgain, children: retryButtonText })
|
|
3493
3422
|
] }),
|
|
3494
3423
|
children: [
|
|
3495
|
-
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full relative px-md", children: [
|
|
3496
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3497
|
-
/* @__PURE__ */ jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3498
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3499
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3424
|
+
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full relative px-[var(--deframe-widget-size-padding-x-md)]", children: [
|
|
3425
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3426
|
+
/* @__PURE__ */ jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
3427
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3428
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3500
3429
|
formattedInputAmount,
|
|
3501
3430
|
" ",
|
|
3502
3431
|
fromTokenSymbol
|
|
3503
3432
|
] }),
|
|
3504
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3433
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedInputAmountUSD })
|
|
3505
3434
|
] })
|
|
3506
3435
|
] }),
|
|
3507
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-brand-secondary rounded-full
|
|
3508
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3509
|
-
/* @__PURE__ */ jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3510
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3511
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3436
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-[var(--deframe-widget-color-brand-secondary)] rounded-[var(--deframe-widget-size-radius-full)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)] shadow-[0_10px_30px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_22%,transparent)] z-10", children: /* @__PURE__ */ jsx(MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3437
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3438
|
+
/* @__PURE__ */ jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
3439
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3440
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3512
3441
|
"~",
|
|
3513
3442
|
formattedOutputAmount,
|
|
3514
3443
|
" ",
|
|
3515
3444
|
toTokenSymbol
|
|
3516
3445
|
] }),
|
|
3517
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3446
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedOutputAmountUSD })
|
|
3518
3447
|
] })
|
|
3519
3448
|
] })
|
|
3520
3449
|
] }) }),
|
|
@@ -3523,7 +3452,7 @@ var SwapSignatureWarningView = ({
|
|
|
3523
3452
|
{
|
|
3524
3453
|
steps: transactionSteps,
|
|
3525
3454
|
defaultOpen: true,
|
|
3526
|
-
className: "bg-
|
|
3455
|
+
className: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
3527
3456
|
labels: processingDetailsLabels
|
|
3528
3457
|
}
|
|
3529
3458
|
)
|
|
@@ -3558,7 +3487,7 @@ var SwapSuccessView = ({
|
|
|
3558
3487
|
description: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3559
3488
|
labels.descriptionPrefix,
|
|
3560
3489
|
" ",
|
|
3561
|
-
/* @__PURE__ */ jsxs("strong", { className: "font-semibold", children: [
|
|
3490
|
+
/* @__PURE__ */ jsxs("strong", { className: "[font-weight:var(--deframe-widget-font-weight-semibold)]", children: [
|
|
3562
3491
|
formattedInputAmount,
|
|
3563
3492
|
" ",
|
|
3564
3493
|
fromTokenSymbol
|
|
@@ -3566,7 +3495,7 @@ var SwapSuccessView = ({
|
|
|
3566
3495
|
" ",
|
|
3567
3496
|
labels.descriptionMiddle,
|
|
3568
3497
|
" ",
|
|
3569
|
-
/* @__PURE__ */ jsxs("strong", { className: "font-semibold", children: [
|
|
3498
|
+
/* @__PURE__ */ jsxs("strong", { className: "[font-weight:var(--deframe-widget-font-weight-semibold)]", children: [
|
|
3570
3499
|
formattedOutputAmount,
|
|
3571
3500
|
" ",
|
|
3572
3501
|
toTokenSymbol
|
|
@@ -3574,33 +3503,33 @@ var SwapSuccessView = ({
|
|
|
3574
3503
|
/* @__PURE__ */ jsx("br", {}),
|
|
3575
3504
|
labels.descriptionSuffix,
|
|
3576
3505
|
" ",
|
|
3577
|
-
/* @__PURE__ */ jsx("strong", { className: "font-semibold text-brand-primary cursor-pointer", onClick: onGoToWallet, children: labels.walletLinkText })
|
|
3506
|
+
/* @__PURE__ */ jsx("strong", { className: "[font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-brand-primary)] cursor-pointer", onClick: onGoToWallet, children: labels.walletLinkText })
|
|
3578
3507
|
] }),
|
|
3579
3508
|
actions: /* @__PURE__ */ jsx("div", { "data-testid": "swap-start-new-wrapper", className: "w-full", children: /* @__PURE__ */ jsx(PrimaryButton, { "data-testid": "swap-start-new-button", className: "w-full", onClick: onStartNewSwap, children: labels.startNewSwapButton }) }),
|
|
3580
3509
|
children: [
|
|
3581
|
-
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full relative px-md", children: [
|
|
3582
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3583
|
-
/* @__PURE__ */ jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3584
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3585
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3510
|
+
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full relative px-[var(--deframe-widget-size-padding-x-md)]", children: [
|
|
3511
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3512
|
+
/* @__PURE__ */ jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
3513
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3514
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3586
3515
|
formattedInputAmount,
|
|
3587
3516
|
" ",
|
|
3588
3517
|
fromTokenSymbol
|
|
3589
3518
|
] }),
|
|
3590
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3519
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedInputAmountUSD })
|
|
3591
3520
|
] })
|
|
3592
3521
|
] }),
|
|
3593
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-brand-secondary rounded-full
|
|
3594
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3595
|
-
/* @__PURE__ */ jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3596
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3597
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3522
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-[var(--deframe-widget-color-brand-secondary)] rounded-[var(--deframe-widget-size-radius-full)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)] shadow-[0_10px_30px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_22%,transparent)] z-10", children: /* @__PURE__ */ jsx(MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3523
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3524
|
+
/* @__PURE__ */ jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
3525
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3526
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3598
3527
|
"~",
|
|
3599
3528
|
formattedOutputAmount,
|
|
3600
3529
|
" ",
|
|
3601
3530
|
toTokenSymbol
|
|
3602
3531
|
] }),
|
|
3603
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3532
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedOutputAmountUSD })
|
|
3604
3533
|
] })
|
|
3605
3534
|
] })
|
|
3606
3535
|
] }) }),
|
|
@@ -3609,7 +3538,7 @@ var SwapSuccessView = ({
|
|
|
3609
3538
|
{
|
|
3610
3539
|
steps: transactionSteps,
|
|
3611
3540
|
defaultOpen: true,
|
|
3612
|
-
className: "bg-
|
|
3541
|
+
className: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
3613
3542
|
labels: processingDetailsLabels
|
|
3614
3543
|
}
|
|
3615
3544
|
)
|
|
@@ -3645,38 +3574,38 @@ var SwapTransactionFailedView = ({
|
|
|
3645
3574
|
onClose: onBack,
|
|
3646
3575
|
progress,
|
|
3647
3576
|
iconType: "warning",
|
|
3648
|
-
iconGradient: "linear-gradient(135deg,
|
|
3577
|
+
iconGradient: "linear-gradient(135deg, var(--deframe-widget-color-state-error) 0%, color-mix(in srgb, var(--deframe-widget-color-state-error) 78%, black) 100%)",
|
|
3649
3578
|
title: /* @__PURE__ */ jsx("span", { "data-testid": "swap-failed-title", children: errorTitle }),
|
|
3650
3579
|
description: errorDescription,
|
|
3651
|
-
actions: /* @__PURE__ */ jsxs("div", { "data-testid": "swap-failed-actions", className: "flex gap-sm w-full", children: [
|
|
3580
|
+
actions: /* @__PURE__ */ jsxs("div", { "data-testid": "swap-failed-actions", className: "flex gap-[var(--deframe-widget-size-gap-sm)] w-full", children: [
|
|
3652
3581
|
/* @__PURE__ */ jsx(SecondaryButton, { "data-testid": "swap-failed-view-explorer", className: "flex-1", onClick: onViewExplorer, disabled: !hasExplorerLink, children: viewOnExplorerText }),
|
|
3653
3582
|
/* @__PURE__ */ jsx(PrimaryButton, { "data-testid": "swap-failed-retry", className: "flex-1", onClick: onTryAgain, children: retryButtonText })
|
|
3654
3583
|
] }),
|
|
3655
3584
|
children: [
|
|
3656
|
-
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full relative px-md", children: [
|
|
3657
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3658
|
-
/* @__PURE__ */ jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3659
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3660
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3585
|
+
/* @__PURE__ */ jsx(SectionCard, { className: "!p-[22px]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full relative px-[var(--deframe-widget-size-padding-x-md)]", children: [
|
|
3586
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3587
|
+
/* @__PURE__ */ jsx("img", { src: fromTokenIcon, alt: fromTokenSymbol, className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
3588
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3589
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3661
3590
|
"~",
|
|
3662
3591
|
formattedInputAmount,
|
|
3663
3592
|
" ",
|
|
3664
3593
|
fromTokenSymbol
|
|
3665
3594
|
] }),
|
|
3666
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3595
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedInputAmountUSD })
|
|
3667
3596
|
] })
|
|
3668
3597
|
] }),
|
|
3669
|
-
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-brand-secondary rounded-full
|
|
3670
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-sm", children: [
|
|
3671
|
-
/* @__PURE__ */ jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-full" }),
|
|
3672
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-xs", children: [
|
|
3673
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3598
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-[var(--deframe-widget-color-brand-secondary)] rounded-[var(--deframe-widget-size-radius-full)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)] shadow-[0_10px_30px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_22%,transparent)] z-10", children: /* @__PURE__ */ jsx(MdOutlineSwapHoriz, { className: "w-5 h-5" }) }),
|
|
3599
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
3600
|
+
/* @__PURE__ */ jsx("img", { src: toTokenIcon, alt: toTokenSymbol, className: "w-8 h-8 rounded-[var(--deframe-widget-size-radius-full)]" }),
|
|
3601
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3602
|
+
/* @__PURE__ */ jsxs("div", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)]", children: [
|
|
3674
3603
|
"~",
|
|
3675
3604
|
formattedOutputAmount,
|
|
3676
3605
|
" ",
|
|
3677
3606
|
toTokenSymbol
|
|
3678
3607
|
] }),
|
|
3679
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
3608
|
+
/* @__PURE__ */ jsx("div", { className: "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: formattedOutputAmountUSD })
|
|
3680
3609
|
] })
|
|
3681
3610
|
] })
|
|
3682
3611
|
] }) }),
|
|
@@ -3685,7 +3614,7 @@ var SwapTransactionFailedView = ({
|
|
|
3685
3614
|
{
|
|
3686
3615
|
steps: transactionSteps,
|
|
3687
3616
|
defaultOpen: true,
|
|
3688
|
-
className: "bg-
|
|
3617
|
+
className: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
3689
3618
|
labels: processingDetailsLabels
|
|
3690
3619
|
}
|
|
3691
3620
|
)
|
|
@@ -3727,7 +3656,7 @@ var ChooseAnAssetSwapView = ({
|
|
|
3727
3656
|
contentClassName: "w-full max-w-[620px] mx-auto",
|
|
3728
3657
|
children: /* @__PURE__ */ jsxs(BackgroundContainer, { className: "flex flex-col h-full", children: [
|
|
3729
3658
|
/* @__PURE__ */ jsx(Navbar, { children: /* @__PURE__ */ jsx(CloseButton, { testId: `swap-token-actionsheet-close-${actionSheetId}`, onClick: onClose }) }),
|
|
3730
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full
|
|
3659
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)] overflow-hidden", children: [
|
|
3731
3660
|
/* @__PURE__ */ jsxs("div", { className: "flex-shrink-0", children: [
|
|
3732
3661
|
/* @__PURE__ */ jsx(TextHeading, { children: labels.title }),
|
|
3733
3662
|
/* @__PURE__ */ jsx("br", {}),
|
|
@@ -3737,15 +3666,15 @@ var ChooseAnAssetSwapView = ({
|
|
|
3737
3666
|
onSearch: handleSearch,
|
|
3738
3667
|
placeholder: labels.searchPlaceholder,
|
|
3739
3668
|
autoFocus,
|
|
3740
|
-
inputClassName: "bg-
|
|
3669
|
+
inputClassName: "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
3741
3670
|
containerTestId: `swap-token-search-container-${actionSheetId}`,
|
|
3742
3671
|
inputTestId: `swap-token-search-input-${actionSheetId}`
|
|
3743
3672
|
}
|
|
3744
3673
|
)
|
|
3745
3674
|
] }),
|
|
3746
|
-
searchValue && displayedTokens.length === 0 && !isFetching ? /* @__PURE__ */ jsx(SearchEmptyState, { title: labels.searchEmptyTitle, description: labels.searchEmptyDescription }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-
|
|
3747
|
-
isFetching && /* @__PURE__ */ jsx("div", { className: "flex justify-center items-center w-full py-
|
|
3748
|
-
/* @__PURE__ */ jsx(TextBody, { variant: "
|
|
3675
|
+
searchValue && displayedTokens.length === 0 && !isFetching ? /* @__PURE__ */ jsx(SearchEmptyState, { title: labels.searchEmptyTitle, description: labels.searchEmptyDescription }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] w-full mt-[var(--deframe-widget-size-gap-md)] overflow-y-auto flex-1 min-h-0", children: [
|
|
3676
|
+
isFetching && /* @__PURE__ */ jsx("div", { className: "flex justify-center items-center w-full py-[var(--deframe-widget-size-padding-y-md)]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
3677
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: labels.searchingText }),
|
|
3749
3678
|
/* @__PURE__ */ jsx(LoadingDots, {})
|
|
3750
3679
|
] }) }),
|
|
3751
3680
|
displayedTokens.map((token, index) => {
|
|
@@ -3762,21 +3691,21 @@ var ChooseAnAssetSwapView = ({
|
|
|
3762
3691
|
"data-chain-id": token.chainId,
|
|
3763
3692
|
"data-symbol": token.symbol,
|
|
3764
3693
|
children: [
|
|
3765
|
-
/* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: token.logoURI || "", alt: token.name, className: "w-10 h-10 rounded-full" }) }),
|
|
3694
|
+
/* @__PURE__ */ jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsx("img", { src: token.logoURI || "", alt: token.name, className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)]" }) }),
|
|
3766
3695
|
/* @__PURE__ */ jsxs(ListItemContent, { children: [
|
|
3767
3696
|
/* @__PURE__ */ jsx(TextBody, { children: token.name }),
|
|
3768
|
-
/* @__PURE__ */ jsx(TextBody, { variant: "
|
|
3697
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", children: token.symbol })
|
|
3769
3698
|
] }),
|
|
3770
3699
|
/* @__PURE__ */ jsxs(ListItemRightSide, { children: [
|
|
3771
3700
|
/* @__PURE__ */ jsx(TextBody, { children: formattedBalance }),
|
|
3772
|
-
/* @__PURE__ */ jsx(TextBody, { variant: "
|
|
3701
|
+
/* @__PURE__ */ jsx(TextBody, { variant: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)]", children: formatCurrencyValue(Number(balance == null ? void 0 : balance.amountInUSD) || 0) })
|
|
3773
3702
|
] })
|
|
3774
3703
|
]
|
|
3775
3704
|
},
|
|
3776
3705
|
`token-${token.address}-${index}`
|
|
3777
3706
|
);
|
|
3778
3707
|
}),
|
|
3779
|
-
hasMore && /* @__PURE__ */ jsx("div", { className: "flex justify-center items-center w-full py-
|
|
3708
|
+
hasMore && /* @__PURE__ */ jsx("div", { className: "flex justify-center items-center w-full py-[var(--deframe-widget-size-padding-y-md)] flex-shrink-0", children: /* @__PURE__ */ jsx(TertiaryButton, { onClick: onLoadMore, children: labels.loadMoreButton }) })
|
|
3780
3709
|
] })
|
|
3781
3710
|
] })
|
|
3782
3711
|
] })
|
|
@@ -4163,6 +4092,6 @@ var ConfirmSwapButtonView = ({
|
|
|
4163
4092
|
) });
|
|
4164
4093
|
};
|
|
4165
4094
|
|
|
4166
|
-
export { ActionButton, ActionSheet, AddressDisplay, BackgroundContainer, BannerNotification, ChooseAStrategyActionsheetView, ChooseAnAssetSwapView,
|
|
4095
|
+
export { ActionButton, ActionSheet, AddressDisplay, BackgroundContainer, BannerNotification, ChooseAStrategyActionsheetView, ChooseAnAssetSwapView, CollapsibleInfoRow, CollapsibleSection, ConfirmSwapButtonView, ConnectWalletList, Currency, DeframeComponentsProvider, DetailsHeader, Currency as Fiat, FlexCol, FlexRow, HighRiskBadge, HistoryDepositDetailsView, HistoryWithdrawDetailsView, InfoLabel, InfoRow, InfoRowIconLabel, InfoRowIconValue, InfoRowWithIcon, InfoValue, Input2 as Input, Link, ListItem, ListItemContent, ListItemLeftSide, ListItemRightSide, LoadingDots, LowRiskBadge, MediumRiskBadge, Navbar, PercentageButton, PrimaryButton, ProgressIndicator, ScrollableContent, SearchEmptyState, SearchInput, SecondaryButton, SectionCard, Select, SelectContent, SelectItem, SelectTrigger, Skeleton, StepDisplay, StepStatusIcon, StepStatusText, StrategyDetailsView, SummaryDetails, SummaryDetailsCryptoControlV2, SwapAdvancedSettingsView, SwapAmountInputView, SwapCrossChainProcessingView, SwapFormView, SwapFromCardView, SwapNetworkSelectorView, SwapOutputAmountView, SwapProcessingView, SwapQuoteBlockchainCostsView, SwapQuoteDetailsView, SwapQuoteErrorsView, SwapQuoteHeaderView, SwapSignatureWarningView, SwapSlippageToleranceButtonsView, SwapSuccessView, SwapToCardView, SwapTokenSelectorView, SwapTransactionFailedView, Tabs, TabsContent, TabsList, TabsTrigger, TertiaryButton, Text_default as Text, TextAccent, TextBody, TextHeading, Title, TokenWithChainBadge, TransactionProcessingDetails, TransactionScreen, TransactionScreenIcon, TransactionScreenInvestmentCard, WalletConnectPanel, WalletItem, ConnectWalletList as WalletList, WalletListContainer };
|
|
4167
4096
|
//# sourceMappingURL=index.mjs.map
|
|
4168
4097
|
//# sourceMappingURL=index.mjs.map
|