@gearbox-protocol/ui-kit 3.7.0 → 3.8.0
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/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-credit-manager-info/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-credit-manager-info/pool-credit-manager-info.cjs +1 -1
- package/dist/cjs/components/composites/pool-credit-managers-table/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table-row.cjs +1 -1
- package/dist/cjs/components/currency-button/currency-button.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/smart-number-input/balance-indicator.cjs +1 -1
- package/dist/cjs/components/smart-number-input/smart-number-input.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/test-ids/currency-button.cjs +1 -0
- package/dist/cjs/test-ids/index.cjs +1 -0
- package/dist/cjs/test-ids/smart-number-input.cjs +1 -0
- package/dist/esm/components/composites/index.js +23 -27
- package/dist/esm/components/composites/pool-credit-manager-info/index.js +3 -5
- package/dist/esm/components/composites/pool-credit-manager-info/pool-credit-manager-info.js +17 -17
- package/dist/esm/components/composites/pool-credit-managers-table/index.js +4 -6
- package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-row.js +12 -12
- package/dist/esm/components/currency-button/currency-button.js +8 -7
- package/dist/esm/components/index.js +592 -596
- package/dist/esm/components/smart-number-input/balance-indicator.js +26 -25
- package/dist/esm/components/smart-number-input/smart-number-input.js +75 -74
- package/dist/esm/index.js +815 -810
- package/dist/esm/test-ids/currency-button.js +6 -0
- package/dist/esm/test-ids/index.js +11 -0
- package/dist/esm/test-ids/smart-number-input.js +13 -0
- package/dist/types/components/composites/pool-credit-manager-info/index.d.ts +0 -1
- package/dist/types/components/composites/pool-credit-managers-table/index.d.ts +0 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/test-ids/currency-button.d.ts +4 -0
- package/dist/types/test-ids/index.d.ts +11 -0
- package/dist/types/test-ids/smart-number-input.d.ts +12 -0
- package/package.json +6 -1
- /package/dist/cjs/{components/composites/pool-credit-manager-info/test-ids.cjs → test-ids/pool-credit-manager-info.cjs} +0 -0
- /package/dist/cjs/{components/composites/pool-credit-managers-table/pool-credit-managers-table.test-ids.cjs → test-ids/pool-credit-managers-table.cjs} +0 -0
- /package/dist/esm/{components/composites/pool-credit-manager-info/test-ids.js → test-ids/pool-credit-manager-info.js} +0 -0
- /package/dist/esm/{components/composites/pool-credit-managers-table/pool-credit-managers-table.test-ids.js → test-ids/pool-credit-managers-table.js} +0 -0
- /package/dist/types/{components/composites/pool-credit-manager-info/test-ids.d.ts → test-ids/pool-credit-manager-info.d.ts} +0 -0
- /package/dist/types/{components/composites/pool-credit-managers-table/pool-credit-managers-table.test-ids.d.ts → test-ids/pool-credit-managers-table.d.ts} +0 -0
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
import { PoolAssetsTable as r } from "./pool-assets-table/pool-assets-table.js";
|
|
2
2
|
import { PoolAssetsTableHead as a } from "./pool-assets-table/pool-assets-table-head.js";
|
|
3
|
-
import { PoolAssetsTableRow as
|
|
4
|
-
import { overflowContainerClassName as
|
|
3
|
+
import { PoolAssetsTableRow as t } from "./pool-assets-table/pool-assets-table-row.js";
|
|
4
|
+
import { overflowContainerClassName as n, overflowWrapClassName as p } from "./pool-credit-manager-info/overflow-layout.js";
|
|
5
5
|
import { PoolCreditManagerInfo as f } from "./pool-credit-manager-info/pool-credit-manager-info.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { balanceColumn as y, borrowApyColumn as I, borrowedColumn as c, collateralColumn as v, customColumn as H, poolColumn as N, supplyApyColumn as R, supplyColumn as z, utilizationColumn as W } from "./pool-table/columns.js";
|
|
12
|
-
import { PoolTable as j } from "./pool-table/pool-table.js";
|
|
6
|
+
import { PoolCreditManagersTable as b } from "./pool-credit-managers-table/pool-credit-managers-table.js";
|
|
7
|
+
import { PoolCreditManagersTableHead as i } from "./pool-credit-managers-table/pool-credit-managers-table-head.js";
|
|
8
|
+
import { PoolCreditManagersTableRow as d } from "./pool-credit-managers-table/pool-credit-managers-table-row.js";
|
|
9
|
+
import { balanceColumn as w, borrowApyColumn as A, borrowedColumn as g, collateralColumn as y, customColumn as M, poolColumn as c, supplyApyColumn as v, supplyColumn as H, utilizationColumn as N } from "./pool-table/columns.js";
|
|
10
|
+
import { PoolTable as z } from "./pool-table/pool-table.js";
|
|
13
11
|
export {
|
|
14
12
|
r as PoolAssetsTable,
|
|
15
13
|
a as PoolAssetsTableHead,
|
|
16
|
-
|
|
14
|
+
t as PoolAssetsTableRow,
|
|
17
15
|
f as PoolCreditManagerInfo,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
z as supplyColumn,
|
|
34
|
-
W as utilizationColumn
|
|
16
|
+
b as PoolCreditManagersTable,
|
|
17
|
+
i as PoolCreditManagersTableHead,
|
|
18
|
+
d as PoolCreditManagersTableRow,
|
|
19
|
+
z as PoolTable,
|
|
20
|
+
w as balanceColumn,
|
|
21
|
+
A as borrowApyColumn,
|
|
22
|
+
g as borrowedColumn,
|
|
23
|
+
y as collateralColumn,
|
|
24
|
+
M as customColumn,
|
|
25
|
+
n as overflowContainerClassName,
|
|
26
|
+
p as overflowWrapClassName,
|
|
27
|
+
c as poolColumn,
|
|
28
|
+
v as supplyApyColumn,
|
|
29
|
+
H as supplyColumn,
|
|
30
|
+
N as utilizationColumn
|
|
35
31
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { overflowContainerClassName as e, overflowWrapClassName as a } from "./overflow-layout.js";
|
|
2
|
-
import { PoolCreditManagerInfo as
|
|
3
|
-
import { poolCreditManagerInfoTestIds as n } from "./test-ids.js";
|
|
2
|
+
import { PoolCreditManagerInfo as l } from "./pool-credit-manager-info.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
4
|
+
l as PoolCreditManagerInfo,
|
|
6
5
|
e as overflowContainerClassName,
|
|
7
|
-
a as overflowWrapClassName
|
|
8
|
-
n as poolCreditManagerInfoTestIds
|
|
6
|
+
a as overflowWrapClassName
|
|
9
7
|
};
|
|
@@ -3,6 +3,7 @@ import { shortAddress as E, PERCENTAGE_DECIMALS as m, PERCENTAGE_FACTOR as v, to
|
|
|
3
3
|
import "react";
|
|
4
4
|
import "@gearbox-protocol/sdk/common-utils";
|
|
5
5
|
import { useIsMobile as N } from "../../../hooks/use-media-query.js";
|
|
6
|
+
import { poolCreditManagerInfoTestIds as A } from "../../../test-ids/pool-credit-manager-info.js";
|
|
6
7
|
import "clsx";
|
|
7
8
|
import "tailwind-merge";
|
|
8
9
|
import "sonner";
|
|
@@ -10,18 +11,17 @@ import { percentageTemplate as s } from "../../../utils/format-money.js";
|
|
|
10
11
|
import "luxon";
|
|
11
12
|
import "../../../utils/z-index.js";
|
|
12
13
|
import { CardGrid as p } from "../../card-grid/card-grid.js";
|
|
13
|
-
import { CheckboxLabeled as
|
|
14
|
-
import { ConfirmMenu as
|
|
15
|
-
import { DialogModalContainer as
|
|
16
|
-
import { OverflowContainer as
|
|
14
|
+
import { CheckboxLabeled as P } from "../../checkbox/checkbox-labeled.js";
|
|
15
|
+
import { ConfirmMenu as q } from "../../confirm-menu/confirm-menu.js";
|
|
16
|
+
import { DialogModalContainer as F } from "../../dialog/dialog-modal-container.js";
|
|
17
|
+
import { OverflowContainer as S } from "../../overflow-container/overflow-container.js";
|
|
17
18
|
import { TableCellSm as n } from "../../table/table-sm.js";
|
|
18
|
-
import { TextButton as
|
|
19
|
+
import { TextButton as w } from "../../text-button/text-button.js";
|
|
19
20
|
import { TokenTemplate as l } from "../../token-template/token-template.js";
|
|
20
21
|
import { FormattedMessageTyped as o } from "../../typed-intl/index.js";
|
|
21
22
|
import { VSpace as d } from "../../vspace/vspace.js";
|
|
22
|
-
import { WithCopy as
|
|
23
|
-
import { overflowContainerClassName as
|
|
24
|
-
import { poolCreditManagerInfoTestIds as G } from "./test-ids.js";
|
|
23
|
+
import { WithCopy as j } from "../../with-copy/with-copy.js";
|
|
24
|
+
import { overflowContainerClassName as B, overflowWrapClassName as G } from "./overflow-layout.js";
|
|
25
25
|
function de({
|
|
26
26
|
creditManager: t,
|
|
27
27
|
tokensList: f,
|
|
@@ -35,12 +35,12 @@ function de({
|
|
|
35
35
|
{
|
|
36
36
|
title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.title" }),
|
|
37
37
|
children: /* @__PURE__ */ e(
|
|
38
|
-
|
|
38
|
+
j,
|
|
39
39
|
{
|
|
40
40
|
toCopy: t.address,
|
|
41
41
|
trigger: "root",
|
|
42
42
|
tooltip: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.copy.tip" }),
|
|
43
|
-
children: /* @__PURE__ */ e(
|
|
43
|
+
children: /* @__PURE__ */ e(w, { color: "empty", children: I ? E(t.address) : t.address })
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
}
|
|
@@ -101,7 +101,7 @@ function de({
|
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
103
|
return /* @__PURE__ */ r(
|
|
104
|
-
|
|
104
|
+
F,
|
|
105
105
|
{
|
|
106
106
|
dialog: {
|
|
107
107
|
padding: !0
|
|
@@ -109,9 +109,9 @@ function de({
|
|
|
109
109
|
show: !0,
|
|
110
110
|
onClickOutside: a,
|
|
111
111
|
children: [
|
|
112
|
-
/* @__PURE__ */ r("div", { className: "w-full", "data-testid":
|
|
112
|
+
/* @__PURE__ */ r("div", { className: "w-full", "data-testid": A.detail, children: [
|
|
113
113
|
/* @__PURE__ */ e(
|
|
114
|
-
|
|
114
|
+
q,
|
|
115
115
|
{
|
|
116
116
|
title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.title" }),
|
|
117
117
|
onClose: a
|
|
@@ -155,7 +155,7 @@ function de({
|
|
|
155
155
|
),
|
|
156
156
|
/* @__PURE__ */ e(d, { height: 32 }),
|
|
157
157
|
/* @__PURE__ */ e("div", { className: "flex items-center flex-col-12", children: /* @__PURE__ */ e(
|
|
158
|
-
|
|
158
|
+
P,
|
|
159
159
|
{
|
|
160
160
|
checked: c,
|
|
161
161
|
onChange: () => g(!c),
|
|
@@ -165,14 +165,14 @@ function de({
|
|
|
165
165
|
) }),
|
|
166
166
|
/* @__PURE__ */ e(d, { height: 16 }),
|
|
167
167
|
/* @__PURE__ */ e(
|
|
168
|
-
|
|
168
|
+
S,
|
|
169
169
|
{
|
|
170
170
|
borderColor: "default",
|
|
171
|
-
className:
|
|
171
|
+
className: G,
|
|
172
172
|
innerPadding: "0 8px",
|
|
173
173
|
maxHeight: "300px",
|
|
174
174
|
minHeight: "100px",
|
|
175
|
-
overflowContainerClassName:
|
|
175
|
+
overflowContainerClassName: B,
|
|
176
176
|
outerPadding: "14px 12px 14px 0",
|
|
177
177
|
size: "default",
|
|
178
178
|
children: /* @__PURE__ */ e("div", { className: "pl-2 pr-2 flex-col-auto", children: u })
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { PoolCreditManagersTable as r } from "./pool-credit-managers-table.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { PoolCreditManagersTableRow as p } from "./pool-credit-managers-table-row.js";
|
|
2
|
+
import { PoolCreditManagersTableHead as l } from "./pool-credit-managers-table-head.js";
|
|
3
|
+
import { PoolCreditManagersTableRow as d } from "./pool-credit-managers-table-row.js";
|
|
5
4
|
export {
|
|
6
5
|
r as PoolCreditManagersTable,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
t as poolCreditManagersTableTestIds
|
|
6
|
+
l as PoolCreditManagersTableHead,
|
|
7
|
+
d as PoolCreditManagersTableRow
|
|
10
8
|
};
|
package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-row.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e, Fragment as n } from "react/jsx-runtime";
|
|
2
2
|
import { shortAddress as d } from "@gearbox-protocol/sdk";
|
|
3
|
+
import { poolCreditManagersTableTestIds as p } from "../../../test-ids/pool-credit-managers-table.js";
|
|
3
4
|
import "react";
|
|
4
5
|
import "clsx";
|
|
5
6
|
import "tailwind-merge";
|
|
6
7
|
import "sonner";
|
|
7
|
-
import { formatMoney as
|
|
8
|
+
import { formatMoney as c } from "../../../utils/format-money.js";
|
|
8
9
|
import "@gearbox-protocol/sdk/common-utils";
|
|
9
10
|
import "luxon";
|
|
10
11
|
import "../../../utils/z-index.js";
|
|
11
|
-
import { GridTableRow as
|
|
12
|
-
import { TextButton as
|
|
13
|
-
import { TokenTemplate as
|
|
14
|
-
import { FormattedMessageTyped as
|
|
12
|
+
import { GridTableRow as f, GridTableCell as o } from "../../table/grid-table.js";
|
|
13
|
+
import { TextButton as h } from "../../text-button/text-button.js";
|
|
14
|
+
import { TokenTemplate as u } from "../../token-template/token-template.js";
|
|
15
|
+
import { FormattedMessageTyped as x } from "../../typed-intl/index.js";
|
|
15
16
|
import { VerticalIndicator as l } from "../../vertical-indicator/vertical-indicator.js";
|
|
16
|
-
import { poolCreditManagersTableTestIds as x } from "./pool-credit-managers-table.test-ids.js";
|
|
17
17
|
function F({
|
|
18
18
|
creditManager: t,
|
|
19
19
|
last: r,
|
|
@@ -22,12 +22,12 @@ function F({
|
|
|
22
22
|
underlyingToken: a
|
|
23
23
|
}) {
|
|
24
24
|
return /* @__PURE__ */ m(
|
|
25
|
-
|
|
25
|
+
f,
|
|
26
26
|
{
|
|
27
27
|
last: r,
|
|
28
28
|
height: "75px",
|
|
29
29
|
onRowClick: i,
|
|
30
|
-
"data-testid":
|
|
30
|
+
"data-testid": p.creditManagerLine,
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ e(o, { textAlign: "left", className: "pl-4", size: "sm", children: /* @__PURE__ */ e(
|
|
33
33
|
l,
|
|
@@ -40,20 +40,20 @@ function F({
|
|
|
40
40
|
l,
|
|
41
41
|
{
|
|
42
42
|
value: /* @__PURE__ */ e(
|
|
43
|
-
|
|
43
|
+
u,
|
|
44
44
|
{
|
|
45
45
|
value: t.totalDebt,
|
|
46
46
|
token: a
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
-
valueDescription:
|
|
49
|
+
valueDescription: c(s)
|
|
50
50
|
}
|
|
51
51
|
) }) }) }),
|
|
52
52
|
/* @__PURE__ */ e(o, { textAlign: "right", className: "pr-4", size: "sm", children: /* @__PURE__ */ e("div", { className: "flex justify-end flex-col-auto", children: /* @__PURE__ */ e("div", { className: "flex-col-auto", children: /* @__PURE__ */ e(
|
|
53
53
|
l,
|
|
54
54
|
{
|
|
55
|
-
label: /* @__PURE__ */ e(
|
|
56
|
-
|
|
55
|
+
label: /* @__PURE__ */ e(h, { as: "span", children: /* @__PURE__ */ e(
|
|
56
|
+
x,
|
|
57
57
|
{
|
|
58
58
|
messageId: "components.poolCreditManagersTable.assets",
|
|
59
59
|
values: { amount: t.collateralTokens.length }
|
|
@@ -2,6 +2,7 @@ import { jsxs as b, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { IconExpand as g } from "@gearbox-protocol/static";
|
|
3
3
|
import { cva as u } from "class-variance-authority";
|
|
4
4
|
import { TokenSymbol as k } from "../token-symbol/token-symbol.js";
|
|
5
|
+
import { currencyButtonTestIds as w } from "../../test-ids/currency-button.js";
|
|
5
6
|
import "react";
|
|
6
7
|
import "@gearbox-protocol/sdk";
|
|
7
8
|
import { cn as x } from "../../utils/cn.js";
|
|
@@ -9,7 +10,7 @@ import "sonner";
|
|
|
9
10
|
import "@gearbox-protocol/sdk/common-utils";
|
|
10
11
|
import "luxon";
|
|
11
12
|
import "../../utils/z-index.js";
|
|
12
|
-
const
|
|
13
|
+
const B = 13, N = u(
|
|
13
14
|
"flex flex-row items-center text-foreground cursor-[unset]",
|
|
14
15
|
{
|
|
15
16
|
variants: {
|
|
@@ -24,7 +25,7 @@ const w = 13, N = u(
|
|
|
24
25
|
), V = {
|
|
25
26
|
sm: { symbol: 16, arrow: 8 },
|
|
26
27
|
md: { symbol: 28, arrow: 12 }
|
|
27
|
-
},
|
|
28
|
+
}, E = u(
|
|
28
29
|
"ml-0.5 leading-none text-gray-100 transition-transform duration-100 ease-[ease]",
|
|
29
30
|
{
|
|
30
31
|
variants: {
|
|
@@ -40,9 +41,9 @@ const w = 13, N = u(
|
|
|
40
41
|
defaultVariants: { size: "md", active: !1 }
|
|
41
42
|
}
|
|
42
43
|
);
|
|
43
|
-
function
|
|
44
|
+
function K({
|
|
44
45
|
title: o,
|
|
45
|
-
maxLength: l =
|
|
46
|
+
maxLength: l = B,
|
|
46
47
|
token: m,
|
|
47
48
|
disabled: d,
|
|
48
49
|
showSelectDialog: r,
|
|
@@ -65,7 +66,7 @@ function G({
|
|
|
65
66
|
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), s());
|
|
66
67
|
} : void 0,
|
|
67
68
|
"data-active": t,
|
|
68
|
-
"data-testid":
|
|
69
|
+
"data-testid": w.root,
|
|
69
70
|
onClick: s,
|
|
70
71
|
className: x(
|
|
71
72
|
"group",
|
|
@@ -94,7 +95,7 @@ function G({
|
|
|
94
95
|
{
|
|
95
96
|
className: x(
|
|
96
97
|
"expand-wrap",
|
|
97
|
-
|
|
98
|
+
E({ size: a, active: f })
|
|
98
99
|
),
|
|
99
100
|
children: /* @__PURE__ */ e(g, { size: p.arrow })
|
|
100
101
|
}
|
|
@@ -105,5 +106,5 @@ function G({
|
|
|
105
106
|
);
|
|
106
107
|
}
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
+
K as CurrencyButton
|
|
109
110
|
};
|