@deframe-sdk/components 0.1.70 → 0.1.71
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 +49 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +167 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +168 -23
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1327,6 +1327,13 @@ interface SwapProcessingViewProps {
|
|
|
1327
1327
|
descriptionPrefix: string;
|
|
1328
1328
|
activityHistoryText: string;
|
|
1329
1329
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
1330
|
+
allowBackgroundConfirmation?: boolean;
|
|
1331
|
+
backgroundConfirmationStarted?: boolean;
|
|
1332
|
+
backgroundConfirmationLabels?: {
|
|
1333
|
+
title: string;
|
|
1334
|
+
subtitle: string;
|
|
1335
|
+
};
|
|
1336
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
1330
1337
|
}
|
|
1331
1338
|
declare const SwapProcessingView: React__default.FC<SwapProcessingViewProps>;
|
|
1332
1339
|
|
|
@@ -1355,6 +1362,13 @@ interface SwapCrossChainProcessingViewProps {
|
|
|
1355
1362
|
onGoToHistory: () => void;
|
|
1356
1363
|
viewHistoryText: string;
|
|
1357
1364
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
1365
|
+
allowBackgroundConfirmation?: boolean;
|
|
1366
|
+
backgroundConfirmationStarted?: boolean;
|
|
1367
|
+
backgroundConfirmationLabels?: {
|
|
1368
|
+
title: string;
|
|
1369
|
+
subtitle: string;
|
|
1370
|
+
};
|
|
1371
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
1358
1372
|
}
|
|
1359
1373
|
declare const SwapCrossChainProcessingView: React__default.FC<SwapCrossChainProcessingViewProps>;
|
|
1360
1374
|
|
|
@@ -1374,6 +1388,13 @@ interface InvestmentCrossChainProcessingViewProps {
|
|
|
1374
1388
|
onClose: () => void;
|
|
1375
1389
|
transactionSteps: TransactionStep[];
|
|
1376
1390
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
1391
|
+
allowBackgroundConfirmation?: boolean;
|
|
1392
|
+
backgroundConfirmationStarted?: boolean;
|
|
1393
|
+
backgroundConfirmationLabels?: {
|
|
1394
|
+
title: string;
|
|
1395
|
+
subtitle: string;
|
|
1396
|
+
};
|
|
1397
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
1377
1398
|
}
|
|
1378
1399
|
declare const InvestmentCrossChainProcessingView: React__default.FC<InvestmentCrossChainProcessingViewProps>;
|
|
1379
1400
|
|
|
@@ -2703,6 +2724,13 @@ interface EarnDepositProcessingViewProps {
|
|
|
2703
2724
|
amountToken: string;
|
|
2704
2725
|
transactionSteps: TransactionStep[];
|
|
2705
2726
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
2727
|
+
allowBackgroundConfirmation?: boolean;
|
|
2728
|
+
backgroundConfirmationStarted?: boolean;
|
|
2729
|
+
backgroundConfirmationLabels?: {
|
|
2730
|
+
title: string;
|
|
2731
|
+
subtitle: string;
|
|
2732
|
+
};
|
|
2733
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
2706
2734
|
}
|
|
2707
2735
|
declare const EarnDepositProcessingView: React__default.FC<EarnDepositProcessingViewProps>;
|
|
2708
2736
|
|
|
@@ -2798,6 +2826,13 @@ interface EarnWithdrawProcessingViewProps {
|
|
|
2798
2826
|
amountToken: string;
|
|
2799
2827
|
transactionSteps: TransactionStep[];
|
|
2800
2828
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
2829
|
+
allowBackgroundConfirmation?: boolean;
|
|
2830
|
+
backgroundConfirmationStarted?: boolean;
|
|
2831
|
+
backgroundConfirmationLabels?: {
|
|
2832
|
+
title: string;
|
|
2833
|
+
subtitle: string;
|
|
2834
|
+
};
|
|
2835
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
2801
2836
|
}
|
|
2802
2837
|
declare const EarnWithdrawProcessingView: React__default.FC<EarnWithdrawProcessingViewProps>;
|
|
2803
2838
|
|
|
@@ -3141,6 +3176,13 @@ interface EarnFormSkeletonProps {
|
|
|
3141
3176
|
|
|
3142
3177
|
interface OnchainWithdrawProcessingViewProps {
|
|
3143
3178
|
onClose?: () => void;
|
|
3179
|
+
allowBackgroundConfirmation?: boolean;
|
|
3180
|
+
backgroundConfirmationStarted?: boolean;
|
|
3181
|
+
backgroundConfirmationLabels?: {
|
|
3182
|
+
title: string;
|
|
3183
|
+
subtitle: string;
|
|
3184
|
+
};
|
|
3185
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
3144
3186
|
}
|
|
3145
3187
|
interface OnchainWithdrawProcessingSimpleViewProps extends OnchainWithdrawProcessingViewProps {
|
|
3146
3188
|
formData?: EarnFormSkeletonProps;
|
|
@@ -3395,6 +3437,13 @@ interface OfframpProcessingViewProps {
|
|
|
3395
3437
|
tokenIconUrl?: string;
|
|
3396
3438
|
className?: string;
|
|
3397
3439
|
labels: OfframpProcessingLabels;
|
|
3440
|
+
allowBackgroundConfirmation?: boolean;
|
|
3441
|
+
backgroundConfirmationStarted?: boolean;
|
|
3442
|
+
backgroundConfirmationLabels?: {
|
|
3443
|
+
title: string;
|
|
3444
|
+
subtitle: string;
|
|
3445
|
+
};
|
|
3446
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
3398
3447
|
}
|
|
3399
3448
|
declare function OfframpProcessingView({ step, amount, summaryTitle, summaryItems, transferTxHash, onClose, closeIcon, tokenIconUrl, className, labels, }: OfframpProcessingViewProps): react_jsx_runtime.JSX.Element;
|
|
3400
3449
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1327,6 +1327,13 @@ interface SwapProcessingViewProps {
|
|
|
1327
1327
|
descriptionPrefix: string;
|
|
1328
1328
|
activityHistoryText: string;
|
|
1329
1329
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
1330
|
+
allowBackgroundConfirmation?: boolean;
|
|
1331
|
+
backgroundConfirmationStarted?: boolean;
|
|
1332
|
+
backgroundConfirmationLabels?: {
|
|
1333
|
+
title: string;
|
|
1334
|
+
subtitle: string;
|
|
1335
|
+
};
|
|
1336
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
1330
1337
|
}
|
|
1331
1338
|
declare const SwapProcessingView: React__default.FC<SwapProcessingViewProps>;
|
|
1332
1339
|
|
|
@@ -1355,6 +1362,13 @@ interface SwapCrossChainProcessingViewProps {
|
|
|
1355
1362
|
onGoToHistory: () => void;
|
|
1356
1363
|
viewHistoryText: string;
|
|
1357
1364
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
1365
|
+
allowBackgroundConfirmation?: boolean;
|
|
1366
|
+
backgroundConfirmationStarted?: boolean;
|
|
1367
|
+
backgroundConfirmationLabels?: {
|
|
1368
|
+
title: string;
|
|
1369
|
+
subtitle: string;
|
|
1370
|
+
};
|
|
1371
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
1358
1372
|
}
|
|
1359
1373
|
declare const SwapCrossChainProcessingView: React__default.FC<SwapCrossChainProcessingViewProps>;
|
|
1360
1374
|
|
|
@@ -1374,6 +1388,13 @@ interface InvestmentCrossChainProcessingViewProps {
|
|
|
1374
1388
|
onClose: () => void;
|
|
1375
1389
|
transactionSteps: TransactionStep[];
|
|
1376
1390
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
1391
|
+
allowBackgroundConfirmation?: boolean;
|
|
1392
|
+
backgroundConfirmationStarted?: boolean;
|
|
1393
|
+
backgroundConfirmationLabels?: {
|
|
1394
|
+
title: string;
|
|
1395
|
+
subtitle: string;
|
|
1396
|
+
};
|
|
1397
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
1377
1398
|
}
|
|
1378
1399
|
declare const InvestmentCrossChainProcessingView: React__default.FC<InvestmentCrossChainProcessingViewProps>;
|
|
1379
1400
|
|
|
@@ -2703,6 +2724,13 @@ interface EarnDepositProcessingViewProps {
|
|
|
2703
2724
|
amountToken: string;
|
|
2704
2725
|
transactionSteps: TransactionStep[];
|
|
2705
2726
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
2727
|
+
allowBackgroundConfirmation?: boolean;
|
|
2728
|
+
backgroundConfirmationStarted?: boolean;
|
|
2729
|
+
backgroundConfirmationLabels?: {
|
|
2730
|
+
title: string;
|
|
2731
|
+
subtitle: string;
|
|
2732
|
+
};
|
|
2733
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
2706
2734
|
}
|
|
2707
2735
|
declare const EarnDepositProcessingView: React__default.FC<EarnDepositProcessingViewProps>;
|
|
2708
2736
|
|
|
@@ -2798,6 +2826,13 @@ interface EarnWithdrawProcessingViewProps {
|
|
|
2798
2826
|
amountToken: string;
|
|
2799
2827
|
transactionSteps: TransactionStep[];
|
|
2800
2828
|
processingDetailsLabels: TransactionProcessingDetailsLabels;
|
|
2829
|
+
allowBackgroundConfirmation?: boolean;
|
|
2830
|
+
backgroundConfirmationStarted?: boolean;
|
|
2831
|
+
backgroundConfirmationLabels?: {
|
|
2832
|
+
title: string;
|
|
2833
|
+
subtitle: string;
|
|
2834
|
+
};
|
|
2835
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
2801
2836
|
}
|
|
2802
2837
|
declare const EarnWithdrawProcessingView: React__default.FC<EarnWithdrawProcessingViewProps>;
|
|
2803
2838
|
|
|
@@ -3141,6 +3176,13 @@ interface EarnFormSkeletonProps {
|
|
|
3141
3176
|
|
|
3142
3177
|
interface OnchainWithdrawProcessingViewProps {
|
|
3143
3178
|
onClose?: () => void;
|
|
3179
|
+
allowBackgroundConfirmation?: boolean;
|
|
3180
|
+
backgroundConfirmationStarted?: boolean;
|
|
3181
|
+
backgroundConfirmationLabels?: {
|
|
3182
|
+
title: string;
|
|
3183
|
+
subtitle: string;
|
|
3184
|
+
};
|
|
3185
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
3144
3186
|
}
|
|
3145
3187
|
interface OnchainWithdrawProcessingSimpleViewProps extends OnchainWithdrawProcessingViewProps {
|
|
3146
3188
|
formData?: EarnFormSkeletonProps;
|
|
@@ -3395,6 +3437,13 @@ interface OfframpProcessingViewProps {
|
|
|
3395
3437
|
tokenIconUrl?: string;
|
|
3396
3438
|
className?: string;
|
|
3397
3439
|
labels: OfframpProcessingLabels;
|
|
3440
|
+
allowBackgroundConfirmation?: boolean;
|
|
3441
|
+
backgroundConfirmationStarted?: boolean;
|
|
3442
|
+
backgroundConfirmationLabels?: {
|
|
3443
|
+
title: string;
|
|
3444
|
+
subtitle: string;
|
|
3445
|
+
};
|
|
3446
|
+
onBackgroundConfirmationDismiss?: () => void;
|
|
3398
3447
|
}
|
|
3399
3448
|
declare function OfframpProcessingView({ step, amount, summaryTitle, summaryItems, transferTxHash, onClose, closeIcon, tokenIconUrl, className, labels, }: OfframpProcessingViewProps): react_jsx_runtime.JSX.Element;
|
|
3400
3449
|
|
package/dist/index.js
CHANGED
|
@@ -4846,6 +4846,28 @@ function SkeletonCard({ testId, symbol, network, amount, usd, balance }) {
|
|
|
4846
4846
|
}
|
|
4847
4847
|
);
|
|
4848
4848
|
}
|
|
4849
|
+
function useBackgroundConfirmationTransition({
|
|
4850
|
+
enabled,
|
|
4851
|
+
started,
|
|
4852
|
+
slowAfterMs = 5e3,
|
|
4853
|
+
dismissAfterSlowMs = 3e3,
|
|
4854
|
+
onDismiss
|
|
4855
|
+
}) {
|
|
4856
|
+
const [phase, setPhase] = React6.useState("initial");
|
|
4857
|
+
React6.useEffect(() => {
|
|
4858
|
+
if (!enabled || !started) return;
|
|
4859
|
+
if (phase !== "initial") return;
|
|
4860
|
+
const id = window.setTimeout(() => setPhase("background-confirmation"), slowAfterMs);
|
|
4861
|
+
return () => window.clearTimeout(id);
|
|
4862
|
+
}, [enabled, started, phase, slowAfterMs]);
|
|
4863
|
+
React6.useEffect(() => {
|
|
4864
|
+
if (phase !== "background-confirmation") return;
|
|
4865
|
+
if (!onDismiss) return;
|
|
4866
|
+
const id = window.setTimeout(() => onDismiss(), dismissAfterSlowMs);
|
|
4867
|
+
return () => window.clearTimeout(id);
|
|
4868
|
+
}, [phase, dismissAfterSlowMs, onDismiss]);
|
|
4869
|
+
return { phase };
|
|
4870
|
+
}
|
|
4849
4871
|
function LoadingIcon() {
|
|
4850
4872
|
const green = "var(--deframe-widget-color-brand-primary)";
|
|
4851
4873
|
const trackColor = "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)";
|
|
@@ -4906,10 +4928,42 @@ function LoadingIcon() {
|
|
|
4906
4928
|
}
|
|
4907
4929
|
);
|
|
4908
4930
|
}
|
|
4931
|
+
function SlowIcon() {
|
|
4932
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4933
|
+
framerMotion.motion.div,
|
|
4934
|
+
{
|
|
4935
|
+
"data-test-id": "swap-processing-simple-background-confirmation-icon",
|
|
4936
|
+
initial: { scale: 0.7, opacity: 0 },
|
|
4937
|
+
animate: { scale: 1, opacity: 1 },
|
|
4938
|
+
transition: { type: "spring", stiffness: 280, damping: 22 },
|
|
4939
|
+
className: "flex items-center justify-center shrink-0 w-[56px] h-[56px]",
|
|
4940
|
+
"aria-hidden": "true",
|
|
4941
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4942
|
+
md.MdAccessTime,
|
|
4943
|
+
{
|
|
4944
|
+
size: 56,
|
|
4945
|
+
color: "var(--deframe-widget-color-brand-primary)"
|
|
4946
|
+
}
|
|
4947
|
+
)
|
|
4948
|
+
}
|
|
4949
|
+
);
|
|
4950
|
+
}
|
|
4909
4951
|
var SwapProcessingViewSimple = ({
|
|
4910
4952
|
titleText,
|
|
4911
|
-
descriptionPrefix
|
|
4953
|
+
descriptionPrefix,
|
|
4954
|
+
allowBackgroundConfirmation = false,
|
|
4955
|
+
backgroundConfirmationStarted = false,
|
|
4956
|
+
backgroundConfirmationLabels,
|
|
4957
|
+
onBackgroundConfirmationDismiss
|
|
4912
4958
|
}) => {
|
|
4959
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
4960
|
+
enabled: allowBackgroundConfirmation,
|
|
4961
|
+
started: backgroundConfirmationStarted,
|
|
4962
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
4963
|
+
});
|
|
4964
|
+
const isBackgroundConfirmation = phase === "background-confirmation" && backgroundConfirmationLabels !== void 0;
|
|
4965
|
+
const renderedTitle = isBackgroundConfirmation ? backgroundConfirmationLabels.title : titleText;
|
|
4966
|
+
const renderedSubtitle = isBackgroundConfirmation ? backgroundConfirmationLabels.subtitle : descriptionPrefix;
|
|
4913
4967
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4914
4968
|
"div",
|
|
4915
4969
|
{
|
|
@@ -4939,7 +4993,7 @@ var SwapProcessingViewSimple = ({
|
|
|
4939
4993
|
"bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_88%,transparent)]"
|
|
4940
4994
|
),
|
|
4941
4995
|
children: [
|
|
4942
|
-
/* @__PURE__ */ jsxRuntime.jsx(LoadingIcon, {}),
|
|
4996
|
+
isBackgroundConfirmation ? /* @__PURE__ */ jsxRuntime.jsx(SlowIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(LoadingIcon, {}),
|
|
4943
4997
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4944
4998
|
"div",
|
|
4945
4999
|
{
|
|
@@ -4949,20 +5003,20 @@ var SwapProcessingViewSimple = ({
|
|
|
4949
5003
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4950
5004
|
"span",
|
|
4951
5005
|
{
|
|
4952
|
-
"data-test-id": "swap-processing-simple-title",
|
|
5006
|
+
"data-test-id": isBackgroundConfirmation ? "swap-processing-simple-background-confirmation-title" : "swap-processing-simple-title",
|
|
4953
5007
|
className: tailwindMerge.twMerge(
|
|
4954
5008
|
"[font-size:12px] [line-height:1.25] [letter-spacing:0.10em] uppercase",
|
|
4955
5009
|
"[font-weight:var(--deframe-widget-font-weight-semibold)]",
|
|
4956
5010
|
"font-[var(--deframe-widget-font-family)]",
|
|
4957
5011
|
"text-[color:var(--deframe-widget-color-brand-primary)]"
|
|
4958
5012
|
),
|
|
4959
|
-
children:
|
|
5013
|
+
children: renderedTitle
|
|
4960
5014
|
}
|
|
4961
5015
|
),
|
|
4962
5016
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4963
5017
|
"span",
|
|
4964
5018
|
{
|
|
4965
|
-
"data-test-id": "swap-processing-simple-subtitle",
|
|
5019
|
+
"data-test-id": isBackgroundConfirmation ? "swap-processing-simple-background-confirmation-subtitle" : "swap-processing-simple-subtitle",
|
|
4966
5020
|
className: tailwindMerge.twMerge(
|
|
4967
5021
|
"[font-size:var(--deframe-widget-font-size-md)] [line-height:1.6]",
|
|
4968
5022
|
"[font-weight:var(--deframe-widget-font-weight-regular)]",
|
|
@@ -4970,7 +5024,7 @@ var SwapProcessingViewSimple = ({
|
|
|
4970
5024
|
"text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
4971
5025
|
"max-w-[260px]"
|
|
4972
5026
|
),
|
|
4973
|
-
children:
|
|
5027
|
+
children: renderedSubtitle
|
|
4974
5028
|
}
|
|
4975
5029
|
)
|
|
4976
5030
|
]
|
|
@@ -5086,12 +5140,20 @@ var SwapCrossChainProcessingView = ({
|
|
|
5086
5140
|
};
|
|
5087
5141
|
var SwapCrossChainProcessingViewSimple = ({
|
|
5088
5142
|
title,
|
|
5089
|
-
description
|
|
5143
|
+
description,
|
|
5144
|
+
allowBackgroundConfirmation,
|
|
5145
|
+
backgroundConfirmationStarted,
|
|
5146
|
+
backgroundConfirmationLabels,
|
|
5147
|
+
onBackgroundConfirmationDismiss
|
|
5090
5148
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5091
5149
|
SwapProcessingViewSimple,
|
|
5092
5150
|
{
|
|
5093
5151
|
titleText: title,
|
|
5094
|
-
descriptionPrefix: description
|
|
5152
|
+
descriptionPrefix: description,
|
|
5153
|
+
allowBackgroundConfirmation,
|
|
5154
|
+
backgroundConfirmationStarted,
|
|
5155
|
+
backgroundConfirmationLabels,
|
|
5156
|
+
onBackgroundConfirmationDismiss
|
|
5095
5157
|
}
|
|
5096
5158
|
);
|
|
5097
5159
|
var InvestmentCrossChainProcessingView = ({
|
|
@@ -5284,9 +5346,14 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5284
5346
|
variant,
|
|
5285
5347
|
title,
|
|
5286
5348
|
subtitle,
|
|
5287
|
-
formData
|
|
5349
|
+
formData,
|
|
5350
|
+
phase = "initial",
|
|
5351
|
+
backgroundConfirmationLabels
|
|
5288
5352
|
}) {
|
|
5289
|
-
const
|
|
5353
|
+
const isBackgroundConfirmation = phase === "background-confirmation" && variant === "loading" && backgroundConfirmationLabels !== void 0;
|
|
5354
|
+
const renderedTitle = isBackgroundConfirmation ? backgroundConfirmationLabels.title : title;
|
|
5355
|
+
const renderedSubtitle = isBackgroundConfirmation ? backgroundConfirmationLabels.subtitle : subtitle;
|
|
5356
|
+
const isLoading = variant === "loading" && !isBackgroundConfirmation;
|
|
5290
5357
|
const wrapperClasses = tailwindMerge.twMerge(
|
|
5291
5358
|
"relative flex flex-col overflow-hidden w-[420px]",
|
|
5292
5359
|
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
@@ -5307,7 +5374,7 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5307
5374
|
"gap-[var(--deframe-widget-size-gap-sm)] text-center"
|
|
5308
5375
|
);
|
|
5309
5376
|
const titleClasses2 = tailwindMerge.twMerge(
|
|
5310
|
-
isLoading ? "[font-size:12px] [line-height:1.25] [letter-spacing:0.10em] uppercase [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[22px] font-bold text-[color:var(--deframe-widget-color-text-primary)] leading-[1.25]"
|
|
5377
|
+
isLoading || isBackgroundConfirmation ? "[font-size:12px] [line-height:1.25] [letter-spacing:0.10em] uppercase [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[22px] font-bold text-[color:var(--deframe-widget-color-text-primary)] leading-[1.25]"
|
|
5311
5378
|
);
|
|
5312
5379
|
const subtitleClasses = tailwindMerge.twMerge(
|
|
5313
5380
|
"[font-size:var(--deframe-widget-font-size-md)] [line-height:1.6]",
|
|
@@ -5335,6 +5402,7 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5335
5402
|
transition: { duration: 0.2 },
|
|
5336
5403
|
className: overlayClasses,
|
|
5337
5404
|
children: [
|
|
5405
|
+
isBackgroundConfirmation && /* @__PURE__ */ jsxRuntime.jsx(SlowIcon2, {}),
|
|
5338
5406
|
isLoading && /* @__PURE__ */ jsxRuntime.jsx(LoadingIcon2, {}),
|
|
5339
5407
|
variant === "success" && /* @__PURE__ */ jsxRuntime.jsx(SuccessIcon, {}),
|
|
5340
5408
|
variant === "warning" && /* @__PURE__ */ jsxRuntime.jsx(WarningIcon, {}),
|
|
@@ -5349,19 +5417,19 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5349
5417
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5350
5418
|
"span",
|
|
5351
5419
|
{
|
|
5352
|
-
"data-test-id": "earn-feedback-title",
|
|
5420
|
+
"data-test-id": isBackgroundConfirmation ? "earn-feedback-background-confirmation-title" : "earn-feedback-title",
|
|
5353
5421
|
"data-slot": "earn-feedback-title",
|
|
5354
5422
|
className: titleClasses2,
|
|
5355
|
-
children:
|
|
5423
|
+
children: renderedTitle
|
|
5356
5424
|
}
|
|
5357
5425
|
),
|
|
5358
|
-
|
|
5426
|
+
renderedSubtitle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5359
5427
|
"span",
|
|
5360
5428
|
{
|
|
5361
|
-
"data-test-id": "earn-feedback-subtitle",
|
|
5429
|
+
"data-test-id": isBackgroundConfirmation ? "earn-feedback-background-confirmation-subtitle" : "earn-feedback-subtitle",
|
|
5362
5430
|
"data-slot": "earn-feedback-subtitle",
|
|
5363
5431
|
className: subtitleClasses,
|
|
5364
|
-
children:
|
|
5432
|
+
children: renderedSubtitle
|
|
5365
5433
|
}
|
|
5366
5434
|
)
|
|
5367
5435
|
]
|
|
@@ -5375,6 +5443,27 @@ function EarnFeedbackOverlaySimpleView({
|
|
|
5375
5443
|
}
|
|
5376
5444
|
);
|
|
5377
5445
|
}
|
|
5446
|
+
function SlowIcon2() {
|
|
5447
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5448
|
+
framerMotion.motion.div,
|
|
5449
|
+
{
|
|
5450
|
+
"data-test-id": "earn-feedback-background-confirmation-icon",
|
|
5451
|
+
"data-slot": "earn-feedback-background-confirmation-icon",
|
|
5452
|
+
initial: { scale: 0.7, opacity: 0 },
|
|
5453
|
+
animate: { scale: 1, opacity: 1 },
|
|
5454
|
+
transition: { type: "spring", stiffness: 280, damping: 22 },
|
|
5455
|
+
className: "flex items-center justify-center shrink-0 w-[56px] h-[56px]",
|
|
5456
|
+
"aria-hidden": "true",
|
|
5457
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5458
|
+
md.MdAccessTime,
|
|
5459
|
+
{
|
|
5460
|
+
size: 56,
|
|
5461
|
+
color: "var(--deframe-widget-color-brand-primary)"
|
|
5462
|
+
}
|
|
5463
|
+
)
|
|
5464
|
+
}
|
|
5465
|
+
);
|
|
5466
|
+
}
|
|
5378
5467
|
function LoadingIcon2() {
|
|
5379
5468
|
const green = "var(--deframe-widget-color-brand-primary)";
|
|
5380
5469
|
const trackColor = "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)";
|
|
@@ -5613,14 +5702,25 @@ var InvestmentCrossChainProcessingSimpleView = ({
|
|
|
5613
5702
|
strategyName,
|
|
5614
5703
|
strategyIcon,
|
|
5615
5704
|
amountToken,
|
|
5616
|
-
amountUSD
|
|
5705
|
+
amountUSD,
|
|
5706
|
+
allowBackgroundConfirmation = false,
|
|
5707
|
+
backgroundConfirmationStarted = false,
|
|
5708
|
+
backgroundConfirmationLabels,
|
|
5709
|
+
onBackgroundConfirmationDismiss
|
|
5617
5710
|
}) => {
|
|
5711
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
5712
|
+
enabled: allowBackgroundConfirmation,
|
|
5713
|
+
started: backgroundConfirmationStarted,
|
|
5714
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
5715
|
+
});
|
|
5618
5716
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "investment-crosschain-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5619
5717
|
EarnFeedbackOverlaySimpleView,
|
|
5620
5718
|
{
|
|
5621
5719
|
variant: "loading",
|
|
5622
5720
|
title,
|
|
5623
5721
|
subtitle: description,
|
|
5722
|
+
phase,
|
|
5723
|
+
backgroundConfirmationLabels,
|
|
5624
5724
|
formData: {
|
|
5625
5725
|
headerTitle: title,
|
|
5626
5726
|
tokenSymbol: strategyName,
|
|
@@ -13624,14 +13724,25 @@ var EarnDepositProcessingSimpleView = ({
|
|
|
13624
13724
|
amountToken,
|
|
13625
13725
|
amountUSD,
|
|
13626
13726
|
iconSrc,
|
|
13627
|
-
strategyName
|
|
13727
|
+
strategyName,
|
|
13728
|
+
allowBackgroundConfirmation = false,
|
|
13729
|
+
backgroundConfirmationStarted = false,
|
|
13730
|
+
backgroundConfirmationLabels,
|
|
13731
|
+
onBackgroundConfirmationDismiss
|
|
13628
13732
|
}) => {
|
|
13733
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
13734
|
+
enabled: allowBackgroundConfirmation,
|
|
13735
|
+
started: backgroundConfirmationStarted,
|
|
13736
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
13737
|
+
});
|
|
13629
13738
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-deposit-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13630
13739
|
EarnFeedbackOverlaySimpleView,
|
|
13631
13740
|
{
|
|
13632
13741
|
variant: "loading",
|
|
13633
13742
|
title,
|
|
13634
13743
|
subtitle: descriptionPrefix,
|
|
13744
|
+
phase,
|
|
13745
|
+
backgroundConfirmationLabels,
|
|
13635
13746
|
formData: {
|
|
13636
13747
|
headerTitle: title,
|
|
13637
13748
|
tokenSymbol: strategyName,
|
|
@@ -13999,14 +14110,25 @@ var EarnWithdrawProcessingSimpleView = ({
|
|
|
13999
14110
|
amountToken,
|
|
14000
14111
|
amountUSD,
|
|
14001
14112
|
iconSrc,
|
|
14002
|
-
strategyName
|
|
14113
|
+
strategyName,
|
|
14114
|
+
allowBackgroundConfirmation = false,
|
|
14115
|
+
backgroundConfirmationStarted = false,
|
|
14116
|
+
backgroundConfirmationLabels,
|
|
14117
|
+
onBackgroundConfirmationDismiss
|
|
14003
14118
|
}) => {
|
|
14119
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
14120
|
+
enabled: allowBackgroundConfirmation,
|
|
14121
|
+
started: backgroundConfirmationStarted,
|
|
14122
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
14123
|
+
});
|
|
14004
14124
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "earn-withdraw-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14005
14125
|
EarnFeedbackOverlaySimpleView,
|
|
14006
14126
|
{
|
|
14007
14127
|
variant: "loading",
|
|
14008
14128
|
title,
|
|
14009
14129
|
subtitle: descriptionPrefix,
|
|
14130
|
+
phase,
|
|
14131
|
+
backgroundConfirmationLabels,
|
|
14010
14132
|
formData: {
|
|
14011
14133
|
headerTitle: title,
|
|
14012
14134
|
tokenSymbol: strategyName,
|
|
@@ -16083,14 +16205,25 @@ var OnchainWithdrawFailedSimpleView = ({
|
|
|
16083
16205
|
) });
|
|
16084
16206
|
var OnchainWithdrawProcessingSimpleView = ({
|
|
16085
16207
|
onClose: _onClose,
|
|
16086
|
-
formData
|
|
16208
|
+
formData,
|
|
16209
|
+
allowBackgroundConfirmation = false,
|
|
16210
|
+
backgroundConfirmationStarted = false,
|
|
16211
|
+
backgroundConfirmationLabels,
|
|
16212
|
+
onBackgroundConfirmationDismiss
|
|
16087
16213
|
}) => {
|
|
16214
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
16215
|
+
enabled: allowBackgroundConfirmation,
|
|
16216
|
+
started: backgroundConfirmationStarted,
|
|
16217
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
16218
|
+
});
|
|
16088
16219
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "onchain-withdraw-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16089
16220
|
EarnFeedbackOverlaySimpleView,
|
|
16090
16221
|
{
|
|
16091
16222
|
variant: "loading",
|
|
16092
16223
|
title: "PROCESSANDO SAQUE...",
|
|
16093
16224
|
subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada.",
|
|
16225
|
+
phase,
|
|
16226
|
+
backgroundConfirmationLabels,
|
|
16094
16227
|
formData
|
|
16095
16228
|
}
|
|
16096
16229
|
) });
|
|
@@ -18174,13 +18307,25 @@ function OfframpProcessingView({
|
|
|
18174
18307
|
}
|
|
18175
18308
|
);
|
|
18176
18309
|
}
|
|
18177
|
-
var OfframpProcessingSimpleView = (
|
|
18310
|
+
var OfframpProcessingSimpleView = ({
|
|
18311
|
+
allowBackgroundConfirmation = false,
|
|
18312
|
+
backgroundConfirmationStarted = false,
|
|
18313
|
+
backgroundConfirmationLabels,
|
|
18314
|
+
onBackgroundConfirmationDismiss
|
|
18315
|
+
}) => {
|
|
18316
|
+
const { phase } = useBackgroundConfirmationTransition({
|
|
18317
|
+
enabled: allowBackgroundConfirmation,
|
|
18318
|
+
started: backgroundConfirmationStarted,
|
|
18319
|
+
onDismiss: onBackgroundConfirmationDismiss
|
|
18320
|
+
});
|
|
18178
18321
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "offramp-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18179
18322
|
EarnFeedbackOverlaySimpleView,
|
|
18180
18323
|
{
|
|
18181
18324
|
variant: "loading",
|
|
18182
18325
|
title: "PROCESSANDO SAQUE...",
|
|
18183
|
-
subtitle: "Seu PIX est\xE1 sendo enviado. Aguarde alguns instantes."
|
|
18326
|
+
subtitle: "Seu PIX est\xE1 sendo enviado. Aguarde alguns instantes.",
|
|
18327
|
+
phase,
|
|
18328
|
+
backgroundConfirmationLabels
|
|
18184
18329
|
}
|
|
18185
18330
|
) });
|
|
18186
18331
|
};
|