@gearbox-protocol/ui-kit 4.0.0-next.4 → 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 (189) 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/history-chart/history-chart.cjs +1 -1
  8. package/dist/cjs/components/base/index.cjs +1 -1
  9. package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
  10. package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
  11. package/dist/cjs/components/base/leverage-preset-chips/constants.cjs +1 -0
  12. package/dist/cjs/components/base/leverage-preset-chips/index.cjs +1 -0
  13. package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -0
  14. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
  15. package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -1
  16. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  17. package/dist/cjs/components/base/title-meta/constants.cjs +1 -1
  18. package/dist/cjs/components/base/title-meta/title-meta.cjs +1 -1
  19. package/dist/cjs/components/base/values/index.cjs +1 -1
  20. package/dist/cjs/components/base/values/position-status-badge.cjs +1 -0
  21. package/dist/cjs/components/base/values/position-type-badge.cjs +1 -1
  22. package/dist/cjs/components/base-table/base-table-line.cjs +1 -0
  23. package/dist/cjs/components/base-table/base-table.cjs +1 -0
  24. package/dist/cjs/components/base-table/constants.cjs +1 -0
  25. package/dist/cjs/components/base-table/index.cjs +1 -0
  26. package/dist/cjs/components/base-table/types.cjs +1 -0
  27. package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
  28. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  29. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  30. package/dist/cjs/components/collateral-allocation-tooltip/allocation-wheel.cjs +1 -0
  31. package/dist/cjs/components/collateral-allocation-tooltip/collateral-allocation-tooltip.cjs +1 -0
  32. package/dist/cjs/components/collateral-allocation-tooltip/constants.cjs +1 -0
  33. package/dist/cjs/components/collateral-allocation-tooltip/index.cjs +1 -0
  34. package/dist/cjs/components/composites/index.cjs +1 -1
  35. package/dist/cjs/components/composites/pool-assets-table/constants.cjs +1 -0
  36. package/dist/cjs/components/composites/pool-assets-table/index.cjs +1 -1
  37. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
  38. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  39. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
  40. package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
  41. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  42. package/dist/cjs/components/filter/filter-chip.cjs +1 -1
  43. package/dist/cjs/components/graph/default-config.cjs +1 -1
  44. package/dist/cjs/components/graph/graph-view.cjs +1 -1
  45. package/dist/cjs/components/graph/graph.cjs +1 -1
  46. package/dist/cjs/components/hf-indicator/hf-indicator.cjs +1 -0
  47. package/dist/cjs/components/hf-indicator/index.cjs +1 -0
  48. package/dist/cjs/components/index.cjs +1 -1
  49. package/dist/cjs/components/infinite-scroll/index.cjs +1 -0
  50. package/dist/cjs/components/infinite-scroll/infinite-scroll-wrapper.cjs +1 -0
  51. package/dist/cjs/components/name-cell/index.cjs +1 -0
  52. package/dist/cjs/components/name-cell/name-cell.cjs +1 -0
  53. package/dist/cjs/components/network-icon/index.cjs +1 -1
  54. package/dist/cjs/components/network-icon/network-indicator.cjs +1 -0
  55. package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
  56. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  57. package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
  58. package/dist/cjs/configs/tailwind-preset.cjs +1 -1
  59. package/dist/cjs/hooks/index.cjs +1 -1
  60. package/dist/cjs/hooks/use-observed-width-key.cjs +1 -0
  61. package/dist/cjs/index.cjs +1 -1
  62. package/dist/cjs/locale/en.json.cjs +1 -1
  63. package/dist/cjs/utils/format-money.cjs +1 -1
  64. package/dist/cjs/utils/index.cjs +1 -1
  65. package/dist/cjs/utils/leverage-presets.cjs +1 -0
  66. package/dist/esm/components/assets-list-cell/assets-list-cell.js +161 -159
  67. package/dist/esm/components/badge/badge.js +14 -8
  68. package/dist/esm/components/badge/chip.js +47 -0
  69. package/dist/esm/components/badge/index.js +8 -3
  70. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +3 -2
  71. package/dist/esm/components/base/chart-with-side-card/chart-with-side-card.js +6 -6
  72. package/dist/esm/components/base/history-chart/history-chart.js +86 -46
  73. package/dist/esm/components/base/index.js +144 -138
  74. package/dist/esm/components/base/info-list/info-list.js +7 -8
  75. package/dist/esm/components/base/leverage-input/leverage-input.js +1 -1
  76. package/dist/esm/components/base/leverage-preset-chips/constants.js +7 -0
  77. package/dist/esm/components/base/leverage-preset-chips/index.js +6 -0
  78. package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +39 -0
  79. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +23 -30
  80. package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +3 -2
  81. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +194 -32
  82. package/dist/esm/components/base/title-meta/constants.js +1 -0
  83. package/dist/esm/components/base/title-meta/title-meta.js +53 -33
  84. package/dist/esm/components/base/values/index.js +16 -14
  85. package/dist/esm/components/base/values/position-status-badge.js +26 -0
  86. package/dist/esm/components/base/values/position-type-badge.js +7 -6
  87. package/dist/esm/components/base-table/base-table-line.js +117 -0
  88. package/dist/esm/components/base-table/base-table.js +110 -0
  89. package/dist/esm/components/base-table/constants.js +12 -0
  90. package/dist/esm/components/base-table/index.js +9 -0
  91. package/dist/esm/components/base-table/types.js +1 -0
  92. package/dist/esm/components/block-sync-pill/block-sync-pill.js +9 -6
  93. package/dist/esm/components/checkbox/checkbox-labeled.js +7 -4
  94. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +7 -4
  95. package/dist/esm/components/collateral-allocation-tooltip/allocation-wheel.js +71 -0
  96. package/dist/esm/components/collateral-allocation-tooltip/collateral-allocation-tooltip.js +102 -0
  97. package/dist/esm/components/collateral-allocation-tooltip/constants.js +12 -0
  98. package/dist/esm/components/collateral-allocation-tooltip/index.js +9 -0
  99. package/dist/esm/components/composites/index.js +46 -44
  100. package/dist/esm/components/composites/pool-assets-table/constants.js +9 -0
  101. package/dist/esm/components/composites/pool-assets-table/index.js +8 -6
  102. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +52 -30
  103. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +108 -76
  104. package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +44 -26
  105. package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +9 -6
  106. package/dist/esm/components/compound-apy/compound-apy.js +85 -80
  107. package/dist/esm/components/filter/filter-chip.js +1 -0
  108. package/dist/esm/components/graph/default-config.js +20 -18
  109. package/dist/esm/components/graph/graph-view.js +32 -31
  110. package/dist/esm/components/graph/graph.js +459 -458
  111. package/dist/esm/components/hf-indicator/hf-indicator.js +33 -0
  112. package/dist/esm/components/hf-indicator/index.js +4 -0
  113. package/dist/esm/components/index.js +734 -701
  114. package/dist/esm/components/infinite-scroll/index.js +4 -0
  115. package/dist/esm/components/infinite-scroll/infinite-scroll-wrapper.js +30 -0
  116. package/dist/esm/components/name-cell/index.js +4 -0
  117. package/dist/esm/components/name-cell/name-cell.js +35 -0
  118. package/dist/esm/components/network-icon/index.js +4 -2
  119. package/dist/esm/components/network-icon/network-indicator.js +82 -0
  120. package/dist/esm/components/trading-view/trading-view.js +193 -155
  121. package/dist/esm/components/with-copy/with-copy.js +7 -4
  122. package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +112 -169
  123. package/dist/esm/configs/tailwind-preset.js +13 -1
  124. package/dist/esm/hooks/index.js +20 -18
  125. package/dist/esm/hooks/use-observed-width-key.js +24 -0
  126. package/dist/esm/index.js +883 -842
  127. package/dist/esm/locale/en.json.js +21 -18
  128. package/dist/esm/utils/format-money.js +59 -41
  129. package/dist/esm/utils/index.js +87 -83
  130. package/dist/esm/utils/leverage-presets.js +13 -0
  131. package/dist/globals.css +1 -1
  132. package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +3 -0
  133. package/dist/types/components/badge/badge.d.ts +2 -1
  134. package/dist/types/components/badge/chip.d.ts +22 -0
  135. package/dist/types/components/badge/index.d.ts +1 -0
  136. package/dist/types/components/base/history-chart/history-chart.d.ts +13 -3
  137. package/dist/types/components/base/index.d.ts +1 -0
  138. package/dist/types/components/base/leverage-input/leverage-input.d.ts +1 -1
  139. package/dist/types/components/base/leverage-preset-chips/constants.d.ts +4 -0
  140. package/dist/types/components/base/leverage-preset-chips/index.d.ts +2 -0
  141. package/dist/types/components/base/leverage-preset-chips/leverage-preset-chips.d.ts +13 -0
  142. package/dist/types/components/base/liquidation-params-table/liquidation-params-table.d.ts +2 -2
  143. package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +4 -5
  144. package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +1 -0
  145. package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +12 -4
  146. package/dist/types/components/base/title-meta/constants.d.ts +1 -0
  147. package/dist/types/components/base/title-meta/title-meta.d.ts +9 -1
  148. package/dist/types/components/base/values/index.d.ts +1 -0
  149. package/dist/types/components/base/values/position-status-badge.d.ts +7 -0
  150. package/dist/types/components/base/values/position-type-badge.d.ts +1 -1
  151. package/dist/types/components/base-table/base-table-line.d.ts +21 -0
  152. package/dist/types/components/base-table/base-table.d.ts +19 -0
  153. package/dist/types/components/base-table/constants.d.ts +8 -0
  154. package/dist/types/components/base-table/index.d.ts +3 -0
  155. package/dist/types/components/base-table/types.d.ts +37 -0
  156. package/dist/types/components/collateral-allocation-tooltip/allocation-wheel.d.ts +10 -0
  157. package/dist/types/components/collateral-allocation-tooltip/collateral-allocation-tooltip.d.ts +23 -0
  158. package/dist/types/components/collateral-allocation-tooltip/constants.d.ts +8 -0
  159. package/dist/types/components/collateral-allocation-tooltip/index.d.ts +3 -0
  160. package/dist/types/components/composites/pool-assets-table/constants.d.ts +6 -0
  161. package/dist/types/components/composites/pool-assets-table/index.d.ts +1 -0
  162. package/dist/types/components/composites/pool-assets-table/pool-assets-table-head.d.ts +1 -2
  163. package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +8 -8
  164. package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +7 -20
  165. package/dist/types/components/composites/pool-assets-table/types.d.ts +4 -12
  166. package/dist/types/components/graph/graph-view.d.ts +1 -1
  167. package/dist/types/components/graph/graph.d.ts +4 -0
  168. package/dist/types/components/hf-indicator/hf-indicator.d.ts +8 -0
  169. package/dist/types/components/hf-indicator/index.d.ts +1 -0
  170. package/dist/types/components/index.d.ts +5 -0
  171. package/dist/types/components/infinite-scroll/index.d.ts +1 -0
  172. package/dist/types/components/infinite-scroll/infinite-scroll-wrapper.d.ts +11 -0
  173. package/dist/types/components/name-cell/index.d.ts +1 -0
  174. package/dist/types/components/name-cell/name-cell.d.ts +13 -0
  175. package/dist/types/components/network-icon/index.d.ts +1 -0
  176. package/dist/types/components/network-icon/network-indicator.d.ts +23 -0
  177. package/dist/types/components/trading-view/trading-view.d.ts +10 -3
  178. package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +6 -8
  179. package/dist/types/configs/tailwind-preset.d.ts +12 -0
  180. package/dist/types/hooks/index.d.ts +1 -0
  181. package/dist/types/hooks/use-observed-width-key.d.ts +8 -0
  182. package/dist/types/index.d.ts +6 -1
  183. package/dist/types/locale/en.json.d.ts +23 -18
  184. package/dist/types/utils/format-money.d.ts +11 -5
  185. package/dist/types/utils/index.d.ts +2 -1
  186. package/dist/types/utils/leverage-presets.d.ts +7 -0
  187. package/package.json +1 -1
  188. package/src/styles/base.css +30 -0
  189. package/src/styles/theme.css +16 -0
@@ -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
  };
@@ -9,72 +9,75 @@ import { AsideAlignAnchor as S } from "./details-view/detail-aside/detail-aside-
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 V, InfoList as h, InfoSectionTitle as D, PointsInfoLine as H } 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
16
  import { LeverageInput as N } from "./leverage-input/leverage-input.js";
17
- import { LiquidationParamsTableTest as F } from "./liquidation-params-table/constants.js";
18
- import { LiquidationParamsTable as U } from "./liquidation-params-table/liquidation-params-table.js";
19
- import { LiquidationPriceBlockTest as W } from "./liquidation-price-block/constants.js";
20
- import { LiquidationPriceBlock as X } from "./liquidation-price-block/liquidation-price-block.js";
21
- import { ManagePane as J, ManagePaneActionTab as K, ManagePaneMessage as Q, ManagePaneTab as Y, ManagePaneTabDropdown as Z } from "./manage-pane/manage-pane.js";
22
- import { MoreAccordionTest as ee } from "./more-accordion/constants.js";
23
- import { MoreAccordion as re } from "./more-accordion/more-accordion.js";
24
- import { NestedInfoStackTest as ae } from "./nested-info-stack/constants.js";
25
- import { NestedInfoStack as pe } from "./nested-info-stack/nested-info-stack.js";
26
- import { PageHeadProvider as fe, PageTitle as ne } from "./page-title/page-title.js";
27
- import { PoolApyBreakdownCardTest as Te } from "./pool-apy-breakdown-card/constants.js";
28
- import { PoolApyBreakdownCard as le } from "./pool-apy-breakdown-card/pool-apy-breakdown-card.js";
29
- import { ReviewButton as Pe } from "./review-button/review-button.js";
30
- import { SectionHeading as ce } from "./section-heading/section-heading.js";
31
- import { SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as ue, SegmentedTabs as ke } from "./segmented-tabs/segmented-tabs.js";
32
- import { SideCardTest as Ae } from "./side-card/constants.js";
33
- import { SideCard as Le } from "./side-card/side-card.js";
34
- import { SPACE_HEIGHT as Ce, SPACE_PX as Ie } from "./spacing.js";
35
- import { Stack as Me } from "./stack/stack.js";
36
- import { StatBadge as he, StatBadgeGrid as De } from "./stat-badge/stat-badge.js";
37
- import { StickyBar as ve } from "./sticky-bar/sticky-bar.js";
38
- import { StrategyApyBreakdownCardTest as qe } from "./strategy-apy-breakdown-card/constants.js";
39
- import { StrategyApyBreakdownCard as Ne } from "./strategy-apy-breakdown-card/strategy-apy-breakdown-card.js";
40
- import { Tabber as Fe, TabberSection as Ge, isTabber as Ue } from "./tabber/tabber.js";
41
- import { useDetailScrollSpy as We } from "./tabber/use-detail-scroll-spy.js";
42
- import { useTitleText as Xe } from "./text/use-title-text.js";
43
- import { TimeToLiquidationBlockTest as Je } from "./time-to-liquidation-block/constants.js";
44
- import { TimeToLiquidationBlock as Qe } from "./time-to-liquidation-block/time-to-liquidation-block.js";
45
- import { TitleMetaTest as Ze } from "./title-meta/constants.js";
46
- import { TitleMeta as eo } from "./title-meta/title-meta.js";
47
- import { TokenAmount as ro } from "./token-amount/token-amount.js";
48
- import { TokenPairSymbolTest as ao } from "./token-pair-symbol/constants.js";
49
- import { TokenPairSymbol as po } from "./token-pair-symbol/token-pair-symbol.js";
50
- import { TokenPairTitleTest as fo } from "./token-pair-title/constants.js";
51
- import { TokenPairTitle as xo } from "./token-pair-title/token-pair-title.js";
52
- import { PositionShortLabelTest as so, ValueTest as lo } from "./values/constants.js";
53
- import { PnlValue as So } from "./values/pnl-value.js";
54
- import { PointsValue as go } from "./values/points-value.js";
55
- import { PositionShortLabel as ko } from "./values/position-short-label.js";
56
- import { PositionTypeBadge as Ao } from "./values/position-type-badge.js";
57
- import { ApyValue as Lo, HealthFactorValue as yo, LeverageValue as Co, TokenBigint as Io, UsdValue as wo, UtilizationValue as Mo, bps as Vo } from "./values/scalars.js";
58
- import { AmountInputTest as Do } from "./amount-input/constants.js";
59
- import { DetailedPageTitleTest as vo } from "./detailed-page-title/constants.js";
60
- import { DetailsViewTest as qo } from "./details-view/constants.js";
61
- import { HistoryChartTest as No } from "./history-chart/constants.js";
62
- import { InfoListTest as Fo } from "./info-list/constants.js";
63
- import { LeverageInputTest as Uo } from "./leverage-input/constants.js";
64
- import { ManagePaneTest as Wo } from "./manage-pane/constants.js";
65
- import { PageTitleTest as Xo } from "./page-title/constants.js";
66
- import { ReviewButtonTest as Jo } from "./review-button/constants.js";
67
- import { SectionHeadingTest as Qo } from "./section-heading/constants.js";
68
- import { SegmentedTabsTest as Zo } from "./segmented-tabs/constants.js";
69
- import { StackTest as er } from "./stack/constants.js";
70
- import { StatBadgeTest as rr } from "./stat-badge/constants.js";
71
- import { StickyBarTest as ar } from "./sticky-bar/constants.js";
72
- import { TabberTest as pr } from "./tabber/constants.js";
73
- import { TokenAmountTest as fr } from "./token-amount/constants.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";
74
77
  export {
75
78
  r as AmountInput,
76
- Do as AmountInputTest,
77
- Lo as ApyValue,
79
+ No as AmountInputTest,
80
+ Mo as ApyValue,
78
81
  S as AsideAlignAnchor,
79
82
  p as BorrowRateBlock,
80
83
  f as BorrowRateBlockTest,
@@ -82,90 +85,93 @@ export {
82
85
  s as ChartWithSideCardTest,
83
86
  g as DetailAsideScreenLayout,
84
87
  d as DetailedPageTitle,
85
- vo as DetailedPageTitleTest,
88
+ Fo as DetailedPageTitleTest,
86
89
  k as DetailsView,
87
90
  B as DetailsViewLeftPane,
88
91
  A as DetailsViewManagePane,
89
- qo as DetailsViewTest,
90
- C as HealthFactorBlock,
92
+ Uo as DetailsViewTest,
93
+ y as HealthFactorBlock,
91
94
  L as HealthFactorBlockTest,
92
- yo as HealthFactorValue,
93
- w as HistoryChart,
94
- No as HistoryChartTest,
95
- V as InfoLine,
96
- h as InfoList,
97
- Fo as InfoListTest,
95
+ Vo as HealthFactorValue,
96
+ h as HistoryChart,
97
+ Wo as HistoryChartTest,
98
+ M as InfoLine,
99
+ V as InfoList,
100
+ Xo as InfoListTest,
98
101
  E as InfoPortalOut,
99
102
  q as InfoPortalProvider,
100
103
  D as InfoSectionTitle,
101
104
  N as LeverageInput,
102
- Uo as LeverageInputTest,
103
- Co as LeverageValue,
104
- U as LiquidationParamsTable,
105
- F as LiquidationParamsTableTest,
106
- X as LiquidationPriceBlock,
107
- W as LiquidationPriceBlockTest,
108
- J as ManagePane,
109
- K as ManagePaneActionTab,
110
- Q as ManagePaneMessage,
111
- Y as ManagePaneTab,
112
- Z as ManagePaneTabDropdown,
113
- Wo as ManagePaneTest,
114
- re as MoreAccordion,
115
- ee as MoreAccordionTest,
116
- pe as NestedInfoStack,
117
- ae as NestedInfoStackTest,
118
- fe as PageHeadProvider,
119
- ne as PageTitle,
120
- Xo as PageTitleTest,
121
- So as PnlValue,
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,
122
127
  H as PointsInfoLine,
123
- go as PointsValue,
124
- le as PoolApyBreakdownCard,
125
- Te as PoolApyBreakdownCardTest,
126
- ko as PositionShortLabel,
127
- so as PositionShortLabelTest,
128
- Ao as PositionTypeBadge,
129
- Pe as ReviewButton,
130
- Jo as ReviewButtonTest,
131
- ue as SEGMENTED_TABS_INACTIVE_BUTTON_CLASS,
132
- Ce as SPACE_HEIGHT,
133
- Ie as SPACE_PX,
134
- ce as SectionHeading,
135
- Qo as SectionHeadingTest,
136
- ke as SegmentedTabs,
137
- Zo as SegmentedTabsTest,
138
- Le as SideCard,
139
- Ae as SideCardTest,
140
- Me as Stack,
141
- er as StackTest,
142
- he as StatBadge,
143
- De as StatBadgeGrid,
144
- rr as StatBadgeTest,
145
- ve as StickyBar,
146
- ar as StickyBarTest,
147
- Ne as StrategyApyBreakdownCard,
148
- qe as StrategyApyBreakdownCardTest,
149
- Fe as Tabber,
150
- Ge as TabberSection,
151
- pr as TabberTest,
152
- Qe as TimeToLiquidationBlock,
153
- Je as TimeToLiquidationBlockTest,
154
- eo as TitleMeta,
155
- Ze as TitleMetaTest,
156
- ro as TokenAmount,
157
- fr as TokenAmountTest,
158
- Io as TokenBigint,
159
- po as TokenPairSymbol,
160
- ao as TokenPairSymbolTest,
161
- xo as TokenPairTitle,
162
- fo as TokenPairTitleTest,
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,
163
169
  a as TokenSelectPanel,
164
- wo as UsdValue,
165
- Mo as UtilizationValue,
166
- lo as ValueTest,
167
- Vo as bps,
168
- Ue as isTabber,
169
- We as useDetailScrollSpy,
170
- Xe 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
171
177
  };
@@ -13,16 +13,15 @@ import "../../../utils/z-index.js";
13
13
  import { PointsValue as l } from "../values/points-value.js";
14
14
  import "../../points-icon/points-icon.js";
15
15
  import "../../token-icon/token-icon.js";
16
- import "@fortawesome/free-solid-svg-icons";
17
- import "../../icons/fa-icon.js";
18
16
  import "../../tooltip/simple-tooltip.js";
19
17
  import "../../tooltip/tooltip.js";
20
18
  import "react-intl";
21
19
  import "../../badge/badge.js";
20
+ import "../../badge/chip.js";
22
21
  import { Typography as u } from "../../typography/typography.js";
23
22
  import { VerticalIndicator as d } from "../../vertical-indicator/vertical-indicator.js";
24
23
  import { InfoListTest as i } from "./constants.js";
25
- function G({
24
+ function F({
26
25
  children: t
27
26
  }) {
28
27
  return /* @__PURE__ */ r(c, { gap: "sm", "data-testid": i.root, children: t });
@@ -50,7 +49,7 @@ function g({
50
49
  }
51
50
  );
52
51
  }
53
- function H({
52
+ function G({
54
53
  title: t
55
54
  }) {
56
55
  const o = n();
@@ -67,7 +66,7 @@ function H({
67
66
  }
68
67
  );
69
68
  }
70
- function J({
69
+ function H({
71
70
  data: t,
72
71
  title: o = "components.yieldBreakdown.points"
73
72
  }) {
@@ -75,8 +74,8 @@ function J({
75
74
  }
76
75
  export {
77
76
  g as InfoLine,
78
- G as InfoList,
77
+ F as InfoList,
79
78
  i as InfoListTest,
80
- H as InfoSectionTitle,
81
- J as PointsInfoLine
79
+ G as InfoSectionTitle,
80
+ H as PointsInfoLine
82
81
  };
@@ -54,7 +54,7 @@ function ee({
54
54
  {
55
55
  value: f,
56
56
  placeholder: "0",
57
- label: `×${b(h)}`,
57
+ label: `${b(h)}x`,
58
58
  textButtonProps: {
59
59
  className: "inline-flex items-center whitespace-nowrap"
60
60
  },
@@ -0,0 +1,7 @@
1
+ const e = {
2
+ root: "leverage-preset-chips-root",
3
+ chip: "leverage-preset-chips-chip"
4
+ };
5
+ export {
6
+ e as LeveragePresetChipsTest
7
+ };
@@ -0,0 +1,6 @@
1
+ import { LeveragePresetChipsTest as s } from "./constants.js";
2
+ import { LeveragePresetChips as o } from "./leverage-preset-chips.js";
3
+ export {
4
+ o as LeveragePresetChips,
5
+ s as LeveragePresetChipsTest
6
+ };
@@ -0,0 +1,39 @@
1
+ import { jsxs as n, jsx as m } from "react/jsx-runtime";
2
+ import { SegmentedTabs as g } from "../segmented-tabs/segmented-tabs.js";
3
+ import { FormattedMessageTyped as d } from "../../typed-intl/index.js";
4
+ import { formatChipLeverage as l } from "../../../utils/leverage-presets.js";
5
+ import { LeveragePresetChipsTest as s } from "./constants.js";
6
+ function u({
7
+ options: e,
8
+ value: r,
9
+ onChange: a
10
+ }) {
11
+ if (e.length === 0) return null;
12
+ const i = r != null && e.includes(r) ? String(r) : String(e[e.length - 1]);
13
+ return /* @__PURE__ */ n(
14
+ "div",
15
+ {
16
+ className: "flex items-center gap-2",
17
+ "data-testid": s.root,
18
+ children: [
19
+ /* @__PURE__ */ m("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ m(d, { messageId: "components.leveragePresetChips.label" }) }),
20
+ /* @__PURE__ */ m(
21
+ g,
22
+ {
23
+ items: e.map((t) => ({
24
+ id: String(t),
25
+ item: `${l(t)}×`,
26
+ testId: s.chip
27
+ })),
28
+ activeTab: i,
29
+ onTabChange: (t) => a(Number(t))
30
+ }
31
+ )
32
+ ]
33
+ }
34
+ );
35
+ }
36
+ export {
37
+ u as LeveragePresetChips,
38
+ s as LeveragePresetChipsTest
39
+ };