@gearbox-protocol/ui-kit 3.14.0-next.14 → 3.14.0-next.16
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/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountPair.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/constants.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/formatUsdAmount.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.constants.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/computeTransactionConfirmDialogLayout.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/constants.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/execution/TransactionConfirmExecuteButton.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/execution/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/preview/OperationPreviewContent.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessIcon.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmTxHashRow.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/constants.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/result/index.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/TransactionProgressStepper.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/constants.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/summary/PoolOperationConfirmDetails.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/summary/constants.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/summary/index.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/index.cjs +1 -1
- package/dist/cjs/components/confirm-menu/confirm-menu.cjs +1 -1
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +63 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountPair.js +52 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/constants.js +10 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/formatUsdAmount.js +21 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/index.js +9 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.js +34 -51
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +70 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.constants.js +6 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +79 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/computeTransactionConfirmDialogLayout.js +35 -0
- package/dist/esm/components/composites/tx-preview/confirm/dialog/constants.js +10 -5
- package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +16 -7
- package/dist/esm/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.js +1 -0
- package/dist/esm/components/composites/tx-preview/confirm/execution/TransactionConfirmExecuteButton.js +30 -0
- package/dist/esm/components/composites/tx-preview/confirm/execution/index.js +4 -0
- package/dist/esm/components/composites/tx-preview/confirm/index.js +50 -24
- package/dist/esm/components/composites/tx-preview/confirm/preview/OperationPreviewContent.js +12 -24
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.js +55 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessIcon.js +25 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.js +60 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmTxHashRow.js +21 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/constants.js +24 -0
- package/dist/esm/components/composites/tx-preview/confirm/result/index.js +15 -0
- package/dist/esm/components/composites/tx-preview/confirm/stepper/TransactionProgressStepper.js +67 -0
- package/dist/esm/components/composites/tx-preview/confirm/stepper/constants.js +3 -3
- package/dist/esm/components/composites/tx-preview/confirm/stepper/index.js +6 -9
- package/dist/esm/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.js +6 -0
- package/dist/esm/components/composites/tx-preview/confirm/summary/PoolOperationConfirmDetails.js +65 -0
- package/dist/esm/components/composites/tx-preview/confirm/summary/constants.js +3 -3
- package/dist/esm/components/composites/tx-preview/confirm/summary/index.js +4 -4
- package/dist/esm/components/composites/tx-preview/index.js +85 -70
- package/dist/esm/components/confirm-menu/confirm-menu.js +28 -25
- package/dist/globals.css +1 -1
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +12 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountPair.d.ts +15 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/constants.d.ts +6 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/formatUsdAmount.d.ts +1 -0
- package/dist/types/components/composites/tx-preview/confirm/amounts/index.d.ts +3 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.d.ts +9 -4
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +23 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.constants.d.ts +3 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts +19 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/computeTransactionConfirmDialogLayout.d.ts +8 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/constants.d.ts +5 -2
- package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +5 -0
- package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +4 -0
- package/dist/types/components/composites/tx-preview/confirm/execution/TransactionConfirmExecuteButton.d.ts +6 -0
- package/dist/types/components/composites/tx-preview/confirm/execution/index.d.ts +1 -0
- package/dist/types/components/composites/tx-preview/confirm/index.d.ts +3 -1
- package/dist/types/components/composites/tx-preview/confirm/preview/OperationPreviewContent.d.ts +1 -2
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.d.ts +8 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessIcon.d.ts +2 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.d.ts +8 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmTxHashRow.d.ts +6 -0
- package/dist/types/components/composites/tx-preview/confirm/result/constants.d.ts +18 -0
- package/dist/types/components/composites/tx-preview/confirm/result/index.d.ts +5 -0
- package/dist/types/components/composites/tx-preview/confirm/stepper/TransactionProgressStepper.d.ts +7 -0
- package/dist/types/components/composites/tx-preview/confirm/stepper/constants.d.ts +1 -1
- package/dist/types/components/composites/tx-preview/confirm/stepper/index.d.ts +2 -3
- package/dist/types/components/composites/tx-preview/confirm/stepper/transactionExecutionStepTypes.d.ts +10 -0
- package/dist/types/components/composites/tx-preview/confirm/summary/PoolOperationConfirmDetails.d.ts +15 -0
- package/dist/types/components/composites/tx-preview/confirm/summary/constants.d.ts +1 -1
- package/dist/types/components/composites/tx-preview/confirm/summary/index.d.ts +1 -1
- package/dist/types/components/composites/tx-preview/index.d.ts +0 -2
- package/dist/types/components/confirm-menu/confirm-menu.d.ts +4 -2
- package/package.json +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/hooks/index.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/hooks/useCalldataOperationPreview.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/confirm/summary/PoolOperationConfirmSummary.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/hooks/useParsedTransaction.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/prerequisites/PrerequisiteRow.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/prerequisites/PrerequisitesCard.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/prerequisites/index.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/prerequisites/prerequisiteDetails.cjs +0 -1
- package/dist/cjs/components/composites/tx-preview/prerequisites/usePrerequisites.cjs +0 -1
- package/dist/esm/components/composites/tx-preview/confirm/hooks/index.js +0 -4
- package/dist/esm/components/composites/tx-preview/confirm/hooks/useCalldataOperationPreview.js +0 -35
- package/dist/esm/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.js +0 -136
- package/dist/esm/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.js +0 -47
- package/dist/esm/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.js +0 -39
- package/dist/esm/components/composites/tx-preview/confirm/summary/PoolOperationConfirmSummary.js +0 -92
- package/dist/esm/components/composites/tx-preview/hooks/useParsedTransaction.js +0 -45
- package/dist/esm/components/composites/tx-preview/prerequisites/PrerequisiteRow.js +0 -21
- package/dist/esm/components/composites/tx-preview/prerequisites/PrerequisitesCard.js +0 -207
- package/dist/esm/components/composites/tx-preview/prerequisites/index.js +0 -11
- package/dist/esm/components/composites/tx-preview/prerequisites/prerequisiteDetails.js +0 -58
- package/dist/esm/components/composites/tx-preview/prerequisites/usePrerequisites.js +0 -39
- package/dist/types/components/composites/tx-preview/confirm/hooks/index.d.ts +0 -1
- package/dist/types/components/composites/tx-preview/confirm/hooks/useCalldataOperationPreview.d.ts +0 -19
- package/dist/types/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.d.ts +0 -7
- package/dist/types/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.d.ts +0 -28
- package/dist/types/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.d.ts +0 -14
- package/dist/types/components/composites/tx-preview/confirm/summary/PoolOperationConfirmSummary.d.ts +0 -18
- package/dist/types/components/composites/tx-preview/hooks/useParsedTransaction.d.ts +0 -40
- package/dist/types/components/composites/tx-preview/prerequisites/PrerequisiteRow.d.ts +0 -11
- package/dist/types/components/composites/tx-preview/prerequisites/PrerequisitesCard.d.ts +0 -17
- package/dist/types/components/composites/tx-preview/prerequisites/index.d.ts +0 -4
- package/dist/types/components/composites/tx-preview/prerequisites/prerequisiteDetails.d.ts +0 -17
- package/dist/types/components/composites/tx-preview/prerequisites/usePrerequisites.d.ts +0 -25
package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { StyledDialogContainer as w } from "../../../../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
3
|
+
import { ConfirmMenu as D } from "../../../../confirm-menu/confirm-menu.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "@gearbox-protocol/sdk";
|
|
6
|
+
import { cn as S } from "../../../../../utils/cn.js";
|
|
7
|
+
import "sonner";
|
|
8
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
9
|
+
import "luxon";
|
|
10
|
+
import "../../../../../utils/z-index.js";
|
|
11
|
+
import { TransactionConfirmDialogTest as h, transactionConfirmDialogShellVariants as x } from "./constants.js";
|
|
12
|
+
import { TransactionConfirmShell as A } from "./TransactionConfirmShell.js";
|
|
13
|
+
function B({
|
|
14
|
+
onClose: i,
|
|
15
|
+
phase: o = "confirm",
|
|
16
|
+
title: t,
|
|
17
|
+
titleAddon: n,
|
|
18
|
+
preview: a,
|
|
19
|
+
previewLoading: m = !1,
|
|
20
|
+
previewError: e,
|
|
21
|
+
previewErrorTitle: f = "Unable to preview transaction",
|
|
22
|
+
previewClassName: l,
|
|
23
|
+
execution: c,
|
|
24
|
+
progressSteps: d,
|
|
25
|
+
renderProgressStepLabel: p,
|
|
26
|
+
result: s,
|
|
27
|
+
hideTitleAddonOnResult: C = !0,
|
|
28
|
+
containerClassName: g,
|
|
29
|
+
containerTestId: T,
|
|
30
|
+
shellTestId: u
|
|
31
|
+
}) {
|
|
32
|
+
const v = o !== "confirm" && o !== "awaiting_receipt" && C ? void 0 : n;
|
|
33
|
+
return /* @__PURE__ */ r(
|
|
34
|
+
w,
|
|
35
|
+
{
|
|
36
|
+
className: S(
|
|
37
|
+
x(),
|
|
38
|
+
g
|
|
39
|
+
),
|
|
40
|
+
"data-testid": T,
|
|
41
|
+
children: /* @__PURE__ */ r(
|
|
42
|
+
A,
|
|
43
|
+
{
|
|
44
|
+
phase: o,
|
|
45
|
+
header: /* @__PURE__ */ r(
|
|
46
|
+
D,
|
|
47
|
+
{
|
|
48
|
+
title: t,
|
|
49
|
+
titleAddon: v,
|
|
50
|
+
onClose: i
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
preview: a,
|
|
54
|
+
previewLoading: m,
|
|
55
|
+
previewError: e,
|
|
56
|
+
previewErrorTitle: f,
|
|
57
|
+
previewClassName: l,
|
|
58
|
+
execution: c,
|
|
59
|
+
progressSteps: d,
|
|
60
|
+
renderProgressStepLabel: p,
|
|
61
|
+
result: s,
|
|
62
|
+
"data-testid": u ?? h.root
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
B as TransactionConfirmPageView
|
|
70
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsxs as e, jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { ErrorLineMessage as T } from "../../../../error-message/error-line-message.js";
|
|
3
|
+
import "react-intl";
|
|
4
|
+
import "../../../../buttons/button/button.js";
|
|
5
|
+
import "../../../../dialog/dialog-container.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "@gearbox-protocol/sdk";
|
|
8
|
+
import "clsx";
|
|
9
|
+
import "tailwind-merge";
|
|
10
|
+
import "sonner";
|
|
11
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
12
|
+
import "luxon";
|
|
13
|
+
import "../../../../../utils/z-index.js";
|
|
14
|
+
import { SkeletonStack as C } from "../../../../skeleton/skeleton-stack.js";
|
|
15
|
+
import { VSpace as l } from "../../../../vspace/vspace.js";
|
|
16
|
+
import { TransactionProgressStepper as S } from "../stepper/TransactionProgressStepper.js";
|
|
17
|
+
import { shouldShowTransactionProgressStepper as P } from "../stepper/transactionExecutionStepTypes.js";
|
|
18
|
+
import { computeTransactionConfirmDialogLayout as y } from "./computeTransactionConfirmDialogLayout.js";
|
|
19
|
+
import { TransactionConfirmDialogTest as r, transactionConfirmShellContentVariants as N } from "./constants.js";
|
|
20
|
+
function K({
|
|
21
|
+
phase: h = "confirm",
|
|
22
|
+
header: a,
|
|
23
|
+
preview: p,
|
|
24
|
+
previewLoading: d = !1,
|
|
25
|
+
previewError: m,
|
|
26
|
+
previewErrorTitle: f = "Unable to preview transaction",
|
|
27
|
+
previewClassName: u = "flex max-h-[50vh] min-w-0 flex-col gap-4 overflow-x-hidden overflow-y-auto",
|
|
28
|
+
execution: w,
|
|
29
|
+
progressSteps: i,
|
|
30
|
+
renderProgressStepLabel: n,
|
|
31
|
+
result: s,
|
|
32
|
+
className: v,
|
|
33
|
+
"data-testid": x = r.root
|
|
34
|
+
}) {
|
|
35
|
+
const g = !!(i && n && P(i)), t = y(h, g);
|
|
36
|
+
return /* @__PURE__ */ e(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: N({ className: v }),
|
|
40
|
+
"data-testid": x,
|
|
41
|
+
children: [
|
|
42
|
+
a,
|
|
43
|
+
a ? /* @__PURE__ */ o(l, { height: 16 }) : null,
|
|
44
|
+
t.showResult && s ? /* @__PURE__ */ o("div", { "data-testid": r.result, children: s }) : null,
|
|
45
|
+
t.showResult ? null : /* @__PURE__ */ e(c, { children: [
|
|
46
|
+
t.showPreview ? /* @__PURE__ */ o("div", { className: u, children: d ? /* @__PURE__ */ o(C, { lines: 3 }) : m ? /* @__PURE__ */ o(
|
|
47
|
+
T,
|
|
48
|
+
{
|
|
49
|
+
err: m,
|
|
50
|
+
title: f
|
|
51
|
+
}
|
|
52
|
+
) : p }) : null,
|
|
53
|
+
t.showPreview && t.showExecution ? /* @__PURE__ */ o(l, { height: 24 }) : null,
|
|
54
|
+
t.showExecution ? /* @__PURE__ */ o(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
className: "min-w-0 w-full",
|
|
58
|
+
"data-testid": r.execution,
|
|
59
|
+
children: w
|
|
60
|
+
}
|
|
61
|
+
) : null
|
|
62
|
+
] }),
|
|
63
|
+
t.showProgressStepper && i && n ? /* @__PURE__ */ e(c, { children: [
|
|
64
|
+
/* @__PURE__ */ o(l, { height: 24 }),
|
|
65
|
+
/* @__PURE__ */ o("div", { "data-testid": r.progress, children: /* @__PURE__ */ o(
|
|
66
|
+
S,
|
|
67
|
+
{
|
|
68
|
+
steps: i,
|
|
69
|
+
renderLabel: n
|
|
70
|
+
}
|
|
71
|
+
) })
|
|
72
|
+
] }) : null
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
K as TransactionConfirmShell
|
|
79
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function r(s, e) {
|
|
2
|
+
switch (s) {
|
|
3
|
+
case "confirm":
|
|
4
|
+
return {
|
|
5
|
+
showPreview: !0,
|
|
6
|
+
showExecution: !0,
|
|
7
|
+
showProgressStepper: e,
|
|
8
|
+
showResult: !1
|
|
9
|
+
};
|
|
10
|
+
case "awaiting_receipt":
|
|
11
|
+
return {
|
|
12
|
+
showPreview: !0,
|
|
13
|
+
showExecution: !0,
|
|
14
|
+
showProgressStepper: e,
|
|
15
|
+
showResult: !1
|
|
16
|
+
};
|
|
17
|
+
case "success":
|
|
18
|
+
return {
|
|
19
|
+
showPreview: !1,
|
|
20
|
+
showExecution: !1,
|
|
21
|
+
showProgressStepper: e,
|
|
22
|
+
showResult: !0
|
|
23
|
+
};
|
|
24
|
+
case "failure":
|
|
25
|
+
return {
|
|
26
|
+
showPreview: !1,
|
|
27
|
+
showExecution: !1,
|
|
28
|
+
showProgressStepper: !1,
|
|
29
|
+
showResult: !0
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
r as computeTransactionConfirmDialogLayout
|
|
35
|
+
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { cva as o } from "class-variance-authority";
|
|
2
|
-
class
|
|
2
|
+
class r {
|
|
3
3
|
static root = "transaction-confirm-dialog-root";
|
|
4
4
|
static execution = "transaction-confirm-dialog-execution";
|
|
5
|
+
static progress = "transaction-confirm-dialog-progress";
|
|
6
|
+
static result = "transaction-confirm-dialog-result";
|
|
5
7
|
}
|
|
6
|
-
const
|
|
7
|
-
"w-full max-w-full md:w-[560px] md:max-w-[560px]"
|
|
8
|
+
const i = o(
|
|
9
|
+
"box-border w-full max-w-full md:w-[560px] md:max-w-[560px]"
|
|
10
|
+
), n = o(
|
|
11
|
+
"box-border w-full min-w-0 max-w-full"
|
|
8
12
|
);
|
|
9
13
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
r as TransactionConfirmDialogTest,
|
|
15
|
+
i as transactionConfirmDialogShellVariants,
|
|
16
|
+
n as transactionConfirmShellContentVariants
|
|
12
17
|
};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { computeTransactionConfirmDialogLayout as n } from "./computeTransactionConfirmDialogLayout.js";
|
|
2
|
+
import { TransactionConfirmDialogTest as i, transactionConfirmDialogShellVariants as t, transactionConfirmShellContentVariants as e } from "./constants.js";
|
|
3
|
+
import { TransactionConfirmDialogView as f } from "./TransactionConfirmDialogView.js";
|
|
4
|
+
import { TransactionConfirmPageView as l } from "./TransactionConfirmPageView.js";
|
|
5
|
+
import { TransactionConfirmShell as C } from "./TransactionConfirmShell.js";
|
|
6
|
+
import { TransactionConfirmShellTest as p } from "./TransactionConfirmShell.constants.js";
|
|
7
|
+
import { useTransactionConfirmDialog as g } from "./useTransactionConfirmDialog.js";
|
|
4
8
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
i as TransactionConfirmDialogTest,
|
|
10
|
+
f as TransactionConfirmDialogView,
|
|
11
|
+
l as TransactionConfirmPageView,
|
|
12
|
+
C as TransactionConfirmShell,
|
|
13
|
+
p as TransactionConfirmShellTest,
|
|
14
|
+
n as computeTransactionConfirmDialogLayout,
|
|
15
|
+
t as transactionConfirmDialogShellVariants,
|
|
16
|
+
e as transactionConfirmShellContentVariants,
|
|
17
|
+
g as useTransactionConfirmDialog
|
|
9
18
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as o, jsxs as a, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { Button as f } from "../../../../buttons/button/button.js";
|
|
3
|
+
import { SpinnerLoader as d } from "../../../../spinner-loader/spinner-loader.js";
|
|
4
|
+
import { TransactionConfirmExecuteButtonTest as u } from "../result/constants.js";
|
|
5
|
+
function B({
|
|
6
|
+
isLoading: t = !1,
|
|
7
|
+
disabled: e,
|
|
8
|
+
children: r,
|
|
9
|
+
width: n = "wide",
|
|
10
|
+
size: i = "lg",
|
|
11
|
+
...m
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ o(
|
|
14
|
+
f,
|
|
15
|
+
{
|
|
16
|
+
"data-testid": u.root,
|
|
17
|
+
width: n,
|
|
18
|
+
size: i,
|
|
19
|
+
disabled: e || t,
|
|
20
|
+
...m,
|
|
21
|
+
children: t ? /* @__PURE__ */ a(s, { children: [
|
|
22
|
+
/* @__PURE__ */ o(d, { size: 18, width: 2 }),
|
|
23
|
+
r
|
|
24
|
+
] }) : r
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
B as TransactionConfirmExecuteButton
|
|
30
|
+
};
|
|
@@ -1,26 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { TransactionConfirmAmountFieldTest as n, TransactionConfirmAmountPairTest as t } from "./amounts/constants.js";
|
|
2
|
+
import { TransactionConfirmAmountField as a } from "./amounts/TransactionConfirmAmountField.js";
|
|
3
|
+
import { TransactionConfirmAmountPair as s } from "./amounts/TransactionConfirmAmountPair.js";
|
|
4
|
+
import { computeTransactionConfirmDialogLayout as f } from "./dialog/computeTransactionConfirmDialogLayout.js";
|
|
5
|
+
import { TransactionConfirmDialogTest as T, transactionConfirmDialogShellVariants as p, transactionConfirmShellContentVariants as l } from "./dialog/constants.js";
|
|
6
|
+
import { TransactionConfirmDialogView as C } from "./dialog/TransactionConfirmDialogView.js";
|
|
7
|
+
import { TransactionConfirmPageView as S } from "./dialog/TransactionConfirmPageView.js";
|
|
8
|
+
import { TransactionConfirmShell as P } from "./dialog/TransactionConfirmShell.js";
|
|
9
|
+
import { TransactionConfirmShellTest as D } from "./dialog/TransactionConfirmShell.constants.js";
|
|
10
|
+
import { useTransactionConfirmDialog as R } from "./dialog/useTransactionConfirmDialog.js";
|
|
11
|
+
import { TransactionConfirmExecuteButton as F } from "./execution/TransactionConfirmExecuteButton.js";
|
|
12
|
+
import { OperationPreviewContent as d } from "./preview/OperationPreviewContent.js";
|
|
13
|
+
import { TransactionConfirmExecuteButtonTest as B, TransactionConfirmFailureResultTest as E, TransactionConfirmSuccessResultTest as H, TransactionConfirmTxHashRowTest as v } from "./result/constants.js";
|
|
14
|
+
import { TransactionConfirmFailureResult as I } from "./result/TransactionConfirmFailureResult.js";
|
|
15
|
+
import { TransactionConfirmSuccessIcon as b } from "./result/TransactionConfirmSuccessIcon.js";
|
|
16
|
+
import { TransactionConfirmSuccessResult as k } from "./result/TransactionConfirmSuccessResult.js";
|
|
17
|
+
import { TransactionConfirmTxHashRow as z } from "./result/TransactionConfirmTxHashRow.js";
|
|
18
|
+
import { TransactionProgressStepperTest as J } from "./stepper/constants.js";
|
|
19
|
+
import { TransactionProgressStepper as M } from "./stepper/TransactionProgressStepper.js";
|
|
20
|
+
import { shouldShowTransactionProgressStepper as Q } from "./stepper/transactionExecutionStepTypes.js";
|
|
21
|
+
import { PoolOperationConfirmDetailsTest as W } from "./summary/constants.js";
|
|
22
|
+
import { PoolOperationConfirmDetails as Y } from "./summary/PoolOperationConfirmDetails.js";
|
|
12
23
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
d as OperationPreviewContent,
|
|
25
|
+
Y as PoolOperationConfirmDetails,
|
|
26
|
+
W as PoolOperationConfirmDetailsTest,
|
|
27
|
+
a as TransactionConfirmAmountField,
|
|
28
|
+
n as TransactionConfirmAmountFieldTest,
|
|
29
|
+
s as TransactionConfirmAmountPair,
|
|
30
|
+
t as TransactionConfirmAmountPairTest,
|
|
31
|
+
T as TransactionConfirmDialogTest,
|
|
32
|
+
C as TransactionConfirmDialogView,
|
|
33
|
+
F as TransactionConfirmExecuteButton,
|
|
34
|
+
B as TransactionConfirmExecuteButtonTest,
|
|
35
|
+
I as TransactionConfirmFailureResult,
|
|
36
|
+
E as TransactionConfirmFailureResultTest,
|
|
37
|
+
S as TransactionConfirmPageView,
|
|
38
|
+
P as TransactionConfirmShell,
|
|
39
|
+
D as TransactionConfirmShellTest,
|
|
40
|
+
b as TransactionConfirmSuccessIcon,
|
|
41
|
+
k as TransactionConfirmSuccessResult,
|
|
42
|
+
H as TransactionConfirmSuccessResultTest,
|
|
43
|
+
z as TransactionConfirmTxHashRow,
|
|
44
|
+
v as TransactionConfirmTxHashRowTest,
|
|
45
|
+
M as TransactionProgressStepper,
|
|
46
|
+
J as TransactionProgressStepperTest,
|
|
47
|
+
f as computeTransactionConfirmDialogLayout,
|
|
48
|
+
Q as shouldShowTransactionProgressStepper,
|
|
49
|
+
p as transactionConfirmDialogShellVariants,
|
|
50
|
+
l as transactionConfirmShellContentVariants,
|
|
51
|
+
R as useTransactionConfirmDialog
|
|
26
52
|
};
|
package/dist/esm/components/composites/tx-preview/confirm/preview/OperationPreviewContent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as a, jsx as
|
|
1
|
+
import { jsxs as a, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import "@gearbox-protocol/sdk/preview";
|
|
3
3
|
import "../../../../vertical-indicator/vertical-indicator.js";
|
|
4
4
|
import "../../components/AddressAvatar.js";
|
|
@@ -164,41 +164,29 @@ import "../../../../theme-provider.js";
|
|
|
164
164
|
import "../../../../time-to-liquidation/time-to-liquidation.js";
|
|
165
165
|
import "../../../../toggle/toggle.js";
|
|
166
166
|
import "../../../../with-filter-button/with-filter-button.js";
|
|
167
|
-
import { OperationsCard as
|
|
168
|
-
import {
|
|
169
|
-
|
|
170
|
-
import { StateChangeCard as f } from "../../state-change/StateChangeCard.js";
|
|
171
|
-
function vt({
|
|
167
|
+
import { OperationsCard as e } from "../../operations/OperationsCard.js";
|
|
168
|
+
import { StateChangeCard as n } from "../../state-change/StateChangeCard.js";
|
|
169
|
+
function lo({
|
|
172
170
|
sdk: r,
|
|
173
|
-
operation:
|
|
171
|
+
operation: t,
|
|
174
172
|
simulation: m,
|
|
175
173
|
isSimulating: p,
|
|
176
|
-
wallet:
|
|
177
|
-
refreshNonce: e
|
|
174
|
+
wallet: o
|
|
178
175
|
}) {
|
|
179
176
|
return /* @__PURE__ */ a("div", { className: "flex flex-col gap-4", children: [
|
|
180
|
-
/* @__PURE__ */ o
|
|
181
|
-
|
|
177
|
+
/* @__PURE__ */ i(e, { sdk: r, transaction: t, wallet: o }),
|
|
178
|
+
/* @__PURE__ */ i(
|
|
179
|
+
n,
|
|
182
180
|
{
|
|
183
181
|
sdk: r,
|
|
184
|
-
|
|
185
|
-
wallet: t,
|
|
186
|
-
refreshNonce: e
|
|
187
|
-
}
|
|
188
|
-
),
|
|
189
|
-
/* @__PURE__ */ o(n, { sdk: r, transaction: i, wallet: t }),
|
|
190
|
-
/* @__PURE__ */ o(
|
|
191
|
-
f,
|
|
192
|
-
{
|
|
193
|
-
sdk: r,
|
|
194
|
-
data: i,
|
|
182
|
+
data: t,
|
|
195
183
|
simulation: m,
|
|
196
184
|
isLoading: p,
|
|
197
|
-
wallet:
|
|
185
|
+
wallet: o
|
|
198
186
|
}
|
|
199
187
|
)
|
|
200
188
|
] });
|
|
201
189
|
}
|
|
202
190
|
export {
|
|
203
|
-
|
|
191
|
+
lo as OperationPreviewContent
|
|
204
192
|
};
|
package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as n } from "react/jsx-runtime";
|
|
2
|
+
import { faXmark as o } from "@fortawesome/free-solid-svg-icons";
|
|
3
|
+
import { FaIcon as c } from "../../../../icons/fa-icon.js";
|
|
4
|
+
import { VSpace as r } from "../../../../vspace/vspace.js";
|
|
5
|
+
import { TransactionConfirmFailureResultTest as a } from "./constants.js";
|
|
6
|
+
function v({
|
|
7
|
+
title: d,
|
|
8
|
+
description: m,
|
|
9
|
+
footerAction: i,
|
|
10
|
+
iconSize: t = 48
|
|
11
|
+
}) {
|
|
12
|
+
const l = t + 32;
|
|
13
|
+
return /* @__PURE__ */ s(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: "flex w-full flex-col items-center text-center",
|
|
17
|
+
"data-testid": a.root,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ e(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: "flex items-center justify-center rounded-full border-2 border-destructive bg-destructive/10",
|
|
23
|
+
style: { width: l, height: l },
|
|
24
|
+
children: /* @__PURE__ */ e(
|
|
25
|
+
c,
|
|
26
|
+
{
|
|
27
|
+
icon: o,
|
|
28
|
+
className: "text-destructive",
|
|
29
|
+
style: { width: t, height: t }
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ e(r, { height: 24 }),
|
|
35
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-medium leading-tight md:text-2xl", children: d }),
|
|
36
|
+
/* @__PURE__ */ e(r, { height: 12 }),
|
|
37
|
+
/* @__PURE__ */ e("div", { className: "text-sm text-secondary-foreground", children: m }),
|
|
38
|
+
i ? /* @__PURE__ */ s(n, { children: [
|
|
39
|
+
/* @__PURE__ */ e(r, { height: 24 }),
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: "w-full",
|
|
44
|
+
"data-testid": a.footer,
|
|
45
|
+
children: i
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] }) : null
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
v as TransactionConfirmFailureResult
|
|
55
|
+
};
|
package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessIcon.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { faCheck as t } from "@fortawesome/free-solid-svg-icons";
|
|
3
|
+
import { FaIcon as c } from "../../../../icons/fa-icon.js";
|
|
4
|
+
import { useIsMobile as i } from "../../../../../hooks/use-media-query.js";
|
|
5
|
+
function a() {
|
|
6
|
+
const e = i(), o = e ? 80 : 120, s = e ? 36 : 42;
|
|
7
|
+
return /* @__PURE__ */ r(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
className: "flex items-center justify-center rounded-full border-2 border-success",
|
|
11
|
+
style: { width: o, height: o },
|
|
12
|
+
children: /* @__PURE__ */ r(
|
|
13
|
+
c,
|
|
14
|
+
{
|
|
15
|
+
icon: t,
|
|
16
|
+
className: "text-success",
|
|
17
|
+
style: { width: s, height: s }
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
a as TransactionConfirmSuccessIcon
|
|
25
|
+
};
|
package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as r } from "react/jsx-runtime";
|
|
2
|
+
import { VSpace as t } from "../../../../vspace/vspace.js";
|
|
3
|
+
import { useIsMobile as u } from "../../../../../hooks/use-media-query.js";
|
|
4
|
+
import { TransactionConfirmSuccessResultTest as i } from "./constants.js";
|
|
5
|
+
import { TransactionConfirmSuccessIcon as f } from "./TransactionConfirmSuccessIcon.js";
|
|
6
|
+
function v({
|
|
7
|
+
headline: o,
|
|
8
|
+
subtitle: d,
|
|
9
|
+
txHashRow: n,
|
|
10
|
+
footerAction: a
|
|
11
|
+
}) {
|
|
12
|
+
const s = u(), m = s ? 20 : 32, h = s ? 12 : 16, c = s ? 24 : 32;
|
|
13
|
+
return /* @__PURE__ */ l(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: "flex w-full flex-col items-center text-center",
|
|
17
|
+
"data-testid": i.root,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ e(t, { height: m }),
|
|
20
|
+
/* @__PURE__ */ e(f, {}),
|
|
21
|
+
/* @__PURE__ */ e(t, { height: 24 }),
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: "text-xl font-medium leading-tight md:text-2xl",
|
|
26
|
+
"data-testid": i.headline,
|
|
27
|
+
children: o
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ e(t, { height: h }),
|
|
31
|
+
/* @__PURE__ */ e(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: "text-sm text-secondary-foreground",
|
|
35
|
+
"data-testid": i.subtitle,
|
|
36
|
+
children: d
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
n ? /* @__PURE__ */ l(r, { children: [
|
|
40
|
+
/* @__PURE__ */ e(t, { height: c }),
|
|
41
|
+
/* @__PURE__ */ e("div", { className: "w-full text-center", children: n })
|
|
42
|
+
] }) : null,
|
|
43
|
+
a ? /* @__PURE__ */ l(r, { children: [
|
|
44
|
+
/* @__PURE__ */ e(t, { height: c }),
|
|
45
|
+
/* @__PURE__ */ e(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: "w-full",
|
|
49
|
+
"data-testid": i.footer,
|
|
50
|
+
children: a
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] }) : null
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
v as TransactionConfirmSuccessResult
|
|
60
|
+
};
|
package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmTxHashRow.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { TransactionConfirmTxHashRowTest as t } from "./constants.js";
|
|
3
|
+
function o({
|
|
4
|
+
txHashLink: r,
|
|
5
|
+
addToWalletLink: a
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ e(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
className: "flex w-full flex-wrap items-center justify-center gap-6 sm:gap-8",
|
|
11
|
+
"data-testid": t.root,
|
|
12
|
+
children: [
|
|
13
|
+
a ? /* @__PURE__ */ i("div", { "data-testid": t.addToWallet, children: a }) : null,
|
|
14
|
+
/* @__PURE__ */ i("div", { "data-testid": t.txHashLink, children: r })
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
o as TransactionConfirmTxHashRow
|
|
21
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
class s {
|
|
2
|
+
static root = "transaction-confirm-success-result-root";
|
|
3
|
+
static headline = "transaction-confirm-success-result-headline";
|
|
4
|
+
static subtitle = "transaction-confirm-success-result-subtitle";
|
|
5
|
+
static footer = "transaction-confirm-success-result-footer";
|
|
6
|
+
}
|
|
7
|
+
class o {
|
|
8
|
+
static root = "transaction-confirm-failure-result-root";
|
|
9
|
+
static footer = "transaction-confirm-failure-result-footer";
|
|
10
|
+
}
|
|
11
|
+
class a {
|
|
12
|
+
static root = "transaction-confirm-tx-hash-row-root";
|
|
13
|
+
static txHashLink = "transaction-confirm-tx-hash-row-tx-hash-link";
|
|
14
|
+
static addToWallet = "transaction-confirm-tx-hash-row-add-to-wallet";
|
|
15
|
+
}
|
|
16
|
+
class r {
|
|
17
|
+
static root = "transaction-confirm-execute-button-root";
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
r as TransactionConfirmExecuteButtonTest,
|
|
21
|
+
o as TransactionConfirmFailureResultTest,
|
|
22
|
+
s as TransactionConfirmSuccessResultTest,
|
|
23
|
+
a as TransactionConfirmTxHashRowTest
|
|
24
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TransactionConfirmExecuteButtonTest as n, TransactionConfirmFailureResultTest as s, TransactionConfirmSuccessResultTest as t, TransactionConfirmTxHashRowTest as a } from "./constants.js";
|
|
2
|
+
import { TransactionConfirmFailureResult as i } from "./TransactionConfirmFailureResult.js";
|
|
3
|
+
import { TransactionConfirmSuccessIcon as T } from "./TransactionConfirmSuccessIcon.js";
|
|
4
|
+
import { TransactionConfirmSuccessResult as m } from "./TransactionConfirmSuccessResult.js";
|
|
5
|
+
import { TransactionConfirmTxHashRow as x } from "./TransactionConfirmTxHashRow.js";
|
|
6
|
+
export {
|
|
7
|
+
n as TransactionConfirmExecuteButtonTest,
|
|
8
|
+
i as TransactionConfirmFailureResult,
|
|
9
|
+
s as TransactionConfirmFailureResultTest,
|
|
10
|
+
T as TransactionConfirmSuccessIcon,
|
|
11
|
+
m as TransactionConfirmSuccessResult,
|
|
12
|
+
t as TransactionConfirmSuccessResultTest,
|
|
13
|
+
x as TransactionConfirmTxHashRow,
|
|
14
|
+
a as TransactionConfirmTxHashRowTest
|
|
15
|
+
};
|