@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,140 +1,181 @@
1
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
- import { faEllipsis as C } from "@fortawesome/free-solid-svg-icons";
3
- import { Children as A, isValidElement as m } from "react";
4
- import { InfoPortalProvider as _, InfoPortalOut as D } from "../info-portal/info-portal.js";
5
- import { SegmentedTabs as E, SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as N } from "../segmented-tabs/segmented-tabs.js";
6
- import { Stack as r } from "../stack/stack.js";
7
- import { useTitleText as x } from "../text/use-title-text.js";
8
- import { Button as v } from "../../buttons/button/button.js";
9
- import { StyledDialogContainer as B } from "../../client-adapters/styled-dialog-container/styled-dialog-container.js";
10
- import { FaIcon as j } from "../../icons/fa-icon.js";
11
- import { SimpleDropdown as k } from "../../simple-dropdown/simple-dropdown.js";
12
- import { SimpleDropdownMenuItem as z } from "../../simple-dropdown/simple-dropdown-menu-item.js";
13
- import { ManagePaneTest as o } from "./constants.js";
14
- function O(n) {
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import { faEllipsis as x } from "@fortawesome/free-solid-svg-icons";
3
+ import { useState as E, Children as N, isValidElement as f } from "react";
4
+ import { InfoPortalProvider as v, InfoPortalOut as O } from "../info-portal/info-portal.js";
5
+ import { SegmentedTabs as k, SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as B } from "../segmented-tabs/segmented-tabs.js";
6
+ import { Stack as e } from "../stack/stack.js";
7
+ import { useTitleText as j } from "../text/use-title-text.js";
8
+ import { Button as z } from "../../buttons/button/button.js";
9
+ import { StyledDialogContainer as V } from "../../client-adapters/styled-dialog-container/styled-dialog-container.js";
10
+ import { ConfirmMenu as F } from "../../confirm-menu/confirm-menu.js";
11
+ import "../../modal/modal.js";
12
+ import "@radix-ui/react-dialog";
13
+ import "../../dialog/dialog-container.js";
14
+ import "../../dialog/dialog-content.js";
15
+ import "../../dialog/dialog-description.js";
16
+ import "../../dialog/dialog-footer.js";
17
+ import "@gearbox-protocol/sdk";
18
+ import "clsx";
19
+ import "tailwind-merge";
20
+ import "sonner";
21
+ import "@gearbox-protocol/sdk/common-utils";
22
+ import "luxon";
23
+ import "../../../utils/z-index.js";
24
+ import "../../dialog/dialog-header.js";
25
+ import "../../dialog/dialog-title.js";
26
+ import { DialogModalContainer as G } from "../../dialog/dialog-modal-container.js";
27
+ import "../../dialog/dialog-overlay.js";
28
+ import "viem";
29
+ import "../../input/input.js";
30
+ import "../../label/label.js";
31
+ import { FaIcon as L } from "../../icons/fa-icon.js";
32
+ import { SimpleDropdown as U } from "../../simple-dropdown/simple-dropdown.js";
33
+ import { SimpleDropdownMenuItem as q } from "../../simple-dropdown/simple-dropdown-menu-item.js";
34
+ import { ManagePaneTest as i } from "./constants.js";
35
+ function H(o) {
15
36
  return null;
16
37
  }
17
- function V(n) {
38
+ function J(o) {
18
39
  return null;
19
40
  }
20
- function F(n) {
41
+ function K(o) {
21
42
  return null;
22
43
  }
23
- function G(n) {
24
- return m(n) && n.type === O;
44
+ function Q(o) {
45
+ return f(o) && o.type === H;
25
46
  }
26
- function L(n) {
27
- return m(n) && n.type === V;
47
+ function R(o) {
48
+ return f(o) && o.type === J;
28
49
  }
29
- function U(n) {
30
- return m(n) && n.type === F;
50
+ function W(o) {
51
+ return f(o) && o.type === K;
31
52
  }
32
- function et({
33
- children: n,
34
- activeTab: c,
35
- onTabChange: h,
36
- header: T,
37
- footer: b,
38
- actions: s,
39
- testId: M
53
+ function Et({
54
+ children: o,
55
+ activeTab: g,
56
+ onTabChange: M,
57
+ header: I,
58
+ footer: S,
59
+ actions: l,
60
+ testId: C
40
61
  }) {
41
- const f = x(), p = A.toArray(n), u = p.filter(G), I = p.find(L), l = p.filter(U), P = u.filter((t) => !t.props.hidden), S = u.find((t) => t.props.id === c)?.props.children, i = I?.props.items ?? [], w = new Set(l.map((t) => t.props.id)), d = [
42
- ...P.map((t) => ({
62
+ const d = j(), [P, h] = E(null), m = N.toArray(o), T = m.filter(Q), w = m.find(R), p = m.filter(W), A = T.filter((t) => !t.props.hidden), D = T.find((t) => t.props.id === g)?.props.children, a = w?.props.items ?? [], y = new Set(p.map((t) => t.props.id)), c = p.find((t) => t.props.id === P), b = () => h(null), u = [
63
+ ...A.map((t) => ({
43
64
  id: t.props.id,
44
- item: f(t.props.title),
65
+ item: d(t.props.title),
45
66
  disabled: t.props.disabled,
46
- testId: o.tab(t.props.id)
67
+ testId: i.tab(t.props.id)
47
68
  })),
48
- ...l.map((t) => ({
69
+ ...p.map((t) => ({
49
70
  id: t.props.id,
50
- item: f(t.props.title),
51
- testId: o.tab(t.props.id)
71
+ item: d(t.props.title),
72
+ testId: i.tab(t.props.id)
52
73
  }))
53
74
  ];
54
- return /* @__PURE__ */ e(_, { children: /* @__PURE__ */ a(r, { gap: "md", "data-testid": M ?? o.root, children: [
55
- T,
56
- d.length > 0 || i.length > 0 || s ? /* @__PURE__ */ a(r, { direction: "row", align: "center", gap: "sm", children: [
57
- d.length > 0 ? /* @__PURE__ */ e(
58
- E,
59
- {
60
- items: d,
61
- activeTab: c,
62
- onTabChange: (t) => {
63
- const g = l.find((y) => y.props.id === t);
64
- if (g) {
65
- g.props.onClick();
66
- return;
67
- }
68
- w.has(t) || h(t);
69
- },
70
- testId: o.tabs
71
- }
72
- ) : null,
73
- i.length > 0 || s ? /* @__PURE__ */ a(
74
- r,
75
+ return /* @__PURE__ */ r(v, { children: [
76
+ /* @__PURE__ */ r(e, { gap: "md", "data-testid": C ?? i.root, children: [
77
+ I,
78
+ u.length > 0 || a.length > 0 || l ? /* @__PURE__ */ r(e, { direction: "row", align: "center", gap: "sm", children: [
79
+ u.length > 0 ? /* @__PURE__ */ n(
80
+ k,
81
+ {
82
+ items: u,
83
+ activeTab: g,
84
+ onTabChange: (t) => {
85
+ const s = p.find((_) => _.props.id === t);
86
+ if (s) {
87
+ s.props.children != null && h(s.props.id), s.props.onClick?.();
88
+ return;
89
+ }
90
+ y.has(t) || M(t);
91
+ },
92
+ testId: i.tabs
93
+ }
94
+ ) : null,
95
+ a.length > 0 || l ? /* @__PURE__ */ r(
96
+ e,
97
+ {
98
+ direction: "row",
99
+ align: "center",
100
+ gap: "sm",
101
+ className: "ml-auto",
102
+ children: [
103
+ a.length > 0 ? /* @__PURE__ */ n(
104
+ U,
105
+ {
106
+ title: /* @__PURE__ */ n(
107
+ z,
108
+ {
109
+ type: "button",
110
+ variant: "ghost",
111
+ size: "md",
112
+ className: B,
113
+ "aria-label": "More actions",
114
+ "data-testid": i.dropdown,
115
+ children: /* @__PURE__ */ n(L, { icon: x, className: "size-4" })
116
+ }
117
+ ),
118
+ asChild: !0,
119
+ placement: "bottom",
120
+ align: "end",
121
+ children: a.map((t) => /* @__PURE__ */ n(
122
+ q,
123
+ {
124
+ onSelect: t.onSelect,
125
+ children: t.title
126
+ },
127
+ t.id
128
+ ))
129
+ }
130
+ ) : null,
131
+ l
132
+ ]
133
+ }
134
+ ) : null
135
+ ] }) : null,
136
+ /* @__PURE__ */ r(
137
+ V,
75
138
  {
76
- direction: "row",
77
- align: "center",
78
- gap: "sm",
79
- className: "ml-auto",
139
+ "data-testid": i.body,
140
+ "data-aside-form-top": !0,
80
141
  children: [
81
- i.length > 0 ? /* @__PURE__ */ e(
82
- k,
83
- {
84
- title: /* @__PURE__ */ e(
85
- v,
86
- {
87
- type: "button",
88
- variant: "ghost",
89
- size: "md",
90
- className: N,
91
- "aria-label": "More actions",
92
- "data-testid": o.dropdown,
93
- children: /* @__PURE__ */ e(j, { icon: C, className: "size-4" })
94
- }
95
- ),
96
- asChild: !0,
97
- placement: "bottom",
98
- align: "end",
99
- children: i.map((t) => /* @__PURE__ */ e(
100
- z,
101
- {
102
- onSelect: t.onSelect,
103
- children: t.title
104
- },
105
- t.id
106
- ))
107
- }
108
- ) : null,
109
- s
142
+ /* @__PURE__ */ n(e, { children: /* @__PURE__ */ n(O, {}) }),
143
+ D
110
144
  ]
111
145
  }
112
- ) : null
113
- ] }) : null,
114
- /* @__PURE__ */ a(
115
- B,
146
+ ),
147
+ S
148
+ ] }),
149
+ c?.props.children != null ? /* @__PURE__ */ n(
150
+ G,
116
151
  {
117
- "data-testid": o.body,
118
- "data-aside-form-top": !0,
119
- children: [
120
- /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(D, {}) }),
121
- S
122
- ]
152
+ show: !0,
153
+ onClickOutside: b,
154
+ dialog: { padding: "xl" },
155
+ children: /* @__PURE__ */ r("div", { "data-testid": i.actionDialog, children: [
156
+ /* @__PURE__ */ n(
157
+ F,
158
+ {
159
+ onClose: b,
160
+ title: d(c.props.title)
161
+ }
162
+ ),
163
+ c.props.children
164
+ ] })
123
165
  }
124
- ),
125
- b
126
- ] }) });
166
+ ) : null
167
+ ] });
127
168
  }
128
- function ot({
129
- children: n
169
+ function Nt({
170
+ children: o
130
171
  }) {
131
- return /* @__PURE__ */ e(r, { gap: "sm", "data-testid": o.message, children: n });
172
+ return /* @__PURE__ */ n(e, { gap: "sm", "data-testid": i.message, children: o });
132
173
  }
133
174
  export {
134
- et as ManagePane,
135
- F as ManagePaneActionTab,
136
- ot as ManagePaneMessage,
137
- O as ManagePaneTab,
138
- V as ManagePaneTabDropdown,
139
- o as ManagePaneTest
175
+ Et as ManagePane,
176
+ K as ManagePaneActionTab,
177
+ Nt as ManagePaneMessage,
178
+ H as ManagePaneTab,
179
+ J as ManagePaneTabDropdown,
180
+ i as ManagePaneTest
140
181
  };
@@ -1,6 +1,7 @@
1
- import { PageTitle as o } from "./page-title.js";
2
- import { PageTitleTest as T } from "./constants.js";
1
+ import { PageHeadProvider as o, PageTitle as t } from "./page-title.js";
2
+ import { PageTitleTest as P } from "./constants.js";
3
3
  export {
4
- o as PageTitle,
5
- T as PageTitleTest
4
+ o as PageHeadProvider,
5
+ t as PageTitle,
6
+ P as PageTitleTest
6
7
  };
@@ -1,38 +1,46 @@
1
- import { jsxs as c, Fragment as d, jsx as g } from "react/jsx-runtime";
2
- import { useIntlTyped as T } from "../../typed-intl/index.js";
3
- import { Typography as x } from "../../typography/typography.js";
4
- import { PageTitleTest as a } from "./constants.js";
5
- function r(t) {
1
+ import { jsx as s, jsxs as g, Fragment as p } from "react/jsx-runtime";
2
+ import { createContext as x, useContext as T } from "react";
3
+ import { useIntlTyped as l } from "../../typed-intl/index.js";
4
+ import { Typography as u } from "../../typography/typography.js";
5
+ import { PageTitleTest as y } from "./constants.js";
6
+ const m = x(null);
7
+ function b({
8
+ children: t,
9
+ render: e
10
+ }) {
11
+ return /* @__PURE__ */ s(m.Provider, { value: e, children: t });
12
+ }
13
+ function n(t) {
6
14
  return typeof t == "string" || !!t && typeof t == "object" && "messageId" in t;
7
15
  }
8
- function i(t, o) {
9
- return o === void 0 ? "" : typeof o == "string" ? o : t.formatMessage(o);
16
+ function i(t, e) {
17
+ return e === void 0 ? "" : typeof e == "string" ? e : t.formatMessage(e);
10
18
  }
11
- function j({
19
+ function I({
12
20
  title: t,
13
- browserTitle: o,
14
- head: s,
15
- as: m = "h1",
21
+ browserTitle: e,
22
+ as: d = "h1",
16
23
  className: f
17
24
  }) {
18
- const e = T(), p = r(t) ? i(e, t) : t, n = i(
19
- e,
20
- o ?? (r(t) ? t : void 0)
25
+ const o = l(), c = T(m), a = n(t) ? i(o, t) : t, r = i(
26
+ o,
27
+ e ?? (n(t) ? t : void 0)
21
28
  );
22
- return /* @__PURE__ */ c(d, { children: [
23
- n ? s?.(n) : null,
24
- /* @__PURE__ */ g(
25
- x,
29
+ return /* @__PURE__ */ g(p, { children: [
30
+ r ? c?.(r) : null,
31
+ /* @__PURE__ */ s(
32
+ u,
26
33
  {
27
- as: m,
34
+ as: d,
28
35
  className: f ?? "m-0 text-3xl leading-none font-medium",
29
- "data-testid": a.root,
30
- children: p
36
+ "data-testid": y.root,
37
+ children: a
31
38
  }
32
39
  )
33
40
  ] });
34
41
  }
35
42
  export {
36
- j as PageTitle,
37
- a as PageTitleTest
43
+ b as PageHeadProvider,
44
+ I as PageTitle,
45
+ y as PageTitleTest
38
46
  };
@@ -1,58 +1,51 @@
1
- import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
- import { FormattedMessageTyped as d } from "../../typed-intl/index.js";
3
- import { VerticalIndicator as i } from "../../vertical-indicator/vertical-indicator.js";
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import { FormattedMessageTyped as n } from "../../typed-intl/index.js";
3
+ import { VerticalIndicator as m } from "../../vertical-indicator/vertical-indicator.js";
4
4
  import "react";
5
5
  import "@gearbox-protocol/sdk";
6
6
  import "clsx";
7
7
  import "tailwind-merge";
8
8
  import "sonner";
9
- import { percentTemplate as m } from "../../../utils/format-money.js";
9
+ import { percentTemplate as a } from "../../../utils/format-money.js";
10
10
  import "@gearbox-protocol/sdk/common-utils";
11
11
  import "luxon";
12
12
  import "../../../utils/z-index.js";
13
- import { SideCard as n } from "../side-card/side-card.js";
14
- import { PoolApyBreakdownCardTest as p } from "./constants.js";
15
- function t({
13
+ import { SideCard as d } from "../side-card/side-card.js";
14
+ import { PoolApyBreakdownCardTest as i } from "./constants.js";
15
+ function e({
16
16
  title: r,
17
- value: e
17
+ value: t
18
18
  }) {
19
19
  return /* @__PURE__ */ o(
20
- i,
20
+ m,
21
21
  {
22
22
  size: "sm",
23
- label: /* @__PURE__ */ o(d, { messageId: r }),
24
- value: /* @__PURE__ */ o("span", { "data-testid": p.value, children: e === void 0 ? "—" : m(e / 100) })
23
+ label: /* @__PURE__ */ o(n, { messageId: r }),
24
+ value: /* @__PURE__ */ o("span", { "data-testid": i.value, children: t === void 0 ? "—" : a(t / 100) })
25
25
  }
26
26
  );
27
27
  }
28
- function T({
28
+ function I({
29
29
  data: r
30
30
  }) {
31
- return /* @__PURE__ */ a(
32
- n,
31
+ return /* @__PURE__ */ p(
32
+ d,
33
33
  {
34
34
  title: "components.poolApyBreakdownCard.title",
35
- testId: p.root,
35
+ testId: i.root,
36
36
  children: [
37
37
  /* @__PURE__ */ o(
38
- t,
38
+ e,
39
39
  {
40
- title: "components.poolApyBreakdownCard.apy1d",
41
- value: r?.apy1d
40
+ title: "components.poolApyBreakdownCard.organicApy",
41
+ value: r?.organicApy
42
42
  }
43
43
  ),
44
44
  /* @__PURE__ */ o(
45
- t,
45
+ e,
46
46
  {
47
- title: "components.poolApyBreakdownCard.apy7d",
48
- value: r?.apy7d
49
- }
50
- ),
51
- /* @__PURE__ */ o(
52
- t,
53
- {
54
- title: "components.poolApyBreakdownCard.apy30d",
55
- value: r?.apy30d
47
+ title: "components.poolApyBreakdownCard.incentiveApy",
48
+ value: r?.incentiveApy
56
49
  }
57
50
  )
58
51
  ]
@@ -60,6 +53,6 @@ function T({
60
53
  );
61
54
  }
62
55
  export {
63
- T as PoolApyBreakdownCard,
64
- p as PoolApyBreakdownCardTest
56
+ I as PoolApyBreakdownCard,
57
+ i as PoolApyBreakdownCardTest
65
58
  };
@@ -1,4 +1,4 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import { Stack as g } from "../stack/stack.js";
3
3
  import { useTitleText as f } from "../text/use-title-text.js";
4
4
  import { Skeleton as u } from "../../skeleton/skeleton.js";
@@ -30,24 +30,24 @@ const p = {
30
30
  function A({
31
31
  title: i,
32
32
  value: r,
33
- isLoading: o = !1,
33
+ isLoading: a = !1,
34
34
  size: t = "default",
35
35
  action: l,
36
- className: s,
36
+ className: o,
37
37
  testId: n
38
38
  }) {
39
39
  const c = f();
40
- return /* @__PURE__ */ a(
40
+ return /* @__PURE__ */ s(
41
41
  "div",
42
42
  {
43
43
  className: d(
44
44
  "h-full w-full rounded-lg border border-border bg-card",
45
45
  p[t],
46
- s
46
+ o
47
47
  ),
48
48
  "data-testid": n ?? m.root,
49
49
  children: [
50
- /* @__PURE__ */ a(
50
+ /* @__PURE__ */ s(
51
51
  "div",
52
52
  {
53
53
  className: d(
@@ -66,7 +66,16 @@ function A({
66
66
  ]
67
67
  }
68
68
  ),
69
- /* @__PURE__ */ e("div", { className: d("font-medium text-foreground", h[t]), children: /* @__PURE__ */ e(u, { width: 80, loading: o, children: /* @__PURE__ */ e(g, { gap: "xs", align: "start", children: r }) }) })
69
+ /* @__PURE__ */ e(
70
+ "div",
71
+ {
72
+ className: d(
73
+ "text-left font-medium text-foreground",
74
+ h[t]
75
+ ),
76
+ children: /* @__PURE__ */ e(u, { width: 80, loading: a, children: /* @__PURE__ */ e(g, { gap: "xs", align: "start", className: "w-full items-start", children: r }) })
77
+ }
78
+ )
70
79
  ]
71
80
  }
72
81
  );
@@ -89,7 +98,7 @@ const b = {
89
98
  function B({
90
99
  cols: i = 1,
91
100
  colsLg: r,
92
- gap: o = "default",
101
+ gap: a = "default",
93
102
  children: t,
94
103
  className: l
95
104
  }) {
@@ -100,7 +109,7 @@ function B({
100
109
  "grid w-full",
101
110
  b[i],
102
111
  r ? I[r] : void 0,
103
- _[o],
112
+ _[a],
104
113
  l
105
114
  ),
106
115
  "data-testid": m.grid,
@@ -1,7 +1,8 @@
1
- class r {
1
+ class a {
2
2
  static root = "strategy-apy-breakdown-card-root";
3
3
  static row = "strategy-apy-breakdown-card-row";
4
+ static net = "strategy-apy-breakdown-card-net";
4
5
  }
5
6
  export {
6
- r as StrategyApyBreakdownCardTest
7
+ a as StrategyApyBreakdownCardTest
7
8
  };