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

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 (136) 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/split-list/split-list.cjs +1 -1
  34. package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
  35. package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
  36. package/dist/cjs/components/token-symbol/index.cjs +1 -1
  37. package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
  38. package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
  39. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  40. package/dist/cjs/components/yield-breakdown-tooltip/index.cjs +1 -0
  41. package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -0
  42. package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
  43. package/dist/cjs/hooks/use-media-query.cjs +1 -1
  44. package/dist/cjs/index.cjs +1 -1
  45. package/dist/cjs/locale/en.json.cjs +1 -1
  46. package/dist/cjs/types/common.cjs +1 -1
  47. package/dist/cjs/utils/apy-breakdown.cjs +1 -0
  48. package/dist/cjs/utils/bps.cjs +1 -0
  49. package/dist/cjs/utils/index.cjs +1 -1
  50. package/dist/cjs/utils/token-icon-source.cjs +1 -0
  51. package/dist/esm/components/assets-list-cell/assets-list-cell.js +132 -206
  52. package/dist/esm/components/block-sync/block-sync.js +5 -4
  53. package/dist/esm/components/block-sync-pill/block-sync-pill.js +5 -4
  54. package/dist/esm/components/breakpoint-provider.js +67 -0
  55. package/dist/esm/components/checkbox/checkbox-labeled.js +3 -2
  56. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +3 -2
  57. package/dist/esm/components/complex-input/complex-input.js +5 -4
  58. package/dist/esm/components/composites/index.js +86 -81
  59. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +3 -2
  60. package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.js +3 -2
  61. package/dist/esm/components/composites/pool-table/columns.js +61 -60
  62. package/dist/esm/components/composites/strategies-table/columns.js +55 -86
  63. package/dist/esm/components/composites/strategies-table/components/cells/cells.js +150 -110
  64. package/dist/esm/components/composites/strategies-table/components/cells/index.js +7 -5
  65. package/dist/esm/components/composites/strategies-table/components/index.js +32 -30
  66. package/dist/esm/components/composites/strategies-table/components/points-feature/points-feature.js +35 -32
  67. package/dist/esm/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.js +91 -224
  68. package/dist/esm/components/composites/strategies-table/components/strategies-table.js +26 -24
  69. package/dist/esm/components/composites/strategies-table/index.js +36 -31
  70. package/dist/esm/components/composites/strategies-table/types/index.js +5 -1
  71. package/dist/esm/components/composites/strategies-table/types/rewards-cell.js +40 -0
  72. package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +32 -189
  73. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +5 -4
  74. package/dist/esm/components/compound-apy/compound-apy-legacy.js +127 -0
  75. package/dist/esm/components/compound-apy/compound-apy.js +56 -245
  76. package/dist/esm/components/compound-apy/index.js +4 -2
  77. package/dist/esm/components/detailed-page-title/detailed-page-title.js +25 -180
  78. package/dist/esm/components/index.js +805 -787
  79. package/dist/esm/components/markdown-viewer/markdown-viewer.js +5 -4
  80. package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +155 -0
  81. package/dist/esm/components/pool-apy-tooltip/index.js +4 -2
  82. package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +3 -3
  83. package/dist/esm/components/split-list/split-list.js +12 -12
  84. package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +3 -2
  85. package/dist/esm/components/token-icon/token-icon.js +72 -58
  86. package/dist/esm/components/token-symbol/index.js +2 -3
  87. package/dist/esm/components/token-symbol/token-symbol.js +41 -62
  88. package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +35 -192
  89. package/dist/esm/components/with-copy/with-copy.js +5 -4
  90. package/dist/esm/components/yield-breakdown-tooltip/index.js +4 -0
  91. package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +222 -0
  92. package/dist/esm/hooks/use-debounce-call.js +3 -2
  93. package/dist/esm/hooks/use-media-query.js +49 -16
  94. package/dist/esm/index.js +974 -946
  95. package/dist/esm/locale/en.json.js +9 -2
  96. package/dist/esm/types/common.js +1 -6
  97. package/dist/esm/utils/apy-breakdown.js +18 -0
  98. package/dist/esm/utils/bps.js +4 -0
  99. package/dist/esm/utils/index.js +105 -95
  100. package/dist/esm/utils/token-icon-source.js +48 -0
  101. package/dist/globals.css +1 -1
  102. package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +44 -4
  103. package/dist/types/components/breakpoint-provider.d.ts +56 -0
  104. package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +1 -1
  105. package/dist/types/components/composites/strategies-table/components/cells/cells.d.ts +34 -3
  106. package/dist/types/components/composites/strategies-table/components/points-feature/points-feature.d.ts +14 -10
  107. package/dist/types/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.d.ts +10 -13
  108. package/dist/types/components/composites/strategies-table/index.d.ts +1 -1
  109. package/dist/types/components/composites/strategies-table/types/index.d.ts +1 -0
  110. package/dist/types/components/composites/strategies-table/types/rewards-cell.d.ts +48 -0
  111. package/dist/types/components/composites/strategies-table/types/rewards-tooltip.d.ts +37 -32
  112. package/dist/types/components/composites/strategies-table/types/table.d.ts +27 -12
  113. package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +3 -3
  114. package/dist/types/components/compound-apy/compound-apy-legacy.d.ts +109 -0
  115. package/dist/types/components/compound-apy/compound-apy.d.ts +18 -94
  116. package/dist/types/components/compound-apy/index.d.ts +1 -0
  117. package/dist/types/components/index.d.ts +3 -1
  118. package/dist/types/components/points-icon/index.d.ts +1 -1
  119. package/dist/types/components/points-icon/points-icon.d.ts +13 -2
  120. package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +20 -0
  121. package/dist/types/components/pool-apy-tooltip/index.d.ts +1 -0
  122. package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +18 -1
  123. package/dist/types/components/split-list/split-list.d.ts +1 -1
  124. package/dist/types/components/token-icon/token-icon.d.ts +11 -2
  125. package/dist/types/components/token-symbol/token-symbol.d.ts +4 -4
  126. package/dist/types/components/yield-breakdown-tooltip/index.d.ts +1 -0
  127. package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +32 -0
  128. package/dist/types/hooks/use-media-query.d.ts +5 -1
  129. package/dist/types/index.d.ts +2 -0
  130. package/dist/types/locale/en.json.d.ts +10 -2
  131. package/dist/types/types/common.d.ts +5 -11
  132. package/dist/types/utils/apy-breakdown.d.ts +18 -0
  133. package/dist/types/utils/bps.d.ts +3 -0
  134. package/dist/types/utils/index.d.ts +3 -0
  135. package/dist/types/utils/token-icon-source.d.ts +28 -0
  136. package/package.json +2 -2
@@ -1,55 +1,49 @@
1
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
2
  import { formatLeverage as f } from "@gearbox-protocol/sdk";
3
- import { NetworkIcon as u } from "../../network-icon/network-icon.js";
4
- import { ShortString as w } from "../../short-string/short-string.js";
3
+ import { NetworkIcon as w } from "../../network-icon/network-icon.js";
4
+ import { ShortString as T } from "../../short-string/short-string.js";
5
5
  import { TokenSymbol as b } from "../../token-symbol/token-symbol.js";
6
- import { FormattedMessageTyped as n } from "../../typed-intl/index.js";
6
+ import { FormattedMessageTyped as m } from "../../typed-intl/index.js";
7
7
  import { Typography as y } from "../../typography/typography.js";
8
- import { RWAFeature as T, ZeroSlippageFeature as R, StrategiesRewardsCell as k } from "./components/cells/cells.js";
9
- import { TitleGrid as v, DisabledWrap as g } from "./components/cells/cells.styles.js";
10
- import { RewardsTooltip as x } from "./components/rewards-tooltip/rewards-tooltip.js";
8
+ import { RWAFeature as v, ZeroSlippageFeature as S, StrategiesRewardsCell as x } from "./components/cells/cells.js";
9
+ import { TitleGrid as C, DisabledWrap as h } from "./components/cells/cells.styles.js";
10
+ import { RewardsTooltip as k } from "./components/rewards-tooltip/rewards-tooltip.js";
11
11
  import "./components/rewards-tooltip/rewards-tooltip-root.js";
12
12
  import "../../tooltip/simple-tooltip.js";
13
13
  import "../../tooltip/tooltip.js";
14
14
  import "@fortawesome/free-solid-svg-icons";
15
- import "viem";
16
15
  import "../../icon-button/icon-button.js";
17
16
  import "../../icons/fa-icon.js";
18
17
  import "../../separate-line/separate-line.js";
19
- import "../../skeleton/skeleton.js";
20
- import "react";
21
- import "clsx";
22
- import "tailwind-merge";
23
- import "sonner";
24
- import "@gearbox-protocol/sdk/common-utils";
25
- import "luxon";
26
- import "../../../utils/z-index.js";
27
18
  import "../../tip-card/tip-card.js";
28
19
  import "../../vertical-indicator/vertical-indicator.js";
29
20
  import "../../vertical-list/vertical-list.js";
21
+ import "clsx";
22
+ import "tailwind-merge";
30
23
  import "../../help-tip/help-tip.js";
31
24
  import "./components/feature/feature.styles.js";
32
25
  import "../../points-icon/points-icon.js";
33
- function m(e, i, r) {
34
- const a = e?.header ?? /* @__PURE__ */ t(
35
- n,
26
+ import { rewardsCellDataFromLegacy as N } from "./types/rewards-cell.js";
27
+ function n(e, i, a) {
28
+ const t = e?.header ?? /* @__PURE__ */ r(
29
+ m,
36
30
  {
37
31
  messageId: e?.headerMessageId ?? i
38
32
  }
39
33
  );
40
- let d;
34
+ let l;
41
35
  if (e?.headerTip !== null) {
42
- const s = e?.headerTipMessageId ?? r;
43
- d = e?.headerTip ?? (s && /* @__PURE__ */ t(n, { messageId: s }));
36
+ const d = e?.headerTipMessageId ?? a;
37
+ l = e?.headerTip ?? (d && /* @__PURE__ */ r(m, { messageId: d }));
44
38
  }
45
- return { header: a, headerTip: d, mobileTitle: e?.mobileTitle ?? a };
39
+ return { header: t, headerTip: l, mobileTitle: e?.mobileTitle ?? t };
46
40
  }
47
- function S({ ctx: e }) {
48
- const { strategy: i, targetToken: r, row: a } = e, d = !!a.disabledStyle, s = !!i.strategyMarketType?.includes("rwa"), l = e.isMobile || e.isDesktop ? 38 : 26;
49
- return /* @__PURE__ */ t("div", { className: "flex flex-col-auto", children: /* @__PURE__ */ o(v, { children: [
50
- /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 pr-2 leading-none", children: [
51
- /* @__PURE__ */ t(g, { disabled: d, children: /* @__PURE__ */ t(
52
- u,
41
+ function F({ ctx: e }) {
42
+ const { strategy: i, targetToken: a, row: t } = e, l = !!t.disabledStyle, d = !!i.strategyMarketType?.includes("rwa"), o = e.isMobile || e.isDesktop ? 38 : 26;
43
+ return /* @__PURE__ */ r("div", { className: "flex flex-col-auto", children: /* @__PURE__ */ s(C, { children: [
44
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 pr-2 leading-none", children: [
45
+ /* @__PURE__ */ r(h, { disabled: l, children: /* @__PURE__ */ r(
46
+ w,
53
47
  {
54
48
  network: i.network,
55
49
  isTest: !1,
@@ -57,65 +51,40 @@ function S({ ctx: e }) {
57
51
  showTooltip: !0
58
52
  }
59
53
  ) }),
60
- /* @__PURE__ */ t(g, { disabled: d, children: /* @__PURE__ */ t(b, { token: r, size: 24 }) })
54
+ /* @__PURE__ */ r(h, { disabled: l, children: /* @__PURE__ */ r(b, { token: a, size: 24 }) })
61
55
  ] }),
62
- /* @__PURE__ */ o("div", { className: "flex items-center gap-x-2", children: [
63
- /* @__PURE__ */ t(w, { maxLength: l, children: i.name }),
64
- s && /* @__PURE__ */ t(T, { disabledStyle: d }),
65
- a.isZeroSlippagePair && /* @__PURE__ */ t(
66
- R,
56
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-x-2", children: [
57
+ /* @__PURE__ */ r(T, { maxLength: o, children: i.name }),
58
+ d && /* @__PURE__ */ r(v, { disabledStyle: l }),
59
+ t.isZeroSlippagePair && /* @__PURE__ */ r(
60
+ S,
67
61
  {
68
- token: a.zeroSlippageToken,
69
- disabledStyle: d
62
+ token: t.zeroSlippageToken,
63
+ disabledStyle: l
70
64
  }
71
65
  )
72
66
  ] }),
73
- d && /* @__PURE__ */ t("div", {}),
74
- d && /* @__PURE__ */ t(
67
+ l && /* @__PURE__ */ r("div", {}),
68
+ l && /* @__PURE__ */ r(
75
69
  y,
76
70
  {
77
71
  as: "span",
78
72
  variant: "caption",
79
73
  style: { lineHeight: "100%" },
80
- children: /* @__PURE__ */ t(n, { messageId: "components.strategiesTable.line.name.disabled" })
74
+ children: /* @__PURE__ */ r(m, { messageId: "components.strategiesTable.line.name.disabled" })
81
75
  }
82
76
  )
83
77
  ] }) });
84
78
  }
85
- function h({
79
+ function g({
86
80
  ctx: e,
87
81
  mobile: i = !1
88
82
  }) {
89
- const { rewardsCellInfo: r, row: a, targetTokenAddress: d, tokensList: s } = e, l = !!a.disabledStyle, c = /* @__PURE__ */ t(
90
- k,
91
- {
92
- maxAPY: r.maxAPY,
93
- bonusAPY: r.bonusAPY,
94
- rewards: r.rewards,
95
- rewardRates: r.rewardRates,
96
- debtRewards: r.debtRewards,
97
- debtRewardRates: r.debtRewardRates,
98
- hasAPY: r.hasAPY ?? !1,
99
- hasRewards: r.hasRewards ?? !1,
100
- hasDebtRewards: r.hasDebtRewards ?? !1,
101
- apyLoading: r.apyLoading,
102
- disabledStyle: l
103
- }
104
- ), p = i ? /* @__PURE__ */ t("div", { className: "pt-1", children: c }) : c;
105
- return l ? p : /* @__PURE__ */ t(
106
- x,
107
- {
108
- cellInfo: r,
109
- targetToken: d,
110
- apyListByNetwork: a.apyListByNetwork,
111
- tokensList: s,
112
- strategyCreditManagers: a.strategyCreditManagers,
113
- children: /* @__PURE__ */ t("div", { children: p })
114
- }
115
- );
83
+ const { rewardsCell: a, rewardsCellInfo: t, rewardsTooltip: l, row: d } = e, o = !!d.disabledStyle, u = a ?? (t ? N(t) : { pointGroups: [] }), c = /* @__PURE__ */ r(x, { data: u, disabledStyle: o }), p = i ? /* @__PURE__ */ r("div", { className: "pt-1", children: c }) : c;
84
+ return o ? p : /* @__PURE__ */ r(k, { ...l, children: /* @__PURE__ */ r("div", { children: p }) });
116
85
  }
117
- function ie(e) {
118
- const { header: i, mobileTitle: r } = m(
86
+ function ee(e) {
87
+ const { header: i, mobileTitle: a } = n(
119
88
  e,
120
89
  "components.strategiesTable.head.name"
121
90
  );
@@ -127,12 +96,12 @@ function ie(e) {
127
96
  align: "left",
128
97
  className: "pl-4",
129
98
  sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "strategyName", defaultDirection: "desc" },
130
- cell: (a) => /* @__PURE__ */ t(S, { ctx: a }),
131
- mobileTitle: r
99
+ cell: (t) => /* @__PURE__ */ r(F, { ctx: t }),
100
+ mobileTitle: a
132
101
  };
133
102
  }
134
- function de(e) {
135
- const { header: i, mobileTitle: r } = m(
103
+ function re(e) {
104
+ const { header: i, mobileTitle: a } = n(
136
105
  e,
137
106
  "components.strategiesTable.head.rewards"
138
107
  );
@@ -143,13 +112,13 @@ function de(e) {
143
112
  mediumWidth: e?.mediumWidth ?? "270px",
144
113
  align: "left",
145
114
  sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "apy", defaultDirection: "desc" },
146
- cell: (a) => /* @__PURE__ */ t(h, { ctx: a }),
147
- mobileCell: (a) => /* @__PURE__ */ t(h, { ctx: a, mobile: !0 }),
148
- mobileTitle: r
115
+ cell: (t) => /* @__PURE__ */ r(g, { ctx: t }),
116
+ mobileCell: (t) => /* @__PURE__ */ r(g, { ctx: t, mobile: !0 }),
117
+ mobileTitle: a
149
118
  };
150
119
  }
151
- function se(e) {
152
- const { header: i, mobileTitle: r } = m(
120
+ function te(e) {
121
+ const { header: i, mobileTitle: a } = n(
153
122
  e,
154
123
  "components.strategiesTable.head.leverage"
155
124
  );
@@ -161,16 +130,16 @@ function se(e) {
161
130
  align: "right",
162
131
  className: "pr-4",
163
132
  headerClassName: "pr-4",
164
- cell: (a) => `×${f(Number(a.row.maxLeverage), 0)}`,
165
- mobileTitle: r
133
+ cell: (t) => `×${f(Number(t.row.maxLeverage), 0)}`,
134
+ mobileTitle: a
166
135
  };
167
136
  }
168
- function le(e) {
137
+ function ie(e) {
169
138
  return e;
170
139
  }
171
140
  export {
172
- le as customStrategyColumn,
173
- ie as strategyColumn,
174
- se as strategyLeverageColumn,
175
- de as strategyRewardsColumn
141
+ ie as customStrategyColumn,
142
+ ee as strategyColumn,
143
+ te as strategyLeverageColumn,
144
+ re as strategyRewardsColumn
176
145
  };
@@ -1,36 +1,37 @@
1
- import { jsx as e, Fragment as N, jsxs as x } from "react/jsx-runtime";
2
- import { formatPercentage as c } from "@gearbox-protocol/sdk";
3
- import { RWA_GRADIENT_BORDER_CLASS as S } from "../../../../rwa-styles/index.js";
4
- import { Skeleton as P } from "../../../../skeleton/skeleton.js";
1
+ import { jsx as e, Fragment as P, jsxs as f } from "react/jsx-runtime";
2
+ import { formatPercentage as m } from "@gearbox-protocol/sdk";
3
+ import { RWA_GRADIENT_BORDER_CLASS as T } from "../../../../rwa-styles/index.js";
4
+ import { Skeleton as A } from "../../../../skeleton/skeleton.js";
5
5
  import "react";
6
- import { cn as R } from "../../../../../utils/cn.js";
6
+ import { cn as x } from "../../../../../utils/cn.js";
7
7
  import "sonner";
8
8
  import "@gearbox-protocol/sdk/common-utils";
9
9
  import "luxon";
10
10
  import "../../../../../utils/z-index.js";
11
- import { SimpleTooltip as F } from "../../../../tooltip/simple-tooltip.js";
11
+ import { SimpleTooltip as v } from "../../../../tooltip/simple-tooltip.js";
12
12
  import "../../../../tooltip/tooltip.js";
13
- import { FormattedMessageTyped as m } from "../../../../typed-intl/index.js";
14
- import { APYFeature as b } from "../apy-feature/apy-feature.js";
15
- import { PointsFeature as T } from "../points-feature/points-feature.js";
16
- import { Plus as v, DisabledWrap as L } from "./cells.styles.js";
13
+ import { FormattedMessageTyped as u } from "../../../../typed-intl/index.js";
14
+ import { rewardsCellDataFromLegacy as L } from "../../types/rewards-cell.js";
15
+ import { APYFeature as g } from "../apy-feature/apy-feature.js";
16
+ import { PointsFeature as F } from "../points-feature/points-feature.js";
17
+ import { Plus as h, DisabledWrap as N } from "./cells.styles.js";
17
18
  function K({
18
- token: i,
19
- disabledStyle: r
19
+ token: r,
20
+ disabledStyle: n
20
21
  }) {
21
- const n = () => /* @__PURE__ */ e("span", { className: R(r && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(m, { messageId: "components.strategiesTable.line.0slippage" }) }) });
22
- return /* @__PURE__ */ e(N, { children: r ? n() : /* @__PURE__ */ e(
23
- F,
22
+ const t = r && "symbol" in r && r.symbol || r && "title" in r && r.title || "", o = () => /* @__PURE__ */ e("span", { className: x(n && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(u, { messageId: "components.strategiesTable.line.0slippage" }) }) });
23
+ return /* @__PURE__ */ e(P, { children: n ? o() : /* @__PURE__ */ e(
24
+ v,
24
25
  {
25
26
  placement: "top",
26
27
  triangle: !1,
27
- title: n(),
28
+ title: o(),
28
29
  children: /* @__PURE__ */ e(
29
- m,
30
+ u,
30
31
  {
31
32
  messageId: "components.strategiesTable.line.0slippage.tip",
32
33
  values: {
33
- symbol: i?.title || ""
34
+ symbol: t
34
35
  }
35
36
  }
36
37
  )
@@ -38,134 +39,173 @@ function K({
38
39
  ) });
39
40
  }
40
41
  function Q({
41
- disabledStyle: i,
42
- tooltip: r = /* @__PURE__ */ e(m, { messageId: "components.strategiesTable.line.rwa.tip" })
42
+ disabledStyle: r,
43
+ tooltip: n = /* @__PURE__ */ e(u, { messageId: "components.strategiesTable.line.rwa.tip" })
43
44
  }) {
44
- const n = /* @__PURE__ */ e(
45
+ const t = /* @__PURE__ */ e(
45
46
  "span",
46
47
  {
47
- className: R(
48
+ className: x(
48
49
  "rounded-xl px-[6px] py-1 text-xs leading-none",
49
- S,
50
- i && "opacity-60 pointer-events-none"
50
+ T,
51
+ r && "opacity-60 pointer-events-none"
51
52
  ),
52
- children: /* @__PURE__ */ e(m, { messageId: "components.strategiesTable.line.rwa" })
53
+ children: /* @__PURE__ */ e(u, { messageId: "components.strategiesTable.line.rwa" })
53
54
  }
54
55
  );
55
- return /* @__PURE__ */ e(N, { children: i ? n : /* @__PURE__ */ e(F, { placement: "top", triangle: !1, title: n, children: r }) });
56
+ return /* @__PURE__ */ e(P, { children: r ? t : /* @__PURE__ */ e(v, { placement: "top", triangle: !1, title: t, children: n }) });
56
57
  }
57
- function U({
58
- maxAPY: i,
59
- bonusAPY: r,
60
- rewards: n,
61
- rewardRates: d,
62
- debtRewards: u,
63
- debtRewardRates: f,
64
- hasAPY: a,
65
- hasRewards: s,
66
- hasDebtRewards: g,
67
- disabledStyle: p,
68
- apyLoading: h,
58
+ function Y({
59
+ data: r,
60
+ disabledStyle: n,
69
61
  apyFormat: t = "feature"
70
62
  }) {
71
- const o = (l) => t === "feature" ? /* @__PURE__ */ x(b, { children: [
72
- c(l),
63
+ const { maxApy: o, bonusApy: p, pointGroups: s, apyLoading: l = !1 } = r, c = (a) => t === "feature" ? /* @__PURE__ */ f(g, { children: [
64
+ m(a),
73
65
  "% APR"
74
- ] }) : `${c(l)}%`, I = (l) => t === "feature" ? /* @__PURE__ */ x(b, { children: [
66
+ ] }) : `${m(a)}%`, i = (a) => t === "feature" ? /* @__PURE__ */ f(g, { children: [
75
67
  "exp. ",
76
- c(l),
68
+ m(a),
77
69
  "% APR"
78
- ] }) : `exp. ${c(l)}%`;
79
- return /* @__PURE__ */ x("div", { className: "flex-row-row items-center gap-2", children: [
70
+ ] }) : `exp. ${m(a)}%`, d = s.some((a) => a.length > 0);
71
+ return /* @__PURE__ */ f("div", { className: "flex-row-row items-center gap-2", children: [
80
72
  (() => {
81
- const l = [
82
- a ? /* @__PURE__ */ e(
83
- P,
73
+ const a = [
74
+ o !== void 0 ? /* @__PURE__ */ e(
75
+ A,
84
76
  {
85
77
  className: "inline-block align-text-bottom",
86
78
  width: 50,
87
- loading: h,
88
- children: o(i)
79
+ loading: l,
80
+ children: c(o)
89
81
  },
90
82
  "apy"
91
83
  ) : void 0,
92
- s || g ? /* @__PURE__ */ e(
93
- j,
84
+ d ? /* @__PURE__ */ e(
85
+ R,
94
86
  {
95
- rewards: n,
96
- rewardRates: d,
97
- debtRewards: u,
98
- debtRewardRates: f,
99
- hasRewards: s,
100
- hasDebtRewards: g,
101
- disabledStyle: p
87
+ pointGroups: s,
88
+ disabledStyle: n
102
89
  },
103
90
  "points"
104
91
  ) : void 0
105
92
  ].filter(Boolean);
106
- return l.flatMap((w, A) => A === l.length - 1 ? [w] : [w, /* @__PURE__ */ e(v, { children: "+" }, `plus-${A}`)]);
93
+ return a.flatMap((b, w) => w === a.length - 1 ? [b] : [b, /* @__PURE__ */ e(h, { children: "+" }, `plus-${w}`)]);
107
94
  })(),
108
- r && /* @__PURE__ */ e(v, { children: ":" }),
109
- r && /* @__PURE__ */ e(
110
- P,
95
+ p !== void 0 && /* @__PURE__ */ e(h, { children: ":" }),
96
+ p !== void 0 && /* @__PURE__ */ e(
97
+ A,
111
98
  {
112
99
  className: "inline-block align-text-bottom",
113
- loading: h,
100
+ loading: l,
114
101
  width: 50,
115
- children: I(r.value)
102
+ children: i(p)
116
103
  }
117
104
  )
118
105
  ] });
119
106
  }
120
- function j({
121
- rewards: i,
122
- rewardRates: r,
123
- debtRewards: n,
124
- debtRewardRates: d,
125
- hasRewards: u,
126
- hasDebtRewards: f,
127
- disabledStyle: a,
128
- theme: s
107
+ function U({
108
+ maxAPY: r,
109
+ bonusAPY: n,
110
+ rewards: t,
111
+ rewardRates: o,
112
+ debtRewards: p,
113
+ debtRewardRates: s,
114
+ hasAPY: l,
115
+ hasRewards: c,
116
+ hasDebtRewards: i,
117
+ disabledStyle: d,
118
+ apyLoading: y,
119
+ apyFormat: a = "feature"
129
120
  }) {
130
- return (() => {
131
- const p = [
132
- u ? i.map((t, o) => /* @__PURE__ */ e(
133
- "span",
134
- {
135
- children: /* @__PURE__ */ e(L, { disabled: a, children: /* @__PURE__ */ e(
136
- T,
137
- {
138
- reward: t,
139
- points: r?.[o] || 0n,
140
- theme: s
141
- }
142
- ) })
143
- },
144
- ["base", t.multiplier, t.name, t.type, t.units].join("-")
145
- )) : void 0,
146
- f ? n.map((t, o) => /* @__PURE__ */ e(
147
- "span",
148
- {
149
- children: /* @__PURE__ */ e(L, { disabled: a, children: /* @__PURE__ */ e(
150
- T,
151
- {
152
- reward: t,
153
- points: d?.[o] || 0n,
154
- theme: s
155
- }
156
- ) })
157
- },
158
- ["debt", t.multiplier, t.name, t.type, t.units, t.cm].join(
159
- "-"
160
- )
161
- )) : void 0
162
- ].filter(Boolean);
163
- return p.flatMap((t, o) => o === p.length - 1 ? [t] : [t, /* @__PURE__ */ e(v, { children: "+" }, `plus-points-${o}`)]);
164
- })();
121
+ return /* @__PURE__ */ e(
122
+ Y,
123
+ {
124
+ data: L({
125
+ maxAPY: r,
126
+ bonusAPY: n,
127
+ rewards: t,
128
+ rewardRates: o,
129
+ debtRewards: p,
130
+ debtRewardRates: s,
131
+ hasAPY: l,
132
+ hasRewards: c,
133
+ hasDebtRewards: i,
134
+ apyLoading: y
135
+ }),
136
+ disabledStyle: d,
137
+ apyFormat: a
138
+ }
139
+ );
140
+ }
141
+ function R({
142
+ pointGroups: r,
143
+ disabledStyle: n,
144
+ theme: t
145
+ }) {
146
+ const o = r.filter((s) => s.length > 0);
147
+ return o.flatMap((s, l) => {
148
+ const c = s.map((i, d) => /* @__PURE__ */ e(
149
+ "span",
150
+ {
151
+ children: /* @__PURE__ */ e(N, { disabled: n, children: /* @__PURE__ */ e(
152
+ F,
153
+ {
154
+ reward: i.reward,
155
+ points: i.rate,
156
+ theme: t
157
+ }
158
+ ) })
159
+ },
160
+ [
161
+ "points",
162
+ l,
163
+ d,
164
+ i.reward.type,
165
+ i.reward.name,
166
+ i.reward.units ?? "",
167
+ String(i.rate)
168
+ ].join("-")
169
+ ));
170
+ return l === o.length - 1 ? c : [...c, /* @__PURE__ */ e(h, { children: "+" }, `plus-points-${l}`)];
171
+ });
172
+ }
173
+ function V({
174
+ rewards: r,
175
+ rewardRates: n,
176
+ debtRewards: t,
177
+ debtRewardRates: o,
178
+ hasRewards: p,
179
+ hasDebtRewards: s,
180
+ disabledStyle: l,
181
+ theme: c
182
+ }) {
183
+ const { pointGroups: i } = L({
184
+ maxAPY: 0,
185
+ bonusAPY: void 0,
186
+ rewards: r,
187
+ rewardRates: n,
188
+ debtRewards: t,
189
+ debtRewardRates: o,
190
+ hasAPY: !1,
191
+ hasRewards: p,
192
+ hasDebtRewards: s,
193
+ apyLoading: !1
194
+ });
195
+ return /* @__PURE__ */ e(
196
+ R,
197
+ {
198
+ pointGroups: i,
199
+ disabledStyle: l,
200
+ theme: c
201
+ }
202
+ );
165
203
  }
166
204
  export {
167
205
  Q as RWAFeature,
168
- U as StrategiesRewardsCell,
169
- j as StrategyPoints,
206
+ Y as StrategiesRewardsCell,
207
+ U as StrategiesRewardsCellLegacy,
208
+ R as StrategyPoints,
209
+ V as StrategyPointsLegacy,
170
210
  K as ZeroSlippageFeature
171
211
  };
@@ -1,11 +1,13 @@
1
- import { RWAFeature as t, StrategiesRewardsCell as a, StrategyPoints as i, ZeroSlippageFeature as l } from "./cells.js";
2
- import { DisabledWrap as p, Plus as s, TitleGrid as d } from "./cells.styles.js";
1
+ import { RWAFeature as t, StrategiesRewardsCell as a, StrategiesRewardsCellLegacy as i, StrategyPoints as l, StrategyPointsLegacy as s, ZeroSlippageFeature as g } from "./cells.js";
2
+ import { DisabledWrap as p, Plus as S, TitleGrid as d } from "./cells.styles.js";
3
3
  export {
4
4
  p as DisabledWrap,
5
- s as Plus,
5
+ S as Plus,
6
6
  t as RWAFeature,
7
7
  a as StrategiesRewardsCell,
8
- i as StrategyPoints,
8
+ i as StrategiesRewardsCellLegacy,
9
+ l as StrategyPoints,
10
+ s as StrategyPointsLegacy,
9
11
  d as TitleGrid,
10
- l as ZeroSlippageFeature
12
+ g as ZeroSlippageFeature
11
13
  };
@@ -1,35 +1,37 @@
1
- import { APYFeature as r, APYFeatureTooltip as t } from "./apy-feature/apy-feature.js";
2
- import { RWAFeature as p, StrategiesRewardsCell as i, StrategyPoints as l, ZeroSlippageFeature as s } from "./cells/cells.js";
3
- import { DisabledWrap as m, Plus as x, TitleGrid as u } from "./cells/cells.styles.js";
4
- import { Feature as d } from "./feature/feature.js";
5
- import { FeatureRoot as R } from "./feature/feature.styles.js";
6
- import { StrategiesTableNotFoundLine as w } from "./not-found-line.js";
7
- import { PointsFeature as g, PointsFeatureTooltip as S, PointsLabel as b } from "./points-feature/points-feature.js";
8
- import { RewardsTooltip as C, RewardsTooltipHover as L } from "./rewards-tooltip/rewards-tooltip.js";
1
+ import { APYFeature as t, APYFeatureTooltip as r } from "./apy-feature/apy-feature.js";
2
+ import { RWAFeature as i, StrategiesRewardsCell as p, StrategiesRewardsCellLegacy as l, StrategyPoints as s, StrategyPointsLegacy as f, ZeroSlippageFeature as m } from "./cells/cells.js";
3
+ import { DisabledWrap as d, Plus as u, TitleGrid as R } from "./cells/cells.styles.js";
4
+ import { Feature as g } from "./feature/feature.js";
5
+ import { FeatureRoot as F } from "./feature/feature.styles.js";
6
+ import { StrategiesTableNotFoundLine as P } from "./not-found-line.js";
7
+ import { PointsFeature as b, PointsFeatureTooltip as y, PointsLabel as L } from "./points-feature/points-feature.js";
8
+ import { RewardsTooltip as C, RewardsTooltipHover as c } from "./rewards-tooltip/rewards-tooltip.js";
9
9
  import { RewardsTooltipRoot as Y } from "./rewards-tooltip/rewards-tooltip-root.js";
10
- import { RewardsTooltipView as y } from "./rewards-tooltip/rewards-tooltip-view.js";
11
- import { RewardsTooltipContent as G } from "./rewards-tooltip/tooltip-content.js";
12
- import { StrategiesTable as N } from "./strategies-table.js";
10
+ import { RewardsTooltipView as D } from "./rewards-tooltip/rewards-tooltip-view.js";
11
+ import { RewardsTooltipContent as H } from "./rewards-tooltip/tooltip-content.js";
12
+ import { StrategiesTable as V } from "./strategies-table.js";
13
13
  export {
14
- r as APYFeature,
15
- t as APYFeatureTooltip,
16
- m as DisabledWrap,
17
- d as Feature,
18
- R as FeatureRoot,
19
- x as Plus,
20
- g as PointsFeature,
21
- S as PointsFeatureTooltip,
22
- b as PointsLabel,
23
- p as RWAFeature,
14
+ t as APYFeature,
15
+ r as APYFeatureTooltip,
16
+ d as DisabledWrap,
17
+ g as Feature,
18
+ F as FeatureRoot,
19
+ u as Plus,
20
+ b as PointsFeature,
21
+ y as PointsFeatureTooltip,
22
+ L as PointsLabel,
23
+ i as RWAFeature,
24
24
  C as RewardsTooltip,
25
- G as RewardsTooltipContent,
26
- L as RewardsTooltipHover,
25
+ H as RewardsTooltipContent,
26
+ c as RewardsTooltipHover,
27
27
  Y as RewardsTooltipRoot,
28
- y as RewardsTooltipView,
29
- i as StrategiesRewardsCell,
30
- N as StrategiesTable,
31
- w as StrategiesTableNotFoundLine,
32
- l as StrategyPoints,
33
- u as TitleGrid,
34
- s as ZeroSlippageFeature
28
+ D as RewardsTooltipView,
29
+ p as StrategiesRewardsCell,
30
+ l as StrategiesRewardsCellLegacy,
31
+ V as StrategiesTable,
32
+ P as StrategiesTableNotFoundLine,
33
+ s as StrategyPoints,
34
+ f as StrategyPointsLegacy,
35
+ R as TitleGrid,
36
+ m as ZeroSlippageFeature
35
37
  };