@gearbox-protocol/ui-kit 3.14.0-next.65 → 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 (141) 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/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -1
  25. package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.cjs +1 -1
  26. package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.cjs +1 -1
  27. package/dist/cjs/components/compound-apy/compound-apy-legacy.cjs +1 -0
  28. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  29. package/dist/cjs/components/compound-apy/index.cjs +1 -1
  30. package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
  31. package/dist/cjs/components/index.cjs +1 -1
  32. package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
  33. package/dist/cjs/components/pool-apy-tooltip/apy-tooltip.cjs +1 -0
  34. package/dist/cjs/components/pool-apy-tooltip/index.cjs +1 -1
  35. package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
  36. package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
  37. package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
  38. package/dist/cjs/components/token-symbol/index.cjs +1 -1
  39. package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
  40. package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
  41. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  42. package/dist/cjs/components/yield-breakdown-tooltip/index.cjs +1 -0
  43. package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -0
  44. package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
  45. package/dist/cjs/hooks/use-media-query.cjs +1 -1
  46. package/dist/cjs/index.cjs +1 -1
  47. package/dist/cjs/locale/en.json.cjs +1 -1
  48. package/dist/cjs/types/common.cjs +1 -1
  49. package/dist/cjs/utils/apy-breakdown.cjs +1 -0
  50. package/dist/cjs/utils/bps.cjs +1 -0
  51. package/dist/cjs/utils/index.cjs +1 -1
  52. package/dist/cjs/utils/token-icon-source.cjs +1 -0
  53. package/dist/esm/components/assets-list-cell/assets-list-cell.js +132 -206
  54. package/dist/esm/components/block-sync/block-sync.js +5 -4
  55. package/dist/esm/components/block-sync-pill/block-sync-pill.js +5 -4
  56. package/dist/esm/components/breakpoint-provider.js +67 -0
  57. package/dist/esm/components/checkbox/checkbox-labeled.js +3 -2
  58. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +3 -2
  59. package/dist/esm/components/complex-input/complex-input.js +5 -4
  60. package/dist/esm/components/composites/index.js +86 -81
  61. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +3 -2
  62. package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.js +3 -2
  63. package/dist/esm/components/composites/pool-table/columns.js +61 -60
  64. package/dist/esm/components/composites/strategies-table/columns.js +55 -86
  65. package/dist/esm/components/composites/strategies-table/components/cells/cells.js +150 -110
  66. package/dist/esm/components/composites/strategies-table/components/cells/index.js +7 -5
  67. package/dist/esm/components/composites/strategies-table/components/index.js +32 -30
  68. package/dist/esm/components/composites/strategies-table/components/points-feature/points-feature.js +35 -32
  69. package/dist/esm/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.js +91 -224
  70. package/dist/esm/components/composites/strategies-table/components/strategies-table.js +26 -24
  71. package/dist/esm/components/composites/strategies-table/index.js +36 -31
  72. package/dist/esm/components/composites/strategies-table/types/index.js +5 -1
  73. package/dist/esm/components/composites/strategies-table/types/rewards-cell.js +40 -0
  74. package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +32 -189
  75. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +5 -4
  76. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +26 -26
  77. package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.js +40 -38
  78. package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.js +53 -47
  79. package/dist/esm/components/compound-apy/compound-apy-legacy.js +127 -0
  80. package/dist/esm/components/compound-apy/compound-apy.js +56 -245
  81. package/dist/esm/components/compound-apy/index.js +4 -2
  82. package/dist/esm/components/detailed-page-title/detailed-page-title.js +25 -180
  83. package/dist/esm/components/index.js +805 -787
  84. package/dist/esm/components/markdown-viewer/markdown-viewer.js +5 -4
  85. package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +155 -0
  86. package/dist/esm/components/pool-apy-tooltip/index.js +4 -2
  87. package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +3 -3
  88. package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +3 -2
  89. package/dist/esm/components/token-icon/token-icon.js +72 -58
  90. package/dist/esm/components/token-symbol/index.js +2 -3
  91. package/dist/esm/components/token-symbol/token-symbol.js +41 -62
  92. package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +35 -192
  93. package/dist/esm/components/with-copy/with-copy.js +5 -4
  94. package/dist/esm/components/yield-breakdown-tooltip/index.js +4 -0
  95. package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +222 -0
  96. package/dist/esm/hooks/use-debounce-call.js +3 -2
  97. package/dist/esm/hooks/use-media-query.js +49 -16
  98. package/dist/esm/index.js +974 -946
  99. package/dist/esm/locale/en.json.js +9 -2
  100. package/dist/esm/types/common.js +1 -6
  101. package/dist/esm/utils/apy-breakdown.js +18 -0
  102. package/dist/esm/utils/bps.js +4 -0
  103. package/dist/esm/utils/index.js +105 -95
  104. package/dist/esm/utils/token-icon-source.js +48 -0
  105. package/dist/globals.css +1 -1
  106. package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +44 -4
  107. package/dist/types/components/breakpoint-provider.d.ts +56 -0
  108. package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +1 -1
  109. package/dist/types/components/composites/strategies-table/components/cells/cells.d.ts +34 -3
  110. package/dist/types/components/composites/strategies-table/components/points-feature/points-feature.d.ts +14 -10
  111. package/dist/types/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.d.ts +10 -13
  112. package/dist/types/components/composites/strategies-table/index.d.ts +1 -1
  113. package/dist/types/components/composites/strategies-table/types/index.d.ts +1 -0
  114. package/dist/types/components/composites/strategies-table/types/rewards-cell.d.ts +48 -0
  115. package/dist/types/components/composites/strategies-table/types/rewards-tooltip.d.ts +37 -32
  116. package/dist/types/components/composites/strategies-table/types/table.d.ts +27 -12
  117. package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +3 -3
  118. package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.d.ts +4 -0
  119. package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.d.ts +5 -0
  120. package/dist/types/components/compound-apy/compound-apy-legacy.d.ts +109 -0
  121. package/dist/types/components/compound-apy/compound-apy.d.ts +18 -94
  122. package/dist/types/components/compound-apy/index.d.ts +1 -0
  123. package/dist/types/components/index.d.ts +3 -1
  124. package/dist/types/components/points-icon/index.d.ts +1 -1
  125. package/dist/types/components/points-icon/points-icon.d.ts +13 -2
  126. package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +20 -0
  127. package/dist/types/components/pool-apy-tooltip/index.d.ts +1 -0
  128. package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +18 -1
  129. package/dist/types/components/token-icon/token-icon.d.ts +11 -2
  130. package/dist/types/components/token-symbol/token-symbol.d.ts +4 -4
  131. package/dist/types/components/yield-breakdown-tooltip/index.d.ts +1 -0
  132. package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +32 -0
  133. package/dist/types/hooks/use-media-query.d.ts +5 -1
  134. package/dist/types/index.d.ts +2 -0
  135. package/dist/types/locale/en.json.d.ts +10 -2
  136. package/dist/types/types/common.d.ts +5 -11
  137. package/dist/types/utils/apy-breakdown.d.ts +18 -0
  138. package/dist/types/utils/bps.d.ts +3 -0
  139. package/dist/types/utils/index.d.ts +3 -0
  140. package/dist/types/utils/token-icon-source.d.ts +28 -0
  141. package/package.json +2 -2
@@ -1,217 +1,60 @@
1
- import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
- import * as M from "react";
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import * as O from "react";
3
3
  import { TokenIcon as z } from "../token-icon/token-icon.js";
4
4
  import "../tooltip/simple-tooltip.js";
5
- import { TooltipProvider as y, Tooltip as T, TooltipTrigger as k, TooltipContent as b } from "../tooltip/tooltip.js";
5
+ import { TooltipProvider as T, Tooltip as k, TooltipTrigger as y, TooltipContent as v } from "../tooltip/tooltip.js";
6
6
  import "@gearbox-protocol/sdk";
7
- import { cn as v } from "../../utils/cn.js";
7
+ import { cn as w } from "../../utils/cn.js";
8
8
  import "sonner";
9
9
  import "@gearbox-protocol/sdk/common-utils";
10
10
  import "luxon";
11
11
  import "../../utils/z-index.js";
12
- import "../accordion/accordion.js";
13
- import "@gearbox-protocol/static";
14
- import "@fortawesome/free-solid-svg-icons";
15
- import "../icons/fa-icon.js";
16
- import "../alert-badge/alert-badge.js";
17
- import "../alert-dialog/alert-dialog.js";
18
- import "../alert-modal/alert-modal.js";
19
- import "react-intl";
20
- import "../arc-loader/arc-loader.js";
21
- import "../asset-line/asset-line.js";
22
- import "../buttons/back-button/back-button.js";
23
- import "../buttons/button/button.js";
24
- import "../buttons/copy-button/copy-button.js";
25
- import "../buttons/external-button/external-button.js";
26
- import "../buttons/filter-button/filter-button.js";
27
- import "../buttons/navigation-button/navigation-button.js";
28
- import "../buttons/tab-button/tab-button.js";
29
- import "wagmi";
30
- import "../auth/wallet-ui-context.js";
31
- import "../avatar/avatar.js";
32
- import "../badge/badge.js";
33
- import "../base-link/base-link.js";
34
- import "../navigation-context/navigation-context.js";
35
- import "../button-checkbox/button-checkbox.js";
36
- import "../card-grid/card-grid.js";
37
- import "../cards/card/card.js";
38
- import "../carousel/carousel.js";
39
- import "../checkbox/checkbox.js";
40
- import "../checkbox/checkbox-labeled.js";
41
- import "../checkbox-item/checkbox-item.js";
42
- import "../client-adapters/styled-button/styled-button.js";
43
- import "../client-adapters/styled-dialog-container/styled-dialog-container.js";
44
- import "../client-adapters/styled-rounded-image/styled-rounded-image.js";
45
- import "../colored-text/colored-text.js";
46
- import "../input/input.js";
47
- import "../with-title/with-title.js";
48
- import "../smart-number-input/balance-indicator.js";
49
- import "../smart-number-input/smart-number-input.js";
50
- import "../composites/credit-account-history/credit-account-history.js";
51
- import "../simple-dropdown/simple-dropdown.js";
52
- import "../simple-dropdown/simple-dropdown-menu-item.js";
53
- import "../typography/typography.js";
54
- import "../table/grid-table.js";
55
- import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
56
- import "../help-tip/help-tip.js";
57
- import "../description/description.js";
58
- import "../confirm-menu/confirm-menu.js";
59
- import "../dialog/dialog-modal-container.js";
60
- import "../text-button/text-button.js";
61
- import "../vertical-indicator/vertical-indicator.js";
62
- import "../points-icon/points-icon.js";
63
- import "../skeleton/skeleton.js";
64
- import "../vertical-list/vertical-list.js";
65
- import "../rounded-image/rounded-image.js";
66
- import "../progress/progress.js";
67
- import "../pool-indicator-icon/pool-indicator-icon.js";
68
- import "../composites/strategies-table/components/feature/feature.styles.js";
69
- import "viem";
70
- import "../icon-button/icon-button.js";
71
- import "../separate-line/separate-line.js";
72
- import "../tip-card/tip-card.js";
73
- import "../composites/strategies-table/components/rewards-tooltip/rewards-tooltip-root.js";
74
- import "../composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
75
- import "../composites/tx-preview/confirm/dialog/constants.js";
76
- import "../modal/modal.js";
77
- import "../dialog/dialog-container.js";
78
- import "../spinner-loader/spinner-loader.js";
79
- import "../currency-button/currency-button.js";
80
- import "../detailed-apy/detailed-apy.js";
81
- import "../detailed-page-title/detailed-page-title.js";
82
- import "../detailed-page-title/detailed-page-title-copy-button.js";
83
- import "../detailed-page-title/detailed-page-title-explorer-dropdown.js";
84
- import "@radix-ui/react-dialog";
85
- import "../dialog/dialog-content.js";
86
- import "../dialog/dialog-description.js";
87
- import "../dialog/dialog-footer.js";
88
- import "../dialog/dialog-header.js";
89
- import "../dialog/dialog-title.js";
90
- import "../dialog/dialog-overlay.js";
91
- import "../label/label.js";
92
- import "../dropdown-menu/dropdown-menu.js";
93
- import "../dropdown-menu/dropdown-menu-checkbox-item.js";
94
- import "../dropdown-menu/dropdown-menu-content.js";
95
- import "../dropdown-menu/dropdown-menu-item.js";
96
- import "../dropdown-menu/dropdown-menu-label.js";
97
- import "../dropdown-menu/dropdown-menu-radio-item.js";
98
- import "../dropdown-menu/dropdown-menu-separator.js";
99
- import "../dropdown-menu/dropdown-menu-shortcut.js";
100
- import "../dropdown-menu/dropdown-menu-sub-content.js";
101
- import "../dropdown-menu/dropdown-menu-sub-trigger.js";
102
- import "../edit-input/edit-input.js";
103
- import "../fadeout-loading/fadeout-loading.js";
104
- import "../filter/filter-block.js";
105
- import "../filter/filter-checkbox-item.js";
106
- import "../filter/filter-chip.js";
107
- import "../filter/filter-chips.js";
108
- import "../filter/filter-dropdown-item.js";
109
- import "../filter/filter-group.js";
110
- import "../filter/filter-label.js";
111
- import "../search-line/search-line.js";
112
- import "../tabs/tabs.js";
113
- import "../filter/filter-modal-item.js";
114
- import "../filter/filter-radio-item.js";
115
- import "../filter/filter-separator.js";
116
- import "../filter/variants.js";
117
- import "../graph/formatters.js";
118
- import "lightweight-charts";
119
- import "../graph/graph-view.js";
120
- import "../health-factor/health-factor.js";
121
- import "../horizontal-indicator/horizontal-indicator.js";
122
- import "../layout/app-footer/app-footer.js";
123
- import "../layout/app-header/app-header.js";
124
- import "../layout/col/col.js";
125
- import "../layout/container/container.js";
126
- import "../layout/footer/footer.js";
127
- import "../layout/grid/grid.js";
128
- import "../layout/header/header.js";
129
- import "../layout/layout/layout.js";
130
- import "../layout/main-aside-layout/main-aside-layout.js";
131
- import "../page-title/page-title.js";
132
- import "../layout/social-icons/social-icons.js";
133
- import "../legal-agreement/legal-agreement-theme.js";
134
- import "../link/link.js";
135
- import "../../utils/reactochart-compat.js";
136
- import "../status-elements/status-elements.js";
137
- import "../loader/loader.js";
138
- import "../loading/loading.js";
139
- import "../loading-bar/loading-bar.js";
140
- import "react-markdown";
141
- import "remark-gfm";
142
- import "../navbar/navbar.js";
143
- import "../navbar/navbar-indicator-context.js";
144
- import "../app-bar/app-bar.js";
145
- import "../navitem/navitem.js";
146
- import "../progress-bar/progress-bar.js";
147
- import "../radio-group/radio-group.js";
148
- import "../search-bar/search-bar.js";
149
- import "../segmented-control/segmented-control.js";
150
- import "../select/select.js";
151
- import "../separator/separator.js";
152
- import "../simple-accordion/simple-accordion.js";
153
- import "../slider/slider.js";
154
- import "../slider/slider-context.js";
155
- import "@radix-ui/react-slider";
156
- import "../spinner/spinner.js";
157
- import "../split-list/split-list.js";
158
- import "../stat-badge/stat-badge.js";
159
- import "../status-dot/status-dot.js";
160
- import "../stepper/stepper.js";
161
- import "../switch/switch.js";
162
- import "../table/table.js";
163
- import "../table/grid-table-loader.js";
164
- import "../textarea/textarea.js";
165
- import "../theme-provider.js";
166
- import "../time-to-liquidation/time-to-liquidation.js";
167
- import "../toggle/toggle.js";
168
- import "../with-filter-button/with-filter-button.js";
169
- function Fr({
12
+ function J({
170
13
  balances: a,
171
- tokensList: l,
172
- maxAssets: p = 3,
173
- iconSize: c = 24,
174
- options: w,
14
+ tokensList: d,
15
+ maxAssets: i = 3,
16
+ iconSize: h = 24,
17
+ options: b,
175
18
  className: C
176
19
  }) {
177
20
  const {
178
- mode: d = "default",
21
+ mode: m = "default",
179
22
  showIconTooltip: x = !0,
180
- otherTooltip: I,
23
+ otherTooltip: j,
181
24
  onOtherClick: u
182
- } = w || {}, [j, N, S, g] = M.useMemo(() => {
183
- const t = a, i = t.slice(0, p), r = t.slice(p), e = r.map((m) => {
184
- const h = typeof m == "string" ? m : m.token;
185
- return l[h]?.symbol || "unknown";
186
- }).join(", "), n = t.length > p;
187
- return [i, r, e, n];
188
- }, [a, p, l]), O = (t) => typeof t == "string" ? t : t.token, R = (t, i, r) => d === "cascade" ? {
189
- zIndex: r - i,
25
+ } = b || {}, [I, N, R, g] = O.useMemo(() => {
26
+ const t = a, n = t.slice(0, i), o = t.slice(i), s = o.map((r) => {
27
+ const p = typeof r == "string" ? r : r.token;
28
+ return d[p]?.symbol || "unknown";
29
+ }).join(", "), c = t.length > i;
30
+ return [n, o, s, c];
31
+ }, [a, i, d]), S = (t) => typeof t == "string" ? t : t.token, M = (t, n, o) => m === "cascade" ? {
32
+ zIndex: o - n,
190
33
  marginRight: t ? 0 : -12
191
34
  } : {
192
35
  marginRight: t ? 0 : 4
193
36
  };
194
- return /* @__PURE__ */ s("div", { className: v("relative inline-flex items-center", C), children: [
195
- j.map((t, i, r) => {
196
- const e = O(t), n = l[e], m = i === r.length - 1 && !g, h = R(m, i, r.length), f = /* @__PURE__ */ o(z, { symbol: P(n), size: c });
197
- return /* @__PURE__ */ o("div", { className: "relative", style: h, children: x ? /* @__PURE__ */ o(y, { children: /* @__PURE__ */ s(T, { children: [
198
- /* @__PURE__ */ o(k, { asChild: !0, children: /* @__PURE__ */ o("span", { className: "cursor-help", children: f }) }),
199
- /* @__PURE__ */ o(b, { children: n?.symbol || "Unknown" })
200
- ] }) }) : f }, e);
37
+ return /* @__PURE__ */ l("div", { className: w("relative inline-flex items-center", C), children: [
38
+ I.map((t, n, o) => {
39
+ const s = S(t), c = d[s], r = n === o.length - 1 && !g, p = M(r, n, o.length), f = /* @__PURE__ */ e(z, { token: c, size: h });
40
+ return /* @__PURE__ */ e("div", { className: "relative", style: p, children: x ? /* @__PURE__ */ e(T, { children: /* @__PURE__ */ l(k, { children: [
41
+ /* @__PURE__ */ e(y, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help", children: f }) }),
42
+ /* @__PURE__ */ e(v, { children: c?.symbol || "Unknown" })
43
+ ] }) }) : f }, s);
201
44
  }),
202
- g && /* @__PURE__ */ o(y, { children: /* @__PURE__ */ s(T, { children: [
203
- /* @__PURE__ */ o(k, { asChild: !0, children: /* @__PURE__ */ s(
45
+ g && /* @__PURE__ */ e(T, { children: /* @__PURE__ */ l(k, { children: [
46
+ /* @__PURE__ */ e(y, { asChild: !0, children: /* @__PURE__ */ l(
204
47
  "button",
205
48
  {
206
49
  type: "button",
207
- className: v(
50
+ className: w(
208
51
  "relative inline-flex items-center justify-center rounded-full bg-muted text-xs font-medium cursor-pointer hover:bg-muted/80 transition-colors",
209
- d === "cascade" && "z-0"
52
+ m === "cascade" && "z-0"
210
53
  ),
211
54
  style: {
212
- width: c,
213
- height: c,
214
- marginLeft: d === "cascade" ? -12 : 4
55
+ width: h,
56
+ height: h,
57
+ marginLeft: m === "cascade" ? -12 : 4
215
58
  },
216
59
  onClick: u ? (t) => {
217
60
  u(
@@ -224,10 +67,10 @@ function Fr({
224
67
  ]
225
68
  }
226
69
  ) }),
227
- /* @__PURE__ */ o(b, { children: I || S })
70
+ /* @__PURE__ */ e(v, { children: j || R })
228
71
  ] }) })
229
72
  ] });
230
73
  }
231
74
  export {
232
- Fr as TokensListCell
75
+ J as TokensListCell
233
76
  };
@@ -32,6 +32,7 @@ import "../avatar/avatar.js";
32
32
  import "../badge/badge.js";
33
33
  import "../base-link/base-link.js";
34
34
  import "../navigation-context/navigation-context.js";
35
+ import "../breakpoint-provider.js";
35
36
  import "../button-checkbox/button-checkbox.js";
36
37
  import "../card-grid/card-grid.js";
37
38
  import "../cards/card/card.js";
@@ -60,13 +61,12 @@ import "../dialog/dialog-modal-container.js";
60
61
  import "../text-button/text-button.js";
61
62
  import "../vertical-indicator/vertical-indicator.js";
62
63
  import "../points-icon/points-icon.js";
63
- import "../skeleton/skeleton.js";
64
64
  import "../vertical-list/vertical-list.js";
65
+ import "../skeleton/skeleton.js";
65
66
  import "../rounded-image/rounded-image.js";
66
67
  import "../progress/progress.js";
67
68
  import "../pool-indicator-icon/pool-indicator-icon.js";
68
69
  import "../composites/strategies-table/components/feature/feature.styles.js";
69
- import "viem";
70
70
  import "../icon-button/icon-button.js";
71
71
  import "../separate-line/separate-line.js";
72
72
  import "../tip-card/tip-card.js";
@@ -88,6 +88,7 @@ import "../dialog/dialog-footer.js";
88
88
  import "../dialog/dialog-header.js";
89
89
  import "../dialog/dialog-title.js";
90
90
  import "../dialog/dialog-overlay.js";
91
+ import "viem";
91
92
  import "../label/label.js";
92
93
  import "../dropdown-menu/dropdown-menu.js";
93
94
  import "../dropdown-menu/dropdown-menu-checkbox-item.js";
@@ -166,7 +167,7 @@ import "../theme-provider.js";
166
167
  import "../time-to-liquidation/time-to-liquidation.js";
167
168
  import "../toggle/toggle.js";
168
169
  import "../with-filter-button/with-filter-button.js";
169
- function Er({
170
+ function Wr({
170
171
  toCopy: u,
171
172
  children: d,
172
173
  onCopySuccess: f,
@@ -248,5 +249,5 @@ function Er({
248
249
  return a ? /* @__PURE__ */ t(T, { placement: "top", triangle: !0, title: c(), children: a }) : c();
249
250
  }
250
251
  export {
251
- Er as WithCopy
252
+ Wr as WithCopy
252
253
  };
@@ -0,0 +1,4 @@
1
+ import { YieldBreakdownTooltip as r } from "./yield-breakdown-tooltip.js";
2
+ export {
3
+ r as YieldBreakdownTooltip
4
+ };
@@ -0,0 +1,222 @@
1
+ import { jsxs as s, jsx as e, Fragment as I } from "react/jsx-runtime";
2
+ import { faArrowUpRightFromSquare as R } from "@fortawesome/free-solid-svg-icons";
3
+ import { FaIcon as T } from "../icons/fa-icon.js";
4
+ import { PointsIcon as $ } from "../points-icon/points-icon.js";
5
+ import { TokenIcon as j } from "../token-icon/token-icon.js";
6
+ import { SimpleTooltip as F } from "../tooltip/simple-tooltip.js";
7
+ import "../tooltip/tooltip.js";
8
+ import { FormattedMessageTyped as a } from "../typed-intl/index.js";
9
+ import "react";
10
+ import { positiveTokenRewardsOf as P, pointProgramsOf as S, totalApyOf as Y } from "../../utils/apy-breakdown.js";
11
+ import "@gearbox-protocol/sdk";
12
+ import { bpsToPercent as v } from "../../utils/bps.js";
13
+ import { cn as N } from "../../utils/cn.js";
14
+ import "sonner";
15
+ import { percentTemplate as p } from "../../utils/format-money.js";
16
+ import "@gearbox-protocol/sdk/common-utils";
17
+ import "luxon";
18
+ import "../../utils/z-index.js";
19
+ function z(t) {
20
+ const n = t.toFixed(1);
21
+ return n.endsWith(".0") ? n.slice(0, -2) : n;
22
+ }
23
+ function m(t) {
24
+ const n = v(t), i = p(Math.abs(n));
25
+ return n < 0 ? `-${i}` : n > 0 ? i : p(0);
26
+ }
27
+ function w(t) {
28
+ const n = v(Math.abs(t));
29
+ return `-${p(n)}`;
30
+ }
31
+ function Z({
32
+ supplyApy: t,
33
+ maxLeverage: n,
34
+ collateralApy: i,
35
+ borrowApy: l,
36
+ additionalBorrowApy: d,
37
+ children: k,
38
+ className: f
39
+ }) {
40
+ const g = i ?? t, u = P(g), h = S(t), x = l !== void 0 && l > 0, b = d !== void 0 && d > 0, B = x || b, y = /* @__PURE__ */ s(
41
+ "div",
42
+ {
43
+ className: N(
44
+ "flex w-[400px] max-w-[calc(100vw-32px)] flex-col gap-4 p-4",
45
+ "rounded-xl",
46
+ "bg-popover text-popover-foreground",
47
+ "border border-white/[0.07]",
48
+ "shadow-[0_4px_14px_rgba(0,0,0,0.15)]",
49
+ "text-left font-normal"
50
+ ),
51
+ children: [
52
+ /* @__PURE__ */ s("div", { className: "flex h-6 items-center justify-between gap-3 text-base leading-4 text-foreground", children: [
53
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: /* @__PURE__ */ e(
54
+ a,
55
+ {
56
+ messageId: "components.yieldBreakdown.title"
57
+ }
58
+ ) }),
59
+ n !== void 0 && n > 0 && /* @__PURE__ */ e("span", { className: "font-medium", children: /* @__PURE__ */ e(
60
+ a,
61
+ {
62
+ messageId: "components.yieldBreakdown.atLeverage",
63
+ values: { leverage: z(n) }
64
+ }
65
+ ) })
66
+ ] }),
67
+ /* @__PURE__ */ e(
68
+ r,
69
+ {
70
+ label: /* @__PURE__ */ e(
71
+ a,
72
+ {
73
+ messageId: "components.yieldBreakdown.baseYield"
74
+ }
75
+ ),
76
+ value: /* @__PURE__ */ e("span", { className: "font-semibold", children: m(g.organicApy) })
77
+ }
78
+ ),
79
+ u.length > 0 && /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
80
+ /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
81
+ a,
82
+ {
83
+ messageId: "components.yieldBreakdown.incentiveYield"
84
+ }
85
+ ) }),
86
+ u.map((o) => /* @__PURE__ */ e(
87
+ r,
88
+ {
89
+ label: /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1.5", children: [
90
+ /* @__PURE__ */ e(j, { token: o.token, size: 20 }),
91
+ /* @__PURE__ */ e("span", { children: o.token.symbol }),
92
+ /* @__PURE__ */ e(
93
+ T,
94
+ {
95
+ icon: R,
96
+ className: "size-3.5 text-muted-foreground"
97
+ }
98
+ )
99
+ ] }),
100
+ value: /* @__PURE__ */ e("span", { className: "font-semibold", children: m(o.supplyApr ?? 0) })
101
+ },
102
+ `incentive-${o.token.address}-${o.supplyApr ?? 0}`
103
+ ))
104
+ ] }),
105
+ B && /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
106
+ /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
107
+ a,
108
+ {
109
+ messageId: "components.yieldBreakdown.borrowRate"
110
+ }
111
+ ) }),
112
+ x && /* @__PURE__ */ e(
113
+ r,
114
+ {
115
+ label: /* @__PURE__ */ e(
116
+ a,
117
+ {
118
+ messageId: "components.yieldBreakdown.baseRate"
119
+ }
120
+ ),
121
+ value: /* @__PURE__ */ e("span", { className: "font-semibold text-muted-foreground", children: w(l) })
122
+ }
123
+ ),
124
+ b && /* @__PURE__ */ e(
125
+ r,
126
+ {
127
+ label: /* @__PURE__ */ e(
128
+ a,
129
+ {
130
+ messageId: "components.yieldBreakdown.additionalRate"
131
+ }
132
+ ),
133
+ value: /* @__PURE__ */ e("span", { className: "font-semibold text-muted-foreground", children: w(d) })
134
+ }
135
+ )
136
+ ] }),
137
+ /* @__PURE__ */ e(
138
+ r,
139
+ {
140
+ className: "h-7",
141
+ label: /* @__PURE__ */ e("span", { className: "text-sm font-bold uppercase leading-5 tracking-wide", children: /* @__PURE__ */ e(
142
+ a,
143
+ {
144
+ messageId: "components.yieldBreakdown.netYield"
145
+ }
146
+ ) }),
147
+ value: /* @__PURE__ */ e("span", { className: "text-xl font-bold leading-7", children: m(Y(t)) })
148
+ }
149
+ ),
150
+ h.length > 0 && /* @__PURE__ */ s(I, { children: [
151
+ /* @__PURE__ */ e("div", { className: "h-px w-full bg-[#2d3035]" }),
152
+ /* @__PURE__ */ s("div", { className: "flex h-5 items-center justify-between gap-3", children: [
153
+ /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
154
+ a,
155
+ {
156
+ messageId: "components.yieldBreakdown.points"
157
+ }
158
+ ) }),
159
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: h.map((o) => /* @__PURE__ */ s(
160
+ "span",
161
+ {
162
+ className: "inline-flex items-center gap-1 rounded-[10px] bg-[#242528] pr-2 text-sm font-semibold text-foreground",
163
+ children: [
164
+ /* @__PURE__ */ e(
165
+ $,
166
+ {
167
+ reward: {
168
+ name: o.name,
169
+ type: o.id
170
+ },
171
+ size: 20
172
+ }
173
+ ),
174
+ o.multiplier != null ? `${o.multiplier}×` : "—"
175
+ ]
176
+ },
177
+ `points-${o.id}`
178
+ )) })
179
+ ] })
180
+ ] })
181
+ ]
182
+ }
183
+ );
184
+ return /* @__PURE__ */ e(
185
+ F,
186
+ {
187
+ placement: "bottom",
188
+ triangle: !1,
189
+ type: "modal-tooltip",
190
+ minWidth: "100%",
191
+ maxWidth: "100%",
192
+ title: /* @__PURE__ */ e("span", { className: f, children: k }),
193
+ triggerClassName: f,
194
+ children: y
195
+ }
196
+ );
197
+ }
198
+ function c({ children: t }) {
199
+ return /* @__PURE__ */ e("span", { className: "text-xs font-normal uppercase leading-4 tracking-wide text-muted-foreground", children: t });
200
+ }
201
+ function r({
202
+ label: t,
203
+ value: n,
204
+ className: i
205
+ }) {
206
+ return /* @__PURE__ */ s(
207
+ "div",
208
+ {
209
+ className: N(
210
+ "flex h-6 items-center justify-between gap-3 text-sm leading-5 text-foreground",
211
+ i
212
+ ),
213
+ children: [
214
+ /* @__PURE__ */ e("span", { className: "min-w-0 font-normal", children: t }),
215
+ /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums", children: n })
216
+ ]
217
+ }
218
+ );
219
+ }
220
+ export {
221
+ Z as YieldBreakdownTooltip
222
+ };
@@ -2,10 +2,11 @@ import "react";
2
2
  import { useDebounce as e } from "./use-debounce.js";
3
3
  import "@gearbox-protocol/sdk/common-utils";
4
4
  import "@gearbox-protocol/sdk";
5
+ import "../components/breakpoint-provider.js";
5
6
  const n = (o) => o();
6
- function m(o) {
7
+ function p(o) {
7
8
  return e(n, o);
8
9
  }
9
10
  export {
10
- m as useDebounceCall
11
+ p as useDebounceCall
11
12
  };
@@ -1,19 +1,52 @@
1
- import { useState as c, useEffect as m } from "react";
2
- function t(n) {
3
- const [s, a] = c(!1);
4
- return m(() => {
5
- const e = window.matchMedia(n);
6
- e.matches !== s && a(e.matches);
7
- const i = () => a(e.matches);
8
- return e.addEventListener("change", i), () => e.removeEventListener("change", i);
9
- }, [s, n]), s;
1
+ import { useState as l, useEffect as u } from "react";
2
+ import { useBreakpointContext as o, BREAKPOINT_QUERIES as c } from "../components/breakpoint-provider.js";
3
+ function n(t, e = !0) {
4
+ const [i, a] = l(!1);
5
+ return u(() => {
6
+ if (!e)
7
+ return;
8
+ const s = window.matchMedia(t);
9
+ s.matches !== i && a(s.matches);
10
+ const r = () => a(s.matches);
11
+ return s.addEventListener("change", r), () => s.removeEventListener("change", r);
12
+ }, [i, t, e]), i;
10
13
  }
11
- const d = () => t("(max-width: 500px)"), h = () => t("(max-width: 768px)"), r = () => t("(min-width: 768px) and (max-width: 1024px)"), u = () => t("(max-width: 1024px)"), x = () => t("(min-width: 1024px)");
14
+ const f = () => {
15
+ const t = o(), e = n(
16
+ c.isExtraSmall,
17
+ t === void 0
18
+ );
19
+ return t?.isExtraSmall ?? e;
20
+ }, b = () => {
21
+ const t = o(), e = n(
22
+ c.isMobile,
23
+ t === void 0
24
+ );
25
+ return t?.isMobile ?? e;
26
+ }, x = () => {
27
+ const t = o(), e = n(
28
+ c.isTablet,
29
+ t === void 0
30
+ );
31
+ return t?.isTablet ?? e;
32
+ }, k = () => {
33
+ const t = o(), e = n(
34
+ c.isMedium,
35
+ t === void 0
36
+ );
37
+ return t?.isMedium ?? e;
38
+ }, E = () => {
39
+ const t = o(), e = n(
40
+ c.isDesktop,
41
+ t === void 0
42
+ );
43
+ return t?.isDesktop ?? e;
44
+ };
12
45
  export {
13
- x as useIsDesktop,
14
- d as useIsExtraSmall,
15
- u as useIsMedium,
16
- h as useIsMobile,
17
- r as useIsTablet,
18
- t as useMediaQuery
46
+ E as useIsDesktop,
47
+ f as useIsExtraSmall,
48
+ k as useIsMedium,
49
+ b as useIsMobile,
50
+ x as useIsTablet,
51
+ n as useMediaQuery
19
52
  };