@gearbox-protocol/ui-kit 3.14.0-next.13 → 3.14.0-next.14

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.
Files changed (99) hide show
  1. package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
  2. package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
  3. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  4. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  5. package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
  6. package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
  7. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.cjs +1 -1
  8. package/dist/cjs/components/composites/tx-preview/confirm/dialog/constants.cjs +1 -1
  9. package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -1
  10. package/dist/cjs/components/composites/tx-preview/confirm/index.cjs +1 -1
  11. package/dist/cjs/components/composites/tx-preview/confirm/preview/OperationPreviewContent.cjs +1 -1
  12. package/dist/cjs/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.cjs +1 -1
  13. package/dist/cjs/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.cjs +1 -1
  14. package/dist/cjs/components/composites/tx-preview/confirm/stepper/index.cjs +1 -1
  15. package/dist/cjs/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.cjs +1 -0
  16. package/dist/cjs/components/composites/tx-preview/confirm/summary/PoolOperationConfirmSummary.cjs +1 -0
  17. package/dist/cjs/components/composites/tx-preview/confirm/summary/constants.cjs +1 -0
  18. package/dist/cjs/components/composites/tx-preview/confirm/summary/index.cjs +1 -0
  19. package/dist/cjs/components/composites/tx-preview/index.cjs +1 -1
  20. package/dist/cjs/components/composites/tx-preview/operations/OperationsCard.cjs +1 -1
  21. package/dist/cjs/components/composites/tx-preview/operations/PoolDepositView.cjs +1 -1
  22. package/dist/cjs/components/composites/tx-preview/operations/PoolWithdrawView.cjs +1 -1
  23. package/dist/cjs/components/composites/tx-preview/prerequisites/PrerequisitesCard.cjs +1 -1
  24. package/dist/cjs/components/composites/tx-preview/state-change/BalanceChangeGroup.cjs +1 -1
  25. package/dist/cjs/components/composites/tx-preview/state-change/StateChangeCard.cjs +1 -1
  26. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  27. package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
  28. package/dist/cjs/components/index.cjs +1 -1
  29. package/dist/cjs/components/legal-agreement/index.cjs +1 -1
  30. package/dist/cjs/components/legal-agreement/legal-agreement-awaiting-panel.cjs +1 -0
  31. package/dist/cjs/components/legal-agreement/legal-agreement-dialog.cjs +1 -1
  32. package/dist/cjs/components/legal-agreement/legal-agreement-link.cjs +1 -0
  33. package/dist/cjs/components/legal-agreement/legal-agreement-panel.cjs +1 -0
  34. package/dist/cjs/components/legal-agreement/legal-agreement-theme.cjs +1 -0
  35. package/dist/cjs/components/legal-agreement/legal-agreement.stories-config.cjs +1 -0
  36. package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
  37. package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
  38. package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
  39. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  40. package/dist/cjs/index.cjs +1 -1
  41. package/dist/esm/components/assets-list-cell/assets-list-cell.js +3 -2
  42. package/dist/esm/components/block-sync/block-sync.js +3 -2
  43. package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
  44. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
  45. package/dist/esm/components/complex-input/complex-input.js +3 -2
  46. package/dist/esm/components/composites/pool-table/columns.js +34 -33
  47. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.js +24 -24
  48. package/dist/esm/components/composites/tx-preview/confirm/dialog/constants.js +7 -2
  49. package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +7 -6
  50. package/dist/esm/components/composites/tx-preview/confirm/index.js +20 -12
  51. package/dist/esm/components/composites/tx-preview/confirm/preview/OperationPreviewContent.js +3 -2
  52. package/dist/esm/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.js +77 -61
  53. package/dist/esm/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.js +41 -22
  54. package/dist/esm/components/composites/tx-preview/confirm/stepper/index.js +5 -2
  55. package/dist/esm/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.js +39 -0
  56. package/dist/esm/components/composites/tx-preview/confirm/summary/PoolOperationConfirmSummary.js +92 -0
  57. package/dist/esm/components/composites/tx-preview/confirm/summary/constants.js +6 -0
  58. package/dist/esm/components/composites/tx-preview/confirm/summary/index.js +6 -0
  59. package/dist/esm/components/composites/tx-preview/index.js +70 -62
  60. package/dist/esm/components/composites/tx-preview/operations/OperationsCard.js +3 -2
  61. package/dist/esm/components/composites/tx-preview/operations/PoolDepositView.js +3 -2
  62. package/dist/esm/components/composites/tx-preview/operations/PoolWithdrawView.js +3 -2
  63. package/dist/esm/components/composites/tx-preview/prerequisites/PrerequisitesCard.js +3 -2
  64. package/dist/esm/components/composites/tx-preview/state-change/BalanceChangeGroup.js +3 -2
  65. package/dist/esm/components/composites/tx-preview/state-change/StateChangeCard.js +3 -2
  66. package/dist/esm/components/compound-apy/compound-apy.js +3 -2
  67. package/dist/esm/components/detailed-page-title/detailed-page-title.js +1 -0
  68. package/dist/esm/components/index.js +504 -488
  69. package/dist/esm/components/legal-agreement/index.js +23 -7
  70. package/dist/esm/components/legal-agreement/legal-agreement-awaiting-panel.js +29 -0
  71. package/dist/esm/components/legal-agreement/legal-agreement-dialog.js +72 -212
  72. package/dist/esm/components/legal-agreement/legal-agreement-link.js +22 -0
  73. package/dist/esm/components/legal-agreement/legal-agreement-panel.js +130 -0
  74. package/dist/esm/components/legal-agreement/legal-agreement-theme.js +137 -0
  75. package/dist/esm/components/legal-agreement/legal-agreement.stories-config.js +170 -0
  76. package/dist/esm/components/markdown-viewer/markdown-viewer.js +3 -2
  77. package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +1 -0
  78. package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +3 -2
  79. package/dist/esm/components/with-copy/with-copy.js +3 -2
  80. package/dist/esm/index.js +836 -820
  81. package/dist/globals.css +1 -1
  82. package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmDialogView.d.ts +2 -2
  83. package/dist/types/components/composites/tx-preview/confirm/dialog/constants.d.ts +3 -0
  84. package/dist/types/components/composites/tx-preview/confirm/index.d.ts +1 -0
  85. package/dist/types/components/composites/tx-preview/confirm/stepper/HorizontalTransactionStepper.d.ts +2 -2
  86. package/dist/types/components/composites/tx-preview/confirm/stepper/computeTransactionExecutionSteps.d.ts +10 -3
  87. package/dist/types/components/composites/tx-preview/confirm/stepper/index.d.ts +1 -0
  88. package/dist/types/components/composites/tx-preview/confirm/stepper/useCompletedStepsInSession.d.ts +14 -0
  89. package/dist/types/components/composites/tx-preview/confirm/summary/PoolOperationConfirmSummary.d.ts +18 -0
  90. package/dist/types/components/composites/tx-preview/confirm/summary/constants.d.ts +3 -0
  91. package/dist/types/components/composites/tx-preview/confirm/summary/index.d.ts +2 -0
  92. package/dist/types/components/legal-agreement/index.d.ts +5 -1
  93. package/dist/types/components/legal-agreement/legal-agreement-awaiting-panel.d.ts +10 -0
  94. package/dist/types/components/legal-agreement/legal-agreement-dialog.d.ts +19 -52
  95. package/dist/types/components/legal-agreement/legal-agreement-link.d.ts +11 -0
  96. package/dist/types/components/legal-agreement/legal-agreement-panel.d.ts +16 -0
  97. package/dist/types/components/legal-agreement/legal-agreement-theme.d.ts +36 -0
  98. package/dist/types/components/legal-agreement/legal-agreement.stories-config.d.ts +11 -0
  99. package/package.json +1 -1
@@ -1,18 +1,26 @@
1
- import { TransactionConfirmDialogTest as e } from "./dialog/constants.js";
1
+ import { TransactionConfirmDialogTest as e, transactionConfirmDialogShellVariants as t } from "./dialog/constants.js";
2
2
  import { TransactionConfirmDialogView as a } from "./dialog/TransactionConfirmDialogView.js";
3
- import { useTransactionConfirmDialog as i } from "./dialog/useTransactionConfirmDialog.js";
4
- import { useCalldataOperationPreview as m } from "./hooks/useCalldataOperationPreview.js";
5
- import { OperationPreviewContent as s } from "./preview/OperationPreviewContent.js";
6
- import { computeTransactionExecutionSteps as c } from "./stepper/computeTransactionExecutionSteps.js";
7
- import { TransactionStepperTest as l } from "./stepper/constants.js";
8
- import { HorizontalTransactionStepper as u } from "./stepper/HorizontalTransactionStepper.js";
3
+ import { useTransactionConfirmDialog as m } from "./dialog/useTransactionConfirmDialog.js";
4
+ import { useCalldataOperationPreview as s } from "./hooks/useCalldataOperationPreview.js";
5
+ import { OperationPreviewContent as x } from "./preview/OperationPreviewContent.js";
6
+ import { computeTransactionExecutionSteps as c, getTransactionExecutionStepRequirements as T } from "./stepper/computeTransactionExecutionSteps.js";
7
+ import { TransactionStepperTest as C } from "./stepper/constants.js";
8
+ import { HorizontalTransactionStepper as g } from "./stepper/HorizontalTransactionStepper.js";
9
+ import { useCompletedStepsInSession as O } from "./stepper/useCompletedStepsInSession.js";
10
+ import { PoolOperationConfirmSummaryTest as w } from "./summary/constants.js";
11
+ import { PoolOperationConfirmSummary as v } from "./summary/PoolOperationConfirmSummary.js";
9
12
  export {
10
- u as HorizontalTransactionStepper,
11
- s as OperationPreviewContent,
13
+ g as HorizontalTransactionStepper,
14
+ x as OperationPreviewContent,
15
+ v as PoolOperationConfirmSummary,
16
+ w as PoolOperationConfirmSummaryTest,
12
17
  e as TransactionConfirmDialogTest,
13
18
  a as TransactionConfirmDialogView,
14
- l as TransactionStepperTest,
19
+ C as TransactionStepperTest,
15
20
  c as computeTransactionExecutionSteps,
16
- m as useCalldataOperationPreview,
17
- i as useTransactionConfirmDialog
21
+ T as getTransactionExecutionStepRequirements,
22
+ t as transactionConfirmDialogShellVariants,
23
+ s as useCalldataOperationPreview,
24
+ O as useCompletedStepsInSession,
25
+ m as useTransactionConfirmDialog
18
26
  };
@@ -125,6 +125,7 @@ import "../../../../layout/layout/layout.js";
125
125
  import "../../../../layout/main-aside-layout/main-aside-layout.js";
126
126
  import "../../../../page-title/page-title.js";
127
127
  import "../../../../layout/social-icons/social-icons.js";
128
+ import "../../../../legal-agreement/legal-agreement-theme.js";
128
129
  import "../../../../link/link.js";
129
130
  import "../../../../../utils/reactochart-compat.js";
130
131
  import "../../../../status-elements/status-elements.js";
@@ -167,7 +168,7 @@ import { OperationsCard as n } from "../../operations/OperationsCard.js";
167
168
  import { PrerequisitesCard as s } from "../../prerequisites/PrerequisitesCard.js";
168
169
  import "@tanstack/react-query";
169
170
  import { StateChangeCard as f } from "../../state-change/StateChangeCard.js";
170
- function jt({
171
+ function vt({
171
172
  sdk: r,
172
173
  operation: i,
173
174
  simulation: m,
@@ -199,5 +200,5 @@ function jt({
199
200
  ] });
200
201
  }
201
202
  export {
202
- jt as OperationPreviewContent
203
+ vt as OperationPreviewContent
203
204
  };
@@ -1,4 +1,4 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@gearbox-protocol/sdk";
4
4
  import { cn as o } from "../../../../../utils/cn.js";
@@ -6,64 +6,26 @@ import "sonner";
6
6
  import "@gearbox-protocol/sdk/common-utils";
7
7
  import "luxon";
8
8
  import "../../../../../utils/z-index.js";
9
- import { TransactionStepperTest as s } from "./constants.js";
10
- const n = 20;
11
- function c({
12
- label: r,
9
+ import { TransactionStepperTest as f } from "./constants.js";
10
+ const c = 12, u = 24, y = c + u;
11
+ function x({
13
12
  status: t,
14
- isLast: i
13
+ stepNumber: i
15
14
  }) {
16
- return /* @__PURE__ */ l("li", { className: "flex min-w-0 flex-1 flex-col items-center", children: [
17
- /* @__PURE__ */ l("div", { className: "flex w-full items-center", children: [
18
- /* @__PURE__ */ e(
19
- "div",
20
- {
21
- className: o(
22
- "h-0.5 flex-1",
23
- t === "upcoming" ? "bg-gray-40" : "bg-success"
24
- ),
25
- "aria-hidden": !0
26
- }
27
- ),
28
- /* @__PURE__ */ e(d, { status: t }),
29
- /* @__PURE__ */ e(
30
- "div",
31
- {
32
- className: o(
33
- "h-0.5 flex-1",
34
- i || t === "upcoming" ? "bg-gray-40" : "bg-success"
35
- ),
36
- "aria-hidden": !0
37
- }
38
- )
39
- ] }),
40
- /* @__PURE__ */ e(
41
- "span",
42
- {
43
- className: o(
44
- "mt-2 truncate px-1 text-center text-xs",
45
- t === "active" ? "font-bold text-foreground" : t === "completed" ? "text-foreground" : "text-secondary-foreground"
46
- ),
47
- children: r
48
- }
49
- )
50
- ] });
51
- }
52
- function d({ status: r }) {
53
- return r === "completed" ? /* @__PURE__ */ e(
15
+ const r = t === "active";
16
+ return t === "completed" ? /* @__PURE__ */ e(
54
17
  "div",
55
18
  {
56
- className: "flex shrink-0 items-center justify-center rounded-full bg-success",
57
- style: { width: n, height: n },
19
+ className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-gray-40",
58
20
  "aria-hidden": !0,
59
- children: /* @__PURE__ */ l(
21
+ children: /* @__PURE__ */ p(
60
22
  "svg",
61
23
  {
62
24
  width: "12",
63
25
  height: "10",
64
26
  viewBox: "0 0 12 10",
65
27
  fill: "none",
66
- className: "text-success-foreground",
28
+ className: "text-gray-110",
67
29
  role: "img",
68
30
  "aria-hidden": !0,
69
31
  children: [
@@ -86,35 +48,89 @@ function d({ status: r }) {
86
48
  "div",
87
49
  {
88
50
  className: o(
89
- "flex shrink-0 items-center justify-center rounded-full border text-xs font-bold",
90
- r === "active" ? "border-gray-50 bg-gray-50 text-foreground" : "border-gray-40 bg-transparent text-gray-90"
51
+ "flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",
52
+ r ? "bg-white text-gray-10" : "bg-gray-40 text-gray-110"
91
53
  ),
92
- style: { width: n, height: n },
54
+ "aria-hidden": !0,
55
+ children: i
56
+ }
57
+ );
58
+ }
59
+ function v({ active: t }) {
60
+ return /* @__PURE__ */ e(
61
+ "span",
62
+ {
63
+ className: o(
64
+ "pointer-events-none absolute top-0 z-10 block h-full",
65
+ t ? "bg-gray-40" : "bg-gray-10"
66
+ ),
67
+ style: {
68
+ right: -c,
69
+ width: c,
70
+ clipPath: "polygon(0 0, 100% 50%, 0 100%)"
71
+ },
93
72
  "aria-hidden": !0
94
73
  }
95
74
  );
96
75
  }
97
76
  function N({
98
- steps: r,
99
- renderLabel: t
77
+ step: t,
78
+ stepNumber: i,
79
+ index: r,
80
+ total: n,
81
+ label: g
82
+ }) {
83
+ const { status: d } = t, s = r === 0, m = r === n - 1, a = n === 1, l = d === "active", h = s ? u : y;
84
+ return /* @__PURE__ */ e(
85
+ "li",
86
+ {
87
+ className: o("relative min-w-0 flex-1 list-none", !s && "-ml-3"),
88
+ style: { zIndex: n - r },
89
+ "aria-current": l ? "step" : void 0,
90
+ children: /* @__PURE__ */ p(
91
+ "div",
92
+ {
93
+ className: o(
94
+ "relative flex min-h-12 w-full items-center gap-2 py-2.5 text-xs",
95
+ l ? "bg-gray-40 text-foreground" : "bg-gray-10 text-gray-110",
96
+ a && "rounded-lg pr-6",
97
+ !a && s && "rounded-l-lg pr-2",
98
+ !a && m && "rounded-r-lg pr-6"
99
+ ),
100
+ style: { paddingLeft: h },
101
+ children: [
102
+ /* @__PURE__ */ e(x, { status: d, stepNumber: i }),
103
+ /* @__PURE__ */ e("span", { className: o("min-w-0 truncate", l && "font-bold"), children: g }),
104
+ m ? null : /* @__PURE__ */ e(v, { active: l })
105
+ ]
106
+ }
107
+ )
108
+ }
109
+ );
110
+ }
111
+ function _({
112
+ steps: t,
113
+ renderLabel: i
100
114
  }) {
101
115
  return /* @__PURE__ */ e(
102
116
  "ol",
103
117
  {
104
118
  className: "flex w-full list-none p-0 m-0",
105
- "data-testid": s.root,
106
- children: r.map((i, a) => /* @__PURE__ */ e(
107
- c,
119
+ "data-testid": f.root,
120
+ children: t.map((r, n) => /* @__PURE__ */ e(
121
+ N,
108
122
  {
109
- label: t(i.labelKey),
110
- status: i.status,
111
- isLast: a === r.length - 1
123
+ step: r,
124
+ stepNumber: n + 1,
125
+ index: n,
126
+ total: t.length,
127
+ label: i(r)
112
128
  },
113
- i.id
129
+ r.id
114
130
  ))
115
131
  }
116
132
  );
117
133
  }
118
134
  export {
119
- N as HorizontalTransactionStepper
135
+ _ as HorizontalTransactionStepper
120
136
  };
@@ -1,28 +1,47 @@
1
- const r = [
2
- "connect",
3
- "network",
4
- "approve",
5
- "execute"
6
- ], l = {
7
- connect: "connect",
8
- network: "network",
9
- approve: "approve",
10
- execute: "execute"
11
- };
1
+ function l(e) {
2
+ return {
3
+ approve: !e.allowWalletBatching && (e.needsApproval || e.isApprovalPending),
4
+ auth: !e.isAuthReady
5
+ };
6
+ }
12
7
  function p(e) {
13
- return e.isConnected ? !e.isCorrectChain || !e.isAuthReady ? "network" : e.needsApproval && !e.allowWalletBatching && !e.isApprovalPending || e.isApprovalPending ? "approve" : "execute" : "connect";
8
+ return !e.allowWalletBatching && (e.isApprovalPending || e.needsApproval);
9
+ }
10
+ function c(e, t) {
11
+ return l(t)[e];
12
+ }
13
+ function i(e, t) {
14
+ return t.completedStepsInSession?.includes(e) ?? !1;
15
+ }
16
+ function a(e, t) {
17
+ return c(e, t) || i(e, t);
18
+ }
19
+ function f(e) {
20
+ const t = [];
21
+ return a("approve", e) && t.push("approve"), a("auth", e) && t.push("auth"), t.push("execute"), t;
22
+ }
23
+ function v(e, t) {
24
+ return e.isCorrectChain ? p(e) ? "approve" : c("auth", e) ? "auth" : "execute" : t[0] ?? "execute";
25
+ }
26
+ function d(e, t, r, o) {
27
+ const n = o.indexOf(r);
28
+ return o.indexOf(e) < n ? !0 : e === "execute" ? !1 : !!(i(e, t) && !c(e, t));
14
29
  }
15
- function s(e, t, o) {
16
- const n = r.indexOf(o);
17
- return r.indexOf(e) < n || e === "approve" && t.allowWalletBatching || e === "approve" && !t.needsApproval ? !0 : (e === "execute" && t.isExecuting, !1);
30
+ function h(e, t) {
31
+ return e === "approve" && t.allowWalletBatching ? "approveBatch" : e === "auth" ? "auth" : e;
18
32
  }
19
- function u(e) {
20
- const t = p(e);
21
- return { steps: r.map((n) => {
22
- const a = s(n, e, t) ? "completed" : n === t ? "active" : "upcoming", i = n === "approve" && e.allowWalletBatching ? "approveBatch" : l[n];
23
- return { id: n, labelKey: i, status: a };
24
- }), activeStepId: t };
33
+ function S(e) {
34
+ const t = f(e), r = v(e, t);
35
+ return { steps: t.map((n) => {
36
+ const s = d(n, e, r, t) ? "completed" : n === r ? "active" : "upcoming";
37
+ return {
38
+ id: n,
39
+ labelKey: h(n, e),
40
+ status: s
41
+ };
42
+ }), activeStepId: r };
25
43
  }
26
44
  export {
27
- u as computeTransactionExecutionSteps
45
+ S as computeTransactionExecutionSteps,
46
+ l as getTransactionExecutionStepRequirements
28
47
  };
@@ -1,8 +1,11 @@
1
- import { computeTransactionExecutionSteps as r } from "./computeTransactionExecutionSteps.js";
1
+ import { computeTransactionExecutionSteps as o, getTransactionExecutionStepRequirements as r } from "./computeTransactionExecutionSteps.js";
2
2
  import { TransactionStepperTest as p } from "./constants.js";
3
3
  import { HorizontalTransactionStepper as a } from "./HorizontalTransactionStepper.js";
4
+ import { useCompletedStepsInSession as c } from "./useCompletedStepsInSession.js";
4
5
  export {
5
6
  a as HorizontalTransactionStepper,
6
7
  p as TransactionStepperTest,
7
- r as computeTransactionExecutionSteps
8
+ o as computeTransactionExecutionSteps,
9
+ r as getTransactionExecutionStepRequirements,
10
+ c as useCompletedStepsInSession
8
11
  };
@@ -0,0 +1,39 @@
1
+ import { useState as a, useEffect as u } from "react";
2
+ import { getTransactionExecutionStepRequirements as m } from "./computeTransactionExecutionSteps.js";
3
+ function I({
4
+ sessionActive: n,
5
+ needsApproval: S,
6
+ isApprovalPending: i = !1,
7
+ allowWalletBatching: d,
8
+ isAuthReady: f
9
+ }) {
10
+ const [p, o] = a([]), [c, s] = a([]), e = m({
11
+ needsApproval: S,
12
+ isApprovalPending: i,
13
+ allowWalletBatching: d,
14
+ isAuthReady: f
15
+ });
16
+ return u(() => {
17
+ if (!n) {
18
+ o([]), s([]);
19
+ return;
20
+ }
21
+ o((r) => {
22
+ const t = new Set(r);
23
+ return e.approve && t.add("approve"), e.auth && t.add("auth"), [...t];
24
+ });
25
+ }, [n, e.approve, e.auth]), u(() => {
26
+ n && s((r) => {
27
+ const t = new Set(r);
28
+ return p.includes("approve") && !e.approve && t.add("approve"), p.includes("auth") && !e.auth && t.add("auth"), [...t];
29
+ });
30
+ }, [
31
+ n,
32
+ p,
33
+ e.approve,
34
+ e.auth
35
+ ]), c;
36
+ }
37
+ export {
38
+ I as useCompletedStepsInSession
39
+ };
@@ -0,0 +1,92 @@
1
+ import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
+ import { shortAddress as y } from "@gearbox-protocol/sdk";
3
+ import { FadeoutLoading as C } from "../../../../fadeout-loading/fadeout-loading.js";
4
+ import { TipCard as z } from "../../../../tip-card/tip-card.js";
5
+ import { VerticalIndicator as r } from "../../../../vertical-indicator/vertical-indicator.js";
6
+ import { VerticalList as x } from "../../../../vertical-list/vertical-list.js";
7
+ import { WithCopy as g } from "../../../../with-copy/with-copy.js";
8
+ import { PoolOperationConfirmSummaryTest as P } from "./constants.js";
9
+ function m({
10
+ amount: i,
11
+ symbol: t
12
+ }) {
13
+ return /* @__PURE__ */ a("span", { children: [
14
+ i,
15
+ " ",
16
+ t
17
+ ] });
18
+ }
19
+ function F({
20
+ primaryLabel: i,
21
+ primaryAmount: t,
22
+ primaryTokenSymbol: n,
23
+ receiveLabel: s,
24
+ receiveAmount: d,
25
+ receiveTokenSymbol: u,
26
+ apyLabel: p,
27
+ apy: e,
28
+ apyLoading: f = !1,
29
+ curatorLabel: c,
30
+ curatorName: h,
31
+ poolLabel: b,
32
+ poolAddress: l
33
+ }) {
34
+ const v = y(l);
35
+ return /* @__PURE__ */ o(
36
+ z,
37
+ {
38
+ textColor: "light",
39
+ "data-testid": P.root,
40
+ children: /* @__PURE__ */ a(x, { children: [
41
+ /* @__PURE__ */ o(
42
+ r,
43
+ {
44
+ size: "sm",
45
+ label: i,
46
+ value: /* @__PURE__ */ o(
47
+ m,
48
+ {
49
+ amount: t,
50
+ symbol: n
51
+ }
52
+ )
53
+ }
54
+ ),
55
+ /* @__PURE__ */ o(
56
+ r,
57
+ {
58
+ size: "sm",
59
+ label: s,
60
+ value: /* @__PURE__ */ o(
61
+ m,
62
+ {
63
+ amount: d,
64
+ symbol: u
65
+ }
66
+ )
67
+ }
68
+ ),
69
+ e !== void 0 ? /* @__PURE__ */ o(
70
+ r,
71
+ {
72
+ size: "sm",
73
+ label: p,
74
+ value: /* @__PURE__ */ o(C, { loading: f, children: e })
75
+ }
76
+ ) : null,
77
+ /* @__PURE__ */ o(r, { size: "sm", label: c, value: h }),
78
+ /* @__PURE__ */ o(
79
+ r,
80
+ {
81
+ size: "sm",
82
+ label: b,
83
+ value: /* @__PURE__ */ o(g, { toCopy: l, children: /* @__PURE__ */ o("span", { children: v }) })
84
+ }
85
+ )
86
+ ] })
87
+ }
88
+ );
89
+ }
90
+ export {
91
+ F as PoolOperationConfirmSummary
92
+ };
@@ -0,0 +1,6 @@
1
+ class r {
2
+ static root = "pool-operation-confirm-summary-root";
3
+ }
4
+ export {
5
+ r as PoolOperationConfirmSummaryTest
6
+ };
@@ -0,0 +1,6 @@
1
+ import { PoolOperationConfirmSummaryTest as m } from "./constants.js";
2
+ import { PoolOperationConfirmSummary as t } from "./PoolOperationConfirmSummary.js";
3
+ export {
4
+ t as PoolOperationConfirmSummary,
5
+ m as PoolOperationConfirmSummaryTest
6
+ };
@@ -1,70 +1,78 @@
1
1
  import { AddressAvatar as e } from "./components/AddressAvatar.js";
2
2
  import { AddressParty as a } from "./components/AddressParty.js";
3
- import { AddressRow as i } from "./components/AddressRow.js";
4
- import { AmountRow as s } from "./components/AmountRow.js";
5
- import { getAddressLabel as m } from "./components/addressLabel.js";
3
+ import { AddressRow as p } from "./components/AddressRow.js";
4
+ import { AmountRow as m } from "./components/AmountRow.js";
5
+ import { getAddressLabel as f } from "./components/addressLabel.js";
6
6
  import { CollapsibleCard as l } from "./components/CollapsibleCard.js";
7
- import { SectionDivider as C } from "./components/SectionDivider.js";
8
- import { TransferList as w } from "./components/TransferList.js";
9
- import { TransferRow as c } from "./components/TransferRow.js";
10
- import { TransactionConfirmDialogTest as g } from "./confirm/dialog/constants.js";
11
- import { TransactionConfirmDialogView as R } from "./confirm/dialog/TransactionConfirmDialogView.js";
12
- import { useTransactionConfirmDialog as A } from "./confirm/dialog/useTransactionConfirmDialog.js";
13
- import { useCalldataOperationPreview as S } from "./confirm/hooks/useCalldataOperationPreview.js";
14
- import { OperationPreviewContent as v } from "./confirm/preview/OperationPreviewContent.js";
15
- import { computeTransactionExecutionSteps as V } from "./confirm/stepper/computeTransactionExecutionSteps.js";
16
- import { TransactionStepperTest as L } from "./confirm/stepper/constants.js";
17
- import { HorizontalTransactionStepper as k } from "./confirm/stepper/HorizontalTransactionStepper.js";
18
- import { useParsedTransaction as E } from "./hooks/useParsedTransaction.js";
19
- import { OperationBody as H } from "./operations/OperationBody.js";
20
- import { OperationsCard as j, hasOperationView as F } from "./operations/OperationsCard.js";
21
- import { PoolDepositView as J } from "./operations/PoolDepositView.js";
22
- import { PoolRow as M } from "./operations/PoolRow.js";
23
- import { PoolWithdrawView as Q } from "./operations/PoolWithdrawView.js";
24
- import { PrerequisiteRow as X } from "./prerequisites/PrerequisiteRow.js";
25
- import { PrerequisitesCard as Z } from "./prerequisites/PrerequisitesCard.js";
26
- import { prerequisiteDetailRenderers as $, renderPrerequisiteDetail as rr } from "./prerequisites/prerequisiteDetails.js";
27
- import { usePrerequisites as er } from "./prerequisites/usePrerequisites.js";
28
- import { BalanceChangeGroup as ar } from "./state-change/BalanceChangeGroup.js";
29
- import { BalanceChangeRow as ir } from "./state-change/BalanceChangeRow.js";
30
- import { PoolStateChangeCard as sr } from "./state-change/PoolStateChangeCard.js";
31
- import { StateChangeCard as mr } from "./state-change/StateChangeCard.js";
32
- import { buildPoolOperationLabels as lr } from "./utils/addressLabels.js";
33
- import { resolveToken as Cr } from "./utils/poolTokenInfo.js";
7
+ import { SectionDivider as u } from "./components/SectionDivider.js";
8
+ import { TransferList as c } from "./components/TransferList.js";
9
+ import { TransferRow as T } from "./components/TransferRow.js";
10
+ import { TransactionConfirmDialogTest as S, transactionConfirmDialogShellVariants as g } from "./confirm/dialog/constants.js";
11
+ import { TransactionConfirmDialogView as O } from "./confirm/dialog/TransactionConfirmDialogView.js";
12
+ import { useTransactionConfirmDialog as h } from "./confirm/dialog/useTransactionConfirmDialog.js";
13
+ import { useCalldataOperationPreview as A } from "./confirm/hooks/useCalldataOperationPreview.js";
14
+ import { OperationPreviewContent as V } from "./confirm/preview/OperationPreviewContent.js";
15
+ import { computeTransactionExecutionSteps as y, getTransactionExecutionStepRequirements as B } from "./confirm/stepper/computeTransactionExecutionSteps.js";
16
+ import { TransactionStepperTest as E } from "./confirm/stepper/constants.js";
17
+ import { HorizontalTransactionStepper as z } from "./confirm/stepper/HorizontalTransactionStepper.js";
18
+ import { useCompletedStepsInSession as H } from "./confirm/stepper/useCompletedStepsInSession.js";
19
+ import { PoolOperationConfirmSummaryTest as W } from "./confirm/summary/constants.js";
20
+ import { PoolOperationConfirmSummary as F } from "./confirm/summary/PoolOperationConfirmSummary.js";
21
+ import { useParsedTransaction as K } from "./hooks/useParsedTransaction.js";
22
+ import { OperationBody as N } from "./operations/OperationBody.js";
23
+ import { OperationsCard as U, hasOperationView as X } from "./operations/OperationsCard.js";
24
+ import { PoolDepositView as Z } from "./operations/PoolDepositView.js";
25
+ import { PoolRow as $ } from "./operations/PoolRow.js";
26
+ import { PoolWithdrawView as or } from "./operations/PoolWithdrawView.js";
27
+ import { PrerequisiteRow as tr } from "./prerequisites/PrerequisiteRow.js";
28
+ import { PrerequisitesCard as ir } from "./prerequisites/PrerequisitesCard.js";
29
+ import { prerequisiteDetailRenderers as nr, renderPrerequisiteDetail as mr } from "./prerequisites/prerequisiteDetails.js";
30
+ import { usePrerequisites as fr } from "./prerequisites/usePrerequisites.js";
31
+ import { BalanceChangeGroup as lr } from "./state-change/BalanceChangeGroup.js";
32
+ import { BalanceChangeRow as ur } from "./state-change/BalanceChangeRow.js";
33
+ import { PoolStateChangeCard as cr } from "./state-change/PoolStateChangeCard.js";
34
+ import { StateChangeCard as Tr } from "./state-change/StateChangeCard.js";
35
+ import { buildPoolOperationLabels as Sr } from "./utils/addressLabels.js";
36
+ import { resolveToken as Dr } from "./utils/poolTokenInfo.js";
34
37
  export {
35
38
  e as AddressAvatar,
36
39
  a as AddressParty,
37
- i as AddressRow,
38
- s as AmountRow,
39
- ar as BalanceChangeGroup,
40
- ir as BalanceChangeRow,
40
+ p as AddressRow,
41
+ m as AmountRow,
42
+ lr as BalanceChangeGroup,
43
+ ur as BalanceChangeRow,
41
44
  l as CollapsibleCard,
42
- k as HorizontalTransactionStepper,
43
- H as OperationBody,
44
- v as OperationPreviewContent,
45
- j as OperationsCard,
46
- J as PoolDepositView,
47
- M as PoolRow,
48
- sr as PoolStateChangeCard,
49
- Q as PoolWithdrawView,
50
- X as PrerequisiteRow,
51
- Z as PrerequisitesCard,
52
- C as SectionDivider,
53
- mr as StateChangeCard,
54
- g as TransactionConfirmDialogTest,
55
- R as TransactionConfirmDialogView,
56
- L as TransactionStepperTest,
57
- w as TransferList,
58
- c as TransferRow,
59
- lr as buildPoolOperationLabels,
60
- V as computeTransactionExecutionSteps,
61
- m as getAddressLabel,
62
- F as hasOperationView,
63
- $ as prerequisiteDetailRenderers,
64
- rr as renderPrerequisiteDetail,
65
- Cr as resolveToken,
66
- S as useCalldataOperationPreview,
67
- E as useParsedTransaction,
68
- er as usePrerequisites,
69
- A as useTransactionConfirmDialog
45
+ z as HorizontalTransactionStepper,
46
+ N as OperationBody,
47
+ V as OperationPreviewContent,
48
+ U as OperationsCard,
49
+ Z as PoolDepositView,
50
+ F as PoolOperationConfirmSummary,
51
+ W as PoolOperationConfirmSummaryTest,
52
+ $ as PoolRow,
53
+ cr as PoolStateChangeCard,
54
+ or as PoolWithdrawView,
55
+ tr as PrerequisiteRow,
56
+ ir as PrerequisitesCard,
57
+ u as SectionDivider,
58
+ Tr as StateChangeCard,
59
+ S as TransactionConfirmDialogTest,
60
+ O as TransactionConfirmDialogView,
61
+ E as TransactionStepperTest,
62
+ c as TransferList,
63
+ T as TransferRow,
64
+ Sr as buildPoolOperationLabels,
65
+ y as computeTransactionExecutionSteps,
66
+ f as getAddressLabel,
67
+ B as getTransactionExecutionStepRequirements,
68
+ X as hasOperationView,
69
+ nr as prerequisiteDetailRenderers,
70
+ mr as renderPrerequisiteDetail,
71
+ Dr as resolveToken,
72
+ g as transactionConfirmDialogShellVariants,
73
+ A as useCalldataOperationPreview,
74
+ H as useCompletedStepsInSession,
75
+ K as useParsedTransaction,
76
+ fr as usePrerequisites,
77
+ h as useTransactionConfirmDialog
70
78
  };
@@ -125,6 +125,7 @@ import "../../../layout/layout/layout.js";
125
125
  import "../../../layout/main-aside-layout/main-aside-layout.js";
126
126
  import "../../../page-title/page-title.js";
127
127
  import "../../../layout/social-icons/social-icons.js";
128
+ import "../../../legal-agreement/legal-agreement-theme.js";
128
129
  import "../../../link/link.js";
129
130
  import "../../../../utils/reactochart-compat.js";
130
131
  import "../../../status-elements/status-elements.js";
@@ -178,7 +179,7 @@ function l(o) {
178
179
  return o.operation;
179
180
  }
180
181
  }
181
- function ht({
182
+ function Ot({
182
183
  sdk: o,
183
184
  transaction: r,
184
185
  wallet: i
@@ -186,6 +187,6 @@ function ht({
186
187
  return n(r) ? /* @__PURE__ */ t(m, { value: "operations", title: l(r), children: /* @__PURE__ */ t(e, { sdk: o, operation: r, wallet: i }) }) : null;
187
188
  }
188
189
  export {
189
- ht as OperationsCard,
190
+ Ot as OperationsCard,
190
191
  n as hasOperationView
191
192
  };