@gearbox-protocol/ui-kit 3.14.0-next.66 → 3.14.0-next.67

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 (133) 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/block-sync-pill/block-sync-pill.cjs +1 -1
  4. package/dist/cjs/components/breakpoint-provider.cjs +1 -0
  5. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  6. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  7. package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
  8. package/dist/cjs/components/composites/index.cjs +1 -1
  9. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
  10. package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.cjs +1 -1
  11. package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
  12. package/dist/cjs/components/composites/strategies-table/columns.cjs +1 -1
  13. package/dist/cjs/components/composites/strategies-table/components/cells/cells.cjs +1 -1
  14. package/dist/cjs/components/composites/strategies-table/components/cells/index.cjs +1 -1
  15. package/dist/cjs/components/composites/strategies-table/components/index.cjs +1 -1
  16. package/dist/cjs/components/composites/strategies-table/components/points-feature/points-feature.cjs +1 -1
  17. package/dist/cjs/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.cjs +1 -1
  18. package/dist/cjs/components/composites/strategies-table/components/strategies-table.cjs +1 -1
  19. package/dist/cjs/components/composites/strategies-table/index.cjs +1 -1
  20. package/dist/cjs/components/composites/strategies-table/types/index.cjs +1 -1
  21. package/dist/cjs/components/composites/strategies-table/types/rewards-cell.cjs +1 -0
  22. package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
  23. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
  24. package/dist/cjs/components/compound-apy/compound-apy-legacy.cjs +1 -0
  25. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  26. package/dist/cjs/components/compound-apy/index.cjs +1 -1
  27. package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
  28. package/dist/cjs/components/index.cjs +1 -1
  29. package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
  30. package/dist/cjs/components/pool-apy-tooltip/apy-tooltip.cjs +1 -0
  31. package/dist/cjs/components/pool-apy-tooltip/index.cjs +1 -1
  32. package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
  33. package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
  34. package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
  35. package/dist/cjs/components/token-symbol/index.cjs +1 -1
  36. package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
  37. package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
  38. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  39. package/dist/cjs/components/yield-breakdown-tooltip/index.cjs +1 -0
  40. package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -0
  41. package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
  42. package/dist/cjs/hooks/use-media-query.cjs +1 -1
  43. package/dist/cjs/index.cjs +1 -1
  44. package/dist/cjs/locale/en.json.cjs +1 -1
  45. package/dist/cjs/types/common.cjs +1 -1
  46. package/dist/cjs/utils/apy-breakdown.cjs +1 -0
  47. package/dist/cjs/utils/bps.cjs +1 -0
  48. package/dist/cjs/utils/index.cjs +1 -1
  49. package/dist/cjs/utils/token-icon-source.cjs +1 -0
  50. package/dist/esm/components/assets-list-cell/assets-list-cell.js +132 -206
  51. package/dist/esm/components/block-sync/block-sync.js +5 -4
  52. package/dist/esm/components/block-sync-pill/block-sync-pill.js +5 -4
  53. package/dist/esm/components/breakpoint-provider.js +67 -0
  54. package/dist/esm/components/checkbox/checkbox-labeled.js +3 -2
  55. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +3 -2
  56. package/dist/esm/components/complex-input/complex-input.js +5 -4
  57. package/dist/esm/components/composites/index.js +86 -81
  58. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +3 -2
  59. package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.js +3 -2
  60. package/dist/esm/components/composites/pool-table/columns.js +61 -60
  61. package/dist/esm/components/composites/strategies-table/columns.js +55 -86
  62. package/dist/esm/components/composites/strategies-table/components/cells/cells.js +150 -110
  63. package/dist/esm/components/composites/strategies-table/components/cells/index.js +7 -5
  64. package/dist/esm/components/composites/strategies-table/components/index.js +32 -30
  65. package/dist/esm/components/composites/strategies-table/components/points-feature/points-feature.js +35 -32
  66. package/dist/esm/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.js +91 -224
  67. package/dist/esm/components/composites/strategies-table/components/strategies-table.js +26 -24
  68. package/dist/esm/components/composites/strategies-table/index.js +36 -31
  69. package/dist/esm/components/composites/strategies-table/types/index.js +5 -1
  70. package/dist/esm/components/composites/strategies-table/types/rewards-cell.js +40 -0
  71. package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +32 -189
  72. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +5 -4
  73. package/dist/esm/components/compound-apy/compound-apy-legacy.js +127 -0
  74. package/dist/esm/components/compound-apy/compound-apy.js +56 -245
  75. package/dist/esm/components/compound-apy/index.js +4 -2
  76. package/dist/esm/components/detailed-page-title/detailed-page-title.js +25 -180
  77. package/dist/esm/components/index.js +805 -787
  78. package/dist/esm/components/markdown-viewer/markdown-viewer.js +5 -4
  79. package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +155 -0
  80. package/dist/esm/components/pool-apy-tooltip/index.js +4 -2
  81. package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +3 -3
  82. package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +3 -2
  83. package/dist/esm/components/token-icon/token-icon.js +72 -58
  84. package/dist/esm/components/token-symbol/index.js +2 -3
  85. package/dist/esm/components/token-symbol/token-symbol.js +41 -62
  86. package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +35 -192
  87. package/dist/esm/components/with-copy/with-copy.js +5 -4
  88. package/dist/esm/components/yield-breakdown-tooltip/index.js +4 -0
  89. package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +222 -0
  90. package/dist/esm/hooks/use-debounce-call.js +3 -2
  91. package/dist/esm/hooks/use-media-query.js +49 -16
  92. package/dist/esm/index.js +974 -946
  93. package/dist/esm/locale/en.json.js +9 -2
  94. package/dist/esm/types/common.js +1 -6
  95. package/dist/esm/utils/apy-breakdown.js +18 -0
  96. package/dist/esm/utils/bps.js +4 -0
  97. package/dist/esm/utils/index.js +105 -95
  98. package/dist/esm/utils/token-icon-source.js +48 -0
  99. package/dist/globals.css +1 -1
  100. package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +44 -4
  101. package/dist/types/components/breakpoint-provider.d.ts +56 -0
  102. package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +1 -1
  103. package/dist/types/components/composites/strategies-table/components/cells/cells.d.ts +34 -3
  104. package/dist/types/components/composites/strategies-table/components/points-feature/points-feature.d.ts +14 -10
  105. package/dist/types/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.d.ts +10 -13
  106. package/dist/types/components/composites/strategies-table/index.d.ts +1 -1
  107. package/dist/types/components/composites/strategies-table/types/index.d.ts +1 -0
  108. package/dist/types/components/composites/strategies-table/types/rewards-cell.d.ts +48 -0
  109. package/dist/types/components/composites/strategies-table/types/rewards-tooltip.d.ts +37 -32
  110. package/dist/types/components/composites/strategies-table/types/table.d.ts +27 -12
  111. package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +3 -3
  112. package/dist/types/components/compound-apy/compound-apy-legacy.d.ts +109 -0
  113. package/dist/types/components/compound-apy/compound-apy.d.ts +18 -94
  114. package/dist/types/components/compound-apy/index.d.ts +1 -0
  115. package/dist/types/components/index.d.ts +3 -1
  116. package/dist/types/components/points-icon/index.d.ts +1 -1
  117. package/dist/types/components/points-icon/points-icon.d.ts +13 -2
  118. package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +20 -0
  119. package/dist/types/components/pool-apy-tooltip/index.d.ts +1 -0
  120. package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +18 -1
  121. package/dist/types/components/token-icon/token-icon.d.ts +11 -2
  122. package/dist/types/components/token-symbol/token-symbol.d.ts +4 -4
  123. package/dist/types/components/yield-breakdown-tooltip/index.d.ts +1 -0
  124. package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +32 -0
  125. package/dist/types/hooks/use-media-query.d.ts +5 -1
  126. package/dist/types/index.d.ts +2 -0
  127. package/dist/types/locale/en.json.d.ts +10 -2
  128. package/dist/types/types/common.d.ts +5 -11
  129. package/dist/types/utils/apy-breakdown.d.ts +18 -0
  130. package/dist/types/utils/bps.d.ts +3 -0
  131. package/dist/types/utils/index.d.ts +3 -0
  132. package/dist/types/utils/token-icon-source.d.ts +28 -0
  133. package/package.json +2 -2
@@ -1,66 +1,69 @@
1
- import { jsx as t, jsxs as o, Fragment as s } from "react/jsx-runtime";
2
- import { formatLeverage as u } from "@gearbox-protocol/sdk";
3
- import { PointsIcon as m } from "../../../../points-icon/points-icon.js";
1
+ import { jsx as n, jsxs as l, Fragment as o } from "react/jsx-runtime";
2
+ import { formatLeverage as p } from "@gearbox-protocol/sdk";
3
+ import { PointsIcon as s } from "../../../../points-icon/points-icon.js";
4
4
  import { Typography as a } from "../../../../typography/typography.js";
5
- import { Feature as l } from "../feature/feature.js";
5
+ import { Feature as m } from "../feature/feature.js";
6
6
  import "../feature/feature.styles.js";
7
7
  function b({
8
8
  reward: e,
9
- points: n,
10
- precision: i,
11
- theme: r
9
+ points: r,
10
+ precision: t,
11
+ theme: i
12
12
  }) {
13
- return /* @__PURE__ */ t(
14
- l,
13
+ return /* @__PURE__ */ n(
14
+ m,
15
15
  {
16
- theme: r,
17
- title: /* @__PURE__ */ o("div", { className: "flex items-center gap-1 pr-2", children: [
18
- /* @__PURE__ */ t(m, { reward: e }),
19
- /* @__PURE__ */ t(a, { as: "span", variant: "caption", children: /* @__PURE__ */ t(c, { points: n, precision: i }) })
16
+ theme: i,
17
+ title: /* @__PURE__ */ l("div", { className: "flex items-center gap-1 pr-2", children: [
18
+ /* @__PURE__ */ n(s, { reward: e }),
19
+ /* @__PURE__ */ n(a, { as: "span", variant: "caption", children: /* @__PURE__ */ n(c, { points: r, precision: t }) })
20
20
  ] })
21
21
  }
22
22
  );
23
23
  }
24
24
  function y({
25
25
  reward: e,
26
- points: n,
27
- precision: i,
28
- tip: r,
29
- theme: p
26
+ points: r,
27
+ precision: t,
28
+ tip: i,
29
+ theme: u
30
30
  }) {
31
- return /* @__PURE__ */ t(
32
- l,
31
+ return /* @__PURE__ */ n(
32
+ m,
33
33
  {
34
- theme: p,
34
+ theme: u,
35
35
  size: "md",
36
36
  padding: "8px",
37
- title: /* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
38
- /* @__PURE__ */ t(m, { reward: e, size: 16 }),
39
- /* @__PURE__ */ t(a, { as: "span", variant: "bodySmall", children: /* @__PURE__ */ t(d, { reward: e }) })
37
+ title: /* @__PURE__ */ l("div", { className: "flex items-center gap-1", children: [
38
+ /* @__PURE__ */ n(s, { reward: e, size: 16 }),
39
+ /* @__PURE__ */ n(a, { as: "span", variant: "bodySmall", children: /* @__PURE__ */ n(d, { reward: e }) })
40
40
  ] }),
41
- value: /* @__PURE__ */ t(a, { as: "span", variant: "bodySmall", children: /* @__PURE__ */ t(
41
+ value: /* @__PURE__ */ n(a, { as: "span", variant: "bodySmall", children: /* @__PURE__ */ n(
42
42
  c,
43
43
  {
44
- points: n,
45
- precision: i,
44
+ points: r,
45
+ precision: t,
46
46
  startWith: "×",
47
47
  endWith: ""
48
48
  }
49
49
  ) }),
50
- tip: r
50
+ tip: i
51
51
  }
52
52
  );
53
53
  }
54
54
  function d({ reward: e }) {
55
- return /* @__PURE__ */ t(s, { children: [e.name, e.units].join(" ") });
55
+ const r = [e.name, e.units].filter(
56
+ (t) => !!t && t.length > 0
57
+ );
58
+ return /* @__PURE__ */ n(o, { children: r.join(" ") });
56
59
  }
57
60
  function c({
58
61
  points: e,
59
- precision: n = 1,
60
- startWith: i = "",
61
- endWith: r = "×"
62
+ precision: r = 1,
63
+ startWith: t = "",
64
+ endWith: i = "×"
62
65
  }) {
63
- return /* @__PURE__ */ t(s, { children: e === "soon" ? e : `${i}${u(Number(e), n)}${r}` });
66
+ return e === "soon" ? /* @__PURE__ */ n(o, { children: "soon" }) : e == null ? /* @__PURE__ */ n(o, { children: "" }) : /* @__PURE__ */ n(o, { children: `${t}${p(Number(e), r)}${i}` });
64
67
  }
65
68
  export {
66
69
  b as PointsFeature,
@@ -1,271 +1,138 @@
1
- import { jsxs as r, jsx as e, Fragment as I } from "react/jsx-runtime";
2
- import { faXmark as W } from "@fortawesome/free-solid-svg-icons";
3
- import { formatPercentage as s, formatLeverage as _ } from "@gearbox-protocol/sdk";
4
- import { zeroAddress as j } from "viem";
5
- import { IconButton as H } from "../../../../icon-button/icon-button.js";
6
- import { FaIcon as U } from "../../../../icons/fa-icon.js";
7
- import { SeparateLine as X } from "../../../../separate-line/separate-line.js";
8
- import { Skeleton as v } from "../../../../skeleton/skeleton.js";
9
- import "react";
10
- import { cn as G } from "../../../../../utils/cn.js";
11
- import "sonner";
12
- import "@gearbox-protocol/sdk/common-utils";
13
- import "luxon";
14
- import "../../../../../utils/z-index.js";
15
- import { TipCard as y } from "../../../../tip-card/tip-card.js";
16
- import { FormattedMessageTyped as o } from "../../../../typed-intl/index.js";
17
- import { Typography as p } from "../../../../typography/typography.js";
18
- import { VerticalIndicator as R } from "../../../../vertical-indicator/vertical-indicator.js";
19
- import { VerticalList as N } from "../../../../vertical-list/vertical-list.js";
20
- import { VSpace as L } from "../../../../vspace/vspace.js";
21
- import { APYFeatureTooltip as d } from "../apy-feature/apy-feature.js";
22
- import { PointsFeatureTooltip as c } from "../points-feature/points-feature.js";
23
- import { RewardsTooltipRoot as J } from "./rewards-tooltip-root.js";
24
- const K = 0;
25
- function ye({
26
- cellInfo: a,
27
- targetToken: n,
28
- apyListByNetwork: i,
29
- tokensList: h,
30
- strategyCreditManagers: P,
31
- onClose: A,
32
- theme: F = "modal"
1
+ import { jsxs as i, jsx as o, Fragment as y } from "react/jsx-runtime";
2
+ import { faXmark as P } from "@fortawesome/free-solid-svg-icons";
3
+ import { formatPercentage as l, formatLeverage as N } from "@gearbox-protocol/sdk";
4
+ import { IconButton as L } from "../../../../icon-button/icon-button.js";
5
+ import { FaIcon as S } from "../../../../icons/fa-icon.js";
6
+ import { SeparateLine as V } from "../../../../separate-line/separate-line.js";
7
+ import { TipCard as g } from "../../../../tip-card/tip-card.js";
8
+ import { FormattedMessageTyped as a } from "../../../../typed-intl/index.js";
9
+ import { Typography as m } from "../../../../typography/typography.js";
10
+ import { VerticalIndicator as w } from "../../../../vertical-indicator/vertical-indicator.js";
11
+ import { VerticalList as v } from "../../../../vertical-list/vertical-list.js";
12
+ import { VSpace as j } from "../../../../vspace/vspace.js";
13
+ import { bpsToPercent as z } from "../../../../../utils/bps.js";
14
+ import { cn as B } from "../../../../../utils/cn.js";
15
+ import { APYFeatureTooltip as s } from "../apy-feature/apy-feature.js";
16
+ import { PointsFeatureTooltip as R } from "../points-feature/points-feature.js";
17
+ import { RewardsTooltipRoot as Y } from "./rewards-tooltip-root.js";
18
+ function ro({
19
+ totalApy: r,
20
+ baseApy: n,
21
+ baseRewards: e,
22
+ basePoints: d,
23
+ points: p,
24
+ maxLeverage: c,
25
+ borrowRate: h,
26
+ underlyingTokenSymbol: b,
27
+ quotaRate: u,
28
+ onClose: f,
29
+ theme: I = "modal"
33
30
  }) {
34
- const {
35
- maxAPY: S,
36
- minCreditManager: l,
37
- bonusAPY: C,
38
- maxLeverage: Y,
39
- apyLoading: u,
40
- hasPoints: z,
41
- isPointsWithAPY: D,
42
- rewards: g,
43
- debtRewards: w,
44
- rewardRates: V,
45
- debtRewardRates: q,
46
- quotaRate: B
47
- } = a, k = l?.chainId || K, b = i?.[k]?.apyList?.[n] || 0, m = i?.[k]?.extraCollateralAPYList?.[l?.pool || j]?.[n], E = D || !z, M = b > 0 || m !== void 0 && m.value > 0 || g.length > 0 || w.length > 0;
48
- return /* @__PURE__ */ r(J, { theme: F, children: [
49
- A && /* @__PURE__ */ e("div", { style: { position: "absolute", top: "-10px", right: "-10px" }, children: /* @__PURE__ */ e(H, { size: 26, buttonType: "filledDark", onClick: A, children: /* @__PURE__ */ e(U, { icon: W, style: { width: "12px", height: "12px" } }) }) }),
50
- M && /* @__PURE__ */ r(I, { children: [
51
- /* @__PURE__ */ e(y, { textColor: "dark", children: /* @__PURE__ */ r(
52
- T,
31
+ const $ = n > 0 || e.length > 0 || d.length > 0, k = r > 0 || p.length === 0, C = e.reduce(
32
+ (t, F) => t + z(F.supplyApr ?? 0),
33
+ 0
34
+ );
35
+ return /* @__PURE__ */ i(Y, { theme: I, children: [
36
+ f && /* @__PURE__ */ o("div", { style: { position: "absolute", top: "-10px", right: "-10px" }, children: /* @__PURE__ */ o(L, { size: 26, buttonType: "filledDark", onClick: f, children: /* @__PURE__ */ o(S, { icon: P, style: { width: "12px", height: "12px" } }) }) }),
37
+ $ && /* @__PURE__ */ i(y, { children: [
38
+ /* @__PURE__ */ o(g, { textColor: "dark", children: /* @__PURE__ */ i(
39
+ x,
53
40
  {
54
- title: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.without.title" }),
41
+ title: /* @__PURE__ */ o(a, { messageId: "components.rewardsTooltip.without.title" }),
55
42
  children: [
56
- b > 0 && /* @__PURE__ */ e(
57
- v,
58
- {
59
- className: "inline-block align-text-bottom",
60
- width: 50,
61
- loading: u,
62
- children: /* @__PURE__ */ e(d, { value: `${s(b)}%` })
63
- }
64
- ),
65
- m && m.value > 0 && /* @__PURE__ */ e(
66
- v,
43
+ n > 0 && /* @__PURE__ */ o(s, { value: `${l(n)}%` }),
44
+ e.length > 0 && /* @__PURE__ */ o(
45
+ s,
67
46
  {
68
- className: "inline-block align-text-bottom",
69
- width: 50,
70
- loading: u,
71
- children: /* @__PURE__ */ e(
72
- d,
73
- {
74
- title: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.without.extra" }),
75
- tip: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.without.extra.tip" }),
76
- value: `${s(m.value)}%`
77
- }
78
- )
47
+ title: /* @__PURE__ */ o(a, { messageId: "components.rewardsTooltip.without.extra" }),
48
+ tip: /* @__PURE__ */ o(a, { messageId: "components.rewardsTooltip.without.extra.tip" }),
49
+ value: `${l(C)}%`
79
50
  }
80
51
  ),
81
- g.map((t) => /* @__PURE__ */ e(
82
- c,
83
- {
84
- reward: t,
85
- points: t.multiplier
86
- },
87
- ["base", t.multiplier, t.name, t.type, t.units].join(
88
- "-"
89
- )
90
- )),
91
- w.map((t) => /* @__PURE__ */ e(
92
- c,
93
- {
94
- reward: t,
95
- points: t.multiplier,
96
- tip: /* @__PURE__ */ e(
97
- $,
98
- {
99
- tokensList: h,
100
- strategyCreditManagers: P,
101
- reward: t
102
- }
103
- )
104
- },
105
- [
106
- "debt",
107
- t.multiplier,
108
- t.name,
109
- t.type,
110
- t.units,
111
- t.cm
112
- ].join("-")
113
- ))
52
+ d.map((t) => /* @__PURE__ */ o(T, { program: t }, `base-${t.id}`))
114
53
  ]
115
54
  }
116
55
  ) }),
117
- /* @__PURE__ */ e(L, { height: 16 })
56
+ /* @__PURE__ */ o(j, { height: 16 })
118
57
  ] }),
119
- /* @__PURE__ */ r(y, { textColor: "dark", borderColor: "gradient", children: [
120
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(
121
- T,
58
+ /* @__PURE__ */ i(g, { textColor: "dark", borderColor: "gradient", children: [
59
+ /* @__PURE__ */ o(v, { children: /* @__PURE__ */ i(
60
+ x,
122
61
  {
123
- title: /* @__PURE__ */ e(
124
- o,
62
+ title: /* @__PURE__ */ o(
63
+ a,
125
64
  {
126
65
  messageId: "components.rewardsTooltip.with.title",
127
66
  values: {
128
- leverage: Y > 0 ? `${_(Number(Y))}×` : ""
67
+ leverage: Number(c) > 0 ? `${N(Number(c))}×` : ""
129
68
  }
130
69
  }
131
70
  ),
132
71
  children: [
133
- E && /* @__PURE__ */ e(
134
- v,
135
- {
136
- className: "inline-block align-text-bottom",
137
- width: 50,
138
- loading: u,
139
- children: /* @__PURE__ */ e(d, { value: `${s(S)}%` })
140
- }
141
- ),
142
- g.map((t, f) => {
143
- const x = V?.[f] || 0n;
144
- return /* @__PURE__ */ e(
145
- c,
146
- {
147
- reward: t,
148
- points: x
149
- },
150
- ["base", t.multiplier, t.name, t.type, t.units].join(
151
- "-"
152
- )
153
- );
154
- }),
155
- w.map((t, f) => {
156
- const x = q?.[f] || 0n;
157
- return /* @__PURE__ */ e(
158
- c,
159
- {
160
- reward: t,
161
- points: x,
162
- tip: /* @__PURE__ */ e(
163
- $,
164
- {
165
- tokensList: h,
166
- strategyCreditManagers: P,
167
- reward: t
168
- }
169
- )
170
- },
171
- [
172
- "debt",
173
- t.multiplier,
174
- t.name,
175
- t.type,
176
- t.units,
177
- t.cm
178
- ].join("-")
179
- );
180
- })
72
+ k && /* @__PURE__ */ o(s, { value: `${l(r)}%` }),
73
+ p.map((t) => /* @__PURE__ */ o(T, { program: t }, `levered-${t.id}`))
181
74
  ]
182
75
  }
183
76
  ) }),
184
- /* @__PURE__ */ e(X, { margin: 16 }),
185
- /* @__PURE__ */ r(N, { children: [
186
- l && /* @__PURE__ */ e(
187
- R,
77
+ /* @__PURE__ */ o(V, { margin: 16 }),
78
+ /* @__PURE__ */ i(v, { children: [
79
+ h !== void 0 && /* @__PURE__ */ o(
80
+ w,
188
81
  {
189
- label: /* @__PURE__ */ e(p, { as: "span", color: "secondary", children: /* @__PURE__ */ e(
190
- o,
82
+ label: /* @__PURE__ */ o(m, { as: "span", color: "secondary", children: /* @__PURE__ */ o(
83
+ a,
191
84
  {
192
85
  values: {
193
- symbol: h?.[l.underlyingToken]?.title || "Utilization"
86
+ symbol: b || "Utilization"
194
87
  },
195
88
  messageId: "components.rewardsTooltip.with.borrowRate"
196
89
  }
197
90
  ) }),
198
- value: /* @__PURE__ */ e(p, { as: "span", color: "secondary", children: `${s(
199
- l.baseBorrowRate
91
+ value: /* @__PURE__ */ o(m, { as: "span", color: "secondary", children: `${l(
92
+ h
200
93
  )}%` })
201
94
  }
202
95
  ),
203
- l && /* @__PURE__ */ e(
204
- R,
96
+ u !== void 0 && /* @__PURE__ */ o(
97
+ w,
205
98
  {
206
- label: /* @__PURE__ */ e(p, { as: "span", color: "secondary", children: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.with.quotaRate" }) }),
207
- value: /* @__PURE__ */ e(p, { as: "span", color: "secondary", children: `${s(Number(B))}%` })
99
+ label: /* @__PURE__ */ o(m, { as: "span", color: "secondary", children: /* @__PURE__ */ o(a, { messageId: "components.rewardsTooltip.with.quotaRate" }) }),
100
+ value: /* @__PURE__ */ o(m, { as: "span", color: "secondary", children: `${l(u)}%` })
208
101
  }
209
102
  )
210
103
  ] })
211
- ] }),
212
- C && /* @__PURE__ */ r(I, { children: [
213
- /* @__PURE__ */ e(L, { height: 16 }),
214
- /* @__PURE__ */ e(
215
- y,
216
- {
217
- backgroundColor: "gray-10",
218
- textColor: "light",
219
- borderColor: "dark",
220
- children: /* @__PURE__ */ e(
221
- T,
222
- {
223
- title: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.with.bonusAPY.title" }),
224
- children: /* @__PURE__ */ e("div", { className: "flex-col-12", children: /* @__PURE__ */ e(
225
- d,
226
- {
227
- theme: "light",
228
- tip: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.with.bonusAPY.tip" }),
229
- value: `${s(C.value)}%`
230
- }
231
- ) })
232
- }
233
- )
234
- }
235
- )
236
104
  ] })
237
105
  ] });
238
106
  }
239
- function T({ title: a, children: n, theme: i = "main" }) {
240
- return /* @__PURE__ */ r(I, { children: [
241
- /* @__PURE__ */ e("div", { className: G("flex-col-12", i === "main" ? "mb-3" : "mb-2"), children: /* @__PURE__ */ e(
242
- p,
107
+ function T({
108
+ program: r
109
+ }) {
110
+ return /* @__PURE__ */ o(
111
+ R,
112
+ {
113
+ reward: {
114
+ name: r.name,
115
+ type: r.id
116
+ },
117
+ points: r.multiplier
118
+ }
119
+ );
120
+ }
121
+ function x({ title: r, children: n, theme: e = "main" }) {
122
+ return /* @__PURE__ */ i(y, { children: [
123
+ /* @__PURE__ */ o("div", { className: B("flex-col-12", e === "main" ? "mb-3" : "mb-2"), children: /* @__PURE__ */ o(
124
+ m,
243
125
  {
244
126
  as: "span",
245
127
  variant: "bodySmall",
246
- weight: i === "main" ? "bold" : "normal",
247
- color: i === "main" ? "default" : "secondary",
248
- children: a
128
+ weight: e === "main" ? "bold" : "normal",
129
+ color: e === "main" ? "default" : "secondary",
130
+ children: r
249
131
  }
250
132
  ) }),
251
- /* @__PURE__ */ e("div", { className: "flex-row-row gap-2 w-full", children: n })
133
+ /* @__PURE__ */ o("div", { className: "flex-row-row gap-2 w-full", children: n })
252
134
  ] });
253
135
  }
254
- function $({
255
- reward: a,
256
- strategyCreditManagers: n,
257
- tokensList: i
258
- }) {
259
- return a.cm === "any" ? /* @__PURE__ */ e(o, { messageId: "components.strategiesTable.line.points.tipAny" }) : /* @__PURE__ */ e(
260
- o,
261
- {
262
- messageId: "components.strategiesTable.line.points.tip",
263
- values: {
264
- symbol: i?.[n[a.cm]?.underlyingToken || j]?.title || "unknown"
265
- }
266
- }
267
- );
268
- }
269
136
  export {
270
- ye as RewardsTooltipContent
137
+ ro as RewardsTooltipContent
271
138
  };
@@ -1,4 +1,4 @@
1
- import { jsx as t, Fragment as $, jsxs as M } from "react/jsx-runtime";
1
+ import { jsx as t, Fragment as B, jsxs as M } from "react/jsx-runtime";
2
2
  import * as L from "react";
3
3
  import { HeadCell as J } from "../../../head-cell/head-cell.js";
4
4
  import { HelpTip as A } from "../../../help-tip/help-tip.js";
@@ -12,29 +12,29 @@ import { FormattedMessageTyped as ie } from "../../../typed-intl/index.js";
12
12
  import "@gearbox-protocol/sdk/common-utils";
13
13
  import "@gearbox-protocol/sdk";
14
14
  import { useIsMobile as re, useIsMedium as se, useIsDesktop as ae } from "../../../../hooks/use-media-query.js";
15
- import { strategiesTableTestIds as B } from "../../../../test-ids/strategies-table.js";
15
+ import { strategiesTableTestIds as w } from "../../../../test-ids/strategies-table.js";
16
16
  import { cn as h } from "../../../../utils/cn.js";
17
17
  import { StrategiesTableNotFoundLine as le } from "./not-found-line.js";
18
18
  function F({
19
19
  last: e,
20
20
  className: s,
21
- ...p
21
+ ...c
22
22
  }) {
23
23
  return /* @__PURE__ */ t(
24
24
  P,
25
25
  {
26
26
  className: h(e && "*:after:hidden", s),
27
- ...p
27
+ ...c
28
28
  }
29
29
  );
30
30
  }
31
31
  function ne({
32
32
  columns: e,
33
33
  sort: s,
34
- isMedium: p
34
+ isMedium: c
35
35
  }) {
36
36
  return /* @__PURE__ */ t(P, { noHover: !0, height: "32px", children: e.map((i) => {
37
- if (i.hideOnMedium && p) return null;
37
+ if (i.hideOnMedium && c) return null;
38
38
  const d = i.sort, m = d && s ? {
39
39
  direction: s.state?.field === d.field ? s.state.sort : null,
40
40
  onSort: () => s.set(d.field, d.defaultDirection ?? "desc")
@@ -46,7 +46,7 @@ function ne({
46
46
  size: "sm",
47
47
  gapBefore: i.gapBefore,
48
48
  className: h(i.className, i.headerClassName),
49
- children: m ? /* @__PURE__ */ M($, { children: [
49
+ children: m ? /* @__PURE__ */ M(B, { children: [
50
50
  /* @__PURE__ */ t(
51
51
  J,
52
52
  {
@@ -57,7 +57,7 @@ function ne({
57
57
  }
58
58
  ),
59
59
  i.headerTip && /* @__PURE__ */ t(A, { className: "ml-1.5", children: i.headerTip })
60
- ] }) : /* @__PURE__ */ M($, { children: [
60
+ ] }) : /* @__PURE__ */ M(B, { children: [
61
61
  f,
62
62
  i.headerTip && /* @__PURE__ */ t(A, { className: "ml-1.5", children: i.headerTip })
63
63
  ] })
@@ -69,7 +69,7 @@ function ne({
69
69
  function oe({
70
70
  row: e,
71
71
  columns: s,
72
- last: p,
72
+ last: c,
73
73
  rowHeight: i,
74
74
  isSmall: d,
75
75
  isMedium: m,
@@ -86,17 +86,19 @@ function oe({
86
86
  tokensList: e.tokensList,
87
87
  targetToken: e.tokensList?.[g],
88
88
  targetTokenAddress: g,
89
+ rewardsCell: e.rewardsCell,
89
90
  rewardsCellInfo: e.rewardsCellInfo,
91
+ rewardsTooltip: e.rewardsTooltip,
90
92
  isMobile: d,
91
93
  isDesktop: f
92
94
  }),
93
95
  [e, g, d, f]
94
96
  ), x = m ? s.filter((r) => !r.hideOnMedium) : s, a = !!e.disabled, T = !!e.disabledStyle, v = () => S?.(e), C = d ? (() => {
95
- const r = s.filter((n) => !n.hideOnMobile), [c, ...R] = r, l = (n) => n.mobileCell ? n.mobileCell(b) : n.cell(b);
97
+ const r = s.filter((n) => !n.hideOnMobile), [p, ...R] = r, l = (n) => n.mobileCell ? n.mobileCell(b) : n.cell(b);
96
98
  return /* @__PURE__ */ t(
97
99
  F,
98
100
  {
99
- last: p,
101
+ last: c,
100
102
  href: a ? void 0 : e.href,
101
103
  noHover: a,
102
104
  "data-disabled": a,
@@ -113,7 +115,7 @@ function oe({
113
115
  columns: N,
114
116
  columnsXs: u,
115
117
  columnsMd: N,
116
- title: c ? l(c) : void 0,
118
+ title: p ? l(p) : void 0,
117
119
  className: "w-full",
118
120
  children: R.map((n) => /* @__PURE__ */ t(ee, { title: n.mobileTitle, children: l(n) }, n.id))
119
121
  }
@@ -123,7 +125,7 @@ function oe({
123
125
  })() : /* @__PURE__ */ t(
124
126
  F,
125
127
  {
126
- last: p,
128
+ last: c,
127
129
  href: a ? void 0 : e.href,
128
130
  height: `${i}px`,
129
131
  noHover: a,
@@ -153,7 +155,7 @@ function oe({
153
155
  function Se({
154
156
  columns: e,
155
157
  rows: s,
156
- loading: p = !1,
158
+ loading: c = !1,
157
159
  partialLoading: i = !1,
158
160
  error: d,
159
161
  emptyContent: m = /* @__PURE__ */ t(le, {}),
@@ -168,12 +170,12 @@ function Se({
168
170
  onStrategyClick: a,
169
171
  rootTestId: T,
170
172
  rowTestId: v,
171
- loaderTestId: w
173
+ loaderTestId: $
172
174
  }) {
173
- const H = v ?? B.activeLine, C = w ?? B.activeLineLoading, r = re(), c = se(), R = ae(), l = L.useMemo(
174
- () => c ? e.filter((o) => !o.hideOnMedium) : e,
175
- [e, c]
176
- ), n = L.useMemo(() => r ? "1fr" : l.map((o) => (c ? o.mediumWidth ?? o.width : o.width) ?? "1fr").join(" "), [r, c, l]), j = L.useMemo(() => {
175
+ const H = v ?? w.activeLine, C = $ ?? w.activeLineLoading, r = re(), p = se(), R = ae(), l = L.useMemo(
176
+ () => p ? e.filter((o) => !o.hideOnMedium) : e,
177
+ [e, p]
178
+ ), n = L.useMemo(() => r ? "1fr" : l.map((o) => (p ? o.mediumWidth ?? o.width : o.width) ?? "1fr").join(" "), [r, p, l]), j = L.useMemo(() => {
177
179
  const o = l.map((W, X) => {
178
180
  const G = W.gapBefore;
179
181
  if (!G || G === "none") return null;
@@ -181,8 +183,8 @@ function Se({
181
183
  return `[&:nth-child(${X + 1})]:${q}`;
182
184
  }).filter(Boolean).join(" "), I = l[l.length - 1]?.className?.includes("pr-4") ? "last:pr-4" : "";
183
185
  return h("px-1 py-2 first:pl-4", I, o);
184
- }, [l]), k = p || !s, E = !k && s && s.length === 0, D = i && !k;
185
- return d ? null : E && m ? /* @__PURE__ */ t($, { children: m }) : /* @__PURE__ */ M(
186
+ }, [l]), k = c || !s, E = !k && s && s.length === 0, D = i && !k;
187
+ return d ? null : E && m ? /* @__PURE__ */ t(B, { children: m }) : /* @__PURE__ */ M(
186
188
  Q,
187
189
  {
188
190
  cols: n,
@@ -190,14 +192,14 @@ function Se({
190
192
  size: N,
191
193
  wrapperClassName: h("overflow-visible", b),
192
194
  className: g,
193
- "data-testid": T ?? B.root,
195
+ "data-testid": T ?? w.root,
194
196
  children: [
195
197
  !r && /* @__PURE__ */ t(U, { children: /* @__PURE__ */ t(
196
198
  ne,
197
199
  {
198
200
  columns: e,
199
201
  sort: x,
200
- isMedium: c
202
+ isMedium: p
201
203
  }
202
204
  ) }),
203
205
  /* @__PURE__ */ t(
@@ -218,7 +220,7 @@ function Se({
218
220
  last: O === I.length - 1 && !D,
219
221
  rowHeight: u,
220
222
  isSmall: r,
221
- isMedium: c,
223
+ isMedium: p,
222
224
  isDesktop: R,
223
225
  mobileColumnsXs: y,
224
226
  mobileColumnsMd: S,