@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,46 +1,46 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useTitleText as f } from "../text/use-title-text.js";
3
- import { FadeoutLoading as m } from "../../fadeout-loading/fadeout-loading.js";
4
- import { HealthFactor as s } from "../../health-factor/health-factor.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useTitleText as h } from "../text/use-title-text.js";
3
+ import { FadeoutLoading as s } from "../../fadeout-loading/fadeout-loading.js";
4
+ import { HealthFactor as c } from "../../health-factor/health-factor.js";
5
5
  import { FormattedMessageTyped as n } from "../../typed-intl/index.js";
6
- import { VerticalIndicator as F } from "../../vertical-indicator/vertical-indicator.js";
7
- import { HealthFactorBlockTest as o } from "./constants.js";
6
+ import { VerticalIndicator as g } from "../../vertical-indicator/vertical-indicator.js";
7
+ import { HealthFactorBlockTest as t } from "./constants.js";
8
8
  function b({
9
- hf: e,
10
- hfTo: a,
9
+ healthFactor: e,
10
+ healthFactorTo: a,
11
11
  debt: r,
12
12
  debtTo: p,
13
- zone: l,
14
- isLoading: i,
13
+ zone: i,
14
+ isLoading: l,
15
15
  title: d,
16
16
  tip: u,
17
17
  testId: v
18
18
  }) {
19
- const h = f(), c = a !== void 0;
20
- return /* @__PURE__ */ t(
21
- F,
19
+ const f = h(), m = a !== void 0;
20
+ return /* @__PURE__ */ o(
21
+ g,
22
22
  {
23
23
  align: "center",
24
24
  dimPreviousValue: !1,
25
- "data-testid": v ?? o.root,
26
- label: d !== void 0 ? h(d) : /* @__PURE__ */ t(n, { messageId: "components.healthFactorBlock.label" }),
27
- tip: u ?? /* @__PURE__ */ t(n, { messageId: "components.healthFactorBlock.tip" }),
28
- value: /* @__PURE__ */ t(m, { loading: i, children: e === void 0 ? /* @__PURE__ */ t("span", { "data-testid": o.value, children: "—" }) : /* @__PURE__ */ t(
29
- s,
25
+ "data-testid": v ?? t.root,
26
+ label: d !== void 0 ? f(d) : /* @__PURE__ */ o(n, { messageId: "components.healthFactorBlock.label" }),
27
+ tip: u ?? /* @__PURE__ */ o(n, { messageId: "components.healthFactorBlock.tip" }),
28
+ value: /* @__PURE__ */ o(s, { loading: l, children: e === void 0 ? /* @__PURE__ */ o("span", { "data-testid": t.value, children: "—" }) : /* @__PURE__ */ o(
29
+ c,
30
30
  {
31
31
  value: e,
32
32
  debt: r,
33
- zone: c ? void 0 : l,
34
- "data-testid": o.value
33
+ zone: m ? void 0 : i,
34
+ "data-testid": t.value
35
35
  }
36
36
  ) }),
37
- valueTo: c ? /* @__PURE__ */ t(m, { loading: i, children: /* @__PURE__ */ t(
38
- s,
37
+ valueTo: m ? /* @__PURE__ */ o(s, { loading: l, children: /* @__PURE__ */ o(
38
+ c,
39
39
  {
40
40
  value: a,
41
41
  debt: p ?? r,
42
- zone: l,
43
- "data-testid": o.valueTo
42
+ zone: i,
43
+ "data-testid": t.valueTo
44
44
  }
45
45
  ) }) : void 0
46
46
  }
@@ -48,5 +48,5 @@ function b({
48
48
  }
49
49
  export {
50
50
  b as HealthFactorBlock,
51
- o as HealthFactorBlockTest
51
+ t as HealthFactorBlockTest
52
52
  };
@@ -1,70 +1,110 @@
1
- import { jsx as p } from "react/jsx-runtime";
1
+ import { jsx as h } from "react/jsx-runtime";
2
2
  import { useMemo as g } from "react";
3
+ import { useTitleText as E } from "../text/use-title-text.js";
3
4
  import "@gearbox-protocol/static";
4
5
  import "../../checkbox/checkbox.js";
5
6
  import "../../checkbox/checkbox-labeled.js";
6
7
  import "../../select/select.js";
7
- import { TradingView as h } from "../../trading-view/trading-view.js";
8
- import { useIntlTyped as A } from "../../typed-intl/index.js";
9
- import { HistoryChartTest as v } from "./constants.js";
10
- const M = ["1d", "1w", "1m", "1y", "max"], x = {
8
+ import { TradingView as G } from "../../trading-view/trading-view.js";
9
+ import { useIntlTyped as O } from "../../typed-intl/index.js";
10
+ import { HistoryChartTest as R } from "./constants.js";
11
+ const Y = ["1d", "1w", "1m", "1y", "max"], j = {
11
12
  "1d": "1D",
12
- "1w": "1W",
13
+ "1w": "7D",
13
14
  "1m": "1M",
14
15
  "1y": "1Y",
15
16
  max: "MAX"
16
17
  };
17
- function N({
18
+ function q({
18
19
  data: t,
19
- range: r,
20
- onRange: m,
21
- isLoading: d = !1,
22
- error: c,
23
- yMeasureUnit: e = "none",
24
- height: f,
25
- seriesTitles: i,
26
- priceLines: a,
27
- zones: s,
28
- showCurrentValue: y = !1,
29
- yScaleMin: l
20
+ range: o,
21
+ onRange: a,
22
+ isLoading: v = !1,
23
+ error: x,
24
+ yMeasureUnit: i = "none",
25
+ height: S,
26
+ seriesTitles: c,
27
+ priceLines: f,
28
+ zones: u,
29
+ showCurrentValue: I = !1,
30
+ yScaleMin: w,
31
+ title: A,
32
+ trailing: C,
33
+ dualYAxis: L
30
34
  }) {
31
- const n = A(), u = g(() => t ? (Array.isArray(t) ? t : [t]).map(C(i)) : void 0, [t, i]);
32
- return /* @__PURE__ */ p("div", { "data-testid": v.root, children: /* @__PURE__ */ p(
33
- h,
35
+ const y = O(), b = E(), e = g(
36
+ () => Array.isArray(i) ? [...i] : void 0,
37
+ [i]
38
+ ), p = e != null && new Set(e).size > 1, d = L ?? p, l = e?.[0], D = g(() => {
39
+ const r = (n, m) => {
40
+ if (!d) return n;
41
+ if (p && e != null && l != null) {
42
+ const s = e[m] ?? l;
43
+ return {
44
+ ...n,
45
+ priceScaleId: s === l ? "left" : "right"
46
+ };
47
+ }
48
+ return {
49
+ ...n,
50
+ priceScaleId: m === 0 ? "left" : "right"
51
+ };
52
+ };
53
+ if (t)
54
+ return (Array.isArray(t) ? t : [t]).map(
55
+ (m, s) => r(H(c)(m), s)
56
+ );
57
+ if (c)
58
+ return Object.entries(c).map(
59
+ ([n, m], s) => r(
60
+ {
61
+ id: n,
62
+ title: m,
63
+ data: []
64
+ },
65
+ s
66
+ )
67
+ );
68
+ }, [t, c, p, d, l, e]);
69
+ return /* @__PURE__ */ h("div", { "data-testid": R.root, children: /* @__PURE__ */ h(
70
+ G,
34
71
  {
35
- data: u,
36
- isLoading: d,
37
- error: c ? n.formatMessage({ messageId: "components.historyChart.error" }) : void 0,
38
- emptyMessage: n.formatMessage({
72
+ data: D,
73
+ isLoading: v,
74
+ error: x ? y.formatMessage({ messageId: "components.historyChart.error" }) : void 0,
75
+ emptyMessage: y.formatMessage({
39
76
  messageId: "components.historyChart.empty"
40
77
  }),
41
- yMeasureUnit: Array.isArray(e) ? [...e] : e,
42
- height: f,
43
- rangeList: M.map((o) => ({
44
- value: o,
45
- label: x[o]
78
+ dualYAxis: d,
79
+ yMeasureUnit: Array.isArray(i) ? [...i] : i,
80
+ height: S,
81
+ rangeList: Y.map((r) => ({
82
+ value: r,
83
+ label: j[r]
46
84
  })),
47
- range: r,
48
- setRange: (o) => m(o),
49
- priceLineOptions: a ? [...a] : void 0,
50
- zoneOptions: s ? [...s] : void 0,
51
- showCurrentValue: y,
52
- yScaleMin: l,
53
- disableZoom: !0
85
+ range: o,
86
+ setRange: (r) => a(r),
87
+ priceLineOptions: f ? [...f] : void 0,
88
+ zoneOptions: u ? [...u] : void 0,
89
+ showCurrentValue: I,
90
+ yScaleMin: w,
91
+ disableZoom: !0,
92
+ title: A != null ? b(A) : void 0,
93
+ trailing: C
54
94
  }
55
95
  ) });
56
96
  }
57
- function C(t) {
58
- return (r) => ({
59
- id: r.metric,
60
- title: t?.[r.metric] ?? r.metric,
61
- data: r.points.map((m) => ({
62
- time: m.timestamp,
63
- value: m.value
97
+ function H(t) {
98
+ return (o) => ({
99
+ id: o.metric,
100
+ title: t?.[o.metric] ?? o.metric,
101
+ data: o.points.map((a) => ({
102
+ time: a.timestamp,
103
+ value: a.value
64
104
  }))
65
105
  });
66
106
  }
67
107
  export {
68
- N as HistoryChart,
69
- v as HistoryChartTest
108
+ q as HistoryChart,
109
+ R as HistoryChartTest
70
110
  };
@@ -5,163 +5,173 @@ import { BorrowRateBlockTest as f } from "./borrow-rate-block/constants.js";
5
5
  import { ChartWithSideCard as x } from "./chart-with-side-card/chart-with-side-card.js";
6
6
  import { ChartWithSideCardTest as s } from "./chart-with-side-card/constants.js";
7
7
  import { DetailedPageTitle as d } from "./detailed-page-title/detailed-page-title.js";
8
- import { AsideAlignAnchor as P } from "./details-view/detail-aside/detail-aside-scope.js";
8
+ import { AsideAlignAnchor as S } from "./details-view/detail-aside/detail-aside-scope.js";
9
9
  import { DetailAsideScreenLayout as g } from "./details-view/detail-aside/detail-aside-screen-layout.js";
10
10
  import { DetailsView as k, DetailsViewLeftPane as B, DetailsViewManagePane as A } from "./details-view/details-view.js";
11
11
  import { HealthFactorBlockTest as L } from "./health-factor-block/constants.js";
12
- import { HealthFactorBlock as C } from "./health-factor-block/health-factor-block.js";
13
- import { HistoryChart as w } from "./history-chart/history-chart.js";
14
- import { InfoLine as h, InfoList as V, InfoSectionTitle as D } from "./info-list/info-list.js";
12
+ import { HealthFactorBlock as y } from "./health-factor-block/health-factor-block.js";
13
+ import { HistoryChart as h } from "./history-chart/history-chart.js";
14
+ import { InfoLine as M, InfoList as V, InfoSectionTitle as D, PointsInfoLine as H } from "./info-list/info-list.js";
15
15
  import { InfoPortalOut as E, InfoPortalProvider as q } from "./info-portal/info-portal.js";
16
- import { LeverageInput as _ } from "./leverage-input/leverage-input.js";
17
- import { LiquidationParamsTableTest as R } from "./liquidation-params-table/constants.js";
18
- import { LiquidationParamsTable as G } from "./liquidation-params-table/liquidation-params-table.js";
19
- import { LiquidationPriceBlockTest as O } from "./liquidation-price-block/constants.js";
20
- import { LiquidationPriceBlock as z } from "./liquidation-price-block/liquidation-price-block.js";
21
- import { ManagePane as j, ManagePaneActionTab as J, ManagePaneMessage as K, ManagePaneTab as Q, ManagePaneTabDropdown as Y } from "./manage-pane/manage-pane.js";
22
- import { MoreAccordionTest as $ } from "./more-accordion/constants.js";
23
- import { MoreAccordion as oe } from "./more-accordion/more-accordion.js";
24
- import { NestedInfoStackTest as te } from "./nested-info-stack/constants.js";
25
- import { NestedInfoStack as ie } from "./nested-info-stack/nested-info-stack.js";
26
- import { PageTitle as me } from "./page-title/page-title.js";
27
- import { PoolApyBreakdownCardTest as ne } from "./pool-apy-breakdown-card/constants.js";
28
- import { PoolApyBreakdownCard as Te } from "./pool-apy-breakdown-card/pool-apy-breakdown-card.js";
29
- import { ReviewButton as le } from "./review-button/review-button.js";
30
- import { SectionHeading as Se } from "./section-heading/section-heading.js";
31
- import { SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as ce, SegmentedTabs as ge } from "./segmented-tabs/segmented-tabs.js";
32
- import { SideCardTest as ke } from "./side-card/constants.js";
33
- import { SideCard as Ae } from "./side-card/side-card.js";
34
- import { SPACE_HEIGHT as Le, SPACE_PX as ye } from "./spacing.js";
35
- import { Stack as Ie } from "./stack/stack.js";
36
- import { StatBadge as Me, StatBadgeGrid as he } from "./stat-badge/stat-badge.js";
37
- import { StickyBar as De } from "./sticky-bar/sticky-bar.js";
38
- import { StrategyApyBreakdownCardTest as Ee } from "./strategy-apy-breakdown-card/constants.js";
39
- import { StrategyApyBreakdownCard as ve } from "./strategy-apy-breakdown-card/strategy-apy-breakdown-card.js";
40
- import { Tabber as Ne, TabberSection as Re, isTabber as Fe } from "./tabber/tabber.js";
41
- import { useDetailScrollSpy as Ue } from "./tabber/use-detail-scroll-spy.js";
42
- import { useTitleText as We } from "./text/use-title-text.js";
43
- import { TimeToLiquidationBlockTest as Xe } from "./time-to-liquidation-block/constants.js";
44
- import { TimeToLiquidationBlock as Je } from "./time-to-liquidation-block/time-to-liquidation-block.js";
45
- import { TitleMetaTest as Qe } from "./title-meta/constants.js";
46
- import { TitleMeta as Ze } from "./title-meta/title-meta.js";
47
- import { TokenAmount as eo } from "./token-amount/token-amount.js";
48
- import { TokenPairSymbolTest as ro } from "./token-pair-symbol/constants.js";
49
- import { TokenPairSymbol as ao } from "./token-pair-symbol/token-pair-symbol.js";
50
- import { TokenPairTitleTest as po } from "./token-pair-title/constants.js";
51
- import { TokenPairTitle as fo } from "./token-pair-title/token-pair-title.js";
52
- import { PositionShortLabelTest as xo, ValueTest as To } from "./values/constants.js";
53
- import { PnlValue as lo } from "./values/pnl-value.js";
54
- import { PositionShortLabel as Po } from "./values/position-short-label.js";
55
- import { PositionTypeBadge as go } from "./values/position-type-badge.js";
56
- import { ApyValue as ko, HealthFactorValue as Bo, LeverageValue as Ao, TokenBigint as bo, UsdValue as Lo, UtilizationValue as yo, bps as Co } from "./values/scalars.js";
57
- import { AmountInputTest as wo } from "./amount-input/constants.js";
58
- import { DetailedPageTitleTest as ho } from "./detailed-page-title/constants.js";
59
- import { DetailsViewTest as Do } from "./details-view/constants.js";
60
- import { HistoryChartTest as Eo } from "./history-chart/constants.js";
61
- import { InfoListTest as vo } from "./info-list/constants.js";
62
- import { LeverageInputTest as No } from "./leverage-input/constants.js";
63
- import { ManagePaneTest as Fo } from "./manage-pane/constants.js";
64
- import { PageTitleTest as Uo } from "./page-title/constants.js";
65
- import { ReviewButtonTest as Wo } from "./review-button/constants.js";
66
- import { SectionHeadingTest as Xo } from "./section-heading/constants.js";
67
- import { SegmentedTabsTest as Jo } from "./segmented-tabs/constants.js";
68
- import { StackTest as Qo } from "./stack/constants.js";
69
- import { StatBadgeTest as Zo } from "./stat-badge/constants.js";
70
- import { StickyBarTest as er } from "./sticky-bar/constants.js";
71
- import { TabberTest as rr } from "./tabber/constants.js";
72
- import { TokenAmountTest as ar } from "./token-amount/constants.js";
16
+ import { LeverageInput as N } from "./leverage-input/leverage-input.js";
17
+ import { LeveragePresetChipsTest as F } from "./leverage-preset-chips/constants.js";
18
+ import { LeveragePresetChips as U } from "./leverage-preset-chips/leverage-preset-chips.js";
19
+ import { LiquidationParamsTableTest as W } from "./liquidation-params-table/constants.js";
20
+ import { LiquidationParamsTable as X } from "./liquidation-params-table/liquidation-params-table.js";
21
+ import { LiquidationPriceBlockTest as J } from "./liquidation-price-block/constants.js";
22
+ import { LiquidationPriceBlock as Q } from "./liquidation-price-block/liquidation-price-block.js";
23
+ import { ManagePane as Z, ManagePaneActionTab as $, ManagePaneMessage as ee, ManagePaneTab as oe, ManagePaneTabDropdown as re } from "./manage-pane/manage-pane.js";
24
+ import { MoreAccordionTest as ae } from "./more-accordion/constants.js";
25
+ import { MoreAccordion as pe } from "./more-accordion/more-accordion.js";
26
+ import { NestedInfoStackTest as fe } from "./nested-info-stack/constants.js";
27
+ import { NestedInfoStack as xe } from "./nested-info-stack/nested-info-stack.js";
28
+ import { PageHeadProvider as se, PageTitle as le } from "./page-title/page-title.js";
29
+ import { PoolApyBreakdownCardTest as Pe } from "./pool-apy-breakdown-card/constants.js";
30
+ import { PoolApyBreakdownCard as ce } from "./pool-apy-breakdown-card/pool-apy-breakdown-card.js";
31
+ import { ReviewButton as ue } from "./review-button/review-button.js";
32
+ import { SectionHeading as Be } from "./section-heading/section-heading.js";
33
+ import { SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as be, SegmentedTabs as Le } from "./segmented-tabs/segmented-tabs.js";
34
+ import { SideCardTest as ye } from "./side-card/constants.js";
35
+ import { SideCard as he } from "./side-card/side-card.js";
36
+ import { SPACE_HEIGHT as Me, SPACE_PX as Ve } from "./spacing.js";
37
+ import { Stack as He } from "./stack/stack.js";
38
+ import { StatBadge as Ee, StatBadgeGrid as qe } from "./stat-badge/stat-badge.js";
39
+ import { StickyBar as Ne } from "./sticky-bar/sticky-bar.js";
40
+ import { StrategyApyBreakdownCardTest as Fe } from "./strategy-apy-breakdown-card/constants.js";
41
+ import { StrategyApyBreakdownCard as Ue } from "./strategy-apy-breakdown-card/strategy-apy-breakdown-card.js";
42
+ import { Tabber as We, TabberSection as ze, isTabber as Xe } from "./tabber/tabber.js";
43
+ import { useDetailScrollSpy as Je } from "./tabber/use-detail-scroll-spy.js";
44
+ import { useTitleText as Qe } from "./text/use-title-text.js";
45
+ import { TimeToLiquidationBlockTest as Ze } from "./time-to-liquidation-block/constants.js";
46
+ import { TimeToLiquidationBlock as eo } from "./time-to-liquidation-block/time-to-liquidation-block.js";
47
+ import { TitleMetaTest as ro } from "./title-meta/constants.js";
48
+ import { TitleMeta as ao } from "./title-meta/title-meta.js";
49
+ import { TokenAmount as po } from "./token-amount/token-amount.js";
50
+ import { TokenPairSymbolTest as fo } from "./token-pair-symbol/constants.js";
51
+ import { TokenPairSymbol as xo } from "./token-pair-symbol/token-pair-symbol.js";
52
+ import { TokenPairTitleTest as so } from "./token-pair-title/constants.js";
53
+ import { TokenPairTitle as Po } from "./token-pair-title/token-pair-title.js";
54
+ import { PositionShortLabelTest as co, ValueTest as go } from "./values/constants.js";
55
+ import { PnlValue as ko } from "./values/pnl-value.js";
56
+ import { PointsValue as Ao } from "./values/points-value.js";
57
+ import { PositionShortLabel as Lo } from "./values/position-short-label.js";
58
+ import { PositionStatusBadge as yo } from "./values/position-status-badge.js";
59
+ import { PositionTypeBadge as ho } from "./values/position-type-badge.js";
60
+ import { ApyValue as Mo, HealthFactorValue as Vo, LeverageValue as Do, TokenBigint as Ho, UsdValue as vo, UtilizationValue as Eo, bps as qo } from "./values/scalars.js";
61
+ import { AmountInputTest as No } from "./amount-input/constants.js";
62
+ import { DetailedPageTitleTest as Fo } from "./detailed-page-title/constants.js";
63
+ import { DetailsViewTest as Uo } from "./details-view/constants.js";
64
+ import { HistoryChartTest as Wo } from "./history-chart/constants.js";
65
+ import { InfoListTest as Xo } from "./info-list/constants.js";
66
+ import { LeverageInputTest as Jo } from "./leverage-input/constants.js";
67
+ import { ManagePaneTest as Qo } from "./manage-pane/constants.js";
68
+ import { PageTitleTest as Zo } from "./page-title/constants.js";
69
+ import { ReviewButtonTest as er } from "./review-button/constants.js";
70
+ import { SectionHeadingTest as rr } from "./section-heading/constants.js";
71
+ import { SegmentedTabsTest as ar } from "./segmented-tabs/constants.js";
72
+ import { StackTest as pr } from "./stack/constants.js";
73
+ import { StatBadgeTest as fr } from "./stat-badge/constants.js";
74
+ import { StickyBarTest as xr } from "./sticky-bar/constants.js";
75
+ import { TabberTest as sr } from "./tabber/constants.js";
76
+ import { TokenAmountTest as dr } from "./token-amount/constants.js";
73
77
  export {
74
78
  r as AmountInput,
75
- wo as AmountInputTest,
76
- ko as ApyValue,
77
- P as AsideAlignAnchor,
79
+ No as AmountInputTest,
80
+ Mo as ApyValue,
81
+ S as AsideAlignAnchor,
78
82
  p as BorrowRateBlock,
79
83
  f as BorrowRateBlockTest,
80
84
  x as ChartWithSideCard,
81
85
  s as ChartWithSideCardTest,
82
86
  g as DetailAsideScreenLayout,
83
87
  d as DetailedPageTitle,
84
- ho as DetailedPageTitleTest,
88
+ Fo as DetailedPageTitleTest,
85
89
  k as DetailsView,
86
90
  B as DetailsViewLeftPane,
87
91
  A as DetailsViewManagePane,
88
- Do as DetailsViewTest,
89
- C as HealthFactorBlock,
92
+ Uo as DetailsViewTest,
93
+ y as HealthFactorBlock,
90
94
  L as HealthFactorBlockTest,
91
- Bo as HealthFactorValue,
92
- w as HistoryChart,
93
- Eo as HistoryChartTest,
94
- h as InfoLine,
95
+ Vo as HealthFactorValue,
96
+ h as HistoryChart,
97
+ Wo as HistoryChartTest,
98
+ M as InfoLine,
95
99
  V as InfoList,
96
- vo as InfoListTest,
100
+ Xo as InfoListTest,
97
101
  E as InfoPortalOut,
98
102
  q as InfoPortalProvider,
99
103
  D as InfoSectionTitle,
100
- _ as LeverageInput,
101
- No as LeverageInputTest,
102
- Ao as LeverageValue,
103
- G as LiquidationParamsTable,
104
- R as LiquidationParamsTableTest,
105
- z as LiquidationPriceBlock,
106
- O as LiquidationPriceBlockTest,
107
- j as ManagePane,
108
- J as ManagePaneActionTab,
109
- K as ManagePaneMessage,
110
- Q as ManagePaneTab,
111
- Y as ManagePaneTabDropdown,
112
- Fo as ManagePaneTest,
113
- oe as MoreAccordion,
114
- $ as MoreAccordionTest,
115
- ie as NestedInfoStack,
116
- te as NestedInfoStackTest,
117
- me as PageTitle,
118
- Uo as PageTitleTest,
119
- lo as PnlValue,
120
- Te as PoolApyBreakdownCard,
121
- ne as PoolApyBreakdownCardTest,
122
- Po as PositionShortLabel,
123
- xo as PositionShortLabelTest,
124
- go as PositionTypeBadge,
125
- le as ReviewButton,
126
- Wo as ReviewButtonTest,
127
- ce as SEGMENTED_TABS_INACTIVE_BUTTON_CLASS,
128
- Le as SPACE_HEIGHT,
129
- ye as SPACE_PX,
130
- Se as SectionHeading,
131
- Xo as SectionHeadingTest,
132
- ge as SegmentedTabs,
133
- Jo as SegmentedTabsTest,
134
- Ae as SideCard,
135
- ke as SideCardTest,
136
- Ie as Stack,
137
- Qo as StackTest,
138
- Me as StatBadge,
139
- he as StatBadgeGrid,
140
- Zo as StatBadgeTest,
141
- De as StickyBar,
142
- er as StickyBarTest,
143
- ve as StrategyApyBreakdownCard,
144
- Ee as StrategyApyBreakdownCardTest,
145
- Ne as Tabber,
146
- Re as TabberSection,
147
- rr as TabberTest,
148
- Je as TimeToLiquidationBlock,
149
- Xe as TimeToLiquidationBlockTest,
150
- Ze as TitleMeta,
151
- Qe as TitleMetaTest,
152
- eo as TokenAmount,
153
- ar as TokenAmountTest,
154
- bo as TokenBigint,
155
- ao as TokenPairSymbol,
156
- ro as TokenPairSymbolTest,
157
- fo as TokenPairTitle,
158
- po as TokenPairTitleTest,
104
+ N as LeverageInput,
105
+ Jo as LeverageInputTest,
106
+ U as LeveragePresetChips,
107
+ F as LeveragePresetChipsTest,
108
+ Do as LeverageValue,
109
+ X as LiquidationParamsTable,
110
+ W as LiquidationParamsTableTest,
111
+ Q as LiquidationPriceBlock,
112
+ J as LiquidationPriceBlockTest,
113
+ Z as ManagePane,
114
+ $ as ManagePaneActionTab,
115
+ ee as ManagePaneMessage,
116
+ oe as ManagePaneTab,
117
+ re as ManagePaneTabDropdown,
118
+ Qo as ManagePaneTest,
119
+ pe as MoreAccordion,
120
+ ae as MoreAccordionTest,
121
+ xe as NestedInfoStack,
122
+ fe as NestedInfoStackTest,
123
+ se as PageHeadProvider,
124
+ le as PageTitle,
125
+ Zo as PageTitleTest,
126
+ ko as PnlValue,
127
+ H as PointsInfoLine,
128
+ Ao as PointsValue,
129
+ ce as PoolApyBreakdownCard,
130
+ Pe as PoolApyBreakdownCardTest,
131
+ Lo as PositionShortLabel,
132
+ co as PositionShortLabelTest,
133
+ yo as PositionStatusBadge,
134
+ ho as PositionTypeBadge,
135
+ ue as ReviewButton,
136
+ er as ReviewButtonTest,
137
+ be as SEGMENTED_TABS_INACTIVE_BUTTON_CLASS,
138
+ Me as SPACE_HEIGHT,
139
+ Ve as SPACE_PX,
140
+ Be as SectionHeading,
141
+ rr as SectionHeadingTest,
142
+ Le as SegmentedTabs,
143
+ ar as SegmentedTabsTest,
144
+ he as SideCard,
145
+ ye as SideCardTest,
146
+ He as Stack,
147
+ pr as StackTest,
148
+ Ee as StatBadge,
149
+ qe as StatBadgeGrid,
150
+ fr as StatBadgeTest,
151
+ Ne as StickyBar,
152
+ xr as StickyBarTest,
153
+ Ue as StrategyApyBreakdownCard,
154
+ Fe as StrategyApyBreakdownCardTest,
155
+ We as Tabber,
156
+ ze as TabberSection,
157
+ sr as TabberTest,
158
+ eo as TimeToLiquidationBlock,
159
+ Ze as TimeToLiquidationBlockTest,
160
+ ao as TitleMeta,
161
+ ro as TitleMetaTest,
162
+ po as TokenAmount,
163
+ dr as TokenAmountTest,
164
+ Ho as TokenBigint,
165
+ xo as TokenPairSymbol,
166
+ fo as TokenPairSymbolTest,
167
+ Po as TokenPairTitle,
168
+ so as TokenPairTitleTest,
159
169
  a as TokenSelectPanel,
160
- Lo as UsdValue,
161
- yo as UtilizationValue,
162
- To as ValueTest,
163
- Co as bps,
164
- Fe as isTabber,
165
- Ue as useDetailScrollSpy,
166
- We as useTitleText
170
+ vo as UsdValue,
171
+ Eo as UtilizationValue,
172
+ go as ValueTest,
173
+ qo as bps,
174
+ Xe as isTabber,
175
+ Je as useDetailScrollSpy,
176
+ Qe as useTitleText
167
177
  };
@@ -1,8 +1,9 @@
1
- import { InfoLine as e, InfoList as f, InfoSectionTitle as n } from "./info-list.js";
1
+ import { InfoLine as t, InfoList as e, InfoSectionTitle as f, PointsInfoLine as i } from "./info-list.js";
2
2
  import { InfoListTest as r } from "./constants.js";
3
3
  export {
4
- e as InfoLine,
5
- f as InfoList,
4
+ t as InfoLine,
5
+ e as InfoList,
6
6
  r as InfoListTest,
7
- n as InfoSectionTitle
7
+ f as InfoSectionTitle,
8
+ i as PointsInfoLine
8
9
  };