@gearbox-protocol/ui-kit 4.0.0-next.2 → 4.0.0-next.21

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 (314) 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/amount-input/token-select-panel.cjs +1 -1
  6. package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
  7. package/dist/cjs/components/base/chart-with-side-card/chart-with-side-card.cjs +1 -1
  8. package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
  9. package/dist/cjs/components/base/health-factor-block/health-factor-block.cjs +1 -1
  10. package/dist/cjs/components/base/history-chart/history-chart.cjs +1 -1
  11. package/dist/cjs/components/base/index.cjs +1 -1
  12. package/dist/cjs/components/base/info-list/index.cjs +1 -1
  13. package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
  14. package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
  15. package/dist/cjs/components/base/leverage-preset-chips/constants.cjs +1 -0
  16. package/dist/cjs/components/base/leverage-preset-chips/index.cjs +1 -0
  17. package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -0
  18. package/dist/cjs/components/base/liquidation-price-block/liquidation-price-block.cjs +1 -1
  19. package/dist/cjs/components/base/manage-pane/constants.cjs +1 -1
  20. package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
  21. package/dist/cjs/components/base/page-title/index.cjs +1 -1
  22. package/dist/cjs/components/base/page-title/page-title.cjs +1 -1
  23. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
  24. package/dist/cjs/components/base/position-assets/constants.cjs +1 -0
  25. package/dist/cjs/components/base/position-assets/index.cjs +1 -0
  26. package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -0
  27. package/dist/cjs/components/base/review-button/constants.cjs +1 -1
  28. package/dist/cjs/components/base/review-button/review-button.cjs +1 -1
  29. package/dist/cjs/components/base/stat-badge/constants.cjs +1 -1
  30. package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
  31. package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -1
  32. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  33. package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
  34. package/dist/cjs/components/base/time-to-liquidation-block/time-to-liquidation-block.cjs +1 -1
  35. package/dist/cjs/components/base/title-meta/constants.cjs +1 -1
  36. package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -1
  37. package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
  38. package/dist/cjs/components/base/values/constants.cjs +1 -1
  39. package/dist/cjs/components/base/values/index.cjs +1 -1
  40. package/dist/cjs/components/base/values/points-value.cjs +1 -0
  41. package/dist/cjs/components/base/values/position-status-badge.cjs +1 -0
  42. package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
  43. package/dist/cjs/components/base/values/scalars.cjs +1 -1
  44. package/dist/cjs/components/base-table/base-table-line.cjs +1 -0
  45. package/dist/cjs/components/base-table/base-table.cjs +1 -0
  46. package/dist/cjs/components/base-table/constants.cjs +1 -0
  47. package/dist/cjs/components/base-table/index.cjs +1 -0
  48. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  49. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  50. package/dist/cjs/components/collateral-allocation-tooltip/allocation-wheel.cjs +1 -0
  51. package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -0
  52. package/dist/cjs/components/collateral-allocation-tooltip/constants.cjs +1 -0
  53. package/dist/cjs/components/collateral-allocation-tooltip/index.cjs +1 -0
  54. package/dist/cjs/components/composites/index.cjs +1 -1
  55. package/dist/cjs/components/composites/pool-assets-table/constants.cjs +1 -0
  56. package/dist/cjs/components/composites/pool-assets-table/index.cjs +1 -1
  57. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
  58. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  59. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
  60. package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
  61. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -1
  62. package/dist/cjs/components/composites/tx-preview/confirm/dialog/constants.cjs +1 -1
  63. package/dist/cjs/components/composites/tx-preview/confirm/dialog/index.cjs +1 -1
  64. package/dist/cjs/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.cjs +1 -0
  65. package/dist/cjs/components/composites/tx-preview/confirm/index.cjs +1 -1
  66. package/dist/cjs/components/composites/tx-preview/index.cjs +1 -1
  67. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  68. package/dist/cjs/components/detailed-page-title/detailed-page-title-explorer-dropdown.cjs +1 -1
  69. package/dist/cjs/components/filter/filter-chip.cjs +1 -1
  70. package/dist/cjs/components/graph/default-config.cjs +1 -1
  71. package/dist/cjs/components/graph/formatters.cjs +1 -1
  72. package/dist/cjs/components/graph/graph-view.cjs +1 -1
  73. package/dist/cjs/components/graph/graph.cjs +1 -1
  74. package/dist/cjs/components/hf-indicator/hf-indicator.cjs +1 -0
  75. package/dist/cjs/components/hf-indicator/index.cjs +1 -0
  76. package/dist/cjs/components/index.cjs +1 -1
  77. package/dist/cjs/components/infinite-scroll/index.cjs +1 -0
  78. package/dist/cjs/components/infinite-scroll/infinite-scroll-wrapper.cjs +1 -0
  79. package/dist/cjs/components/layout/app-footer/app-footer.cjs +1 -1
  80. package/dist/cjs/components/name-cell/index.cjs +1 -0
  81. package/dist/cjs/components/name-cell/name-cell.cjs +1 -0
  82. package/dist/cjs/components/network-icon/index.cjs +1 -1
  83. package/dist/cjs/components/network-icon/network-indicator.cjs +1 -0
  84. package/dist/cjs/components/sdk-status-pill/constants.cjs +1 -0
  85. package/dist/cjs/components/sdk-status-pill/index.cjs +1 -0
  86. package/dist/cjs/components/sdk-status-pill/sdk-status-pill.cjs +1 -0
  87. package/dist/cjs/components/sdk-status-pill/sdk-status.cjs +1 -0
  88. package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
  89. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  90. package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
  91. package/dist/cjs/configs/tailwind-preset.cjs +1 -1
  92. package/dist/cjs/hooks/index.cjs +1 -1
  93. package/dist/cjs/hooks/use-observed-width-key.cjs +1 -0
  94. package/dist/cjs/index.cjs +1 -1
  95. package/dist/cjs/locale/en.json.cjs +1 -1
  96. package/dist/cjs/utils/format-leverage.cjs +1 -0
  97. package/dist/cjs/utils/format-money.cjs +1 -1
  98. package/dist/cjs/utils/index.cjs +1 -1
  99. package/dist/cjs/utils/leverage-presets.cjs +1 -0
  100. package/dist/esm/components/assets-list-cell/assets-list-cell.js +161 -159
  101. package/dist/esm/components/badge/badge.js +14 -8
  102. package/dist/esm/components/badge/chip.js +47 -0
  103. package/dist/esm/components/badge/index.js +8 -3
  104. package/dist/esm/components/base/amount-input/token-select-panel.js +33 -37
  105. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +32 -25
  106. package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
  107. package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +26 -27
  108. package/dist/esm/components/base/health-factor-block/health-factor-block.js +25 -25
  109. package/dist/esm/components/base/history-chart/history-chart.js +82 -41
  110. package/dist/esm/components/base/index.js +156 -141
  111. package/dist/esm/components/base/info-list/index.js +5 -4
  112. package/dist/esm/components/base/info-list/info-list.js +52 -27
  113. package/dist/esm/components/base/leverage-input/leverage-input.js +18 -20
  114. package/dist/esm/components/base/leverage-preset-chips/constants.js +7 -0
  115. package/dist/esm/components/base/leverage-preset-chips/index.js +6 -0
  116. package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +39 -0
  117. package/dist/esm/components/base/liquidation-price-block/liquidation-price-block.js +33 -28
  118. package/dist/esm/components/base/manage-pane/constants.js +3 -2
  119. package/dist/esm/components/base/manage-pane/manage-pane.js +154 -113
  120. package/dist/esm/components/base/page-title/index.js +5 -4
  121. package/dist/esm/components/base/page-title/page-title.js +31 -23
  122. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +23 -30
  123. package/dist/esm/components/base/position-assets/constants.js +8 -0
  124. package/dist/esm/components/base/position-assets/index.js +6 -0
  125. package/dist/esm/components/base/position-assets/position-assets.js +96 -0
  126. package/dist/esm/components/base/review-button/constants.js +3 -2
  127. package/dist/esm/components/base/review-button/review-button.js +35 -22
  128. package/dist/esm/components/base/stat-badge/constants.js +1 -0
  129. package/dist/esm/components/base/stat-badge/stat-badge.js +91 -47
  130. package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +8 -3
  131. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +191 -29
  132. package/dist/esm/components/base/tabber/tabber.js +67 -64
  133. package/dist/esm/components/base/time-to-liquidation-block/time-to-liquidation-block.js +31 -31
  134. package/dist/esm/components/base/title-meta/constants.js +1 -0
  135. package/dist/esm/components/base/title-meta/title-meta.js +53 -33
  136. package/dist/esm/components/base/token-amount/token-amount.js +17 -16
  137. package/dist/esm/components/base/values/constants.js +1 -0
  138. package/dist/esm/components/base/values/index.js +18 -13
  139. package/dist/esm/components/base/values/points-value.js +30 -0
  140. package/dist/esm/components/base/values/position-status-badge.js +26 -0
  141. package/dist/esm/components/base/values/position-type-badge.js +7 -6
  142. package/dist/esm/components/base/values/scalars.js +58 -32
  143. package/dist/esm/components/base-table/base-table-line.js +117 -0
  144. package/dist/esm/components/base-table/base-table.js +110 -0
  145. package/dist/esm/components/base-table/constants.js +12 -0
  146. package/dist/esm/components/base-table/index.js +9 -0
  147. package/dist/esm/components/checkbox/checkbox-labeled.js +25 -20
  148. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +25 -20
  149. package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +71 -0
  150. package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +102 -0
  151. package/dist/esm/components/collateral-allocation-tooltip/constants.js +12 -0
  152. package/dist/esm/components/collateral-allocation-tooltip/index.js +9 -0
  153. package/dist/esm/components/composites/index.js +31 -31
  154. package/dist/esm/components/composites/pool-assets-table/constants.js +9 -0
  155. package/dist/esm/components/composites/pool-assets-table/index.js +8 -6
  156. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +52 -30
  157. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +111 -77
  158. package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +44 -26
  159. package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +50 -39
  160. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +114 -59
  161. package/dist/esm/components/composites/tx-preview/confirm/dialog/constants.js +10 -7
  162. package/dist/esm/components/composites/tx-preview/confirm/dialog/index.js +8 -10
  163. package/dist/esm/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.js +1 -0
  164. package/dist/esm/components/composites/tx-preview/confirm/index.js +24 -26
  165. package/dist/esm/components/composites/tx-preview/index.js +24 -26
  166. package/dist/esm/components/compound-apy/compound-apy.js +88 -82
  167. package/dist/esm/components/detailed-page-title/detailed-page-title-explorer-dropdown.js +50 -41
  168. package/dist/esm/components/filter/filter-chip.js +1 -0
  169. package/dist/esm/components/graph/default-config.js +20 -18
  170. package/dist/esm/components/graph/formatters.js +62 -52
  171. package/dist/esm/components/graph/graph-view.js +72 -88
  172. package/dist/esm/components/graph/graph.js +459 -458
  173. package/dist/esm/components/hf-indicator/hf-indicator.js +59 -0
  174. package/dist/esm/components/hf-indicator/index.js +4 -0
  175. package/dist/esm/components/index.js +739 -695
  176. package/dist/esm/components/infinite-scroll/index.js +4 -0
  177. package/dist/esm/components/infinite-scroll/infinite-scroll-wrapper.js +30 -0
  178. package/dist/esm/components/layout/app-footer/app-footer.js +20 -23
  179. package/dist/esm/components/name-cell/index.js +4 -0
  180. package/dist/esm/components/name-cell/name-cell.js +35 -0
  181. package/dist/esm/components/network-icon/index.js +4 -2
  182. package/dist/esm/components/network-icon/network-indicator.js +82 -0
  183. package/dist/esm/components/sdk-status-pill/constants.js +8 -0
  184. package/dist/esm/components/sdk-status-pill/index.js +8 -0
  185. package/dist/esm/components/sdk-status-pill/sdk-status-pill.js +59 -0
  186. package/dist/esm/components/sdk-status-pill/sdk-status.js +6 -0
  187. package/dist/esm/components/trading-view/trading-view.js +193 -155
  188. package/dist/esm/components/with-copy/with-copy.js +25 -20
  189. package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +114 -171
  190. package/dist/esm/configs/tailwind-preset.js +13 -1
  191. package/dist/esm/hooks/index.js +20 -18
  192. package/dist/esm/hooks/use-observed-width-key.js +24 -0
  193. package/dist/esm/index.js +896 -842
  194. package/dist/esm/locale/en.json.js +28 -25
  195. package/dist/esm/utils/format-leverage.js +6 -0
  196. package/dist/esm/utils/format-money.js +59 -41
  197. package/dist/esm/utils/index.js +91 -85
  198. package/dist/esm/utils/leverage-presets.js +13 -0
  199. package/dist/globals.css +1 -1
  200. package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +3 -0
  201. package/dist/types/components/badge/badge.d.ts +2 -1
  202. package/dist/types/components/badge/chip.d.ts +22 -0
  203. package/dist/types/components/badge/index.d.ts +1 -0
  204. package/dist/types/components/base/amount-input/amount-input.d.ts +3 -2
  205. package/dist/types/components/base/amount-input/token-select-panel.d.ts +4 -3
  206. package/dist/types/components/base/borrow-rate-block/borrow-rate-block.d.ts +10 -5
  207. package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +1 -3
  208. package/dist/types/components/base/health-factor-block/health-factor-block.d.ts +6 -6
  209. package/dist/types/components/base/history-chart/history-chart.d.ts +32 -8
  210. package/dist/types/components/base/index.d.ts +2 -0
  211. package/dist/types/components/base/info-list/info-list.d.ts +7 -0
  212. package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
  213. package/dist/types/components/base/leverage-preset-chips/constants.d.ts +4 -0
  214. package/dist/types/components/base/leverage-preset-chips/index.d.ts +2 -0
  215. package/dist/types/components/base/leverage-preset-chips/leverage-preset-chips.d.ts +13 -0
  216. package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +2 -2
  217. package/dist/types/components/base/liquidation-price-block/liquidation-price-block.d.ts +6 -4
  218. package/dist/types/components/base/manage-pane/constants.d.ts +1 -0
  219. package/dist/types/components/base/manage-pane/manage-pane.d.ts +3 -1
  220. package/dist/types/components/base/page-title/page-title.d.ts +12 -6
  221. package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +4 -5
  222. package/dist/types/components/base/position-assets/constants.d.ts +5 -0
  223. package/dist/types/components/base/position-assets/index.d.ts +2 -0
  224. package/dist/types/components/base/position-assets/position-assets.d.ts +55 -0
  225. package/dist/types/components/base/review-button/constants.d.ts +1 -0
  226. package/dist/types/components/base/review-button/review-button.d.ts +17 -3
  227. package/dist/types/components/base/stat-badge/constants.d.ts +1 -0
  228. package/dist/types/components/base/stat-badge/stat-badge.d.ts +11 -1
  229. package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +6 -1
  230. package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +43 -4
  231. package/dist/types/components/base/tabber/tabber.d.ts +2 -2
  232. package/dist/types/components/base/time-to-liquidation-block/time-to-liquidation-block.d.ts +5 -6
  233. package/dist/types/components/base/title-meta/constants.d.ts +1 -0
  234. package/dist/types/components/base/title-meta/title-meta.d.ts +9 -1
  235. package/dist/types/components/base/token-amount/token-amount.d.ts +8 -2
  236. package/dist/types/components/base/values/constants.d.ts +1 -0
  237. package/dist/types/components/base/values/index.d.ts +3 -1
  238. package/dist/types/components/base/values/points-value.d.ts +11 -0
  239. package/dist/types/components/base/values/position-short-label.d.ts +1 -1
  240. package/dist/types/components/base/values/position-status-badge.d.ts +7 -0
  241. package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
  242. package/dist/types/components/base/values/scalars.d.ts +30 -2
  243. package/dist/types/components/base-table/base-table-line.d.ts +21 -0
  244. package/dist/types/components/base-table/base-table.d.ts +19 -0
  245. package/dist/types/components/base-table/constants.d.ts +8 -0
  246. package/dist/types/components/base-table/index.d.ts +3 -0
  247. package/dist/types/components/base-table/types.d.ts +37 -0
  248. package/dist/types/components/collateral-allocation-tooltip/allocation-wheel.d.ts +10 -0
  249. package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts +23 -0
  250. package/dist/types/components/collateral-allocation-tooltip/constants.d.ts +8 -0
  251. package/dist/types/components/collateral-allocation-tooltip/index.d.ts +3 -0
  252. package/dist/types/components/composites/pool-assets-table/constants.d.ts +6 -0
  253. package/dist/types/components/composites/pool-assets-table/index.d.ts +1 -0
  254. package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +1 -2
  255. package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +8 -8
  256. package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +7 -20
  257. package/dist/types/components/composites/pool-assets-table/types.d.ts +4 -12
  258. package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +47 -14
  259. package/dist/types/components/composites/tx-preview/confirm/amounts/index.d.ts +1 -1
  260. package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.d.ts +23 -19
  261. package/dist/types/components/composites/tx-preview/confirm/dialog/index.d.ts +2 -2
  262. package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmPhase.d.ts +0 -3
  263. package/dist/types/components/composites/tx-preview/confirm/dialog/transactionConfirmShellTypes.d.ts +98 -0
  264. package/dist/types/components/compound-apy/compound-apy.d.ts +12 -2
  265. package/dist/types/components/graph/formatters.d.ts +6 -1
  266. package/dist/types/components/graph/graph-view.d.ts +1 -1
  267. package/dist/types/components/graph/graph.d.ts +4 -0
  268. package/dist/types/components/hf-indicator/hf-indicator.d.ts +17 -0
  269. package/dist/types/components/hf-indicator/index.d.ts +1 -0
  270. package/dist/types/components/index.d.ts +6 -1
  271. package/dist/types/components/infinite-scroll/index.d.ts +1 -0
  272. package/dist/types/components/infinite-scroll/infinite-scroll-wrapper.d.ts +11 -0
  273. package/dist/types/components/layout/app-footer/app-footer.d.ts +9 -15
  274. package/dist/types/components/name-cell/index.d.ts +1 -0
  275. package/dist/types/components/name-cell/name-cell.d.ts +13 -0
  276. package/dist/types/components/network-icon/index.d.ts +1 -0
  277. package/dist/types/components/network-icon/network-indicator.d.ts +23 -0
  278. package/dist/types/components/sdk-status-pill/constants.d.ts +5 -0
  279. package/dist/types/components/sdk-status-pill/index.d.ts +3 -0
  280. package/dist/types/components/sdk-status-pill/sdk-status-pill.d.ts +27 -0
  281. package/dist/types/components/sdk-status-pill/sdk-status.d.ts +11 -0
  282. package/dist/types/components/trading-view/trading-view.d.ts +14 -7
  283. package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +8 -10
  284. package/dist/types/configs/tailwind-preset.d.ts +12 -0
  285. package/dist/types/hooks/index.d.ts +1 -0
  286. package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
  287. package/dist/types/index.d.ts +7 -3
  288. package/dist/types/locale/en.json.d.ts +28 -23
  289. package/dist/types/types/index.d.ts +0 -1
  290. package/dist/types/utils/format-leverage.d.ts +5 -0
  291. package/dist/types/utils/format-money.d.ts +11 -5
  292. package/dist/types/utils/index.d.ts +3 -1
  293. package/dist/types/utils/leverage-presets.d.ts +7 -0
  294. package/package.json +6 -6
  295. package/src/styles/base.css +30 -0
  296. package/src/styles/theme.css +16 -0
  297. package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +0 -1
  298. package/dist/cjs/components/block-sync-pill/block-sync-status.cjs +0 -1
  299. package/dist/cjs/components/block-sync-pill/index.cjs +0 -1
  300. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +0 -1
  301. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.cjs +0 -1
  302. package/dist/esm/components/block-sync-pill/block-sync-pill.js +0 -206
  303. package/dist/esm/components/block-sync-pill/block-sync-status.js +0 -12
  304. package/dist/esm/components/block-sync-pill/index.js +0 -4
  305. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +0 -176
  306. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.js +0 -54
  307. package/dist/types/components/block-sync-pill/block-sync-pill.d.ts +0 -35
  308. package/dist/types/components/block-sync-pill/block-sync-status.d.ts +0 -29
  309. package/dist/types/components/block-sync-pill/index.d.ts +0 -1
  310. package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.d.ts +0 -17
  311. package/dist/types/components/composites/tx-preview/confirm/dialog/TransactionConfirmPageView.d.ts +0 -16
  312. package/dist/types/types/footer.d.ts +0 -51
  313. /package/dist/cjs/{types/footer.cjs → components/base-table/types.cjs} +0 -0
  314. /package/dist/esm/{types/footer.js → components/base-table/types.js} +0 -0
@@ -5,12 +5,12 @@ import { TimeToLiquidationBlockTest } from './constants';
5
5
  export { TimeToLiquidationBlockTest };
6
6
  export interface TimeToLiquidationBlockProps {
7
7
  /**
8
- * Time to liquidation in seconds; `null` renders "N/A", omit to render "—"
9
- * (value not available).
8
+ * SDK `timeToLiquidation` in milliseconds; `null` renders "N/A", omit to
9
+ * render "—" (value not available).
10
10
  */
11
- readonly seconds?: number | null;
11
+ readonly data?: bigint | null;
12
12
  /** Time after the operation; renders a from → to transition. */
13
- readonly secondsTo?: number | null;
13
+ readonly dataTo?: bigint | null;
14
14
  /** Pre-computed zone; if not set, derived from the value. */
15
15
  readonly zone?: TTLZones;
16
16
  readonly isLoading?: boolean;
@@ -23,6 +23,5 @@ export interface TimeToLiquidationBlockProps {
23
23
  /**
24
24
  * "Time to liquidation" row of a preview: label + help tip, the remaining
25
25
  * time as `Nmo` / `Nd` / `<1d` with a zone dot, optionally from → to.
26
- * Design only — the reference `TimeToLiquidationBlock` markup on value props.
27
26
  */
28
- export declare function TimeToLiquidationBlock({ seconds, secondsTo, zone, isLoading, title, tip, testId, }: TimeToLiquidationBlockProps): React.ReactElement;
27
+ export declare function TimeToLiquidationBlock({ data, dataTo, zone, isLoading, title, tip, testId, }: TimeToLiquidationBlockProps): React.ReactElement;
@@ -2,4 +2,5 @@ export declare class TitleMetaTest {
2
2
  static root: string;
3
3
  static network: string;
4
4
  static curator: string;
5
+ static link: string;
5
6
  }
@@ -1,15 +1,23 @@
1
+ import { Token } from '@gearbox-protocol/sdk/model';
1
2
  import { default as React } from 'react';
2
3
  import { NetworkIcons } from '../../../utils/network-icons';
3
4
  import { TitleMetaTest } from './constants';
4
5
  export { TitleMetaTest };
6
+ export interface TitleMetaLink {
7
+ readonly href: string;
8
+ readonly token?: Token;
9
+ readonly label?: string;
10
+ readonly onClick?: () => void;
11
+ }
5
12
  export interface TitleMetaProps {
6
13
  readonly network: NetworkIcons;
7
14
  readonly curatorName: string | undefined;
8
15
  readonly curatorLink: string | undefined;
9
16
  readonly onCuratorLinkClick?: () => void;
17
+ readonly links?: ReadonlyArray<TitleMetaLink>;
10
18
  readonly testId?: string;
11
19
  readonly networkTestId?: string;
12
20
  readonly curatorTestId?: string;
13
21
  }
14
22
  /** Network + curator row under a detail-page title. */
15
- export declare function TitleMeta({ network, curatorName, curatorLink, onCuratorLinkClick, testId, networkTestId, curatorTestId, }: TitleMetaProps): React.ReactElement;
23
+ export declare function TitleMeta({ network, curatorName, curatorLink, onCuratorLinkClick, links, testId, networkTestId, curatorTestId, }: TitleMetaProps): React.ReactElement;
@@ -1,7 +1,9 @@
1
1
  import { Amount, Token, TokenAmount as TokenAmountModel } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
+ import { StackAlign } from '../stack';
3
4
  import { TokenAmountTest } from './constants';
4
5
  export { TokenAmountTest };
6
+ export type TokenAmountAlign = Extract<StackAlign, "start" | "end">;
5
7
  /**
6
8
  * An amount of a token, with its USD value underneath.
7
9
  *
@@ -10,7 +12,7 @@ export { TokenAmountTest };
10
12
  * `totalSupply` / `totalBorrow`, implicitly in the market underlying) name their
11
13
  * token alongside.
12
14
  */
13
- export type TokenAmountProps = {
15
+ type TokenAmountDataProps = {
14
16
  /** `null` means unavailable and renders an em-dash. */
15
17
  readonly data: TokenAmountModel | null;
16
18
  readonly token?: undefined;
@@ -18,4 +20,8 @@ export type TokenAmountProps = {
18
20
  readonly data: Amount | null;
19
21
  readonly token: Token;
20
22
  };
21
- export declare function TokenAmount({ data, token, }: TokenAmountProps): React.ReactElement;
23
+ export type TokenAmountProps = TokenAmountDataProps & {
24
+ /** Cross-axis alignment of the token line and the USD caption. */
25
+ readonly align?: TokenAmountAlign;
26
+ };
27
+ export declare function TokenAmount({ data, token, align, }: TokenAmountProps): React.ReactElement;
@@ -6,6 +6,7 @@ export declare class ValueTest {
6
6
  static healthFactor: string;
7
7
  static pnl: string;
8
8
  static tokenBigint: string;
9
+ static points: string;
9
10
  static placeholder: string;
10
11
  }
11
12
  export declare class PositionShortLabelTest {
@@ -1,5 +1,7 @@
1
1
  export { ValueTest } from './constants';
2
2
  export { PnlValue } from './pnl-value';
3
+ export { PointsValue, type PointsValueProps } from './points-value';
3
4
  export { PositionShortLabel, PositionShortLabelTest, } from './position-short-label';
5
+ export { type PositionStatus, PositionStatusBadge, type PositionStatusBadgeProps, } from './position-status-badge';
4
6
  export { PositionTypeBadge, type PositionTypeBadgeProps, } from './position-type-badge';
5
- export { ApyValue, type ApyValueProps, HealthFactorValue, LeverageValue, TokenBigint, UsdValue, UtilizationValue, } from './scalars';
7
+ export { ApyValue, type ApyValueProps, bps, HealthFactorValue, LeverageValue, TokenBigint, UsdValue, UtilizationValue, } from './scalars';
@@ -0,0 +1,11 @@
1
+ import { ApyBreakdown } from '@gearbox-protocol/sdk/model';
2
+ import { default as React } from 'react';
3
+ export interface PointsValueProps {
4
+ /** SDK APY breakdown; `undefined` or no point programs render nothing. */
5
+ readonly data: ApyBreakdown | undefined;
6
+ }
7
+ /**
8
+ * Point programs attached to an APY breakdown: icon + name for each program.
9
+ * Returns `null` when the SDK has none.
10
+ */
11
+ export declare function PointsValue({ data, }: PointsValueProps): React.ReactElement | null;
@@ -2,7 +2,7 @@ import { StrategyPosition } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
3
  import { PositionShortLabelTest } from './constants';
4
4
  export { PositionShortLabelTest };
5
- /** "wstETH / WETH · 2.5x" — one open position, in a menu row. */
5
+ /** "wstETH / WETH · 2.50x" — one open position, in a menu row. */
6
6
  export declare function PositionShortLabel({ data, }: {
7
7
  readonly data: StrategyPosition;
8
8
  }): React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export type PositionStatus = "active" | "repaid";
3
+ export interface PositionStatusBadgeProps {
4
+ readonly data: PositionStatus;
5
+ }
6
+ /** Lifecycle chip of a strategy position: Active or Repaid. */
7
+ export declare function PositionStatusBadge({ data, }: PositionStatusBadgeProps): React.ReactElement;
@@ -6,6 +6,6 @@ export interface PositionTypeBadgeProps {
6
6
  readonly size?: "table" | "aside" | "title";
7
7
  }
8
8
  /**
9
- * Colored kind label of a position row: "Lender" / "Strategy" / "Liquidation".
9
+ * Colored kind label of a position row: "LP" / "Strategy" / "Liquidation".
10
10
  */
11
11
  export declare function PositionTypeBadge({ data, size, }: PositionTypeBadgeProps): React.ReactElement;
@@ -1,15 +1,34 @@
1
1
  import { ApyBreakdown, Bps, Leverage, Token } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
+ /**
4
+ * Basis points as a percentage (`10000` = 100%); the model's `Bps` is `number`.
5
+ *
6
+ * Self-contained on purpose: `percentageTemplate` (format-money) carries a
7
+ * same-named, oppositely-scaled twin in `templates.tsx` (already-percent
8
+ * input), so a shared bps→percent step here would inherit that ambiguity.
9
+ * `bps` is the one place that owns the conversion.
10
+ */
11
+ export declare function bps(value: Bps): string;
3
12
  export interface ApyValueProps {
4
13
  /** A breakdown (tooltip-able) or a bare rate; `undefined` renders a dash. */
5
14
  readonly data: ApyBreakdown | Bps | undefined;
15
+ /**
16
+ * Whether a breakdown carries its yield tooltip on hover. Off where the
17
+ * figure is already explained — a badge that states one rate, or a figure
18
+ * wrapped in a tooltip of its own, which would otherwise stack two.
19
+ *
20
+ * A bare `Bps` has no tooltip to begin with, so this does not reach it.
21
+ *
22
+ * @default true
23
+ */
24
+ readonly tooltip?: boolean;
6
25
  }
7
26
  /**
8
27
  * Any APY the model carries, in one place: `supplyApy`, `netApy`, `borrowApy`.
9
28
  * A breakdown renders the reference chip (reward icons + breakdown tooltip)
10
29
  * via `CompoundAPY`; a bare `Bps` stays a plain percentage.
11
30
  */
12
- export declare function ApyValue({ data }: ApyValueProps): React.ReactElement;
31
+ export declare function ApyValue({ data, tooltip, }: ApyValueProps): React.ReactElement;
13
32
  export declare function UsdValue({ data, }: {
14
33
  readonly data: number | null | undefined;
15
34
  }): React.ReactElement;
@@ -27,8 +46,17 @@ export declare function HealthFactorValue({ data, }: {
27
46
  * A bare `bigint` in token units (simulate previews carry these): the only
28
47
  * value component that needs a denomination passed with it, because the SDK
29
48
  * hands these out without one.
49
+ *
50
+ * Shown to `formatAssetAmount`'s three decimals, with the exact amount in a
51
+ * tooltip — a metrics row reads better short, and nothing is lost: the figure
52
+ * behind the rounding stays a hover away.
30
53
  */
31
- export declare function TokenBigint({ data, token, }: {
54
+ export declare function TokenBigint({ data, token, showSymbol, }: {
32
55
  readonly data: bigint | undefined;
33
56
  readonly token: Token | undefined;
57
+ /**
58
+ * Off where the row names the token itself — a `before → after` pair prints
59
+ * the symbol once for both amounts rather than twice.
60
+ */
61
+ readonly showSymbol?: boolean;
34
62
  }): React.ReactElement;
@@ -0,0 +1,21 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { BaseTableColumn } from './types';
3
+ export { BaseTableLineTest } from './constants';
4
+ export interface BaseTableLineProps<TSort extends string = never> {
5
+ readonly columns: ReadonlyArray<BaseTableColumn<TSort>>;
6
+ readonly cells: Readonly<Record<string, ReactNode>>;
7
+ readonly last: boolean;
8
+ readonly href?: string;
9
+ readonly disabled?: boolean;
10
+ readonly disabledStyle?: boolean;
11
+ /** Extra row className, e.g. RWA accent tint. */
12
+ readonly accentClassName?: string;
13
+ readonly onRowClick?: () => void;
14
+ readonly "data-testid"?: string;
15
+ readonly minHeightClassName?: string;
16
+ }
17
+ /**
18
+ * One row of {@link BaseTable}: desktop cells from the column model, or a
19
+ * stacked mobile card driven by each column's `mobile` role.
20
+ */
21
+ export declare function BaseTableLine<TSort extends string = never>({ columns, cells, last, href, disabled, disabledStyle, accentClassName, onRowClick, "data-testid": testId, minHeightClassName, }: BaseTableLineProps<TSort>): React.ReactElement;
@@ -0,0 +1,19 @@
1
+ import { default as React, PropsWithChildren, ReactNode } from 'react';
2
+ import { BaseTableColumn, BaseTableSortApi } from './types';
3
+ export { BaseTableTest } from './constants';
4
+ export type { BaseTableColumn, BaseTableSortApi } from './types';
5
+ export interface BaseTableProps<TSort extends string = never> {
6
+ readonly columns: ReadonlyArray<BaseTableColumn<TSort>>;
7
+ readonly isLoading: boolean;
8
+ readonly emptyMessage: ReactNode;
9
+ readonly sort?: BaseTableSortApi<TSort>;
10
+ readonly rowHeight?: string;
11
+ readonly loaderRows?: number;
12
+ readonly className?: string;
13
+ readonly wrapperClassName?: string;
14
+ }
15
+ /**
16
+ * Declarative data table over {@link GridTable}: column model, sort headers,
17
+ * loading skeleton and empty state. Mobile collapses to a single track.
18
+ */
19
+ export declare function BaseTable<TSort extends string = never>({ columns, isLoading, emptyMessage, sort, rowHeight, loaderRows, className, wrapperClassName, children, }: PropsWithChildren<BaseTableProps<TSort>>): React.ReactElement;
@@ -0,0 +1,8 @@
1
+ export declare class BaseTableTest {
2
+ static root: string;
3
+ static head: string;
4
+ static empty: string;
5
+ }
6
+ export declare class BaseTableLineTest {
7
+ static root: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ export * from './base-table';
2
+ export * from './base-table-line';
3
+ export type * from './types';
@@ -0,0 +1,37 @@
1
+ import { ReactNode } from 'react';
2
+ type BaseTableColumnJustify = "start" | "end";
3
+ /**
4
+ * Mobile placement for a column inside {@link BaseTableLine}:
5
+ * - `title` — primary identity block (name / tokens)
6
+ * - `badge` — compact chip next to the title (also unclipped on desktop)
7
+ * - `stat` — labeled metric in the stats grid
8
+ * - `block` — full-width labeled block under the stats
9
+ * - `hidden` — desktop-only
10
+ */
11
+ type BaseTableColumnMobile = "title" | "badge" | "stat" | "block" | "hidden";
12
+ interface BaseTableColumnSort<TSort extends string = never> {
13
+ readonly field: TSort;
14
+ readonly defaultDirection: "asc" | "desc";
15
+ /** Plain string for HeadCell `sortField` (a11y / tooltip). */
16
+ readonly label: string;
17
+ }
18
+ /**
19
+ * Column model shared by {@link BaseTable} (tracks + header) and
20
+ * {@link BaseTableLine} (desktop cells + mobile labels).
21
+ */
22
+ export interface BaseTableColumn<TSort extends string = never> {
23
+ readonly id: string;
24
+ readonly title: ReactNode;
25
+ /** CSS grid track, e.g. `"minmax(320px,3fr)"`. */
26
+ readonly track: string;
27
+ readonly justify?: BaseTableColumnJustify;
28
+ readonly sort?: BaseTableColumnSort<TSort>;
29
+ readonly headClassName?: string;
30
+ readonly cellClassName?: string;
31
+ readonly mobile?: BaseTableColumnMobile;
32
+ }
33
+ export interface BaseTableSortApi<TSort extends string> {
34
+ readonly getSortDirection: (field: TSort) => "asc" | "desc" | undefined;
35
+ readonly onSort: (field: TSort, defaultDirection: "asc" | "desc") => void;
36
+ }
37
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface AllocationWheelProps {
3
+ /** Slice share in 0..1 of the total allocation. */
4
+ readonly share: number;
5
+ /** Palette index for token slices; ignored when {@link idle}. */
6
+ readonly colorIndex: number;
7
+ readonly idle?: boolean;
8
+ }
9
+ /** 20px donut showing one slice's share of the total. */
10
+ export declare function AllocationWheel({ share, colorIndex, idle, }: AllocationWheelProps): React.ReactElement;
@@ -0,0 +1,23 @@
1
+ import { Amount, Token } from '@gearbox-protocol/sdk/model';
2
+ import { default as React } from 'react';
3
+ export type CollateralAllocationSlice = {
4
+ kind: "token";
5
+ token: Token;
6
+ amount: Amount;
7
+ } | {
8
+ kind: "idle";
9
+ amount: Amount;
10
+ };
11
+ export interface CollateralAllocation {
12
+ slices: ReadonlyArray<CollateralAllocationSlice>;
13
+ }
14
+ export interface CollateralAllocationTooltipProps {
15
+ readonly data: CollateralAllocation;
16
+ readonly children?: React.ReactNode;
17
+ readonly className?: string;
18
+ }
19
+ /**
20
+ * Pool collateral mix for Earn table hover — token rows plus an Idle remainder.
21
+ * Slice shares are derived from `amount.valueUsd`.
22
+ */
23
+ export declare function CollateralAllocationTooltip({ data, children, className, }: CollateralAllocationTooltipProps): React.ReactElement;
@@ -0,0 +1,8 @@
1
+ export declare class CollateralAllocationTooltipTest {
2
+ static root: string;
3
+ static row: string;
4
+ static wheel: string;
5
+ }
6
+ export declare class AllocationWheelTest {
7
+ static root: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ export * from './allocation-wheel';
2
+ export * from './collateral-allocation-tooltip';
3
+ export * from './constants';
@@ -0,0 +1,6 @@
1
+ export declare class PoolAssetsTableTest {
2
+ static root: string;
3
+ static exposureCell: string;
4
+ static capCell: string;
5
+ static capUtilizationCell: string;
6
+ }
@@ -1,3 +1,4 @@
1
+ export * from './constants';
1
2
  export * from './pool-assets-table';
2
3
  export * from './pool-assets-table-head';
3
4
  export * from './pool-assets-table-row';
@@ -1,10 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  import { PoolAssetsTableSort } from './types';
3
- /** Props for {@link PoolAssetsTableHead}. */
4
3
  export interface PoolAssetsTableHeadProps {
5
4
  readonly sort: PoolAssetsTableSort;
6
5
  }
7
6
  /**
8
- * Header row: sortable Asset, Rate, and Limits columns (`components.poolAssetsTable.*` locale keys).
7
+ * Header row: sortable Name / Exposure / Cap / Cap utilization.
9
8
  */
10
9
  export declare function PoolAssetsTableHead({ sort, }: PoolAssetsTableHeadProps): React.ReactElement;
@@ -1,15 +1,15 @@
1
- import { TokenData } from '@gearbox-protocol/sdk/common-utils';
1
+ import { QuotaAsset, Token } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
- import { PoolAssetsTableQuotaRow } from './types';
4
- /** Props for {@link PoolAssetsTableRow}. */
5
3
  export interface PoolAssetsTableRowProps {
6
4
  readonly poolName: string;
7
- readonly token: TokenData | undefined;
8
- readonly currentQuota: PoolAssetsTableQuotaRow;
9
- readonly underlyingToken: TokenData;
5
+ readonly asset: QuotaAsset;
6
+ readonly underlyingToken: Token;
10
7
  readonly last: boolean;
8
+ readonly isCompact: boolean;
9
+ readonly totalUsed: bigint;
10
+ readonly colorIndex: number;
11
11
  }
12
12
  /**
13
- * Single data row: token + pool name, `percentageTemplate` rate, and formatted usage vs limit.
13
+ * Single data row: token name, exposure (amount + pie), cap, and cap utilization.
14
14
  */
15
- export declare function PoolAssetsTableRow({ poolName, token, currentQuota, underlyingToken, last, }: PoolAssetsTableRowProps): React.ReactElement;
15
+ export declare function PoolAssetsTableRow({ poolName, asset, underlyingToken, last, isCompact, totalUsed, colorIndex, }: PoolAssetsTableRowProps): React.ReactElement;
@@ -1,27 +1,14 @@
1
- import { TokenData } from '@gearbox-protocol/sdk/common-utils';
1
+ import { QuotaAsset, Token } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
- import { Address } from 'viem';
4
- import { PoolAssetsTableQuotaRow, PoolAssetsTableSort } from './types';
5
- /**
6
- * Props for {@link PoolAssetsTable}.
7
- */
3
+ import { PoolAssetsTableSort } from './types';
8
4
  export interface PoolAssetsTableProps {
9
- /** Quota rows to render (one per asset). */
10
- readonly list: ReadonlyArray<PoolAssetsTableQuotaRow>;
11
- /** Pool name shown under the asset title. */
5
+ readonly list: ReadonlyArray<QuotaAsset>;
12
6
  readonly poolName: string;
13
7
  readonly sort: PoolAssetsTableSort;
14
- /** Token metadata keyed by token address (must include every `quota.token`). */
15
- readonly tokensList: Partial<Record<Address, TokenData>>;
16
- /** Underlying asset used for `TokenTemplate` amounts in the usage column. */
17
- readonly underlyingToken: TokenData;
8
+ readonly underlyingToken: Token;
18
9
  }
19
10
  /**
20
- * Legacy GridTable of pool asset quotas (`TokenData` field props).
21
- * Canonical consumer table is client-v3 `PoolsAssetsTable` (`data: PoolOpportunityDetail`).
22
- * Do not add a third table in this pass — next-stage `table/` absorbs this.
23
- *
24
- * On viewports below the mobile breakpoint the header is hidden and each row
25
- * uses the compact `TableLineSm` layout.
11
+ * Grid table of pool asset quotas: exposure, cap, and cap utilization.
12
+ * Collapses into stacked cards below {@link COMPACT_WIDTH_THRESHOLD}.
26
13
  */
27
- export declare function PoolAssetsTable({ list, poolName, sort, tokensList, underlyingToken, }: PoolAssetsTableProps): React.ReactElement | null;
14
+ export declare function PoolAssetsTable({ list, poolName, sort, underlyingToken, }: PoolAssetsTableProps): React.ReactElement | null;
@@ -1,7 +1,7 @@
1
- import { Address } from 'viem';
1
+ import { QuotaAsset } from '@gearbox-protocol/sdk/model';
2
2
  import { SortField, SortSetterFunction } from '../../../hooks';
3
3
  /** Column identifiers used by the pool assets table header sort controls. */
4
- export type PoolAssetsSortFields = "name" | "rate" | "usage";
4
+ export type PoolAssetsSortFields = "name" | "exposure" | "cap" | "capUtilization";
5
5
  /**
6
6
  * Sort state + setter wired to `HeadCell` / `useSort` (same pattern as `PoolTable`).
7
7
  */
@@ -13,13 +13,5 @@ export interface PoolAssetsTableSort {
13
13
  export interface PoolAssetsFilterState {
14
14
  readonly sort: PoolAssetsTableSort;
15
15
  }
16
- /**
17
- * One asset line: quota limit, usage, and borrow rate.
18
- * Shape aligns with Gearbox SDK quota / QuotaInfo-style data.
19
- */
20
- export interface PoolAssetsTableQuotaRow {
21
- readonly token: Address;
22
- readonly limit: bigint;
23
- readonly totalQuoted: bigint;
24
- readonly rate: bigint;
25
- }
16
+ /** One quota row — the SDK's {@link QuotaAsset}. */
17
+ export type PoolAssetsTableQuotaRow = QuotaAsset;
@@ -1,3 +1,4 @@
1
+ import { TokenAmount } from '@gearbox-protocol/sdk/model';
1
2
  import { VariantProps } from 'class-variance-authority';
2
3
  import { default as React } from 'react';
3
4
  import { TokenTemplateProps } from '../../../../token-template';
@@ -5,25 +6,57 @@ declare const rootVariants: (props?: ({
5
6
  position?: "first" | "last" | "inBetween" | "solo" | null | undefined;
6
7
  size?: "sm" | "md" | null | undefined;
7
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
- export interface TransactionConfirmAmountFieldProps extends VariantProps<typeof rootVariants> {
9
+ type PrimarySlot = {
10
+ readonly value: TokenTemplateProps["value"];
11
+ readonly token?: TokenTemplateProps["token"];
12
+ } | {
13
+ node: React.ReactNode;
14
+ };
15
+ type SecondarySlot = {
16
+ readonly valueUSD?: bigint | number;
17
+ } | {
18
+ node: React.ReactNode;
19
+ };
20
+ /**
21
+ * Either hand over the SDK's {@link TokenAmount} whole, or fill the two slots
22
+ * yourself. The slot form stays for the `node` escape hatch and for callers
23
+ * that have no `TokenAmount` to give.
24
+ */
25
+ type AmountSource = {
26
+ /**
27
+ * Value, token and the USD caption all read off one SDK amount.
28
+ * `null` means unavailable and renders like any other absent value.
29
+ */
30
+ readonly amount: TokenAmount | null;
31
+ readonly primaryAmount?: undefined;
32
+ readonly secondaryAmount?: undefined;
33
+ } | {
34
+ readonly amount?: undefined;
35
+ readonly primaryAmount: PrimarySlot;
36
+ readonly secondaryAmount?: SecondarySlot;
37
+ };
38
+ export type TransactionConfirmAmountFieldProps = VariantProps<typeof rootVariants> & AmountSource & {
9
39
  readonly label: React.ReactNode;
10
- readonly primaryAmount: {
11
- readonly value: TokenTemplateProps["value"];
12
- readonly token?: TokenTemplateProps["token"];
13
- } | {
14
- node: React.ReactNode;
15
- };
16
- readonly secondaryAmount?: {
17
- readonly valueUSD?: bigint | number;
18
- } | {
19
- node: React.ReactNode;
20
- };
21
40
  readonly loading?: boolean;
22
41
  readonly maxLength?: number;
23
42
  readonly approximate?: {
24
43
  isApproximate?: boolean;
25
44
  approximateSymbol?: string;
26
45
  };
27
- }
28
- export declare function TransactionConfirmAmountField({ label, primaryAmount, secondaryAmount, loading, position, size, maxLength, approximate, }: TransactionConfirmAmountFieldProps): React.ReactElement;
46
+ };
47
+ /**
48
+ * One SDK amount already carries all three things the field shows: the number,
49
+ * its token and the dollar value. Callers used to take it apart and hand the
50
+ * pieces back through two props; passing `amount` lets them stop.
51
+ *
52
+ * Takes the whole prop union so the slot form is picked by the discriminant
53
+ * rather than by a cast — `amount` is `TokenAmount | null`, never `undefined`,
54
+ * so a caller holding `TokenAmount | undefined` has to say `?? null` and
55
+ * cannot land here with nothing at all.
56
+ */
57
+ export declare function resolveAmountSlots(source: AmountSource): {
58
+ readonly primaryAmount: PrimarySlot;
59
+ readonly secondaryAmount: SecondarySlot | undefined;
60
+ };
61
+ export declare function TransactionConfirmAmountField(props: TransactionConfirmAmountFieldProps): React.ReactElement;
29
62
  export {};
@@ -1,2 +1,2 @@
1
1
  export * from './constants';
2
- export * from './TransactionConfirmAmountField';
2
+ export { TransactionConfirmAmountField, type TransactionConfirmAmountFieldProps, } from './TransactionConfirmAmountField';
@@ -1,23 +1,27 @@
1
1
  import { default as React } from 'react';
2
- import { TransactionExecutionStepView } from '../stepper/transactionExecutionStepTypes';
3
- import { TransactionConfirmPhase } from './transactionConfirmPhase';
4
- export interface TransactionConfirmShellProps {
5
- readonly phase?: TransactionConfirmPhase;
6
- readonly header?: React.ReactNode;
7
- readonly preview: React.ReactNode;
8
- readonly previewLoading?: boolean;
9
- readonly previewError?: Error | null;
10
- readonly previewErrorTitle?: string;
11
- readonly previewClassName?: string;
12
- readonly execution: React.ReactNode;
13
- readonly progressSteps?: ReadonlyArray<TransactionExecutionStepView>;
14
- readonly renderProgressStepLabel?: (step: TransactionExecutionStepView) => React.ReactNode;
15
- readonly result?: React.ReactNode;
16
- readonly className?: string;
17
- readonly "data-testid"?: string;
18
- }
2
+ import { TransactionConfirmShellProps } from './transactionConfirmShellTypes';
19
3
  /**
4
+ * The one card every transaction confirmation renders, on every surface.
20
5
  *
21
- * Base shell component
6
+ * Callers describe *what the card shows* (`body`) and *how it is framed*
7
+ * (`mode`); everything else is decided here. This replaces the former
8
+ * `TransactionConfirmPageView` / `TransactionConfirmModalView` pair, which
9
+ * differed only in the frame yet each restated the whole prop list.
10
+ *
11
+ * Two traps from that pair are closed here rather than left to callers.
12
+ *
13
+ * The modal's height clamp is composed with `className` instead of being
14
+ * replaced by it, so a caller adding a class no longer drops the viewport
15
+ * clamp and the flex context the scrollable preview depends on by accident.
16
+ * `cn` is tailwind-merge, so a utility deliberately targeting the same
17
+ * property still wins — though arbitrary-property syntax such as
18
+ * `[max-height:50vh]` sits in a different group and will not displace it.
19
+ *
20
+ * And a `placeholder` or `error` body pins the phase to `confirm`, so those
21
+ * two can never be asked for a result view they were never given. Note the
22
+ * limit of that guarantee: a `ready` body driven to a terminal phase without a
23
+ * `result` still draws a header and nothing else, exactly as the views it
24
+ * replaces did. Requiring both halves of `result` is what keeps the promise
25
+ * whole once a caller opts into one.
22
26
  */
23
- export declare function TransactionConfirmShell({ phase, header, preview, previewLoading, previewError, previewErrorTitle, previewClassName, execution, progressSteps, renderProgressStepLabel, result, className, "data-testid": dataTestId, }: TransactionConfirmShellProps): React.ReactElement;
27
+ export declare function TransactionConfirmShell(props: TransactionConfirmShellProps): React.ReactElement | null;
@@ -1,5 +1,5 @@
1
1
  export * from './computeTransactionConfirmDialogLayout';
2
2
  export * from './constants';
3
- export * from './TransactionConfirmModalView';
4
- export * from './TransactionConfirmPageView';
3
+ export * from './TransactionConfirmShell';
5
4
  export * from './transactionConfirmPhase';
5
+ export * from './transactionConfirmShellTypes';
@@ -1,4 +1 @@
1
1
  export type TransactionConfirmPhase = "confirm" | "awaiting_receipt" | "success" | "failure";
2
- export interface TransactionConfirmSubmittedTx {
3
- readonly hash: `0x${string}`;
4
- }