@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,12 +1,15 @@
1
1
  import { Token } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
3
  import { Address } from 'viem';
4
+ import { CollateralAllocation } from '../collateral-allocation-tooltip';
4
5
  type Mode = "default" | "cascade";
5
6
  interface CommonOptions {
6
7
  mode?: Mode;
7
8
  showIconTooltip?: boolean;
8
9
  otherTooltip?: React.ReactNode;
9
10
  onOtherClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
11
+ /** When set, hover on the cascade shows the allocation mix instead of per-icon symbols. */
12
+ allocation?: CollateralAllocation;
10
13
  }
11
14
  /**
12
15
  * Single asset cell props (new API)
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import type * as React from "react";
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
4
+ variant?: "default" | "success" | "warning" | "destructive" | "secondary" | "info" | "outline" | "neutral" | "danger" | "accent" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  /**
7
7
  * Badge — component for displaying labels, tags, or status indicators.
@@ -15,6 +15,7 @@ declare const badgeVariants: (props?: ({
15
15
  * - `secondary` — secondary badge with muted background.
16
16
  * - `destructive` — destructive badge with red background for errors/warnings.
17
17
  * - `outline` — outlined badge with border only.
18
+ * - `success` / `info` / `warning` / `danger` / `accent` / `neutral` — tinted chips.
18
19
  *
19
20
  * Note: Prefer using this component instead of native HTML div element for badges.
20
21
  *
@@ -0,0 +1,22 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ export declare class ChipTest {
3
+ static root: string;
4
+ }
5
+ export declare class ChipsTest {
6
+ static root: string;
7
+ static chip: string;
8
+ }
9
+ export type ChipTone = "success" | "info" | "neutral" | "warning" | "danger" | "accent";
10
+ export interface ChipProps {
11
+ readonly children?: ReactNode;
12
+ readonly tone?: ChipTone;
13
+ readonly className?: string;
14
+ }
15
+ /** Tinted {@link Badge} for table/status chips. */
16
+ export declare function Chip({ children, tone, className, }: ChipProps): React.ReactElement;
17
+ export interface ChipsProps {
18
+ readonly children: ReactNode;
19
+ readonly className?: string;
20
+ }
21
+ /** Horizontal row of {@link Chip} (or other badge nodes). */
22
+ export declare function Chips({ children, className }: ChipsProps): React.ReactElement;
@@ -1 +1,2 @@
1
1
  export * from './badge';
2
+ export * from './chip';
@@ -9,8 +9,6 @@ export interface DetailedPageTitleProps {
9
9
  /** Visible heading; a node (e.g. a token-pair title) renders as given. */
10
10
  readonly title: PageTitleText | React.ReactNode;
11
11
  readonly browserTitle?: PageTitleText;
12
- /** Document-head hook forwarded to {@link PageTitle}. */
13
- readonly head?: (browserTitle: string) => React.ReactNode;
14
12
  /**
15
13
  * Token whose icon heads the title. The model `Token` is enough — the icon
16
14
  * is resolved from the symbol inside ui-kit.
@@ -29,4 +27,4 @@ export interface DetailedPageTitleProps {
29
27
  readonly className?: string;
30
28
  }
31
29
  /** Detail screen heading: token icon + title + badges + copy/explorer actions. */
32
- export declare function DetailedPageTitle({ title, browserTitle, head, token, icon, tokenIconSize, disabled, toCopy, explorerLinks, badges, actions, buttonsSlot, meta, actionsPosition, className, }: DetailedPageTitleProps): React.ReactElement;
30
+ export declare function DetailedPageTitle({ title, browserTitle, token, icon, tokenIconSize, disabled, toCopy, explorerLinks, badges, actions, buttonsSlot, meta, actionsPosition, className, }: DetailedPageTitleProps): React.ReactElement;
@@ -1,13 +1,14 @@
1
+ import { Bps } from '@gearbox-protocol/sdk/model';
1
2
  import { default as React } from 'react';
2
3
  import { TitleText } from '../text';
3
4
  import { HFZones } from '../../health-factor';
4
5
  import { HealthFactorBlockTest } from './constants';
5
6
  export { HealthFactorBlockTest };
6
7
  export interface HealthFactorBlockProps {
7
- /** Health factor in basis points (e.g. 15000 = 1.5); omit to render "—". */
8
- readonly hf?: number;
8
+ /** SDK `healthFactor` in basis points (e.g. 15000 = 1.5); omit to render "—". */
9
+ readonly healthFactor?: Bps;
9
10
  /** Target HF after the operation; renders a from → to transition. */
10
- readonly hfTo?: number;
11
+ readonly healthFactorTo?: Bps;
11
12
  /** Debt in base units; a 0n debt renders "N/A". */
12
13
  readonly debt: bigint;
13
14
  /** Debt after the operation (defaults to `debt`). */
@@ -23,7 +24,6 @@ export interface HealthFactorBlockProps {
23
24
  }
24
25
  /**
25
26
  * "Health factor" row of a preview: label + help tip on the left, the zone-
26
- * colored HF (with optional from → to transition) on the right. Design only —
27
- * the reference `HFBlock` markup on bare value props.
27
+ * colored HF (with optional from → to transition) on the right.
28
28
  */
29
- export declare function HealthFactorBlock({ hf, hfTo, debt, debtTo, zone, isLoading, title, tip, testId, }: HealthFactorBlockProps): React.ReactElement;
29
+ export declare function HealthFactorBlock({ healthFactor, healthFactorTo, debt, debtTo, zone, isLoading, title, tip, testId, }: HealthFactorBlockProps): React.ReactElement;
@@ -1,5 +1,6 @@
1
1
  import { HistoryRange, HistorySeries } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
+ import { TitleText } from '../text';
3
4
  import { PriceLineConfig, PriceZoneConfig } from '../../graph';
4
5
  import { YMeasureUnits } from '../../graph/formatters';
5
6
  import { HistoryChartTest } from './constants';
@@ -28,10 +29,19 @@ export interface HistoryChartProps {
28
29
  readonly showCurrentValue?: boolean;
29
30
  /** Y-axis floor when the series has data. */
30
31
  readonly yScaleMin?: number;
32
+ /** Heading to the left of the range dropdown, above the chart frame. */
33
+ readonly title?: TitleText;
34
+ /** Controls to the left of the range dropdown (e.g. leverage chips). */
35
+ readonly trailing?: React.ReactNode;
36
+ /**
37
+ * Force a second Y-axis. When omitted, the chart splits axes only if
38
+ * `yMeasureUnit` lists more than one distinct unit.
39
+ */
40
+ readonly dualYAxis?: boolean;
31
41
  }
32
42
  /**
33
- * Design-only history chart on the TradingView engine: range buttons, legend,
34
- * tooltips, optional reference lines and zones. Takes the SDK's
43
+ * Design-only history chart on the TradingView engine: range dropdown, legend
44
+ * below the frame, tooltips, optional reference lines and zones. Takes the SDK's
35
45
  * `HistorySeries` as it comes — points are mapped 1:1, no fetching.
36
46
  */
37
- export declare function HistoryChart({ data, range, onRange, isLoading, error, yMeasureUnit, height, seriesTitles, priceLines, zones, showCurrentValue, yScaleMin, }: HistoryChartProps): React.ReactElement;
47
+ export declare function HistoryChart({ data, range, onRange, isLoading, error, yMeasureUnit, height, seriesTitles, priceLines, zones, showCurrentValue, yScaleMin, title, trailing, dualYAxis: dualYAxisProp, }: HistoryChartProps): React.ReactElement;
@@ -8,6 +8,7 @@ export * from './history-chart';
8
8
  export * from './info-list';
9
9
  export * from './info-portal';
10
10
  export * from './leverage-input';
11
+ export * from './leverage-preset-chips';
11
12
  export * from './liquidation-params-table';
12
13
  export * from './liquidation-price-block';
13
14
  export * from './manage-pane';
@@ -1,3 +1,4 @@
1
+ import { ApyBreakdown } from '@gearbox-protocol/sdk/model';
1
2
  import { default as React } from 'react';
2
3
  import { TitleText } from '../text';
3
4
  import { InfoListTest } from './constants';
@@ -24,3 +25,9 @@ export interface InfoSectionTitleProps {
24
25
  }
25
26
  /** Uppercase section label inside an `InfoList` (e.g. debt limits). */
26
27
  export declare function InfoSectionTitle({ title, }: InfoSectionTitleProps): React.ReactElement;
28
+ export interface PointsInfoLineProps {
29
+ readonly data: ApyBreakdown | undefined;
30
+ readonly title?: TitleText;
31
+ }
32
+ /** Points row that omits itself when the SDK breakdown has no programs. */
33
+ export declare function PointsInfoLine({ data, title, }: PointsInfoLineProps): React.ReactElement | null;
@@ -35,7 +35,7 @@ export interface LeverageInputProps {
35
35
  }
36
36
  /**
37
37
  * Target leverage of a position, bounded by what the strategy allows.
38
- * Title row carries an inline-editable value (N.NN`) and an optional reset;
38
+ * Title row carries an inline-editable value (`N.NNx`) and an optional reset;
39
39
  * the slider below can show risk bands via `colorIntervals`.
40
40
  */
41
41
  export declare function LeverageInput({ value, onChange, max, min, title, hint, reset, colorIntervals, colorIntervalLabel, size, }: LeverageInputProps): React.ReactElement;
@@ -0,0 +1,4 @@
1
+ export declare const LeveragePresetChipsTest: {
2
+ readonly root: "leverage-preset-chips-root";
3
+ readonly chip: "leverage-preset-chips-chip";
4
+ };
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ export * from './leverage-preset-chips';
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { LeveragePresetChipsTest } from './constants';
3
+ export { LeveragePresetChipsTest };
4
+ export interface LeveragePresetChipsProps {
5
+ readonly options: readonly number[];
6
+ readonly value?: number;
7
+ readonly onChange: (value: number) => void;
8
+ }
9
+ /**
10
+ * Leverage step pills for the yield-chart toolbar. Selected leverage only
11
+ * drives the APY breakdown card, not the chart series.
12
+ */
13
+ export declare function LeveragePresetChips({ options, value, onChange, }: LeveragePresetChipsProps): React.ReactElement | null;
@@ -6,7 +6,7 @@ export interface LiquidationParamsTableProps {
6
6
  readonly data: Pick<StrategyOpportunity, "liquidationThreshold" | "liquidationPremium" | "liquidationFee">;
7
7
  }
8
8
  /**
9
- * Single-row liquidation parameters. Penalty is premium + fee, a presentation
10
- * of two SDK values.
9
+ * Single-row liquidation parameters. Discount is premium + fee, a
10
+ * presentation of two SDK values.
11
11
  */
12
12
  export declare function LiquidationParamsTable({ data, }: LiquidationParamsTableProps): React.ReactElement;
@@ -1,3 +1,4 @@
1
+ import { Token } from '@gearbox-protocol/sdk/model';
1
2
  import { default as React } from 'react';
2
3
  import { TitleText } from '../text';
3
4
  import { HFZones } from '../../health-factor';
@@ -11,8 +12,10 @@ export interface LiquidationPriceBlockProps {
11
12
  readonly price?: bigint | null;
12
13
  /** Price after the operation; renders a from → to transition. */
13
14
  readonly priceTo?: bigint | null;
14
- /** The pair the price is quoted in, e.g. "WETH / USDC". */
15
- readonly pricePair?: React.ReactNode;
15
+ /** Collateral token of the quoted pair. */
16
+ readonly collateral?: Token | null;
17
+ /** Underlying token of the quoted pair. */
18
+ readonly underlying?: Token;
16
19
  /** Zone dot next to the price. */
17
20
  readonly zone?: HFZones;
18
21
  readonly isLoading?: boolean;
@@ -25,6 +28,5 @@ export interface LiquidationPriceBlockProps {
25
28
  /**
26
29
  * "Liquidation price" row of a preview: label + help tip, the formatted price
27
30
  * (with optional from → to and zone dot), and the price pair underneath.
28
- * Design only — the reference `LiquidationPriceBlock` markup on value props.
29
31
  */
30
- export declare function LiquidationPriceBlock({ price, priceTo, pricePair, zone, isLoading, title, tip, testId, }: LiquidationPriceBlockProps): React.ReactElement;
32
+ export declare function LiquidationPriceBlock({ price, priceTo, collateral, underlying, zone, isLoading, title, tip, testId, }: LiquidationPriceBlockProps): React.ReactElement;
@@ -4,5 +4,6 @@ export declare class ManagePaneTest {
4
4
  static dropdown: string;
5
5
  static body: string;
6
6
  static message: string;
7
+ static actionDialog: string;
7
8
  static tab: (id: string) => string;
8
9
  }
@@ -24,7 +24,9 @@ export interface ManagePaneActionTabProps {
24
24
  readonly id: string;
25
25
  readonly title: TitleText;
26
26
  /** Fires without changing the active tab (e.g. "My positions"). */
27
- readonly onClick: () => void;
27
+ readonly onClick?: () => void;
28
+ /** When set, a click opens this content in a dialog instead of switching tabs. */
29
+ readonly children?: React.ReactNode;
28
30
  }
29
31
  export declare function ManagePaneActionTab(_props: ManagePaneActionTabProps): null;
30
32
  export interface ManagePaneProps {
@@ -3,6 +3,17 @@ import { FormatMessageTypedProps } from '../../typed-intl';
3
3
  import { PageTitleTest } from './constants';
4
4
  export { PageTitleTest };
5
5
  export type PageTitleText = FormatMessageTypedProps | string;
6
+ export interface PageHeadProviderProps {
7
+ readonly children: React.ReactNode;
8
+ /** Renders the document head for a resolved browser title (e.g. a Helmet node). */
9
+ readonly render: (browserTitle: string) => React.ReactNode;
10
+ }
11
+ /**
12
+ * Optional document-head hook for {@link PageTitle}. Without a provider the
13
+ * visible heading still renders and `<head>` is left alone — ui-kit does not
14
+ * import a head library.
15
+ */
16
+ export declare function PageHeadProvider({ children, render, }: PageHeadProviderProps): React.ReactElement;
6
17
  export interface PageTitleProps {
7
18
  /** Visible heading; a node (e.g. a token-pair title) renders as given. */
8
19
  readonly title: PageTitleText | React.ReactNode;
@@ -11,13 +22,8 @@ export interface PageTitleProps {
11
22
  * Required when {@link title} is a node — a node cannot become a string.
12
23
  */
13
24
  readonly browserTitle?: PageTitleText;
14
- /**
15
- * Renders the document head for the resolved browser title (e.g. a Helmet
16
- * element). The app owns the head library; ui-kit only hands over the string.
17
- */
18
- readonly head?: (browserTitle: string) => React.ReactNode;
19
25
  readonly as?: "h1" | "h2" | "h3" | "span";
20
26
  readonly className?: string;
21
27
  }
22
28
  /** The one visible page heading, plus an optional document-head hook. */
23
- export declare function PageTitle({ title, browserTitle, head, as, className, }: PageTitleProps): React.ReactElement;
29
+ export declare function PageTitle({ title, browserTitle, as, className, }: PageTitleProps): React.ReactElement;
@@ -3,12 +3,11 @@ import { default as React } from 'react';
3
3
  import { PoolApyBreakdownCardTest } from './constants';
4
4
  export { PoolApyBreakdownCardTest };
5
5
  export interface PoolApyBreakdownCardProps {
6
- /** Trailing average APYs in basis points; a missing window renders a dash. */
6
+ /** Organic and incentive APYs in basis points; a missing value renders a dash. */
7
7
  readonly data?: {
8
- readonly apy1d?: Bps;
9
- readonly apy7d?: Bps;
10
- readonly apy30d?: Bps;
8
+ readonly organicApy?: Bps;
9
+ readonly incentiveApy?: Bps;
11
10
  };
12
11
  }
13
- /** Trailing APY windows next to the yield chart. Missing windows render as dashes. */
12
+ /** Organic vs incentive APY next to the pool APY chart. Missing values render as dashes. */
14
13
  export declare function PoolApyBreakdownCard({ data, }: PoolApyBreakdownCardProps): React.ReactElement;
@@ -1,4 +1,5 @@
1
1
  export declare class StrategyApyBreakdownCardTest {
2
2
  static root: string;
3
3
  static row: string;
4
+ static net: string;
4
5
  }
@@ -1,9 +1,17 @@
1
- import { StrategyOpportunity } from '@gearbox-protocol/sdk/model';
1
+ import { ApyBreakdown, Bps, Leverage } from '@gearbox-protocol/sdk/model';
2
2
  import { default as React } from 'react';
3
3
  import { StrategyApyBreakdownCardTest } from './constants';
4
4
  export { StrategyApyBreakdownCardTest };
5
+ export interface StrategyApyBreakdownData {
6
+ readonly collateralApy?: ApyBreakdown;
7
+ readonly borrowApy?: Bps;
8
+ readonly additionalBorrowApy?: Bps;
9
+ readonly maxLeverage?: Leverage;
10
+ }
5
11
  export interface StrategyApyBreakdownCardProps {
6
- readonly data: StrategyOpportunity;
12
+ readonly data: StrategyApyBreakdownData;
13
+ /** Selected leverage from the chart toolbar chips. Falls back to max. */
14
+ readonly leverage?: Leverage;
7
15
  }
8
- /** APY terms next to the strategy yield chart collateral and borrow rates. */
9
- export declare function StrategyApyBreakdownCard({ data, }: StrategyApyBreakdownCardProps): React.ReactElement;
16
+ /** Net APY formula beside the strategy yield chart. Chart itself is unchanged. */
17
+ export declare function StrategyApyBreakdownCard({ data, leverage: leverageProp, }: StrategyApyBreakdownCardProps): React.ReactElement;
@@ -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
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;
@@ -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';