@gearbox-protocol/ui-kit 4.0.0-next.51 → 4.0.0-next.52

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 (104) hide show
  1. package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
  2. package/dist/cjs/components/base/detailed-page-title/copy-button.cjs +1 -0
  3. package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
  4. package/dist/cjs/components/base/index.cjs +1 -1
  5. package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
  6. package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
  7. package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
  8. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
  9. package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -1
  10. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  11. package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
  12. package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
  13. package/dist/cjs/components/base/values/index.cjs +1 -1
  14. package/dist/cjs/components/base-table/base-table-line.cjs +1 -1
  15. package/dist/cjs/components/base-table/base-table.cjs +1 -1
  16. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  17. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  18. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  19. package/dist/cjs/components/detailed-page-title/index.cjs +1 -1
  20. package/dist/cjs/components/index.cjs +1 -1
  21. package/dist/cjs/components/loading/loading.cjs +1 -1
  22. package/dist/cjs/components/sdk-status-pill/sdk-status-pill.cjs +1 -1
  23. package/dist/cjs/components/table/index.cjs +1 -1
  24. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  25. package/dist/cjs/index.cjs +1 -1
  26. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +2 -3
  27. package/dist/esm/components/{detailed-page-title/detailed-page-title-copy-button.js → base/detailed-page-title/copy-button.js} +8 -8
  28. package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +6 -6
  29. package/dist/esm/components/base/index.js +144 -153
  30. package/dist/esm/components/base/info-list/info-list.js +47 -24
  31. package/dist/esm/components/base/leverage-input/leverage-input.js +65 -47
  32. package/dist/esm/components/base/manage-pane/manage-pane.js +83 -73
  33. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +1 -1
  34. package/dist/esm/components/base/position-assets/position-assets.js +2 -3
  35. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +1 -1
  36. package/dist/esm/components/base/tabber/tabber.js +51 -39
  37. package/dist/esm/components/base/token-amount/token-amount.js +1 -1
  38. package/dist/esm/components/base/values/index.js +17 -19
  39. package/dist/esm/components/base-table/base-table-line.js +1 -1
  40. package/dist/esm/components/base-table/base-table.js +60 -55
  41. package/dist/esm/components/checkbox/checkbox-labeled.js +17 -20
  42. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +2 -3
  43. package/dist/esm/components/compound-apy/compound-apy.js +2 -3
  44. package/dist/esm/components/detailed-page-title/index.js +2 -4
  45. package/dist/esm/components/index.js +581 -603
  46. package/dist/esm/components/loading/loading.js +22 -15
  47. package/dist/esm/components/sdk-status-pill/sdk-status-pill.js +19 -14
  48. package/dist/esm/components/table/index.js +16 -20
  49. package/dist/esm/components/with-copy/with-copy.js +19 -22
  50. package/dist/esm/index.js +712 -734
  51. package/dist/globals.css +1 -1
  52. package/dist/types/components/base/index.d.ts +0 -2
  53. package/dist/types/components/base/leverage-input/leverage-input.d.ts +2 -2
  54. package/dist/types/components/base/values/index.d.ts +0 -1
  55. package/dist/types/components/detailed-page-title/index.d.ts +0 -1
  56. package/dist/types/components/index.d.ts +0 -3
  57. package/dist/types/components/spinner-loader/spinner-loader.d.ts +1 -1
  58. package/dist/types/components/table/index.d.ts +0 -2
  59. package/dist/types/index.d.ts +0 -3
  60. package/package.json +1 -1
  61. package/dist/cjs/components/base/info-portal/index.cjs +0 -1
  62. package/dist/cjs/components/base/info-portal/info-portal.cjs +0 -1
  63. package/dist/cjs/components/base/sticky-bar/constants.cjs +0 -1
  64. package/dist/cjs/components/base/sticky-bar/index.cjs +0 -1
  65. package/dist/cjs/components/base/sticky-bar/sticky-bar.cjs +0 -1
  66. package/dist/cjs/components/base/values/points-value.cjs +0 -1
  67. package/dist/cjs/components/detailed-page-title/detailed-page-title-copy-button.cjs +0 -1
  68. package/dist/cjs/components/loading-bar/index.cjs +0 -1
  69. package/dist/cjs/components/loading-bar/loading-bar.cjs +0 -1
  70. package/dist/cjs/components/status-dot/index.cjs +0 -1
  71. package/dist/cjs/components/status-dot/status-dot.cjs +0 -1
  72. package/dist/cjs/components/table/table-loader-guard.cjs +0 -1
  73. package/dist/cjs/components/table/table-loader.cjs +0 -1
  74. package/dist/cjs/components/with-title/index.cjs +0 -1
  75. package/dist/cjs/components/with-title/with-title.cjs +0 -1
  76. package/dist/esm/components/base/info-portal/index.js +0 -5
  77. package/dist/esm/components/base/info-portal/info-portal.js +0 -20
  78. package/dist/esm/components/base/sticky-bar/constants.js +0 -6
  79. package/dist/esm/components/base/sticky-bar/index.js +0 -6
  80. package/dist/esm/components/base/sticky-bar/sticky-bar.js +0 -28
  81. package/dist/esm/components/base/values/points-value.js +0 -30
  82. package/dist/esm/components/loading-bar/index.js +0 -4
  83. package/dist/esm/components/loading-bar/loading-bar.js +0 -27
  84. package/dist/esm/components/status-dot/index.js +0 -5
  85. package/dist/esm/components/status-dot/status-dot.js +0 -49
  86. package/dist/esm/components/table/table-loader-guard.js +0 -31
  87. package/dist/esm/components/table/table-loader.js +0 -25
  88. package/dist/esm/components/with-title/index.js +0 -4
  89. package/dist/esm/components/with-title/with-title.js +0 -43
  90. package/dist/types/components/base/info-portal/index.d.ts +0 -1
  91. package/dist/types/components/base/info-portal/info-portal.d.ts +0 -8
  92. package/dist/types/components/base/sticky-bar/constants.d.ts +0 -3
  93. package/dist/types/components/base/sticky-bar/index.d.ts +0 -1
  94. package/dist/types/components/base/sticky-bar/sticky-bar.d.ts +0 -9
  95. package/dist/types/components/base/values/points-value.d.ts +0 -11
  96. package/dist/types/components/loading-bar/index.d.ts +0 -1
  97. package/dist/types/components/loading-bar/loading-bar.d.ts +0 -25
  98. package/dist/types/components/status-dot/index.d.ts +0 -1
  99. package/dist/types/components/status-dot/status-dot.d.ts +0 -47
  100. package/dist/types/components/table/table-loader-guard.d.ts +0 -45
  101. package/dist/types/components/table/table-loader.d.ts +0 -50
  102. package/dist/types/components/with-title/index.d.ts +0 -1
  103. package/dist/types/components/with-title/with-title.d.ts +0 -31
  104. /package/dist/types/components/{detailed-page-title/detailed-page-title-copy-button.d.ts → base/detailed-page-title/copy-button.d.ts} +0 -0
@@ -1,13 +1,12 @@
1
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";
2
+ import { faEllipsis as _ } from "@fortawesome/free-solid-svg-icons";
3
+ import { createContext as E, useState as N, Children as O, isValidElement as g, useRef as k, useContext as B } from "react";
4
+ import { SegmentedTabs as j, SEGMENTED_TABS_INACTIVE_BUTTON_CLASS as z } from "../segmented-tabs/segmented-tabs.js";
5
+ import { Stack as i } from "../stack/stack.js";
6
+ import { useTitleText as R } from "../text/use-title-text.js";
7
+ import { Button as V } from "../../buttons/button/button.js";
8
+ import { StyledDialogContainer as F } from "../../client-adapters/styled-dialog-container/styled-dialog-container.js";
9
+ import { ConfirmMenu as G } from "../../confirm-menu/confirm-menu.js";
11
10
  import "../../modal/modal.js";
12
11
  import "@radix-ui/react-dialog";
13
12
  import "../../dialog/dialog-container.js";
@@ -21,103 +20,114 @@ import "luxon";
21
20
  import "../../../utils/z-index.js";
22
21
  import "../../dialog/dialog-header.js";
23
22
  import "../../dialog/dialog-title.js";
24
- import { DialogModalContainer as G } from "../../dialog/dialog-modal-container.js";
23
+ import { DialogModalContainer as L } from "../../dialog/dialog-modal-container.js";
25
24
  import "../../dialog/dialog-overlay.js";
26
25
  import "viem";
27
26
  import "../../input/input.js";
28
27
  import "../../label/label.js";
29
- import { FaIcon as L } from "../../icons/fa-icon.js";
30
- import { SimpleDropdown as U } from "../../simple-dropdown/simple-dropdown.js";
31
- import { SimpleDropdownMenuItem as q } from "../../simple-dropdown/simple-dropdown-menu-item.js";
32
- import { ManagePaneTest as i } from "./constants.js";
33
- function H(o) {
28
+ import { FaIcon as U } from "../../icons/fa-icon.js";
29
+ import { SimpleDropdown as q } from "../../simple-dropdown/simple-dropdown.js";
30
+ import { SimpleDropdownMenuItem as H } from "../../simple-dropdown/simple-dropdown-menu-item.js";
31
+ import { ManagePaneTest as e } from "./constants.js";
32
+ const C = E({
33
+ current: null
34
+ });
35
+ function J({ children: o }) {
36
+ const p = k(null);
37
+ return /* @__PURE__ */ n(C.Provider, { value: p, children: o });
38
+ }
39
+ function K() {
40
+ const o = B(C);
41
+ return /* @__PURE__ */ n("div", { ref: o });
42
+ }
43
+ function Q(o) {
34
44
  return null;
35
45
  }
36
- function J(o) {
46
+ function W(o) {
37
47
  return null;
38
48
  }
39
- function K(o) {
49
+ function X(o) {
40
50
  return null;
41
51
  }
42
- function Q(o) {
43
- return f(o) && o.type === H;
52
+ function Y(o) {
53
+ return g(o) && o.type === Q;
44
54
  }
45
- function R(o) {
46
- return f(o) && o.type === J;
55
+ function Z(o) {
56
+ return g(o) && o.type === W;
47
57
  }
48
- function W(o) {
49
- return f(o) && o.type === K;
58
+ function $(o) {
59
+ return g(o) && o.type === X;
50
60
  }
51
- function _t({
61
+ function Et({
52
62
  children: o,
53
- activeTab: g,
63
+ activeTab: p,
54
64
  onTabChange: M,
55
65
  header: I,
56
- footer: S,
57
- actions: l,
58
- testId: C
66
+ footer: P,
67
+ actions: d,
68
+ testId: S
59
69
  }) {
60
- 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 = [
61
- ...A.map((t) => ({
70
+ const m = R(), [w, h] = N(null), c = O.toArray(o), T = c.filter(Y), A = c.find(Z), a = c.filter($), x = T.filter((t) => !t.props.hidden), D = T.find((t) => t.props.id === p)?.props.children, l = A?.props.items ?? [], y = new Set(a.map((t) => t.props.id)), u = a.find((t) => t.props.id === w), b = () => h(null), f = [
71
+ ...x.map((t) => ({
62
72
  id: t.props.id,
63
- item: d(t.props.title),
73
+ item: m(t.props.title),
64
74
  disabled: t.props.disabled,
65
- testId: i.tab(t.props.id)
75
+ testId: e.tab(t.props.id)
66
76
  })),
67
- ...p.map((t) => ({
77
+ ...a.map((t) => ({
68
78
  id: t.props.id,
69
- item: d(t.props.title),
70
- testId: i.tab(t.props.id)
79
+ item: m(t.props.title),
80
+ testId: e.tab(t.props.id)
71
81
  }))
72
82
  ];
73
- return /* @__PURE__ */ r(v, { children: [
74
- /* @__PURE__ */ r(e, { gap: "md", "data-testid": C ?? i.root, children: [
83
+ return /* @__PURE__ */ r(J, { children: [
84
+ /* @__PURE__ */ r(i, { gap: "md", "data-testid": S ?? e.root, children: [
75
85
  I,
76
- u.length > 0 || a.length > 0 || l ? /* @__PURE__ */ r(e, { direction: "row", align: "center", gap: "sm", children: [
77
- u.length > 0 ? /* @__PURE__ */ n(
78
- k,
86
+ f.length > 0 || l.length > 0 || d ? /* @__PURE__ */ r(i, { direction: "row", align: "center", gap: "sm", children: [
87
+ f.length > 0 ? /* @__PURE__ */ n(
88
+ j,
79
89
  {
80
- items: u,
81
- activeTab: g,
90
+ items: f,
91
+ activeTab: p,
82
92
  onTabChange: (t) => {
83
- const s = p.find((_) => _.props.id === t);
93
+ const s = a.find((v) => v.props.id === t);
84
94
  if (s) {
85
95
  s.props.children != null && h(s.props.id), s.props.onClick?.();
86
96
  return;
87
97
  }
88
98
  y.has(t) || M(t);
89
99
  },
90
- testId: i.tabs
100
+ testId: e.tabs
91
101
  }
92
102
  ) : null,
93
- a.length > 0 || l ? /* @__PURE__ */ r(
94
- e,
103
+ l.length > 0 || d ? /* @__PURE__ */ r(
104
+ i,
95
105
  {
96
106
  direction: "row",
97
107
  align: "center",
98
108
  gap: "sm",
99
109
  className: "ml-auto",
100
110
  children: [
101
- a.length > 0 ? /* @__PURE__ */ n(
102
- U,
111
+ l.length > 0 ? /* @__PURE__ */ n(
112
+ q,
103
113
  {
104
114
  title: /* @__PURE__ */ n(
105
- z,
115
+ V,
106
116
  {
107
117
  type: "button",
108
118
  variant: "ghost",
109
119
  size: "md",
110
- className: B,
120
+ className: z,
111
121
  "aria-label": "More actions",
112
- "data-testid": i.dropdown,
113
- children: /* @__PURE__ */ n(L, { icon: x, className: "size-4" })
122
+ "data-testid": e.dropdown,
123
+ children: /* @__PURE__ */ n(U, { icon: _, className: "size-4" })
114
124
  }
115
125
  ),
116
126
  asChild: !0,
117
127
  placement: "bottom",
118
128
  align: "end",
119
- children: a.map((t) => /* @__PURE__ */ n(
120
- q,
129
+ children: l.map((t) => /* @__PURE__ */ n(
130
+ H,
121
131
  {
122
132
  onSelect: t.onSelect,
123
133
  children: t.title
@@ -126,54 +136,54 @@ function _t({
126
136
  ))
127
137
  }
128
138
  ) : null,
129
- l
139
+ d
130
140
  ]
131
141
  }
132
142
  ) : null
133
143
  ] }) : null,
134
144
  /* @__PURE__ */ r(
135
- V,
145
+ F,
136
146
  {
137
- "data-testid": i.body,
147
+ "data-testid": e.body,
138
148
  "data-aside-form-top": !0,
139
149
  children: [
140
- /* @__PURE__ */ n(e, { children: /* @__PURE__ */ n(O, {}) }),
150
+ /* @__PURE__ */ n(i, { children: /* @__PURE__ */ n(K, {}) }),
141
151
  D
142
152
  ]
143
153
  }
144
154
  ),
145
- S
155
+ P
146
156
  ] }),
147
- c?.props.children != null ? /* @__PURE__ */ n(
148
- G,
157
+ u?.props.children != null ? /* @__PURE__ */ n(
158
+ L,
149
159
  {
150
160
  show: !0,
151
161
  onClickOutside: b,
152
162
  dialog: { padding: "xl" },
153
- children: /* @__PURE__ */ r("div", { "data-testid": i.actionDialog, children: [
163
+ children: /* @__PURE__ */ r("div", { "data-testid": e.actionDialog, children: [
154
164
  /* @__PURE__ */ n(
155
- F,
165
+ G,
156
166
  {
157
167
  onClose: b,
158
- title: d(c.props.title)
168
+ title: m(u.props.title)
159
169
  }
160
170
  ),
161
- c.props.children
171
+ u.props.children
162
172
  ] })
163
173
  }
164
174
  ) : null
165
175
  ] });
166
176
  }
167
- function xt({
177
+ function Nt({
168
178
  children: o
169
179
  }) {
170
- return /* @__PURE__ */ n(e, { gap: "sm", "data-testid": i.message, children: o });
180
+ return /* @__PURE__ */ n(i, { gap: "sm", "data-testid": e.message, children: o });
171
181
  }
172
182
  export {
173
- _t as ManagePane,
174
- K as ManagePaneActionTab,
175
- xt as ManagePaneMessage,
176
- H as ManagePaneTab,
177
- J as ManagePaneTabDropdown,
178
- i as ManagePaneTest
183
+ Et as ManagePane,
184
+ X as ManagePaneActionTab,
185
+ Nt as ManagePaneMessage,
186
+ Q as ManagePaneTab,
187
+ W as ManagePaneTabDropdown,
188
+ e as ManagePaneTest
179
189
  };
@@ -7,10 +7,10 @@ import "clsx";
7
7
  import "tailwind-merge";
8
8
  import "luxon";
9
9
  import "../../../utils/z-index.js";
10
- import { PointsIcon as b } from "../../points-icon/points-icon.js";
11
10
  import "viem";
12
11
  import "react";
13
12
  import { PoolApyBreakdownCardTest as l } from "./constants.js";
13
+ import { PointsIcon as b } from "../../points-icon/points-icon.js";
14
14
  import { TokenIcon as C } from "../../token-icon/token-icon.js";
15
15
  import "../../tooltip/simple-tooltip.js";
16
16
  import "../../tooltip/tooltip.js";
@@ -8,7 +8,6 @@ import { APPROXIMATE_SYMBOL as k } from "../../../utils/format.js";
8
8
  import { formatMoney as g } from "../../../utils/format-money.js";
9
9
  import "luxon";
10
10
  import "../../../utils/z-index.js";
11
- import "../../points-icon/points-icon.js";
12
11
  import { TokenBigint as p } from "../values/scalars.js";
13
12
  import "../../badge/badge.js";
14
13
  import "../../badge/chip.js";
@@ -19,7 +18,7 @@ import { TokenSymbol as T } from "../../token-symbol/token-symbol.js";
19
18
  import { Typography as u } from "../../typography/typography.js";
20
19
  import { PositionAssetsTest as d } from "./constants.js";
21
20
  const x = 1, U = 20;
22
- function q({
21
+ function V({
23
22
  assets: s,
24
23
  to: n,
25
24
  empty: a,
@@ -110,7 +109,7 @@ function M(s, n) {
110
109
  return s === void 0 ? n : s === null || n === null ? null : Math.max(s, n);
111
110
  }
112
111
  export {
113
- q as PositionAssets,
112
+ V as PositionAssets,
114
113
  d as PositionAssetsTest,
115
114
  S as visibleAssets
116
115
  };
@@ -8,9 +8,9 @@ import "tailwind-merge";
8
8
  import { formatLeverage as d } from "../../../utils/format-leverage.js";
9
9
  import "luxon";
10
10
  import "../../../utils/z-index.js";
11
- import { PointsIcon as $ } from "../../points-icon/points-icon.js";
12
11
  import "viem";
13
12
  import "react";
13
+ import { PointsIcon as $ } from "../../points-icon/points-icon.js";
14
14
  import { TokenIcon as j } from "../../token-icon/token-icon.js";
15
15
  import { FormattedMessageTyped as r } from "../../typed-intl/index.js";
16
16
  import "../../tooltip/simple-tooltip.js";
@@ -1,13 +1,12 @@
1
1
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import { createContext as E, useContext as q, useMemo as d, Children as N, useRef as T, useEffect as D, isValidElement as R } from "react";
3
- import { SectionHeading as F } from "../section-heading/section-heading.js";
2
+ import { createContext as E, useContext as q, useMemo as f, Children as B, useRef as g, useEffect as z, isValidElement as N } from "react";
3
+ import { SectionHeading as D } from "../section-heading/section-heading.js";
4
4
  import { Stack as u } from "../stack/stack.js";
5
- import { StickyBar as M } from "../sticky-bar/sticky-bar.js";
6
- import { useTitleText as j } from "../text/use-title-text.js";
7
- import { TabItem as P, TabControl as V } from "../../tab-control/tab-control.js";
5
+ import { useTitleText as R } from "../text/use-title-text.js";
6
+ import { TabItem as F, TabControl as M } from "../../tab-control/tab-control.js";
8
7
  import { TabberTest as S } from "./constants.js";
9
- import { useDetailScrollSpy as W } from "./use-detail-scroll-spy.js";
10
- const k = E({});
8
+ import { useDetailScrollSpy as P } from "./use-detail-scroll-spy.js";
9
+ const j = E({});
11
10
  function A({
12
11
  id: e,
13
12
  title: o,
@@ -16,7 +15,7 @@ function A({
16
15
  children: m,
17
16
  hideHeading: a = !1
18
17
  }) {
19
- const l = q(k), i = j(), n = !a;
18
+ const l = q(j), i = R(), n = !a;
20
19
  return /* @__PURE__ */ r(
21
20
  "section",
22
21
  {
@@ -26,7 +25,7 @@ function A({
26
25
  "data-testid": S.section,
27
26
  children: /* @__PURE__ */ p(u, { gap: "md", children: [
28
27
  n || c ? /* @__PURE__ */ p("div", { className: "flex items-center justify-between gap-3", children: [
29
- n ? /* @__PURE__ */ r(F, { children: i(s) }) : /* @__PURE__ */ r("span", {}),
28
+ n ? /* @__PURE__ */ r(D, { children: i(s) }) : /* @__PURE__ */ r("span", {}),
30
29
  c
31
30
  ] }) : null,
32
31
  m
@@ -35,72 +34,72 @@ function A({
35
34
  );
36
35
  }
37
36
  A.displayName = "TabberSection";
38
- function g(e) {
39
- return R(e) && e.type === A;
37
+ function T(e) {
38
+ return N(e) && e.type === A;
40
39
  }
41
- function z({
40
+ function V({
42
41
  item: e,
43
42
  ...o
44
43
  }) {
45
44
  return /* @__PURE__ */ p("div", { className: "flex items-stretch overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-0 [scrollbar-width:none]", children: [
46
- /* @__PURE__ */ r("div", { className: "min-w-0 basis-0 grow pb-px", children: /* @__PURE__ */ r(V, { ...o, showBorder: !0 }) }),
45
+ /* @__PURE__ */ r("div", { className: "min-w-0 basis-0 grow pb-px", children: /* @__PURE__ */ r(M, { ...o, showBorder: !0 }) }),
47
46
  e && /* @__PURE__ */ r("div", { className: "w-auto shrink-0 grow-0 basis-auto", children: e })
48
47
  ] });
49
48
  }
50
- function G({
49
+ function W({
51
50
  children: e,
52
51
  observeKey: o,
53
52
  initialSection: s,
54
53
  testId: c,
55
54
  mobileManagePane: m
56
55
  }) {
57
- const a = d(
58
- () => N.toArray(e).filter(g),
56
+ const a = f(
57
+ () => B.toArray(e).filter(T),
59
58
  [e]
60
- ), l = d(
59
+ ), l = f(
61
60
  () => a.filter((t) => t.props.beforeBar !== !0),
62
61
  [a]
63
- ), i = l.map((t) => t.props.id).join("|"), n = d(
62
+ ), i = l.map((t) => t.props.id).join("|"), n = f(
64
63
  () => i === "" ? [] : i.split("|"),
65
64
  [i]
66
- ), w = T({}), f = d(() => {
65
+ ), w = g({}), d = f(() => {
67
66
  const t = {
68
67
  ...w.current
69
68
  };
70
- for (const B of n)
71
- t[B] === void 0 && (t[B] = { current: null });
69
+ for (const y of n)
70
+ t[y] === void 0 && (t[y] = { current: null });
72
71
  return w.current = t, t;
73
- }, [n]), I = j(), { activeSection: b, scrollToSection: h } = W(
74
- f,
72
+ }, [n]), I = R(), { activeSection: b, scrollToSection: h } = P(
73
+ d,
75
74
  n,
76
75
  o
77
- ), x = T(!1), v = T(o);
78
- D(() => {
76
+ ), x = g(!1), v = g(o);
77
+ z(() => {
79
78
  if (o !== v.current && (v.current = o, x.current = !1), x.current || !o) return;
80
79
  const t = s ?? n[0];
81
- x.current = !0, !(t === void 0 || t === n[0]) && f[t] !== void 0 && requestAnimationFrame(() => {
80
+ x.current = !0, !(t === void 0 || t === n[0]) && d[t] !== void 0 && requestAnimationFrame(() => {
82
81
  h(t);
83
82
  });
84
- }, [o, s, h, n, f]);
83
+ }, [o, s, h, n, d]);
85
84
  const H = l.map((t) => ({
86
85
  id: t.props.id,
87
86
  item: /* @__PURE__ */ r(
88
- P,
87
+ F,
89
88
  {
90
89
  selected: b === t.props.id,
91
90
  label: I(t.props.title)
92
91
  }
93
92
  )
94
- })), C = N.toArray(e), y = C.filter(
95
- (t) => g(t) && t.props.beforeBar === !0
93
+ })), C = B.toArray(e), k = C.filter(
94
+ (t) => T(t) && t.props.beforeBar === !0
96
95
  ), O = C.filter(
97
- (t) => !(g(t) && t.props.beforeBar === !0)
96
+ (t) => !(T(t) && t.props.beforeBar === !0)
98
97
  );
99
- return /* @__PURE__ */ r(u, { gap: "lg", "data-testid": c ?? S.root, children: /* @__PURE__ */ p(k.Provider, { value: f, children: [
100
- y.length > 0 ? /* @__PURE__ */ r(u, { gap: "xl", children: y }) : null,
98
+ return /* @__PURE__ */ r(u, { gap: "lg", "data-testid": c ?? S.root, children: /* @__PURE__ */ p(j.Provider, { value: d, children: [
99
+ k.length > 0 ? /* @__PURE__ */ r(u, { gap: "xl", children: k }) : null,
101
100
  m,
102
- /* @__PURE__ */ r(M, { testId: S.bar, children: /* @__PURE__ */ r(
103
- z,
101
+ /* @__PURE__ */ r(G, { testId: S.bar, children: /* @__PURE__ */ r(
102
+ V,
104
103
  {
105
104
  state: {
106
105
  id: b,
@@ -116,12 +115,25 @@ function G({
116
115
  /* @__PURE__ */ r(u, { gap: "xl", children: O })
117
116
  ] }) });
118
117
  }
119
- function K(e) {
120
- return R(e) && e.type === G;
118
+ function G({
119
+ children: e,
120
+ testId: o
121
+ }) {
122
+ return /* @__PURE__ */ r(
123
+ "div",
124
+ {
125
+ className: "sticky top-0 z-20 -mx-1 px-1 pt-3 sm:pt-4 bg-background/75 backdrop-blur-md backdrop-saturate-150",
126
+ "data-testid": o,
127
+ children: e
128
+ }
129
+ );
130
+ }
131
+ function $(e) {
132
+ return N(e) && e.type === W;
121
133
  }
122
134
  export {
123
- G as Tabber,
135
+ W as Tabber,
124
136
  A as TabberSection,
125
137
  S as TabberTest,
126
- K as isTabber
138
+ $ as isTabber
127
139
  };
@@ -8,9 +8,9 @@ import { APPROXIMATE_SYMBOL as l } from "../../../utils/format.js";
8
8
  import { formatMoney as c } from "../../../utils/format-money.js";
9
9
  import "luxon";
10
10
  import "../../../utils/z-index.js";
11
- import "../../points-icon/points-icon.js";
12
11
  import "viem";
13
12
  import "react";
13
+ import "../../points-icon/points-icon.js";
14
14
  import "../../token-icon/token-icon.js";
15
15
  import "react-intl";
16
16
  import "../../tooltip/simple-tooltip.js";
@@ -1,28 +1,26 @@
1
1
  import { PositionShortLabelTest as t, ValueTest as r } from "./constants.js";
2
2
  import { NoValue as i } from "./no-value.js";
3
3
  import { PnlValue as p } from "./pnl-value.js";
4
- import { PointsValue as u } from "./points-value.js";
5
- import { PositionShortLabel as V } from "./position-short-label.js";
6
- import { PositionStatusBadge as n } from "./position-status-badge.js";
7
- import { PositionTypeBadge as P } from "./position-type-badge.js";
8
- import { PriceImpactValue as g, priceImpact as T } from "./price-impact-value.js";
9
- import { ApyValue as d, HealthFactorValue as h, LeverageValue as B, TokenBigint as L, UsdValue as S, UtilizationValue as y, bps as I } from "./scalars.js";
4
+ import { PositionShortLabel as u } from "./position-short-label.js";
5
+ import { PositionStatusBadge as V } from "./position-status-badge.js";
6
+ import { PositionTypeBadge as n } from "./position-type-badge.js";
7
+ import { PriceImpactValue as P, priceImpact as c } from "./price-impact-value.js";
8
+ import { ApyValue as T, HealthFactorValue as b, LeverageValue as d, TokenBigint as h, UsdValue as B, UtilizationValue as L, bps as S } from "./scalars.js";
10
9
  export {
11
- d as ApyValue,
12
- h as HealthFactorValue,
13
- B as LeverageValue,
10
+ T as ApyValue,
11
+ b as HealthFactorValue,
12
+ d as LeverageValue,
14
13
  i as NoValue,
15
14
  p as PnlValue,
16
- u as PointsValue,
17
- V as PositionShortLabel,
15
+ u as PositionShortLabel,
18
16
  t as PositionShortLabelTest,
19
- n as PositionStatusBadge,
20
- P as PositionTypeBadge,
21
- g as PriceImpactValue,
22
- L as TokenBigint,
23
- S as UsdValue,
24
- y as UtilizationValue,
17
+ V as PositionStatusBadge,
18
+ n as PositionTypeBadge,
19
+ P as PriceImpactValue,
20
+ h as TokenBigint,
21
+ B as UsdValue,
22
+ L as UtilizationValue,
25
23
  r as ValueTest,
26
- I as bps,
27
- T as priceImpact
24
+ S as bps,
25
+ c as priceImpact
28
26
  };
@@ -4,9 +4,9 @@ import "@gearbox-protocol/sdk/onchain";
4
4
  import { cn as s } from "../../utils/cn.js";
5
5
  import "luxon";
6
6
  import "../../utils/z-index.js";
7
- import "../points-icon/points-icon.js";
8
7
  import "viem";
9
8
  import "react";
9
+ import "../points-icon/points-icon.js";
10
10
  import "../token-icon/token-icon.js";
11
11
  import "react-intl";
12
12
  import "../tooltip/simple-tooltip.js";