@gearbox-protocol/ui-kit 3.6.0-next.1 → 3.6.0-next.2
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/PoolCreditManagersTable/PoolCreditManagersLine.cjs +1 -0
- package/dist/cjs/components/PoolCreditManagersTable/TableHead.cjs +1 -0
- package/dist/cjs/components/PoolCreditManagersTable/constants.cjs +1 -0
- package/dist/cjs/components/PoolCreditManagersTable/index.cjs +1 -0
- package/dist/cjs/components/PoolCreditManagersTable/types.cjs +1 -0
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/PoolCreditManagersTable/PoolCreditManagersLine.js +71 -0
- package/dist/esm/components/PoolCreditManagersTable/TableHead.js +52 -0
- package/dist/esm/components/PoolCreditManagersTable/constants.js +7 -0
- package/dist/esm/components/PoolCreditManagersTable/index.js +45 -0
- package/dist/esm/components/PoolCreditManagersTable/types.js +1 -0
- package/dist/esm/components/compound-apy/compound-apy.js +1 -1
- package/dist/esm/components/index.js +365 -359
- package/dist/esm/index.js +457 -451
- package/dist/esm/locale/en.json.js +5 -1
- package/dist/types/components/PoolCreditManagersTable/PoolCreditManagersLine.d.ts +11 -0
- package/dist/types/components/PoolCreditManagersTable/TableHead.d.ts +7 -0
- package/dist/types/components/PoolCreditManagersTable/constants.d.ts +4 -0
- package/dist/types/components/PoolCreditManagersTable/index.d.ts +14 -0
- package/dist/types/components/PoolCreditManagersTable/types.d.ts +22 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/locale/en.json.d.ts +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { getSortForField as r } from "../../hooks/use-filter.js";
|
|
4
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
5
|
+
import "@gearbox-protocol/sdk";
|
|
6
|
+
import { HeadCell as a } from "../head-cell/head-cell.js";
|
|
7
|
+
import { GridTableRow as d, GridTableHead as i } from "../table/grid-table.js";
|
|
8
|
+
import { useIntlTyped as p, FormattedMessageTyped as n } from "../typed-intl/index.js";
|
|
9
|
+
function I({ sort: m }) {
|
|
10
|
+
const s = p(), { state: t, set: o } = m;
|
|
11
|
+
return /* @__PURE__ */ l(d, { noHover: !0, height: "35px", children: [
|
|
12
|
+
/* @__PURE__ */ e(i, { justify: "start", size: "sm", className: "pl-4", children: /* @__PURE__ */ e(
|
|
13
|
+
a,
|
|
14
|
+
{
|
|
15
|
+
arrowPosition: "right",
|
|
16
|
+
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.name" }),
|
|
17
|
+
sortDirection: r("name", t),
|
|
18
|
+
sortField: s.formatMessage({
|
|
19
|
+
messageId: "components.poolAssetsTable.head.name"
|
|
20
|
+
}),
|
|
21
|
+
onSort: () => o("name")
|
|
22
|
+
}
|
|
23
|
+
) }),
|
|
24
|
+
/* @__PURE__ */ e(i, { justify: "end", size: "sm", children: /* @__PURE__ */ e(
|
|
25
|
+
a,
|
|
26
|
+
{
|
|
27
|
+
arrowPosition: "left",
|
|
28
|
+
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.currentDebt" }),
|
|
29
|
+
sortDirection: r("currentDebt", t),
|
|
30
|
+
sortField: s.formatMessage({
|
|
31
|
+
messageId: "components.poolAssetsTable.head.currentDebt"
|
|
32
|
+
}),
|
|
33
|
+
onSort: () => o("currentDebt", "desc")
|
|
34
|
+
}
|
|
35
|
+
) }),
|
|
36
|
+
/* @__PURE__ */ e(i, { justify: "end", size: "sm", className: "pr-4", children: /* @__PURE__ */ e(
|
|
37
|
+
a,
|
|
38
|
+
{
|
|
39
|
+
arrowPosition: "left",
|
|
40
|
+
title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.assets" }),
|
|
41
|
+
sortDirection: r("assets", t),
|
|
42
|
+
sortField: s.formatMessage({
|
|
43
|
+
messageId: "components.poolAssetsTable.head.assets"
|
|
44
|
+
}),
|
|
45
|
+
onSort: () => o("assets", "desc")
|
|
46
|
+
}
|
|
47
|
+
) })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
I as TableHead
|
|
52
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
4
|
+
import "@gearbox-protocol/sdk";
|
|
5
|
+
import { useIsMobile as d } from "../../hooks/use-media-query.js";
|
|
6
|
+
import { GridTable as f, GridTableHeader as n, GridTableBody as b } from "../table/grid-table.js";
|
|
7
|
+
import { PoolCreditManagersLineView as T } from "./PoolCreditManagersLine.js";
|
|
8
|
+
import { TableHead as c } from "./TableHead.js";
|
|
9
|
+
import { PoolCreditManagersTableTest as S } from "./constants.js";
|
|
10
|
+
function v({
|
|
11
|
+
handleSelectCM: i,
|
|
12
|
+
rows: e,
|
|
13
|
+
sort: l,
|
|
14
|
+
underlyingToken: s
|
|
15
|
+
}) {
|
|
16
|
+
const a = d() ? "1fr 120px 0.75fr" : "2fr 1fr 1fr";
|
|
17
|
+
return /* @__PURE__ */ p(
|
|
18
|
+
f,
|
|
19
|
+
{
|
|
20
|
+
cols: a,
|
|
21
|
+
gap: 0,
|
|
22
|
+
size: "lg",
|
|
23
|
+
wrapperClassName: "overflow-visible",
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(c, { sort: l }) }),
|
|
26
|
+
/* @__PURE__ */ r(b, { children: e.map(({ creditManager: o, totalDebtMoney: m }, t) => /* @__PURE__ */ r(
|
|
27
|
+
T,
|
|
28
|
+
{
|
|
29
|
+
creditManager: o,
|
|
30
|
+
last: t === e.length - 1,
|
|
31
|
+
onClick: i(o),
|
|
32
|
+
totalDebtMoney: m,
|
|
33
|
+
underlyingToken: s
|
|
34
|
+
},
|
|
35
|
+
o.address
|
|
36
|
+
)) })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
T as PoolCreditManagersLineView,
|
|
43
|
+
S as PoolCreditManagersTableTest,
|
|
44
|
+
v as PoolCreditManagersTableView
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -132,6 +132,7 @@ import "../navbar/navbar-indicator-context.js";
|
|
|
132
132
|
import "../app-bar/app-bar.js";
|
|
133
133
|
import "../navitem/navitem.js";
|
|
134
134
|
import "../simple-dropdown/simple-dropdown.js";
|
|
135
|
+
import "../vertical-indicator/vertical-indicator.js";
|
|
135
136
|
import "../progress-bar/progress-bar.js";
|
|
136
137
|
import "../radio-group/radio-group.js";
|
|
137
138
|
import "../search-bar/search-bar.js";
|
|
@@ -159,7 +160,6 @@ import "../time-to-liquidation/time-to-liquidation.js";
|
|
|
159
160
|
import "../tip-card/tip-card.js";
|
|
160
161
|
import "../toggle/toggle.js";
|
|
161
162
|
import "../typography/typography.js";
|
|
162
|
-
import "../vertical-indicator/vertical-indicator.js";
|
|
163
163
|
import "../vertical-list/vertical-list.js";
|
|
164
164
|
import "../with-filter-button/with-filter-button.js";
|
|
165
165
|
function G(i, p) {
|