@deframe-sdk/components 0.1.34 → 0.1.35
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 +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +236 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +236 -70
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +24 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2306,6 +2306,7 @@ interface EarnTokenSelectorViewProps {
|
|
|
2306
2306
|
chainDisabledTitle?: string;
|
|
2307
2307
|
isNetworkDisabled?: boolean;
|
|
2308
2308
|
currentNetworkSelected?: ChainItem | null;
|
|
2309
|
+
className?: string;
|
|
2309
2310
|
}
|
|
2310
2311
|
declare const EarnTokenSelectorView: React__default.FC<EarnTokenSelectorViewProps>;
|
|
2311
2312
|
|
|
@@ -2921,10 +2922,26 @@ declare function OnchainWithdrawFailedView({ tokenSymbol, tokenLogoURI, formatte
|
|
|
2921
2922
|
|
|
2922
2923
|
declare function WithdrawFailedIcon(): react_jsx_runtime.JSX.Element;
|
|
2923
2924
|
|
|
2925
|
+
interface EarnFormSkeletonProps {
|
|
2926
|
+
headerTitle?: string;
|
|
2927
|
+
tokenSymbol?: string;
|
|
2928
|
+
tokenLogoURI?: string | null;
|
|
2929
|
+
chainLabel?: string;
|
|
2930
|
+
chainImage?: string;
|
|
2931
|
+
amount?: string;
|
|
2932
|
+
dollarAmount?: string;
|
|
2933
|
+
availableBalance?: string;
|
|
2934
|
+
cancelLabel?: string;
|
|
2935
|
+
submitLabel?: string;
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2924
2938
|
interface OnchainWithdrawProcessingViewProps {
|
|
2925
2939
|
onClose?: () => void;
|
|
2926
2940
|
}
|
|
2927
|
-
|
|
2941
|
+
interface OnchainWithdrawProcessingSimpleViewProps extends OnchainWithdrawProcessingViewProps {
|
|
2942
|
+
formData?: EarnFormSkeletonProps;
|
|
2943
|
+
}
|
|
2944
|
+
declare const OnchainWithdrawProcessingSimpleView: React$1.FC<OnchainWithdrawProcessingSimpleViewProps>;
|
|
2928
2945
|
|
|
2929
2946
|
interface OnchainWithdrawSignatureWarningViewProps {
|
|
2930
2947
|
tokenSymbol: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2306,6 +2306,7 @@ interface EarnTokenSelectorViewProps {
|
|
|
2306
2306
|
chainDisabledTitle?: string;
|
|
2307
2307
|
isNetworkDisabled?: boolean;
|
|
2308
2308
|
currentNetworkSelected?: ChainItem | null;
|
|
2309
|
+
className?: string;
|
|
2309
2310
|
}
|
|
2310
2311
|
declare const EarnTokenSelectorView: React__default.FC<EarnTokenSelectorViewProps>;
|
|
2311
2312
|
|
|
@@ -2921,10 +2922,26 @@ declare function OnchainWithdrawFailedView({ tokenSymbol, tokenLogoURI, formatte
|
|
|
2921
2922
|
|
|
2922
2923
|
declare function WithdrawFailedIcon(): react_jsx_runtime.JSX.Element;
|
|
2923
2924
|
|
|
2925
|
+
interface EarnFormSkeletonProps {
|
|
2926
|
+
headerTitle?: string;
|
|
2927
|
+
tokenSymbol?: string;
|
|
2928
|
+
tokenLogoURI?: string | null;
|
|
2929
|
+
chainLabel?: string;
|
|
2930
|
+
chainImage?: string;
|
|
2931
|
+
amount?: string;
|
|
2932
|
+
dollarAmount?: string;
|
|
2933
|
+
availableBalance?: string;
|
|
2934
|
+
cancelLabel?: string;
|
|
2935
|
+
submitLabel?: string;
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2924
2938
|
interface OnchainWithdrawProcessingViewProps {
|
|
2925
2939
|
onClose?: () => void;
|
|
2926
2940
|
}
|
|
2927
|
-
|
|
2941
|
+
interface OnchainWithdrawProcessingSimpleViewProps extends OnchainWithdrawProcessingViewProps {
|
|
2942
|
+
formData?: EarnFormSkeletonProps;
|
|
2943
|
+
}
|
|
2944
|
+
declare const OnchainWithdrawProcessingSimpleView: React$1.FC<OnchainWithdrawProcessingSimpleViewProps>;
|
|
2928
2945
|
|
|
2929
2946
|
interface OnchainWithdrawSignatureWarningViewProps {
|
|
2930
2947
|
tokenSymbol: string;
|
package/dist/index.js
CHANGED
|
@@ -4903,7 +4903,7 @@ var SwapProcessingViewSimple = () => {
|
|
|
4903
4903
|
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
|
|
4904
4904
|
"rounded-[inherit]",
|
|
4905
4905
|
"backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
|
|
4906
|
-
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-
|
|
4906
|
+
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
|
|
4907
4907
|
),
|
|
4908
4908
|
children: [
|
|
4909
4909
|
/* @__PURE__ */ jsxRuntime.jsx(LoadingIcon, {}),
|
|
@@ -5255,7 +5255,7 @@ var SwapSignatureWarningViewSimple = ({
|
|
|
5255
5255
|
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
|
|
5256
5256
|
"rounded-[inherit]",
|
|
5257
5257
|
"backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
|
|
5258
|
-
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-
|
|
5258
|
+
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
|
|
5259
5259
|
),
|
|
5260
5260
|
children: [
|
|
5261
5261
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon, {}),
|
|
@@ -5445,7 +5445,7 @@ var SwapSuccessViewSimple = () => {
|
|
|
5445
5445
|
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
|
|
5446
5446
|
"rounded-[inherit]",
|
|
5447
5447
|
"backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
|
|
5448
|
-
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-
|
|
5448
|
+
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
|
|
5449
5449
|
),
|
|
5450
5450
|
children: [
|
|
5451
5451
|
/* @__PURE__ */ jsxRuntime.jsx(SuccessIcon, {}),
|
|
@@ -5648,7 +5648,7 @@ var SwapTransactionFailedViewSimple = ({
|
|
|
5648
5648
|
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
|
|
5649
5649
|
"rounded-[inherit]",
|
|
5650
5650
|
"backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
|
|
5651
|
-
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-
|
|
5651
|
+
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
|
|
5652
5652
|
),
|
|
5653
5653
|
children: [
|
|
5654
5654
|
/* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, {}),
|
|
@@ -6345,6 +6345,35 @@ var SwapFormView = ({
|
|
|
6345
6345
|
)
|
|
6346
6346
|
] });
|
|
6347
6347
|
};
|
|
6348
|
+
var FONT_SIZE_CLASSES = [
|
|
6349
|
+
"text-[36px]",
|
|
6350
|
+
// 0–7 chars
|
|
6351
|
+
"text-[34px]",
|
|
6352
|
+
// 8 chars
|
|
6353
|
+
"text-[32px]",
|
|
6354
|
+
// 9 chars
|
|
6355
|
+
"text-[30px]",
|
|
6356
|
+
// 10 chars
|
|
6357
|
+
"text-[28px]",
|
|
6358
|
+
// 11 chars
|
|
6359
|
+
"text-[26px]",
|
|
6360
|
+
// 12 chars
|
|
6361
|
+
"text-[24px]",
|
|
6362
|
+
// 13 chars
|
|
6363
|
+
"text-[22px]",
|
|
6364
|
+
// 14 chars
|
|
6365
|
+
"text-[20px]"
|
|
6366
|
+
// 15+ chars
|
|
6367
|
+
];
|
|
6368
|
+
function getResponsiveFontSizeClass(value) {
|
|
6369
|
+
const len = value.length;
|
|
6370
|
+
if (len <= 7) return FONT_SIZE_CLASSES[0];
|
|
6371
|
+
const index = Math.min(len - 7, FONT_SIZE_CLASSES.length - 1);
|
|
6372
|
+
return FONT_SIZE_CLASSES[index];
|
|
6373
|
+
}
|
|
6374
|
+
function useResponsiveFontSize(value) {
|
|
6375
|
+
return React6.useMemo(() => getResponsiveFontSizeClass(value), [value]);
|
|
6376
|
+
}
|
|
6348
6377
|
var SwapFromCardViewSimple = ({
|
|
6349
6378
|
labels,
|
|
6350
6379
|
selectedToken,
|
|
@@ -6368,6 +6397,7 @@ var SwapFromCardViewSimple = ({
|
|
|
6368
6397
|
errorActionLabel = "Adicionar via PIX",
|
|
6369
6398
|
onErrorAction
|
|
6370
6399
|
}) => {
|
|
6400
|
+
const fontSizeClass = useResponsiveFontSize(amountValue || "");
|
|
6371
6401
|
const [isHovered, setIsHovered] = React6.useState(false);
|
|
6372
6402
|
const hideTimeout = React6.useRef(null);
|
|
6373
6403
|
const handleMouseEnter = React6.useCallback(() => {
|
|
@@ -6439,9 +6469,11 @@ var SwapFromCardViewSimple = ({
|
|
|
6439
6469
|
className: tailwindMerge.twMerge(
|
|
6440
6470
|
"bg-transparent border-none outline-none",
|
|
6441
6471
|
"text-right",
|
|
6442
|
-
|
|
6472
|
+
fontSizeClass,
|
|
6473
|
+
"[font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]",
|
|
6443
6474
|
"w-full px-[var(--deframe-widget-size-padding-x-none)] py-[var(--deframe-widget-size-padding-y-none)]",
|
|
6444
6475
|
"font-[var(--deframe-widget-font-family)]",
|
|
6476
|
+
"overflow-hidden text-ellipsis",
|
|
6445
6477
|
"placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]",
|
|
6446
6478
|
isEmpty ? "text-[color:var(--deframe-widget-color-text-tertiary)]" : "text-[color:var(--deframe-widget-color-text-primary)]"
|
|
6447
6479
|
)
|
|
@@ -6930,6 +6962,7 @@ var SwapToCardViewSimple = ({
|
|
|
6930
6962
|
}) => {
|
|
6931
6963
|
const handleTokenClick = onNetworkAndAssetClick != null ? onNetworkAndAssetClick : onTokenClick;
|
|
6932
6964
|
const isEmpty = !outputAmount || Number(outputAmount) === 0;
|
|
6965
|
+
const fontSizeClass = useResponsiveFontSize(outputAmount || "");
|
|
6933
6966
|
const wrapperClasses = tailwindMerge.twMerge(
|
|
6934
6967
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
6935
6968
|
"border",
|
|
@@ -7095,9 +7128,10 @@ var SwapToCardViewSimple = ({
|
|
|
7095
7128
|
{
|
|
7096
7129
|
"data-test-id": "swap-to-simple-output-amount",
|
|
7097
7130
|
className: tailwindMerge.twMerge(
|
|
7098
|
-
|
|
7131
|
+
fontSizeClass,
|
|
7132
|
+
"[font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]",
|
|
7099
7133
|
"font-[var(--deframe-widget-font-family)]",
|
|
7100
|
-
"text-right w-full",
|
|
7134
|
+
"text-right w-full overflow-hidden text-ellipsis",
|
|
7101
7135
|
isEmpty ? "text-[color:var(--deframe-widget-color-text-tertiary)]" : "text-[color:var(--deframe-widget-color-text-primary)]"
|
|
7102
7136
|
),
|
|
7103
7137
|
children: isEmpty ? "0" : outputAmount
|
|
@@ -10915,7 +10949,8 @@ var EarnTokenSelectorSimpleView = ({
|
|
|
10915
10949
|
isLoading,
|
|
10916
10950
|
selectTokenLabel,
|
|
10917
10951
|
chainLabel,
|
|
10918
|
-
chainImage
|
|
10952
|
+
chainImage,
|
|
10953
|
+
className
|
|
10919
10954
|
}) => {
|
|
10920
10955
|
const hasToken = selectedToken != null;
|
|
10921
10956
|
const isInteractive = !!onNetworkAndAssetClick;
|
|
@@ -10934,7 +10969,8 @@ var EarnTokenSelectorSimpleView = ({
|
|
|
10934
10969
|
};
|
|
10935
10970
|
const selectorClasses = tailwindMerge.twMerge(
|
|
10936
10971
|
baseClasses,
|
|
10937
|
-
stateClasses[isInteractive ? "interactive" : "static"]
|
|
10972
|
+
stateClasses[isInteractive ? "interactive" : "static"],
|
|
10973
|
+
className
|
|
10938
10974
|
);
|
|
10939
10975
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10940
10976
|
"button",
|
|
@@ -11061,9 +11097,10 @@ var EarnAmountInputSimpleView = ({
|
|
|
11061
11097
|
dollarAmountFormatted
|
|
11062
11098
|
}) => {
|
|
11063
11099
|
const isEmpty = !value || value === "0";
|
|
11100
|
+
const fontSizeClass = useResponsiveFontSize(value || "");
|
|
11064
11101
|
const inputBaseClasses = [
|
|
11065
11102
|
"bg-transparent border-none outline-none text-right",
|
|
11066
|
-
|
|
11103
|
+
`${fontSizeClass} [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]`,
|
|
11067
11104
|
"w-full",
|
|
11068
11105
|
"px-[var(--deframe-widget-size-padding-x-none)] py-[var(--deframe-widget-size-padding-y-none)]",
|
|
11069
11106
|
"font-[var(--deframe-widget-font-family)]",
|
|
@@ -12087,7 +12124,18 @@ var EarnDepositProcessingView = ({
|
|
|
12087
12124
|
}
|
|
12088
12125
|
);
|
|
12089
12126
|
};
|
|
12090
|
-
function EarnFormSkeleton(
|
|
12127
|
+
function EarnFormSkeleton({
|
|
12128
|
+
headerTitle = "Deposit",
|
|
12129
|
+
tokenSymbol = "USDC",
|
|
12130
|
+
tokenLogoURI,
|
|
12131
|
+
chainLabel = "Arbitrum",
|
|
12132
|
+
chainImage,
|
|
12133
|
+
amount = "500",
|
|
12134
|
+
dollarAmount = "\u2248 $499.87",
|
|
12135
|
+
availableBalance = "Available: 1,250.00 USDC",
|
|
12136
|
+
cancelLabel = "Cancel",
|
|
12137
|
+
submitLabel = "Deposit"
|
|
12138
|
+
} = {}) {
|
|
12091
12139
|
const headerClasses = [
|
|
12092
12140
|
"flex items-center",
|
|
12093
12141
|
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
@@ -12123,7 +12171,7 @@ function EarnFormSkeleton() {
|
|
|
12123
12171
|
"data-test-id": "earn-form-skeleton",
|
|
12124
12172
|
className: "flex flex-col font-[var(--deframe-widget-font-family)]",
|
|
12125
12173
|
children: [
|
|
12126
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-form-skeleton-header", className: headerClasses, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleClasses2, children:
|
|
12174
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-form-skeleton-header", className: headerClasses, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleClasses2, children: headerTitle }) }),
|
|
12127
12175
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-form-skeleton-divider", className: dividerClasses }),
|
|
12128
12176
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-form-skeleton-body", className: bodyClasses, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "earn-form-skeleton-input-card", className: inputCardClasses, children: [
|
|
12129
12177
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
@@ -12139,29 +12187,43 @@ function EarnFormSkeleton() {
|
|
|
12139
12187
|
),
|
|
12140
12188
|
children: [
|
|
12141
12189
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0 w-[38px] h-[38px]", children: [
|
|
12142
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12190
|
+
tokenLogoURI ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
12191
|
+
"img",
|
|
12192
|
+
{
|
|
12193
|
+
src: tokenLogoURI,
|
|
12194
|
+
alt: tokenSymbol,
|
|
12195
|
+
className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] object-cover"
|
|
12196
|
+
}
|
|
12197
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12143
12198
|
"div",
|
|
12144
12199
|
{
|
|
12145
12200
|
className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center text-[12px] [font-weight:var(--deframe-widget-font-weight-bold)] text-[color:var(--deframe-widget-color-text-primary)]",
|
|
12146
|
-
children:
|
|
12201
|
+
children: tokenSymbol.slice(0, 2).toUpperCase()
|
|
12147
12202
|
}
|
|
12148
12203
|
),
|
|
12149
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-[var(--deframe-widget-size-radius-full)]
|
|
12204
|
+
chainImage ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-[var(--deframe-widget-size-radius-full)] shadow-[0_0_0_2px_var(--deframe-widget-color-bg-secondary)]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12205
|
+
"img",
|
|
12206
|
+
{
|
|
12207
|
+
src: chainImage,
|
|
12208
|
+
alt: chainLabel,
|
|
12209
|
+
className: "w-full h-full rounded-[var(--deframe-widget-size-radius-full)] object-cover"
|
|
12210
|
+
}
|
|
12211
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 w-4 h-4 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] shadow-[0_0_0_2px_var(--deframe-widget-color-bg-secondary)]" })
|
|
12150
12212
|
] }),
|
|
12151
12213
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start min-w-0", children: [
|
|
12152
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[16px] [font-weight:var(--deframe-widget-font-weight-semibold)] leading-[1.2] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children:
|
|
12153
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-tertiary)] uppercase tracking-[0.04em] font-[var(--deframe-widget-font-family)] leading-[1.2]", children:
|
|
12214
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[16px] [font-weight:var(--deframe-widget-font-weight-semibold)] leading-[1.2] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-primary)]", children: tokenSymbol }),
|
|
12215
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-tertiary)] uppercase tracking-[0.04em] font-[var(--deframe-widget-font-family)] leading-[1.2]", children: chainLabel })
|
|
12154
12216
|
] })
|
|
12155
12217
|
]
|
|
12156
12218
|
}
|
|
12157
12219
|
),
|
|
12158
12220
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0" }),
|
|
12159
12221
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end flex-1 min-w-0", children: [
|
|
12160
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1] text-[color:var(--deframe-widget-color-text-primary)] text-right w-full font-[var(--deframe-widget-font-family)]", children:
|
|
12161
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children:
|
|
12222
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1] text-[color:var(--deframe-widget-color-text-primary)] text-right w-full font-[var(--deframe-widget-font-family)]", children: amount }),
|
|
12223
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children: dollarAmount })
|
|
12162
12224
|
] })
|
|
12163
12225
|
] }),
|
|
12164
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)]", children:
|
|
12226
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)]", children: availableBalance }) })
|
|
12165
12227
|
] }) }),
|
|
12166
12228
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "earn-form-skeleton-footer", className: footerClasses, children: [
|
|
12167
12229
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12176,7 +12238,7 @@ function EarnFormSkeleton() {
|
|
|
12176
12238
|
"text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
12177
12239
|
"text-[color:var(--deframe-widget-color-text-secondary)]"
|
|
12178
12240
|
),
|
|
12179
|
-
children:
|
|
12241
|
+
children: cancelLabel
|
|
12180
12242
|
}
|
|
12181
12243
|
),
|
|
12182
12244
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12191,7 +12253,7 @@ function EarnFormSkeleton() {
|
|
|
12191
12253
|
"text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
12192
12254
|
"text-[color:var(--deframe-widget-color-text-primary-dark)]"
|
|
12193
12255
|
),
|
|
12194
|
-
children:
|
|
12256
|
+
children: submitLabel
|
|
12195
12257
|
}
|
|
12196
12258
|
)
|
|
12197
12259
|
] })
|
|
@@ -12202,7 +12264,8 @@ function EarnFormSkeleton() {
|
|
|
12202
12264
|
function EarnFeedbackOverlaySimpleView({
|
|
12203
12265
|
variant,
|
|
12204
12266
|
title,
|
|
12205
|
-
subtitle
|
|
12267
|
+
subtitle,
|
|
12268
|
+
formData
|
|
12206
12269
|
}) {
|
|
12207
12270
|
const isLoading = variant === "loading";
|
|
12208
12271
|
const wrapperClasses = tailwindMerge.twMerge(
|
|
@@ -12218,7 +12281,7 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
12218
12281
|
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
|
|
12219
12282
|
"rounded-[inherit]",
|
|
12220
12283
|
"backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
|
|
12221
|
-
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-
|
|
12284
|
+
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
|
|
12222
12285
|
);
|
|
12223
12286
|
const textSectionClasses = tailwindMerge.twMerge(
|
|
12224
12287
|
"flex flex-col items-center",
|
|
@@ -12241,7 +12304,7 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
12241
12304
|
"data-slot": "earn-feedback-overlay-wrapper",
|
|
12242
12305
|
className: wrapperClasses,
|
|
12243
12306
|
children: [
|
|
12244
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-feedback-overlay-skeleton", children: /* @__PURE__ */ jsxRuntime.jsx(EarnFormSkeleton, {}) }),
|
|
12307
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-feedback-overlay-skeleton", children: /* @__PURE__ */ jsxRuntime.jsx(EarnFormSkeleton, __spreadValues({}, formData)) }),
|
|
12245
12308
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12246
12309
|
framerMotion.motion.div,
|
|
12247
12310
|
{
|
|
@@ -12526,15 +12589,24 @@ function WarningIcon2() {
|
|
|
12526
12589
|
);
|
|
12527
12590
|
}
|
|
12528
12591
|
var EarnDepositProcessingSimpleView = ({
|
|
12529
|
-
|
|
12530
|
-
|
|
12592
|
+
amountToken,
|
|
12593
|
+
amountUSD,
|
|
12594
|
+
iconSrc,
|
|
12595
|
+
strategyName
|
|
12531
12596
|
}) => {
|
|
12532
12597
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-deposit-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12533
12598
|
EarnFeedbackOverlaySimpleView,
|
|
12534
12599
|
{
|
|
12535
12600
|
variant: "loading",
|
|
12536
|
-
title,
|
|
12537
|
-
subtitle:
|
|
12601
|
+
title: "Processando Dep\xF3sito...",
|
|
12602
|
+
subtitle: "Aguarde enquanto seu dep\xF3sito \xE9 confirmado.",
|
|
12603
|
+
formData: {
|
|
12604
|
+
headerTitle: "Dep\xF3sito",
|
|
12605
|
+
tokenSymbol: strategyName,
|
|
12606
|
+
tokenLogoURI: iconSrc,
|
|
12607
|
+
amount: amountToken,
|
|
12608
|
+
dollarAmount: amountUSD
|
|
12609
|
+
}
|
|
12538
12610
|
}
|
|
12539
12611
|
) });
|
|
12540
12612
|
};
|
|
@@ -12612,9 +12684,12 @@ var EarnDepositSuccessView = ({
|
|
|
12612
12684
|
);
|
|
12613
12685
|
};
|
|
12614
12686
|
var EarnDepositSuccessSimpleView = ({
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12687
|
+
onClose,
|
|
12688
|
+
tokenSymbol,
|
|
12689
|
+
amountToken,
|
|
12690
|
+
amountUSD,
|
|
12691
|
+
iconSrc,
|
|
12692
|
+
strategyName
|
|
12618
12693
|
}) => {
|
|
12619
12694
|
React6__namespace.default.useEffect(() => {
|
|
12620
12695
|
if (!onClose) return;
|
|
@@ -12625,8 +12700,15 @@ var EarnDepositSuccessSimpleView = ({
|
|
|
12625
12700
|
EarnFeedbackOverlaySimpleView,
|
|
12626
12701
|
{
|
|
12627
12702
|
variant: "success",
|
|
12628
|
-
title,
|
|
12629
|
-
subtitle:
|
|
12703
|
+
title: "Dep\xF3sito Confirmado!",
|
|
12704
|
+
subtitle: "Seu saldo foi atualizado.",
|
|
12705
|
+
formData: {
|
|
12706
|
+
headerTitle: "Dep\xF3sito",
|
|
12707
|
+
tokenSymbol: tokenSymbol || strategyName,
|
|
12708
|
+
tokenLogoURI: iconSrc,
|
|
12709
|
+
amount: amountToken,
|
|
12710
|
+
dollarAmount: amountUSD
|
|
12711
|
+
}
|
|
12630
12712
|
}
|
|
12631
12713
|
) });
|
|
12632
12714
|
};
|
|
@@ -12690,9 +12772,11 @@ var EarnDepositWarningView = ({
|
|
|
12690
12772
|
);
|
|
12691
12773
|
};
|
|
12692
12774
|
var EarnDepositWarningSimpleView = ({
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12775
|
+
onBack,
|
|
12776
|
+
amountToken,
|
|
12777
|
+
amountUSD,
|
|
12778
|
+
iconSrc,
|
|
12779
|
+
strategyName
|
|
12696
12780
|
}) => {
|
|
12697
12781
|
React6__namespace.default.useEffect(() => {
|
|
12698
12782
|
if (!onBack) return;
|
|
@@ -12703,8 +12787,15 @@ var EarnDepositWarningSimpleView = ({
|
|
|
12703
12787
|
EarnFeedbackOverlaySimpleView,
|
|
12704
12788
|
{
|
|
12705
12789
|
variant: "warning",
|
|
12706
|
-
title,
|
|
12707
|
-
subtitle:
|
|
12790
|
+
title: "Assinatura Recusada",
|
|
12791
|
+
subtitle: "A assinatura da transa\xE7\xE3o foi cancelada.",
|
|
12792
|
+
formData: {
|
|
12793
|
+
headerTitle: "Dep\xF3sito",
|
|
12794
|
+
tokenSymbol: strategyName,
|
|
12795
|
+
tokenLogoURI: iconSrc,
|
|
12796
|
+
amount: amountToken,
|
|
12797
|
+
dollarAmount: amountUSD
|
|
12798
|
+
}
|
|
12708
12799
|
}
|
|
12709
12800
|
) });
|
|
12710
12801
|
};
|
|
@@ -12771,9 +12862,11 @@ var EarnDepositFailedView = ({
|
|
|
12771
12862
|
);
|
|
12772
12863
|
};
|
|
12773
12864
|
var EarnDepositFailedSimpleView = ({
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12865
|
+
onBack,
|
|
12866
|
+
amountToken,
|
|
12867
|
+
amountUSD,
|
|
12868
|
+
iconSrc,
|
|
12869
|
+
strategyName
|
|
12777
12870
|
}) => {
|
|
12778
12871
|
React6__namespace.default.useEffect(() => {
|
|
12779
12872
|
if (!onBack) return;
|
|
@@ -12784,8 +12877,15 @@ var EarnDepositFailedSimpleView = ({
|
|
|
12784
12877
|
EarnFeedbackOverlaySimpleView,
|
|
12785
12878
|
{
|
|
12786
12879
|
variant: "error",
|
|
12787
|
-
title,
|
|
12788
|
-
subtitle:
|
|
12880
|
+
title: "Dep\xF3sito Falhou",
|
|
12881
|
+
subtitle: "A transa\xE7\xE3o foi revertida.",
|
|
12882
|
+
formData: {
|
|
12883
|
+
headerTitle: "Dep\xF3sito",
|
|
12884
|
+
tokenSymbol: strategyName,
|
|
12885
|
+
tokenLogoURI: iconSrc,
|
|
12886
|
+
amount: amountToken,
|
|
12887
|
+
dollarAmount: amountUSD
|
|
12888
|
+
}
|
|
12789
12889
|
}
|
|
12790
12890
|
) });
|
|
12791
12891
|
};
|
|
@@ -12855,15 +12955,24 @@ var EarnWithdrawProcessingView = ({
|
|
|
12855
12955
|
);
|
|
12856
12956
|
};
|
|
12857
12957
|
var EarnWithdrawProcessingSimpleView = ({
|
|
12858
|
-
|
|
12859
|
-
|
|
12958
|
+
amountToken,
|
|
12959
|
+
amountUSD,
|
|
12960
|
+
iconSrc,
|
|
12961
|
+
strategyName
|
|
12860
12962
|
}) => {
|
|
12861
12963
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-withdraw-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12862
12964
|
EarnFeedbackOverlaySimpleView,
|
|
12863
12965
|
{
|
|
12864
12966
|
variant: "loading",
|
|
12865
|
-
title,
|
|
12866
|
-
subtitle:
|
|
12967
|
+
title: "Processando Saque...",
|
|
12968
|
+
subtitle: "Aguarde enquanto seu saque \xE9 confirmado.",
|
|
12969
|
+
formData: {
|
|
12970
|
+
headerTitle: "Saque",
|
|
12971
|
+
tokenSymbol: strategyName,
|
|
12972
|
+
tokenLogoURI: iconSrc,
|
|
12973
|
+
amount: amountToken,
|
|
12974
|
+
dollarAmount: amountUSD
|
|
12975
|
+
}
|
|
12867
12976
|
}
|
|
12868
12977
|
) });
|
|
12869
12978
|
};
|
|
@@ -12934,9 +13043,12 @@ var EarnWithdrawSuccessView = ({
|
|
|
12934
13043
|
);
|
|
12935
13044
|
};
|
|
12936
13045
|
var EarnWithdrawSuccessSimpleView = ({
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
13046
|
+
onClose,
|
|
13047
|
+
tokenSymbol,
|
|
13048
|
+
amountToken,
|
|
13049
|
+
amountUSD,
|
|
13050
|
+
iconSrc,
|
|
13051
|
+
strategyName
|
|
12940
13052
|
}) => {
|
|
12941
13053
|
React6__namespace.default.useEffect(() => {
|
|
12942
13054
|
if (!onClose) return;
|
|
@@ -12947,8 +13059,15 @@ var EarnWithdrawSuccessSimpleView = ({
|
|
|
12947
13059
|
EarnFeedbackOverlaySimpleView,
|
|
12948
13060
|
{
|
|
12949
13061
|
variant: "success",
|
|
12950
|
-
title,
|
|
12951
|
-
subtitle:
|
|
13062
|
+
title: "Saque Confirmado!",
|
|
13063
|
+
subtitle: "Seu saldo foi atualizado.",
|
|
13064
|
+
formData: {
|
|
13065
|
+
headerTitle: "Saque",
|
|
13066
|
+
tokenSymbol: tokenSymbol || strategyName,
|
|
13067
|
+
tokenLogoURI: iconSrc,
|
|
13068
|
+
amount: amountToken,
|
|
13069
|
+
dollarAmount: amountUSD
|
|
13070
|
+
}
|
|
12952
13071
|
}
|
|
12953
13072
|
) });
|
|
12954
13073
|
};
|
|
@@ -13012,9 +13131,11 @@ var EarnWithdrawWarningView = ({
|
|
|
13012
13131
|
);
|
|
13013
13132
|
};
|
|
13014
13133
|
var EarnWithdrawWarningSimpleView = ({
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13134
|
+
onBack,
|
|
13135
|
+
amountToken,
|
|
13136
|
+
amountUSD,
|
|
13137
|
+
iconSrc,
|
|
13138
|
+
strategyName
|
|
13018
13139
|
}) => {
|
|
13019
13140
|
React6__namespace.default.useEffect(() => {
|
|
13020
13141
|
if (!onBack) return;
|
|
@@ -13025,8 +13146,15 @@ var EarnWithdrawWarningSimpleView = ({
|
|
|
13025
13146
|
EarnFeedbackOverlaySimpleView,
|
|
13026
13147
|
{
|
|
13027
13148
|
variant: "warning",
|
|
13028
|
-
title,
|
|
13029
|
-
subtitle:
|
|
13149
|
+
title: "Assinatura Recusada",
|
|
13150
|
+
subtitle: "A assinatura da transa\xE7\xE3o foi cancelada.",
|
|
13151
|
+
formData: {
|
|
13152
|
+
headerTitle: "Saque",
|
|
13153
|
+
tokenSymbol: strategyName,
|
|
13154
|
+
tokenLogoURI: iconSrc,
|
|
13155
|
+
amount: amountToken,
|
|
13156
|
+
dollarAmount: amountUSD
|
|
13157
|
+
}
|
|
13030
13158
|
}
|
|
13031
13159
|
) });
|
|
13032
13160
|
};
|
|
@@ -13093,9 +13221,11 @@ var EarnWithdrawFailedView = ({
|
|
|
13093
13221
|
);
|
|
13094
13222
|
};
|
|
13095
13223
|
var EarnWithdrawFailedSimpleView = ({
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13224
|
+
onBack,
|
|
13225
|
+
amountToken,
|
|
13226
|
+
amountUSD,
|
|
13227
|
+
iconSrc,
|
|
13228
|
+
strategyName
|
|
13099
13229
|
}) => {
|
|
13100
13230
|
React6__namespace.default.useEffect(() => {
|
|
13101
13231
|
if (!onBack) return;
|
|
@@ -13106,8 +13236,15 @@ var EarnWithdrawFailedSimpleView = ({
|
|
|
13106
13236
|
EarnFeedbackOverlaySimpleView,
|
|
13107
13237
|
{
|
|
13108
13238
|
variant: "error",
|
|
13109
|
-
title,
|
|
13110
|
-
subtitle:
|
|
13239
|
+
title: "Saque Falhou",
|
|
13240
|
+
subtitle: "A transa\xE7\xE3o foi revertida.",
|
|
13241
|
+
formData: {
|
|
13242
|
+
headerTitle: "Saque",
|
|
13243
|
+
tokenSymbol: strategyName,
|
|
13244
|
+
tokenLogoURI: iconSrc,
|
|
13245
|
+
amount: amountToken,
|
|
13246
|
+
dollarAmount: amountUSD
|
|
13247
|
+
}
|
|
13111
13248
|
}
|
|
13112
13249
|
) });
|
|
13113
13250
|
};
|
|
@@ -13508,7 +13645,8 @@ var OnchainDepositFormSimpleView = ({
|
|
|
13508
13645
|
isLoading: false,
|
|
13509
13646
|
selectTokenLabel: "SELECIONE AQUI",
|
|
13510
13647
|
chainLabel: (_a = selectedChain == null ? void 0 : selectedChain.name) != null ? _a : "",
|
|
13511
|
-
chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl
|
|
13648
|
+
chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl,
|
|
13649
|
+
className: "w-full justify-between"
|
|
13512
13650
|
}
|
|
13513
13651
|
),
|
|
13514
13652
|
!hasToken && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13805,7 +13943,12 @@ function OnchainDepositSuccessView({
|
|
|
13805
13943
|
);
|
|
13806
13944
|
}
|
|
13807
13945
|
var OnchainDepositSuccessSimpleView = ({
|
|
13808
|
-
onClose
|
|
13946
|
+
onClose,
|
|
13947
|
+
tokenSymbol,
|
|
13948
|
+
tokenLogoURI,
|
|
13949
|
+
chainName,
|
|
13950
|
+
chainIconUrl,
|
|
13951
|
+
formattedAmount
|
|
13809
13952
|
}) => {
|
|
13810
13953
|
React6__namespace.useEffect(() => {
|
|
13811
13954
|
if (!onClose) return;
|
|
@@ -13817,7 +13960,15 @@ var OnchainDepositSuccessSimpleView = ({
|
|
|
13817
13960
|
{
|
|
13818
13961
|
variant: "success",
|
|
13819
13962
|
title: "Dep\xF3sito Confirmado!",
|
|
13820
|
-
subtitle: "Seu saldo foi atualizado."
|
|
13963
|
+
subtitle: "Seu saldo foi atualizado.",
|
|
13964
|
+
formData: {
|
|
13965
|
+
headerTitle: "Dep\xF3sito",
|
|
13966
|
+
tokenSymbol,
|
|
13967
|
+
tokenLogoURI,
|
|
13968
|
+
chainLabel: chainName,
|
|
13969
|
+
chainImage: chainIconUrl,
|
|
13970
|
+
amount: formattedAmount
|
|
13971
|
+
}
|
|
13821
13972
|
}
|
|
13822
13973
|
) });
|
|
13823
13974
|
};
|
|
@@ -14847,14 +14998,16 @@ function OnchainWithdrawFailedView({
|
|
|
14847
14998
|
);
|
|
14848
14999
|
}
|
|
14849
15000
|
var OnchainWithdrawProcessingSimpleView = ({
|
|
14850
|
-
onClose: _onClose
|
|
15001
|
+
onClose: _onClose,
|
|
15002
|
+
formData
|
|
14851
15003
|
}) => {
|
|
14852
15004
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "onchain-withdraw-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14853
15005
|
EarnFeedbackOverlaySimpleView,
|
|
14854
15006
|
{
|
|
14855
15007
|
variant: "loading",
|
|
14856
15008
|
title: "PROCESSANDO SAQUE...",
|
|
14857
|
-
subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada."
|
|
15009
|
+
subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada.",
|
|
15010
|
+
formData
|
|
14858
15011
|
}
|
|
14859
15012
|
) });
|
|
14860
15013
|
};
|
|
@@ -15121,7 +15274,12 @@ function OnchainWithdrawSignatureWarningView({
|
|
|
15121
15274
|
);
|
|
15122
15275
|
}
|
|
15123
15276
|
var OnchainWithdrawSignatureWarningSimpleView = ({
|
|
15124
|
-
onCancel
|
|
15277
|
+
onCancel,
|
|
15278
|
+
tokenSymbol,
|
|
15279
|
+
tokenLogoURI,
|
|
15280
|
+
chainName,
|
|
15281
|
+
chainIconUrl,
|
|
15282
|
+
formattedAmount
|
|
15125
15283
|
}) => {
|
|
15126
15284
|
React6__namespace.useEffect(() => {
|
|
15127
15285
|
if (!onCancel) return;
|
|
@@ -15133,7 +15291,15 @@ var OnchainWithdrawSignatureWarningSimpleView = ({
|
|
|
15133
15291
|
{
|
|
15134
15292
|
variant: "warning",
|
|
15135
15293
|
title: "Saque n\xE3o assinado",
|
|
15136
|
-
subtitle: "A assinatura da transa\xE7\xE3o foi cancelada."
|
|
15294
|
+
subtitle: "A assinatura da transa\xE7\xE3o foi cancelada.",
|
|
15295
|
+
formData: {
|
|
15296
|
+
headerTitle: "Saque",
|
|
15297
|
+
tokenSymbol,
|
|
15298
|
+
tokenLogoURI,
|
|
15299
|
+
chainLabel: chainName,
|
|
15300
|
+
chainImage: chainIconUrl,
|
|
15301
|
+
amount: formattedAmount
|
|
15302
|
+
}
|
|
15137
15303
|
}
|
|
15138
15304
|
) });
|
|
15139
15305
|
};
|