@gearbox-protocol/ui-kit 3.5.2 → 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.
Files changed (44) hide show
  1. package/dist/cjs/components/PoolCreditManagersTable/PoolCreditManagersLine.cjs +1 -0
  2. package/dist/cjs/components/PoolCreditManagersTable/TableHead.cjs +1 -0
  3. package/dist/cjs/components/PoolCreditManagersTable/constants.cjs +1 -0
  4. package/dist/cjs/components/PoolCreditManagersTable/index.cjs +1 -0
  5. package/dist/cjs/components/PoolCreditManagersTable/types.cjs +1 -0
  6. package/dist/cjs/components/PoolsAssetsTable/PoolAssetsLine.cjs +1 -0
  7. package/dist/cjs/components/PoolsAssetsTable/TableHead.cjs +1 -0
  8. package/dist/cjs/components/PoolsAssetsTable/index.cjs +1 -0
  9. package/dist/cjs/components/PoolsAssetsTable/types.cjs +1 -0
  10. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  11. package/dist/cjs/components/index.cjs +1 -1
  12. package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
  13. package/dist/cjs/index.cjs +1 -1
  14. package/dist/cjs/locale/en.json.cjs +1 -1
  15. package/dist/esm/components/PoolCreditManagersTable/PoolCreditManagersLine.js +71 -0
  16. package/dist/esm/components/PoolCreditManagersTable/TableHead.js +52 -0
  17. package/dist/esm/components/PoolCreditManagersTable/constants.js +7 -0
  18. package/dist/esm/components/PoolCreditManagersTable/index.js +45 -0
  19. package/dist/esm/components/PoolCreditManagersTable/types.js +1 -0
  20. package/dist/esm/components/PoolsAssetsTable/PoolAssetsLine.js +107 -0
  21. package/dist/esm/components/PoolsAssetsTable/TableHead.js +52 -0
  22. package/dist/esm/components/PoolsAssetsTable/index.js +43 -0
  23. package/dist/esm/components/PoolsAssetsTable/types.js +1 -0
  24. package/dist/esm/components/compound-apy/compound-apy.js +1 -1
  25. package/dist/esm/components/index.js +386 -378
  26. package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +69 -75
  27. package/dist/esm/index.js +489 -481
  28. package/dist/esm/locale/en.json.js +9 -1
  29. package/dist/globals.css +1 -1
  30. package/dist/types/components/PoolCreditManagersTable/PoolCreditManagersLine.d.ts +11 -0
  31. package/dist/types/components/PoolCreditManagersTable/TableHead.d.ts +7 -0
  32. package/dist/types/components/PoolCreditManagersTable/constants.d.ts +4 -0
  33. package/dist/types/components/PoolCreditManagersTable/index.d.ts +14 -0
  34. package/dist/types/components/PoolCreditManagersTable/types.d.ts +22 -0
  35. package/dist/types/components/PoolsAssetsTable/PoolAssetsLine.d.ts +12 -0
  36. package/dist/types/components/PoolsAssetsTable/TableHead.d.ts +7 -0
  37. package/dist/types/components/PoolsAssetsTable/index.d.ts +13 -0
  38. package/dist/types/components/PoolsAssetsTable/types.d.ts +17 -0
  39. package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +17 -168
  40. package/dist/types/components/index.d.ts +2 -0
  41. package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +1 -2
  42. package/dist/types/index.d.ts +2 -0
  43. package/dist/types/locale/en.json.d.ts +11 -1
  44. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- import { jsx as e, jsxs as n, Fragment as b } from "react/jsx-runtime";
2
- import { faPlus as P } from "@fortawesome/free-solid-svg-icons";
1
+ import { jsx as e, jsxs as o, Fragment as b } from "react/jsx-runtime";
2
+ import { faPlus as N } from "@fortawesome/free-solid-svg-icons";
3
3
  import { IconLighting as T } from "@gearbox-protocol/static";
4
4
  import { getRewardTokenSymbol as k } from "../compound-apy/compound-apy.js";
5
5
  import { FaIcon as S } from "../icons/fa-icon.js";
@@ -7,22 +7,22 @@ import { PointsIcon as _ } from "../points-icon/points-icon.js";
7
7
  import { Skeleton as z } from "../skeleton/skeleton.js";
8
8
  import "react";
9
9
  import "@gearbox-protocol/sdk";
10
- import { cn as u } from "../../utils/cn.js";
10
+ import { cn as y } from "../../utils/cn.js";
11
11
  import "sonner";
12
12
  import { percentTemplate as r } from "../../utils/format-money.js";
13
13
  import "@gearbox-protocol/sdk/common-utils";
14
14
  import "luxon";
15
15
  import "../../utils/z-index.js";
16
16
  import { TokenIcon as C } from "../token-icon/token-icon.js";
17
- import { SimpleTooltip as L } from "../tooltip/simple-tooltip.js";
17
+ import { SimpleTooltip as Y } from "../tooltip/simple-tooltip.js";
18
18
  import "../tooltip/tooltip.js";
19
- import { FormattedMessageTyped as o } from "../typed-intl/index.js";
20
- import { VerticalIndicator as d } from "../vertical-indicator/vertical-indicator.js";
21
- import { VerticalList as y } from "../vertical-list/vertical-list.js";
22
- const $ = {
19
+ import { FormattedMessageTyped as n } from "../typed-intl/index.js";
20
+ import { VerticalIndicator as l } from "../vertical-indicator/vertical-indicator.js";
21
+ import { VerticalList as u } from "../vertical-list/vertical-list.js";
22
+ const A = {
23
23
  supplyAPY: "components.apyParts.supplyAPY",
24
24
  tokenYield: "components.apyParts.tokenYield"
25
- }, O = {
25
+ }, L = {
26
26
  supplyAPY: "components.apyParts.supplyAPY.tip",
27
27
  tokenYield: "components.apyParts.tokenYield.tip"
28
28
  }, v = {
@@ -30,29 +30,29 @@ const $ = {
30
30
  "cross-chain-deposit": "components.apyParts.points.condition.crossDeposit",
31
31
  holding: void 0
32
32
  };
33
- function Y({ children: m }) {
34
- return /* @__PURE__ */ e("div", { className: "w-[110px] grid grid-cols-2 items-end text-end", children: m });
33
+ function $({ children: d }) {
34
+ return /* @__PURE__ */ e("div", { className: "w-[110px] grid grid-cols-2 items-end text-end", children: d });
35
35
  }
36
- function oe({
37
- children: m,
36
+ function ne({
37
+ children: d,
38
38
  totalAPY: f,
39
39
  baseAPY: c,
40
40
  extraAPY: h,
41
- points: i,
41
+ points: s,
42
42
  apy7DAgo: a,
43
- externalAPY: s,
43
+ externalAPY: m,
44
44
  tokensList: w,
45
45
  className: g
46
46
  }) {
47
- if (!(f !== void 0 || c && c.length > 0 || h && h.length > 0 || i && i.length > 0))
48
- return /* @__PURE__ */ e("span", { className: g, children: m });
49
- const I = !a || !!a.totalAPYLoading || !!a.loading7DAgo, x = !!a, p = (t, l) => x ? /* @__PURE__ */ n(Y, { children: [
47
+ if (!(f !== void 0 || c && c.length > 0 || h && h.length > 0 || s && s.length > 0))
48
+ return /* @__PURE__ */ e("span", { className: g, children: d });
49
+ const I = !a || !!a.totalAPYLoading || !!a.loading7DAgo, x = !!a, p = (t, i) => x ? /* @__PURE__ */ o($, { children: [
50
50
  /* @__PURE__ */ e("span", { children: t }),
51
- /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(z, { width: 30, height: 14, loading: I, children: l }) })
52
- ] }) : t, N = /* @__PURE__ */ n(
51
+ /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(z, { width: 30, height: 14, loading: I, children: i }) })
52
+ ] }) : t, P = /* @__PURE__ */ o(
53
53
  "div",
54
54
  {
55
- className: u(
55
+ className: y(
56
56
  "w-[370px] max-w-[calc(100vw-32px)] p-6",
57
57
  "bg-popover",
58
58
  "border border-border",
@@ -61,13 +61,13 @@ function oe({
61
61
  "text-left font-normal"
62
62
  ),
63
63
  children: [
64
- /* @__PURE__ */ n(y, { children: [
64
+ /* @__PURE__ */ o(u, { children: [
65
65
  x && /* @__PURE__ */ e(
66
- d,
66
+ l,
67
67
  {
68
68
  size: "sm",
69
69
  label: /* @__PURE__ */ e("span", { className: "uppercase text-muted-foreground text-xs", children: /* @__PURE__ */ e(
70
- o,
70
+ n,
71
71
  {
72
72
  messageId: "components.apyParts.title"
73
73
  }
@@ -75,33 +75,33 @@ function oe({
75
75
  value: /* @__PURE__ */ e("span", { className: "text-muted-foreground text-xs", children: p("1D", "7D") })
76
76
  }
77
77
  ),
78
- c?.map((t, l) => /* @__PURE__ */ e(
79
- d,
78
+ c?.map((t, i) => /* @__PURE__ */ e(
79
+ l,
80
80
  {
81
81
  size: "sm",
82
- label: /* @__PURE__ */ e(o, { messageId: $[t.type] }),
82
+ label: /* @__PURE__ */ e(n, { messageId: A[t.type] }),
83
83
  description: /* @__PURE__ */ e(
84
- o,
84
+ n,
85
85
  {
86
- messageId: O[t.type]
86
+ messageId: L[t.type]
87
87
  }
88
88
  ),
89
89
  value: p(
90
90
  r(t.apy),
91
- r(a?.baseAPY?.[l]?.apy || 0)
91
+ r(a?.baseAPY?.[i]?.apy || 0)
92
92
  )
93
93
  },
94
94
  `base-${t.type}-${t.apy}`
95
95
  )),
96
96
  h?.map((t) => {
97
- const l = w?.[t.rewardToken];
97
+ const i = w?.[t.rewardToken];
98
98
  return /* @__PURE__ */ e(
99
- d,
99
+ l,
100
100
  {
101
101
  size: "sm",
102
- label: /* @__PURE__ */ n("span", { className: "inline-flex items-center", children: [
102
+ label: /* @__PURE__ */ o("span", { className: "inline-flex items-center", children: [
103
103
  /* @__PURE__ */ e(
104
- o,
104
+ n,
105
105
  {
106
106
  messageId: "components.apyParts.extraAPY",
107
107
  values: { symbol: t.rewardTokenSymbol }
@@ -110,13 +110,13 @@ function oe({
110
110
  /* @__PURE__ */ e("span", { className: "ml-1 inline-flex", children: /* @__PURE__ */ e(
111
111
  C,
112
112
  {
113
- symbol: k(l, t.rewardTokenSymbol),
113
+ symbol: k(i, t.rewardTokenSymbol),
114
114
  size: 14
115
115
  }
116
116
  ) })
117
117
  ] }),
118
118
  description: /* @__PURE__ */ e(
119
- o,
119
+ n,
120
120
  {
121
121
  messageId: "components.apyParts.extraAPY.tip"
122
122
  }
@@ -131,12 +131,12 @@ function oe({
131
131
  })
132
132
  ] }),
133
133
  /* @__PURE__ */ e("div", { className: "my-5 border-t border-border" }),
134
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
135
- d,
134
+ /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(
135
+ l,
136
136
  {
137
137
  size: "sm",
138
138
  label: /* @__PURE__ */ e("span", { className: "font-bold", children: /* @__PURE__ */ e(
139
- o,
139
+ n,
140
140
  {
141
141
  messageId: "components.apyParts.totalAPY"
142
142
  }
@@ -147,61 +147,55 @@ function oe({
147
147
  )
148
148
  }
149
149
  ) }),
150
- s && /* @__PURE__ */ e(
150
+ m && /* @__PURE__ */ e(
151
151
  "div",
152
152
  {
153
- className: u(
153
+ className: y(
154
154
  "mt-5 px-8 pt-[18px] pb-4",
155
155
  "rounded-[10px]",
156
156
  "text-[13px] leading-[120%] text-center",
157
157
  "border border-dashed border-gray-40"
158
158
  ),
159
- children: (() => {
160
- const t = /* @__PURE__ */ n(b, { children: [
161
- /* @__PURE__ */ e("span", { className: "text-gray-90 mr-1.5", children: /* @__PURE__ */ e(T, { size: 14, style: { verticalAlign: "top" } }) }),
162
- /* @__PURE__ */ n("span", { className: "font-bold", children: [
163
- "+",
164
- r(s.apy)
165
- ] })
166
- ] });
167
- return s.tooltip ? /* @__PURE__ */ e(
168
- o,
169
- {
170
- messageId: s.tooltip,
171
- values: {
172
- name: s.name,
173
- value: t
174
- }
159
+ children: /* @__PURE__ */ e(
160
+ n,
161
+ {
162
+ messageId: m.tooltip,
163
+ values: {
164
+ name: m.name,
165
+ value: /* @__PURE__ */ o(b, { children: [
166
+ /* @__PURE__ */ e("span", { className: "text-gray-90 mr-1.5", children: /* @__PURE__ */ e(T, { size: 14, style: { verticalAlign: "top" } }) }),
167
+ /* @__PURE__ */ o("span", { className: "font-bold", children: [
168
+ "+",
169
+ r(m.apy)
170
+ ] })
171
+ ] })
175
172
  }
176
- ) : /* @__PURE__ */ n("span", { className: "inline-flex flex-wrap items-center justify-center gap-x-1", children: [
177
- /* @__PURE__ */ e("span", { children: s.name }),
178
- t
179
- ] });
180
- })()
173
+ }
174
+ )
181
175
  }
182
176
  ),
183
- i && i.length > 0 && /* @__PURE__ */ n(b, { children: [
177
+ s && s.length > 0 && /* @__PURE__ */ o(b, { children: [
184
178
  /* @__PURE__ */ e("div", { className: "relative my-2.5 mx-6 border-t-2 border-border", children: /* @__PURE__ */ e(
185
179
  "div",
186
180
  {
187
- className: u(
181
+ className: y(
188
182
  "absolute -top-[10px] left-0",
189
183
  "w-5 h-5",
190
184
  "flex items-center justify-center",
191
185
  "rounded-full",
192
186
  "bg-gray-20"
193
187
  ),
194
- children: /* @__PURE__ */ e(S, { icon: P, className: "size-2.5 text-white" })
188
+ children: /* @__PURE__ */ e(S, { icon: N, className: "size-2.5 text-white" })
195
189
  }
196
190
  ) }),
197
191
  /* @__PURE__ */ e("div", { className: "h-6" }),
198
- /* @__PURE__ */ e(y, { children: i.map((t) => /* @__PURE__ */ e(
199
- d,
192
+ /* @__PURE__ */ e(u, { children: s.map((t) => /* @__PURE__ */ e(
193
+ l,
200
194
  {
201
195
  size: "sm",
202
- label: /* @__PURE__ */ n("span", { className: "inline-flex items-center", children: [
196
+ label: /* @__PURE__ */ o("span", { className: "inline-flex items-center", children: [
203
197
  /* @__PURE__ */ e(
204
- o,
198
+ n,
205
199
  {
206
200
  messageId: "components.apyParts.points",
207
201
  values: { symbol: t.name }
@@ -218,13 +212,13 @@ function oe({
218
212
  }
219
213
  ) })
220
214
  ] }),
221
- description: /* @__PURE__ */ n("div", { children: [
215
+ description: /* @__PURE__ */ o("div", { children: [
222
216
  /* @__PURE__ */ e("div", { children: `Per ${[
223
217
  ...t.reward?.duration ? [t.reward.duration] : [],
224
218
  ...t.tokenTitle ? [`1 ${t.tokenTitle}`] : []
225
219
  ].join(" per ")}` }),
226
220
  t.reward?.condition && v[t.reward.condition] && /* @__PURE__ */ e("span", { className: "text-warning", children: /* @__PURE__ */ e(
227
- o,
221
+ n,
228
222
  {
229
223
  messageId: v[t.reward.condition]
230
224
  }
@@ -239,19 +233,19 @@ function oe({
239
233
  }
240
234
  );
241
235
  return /* @__PURE__ */ e(
242
- L,
236
+ Y,
243
237
  {
244
238
  placement: "bottom",
245
239
  triangle: !1,
246
240
  type: "modal-tooltip",
247
241
  minWidth: "100%",
248
242
  maxWidth: "100%",
249
- title: /* @__PURE__ */ e("span", { className: g, children: m }),
243
+ title: /* @__PURE__ */ e("span", { className: g, children: d }),
250
244
  triggerClassName: g,
251
- children: N
245
+ children: P
252
246
  }
253
247
  );
254
248
  }
255
249
  export {
256
- oe as PoolAPYTooltip
250
+ ne as PoolAPYTooltip
257
251
  };