@gearbox-protocol/ui-kit 3.14.0-next.62 → 3.14.0-next.64
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/dialog/TransactionConfirmPageView.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.cjs +1 -1
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +30 -29
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.js +13 -12
- package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +2 -1
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.d.ts +2 -1
- package/package.json +1 -1
package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),d=require("../../../../client-adapters/styled-dialog-container/styled-dialog-container.cjs"),_=require("../../../../confirm-menu/confirm-menu.cjs");require("react");require("@gearbox-protocol/sdk");const f=require("../../../../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../../../../utils/z-index.cjs");const i=require("./constants.cjs"),g=require("./TransactionConfirmShell.cjs");function q({onClose:r,title:o,titleAddon:t,hideTitleAddonOnResult:s=!0,containerClassName:a,containerTestId:c,shellTestId:l,phase:e="confirm",...u}){const m=e!=="confirm"&&e!=="awaiting_receipt"&&s?void 0:t;return n.jsx(d.StyledDialogContainer,{className:f.cn(i.transactionConfirmDialogShellVariants(),a),"data-testid":c,children:n.jsx(g.TransactionConfirmShell,{...u,header:n.jsx(_.ConfirmMenu,{title:o,titleAddon:m,onClose:r}),"data-testid":l??i.TransactionConfirmDialogTest.root,phase:e})})}exports.TransactionConfirmPageView=q;
|
package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../../../vspace/vspace.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../../../vspace/vspace.cjs"),m=require("../../../../../hooks/use-media-query.cjs"),t=require("./constants.cjs"),x=require("./TransactionConfirmSuccessIcon.cjs");function h({icon:a=e.jsx(x.TransactionConfirmSuccessIcon,{}),headline:r,subtitle:l,txHashRow:c,footerAction:i}){const n=m.useIsMobile(),u=n?20:32,d=n?12:16,o=n?24:32;return e.jsxs("div",{className:"flex w-full flex-col items-center text-center","data-testid":t.TransactionConfirmSuccessResultTest.root,children:[e.jsx(s.VSpace,{height:u}),a,e.jsx(s.VSpace,{height:24}),e.jsx("div",{className:"text-xl font-medium leading-tight md:text-2xl","data-testid":t.TransactionConfirmSuccessResultTest.headline,children:r}),e.jsx(s.VSpace,{height:d}),e.jsx("div",{className:"text-sm text-secondary-foreground","data-testid":t.TransactionConfirmSuccessResultTest.subtitle,children:l}),c?e.jsxs(e.Fragment,{children:[e.jsx(s.VSpace,{height:o}),e.jsx("div",{className:"w-full text-center",children:c})]}):null,i?e.jsxs(e.Fragment,{children:[e.jsx(s.VSpace,{height:o}),e.jsx("div",{className:"w-full","data-testid":t.TransactionConfirmSuccessResultTest.footer,children:i})]}):null]})}exports.TransactionConfirmSuccessResult=h;
|
package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { StyledDialogContainer as
|
|
3
|
-
import { ConfirmMenu as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { StyledDialogContainer as c } from "../../../../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
3
|
+
import { ConfirmMenu as p } from "../../../../confirm-menu/confirm-menu.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@gearbox-protocol/sdk";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as s } from "../../../../../utils/cn.js";
|
|
7
7
|
import "sonner";
|
|
8
8
|
import "@gearbox-protocol/sdk/common-utils";
|
|
9
9
|
import "luxon";
|
|
10
10
|
import "../../../../../utils/z-index.js";
|
|
11
|
-
import { TransactionConfirmDialogTest as
|
|
12
|
-
import { TransactionConfirmShell as
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
import { TransactionConfirmDialogTest as C, transactionConfirmDialogShellVariants as g } from "./constants.js";
|
|
12
|
+
import { TransactionConfirmShell as T } from "./TransactionConfirmShell.js";
|
|
13
|
+
function N({
|
|
14
|
+
onClose: i,
|
|
15
|
+
title: t,
|
|
16
|
+
titleAddon: n,
|
|
17
|
+
hideTitleAddonOnResult: m = !0,
|
|
18
|
+
containerClassName: a,
|
|
19
|
+
containerTestId: e,
|
|
20
|
+
shellTestId: f,
|
|
20
21
|
phase: o = "confirm",
|
|
21
22
|
...d
|
|
22
23
|
}) {
|
|
23
|
-
const
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
24
|
+
const l = o !== "confirm" && o !== "awaiting_receipt" && m ? void 0 : n;
|
|
25
|
+
return /* @__PURE__ */ r(
|
|
26
|
+
c,
|
|
26
27
|
{
|
|
27
|
-
className:
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
className: s(
|
|
29
|
+
g(),
|
|
30
|
+
a
|
|
30
31
|
),
|
|
31
|
-
"data-testid":
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
|
|
32
|
+
"data-testid": e,
|
|
33
|
+
children: /* @__PURE__ */ r(
|
|
34
|
+
T,
|
|
34
35
|
{
|
|
35
36
|
...d,
|
|
36
|
-
header: /* @__PURE__ */
|
|
37
|
-
|
|
37
|
+
header: /* @__PURE__ */ r(
|
|
38
|
+
p,
|
|
38
39
|
{
|
|
39
|
-
title:
|
|
40
|
-
titleAddon:
|
|
41
|
-
onClose:
|
|
40
|
+
title: t,
|
|
41
|
+
titleAddon: l,
|
|
42
|
+
onClose: i
|
|
42
43
|
}
|
|
43
44
|
),
|
|
44
|
-
"data-testid":
|
|
45
|
+
"data-testid": f ?? C.root,
|
|
45
46
|
phase: o
|
|
46
47
|
}
|
|
47
48
|
)
|
|
@@ -49,5 +50,5 @@ function M({
|
|
|
49
50
|
);
|
|
50
51
|
}
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
N as TransactionConfirmPageView
|
|
53
54
|
};
|
package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.js
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e, Fragment as r } from "react/jsx-runtime";
|
|
2
2
|
import { VSpace as t } from "../../../../vspace/vspace.js";
|
|
3
|
-
import { useIsMobile as
|
|
3
|
+
import { useIsMobile as f } from "../../../../../hooks/use-media-query.js";
|
|
4
4
|
import { TransactionConfirmSuccessResultTest as i } from "./constants.js";
|
|
5
|
-
import { TransactionConfirmSuccessIcon as
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { TransactionConfirmSuccessIcon as x } from "./TransactionConfirmSuccessIcon.js";
|
|
6
|
+
function N({
|
|
7
|
+
icon: o = /* @__PURE__ */ e(x, {}),
|
|
8
|
+
headline: d,
|
|
9
|
+
subtitle: m,
|
|
9
10
|
txHashRow: n,
|
|
10
11
|
footerAction: a
|
|
11
12
|
}) {
|
|
12
|
-
const s =
|
|
13
|
+
const s = f(), h = s ? 20 : 32, u = s ? 12 : 16, c = s ? 24 : 32;
|
|
13
14
|
return /* @__PURE__ */ l(
|
|
14
15
|
"div",
|
|
15
16
|
{
|
|
16
17
|
className: "flex w-full flex-col items-center text-center",
|
|
17
18
|
"data-testid": i.root,
|
|
18
19
|
children: [
|
|
19
|
-
/* @__PURE__ */ e(t, { height:
|
|
20
|
-
|
|
20
|
+
/* @__PURE__ */ e(t, { height: h }),
|
|
21
|
+
o,
|
|
21
22
|
/* @__PURE__ */ e(t, { height: 24 }),
|
|
22
23
|
/* @__PURE__ */ e(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
26
|
className: "text-xl font-medium leading-tight md:text-2xl",
|
|
26
27
|
"data-testid": i.headline,
|
|
27
|
-
children:
|
|
28
|
+
children: d
|
|
28
29
|
}
|
|
29
30
|
),
|
|
30
|
-
/* @__PURE__ */ e(t, { height:
|
|
31
|
+
/* @__PURE__ */ e(t, { height: u }),
|
|
31
32
|
/* @__PURE__ */ e(
|
|
32
33
|
"div",
|
|
33
34
|
{
|
|
34
35
|
className: "text-sm text-secondary-foreground",
|
|
35
36
|
"data-testid": i.subtitle,
|
|
36
|
-
children:
|
|
37
|
+
children: m
|
|
37
38
|
}
|
|
38
39
|
),
|
|
39
40
|
n ? /* @__PURE__ */ l(r, { children: [
|
|
@@ -56,5 +57,5 @@ function v({
|
|
|
56
57
|
);
|
|
57
58
|
}
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
N as TransactionConfirmSuccessResult
|
|
60
61
|
};
|
package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TransactionConfirmShellProps } from './TransactionConfirmShell';
|
|
3
3
|
export interface TransactionConfirmPageViewProps extends Omit<TransactionConfirmShellProps, "header" | "data-testid"> {
|
|
4
|
+
readonly onClose?: () => void;
|
|
4
5
|
readonly title: React.ReactNode;
|
|
5
6
|
readonly titleAddon?: React.ReactNode | undefined;
|
|
6
7
|
readonly hideTitleAddonOnResult?: boolean | undefined;
|
|
@@ -12,4 +13,4 @@ export interface TransactionConfirmPageViewProps extends Omit<TransactionConfirm
|
|
|
12
13
|
*
|
|
13
14
|
* Base shell in modal
|
|
14
15
|
*/
|
|
15
|
-
export declare function TransactionConfirmPageView({ title, titleAddon, hideTitleAddonOnResult, containerClassName, containerTestId, shellTestId, phase, ...rest }: TransactionConfirmPageViewProps): React.ReactElement;
|
|
16
|
+
export declare function TransactionConfirmPageView({ onClose, title, titleAddon, hideTitleAddonOnResult, containerClassName, containerTestId, shellTestId, phase, ...rest }: TransactionConfirmPageViewProps): React.ReactElement;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface TransactionConfirmSuccessResultProps {
|
|
3
|
+
readonly icon: React.ReactNode;
|
|
3
4
|
readonly headline: React.ReactNode;
|
|
4
5
|
readonly subtitle: React.ReactNode;
|
|
5
6
|
readonly txHashRow?: React.ReactNode;
|
|
6
7
|
readonly footerAction?: React.ReactNode;
|
|
7
8
|
}
|
|
8
|
-
export declare function TransactionConfirmSuccessResult({ headline, subtitle, txHashRow, footerAction, }: TransactionConfirmSuccessResultProps): React.ReactElement;
|
|
9
|
+
export declare function TransactionConfirmSuccessResult({ icon, headline, subtitle, txHashRow, footerAction, }: TransactionConfirmSuccessResultProps): React.ReactElement;
|