@gearbox-protocol/ui-kit 4.0.0-next.3 → 4.0.0-next.5

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 (232) hide show
  1. package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
  2. package/dist/cjs/components/badge/badge.cjs +1 -1
  3. package/dist/cjs/components/badge/chip.cjs +1 -0
  4. package/dist/cjs/components/badge/index.cjs +1 -1
  5. package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
  6. package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.cjs +1 -1
  7. package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
  8. package/dist/cjs/components/base/health-factor-block/health-factor-block.cjs +1 -1
  9. package/dist/cjs/components/base/history-chart/history-chart.cjs +1 -1
  10. package/dist/cjs/components/base/index.cjs +1 -1
  11. package/dist/cjs/components/base/info-list/index.cjs +1 -1
  12. package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
  13. package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
  14. package/dist/cjs/components/base/leverage-preset-chips/constants.cjs +1 -0
  15. package/dist/cjs/components/base/leverage-preset-chips/index.cjs +1 -0
  16. package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -0
  17. package/dist/cjs/components/base/liquidation-price-block/liquidation-price-block.cjs +1 -1
  18. package/dist/cjs/components/base/manage-pane/constants.cjs +1 -1
  19. package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
  20. package/dist/cjs/components/base/page-title/index.cjs +1 -1
  21. package/dist/cjs/components/base/page-title/page-title.cjs +1 -1
  22. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
  23. package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
  24. package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -1
  25. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  26. package/dist/cjs/components/base/time-to-liquidation-block/time-to-liquidation-block.cjs +1 -1
  27. package/dist/cjs/components/base/title-meta/constants.cjs +1 -1
  28. package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -1
  29. package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
  30. package/dist/cjs/components/base/values/constants.cjs +1 -1
  31. package/dist/cjs/components/base/values/index.cjs +1 -1
  32. package/dist/cjs/components/base/values/points-value.cjs +1 -0
  33. package/dist/cjs/components/base/values/position-status-badge.cjs +1 -0
  34. package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
  35. package/dist/cjs/components/base/values/scalars.cjs +1 -1
  36. package/dist/cjs/components/base-table/base-table-line.cjs +1 -0
  37. package/dist/cjs/components/base-table/base-table.cjs +1 -0
  38. package/dist/cjs/components/base-table/constants.cjs +1 -0
  39. package/dist/cjs/components/base-table/index.cjs +1 -0
  40. package/dist/cjs/components/base-table/types.cjs +1 -0
  41. package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
  42. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  43. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  44. package/dist/cjs/components/collateral-allocation-tooltip/allocation-wheel.cjs +1 -0
  45. package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -0
  46. package/dist/cjs/components/collateral-allocation-tooltip/constants.cjs +1 -0
  47. package/dist/cjs/components/collateral-allocation-tooltip/index.cjs +1 -0
  48. package/dist/cjs/components/composites/index.cjs +1 -1
  49. package/dist/cjs/components/composites/pool-assets-table/constants.cjs +1 -0
  50. package/dist/cjs/components/composites/pool-assets-table/index.cjs +1 -1
  51. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
  52. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  53. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
  54. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
  55. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  56. package/dist/cjs/components/filter/filter-chip.cjs +1 -1
  57. package/dist/cjs/components/graph/default-config.cjs +1 -1
  58. package/dist/cjs/components/graph/graph-view.cjs +1 -1
  59. package/dist/cjs/components/graph/graph.cjs +1 -1
  60. package/dist/cjs/components/hf-indicator/hf-indicator.cjs +1 -0
  61. package/dist/cjs/components/hf-indicator/index.cjs +1 -0
  62. package/dist/cjs/components/index.cjs +1 -1
  63. package/dist/cjs/components/infinite-scroll/index.cjs +1 -0
  64. package/dist/cjs/components/infinite-scroll/infinite-scroll-wrapper.cjs +1 -0
  65. package/dist/cjs/components/name-cell/index.cjs +1 -0
  66. package/dist/cjs/components/name-cell/name-cell.cjs +1 -0
  67. package/dist/cjs/components/network-icon/index.cjs +1 -1
  68. package/dist/cjs/components/network-icon/network-indicator.cjs +1 -0
  69. package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
  70. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  71. package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
  72. package/dist/cjs/configs/tailwind-preset.cjs +1 -1
  73. package/dist/cjs/hooks/index.cjs +1 -1
  74. package/dist/cjs/hooks/use-observed-width-key.cjs +1 -0
  75. package/dist/cjs/index.cjs +1 -1
  76. package/dist/cjs/locale/en.json.cjs +1 -1
  77. package/dist/cjs/utils/format-leverage.cjs +1 -0
  78. package/dist/cjs/utils/format-money.cjs +1 -1
  79. package/dist/cjs/utils/index.cjs +1 -1
  80. package/dist/cjs/utils/leverage-presets.cjs +1 -0
  81. package/dist/esm/components/assets-list-cell/assets-list-cell.js +161 -159
  82. package/dist/esm/components/badge/badge.js +14 -8
  83. package/dist/esm/components/badge/chip.js +47 -0
  84. package/dist/esm/components/badge/index.js +8 -3
  85. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +4 -2
  86. package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
  87. package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +26 -27
  88. package/dist/esm/components/base/health-factor-block/health-factor-block.js +25 -25
  89. package/dist/esm/components/base/history-chart/history-chart.js +86 -46
  90. package/dist/esm/components/base/index.js +148 -138
  91. package/dist/esm/components/base/info-list/index.js +5 -4
  92. package/dist/esm/components/base/info-list/info-list.js +51 -27
  93. package/dist/esm/components/base/leverage-input/leverage-input.js +18 -20
  94. package/dist/esm/components/base/leverage-preset-chips/constants.js +7 -0
  95. package/dist/esm/components/base/leverage-preset-chips/index.js +6 -0
  96. package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +39 -0
  97. package/dist/esm/components/base/liquidation-price-block/liquidation-price-block.js +33 -28
  98. package/dist/esm/components/base/manage-pane/constants.js +3 -2
  99. package/dist/esm/components/base/manage-pane/manage-pane.js +154 -113
  100. package/dist/esm/components/base/page-title/index.js +5 -4
  101. package/dist/esm/components/base/page-title/page-title.js +31 -23
  102. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +23 -30
  103. package/dist/esm/components/base/stat-badge/stat-badge.js +18 -9
  104. package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +3 -2
  105. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +194 -31
  106. package/dist/esm/components/base/time-to-liquidation-block/time-to-liquidation-block.js +31 -31
  107. package/dist/esm/components/base/title-meta/constants.js +1 -0
  108. package/dist/esm/components/base/title-meta/title-meta.js +53 -33
  109. package/dist/esm/components/base/token-amount/token-amount.js +17 -16
  110. package/dist/esm/components/base/values/constants.js +1 -0
  111. package/dist/esm/components/base/values/index.js +20 -16
  112. package/dist/esm/components/base/values/points-value.js +30 -0
  113. package/dist/esm/components/base/values/position-status-badge.js +26 -0
  114. package/dist/esm/components/base/values/position-type-badge.js +7 -6
  115. package/dist/esm/components/base/values/scalars.js +18 -17
  116. package/dist/esm/components/base-table/base-table-line.js +117 -0
  117. package/dist/esm/components/base-table/base-table.js +110 -0
  118. package/dist/esm/components/base-table/constants.js +12 -0
  119. package/dist/esm/components/base-table/index.js +9 -0
  120. package/dist/esm/components/base-table/types.js +1 -0
  121. package/dist/esm/components/block-sync-pill/block-sync-pill.js +24 -20
  122. package/dist/esm/components/checkbox/checkbox-labeled.js +22 -18
  123. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +22 -18
  124. package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +71 -0
  125. package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +102 -0
  126. package/dist/esm/components/collateral-allocation-tooltip/constants.js +12 -0
  127. package/dist/esm/components/collateral-allocation-tooltip/index.js +9 -0
  128. package/dist/esm/components/composites/index.js +46 -44
  129. package/dist/esm/components/composites/pool-assets-table/constants.js +9 -0
  130. package/dist/esm/components/composites/pool-assets-table/index.js +8 -6
  131. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +52 -30
  132. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +109 -76
  133. package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +44 -26
  134. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +31 -27
  135. package/dist/esm/components/compound-apy/compound-apy.js +85 -80
  136. package/dist/esm/components/filter/filter-chip.js +1 -0
  137. package/dist/esm/components/graph/default-config.js +20 -18
  138. package/dist/esm/components/graph/graph-view.js +72 -88
  139. package/dist/esm/components/graph/graph.js +459 -458
  140. package/dist/esm/components/hf-indicator/hf-indicator.js +33 -0
  141. package/dist/esm/components/hf-indicator/index.js +4 -0
  142. package/dist/esm/components/index.js +734 -697
  143. package/dist/esm/components/infinite-scroll/index.js +4 -0
  144. package/dist/esm/components/infinite-scroll/infinite-scroll-wrapper.js +30 -0
  145. package/dist/esm/components/name-cell/index.js +4 -0
  146. package/dist/esm/components/name-cell/name-cell.js +35 -0
  147. package/dist/esm/components/network-icon/index.js +4 -2
  148. package/dist/esm/components/network-icon/network-indicator.js +82 -0
  149. package/dist/esm/components/trading-view/trading-view.js +193 -155
  150. package/dist/esm/components/with-copy/with-copy.js +22 -18
  151. package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +112 -169
  152. package/dist/esm/configs/tailwind-preset.js +13 -1
  153. package/dist/esm/hooks/index.js +20 -18
  154. package/dist/esm/hooks/use-observed-width-key.js +24 -0
  155. package/dist/esm/index.js +888 -841
  156. package/dist/esm/locale/en.json.js +21 -18
  157. package/dist/esm/utils/format-leverage.js +6 -0
  158. package/dist/esm/utils/format-money.js +59 -41
  159. package/dist/esm/utils/index.js +91 -85
  160. package/dist/esm/utils/leverage-presets.js +13 -0
  161. package/dist/globals.css +1 -1
  162. package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +3 -0
  163. package/dist/types/components/badge/badge.d.ts +2 -1
  164. package/dist/types/components/badge/chip.d.ts +22 -0
  165. package/dist/types/components/badge/index.d.ts +1 -0
  166. package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +1 -3
  167. package/dist/types/components/base/health-factor-block/health-factor-block.d.ts +6 -6
  168. package/dist/types/components/base/history-chart/history-chart.d.ts +13 -3
  169. package/dist/types/components/base/index.d.ts +1 -0
  170. package/dist/types/components/base/info-list/info-list.d.ts +7 -0
  171. package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
  172. package/dist/types/components/base/leverage-preset-chips/constants.d.ts +4 -0
  173. package/dist/types/components/base/leverage-preset-chips/index.d.ts +2 -0
  174. package/dist/types/components/base/leverage-preset-chips/leverage-preset-chips.d.ts +13 -0
  175. package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +2 -2
  176. package/dist/types/components/base/liquidation-price-block/liquidation-price-block.d.ts +6 -4
  177. package/dist/types/components/base/manage-pane/constants.d.ts +1 -0
  178. package/dist/types/components/base/manage-pane/manage-pane.d.ts +3 -1
  179. package/dist/types/components/base/page-title/page-title.d.ts +12 -6
  180. package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +4 -5
  181. package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +1 -0
  182. package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +12 -4
  183. package/dist/types/components/base/time-to-liquidation-block/time-to-liquidation-block.d.ts +5 -6
  184. package/dist/types/components/base/title-meta/constants.d.ts +1 -0
  185. package/dist/types/components/base/title-meta/title-meta.d.ts +9 -1
  186. package/dist/types/components/base/token-amount/token-amount.d.ts +8 -2
  187. package/dist/types/components/base/values/constants.d.ts +1 -0
  188. package/dist/types/components/base/values/index.d.ts +2 -0
  189. package/dist/types/components/base/values/points-value.d.ts +11 -0
  190. package/dist/types/components/base/values/position-short-label.d.ts +1 -1
  191. package/dist/types/components/base/values/position-status-badge.d.ts +7 -0
  192. package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
  193. package/dist/types/components/base-table/base-table-line.d.ts +21 -0
  194. package/dist/types/components/base-table/base-table.d.ts +19 -0
  195. package/dist/types/components/base-table/constants.d.ts +8 -0
  196. package/dist/types/components/base-table/index.d.ts +3 -0
  197. package/dist/types/components/base-table/types.d.ts +37 -0
  198. package/dist/types/components/collateral-allocation-tooltip/allocation-wheel.d.ts +10 -0
  199. package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts +23 -0
  200. package/dist/types/components/collateral-allocation-tooltip/constants.d.ts +8 -0
  201. package/dist/types/components/collateral-allocation-tooltip/index.d.ts +3 -0
  202. package/dist/types/components/composites/pool-assets-table/constants.d.ts +6 -0
  203. package/dist/types/components/composites/pool-assets-table/index.d.ts +1 -0
  204. package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +1 -2
  205. package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +8 -8
  206. package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +7 -20
  207. package/dist/types/components/composites/pool-assets-table/types.d.ts +4 -12
  208. package/dist/types/components/graph/graph-view.d.ts +1 -1
  209. package/dist/types/components/graph/graph.d.ts +4 -0
  210. package/dist/types/components/hf-indicator/hf-indicator.d.ts +8 -0
  211. package/dist/types/components/hf-indicator/index.d.ts +1 -0
  212. package/dist/types/components/index.d.ts +5 -0
  213. package/dist/types/components/infinite-scroll/index.d.ts +1 -0
  214. package/dist/types/components/infinite-scroll/infinite-scroll-wrapper.d.ts +11 -0
  215. package/dist/types/components/name-cell/index.d.ts +1 -0
  216. package/dist/types/components/name-cell/name-cell.d.ts +13 -0
  217. package/dist/types/components/network-icon/index.d.ts +1 -0
  218. package/dist/types/components/network-icon/network-indicator.d.ts +23 -0
  219. package/dist/types/components/trading-view/trading-view.d.ts +10 -3
  220. package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +6 -8
  221. package/dist/types/configs/tailwind-preset.d.ts +12 -0
  222. package/dist/types/hooks/index.d.ts +1 -0
  223. package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
  224. package/dist/types/index.d.ts +6 -1
  225. package/dist/types/locale/en.json.d.ts +23 -18
  226. package/dist/types/utils/format-leverage.d.ts +5 -0
  227. package/dist/types/utils/format-money.d.ts +11 -5
  228. package/dist/types/utils/index.d.ts +3 -1
  229. package/dist/types/utils/leverage-presets.d.ts +7 -0
  230. package/package.json +1 -1
  231. package/src/styles/base.css +30 -0
  232. package/src/styles/theme.css +16 -0
@@ -1,115 +1,148 @@
1
- import { jsx as e, jsxs as t, Fragment as N } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as s, Fragment as C } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@gearbox-protocol/sdk";
4
4
  import "clsx";
5
5
  import "tailwind-merge";
6
6
  import "sonner";
7
+ import { formatMoney as S } from "../../../utils/format-money.js";
7
8
  import "@gearbox-protocol/sdk/common-utils";
8
9
  import "luxon";
9
10
  import "../../../utils/z-index.js";
10
- import { bps as y } from "../../base/values/scalars.js";
11
+ import "../../points-icon/points-icon.js";
12
+ import { UtilizationValue as y } from "../../base/values/scalars.js";
11
13
  import "../../badge/badge.js";
12
- import { FormattedMessageTyped as o } from "../../typed-intl/index.js";
13
- import { useIsMobile as L, useIsDesktop as S } from "../../../hooks/use-media-query.js";
14
- import { ShortString as c } from "../../short-string/short-string.js";
15
- import { GridTableRow as A, GridTableCell as s } from "../../table/grid-table.js";
16
- import { TableLineSm as k, TableCellSm as p } from "../../table/table-sm.js";
17
- import { TokenSymbol as v } from "../../token-symbol/token-symbol.js";
18
- import { TokenTemplate as d } from "../../token-template/token-template.js";
19
- import { Typography as w } from "../../typography/typography.js";
20
- function V({
21
- poolName: h,
22
- token: l,
23
- currentQuota: g,
24
- underlyingToken: r,
25
- last: u
14
+ import "../../badge/chip.js";
15
+ import { FormattedMessageTyped as m } from "../../typed-intl/index.js";
16
+ import { AllocationWheel as L } from "../../collateral-allocation-tooltip/allocation-wheel.js";
17
+ import "@fortawesome/free-solid-svg-icons";
18
+ import "../../icons/fa-icon.js";
19
+ import "../../token-icon/token-icon.js";
20
+ import "../../tooltip/simple-tooltip.js";
21
+ import "../../tooltip/tooltip.js";
22
+ import { NameCell as U } from "../../name-cell/name-cell.js";
23
+ import { ShortString as x } from "../../short-string/short-string.js";
24
+ import "react-intl";
25
+ import "../../buttons/button/button.js";
26
+ import { GridTableRow as k, GridTableCell as o } from "../../table/grid-table.js";
27
+ import "../../skeleton/skeleton.js";
28
+ import "../../table/table.js";
29
+ import { TableLineSm as w, TableCellSm as a } from "../../table/table-sm.js";
30
+ import { TokenSymbol as I } from "../../token-symbol/token-symbol.js";
31
+ import { TokenTemplate as b } from "../../token-template/token-template.js";
32
+ import { VerticalIndicator as P } from "../../vertical-indicator/vertical-indicator.js";
33
+ import { PoolAssetsTableTest as n } from "./constants.js";
34
+ function j(i, t) {
35
+ if (t !== 0n)
36
+ return Number(i * 10000n / t);
37
+ }
38
+ function B(i, t) {
39
+ return t <= 0n || i <= 0n ? 0 : Number(i * 10000n / t) / 1e4;
40
+ }
41
+ function he({
42
+ poolName: i,
43
+ asset: t,
44
+ underlyingToken: p,
45
+ last: T,
46
+ isCompact: c,
47
+ totalUsed: z,
48
+ colorIndex: A
26
49
  }) {
27
- const { limit: f, totalQuoted: b, rate: x } = g, i = L(), T = S() ? 21 : i ? 40 : 16, a = () => /* @__PURE__ */ t("div", { className: "flex items-center flex-col-auto", children: [
28
- /* @__PURE__ */ e(v, { token: l, size: 32 }),
29
- /* @__PURE__ */ t("span", { className: "ml-1.5 md:ml-2.5 text-left", children: [
30
- /* @__PURE__ */ e(c, { maxLength: T, children: l?.title }),
31
- /* @__PURE__ */ e(
32
- w,
33
- {
34
- variant: "caption",
35
- color: "secondary",
36
- as: "span",
37
- className: "block",
38
- children: /* @__PURE__ */ e(c, { maxLength: 20, children: h })
39
- }
40
- )
41
- ] })
42
- ] }), m = () => y(Number(x)), n = () => /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
43
- o,
50
+ const { token: d, limit: r, used: l } = t, N = c ? 40 : 21, u = B(l.value, z), h = () => /* @__PURE__ */ e(
51
+ U,
44
52
  {
45
- messageId: "components.poolAssetsTable.usage",
46
- values: {
47
- amount: /* @__PURE__ */ e(
48
- d,
53
+ leading: /* @__PURE__ */ e(I, { size: 32, token: d }),
54
+ title: /* @__PURE__ */ e(x, { maxLength: N, children: d.name }),
55
+ subtitle: /* @__PURE__ */ e(x, { maxLength: 20, children: i })
56
+ }
57
+ ), f = () => /* @__PURE__ */ s(
58
+ "div",
59
+ {
60
+ className: "flex items-center justify-end gap-2",
61
+ "data-testid": n.exposureCell,
62
+ children: [
63
+ /* @__PURE__ */ e(
64
+ L,
49
65
  {
50
- value: b,
51
- token: r,
52
- decimalPartLength: 2,
53
- precision: 2,
54
- showSymbol: !1
55
- },
56
- "pool-assets-line-usage-amount"
66
+ share: u,
67
+ colorIndex: A,
68
+ idle: u === 0
69
+ }
57
70
  ),
58
- total: /* @__PURE__ */ e(
59
- d,
71
+ /* @__PURE__ */ e(
72
+ P,
60
73
  {
61
- value: f,
62
- token: r,
63
- decimalPartLength: 2,
64
- precision: 2,
65
- showSymbol: !1
66
- },
67
- "pool-assets-line-usage-total"
74
+ value: /* @__PURE__ */ e(
75
+ b,
76
+ {
77
+ decimalPartLength: 2,
78
+ precision: 2,
79
+ showSymbol: !1,
80
+ token: p,
81
+ value: l.value
82
+ }
83
+ ),
84
+ valueDescription: l.valueUsd === null ? "—" : S(l.valueUsd)
85
+ }
68
86
  )
69
- }
87
+ ]
88
+ }
89
+ ), g = () => /* @__PURE__ */ e("div", { "data-testid": n.capCell, children: r.value === 0n ? /* @__PURE__ */ e("span", { children: "—" }) : /* @__PURE__ */ e(
90
+ b,
91
+ {
92
+ decimalPartLength: 2,
93
+ precision: 2,
94
+ showSymbol: !1,
95
+ token: p,
96
+ value: r.value
70
97
  }
71
- ) });
98
+ ) }), v = () => /* @__PURE__ */ e("div", { "data-testid": n.capUtilizationCell, children: /* @__PURE__ */ e(y, { data: j(l.value, r.value) }) });
72
99
  return /* @__PURE__ */ e(
73
- A,
100
+ k,
74
101
  {
75
- last: u,
102
+ last: T,
76
103
  height: "auto",
77
104
  className: "cursor-default",
78
- style: {
79
- minHeight: "75px"
80
- },
81
- children: i ? /* @__PURE__ */ e(s, { span: "full", size: "sm", className: "px-3 py-0!", children: /* @__PURE__ */ t(
82
- k,
105
+ style: { minHeight: "75px" },
106
+ children: c ? /* @__PURE__ */ e(o, { className: "px-3 py-0!", size: "sm", span: "full", children: /* @__PURE__ */ s(
107
+ w,
83
108
  {
84
- columns: 2,
85
- columnsXs: 2,
86
- title: a(),
87
109
  className: "w-full",
110
+ columns: 3,
111
+ columnsXs: 3,
112
+ title: h(),
88
113
  children: [
89
114
  /* @__PURE__ */ e(
90
- p,
115
+ a,
116
+ {
117
+ title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.exposure" }),
118
+ children: f()
119
+ }
120
+ ),
121
+ /* @__PURE__ */ e(
122
+ a,
91
123
  {
92
- title: /* @__PURE__ */ e(o, { messageId: "components.poolAssetsTable.rate" }),
93
- children: m()
124
+ title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.cap" }),
125
+ children: g()
94
126
  }
95
127
  ),
96
128
  /* @__PURE__ */ e(
97
- p,
129
+ a,
98
130
  {
99
- title: /* @__PURE__ */ e(o, { messageId: "components.poolAssetsTable.limits" }),
100
- children: n()
131
+ title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.capUtilization" }),
132
+ children: v()
101
133
  }
102
134
  )
103
135
  ]
104
136
  }
105
- ) }) : /* @__PURE__ */ t(N, { children: [
106
- /* @__PURE__ */ e(s, { textAlign: "left", className: "pl-4", size: "sm", children: a() }),
107
- /* @__PURE__ */ e(s, { textAlign: "right", size: "sm", children: m() }),
108
- /* @__PURE__ */ e(s, { textAlign: "right", className: "pr-4", size: "sm", children: n() })
137
+ ) }) : /* @__PURE__ */ s(C, { children: [
138
+ /* @__PURE__ */ e(o, { className: "pl-4", size: "sm", textAlign: "left", children: h() }),
139
+ /* @__PURE__ */ e(o, { size: "sm", textAlign: "right", children: f() }),
140
+ /* @__PURE__ */ e(o, { size: "sm", textAlign: "right", children: g() }),
141
+ /* @__PURE__ */ e(o, { className: "pr-4", size: "sm", textAlign: "right", children: v() })
109
142
  ] })
110
143
  }
111
144
  );
112
145
  }
113
146
  export {
114
- V as PoolAssetsTableRow
147
+ he as PoolAssetsTableRow
115
148
  };
@@ -1,42 +1,60 @@
1
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
+ import { Card as f } from "../../cards/card/card.js";
3
+ import "clsx";
4
+ import "tailwind-merge";
2
5
  import "react";
6
+ import "@fortawesome/free-solid-svg-icons";
7
+ import "../../icons/fa-icon.js";
8
+ import "@gearbox-protocol/sdk";
9
+ import "sonner";
3
10
  import "@gearbox-protocol/sdk/common-utils";
4
- import { useIsMobile as p } from "../../../hooks/use-media-query.js";
5
- import { GridTable as d, GridTableHeader as f, GridTableBody as b } from "../../table/grid-table.js";
6
- import { PoolAssetsTableHead as c } from "./pool-assets-table-head.js";
7
- import { PoolAssetsTableRow as T } from "./pool-assets-table-row.js";
8
- function G({
9
- list: e,
10
- poolName: l,
11
- sort: t,
12
- tokensList: i,
13
- underlyingToken: a
11
+ import "luxon";
12
+ import "../../../utils/z-index.js";
13
+ import "react-intl";
14
+ import "../../buttons/button/button.js";
15
+ import { GridTable as b, GridTableHeader as T, GridTableBody as h } from "../../table/grid-table.js";
16
+ import "../../skeleton/skeleton.js";
17
+ import "../../table/table.js";
18
+ import { useIsMobile as u } from "../../../hooks/use-media-query.js";
19
+ import { useObservedWidthKey as x } from "../../../hooks/use-observed-width-key.js";
20
+ import { PoolAssetsTableTest as v } from "./constants.js";
21
+ import { PoolAssetsTableHead as w } from "./pool-assets-table-head.js";
22
+ import { PoolAssetsTableRow as A } from "./pool-assets-table-row.js";
23
+ const C = 680;
24
+ function q({
25
+ list: t,
26
+ poolName: s,
27
+ sort: p,
28
+ underlyingToken: l
14
29
  }) {
15
- const s = p();
16
- return /* @__PURE__ */ n(
17
- d,
30
+ const a = u(), { ref: d, widthKey: m } = x(), i = m > 0 ? m < C : a, n = t.reduce((r, e) => r + e.used.value, 0n);
31
+ return /* @__PURE__ */ o(f, { ref: d, className: "overflow-hidden rounded-lg p-2", children: /* @__PURE__ */ c(
32
+ b,
18
33
  {
19
- cols: s ? "1fr" : "1fr 180px 1fr",
34
+ cols: i ? "1fr" : "1fr max-content max-content minmax(0,1fr)",
35
+ "data-testid": v.root,
20
36
  gap: 0,
21
37
  size: "lg",
22
38
  wrapperClassName: "overflow-visible",
23
39
  children: [
24
- !s && /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(c, { sort: t }) }),
25
- /* @__PURE__ */ o(b, { children: e.map((r, m) => /* @__PURE__ */ o(
26
- T,
40
+ !i && /* @__PURE__ */ o(T, { children: /* @__PURE__ */ o(w, { sort: p }) }),
41
+ /* @__PURE__ */ o(h, { children: t.map((r, e) => /* @__PURE__ */ o(
42
+ A,
27
43
  {
28
- poolName: l,
29
- currentQuota: r,
30
- token: i[r.token],
31
- underlyingToken: a,
32
- last: m === e.length - 1
44
+ asset: r,
45
+ poolName: s,
46
+ underlyingToken: l,
47
+ last: e === t.length - 1,
48
+ isCompact: i,
49
+ totalUsed: n,
50
+ colorIndex: e
33
51
  },
34
- r.token
52
+ r.token.address
35
53
  )) })
36
54
  ]
37
55
  }
38
- );
56
+ ) });
39
57
  }
40
58
  export {
41
- G as PoolAssetsTable
59
+ q as PoolAssetsTable
42
60
  };
@@ -18,10 +18,13 @@ import "@gearbox-protocol/sdk/common-utils";
18
18
  import "luxon";
19
19
  import "../../../../../utils/z-index.js";
20
20
  import "../../../../buttons/tab-button/tab-button.js";
21
+ import "@fortawesome/free-solid-svg-icons";
22
+ import "../../../../icons/fa-icon.js";
21
23
  import "../../../../token-icon/token-icon.js";
22
24
  import "../../../../tooltip/simple-tooltip.js";
23
25
  import "../../../../tooltip/tooltip.js";
24
26
  import "../../../../badge/badge.js";
27
+ import "../../../../badge/chip.js";
25
28
  import "../../../../base/amount-input/amount-input.js";
26
29
  import { ConfirmMenu as s } from "../../../../confirm-menu/confirm-menu.js";
27
30
  import "react-intl";
@@ -32,10 +35,9 @@ import "../../../../token-symbol/token-symbol.js";
32
35
  import "../../../../simple-accordion/simple-accordion.js";
33
36
  import "../../../../tip-card/tip-card.js";
34
37
  import "../../../../typography/typography.js";
35
- import "../../../../vertical-indicator/vertical-indicator.js";
36
38
  import "../../../../points-icon/points-icon.js";
37
- import "@fortawesome/free-solid-svg-icons";
38
- import "../../../../icons/fa-icon.js";
39
+ import "../../../../vertical-indicator/vertical-indicator.js";
40
+ import "../../../../base/page-title/page-title.js";
39
41
  import "../../../../detailed-page-title/detailed-page-title-copy-button.js";
40
42
  import "../../../../detailed-page-title/detailed-page-title-explorer-dropdown.js";
41
43
  import "../../../../base/details-view/detail-aside/detail-aside-scope.js";
@@ -56,39 +58,41 @@ import "../../../../slider/slider.js";
56
58
  import "../../../../slider/slider-context.js";
57
59
  import "../../../../text-button/text-button.js";
58
60
  import "../../../../with-title/with-title.js";
59
- import "../../../../status-elements/status-elements.js";
60
61
  import "react-router-dom";
62
+ import "../../../../status-elements/status-elements.js";
61
63
  import { StyledDialogContainer as C } from "../../../../client-adapters/styled-dialog-container/styled-dialog-container.js";
64
+ import { Modal as u } from "../../../../modal/modal.js";
65
+ import "@radix-ui/react-dialog";
66
+ import "../../../../dialog/dialog-container.js";
67
+ import "../../../../dialog/dialog-content.js";
68
+ import "../../../../dialog/dialog-description.js";
69
+ import "../../../../dialog/dialog-footer.js";
70
+ import "../../../../dialog/dialog-header.js";
71
+ import "../../../../dialog/dialog-title.js";
72
+ import "../../../../dialog/dialog-modal-container.js";
73
+ import "../../../../dialog/dialog-overlay.js";
74
+ import "viem";
75
+ import "../../../../input/input.js";
76
+ import "../../../../label/label.js";
62
77
  import "../../../../simple-dropdown/simple-dropdown.js";
63
78
  import "../../../../simple-dropdown/simple-dropdown-menu-item.js";
64
- import "../../../../help-tip/help-tip.js";
65
79
  import "../../../../base/tabber/tabber.js";
66
80
  import "../../../../link/link.js";
67
81
  import "../../../../rounded-image/rounded-image.js";
82
+ import "../../../../network-icon/network-indicator.js";
68
83
  import "../../../../base-link/base-link.js";
84
+ import "../../../../help-tip/help-tip.js";
85
+ import "../../../../base-table/base-table-line.js";
69
86
  import "../../../../navigation-context/navigation-context.js";
70
87
  import "../../../../cards/card/card.js";
71
88
  import "../../../../checkbox-item/checkbox-item.js";
72
89
  import "../../../../client-adapters/styled-button/styled-button.js";
73
90
  import "../../../../client-adapters/styled-rounded-image/styled-rounded-image.js";
74
91
  import "../amounts/TransactionConfirmAmountField.js";
75
- import { TransactionConfirmDialogTest as u, transactionConfirmModalContainerVariants as M, transactionConfirmDialogShellVariants as T } from "./constants.js";
76
- import { TransactionConfirmShell as g } from "./TransactionConfirmShell.js";
92
+ import { TransactionConfirmDialogTest as M, transactionConfirmModalContainerVariants as T, transactionConfirmDialogShellVariants as g } from "./constants.js";
93
+ import { TransactionConfirmShell as h } from "./TransactionConfirmShell.js";
77
94
  import "../../../../spinner-loader/spinner-loader.js";
78
95
  import "../../../../detailed-apy/detailed-apy.js";
79
- import { Modal as h } from "../../../../modal/modal.js";
80
- import "@radix-ui/react-dialog";
81
- import "../../../../dialog/dialog-container.js";
82
- import "../../../../dialog/dialog-content.js";
83
- import "../../../../dialog/dialog-description.js";
84
- import "../../../../dialog/dialog-footer.js";
85
- import "../../../../dialog/dialog-header.js";
86
- import "../../../../dialog/dialog-title.js";
87
- import "../../../../dialog/dialog-modal-container.js";
88
- import "../../../../dialog/dialog-overlay.js";
89
- import "viem";
90
- import "../../../../input/input.js";
91
- import "../../../../label/label.js";
92
96
  import "../../../../dropdown-menu/dropdown-menu.js";
93
97
  import "../../../../dropdown-menu/dropdown-menu-checkbox-item.js";
94
98
  import "../../../../dropdown-menu/dropdown-menu-content.js";
@@ -130,7 +134,7 @@ import "../../../../split-list/split-list.js";
130
134
  import "../../../../status-dot/status-dot.js";
131
135
  import "../../../../textarea/textarea.js";
132
136
  import "../../../../theme-provider.js";
133
- function Po({
137
+ function Wo({
134
138
  open: i,
135
139
  onClose: t,
136
140
  title: m,
@@ -144,16 +148,16 @@ function Po({
144
148
  }) {
145
149
  if (!i) return null;
146
150
  const f = o !== "confirm" && o !== "awaiting_receipt" && n ? void 0 : p;
147
- return /* @__PURE__ */ r(h, { show: i, onClickOutside: t, zIndexLayer: "MODAL", children: /* @__PURE__ */ r(
151
+ return /* @__PURE__ */ r(u, { show: i, onClickOutside: t, zIndexLayer: "MODAL", children: /* @__PURE__ */ r(
148
152
  C,
149
153
  {
150
154
  className: c(
151
- T(),
152
- a ?? M()
155
+ g(),
156
+ a ?? T()
153
157
  ),
154
158
  "data-testid": e,
155
159
  children: /* @__PURE__ */ r(
156
- g,
160
+ h,
157
161
  {
158
162
  ...l,
159
163
  header: /* @__PURE__ */ r(
@@ -164,7 +168,7 @@ function Po({
164
168
  onClose: t
165
169
  }
166
170
  ),
167
- "data-testid": d ?? u.root,
171
+ "data-testid": d ?? M.root,
168
172
  phase: o
169
173
  }
170
174
  )
@@ -172,5 +176,5 @@ function Po({
172
176
  ) });
173
177
  }
174
178
  export {
175
- Po as TransactionConfirmModalView
179
+ Wo as TransactionConfirmModalView
176
180
  };
@@ -1,95 +1,100 @@
1
- import { jsx as n, jsxs as d } from "react/jsx-runtime";
2
- import { PointsIcon as R } from "../points-icon/points-icon.js";
3
- import { TokenIcon as Y } from "../token-icon/token-icon.js";
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { useId as g } from "react";
4
3
  import { YieldBreakdownTooltip as w } from "../yield-breakdown-tooltip/yield-breakdown-tooltip.js";
5
- import "react";
6
- import { positiveTokenRewardsOf as z, pointProgramsOf as I, totalApyOf as L } from "../../utils/apy-breakdown.js";
4
+ import { totalApyOf as x, positiveTokenRewardsOf as v, pointProgramsOf as C } from "../../utils/apy-breakdown.js";
7
5
  import "@gearbox-protocol/sdk";
8
- import { bpsToPercent as N } from "../../utils/bps.js";
9
- import { cn as $ } from "../../utils/cn.js";
6
+ import { bpsToPercent as I } from "../../utils/bps.js";
7
+ import { cn as k } from "../../utils/cn.js";
10
8
  import "sonner";
11
- import { formatPercentAmount as v } from "../../utils/format-money.js";
9
+ import { formatCompactPercent as P } from "../../utils/format-money.js";
12
10
  import "@gearbox-protocol/sdk/common-utils";
13
11
  import "luxon";
14
12
  import "../../utils/z-index.js";
15
- function K({
16
- apy: e,
17
- maxLeverage: f,
18
- collateralApy: h,
19
- borrowApy: g,
20
- additionalBorrowApy: x,
21
- decimals: u = 2,
22
- className: a
13
+ const l = 14;
14
+ function A() {
15
+ const t = `additional-incentives-${g().replace(/:/g, "")}`;
16
+ return /* @__PURE__ */ n(
17
+ "svg",
18
+ {
19
+ width: l,
20
+ height: l,
21
+ viewBox: "0 0 14 14",
22
+ fill: "none",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ className: "size-3.5 shrink-0 overflow-clip",
25
+ role: "img",
26
+ "aria-label": "Incentives",
27
+ children: [
28
+ /* @__PURE__ */ e("title", { children: "Incentives" }),
29
+ /* @__PURE__ */ e(
30
+ "path",
31
+ {
32
+ d: "M7 14C10.866 14 14 10.866 14 7C14 3.13401 10.866 0 7 0C3.13401 0 0 3.13401 0 7C0 10.866 3.13401 14 7 14Z",
33
+ fill: `url(#${t})`
34
+ }
35
+ ),
36
+ /* @__PURE__ */ e(
37
+ "path",
38
+ {
39
+ d: "M7 3.75V10.25M3.75 7H10.25",
40
+ stroke: "white",
41
+ strokeWidth: "1.5",
42
+ strokeLinecap: "round"
43
+ }
44
+ ),
45
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ n(
46
+ "linearGradient",
47
+ {
48
+ id: t,
49
+ x1: "0",
50
+ y1: "7",
51
+ x2: "14",
52
+ y2: "7",
53
+ gradientUnits: "userSpaceOnUse",
54
+ children: [
55
+ /* @__PURE__ */ e("stop", { stopColor: "#FF2D8D" }),
56
+ /* @__PURE__ */ e("stop", { offset: "1", stopColor: "#FF6C20" })
57
+ ]
58
+ }
59
+ ) })
60
+ ]
61
+ }
62
+ );
63
+ }
64
+ function c(t) {
65
+ return t == null ? !1 : v(t).length > 0 || C(t).length > 0;
66
+ }
67
+ function E({
68
+ apy: t,
69
+ maxLeverage: p,
70
+ collateralApy: r,
71
+ borrowApy: d,
72
+ additionalBorrowApy: a,
73
+ decimals: m = 2,
74
+ className: o
23
75
  }) {
24
- if (!e)
25
- return /* @__PURE__ */ n("span", { className: "text-secondary-foreground", children: "—" });
26
- const i = z(e), m = I(e), p = L(e), A = p >= 1, l = () => {
27
- const P = i.length > 0, k = m.length > 0, y = `${v(N(p), u)}%`, c = i.length, o = c + m.length;
28
- return /* @__PURE__ */ d("div", { className: $("inline-flex items-center gap-1.5", a), children: [
29
- /* @__PURE__ */ n("span", { className: "inline-flex items-center", children: y }),
30
- (P || k) && /* @__PURE__ */ d("span", { className: "relative inline-flex", children: [
31
- i.map((t, r) => {
32
- const s = r === o - 1;
33
- return /* @__PURE__ */ n(
34
- "span",
35
- {
36
- style: {
37
- zIndex: o - r,
38
- marginRight: s ? 0 : -7
39
- },
40
- children: /* @__PURE__ */ n(
41
- Y,
42
- {
43
- token: t.token,
44
- size: 14,
45
- style: {
46
- margin: t.token.symbol === "GEAR" ? "-3px 0 0 0" : "0"
47
- }
48
- }
49
- )
50
- },
51
- `extra-${t.token.address}-${t.supplyApr ?? 0}`
52
- );
53
- }),
54
- m.map((t, r) => {
55
- const s = r + c, T = s === o - 1;
56
- return /* @__PURE__ */ n(
57
- "span",
58
- {
59
- style: {
60
- zIndex: o - s,
61
- marginRight: T ? 0 : -7
62
- },
63
- children: /* @__PURE__ */ n(
64
- R,
65
- {
66
- reward: {
67
- name: t.name,
68
- type: t.id
69
- },
70
- size: 14
71
- }
72
- )
73
- },
74
- `points-${t.id}`
75
- );
76
- })
77
- ] })
76
+ if (!t)
77
+ return /* @__PURE__ */ e("span", { className: "text-secondary-foreground", children: "—" });
78
+ const i = x(t), f = c(t) || c(r), h = i >= 1, s = () => {
79
+ const u = P(I(i), m);
80
+ return /* @__PURE__ */ n("div", { className: k("inline-flex items-center gap-1.5", o), children: [
81
+ /* @__PURE__ */ e("span", { className: "inline-flex items-center", children: u }),
82
+ f ? /* @__PURE__ */ e(A, {}) : null
78
83
  ] });
79
84
  };
80
- return A ? /* @__PURE__ */ n(
85
+ return h ? /* @__PURE__ */ e(
81
86
  w,
82
87
  {
83
- supplyApy: e,
84
- maxLeverage: f,
85
- collateralApy: h,
86
- borrowApy: g,
87
- additionalBorrowApy: x,
88
- className: a,
89
- children: l()
88
+ supplyApy: t,
89
+ maxLeverage: p,
90
+ collateralApy: r,
91
+ borrowApy: d,
92
+ additionalBorrowApy: a,
93
+ className: o,
94
+ children: s()
90
95
  }
91
- ) : l();
96
+ ) : s();
92
97
  }
93
98
  export {
94
- K as CompoundAPY
99
+ E as CompoundAPY
95
100
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
3
  import { Badge as s } from "../badge/badge.js";
4
+ import "../badge/chip.js";
4
5
  import { faXmark as f } from "@fortawesome/free-solid-svg-icons";
5
6
  import { FaIcon as l } from "../icons/fa-icon.js";
6
7
  import "@gearbox-protocol/sdk";