@gearbox-protocol/ui-kit 3.6.0 → 3.7.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.
Files changed (82) 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/index.cjs +1 -1
  7. package/dist/cjs/components/composites/pool-assets-table/index.cjs +1 -0
  8. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -0
  9. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -0
  10. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -0
  11. package/dist/cjs/components/composites/pool-assets-table/types.cjs +1 -0
  12. package/dist/cjs/components/composites/pool-credit-manager-info/index.cjs +1 -0
  13. package/dist/cjs/components/composites/pool-credit-manager-info/overflow-layout.cjs +1 -0
  14. package/dist/cjs/components/composites/pool-credit-manager-info/pool-credit-manager-info.cjs +1 -0
  15. package/dist/cjs/components/composites/pool-credit-manager-info/test-ids.cjs +1 -0
  16. package/dist/cjs/components/composites/pool-credit-manager-info/types.cjs +1 -0
  17. package/dist/cjs/components/composites/pool-credit-managers-table/index.cjs +1 -0
  18. package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.cjs +1 -0
  19. package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table-row.cjs +1 -0
  20. package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table.cjs +1 -0
  21. package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table.test-ids.cjs +1 -0
  22. package/dist/cjs/components/composites/pool-credit-managers-table/types.cjs +1 -0
  23. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  24. package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
  25. package/dist/cjs/components/index.cjs +1 -1
  26. package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
  27. package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
  28. package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
  29. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  30. package/dist/cjs/index.cjs +1 -1
  31. package/dist/cjs/locale/en.json.cjs +1 -1
  32. package/dist/esm/components/assets-list-cell/assets-list-cell.js +8 -8
  33. package/dist/esm/components/block-sync/block-sync.js +8 -8
  34. package/dist/esm/components/checkbox/checkbox-labeled.js +8 -8
  35. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +8 -8
  36. package/dist/esm/components/complex-input/complex-input.js +9 -9
  37. package/dist/esm/components/composites/index.js +33 -12
  38. package/dist/esm/components/composites/pool-assets-table/index.js +8 -0
  39. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +54 -0
  40. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +105 -0
  41. package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +43 -0
  42. package/dist/esm/components/composites/pool-assets-table/types.js +1 -0
  43. package/dist/esm/components/composites/pool-credit-manager-info/index.js +9 -0
  44. package/dist/esm/components/composites/pool-credit-manager-info/overflow-layout.js +5 -0
  45. package/dist/esm/components/composites/pool-credit-manager-info/pool-credit-manager-info.js +187 -0
  46. package/dist/esm/components/composites/pool-credit-manager-info/test-ids.js +6 -0
  47. package/dist/esm/components/composites/pool-credit-manager-info/types.js +1 -0
  48. package/dist/esm/components/composites/pool-credit-managers-table/index.js +10 -0
  49. package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.js +54 -0
  50. package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-row.js +71 -0
  51. package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table.js +42 -0
  52. package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table.test-ids.js +6 -0
  53. package/dist/esm/components/composites/pool-credit-managers-table/types.js +1 -0
  54. package/dist/esm/components/compound-apy/compound-apy.js +7 -7
  55. package/dist/esm/components/detailed-page-title/detailed-page-title.js +8 -8
  56. package/dist/esm/components/index.js +633 -612
  57. package/dist/esm/components/markdown-viewer/markdown-viewer.js +8 -8
  58. package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +8 -8
  59. package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +8 -8
  60. package/dist/esm/components/with-copy/with-copy.js +8 -8
  61. package/dist/esm/index.js +823 -802
  62. package/dist/esm/locale/en.json.js +19 -0
  63. package/dist/globals.css +1 -1
  64. package/dist/types/components/composites/index.d.ts +3 -0
  65. package/dist/types/components/composites/pool-assets-table/index.d.ts +4 -0
  66. package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +10 -0
  67. package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +15 -0
  68. package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +24 -0
  69. package/dist/types/components/composites/pool-assets-table/types.d.ts +25 -0
  70. package/dist/types/components/composites/pool-credit-manager-info/index.d.ts +4 -0
  71. package/dist/types/components/composites/pool-credit-manager-info/overflow-layout.d.ts +4 -0
  72. package/dist/types/components/composites/pool-credit-manager-info/pool-credit-manager-info.d.ts +20 -0
  73. package/dist/types/components/composites/pool-credit-manager-info/test-ids.d.ts +4 -0
  74. package/dist/types/components/composites/pool-credit-manager-info/types.d.ts +16 -0
  75. package/dist/types/components/composites/pool-credit-managers-table/index.d.ts +5 -0
  76. package/dist/types/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.d.ts +10 -0
  77. package/dist/types/components/composites/pool-credit-managers-table/pool-credit-managers-table-row.d.ts +16 -0
  78. package/dist/types/components/composites/pool-credit-managers-table/pool-credit-managers-table.d.ts +21 -0
  79. package/dist/types/components/composites/pool-credit-managers-table/pool-credit-managers-table.test-ids.d.ts +6 -0
  80. package/dist/types/components/composites/pool-credit-managers-table/types.d.ts +33 -0
  81. package/dist/types/locale/en.json.d.ts +23 -0
  82. package/package.json +2 -2
@@ -0,0 +1,105 @@
1
+ import { jsx as e, jsxs as t, Fragment as L } from "react/jsx-runtime";
2
+ import "react";
3
+ import "@gearbox-protocol/sdk/common-utils";
4
+ import "@gearbox-protocol/sdk";
5
+ import { useIsMobile as N, useIsDesktop as S } from "../../../hooks/use-media-query.js";
6
+ import "clsx";
7
+ import "tailwind-merge";
8
+ import "sonner";
9
+ import { percentageTemplate as A } from "../../../utils/format-money.js";
10
+ import "luxon";
11
+ import "../../../utils/z-index.js";
12
+ import { Description as w } from "../../description/description.js";
13
+ import { ShortString as c } from "../../short-string/short-string.js";
14
+ import { GridTableRow as y, GridTableCell as s } from "../../table/grid-table.js";
15
+ import { TableLineSm as z, TableCellSm as p } from "../../table/table-sm.js";
16
+ import { TokenSymbol as I } from "../../token-symbol/token-symbol.js";
17
+ import { TokenTemplate as d } from "../../token-template/token-template.js";
18
+ import { FormattedMessageTyped as l } from "../../typed-intl/index.js";
19
+ function O({
20
+ poolName: h,
21
+ token: o,
22
+ currentQuota: g,
23
+ underlyingToken: r,
24
+ last: u
25
+ }) {
26
+ const { limit: f, totalQuoted: x, rate: T } = g, i = N(), b = S() ? 21 : i ? 40 : 16, m = () => /* @__PURE__ */ t("div", { className: "flex items-center flex-col-auto", children: [
27
+ /* @__PURE__ */ e(I, { token: o, size: 32 }),
28
+ /* @__PURE__ */ t("span", { className: "ml-1.5 md:ml-2.5 text-left", children: [
29
+ /* @__PURE__ */ e(c, { maxLength: b, children: o?.title }),
30
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(c, { maxLength: 20, children: h }) })
31
+ ] })
32
+ ] }), a = () => A(T), n = () => /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
33
+ l,
34
+ {
35
+ messageId: "components.poolAssetsTable.usage",
36
+ values: {
37
+ amount: /* @__PURE__ */ e(
38
+ d,
39
+ {
40
+ value: x,
41
+ token: r,
42
+ decimalPartLength: 2,
43
+ precision: 2,
44
+ showSymbol: !1
45
+ },
46
+ "pool-assets-line-usage-amount"
47
+ ),
48
+ total: /* @__PURE__ */ e(
49
+ d,
50
+ {
51
+ value: f,
52
+ token: r,
53
+ decimalPartLength: 2,
54
+ precision: 2,
55
+ showSymbol: !1
56
+ },
57
+ "pool-assets-line-usage-total"
58
+ )
59
+ }
60
+ }
61
+ ) });
62
+ return /* @__PURE__ */ e(
63
+ y,
64
+ {
65
+ last: u,
66
+ height: "auto",
67
+ className: "cursor-default",
68
+ style: {
69
+ minHeight: "75px"
70
+ },
71
+ children: i ? /* @__PURE__ */ e(s, { span: "full", size: "sm", className: "px-3 py-0!", children: /* @__PURE__ */ t(
72
+ z,
73
+ {
74
+ columns: 2,
75
+ columnsXs: 2,
76
+ title: m(),
77
+ className: "w-full",
78
+ children: [
79
+ /* @__PURE__ */ e(
80
+ p,
81
+ {
82
+ title: /* @__PURE__ */ e(l, { messageId: "components.poolAssetsTable.rate" }),
83
+ children: a()
84
+ }
85
+ ),
86
+ /* @__PURE__ */ e(
87
+ p,
88
+ {
89
+ title: /* @__PURE__ */ e(l, { messageId: "components.poolAssetsTable.limits" }),
90
+ children: n()
91
+ }
92
+ )
93
+ ]
94
+ }
95
+ ) }) : /* @__PURE__ */ t(L, { children: [
96
+ /* @__PURE__ */ e(s, { textAlign: "left", className: "pl-4", size: "sm", children: m() }),
97
+ /* @__PURE__ */ e(s, { textAlign: "right", size: "sm", children: a() }),
98
+ /* @__PURE__ */ e(s, { textAlign: "right", className: "pr-4", size: "sm", children: n() })
99
+ ] })
100
+ }
101
+ );
102
+ }
103
+ export {
104
+ O as PoolAssetsTableRow
105
+ };
@@ -0,0 +1,43 @@
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import "react";
3
+ import "@gearbox-protocol/sdk/common-utils";
4
+ import "@gearbox-protocol/sdk";
5
+ import { useIsMobile as n } from "../../../hooks/use-media-query.js";
6
+ import { GridTable as d, GridTableHeader as f, GridTableBody as b } from "../../table/grid-table.js";
7
+ import { PoolAssetsTableHead as c } from "./pool-assets-table-head.js";
8
+ import { PoolAssetsTableRow as T } from "./pool-assets-table-row.js";
9
+ function P({
10
+ list: e,
11
+ poolName: l,
12
+ sort: t,
13
+ tokensList: i,
14
+ underlyingToken: a
15
+ }) {
16
+ const s = n();
17
+ return /* @__PURE__ */ p(
18
+ d,
19
+ {
20
+ cols: s ? "1fr" : "1fr 180px 1fr",
21
+ gap: 0,
22
+ size: "lg",
23
+ wrapperClassName: "overflow-visible",
24
+ children: [
25
+ !s && /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(c, { sort: t }) }),
26
+ /* @__PURE__ */ o(b, { children: e.map((r, m) => /* @__PURE__ */ o(
27
+ T,
28
+ {
29
+ poolName: l,
30
+ currentQuota: r,
31
+ token: i[r.token],
32
+ underlyingToken: a,
33
+ last: m === e.length - 1
34
+ },
35
+ r.token
36
+ )) })
37
+ ]
38
+ }
39
+ );
40
+ }
41
+ export {
42
+ P as PoolAssetsTable
43
+ };
@@ -0,0 +1,9 @@
1
+ import { overflowContainerClassName as e, overflowWrapClassName as a } from "./overflow-layout.js";
2
+ import { PoolCreditManagerInfo as t } from "./pool-credit-manager-info.js";
3
+ import { poolCreditManagerInfoTestIds as n } from "./test-ids.js";
4
+ export {
5
+ t as PoolCreditManagerInfo,
6
+ e as overflowContainerClassName,
7
+ a as overflowWrapClassName,
8
+ n as poolCreditManagerInfoTestIds
9
+ };
@@ -0,0 +1,5 @@
1
+ const l = "w-full overflow-x-hidden h-full min-h-0 max-h-full xs:overflow-x-visible xs:h-auto xs:max-h-none", o = "w-full overflow-hidden xs:overflow-visible";
2
+ export {
3
+ l as overflowContainerClassName,
4
+ o as overflowWrapClassName
5
+ };
@@ -0,0 +1,187 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { shortAddress as E, PERCENTAGE_DECIMALS as m, PERCENTAGE_FACTOR as v, toBigInt as y } from "@gearbox-protocol/sdk";
3
+ import "react";
4
+ import "@gearbox-protocol/sdk/common-utils";
5
+ import { useIsMobile as N } from "../../../hooks/use-media-query.js";
6
+ import "clsx";
7
+ import "tailwind-merge";
8
+ import "sonner";
9
+ import { percentageTemplate as s } from "../../../utils/format-money.js";
10
+ import "luxon";
11
+ import "../../../utils/z-index.js";
12
+ import { CardGrid as p } from "../../card-grid/card-grid.js";
13
+ import { CheckboxLabeled as A } from "../../checkbox/checkbox-labeled.js";
14
+ import { ConfirmMenu as P } from "../../confirm-menu/confirm-menu.js";
15
+ import { DialogModalContainer as q } from "../../dialog/dialog-modal-container.js";
16
+ import { OverflowContainer as F } from "../../overflow-container/overflow-container.js";
17
+ import { TableCellSm as n } from "../../table/table-sm.js";
18
+ import { TextButton as S } from "../../text-button/text-button.js";
19
+ import { TokenTemplate as l } from "../../token-template/token-template.js";
20
+ import { FormattedMessageTyped as o } from "../../typed-intl/index.js";
21
+ import { VSpace as d } from "../../vspace/vspace.js";
22
+ import { WithCopy as w } from "../../with-copy/with-copy.js";
23
+ import { overflowContainerClassName as j, overflowWrapClassName as B } from "./overflow-layout.js";
24
+ import { poolCreditManagerInfoTestIds as G } from "./test-ids.js";
25
+ function de({
26
+ creditManager: t,
27
+ tokensList: f,
28
+ underlyingTable: u,
29
+ onClose: a,
30
+ hideZeroQuota: c,
31
+ setHideZeroQuota: g
32
+ }) {
33
+ const I = N(), i = f[t.underlyingToken], h = () => /* @__PURE__ */ e(
34
+ n,
35
+ {
36
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.title" }),
37
+ children: /* @__PURE__ */ e(
38
+ w,
39
+ {
40
+ toCopy: t.address,
41
+ trigger: "root",
42
+ tooltip: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.copy.tip" }),
43
+ children: /* @__PURE__ */ e(S, { color: "empty", children: I ? E(t.address) : t.address })
44
+ }
45
+ )
46
+ }
47
+ ), x = () => /* @__PURE__ */ e(
48
+ n,
49
+ {
50
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.minDebt" }),
51
+ children: /* @__PURE__ */ e(l, { value: t.minDebt, token: i })
52
+ }
53
+ ), C = () => /* @__PURE__ */ e(
54
+ n,
55
+ {
56
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.maxDebt" }),
57
+ children: /* @__PURE__ */ e(l, { value: t.maxDebt, token: i })
58
+ }
59
+ ), b = () => /* @__PURE__ */ e(
60
+ n,
61
+ {
62
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.liquidationFee" }),
63
+ children: s(
64
+ BigInt(t.feeLiquidation) * m
65
+ )
66
+ }
67
+ ), T = () => {
68
+ const D = (v - y(t.liquidationDiscount)) * m;
69
+ return /* @__PURE__ */ e(
70
+ n,
71
+ {
72
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.liquidationPremium" }),
73
+ children: s(D)
74
+ }
75
+ );
76
+ }, k = () => /* @__PURE__ */ e(
77
+ n,
78
+ {
79
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.interestFee" }),
80
+ children: s(
81
+ BigInt(t.feeInterest) * m
82
+ )
83
+ }
84
+ ), L = () => /* @__PURE__ */ e(
85
+ n,
86
+ {
87
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.debtLimit" }),
88
+ children: /* @__PURE__ */ e(
89
+ l,
90
+ {
91
+ value: t.totalDebtLimit,
92
+ token: i
93
+ }
94
+ )
95
+ }
96
+ ), M = () => /* @__PURE__ */ e(
97
+ n,
98
+ {
99
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.info.maxEnabledTokens" }),
100
+ children: t.maxEnabledTokensLength
101
+ }
102
+ );
103
+ return /* @__PURE__ */ r(
104
+ q,
105
+ {
106
+ dialog: {
107
+ padding: !0
108
+ },
109
+ show: !0,
110
+ onClickOutside: a,
111
+ children: [
112
+ /* @__PURE__ */ r("div", { className: "w-full", "data-testid": G.detail, children: [
113
+ /* @__PURE__ */ e(
114
+ P,
115
+ {
116
+ title: /* @__PURE__ */ e(o, { messageId: "components.creditManagerInfo.title" }),
117
+ onClose: a
118
+ }
119
+ ),
120
+ /* @__PURE__ */ e(d, { height: 32 })
121
+ ] }),
122
+ /* @__PURE__ */ r(
123
+ p,
124
+ {
125
+ gap: "sm",
126
+ justifyItemContent: "start",
127
+ columns: 1,
128
+ columnsLg: 1,
129
+ columnsMd: 1,
130
+ columnsSm: 1,
131
+ children: [
132
+ h(),
133
+ /* @__PURE__ */ r(
134
+ p,
135
+ {
136
+ gap: "sm",
137
+ justifyItemContent: "start",
138
+ columns: 4,
139
+ columnsLg: 3,
140
+ columnsMd: 3,
141
+ columnsSm: 2,
142
+ children: [
143
+ x(),
144
+ C(),
145
+ b(),
146
+ T(),
147
+ k(),
148
+ L(),
149
+ M()
150
+ ]
151
+ }
152
+ )
153
+ ]
154
+ }
155
+ ),
156
+ /* @__PURE__ */ e(d, { height: 32 }),
157
+ /* @__PURE__ */ e("div", { className: "flex items-center flex-col-12", children: /* @__PURE__ */ e(
158
+ A,
159
+ {
160
+ checked: c,
161
+ onChange: () => g(!c),
162
+ boxAlign: "center",
163
+ children: /* @__PURE__ */ e(o, { messageId: "dialogs.oraclesAndLTInfo.filter.hide0Quota" })
164
+ }
165
+ ) }),
166
+ /* @__PURE__ */ e(d, { height: 16 }),
167
+ /* @__PURE__ */ e(
168
+ F,
169
+ {
170
+ borderColor: "default",
171
+ className: B,
172
+ innerPadding: "0 8px",
173
+ maxHeight: "300px",
174
+ minHeight: "100px",
175
+ overflowContainerClassName: j,
176
+ outerPadding: "14px 12px 14px 0",
177
+ size: "default",
178
+ children: /* @__PURE__ */ e("div", { className: "pl-2 pr-2 flex-col-auto", children: u })
179
+ }
180
+ )
181
+ ]
182
+ }
183
+ );
184
+ }
185
+ export {
186
+ de as PoolCreditManagerInfo
187
+ };
@@ -0,0 +1,6 @@
1
+ const e = {
2
+ detail: "pool-credit-managers-detail"
3
+ };
4
+ export {
5
+ e as poolCreditManagerInfoTestIds
6
+ };
@@ -0,0 +1,10 @@
1
+ import { PoolCreditManagersTable as r } from "./pool-credit-managers-table.js";
2
+ import { poolCreditManagersTableTestIds as t } from "./pool-credit-managers-table.test-ids.js";
3
+ import { PoolCreditManagersTableHead as d } from "./pool-credit-managers-table-head.js";
4
+ import { PoolCreditManagersTableRow as p } from "./pool-credit-managers-table-row.js";
5
+ export {
6
+ r as PoolCreditManagersTable,
7
+ d as PoolCreditManagersTableHead,
8
+ p as PoolCreditManagersTableRow,
9
+ t as poolCreditManagersTableTestIds
10
+ };
@@ -0,0 +1,54 @@
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({
10
+ sort: m
11
+ }) {
12
+ const s = p(), { state: t, set: o } = m;
13
+ return /* @__PURE__ */ l(d, { noHover: !0, height: "35px", children: [
14
+ /* @__PURE__ */ e(i, { justify: "start", size: "sm", className: "pl-4", children: /* @__PURE__ */ e(
15
+ a,
16
+ {
17
+ arrowPosition: "right",
18
+ title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.name" }),
19
+ sortDirection: r("name", t),
20
+ sortField: s.formatMessage({
21
+ messageId: "components.poolAssetsTable.head.name"
22
+ }),
23
+ onSort: () => o("name")
24
+ }
25
+ ) }),
26
+ /* @__PURE__ */ e(i, { justify: "end", size: "sm", children: /* @__PURE__ */ e(
27
+ a,
28
+ {
29
+ arrowPosition: "left",
30
+ title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.currentDebt" }),
31
+ sortDirection: r("currentDebt", t),
32
+ sortField: s.formatMessage({
33
+ messageId: "components.poolAssetsTable.head.currentDebt"
34
+ }),
35
+ onSort: () => o("currentDebt", "desc")
36
+ }
37
+ ) }),
38
+ /* @__PURE__ */ e(i, { justify: "end", size: "sm", className: "pr-4", children: /* @__PURE__ */ e(
39
+ a,
40
+ {
41
+ arrowPosition: "left",
42
+ title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.head.assets" }),
43
+ sortDirection: r("assets", t),
44
+ sortField: s.formatMessage({
45
+ messageId: "components.poolAssetsTable.head.assets"
46
+ }),
47
+ onSort: () => o("assets", "desc")
48
+ }
49
+ ) })
50
+ ] });
51
+ }
52
+ export {
53
+ I as PoolCreditManagersTableHead
54
+ };
@@ -0,0 +1,71 @@
1
+ import { jsxs as m, jsx as e, Fragment as n } from "react/jsx-runtime";
2
+ import { shortAddress as d } from "@gearbox-protocol/sdk";
3
+ import "react";
4
+ import "clsx";
5
+ import "tailwind-merge";
6
+ import "sonner";
7
+ import { formatMoney as p } from "../../../utils/format-money.js";
8
+ import "@gearbox-protocol/sdk/common-utils";
9
+ import "luxon";
10
+ import "../../../utils/z-index.js";
11
+ import { GridTableRow as c, GridTableCell as o } from "../../table/grid-table.js";
12
+ import { TextButton as f } from "../../text-button/text-button.js";
13
+ import { TokenTemplate as h } from "../../token-template/token-template.js";
14
+ import { FormattedMessageTyped as u } from "../../typed-intl/index.js";
15
+ import { VerticalIndicator as l } from "../../vertical-indicator/vertical-indicator.js";
16
+ import { poolCreditManagersTableTestIds as x } from "./pool-credit-managers-table.test-ids.js";
17
+ function F({
18
+ creditManager: t,
19
+ last: r,
20
+ onClick: i,
21
+ totalDebtMoney: s,
22
+ underlyingToken: a
23
+ }) {
24
+ return /* @__PURE__ */ m(
25
+ c,
26
+ {
27
+ last: r,
28
+ height: "75px",
29
+ onRowClick: i,
30
+ "data-testid": x.creditManagerLine,
31
+ children: [
32
+ /* @__PURE__ */ e(o, { textAlign: "left", className: "pl-4", size: "sm", children: /* @__PURE__ */ e(
33
+ l,
34
+ {
35
+ label: t.name,
36
+ description: d(t.address)
37
+ }
38
+ ) }),
39
+ /* @__PURE__ */ e(o, { textAlign: "right", size: "sm", children: /* @__PURE__ */ e("div", { className: "flex justify-end flex-col-auto", children: /* @__PURE__ */ e("div", { className: "flex-col-auto", children: /* @__PURE__ */ e(
40
+ l,
41
+ {
42
+ value: /* @__PURE__ */ e(
43
+ h,
44
+ {
45
+ value: t.totalDebt,
46
+ token: a
47
+ }
48
+ ),
49
+ valueDescription: p(s)
50
+ }
51
+ ) }) }) }),
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
+ l,
54
+ {
55
+ label: /* @__PURE__ */ e(f, { as: "span", children: /* @__PURE__ */ e(
56
+ u,
57
+ {
58
+ messageId: "components.poolCreditManagersTable.assets",
59
+ values: { amount: t.collateralTokens.length }
60
+ }
61
+ ) }),
62
+ description: /* @__PURE__ */ e(n, { children: " " })
63
+ }
64
+ ) }) }) })
65
+ ]
66
+ }
67
+ );
68
+ }
69
+ export {
70
+ F as PoolCreditManagersTableRow
71
+ };
@@ -0,0 +1,42 @@
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 { PoolCreditManagersTableHead as c } from "./pool-credit-managers-table-head.js";
8
+ import { PoolCreditManagersTableRow as C } from "./pool-credit-managers-table-row.js";
9
+ function w({
10
+ handleSelectCM: e,
11
+ rows: l,
12
+ sort: i,
13
+ underlyingToken: s
14
+ }) {
15
+ const a = d() ? "1fr 120px 0.75fr" : "2fr 1fr 1fr";
16
+ return /* @__PURE__ */ p(
17
+ f,
18
+ {
19
+ cols: a,
20
+ gap: 0,
21
+ size: "lg",
22
+ wrapperClassName: "overflow-visible",
23
+ children: [
24
+ /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(c, { sort: i }) }),
25
+ /* @__PURE__ */ r(b, { children: l.map(({ creditManager: o, totalDebtMoney: m }, t) => /* @__PURE__ */ r(
26
+ C,
27
+ {
28
+ creditManager: o,
29
+ last: t === l.length - 1,
30
+ onClick: e(o),
31
+ totalDebtMoney: m,
32
+ underlyingToken: s
33
+ },
34
+ o.address
35
+ )) })
36
+ ]
37
+ }
38
+ );
39
+ }
40
+ export {
41
+ w as PoolCreditManagersTable
42
+ };
@@ -0,0 +1,6 @@
1
+ const e = {
2
+ creditManagerLine: "pool-credit-managers-line"
3
+ };
4
+ export {
5
+ e as poolCreditManagersTableTestIds
6
+ };
@@ -52,15 +52,18 @@ import "../input/input.js";
52
52
  import "../with-title/with-title.js";
53
53
  import "../smart-number-input/balance-indicator.js";
54
54
  import "../smart-number-input/smart-number-input.js";
55
+ import "../table/grid-table.js";
56
+ import "../help-tip/help-tip.js";
55
57
  import "../description/description.js";
58
+ import { getSymbolOrIcon as C } from "../token-symbol/token-symbol.js";
59
+ import "../confirm-menu/confirm-menu.js";
60
+ import "../dialog/dialog-modal-container.js";
61
+ import "../text-button/text-button.js";
62
+ import "../vertical-indicator/vertical-indicator.js";
56
63
  import "../rounded-image/rounded-image.js";
57
64
  import "../progress/progress.js";
58
65
  import "../pool-indicator-icon/pool-indicator-icon.js";
59
66
  import "../skeleton/skeleton.js";
60
- import { getSymbolOrIcon as C } from "../token-symbol/token-symbol.js";
61
- import "../help-tip/help-tip.js";
62
- import "../table/grid-table.js";
63
- import "../confirm-menu/confirm-menu.js";
64
67
  import "../currency-button/currency-button.js";
65
68
  import "../detailed-apy/detailed-apy.js";
66
69
  import "../detailed-page-title/detailed-page-title.js";
@@ -74,7 +77,6 @@ import "../dialog/dialog-description.js";
74
77
  import "../dialog/dialog-footer.js";
75
78
  import "../dialog/dialog-header.js";
76
79
  import "../dialog/dialog-title.js";
77
- import "../dialog/dialog-modal-container.js";
78
80
  import "../dialog/dialog-overlay.js";
79
81
  import "viem";
80
82
  import "../label/label.js";
@@ -121,7 +123,6 @@ import "../layout/social-icons/social-icons.js";
121
123
  import "../link/link.js";
122
124
  import "../../utils/reactochart-compat.js";
123
125
  import "../status-elements/status-elements.js";
124
- import "../text-button/text-button.js";
125
126
  import "../loader/loader.js";
126
127
  import "../loading/loading.js";
127
128
  import "../loading-bar/loading-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) {
@@ -48,18 +48,20 @@ import "../input/input.js";
48
48
  import "../with-title/with-title.js";
49
49
  import "../smart-number-input/balance-indicator.js";
50
50
  import "../smart-number-input/smart-number-input.js";
51
+ import "../table/grid-table.js";
52
+ import "../help-tip/help-tip.js";
53
+ import "../description/description.js";
54
+ import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
55
+ import "../confirm-menu/confirm-menu.js";
56
+ import "../dialog/dialog-modal-container.js";
57
+ import "../text-button/text-button.js";
58
+ import "../vertical-indicator/vertical-indicator.js";
51
59
  import "../points-icon/points-icon.js";
52
60
  import "../skeleton/skeleton.js";
53
- import "../vertical-indicator/vertical-indicator.js";
54
61
  import "../vertical-list/vertical-list.js";
55
- import "../description/description.js";
56
62
  import "../rounded-image/rounded-image.js";
57
63
  import "../progress/progress.js";
58
64
  import "../pool-indicator-icon/pool-indicator-icon.js";
59
- import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
60
- import "../help-tip/help-tip.js";
61
- import "../table/grid-table.js";
62
- import "../confirm-menu/confirm-menu.js";
63
65
  import "../currency-button/currency-button.js";
64
66
  import "../detailed-apy/detailed-apy.js";
65
67
  import { DetailedPageTitleCopyButton as h } from "./detailed-page-title-copy-button.js";
@@ -72,7 +74,6 @@ import "../dialog/dialog-description.js";
72
74
  import "../dialog/dialog-footer.js";
73
75
  import "../dialog/dialog-header.js";
74
76
  import "../dialog/dialog-title.js";
75
- import "../dialog/dialog-modal-container.js";
76
77
  import "../dialog/dialog-overlay.js";
77
78
  import "viem";
78
79
  import "../label/label.js";
@@ -118,7 +119,6 @@ import "../layout/social-icons/social-icons.js";
118
119
  import "../link/link.js";
119
120
  import "../../utils/reactochart-compat.js";
120
121
  import "../status-elements/status-elements.js";
121
- import "../text-button/text-button.js";
122
122
  import "../loader/loader.js";
123
123
  import "../loading/loading.js";
124
124
  import "../loading-bar/loading-bar.js";