@gearbox-protocol/ui-kit 3.4.0 → 3.5.0
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.
- package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
- package/dist/cjs/components/composites/index.cjs +1 -0
- package/dist/cjs/components/composites/pool-table/columns.cjs +1 -0
- package/dist/cjs/components/composites/pool-table/index.cjs +1 -0
- package/dist/cjs/components/composites/pool-table/pool-table-backend-contract.types.cjs +1 -0
- package/dist/cjs/components/composites/pool-table/pool-table.cjs +1 -0
- package/dist/cjs/components/composites/pool-table/types.cjs +1 -0
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
- package/dist/cjs/components/tooltip/simple-tooltip.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +7 -7
- package/dist/esm/components/block-sync/block-sync.js +7 -7
- package/dist/esm/components/checkbox/checkbox-labeled.js +7 -7
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +7 -7
- package/dist/esm/components/complex-input/complex-input.js +7 -7
- package/dist/esm/components/composites/index.js +14 -0
- package/dist/esm/components/composites/pool-table/columns.js +248 -0
- package/dist/esm/components/composites/pool-table/index.js +14 -0
- package/dist/esm/components/composites/pool-table/pool-table-backend-contract.types.js +1 -0
- package/dist/esm/components/composites/pool-table/pool-table.js +190 -0
- package/dist/esm/components/composites/pool-table/types.js +1 -0
- package/dist/esm/components/compound-apy/compound-apy.js +41 -41
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +12 -12
- package/dist/esm/components/index.js +644 -632
- package/dist/esm/components/markdown-viewer/markdown-viewer.js +7 -7
- package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +11 -11
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +7 -7
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +7 -7
- package/dist/esm/components/tooltip/simple-tooltip.js +64 -60
- package/dist/esm/components/with-copy/with-copy.js +7 -7
- package/dist/esm/index.js +748 -736
- package/dist/globals.css +1 -1
- package/dist/types/components/composites/index.d.ts +1 -0
- package/dist/types/components/composites/pool-table/columns.d.ts +98 -0
- package/dist/types/components/composites/pool-table/index.d.ts +3 -0
- package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +160 -0
- package/dist/types/components/composites/pool-table/pool-table.d.ts +32 -0
- package/dist/types/components/composites/pool-table/types.d.ts +127 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -62,9 +62,15 @@ import "../points-icon/points-icon.js";
|
|
|
62
62
|
import "../skeleton/skeleton.js";
|
|
63
63
|
import "../vertical-indicator/vertical-indicator.js";
|
|
64
64
|
import "../vertical-list/vertical-list.js";
|
|
65
|
+
import "../description/description.js";
|
|
66
|
+
import "../rounded-image/rounded-image.js";
|
|
67
|
+
import "../progress/progress.js";
|
|
68
|
+
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
69
|
+
import "../token-symbol/token-symbol.js";
|
|
70
|
+
import "../help-tip/help-tip.js";
|
|
71
|
+
import "../table/grid-table.js";
|
|
65
72
|
import "../confirm-menu/confirm-menu.js";
|
|
66
73
|
import "../currency-button/currency-button.js";
|
|
67
|
-
import "../description/description.js";
|
|
68
74
|
import "../detailed-apy/detailed-apy.js";
|
|
69
75
|
import "../detailed-page-title/detailed-page-title.js";
|
|
70
76
|
import "../detailed-page-title/detailed-page-title-copy-button.js";
|
|
@@ -109,12 +115,10 @@ import "../filter/variants.js";
|
|
|
109
115
|
import "../graph/formatters.js";
|
|
110
116
|
import "lightweight-charts";
|
|
111
117
|
import "../graph/graph-view.js";
|
|
112
|
-
import "../help-tip/help-tip.js";
|
|
113
118
|
import "../health-factor/health-factor.js";
|
|
114
119
|
import "../horizontal-indicator/horizontal-indicator.js";
|
|
115
120
|
import "../icon-button/icon-button.js";
|
|
116
121
|
import { Link as I } from "../link/link.js";
|
|
117
|
-
import "../token-symbol/token-symbol.js";
|
|
118
122
|
import "../../utils/reactochart-compat.js";
|
|
119
123
|
import "../status-elements/status-elements.js";
|
|
120
124
|
import "../text-button/text-button.js";
|
|
@@ -127,11 +131,8 @@ import "../app-bar/app-bar.js";
|
|
|
127
131
|
import "../navitem/navitem.js";
|
|
128
132
|
import "../simple-dropdown/simple-dropdown.js";
|
|
129
133
|
import "../page-title/page-title.js";
|
|
130
|
-
import "../progress/progress.js";
|
|
131
|
-
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
132
134
|
import "../progress-bar/progress-bar.js";
|
|
133
135
|
import "../radio-group/radio-group.js";
|
|
134
|
-
import "../rounded-image/rounded-image.js";
|
|
135
136
|
import "../search-bar/search-bar.js";
|
|
136
137
|
import "../segmented-control/segmented-control.js";
|
|
137
138
|
import "../select/select.js";
|
|
@@ -149,7 +150,6 @@ import "../stat-badge/stat-badge.js";
|
|
|
149
150
|
import "../status-dot/status-dot.js";
|
|
150
151
|
import "../stepper/stepper.js";
|
|
151
152
|
import "../switch/switch.js";
|
|
152
|
-
import "../table/grid-table.js";
|
|
153
153
|
import "../table/table.js";
|
|
154
154
|
import "../table/grid-table-loader.js";
|
|
155
155
|
import "../textarea/textarea.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as o, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import { faPlus as N } from "@fortawesome/free-solid-svg-icons";
|
|
3
3
|
import { IconLighting as T } from "@gearbox-protocol/static";
|
|
4
4
|
import { getRewardTokenSymbol as k } from "../compound-apy/compound-apy.js";
|
|
@@ -41,19 +41,19 @@ function ne({
|
|
|
41
41
|
points: s,
|
|
42
42
|
apy7DAgo: a,
|
|
43
43
|
externalAPY: m,
|
|
44
|
-
tokensList:
|
|
44
|
+
tokensList: w,
|
|
45
45
|
className: g
|
|
46
46
|
}) {
|
|
47
47
|
if (!(f !== void 0 || c && c.length > 0 || h && h.length > 0 || s && s.length > 0))
|
|
48
48
|
return /* @__PURE__ */ e("span", { className: g, children: d });
|
|
49
|
-
const
|
|
49
|
+
const I = !a || !!a.totalAPYLoading || !!a.loading7DAgo, x = !!a, p = (t, i) => x ? /* @__PURE__ */ o($, { children: [
|
|
50
50
|
/* @__PURE__ */ e("span", { children: t }),
|
|
51
|
-
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(z, { width: 30, height: 14, loading:
|
|
52
|
-
] }) : t,
|
|
51
|
+
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(z, { width: 30, height: 14, loading: I, children: i }) })
|
|
52
|
+
] }) : t, P = /* @__PURE__ */ o(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
55
|
className: y(
|
|
56
|
-
"w-[370px] p-6",
|
|
56
|
+
"w-[370px] max-w-[calc(100vw-32px)] p-6",
|
|
57
57
|
"bg-popover",
|
|
58
58
|
"border border-border",
|
|
59
59
|
"rounded-lg",
|
|
@@ -62,7 +62,7 @@ function ne({
|
|
|
62
62
|
),
|
|
63
63
|
children: [
|
|
64
64
|
/* @__PURE__ */ o(u, { children: [
|
|
65
|
-
|
|
65
|
+
x && /* @__PURE__ */ e(
|
|
66
66
|
l,
|
|
67
67
|
{
|
|
68
68
|
size: "sm",
|
|
@@ -94,7 +94,7 @@ function ne({
|
|
|
94
94
|
`base-${t.type}-${t.apy}`
|
|
95
95
|
)),
|
|
96
96
|
h?.map((t) => {
|
|
97
|
-
const i =
|
|
97
|
+
const i = w?.[t.rewardToken];
|
|
98
98
|
return /* @__PURE__ */ e(
|
|
99
99
|
l,
|
|
100
100
|
{
|
|
@@ -162,7 +162,7 @@ function ne({
|
|
|
162
162
|
messageId: m.tooltip,
|
|
163
163
|
values: {
|
|
164
164
|
name: m.name,
|
|
165
|
-
value: /* @__PURE__ */ o(
|
|
165
|
+
value: /* @__PURE__ */ o(b, { children: [
|
|
166
166
|
/* @__PURE__ */ e("span", { className: "text-gray-90 mr-1.5", children: /* @__PURE__ */ e(T, { size: 14, style: { verticalAlign: "top" } }) }),
|
|
167
167
|
/* @__PURE__ */ o("span", { className: "font-bold", children: [
|
|
168
168
|
"+",
|
|
@@ -174,7 +174,7 @@ function ne({
|
|
|
174
174
|
)
|
|
175
175
|
}
|
|
176
176
|
),
|
|
177
|
-
s && s.length > 0 && /* @__PURE__ */ o(
|
|
177
|
+
s && s.length > 0 && /* @__PURE__ */ o(b, { children: [
|
|
178
178
|
/* @__PURE__ */ e("div", { className: "relative my-2.5 mx-6 border-t-2 border-border", children: /* @__PURE__ */ e(
|
|
179
179
|
"div",
|
|
180
180
|
{
|
|
@@ -242,7 +242,7 @@ function ne({
|
|
|
242
242
|
maxWidth: "100%",
|
|
243
243
|
title: /* @__PURE__ */ e("span", { className: g, children: d }),
|
|
244
244
|
triggerClassName: g,
|
|
245
|
-
children:
|
|
245
|
+
children: P
|
|
246
246
|
}
|
|
247
247
|
);
|
|
248
248
|
}
|
|
@@ -52,9 +52,15 @@ import "../points-icon/points-icon.js";
|
|
|
52
52
|
import "../skeleton/skeleton.js";
|
|
53
53
|
import "../vertical-indicator/vertical-indicator.js";
|
|
54
54
|
import "../vertical-list/vertical-list.js";
|
|
55
|
+
import "../description/description.js";
|
|
56
|
+
import "../rounded-image/rounded-image.js";
|
|
57
|
+
import "../progress/progress.js";
|
|
58
|
+
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
59
|
+
import "../token-symbol/token-symbol.js";
|
|
60
|
+
import "../help-tip/help-tip.js";
|
|
61
|
+
import "../table/grid-table.js";
|
|
55
62
|
import "../confirm-menu/confirm-menu.js";
|
|
56
63
|
import "../currency-button/currency-button.js";
|
|
57
|
-
import "../description/description.js";
|
|
58
64
|
import "../detailed-apy/detailed-apy.js";
|
|
59
65
|
import "../detailed-page-title/detailed-page-title.js";
|
|
60
66
|
import "../detailed-page-title/detailed-page-title-copy-button.js";
|
|
@@ -99,7 +105,6 @@ import "../filter/variants.js";
|
|
|
99
105
|
import "../graph/formatters.js";
|
|
100
106
|
import "lightweight-charts";
|
|
101
107
|
import "../graph/graph-view.js";
|
|
102
|
-
import "../help-tip/help-tip.js";
|
|
103
108
|
import "../health-factor/health-factor.js";
|
|
104
109
|
import "../horizontal-indicator/horizontal-indicator.js";
|
|
105
110
|
import "../icon-button/icon-button.js";
|
|
@@ -113,7 +118,6 @@ import "../layout/main-aside-layout/main-aside-layout.js";
|
|
|
113
118
|
import "../page-title/page-title.js";
|
|
114
119
|
import "../layout/social-icons/social-icons.js";
|
|
115
120
|
import "../link/link.js";
|
|
116
|
-
import "../token-symbol/token-symbol.js";
|
|
117
121
|
import "../../utils/reactochart-compat.js";
|
|
118
122
|
import { HealthDot as u } from "../status-elements/status-elements.js";
|
|
119
123
|
import "../text-button/text-button.js";
|
|
@@ -127,11 +131,8 @@ import "../navbar/navbar-indicator-context.js";
|
|
|
127
131
|
import "../app-bar/app-bar.js";
|
|
128
132
|
import "../navitem/navitem.js";
|
|
129
133
|
import "../simple-dropdown/simple-dropdown.js";
|
|
130
|
-
import "../progress/progress.js";
|
|
131
|
-
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
132
134
|
import "../progress-bar/progress-bar.js";
|
|
133
135
|
import "../radio-group/radio-group.js";
|
|
134
|
-
import "../rounded-image/rounded-image.js";
|
|
135
136
|
import "../search-bar/search-bar.js";
|
|
136
137
|
import "../segmented-control/segmented-control.js";
|
|
137
138
|
import "../select/select.js";
|
|
@@ -149,7 +150,6 @@ import "../stat-badge/stat-badge.js";
|
|
|
149
150
|
import "../status-dot/status-dot.js";
|
|
150
151
|
import "../stepper/stepper.js";
|
|
151
152
|
import "../switch/switch.js";
|
|
152
|
-
import "../table/grid-table.js";
|
|
153
153
|
import "../table/table.js";
|
|
154
154
|
import "../table/grid-table-loader.js";
|
|
155
155
|
import "../textarea/textarea.js";
|
|
@@ -51,9 +51,15 @@ import "../points-icon/points-icon.js";
|
|
|
51
51
|
import "../skeleton/skeleton.js";
|
|
52
52
|
import "../vertical-indicator/vertical-indicator.js";
|
|
53
53
|
import "../vertical-list/vertical-list.js";
|
|
54
|
+
import "../description/description.js";
|
|
55
|
+
import "../rounded-image/rounded-image.js";
|
|
56
|
+
import "../progress/progress.js";
|
|
57
|
+
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
58
|
+
import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
|
|
59
|
+
import "../help-tip/help-tip.js";
|
|
60
|
+
import "../table/grid-table.js";
|
|
54
61
|
import "../confirm-menu/confirm-menu.js";
|
|
55
62
|
import "../currency-button/currency-button.js";
|
|
56
|
-
import "../description/description.js";
|
|
57
63
|
import "../detailed-apy/detailed-apy.js";
|
|
58
64
|
import "../detailed-page-title/detailed-page-title.js";
|
|
59
65
|
import "../detailed-page-title/detailed-page-title-copy-button.js";
|
|
@@ -98,7 +104,6 @@ import "../filter/variants.js";
|
|
|
98
104
|
import "../graph/formatters.js";
|
|
99
105
|
import "lightweight-charts";
|
|
100
106
|
import "../graph/graph-view.js";
|
|
101
|
-
import "../help-tip/help-tip.js";
|
|
102
107
|
import "../health-factor/health-factor.js";
|
|
103
108
|
import "../horizontal-indicator/horizontal-indicator.js";
|
|
104
109
|
import "../icon-button/icon-button.js";
|
|
@@ -112,7 +117,6 @@ import "../layout/main-aside-layout/main-aside-layout.js";
|
|
|
112
117
|
import "../page-title/page-title.js";
|
|
113
118
|
import "../layout/social-icons/social-icons.js";
|
|
114
119
|
import "../link/link.js";
|
|
115
|
-
import { getSymbolOrIcon as P } from "../token-symbol/token-symbol.js";
|
|
116
120
|
import "../../utils/reactochart-compat.js";
|
|
117
121
|
import "../status-elements/status-elements.js";
|
|
118
122
|
import "../text-button/text-button.js";
|
|
@@ -126,11 +130,8 @@ import "../navbar/navbar-indicator-context.js";
|
|
|
126
130
|
import "../app-bar/app-bar.js";
|
|
127
131
|
import "../navitem/navitem.js";
|
|
128
132
|
import "../simple-dropdown/simple-dropdown.js";
|
|
129
|
-
import "../progress/progress.js";
|
|
130
|
-
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
131
133
|
import "../progress-bar/progress-bar.js";
|
|
132
134
|
import "../radio-group/radio-group.js";
|
|
133
|
-
import "../rounded-image/rounded-image.js";
|
|
134
135
|
import "../search-bar/search-bar.js";
|
|
135
136
|
import "../segmented-control/segmented-control.js";
|
|
136
137
|
import "../select/select.js";
|
|
@@ -148,7 +149,6 @@ import "../stat-badge/stat-badge.js";
|
|
|
148
149
|
import "../status-dot/status-dot.js";
|
|
149
150
|
import "../stepper/stepper.js";
|
|
150
151
|
import "../switch/switch.js";
|
|
151
|
-
import "../table/grid-table.js";
|
|
152
152
|
import "../table/table.js";
|
|
153
153
|
import "../table/grid-table-loader.js";
|
|
154
154
|
import "../textarea/textarea.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as L, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "@radix-ui/react-tooltip";
|
|
3
3
|
import * as e from "react";
|
|
4
4
|
import "@gearbox-protocol/sdk";
|
|
@@ -6,95 +6,95 @@ import { cn as k } from "../../utils/cn.js";
|
|
|
6
6
|
import "sonner";
|
|
7
7
|
import "@gearbox-protocol/sdk/common-utils";
|
|
8
8
|
import "luxon";
|
|
9
|
-
import { Z_INDEX as
|
|
10
|
-
const
|
|
9
|
+
import { Z_INDEX as F } from "../../utils/z-index.js";
|
|
10
|
+
const I = e.createContext({ lockParent: () => {
|
|
11
11
|
}, unlockParent: () => {
|
|
12
|
-
} }),
|
|
13
|
-
function
|
|
14
|
-
children:
|
|
12
|
+
} }), A = e.createContext(!1), H = 7, J = 12;
|
|
13
|
+
function Q({
|
|
14
|
+
children: K,
|
|
15
15
|
title: d,
|
|
16
|
-
placement:
|
|
16
|
+
placement: S = "top",
|
|
17
17
|
trigger: n = "hover",
|
|
18
|
-
triangle:
|
|
18
|
+
triangle: W = !0,
|
|
19
19
|
delayShow: h = 5,
|
|
20
|
-
maxWidth:
|
|
20
|
+
maxWidth: C = "200px",
|
|
21
21
|
minWidth: _,
|
|
22
22
|
type: j = "tooltip",
|
|
23
|
-
open:
|
|
24
|
-
onOpenChange:
|
|
23
|
+
open: P,
|
|
24
|
+
onOpenChange: v,
|
|
25
25
|
className: z,
|
|
26
|
-
triggerClassName:
|
|
26
|
+
triggerClassName: x,
|
|
27
27
|
useTitleAsTrigger: B = !1
|
|
28
28
|
}) {
|
|
29
|
-
const [M,
|
|
29
|
+
const [M, g] = e.useState(!1), [y, w] = e.useState(!1), f = e.useRef(null), i = e.useRef(null), p = P !== void 0, c = p ? P : M, o = e.useCallback(
|
|
30
30
|
(t) => {
|
|
31
|
-
p ?
|
|
31
|
+
p ? v?.(t) : g(t);
|
|
32
32
|
},
|
|
33
|
-
[p,
|
|
34
|
-
),
|
|
33
|
+
[p, v]
|
|
34
|
+
), s = e.useContext(I), G = e.useMemo(
|
|
35
35
|
() => ({
|
|
36
|
-
lockParent: () =>
|
|
37
|
-
unlockParent: () =>
|
|
36
|
+
lockParent: () => w(!0),
|
|
37
|
+
unlockParent: () => w(!1)
|
|
38
38
|
}),
|
|
39
39
|
[]
|
|
40
40
|
), R = e.useRef(!1);
|
|
41
|
-
R.current =
|
|
41
|
+
R.current = y;
|
|
42
42
|
const l = e.useRef(
|
|
43
43
|
null
|
|
44
44
|
), u = e.useCallback(() => {
|
|
45
45
|
l.current !== null && (clearTimeout(l.current), l.current = null);
|
|
46
|
-
}, []),
|
|
46
|
+
}, []), V = e.useCallback(
|
|
47
47
|
(t) => {
|
|
48
48
|
if (n !== "click") {
|
|
49
49
|
if (t) {
|
|
50
|
-
u(), o(!0),
|
|
50
|
+
u(), o(!0), s.lockParent();
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
l.current = setTimeout(() => {
|
|
54
|
-
l.current = null, !R.current && (o(!1),
|
|
54
|
+
l.current = null, !R.current && (o(!1), s.unlockParent());
|
|
55
55
|
}, 100);
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
[n, o,
|
|
58
|
+
[n, o, s, u]
|
|
59
59
|
);
|
|
60
60
|
e.useEffect(() => u, [u]);
|
|
61
|
-
const
|
|
61
|
+
const X = e.useCallback(
|
|
62
62
|
(t) => {
|
|
63
|
-
n === "click" && (t.stopPropagation(), o(!
|
|
63
|
+
n === "click" && (t.stopPropagation(), o(!c));
|
|
64
64
|
},
|
|
65
|
-
[n,
|
|
66
|
-
),
|
|
65
|
+
[n, c, o]
|
|
66
|
+
), Z = e.useCallback(
|
|
67
67
|
(t) => {
|
|
68
|
-
n === "click" && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), o(!
|
|
68
|
+
n === "click" && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), o(!c));
|
|
69
69
|
},
|
|
70
|
-
[n,
|
|
70
|
+
[n, c, o]
|
|
71
71
|
);
|
|
72
72
|
e.useEffect(() => {
|
|
73
|
-
if (n !== "click" || !
|
|
73
|
+
if (n !== "click" || !c) return;
|
|
74
74
|
const t = (m) => {
|
|
75
|
-
const
|
|
76
|
-
f.current && !f.current.contains(
|
|
77
|
-
},
|
|
75
|
+
const N = m.target;
|
|
76
|
+
f.current && !f.current.contains(N) && i.current && !i.current.contains(N) && o(!1);
|
|
77
|
+
}, O = (m) => {
|
|
78
78
|
m.key === "Escape" && o(!1);
|
|
79
79
|
};
|
|
80
|
-
return document.addEventListener("pointerdown", t), document.addEventListener("keydown",
|
|
81
|
-
document.removeEventListener("pointerdown", t), document.removeEventListener("keydown",
|
|
80
|
+
return document.addEventListener("pointerdown", t), document.addEventListener("keydown", O), () => {
|
|
81
|
+
document.removeEventListener("pointerdown", t), document.removeEventListener("keydown", O);
|
|
82
82
|
};
|
|
83
|
-
}, [n,
|
|
84
|
-
const T = e.useRef(
|
|
85
|
-
T.current =
|
|
86
|
-
const b = j === "modal-tooltip",
|
|
87
|
-
|
|
83
|
+
}, [n, c, o]);
|
|
84
|
+
const T = e.useRef(s.unlockParent);
|
|
85
|
+
T.current = s.unlockParent, e.useEffect(() => () => T.current(), []);
|
|
86
|
+
const b = j === "modal-tooltip", D = W && !b, $ = k(
|
|
87
|
+
F.TOOLTIP,
|
|
88
88
|
"pointer-events-auto",
|
|
89
89
|
"animate-in fade-in-0 zoom-in-75 duration-150",
|
|
90
90
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-75 data-[state=closed]:duration-150",
|
|
91
91
|
b ? "bg-transparent p-0" : "rounded bg-black/85 px-2 py-1 text-[0.85rem] leading-[1.5] font-normal text-center text-white/85 antialiased break-words min-w-0",
|
|
92
92
|
z
|
|
93
|
-
),
|
|
93
|
+
), q = e.useContext(A), E = /* @__PURE__ */ L(
|
|
94
94
|
a.Root,
|
|
95
95
|
{
|
|
96
|
-
open:
|
|
97
|
-
onOpenChange:
|
|
96
|
+
open: c || y,
|
|
97
|
+
onOpenChange: V,
|
|
98
98
|
delayDuration: n === "click" ? 0 : h,
|
|
99
99
|
children: [
|
|
100
100
|
/* @__PURE__ */ r(a.Trigger, { asChild: !0, children: B ? d : n === "click" ? /* @__PURE__ */ r(
|
|
@@ -102,11 +102,11 @@ function U({
|
|
|
102
102
|
{
|
|
103
103
|
ref: i,
|
|
104
104
|
type: "button",
|
|
105
|
-
onClick:
|
|
106
|
-
onKeyDown:
|
|
105
|
+
onClick: X,
|
|
106
|
+
onKeyDown: Z,
|
|
107
107
|
className: k(
|
|
108
108
|
"inline-flex appearance-none border-0 bg-transparent p-0 text-inherit font-inherit cursor-pointer",
|
|
109
|
-
|
|
109
|
+
x
|
|
110
110
|
),
|
|
111
111
|
children: d
|
|
112
112
|
}
|
|
@@ -114,25 +114,29 @@ function U({
|
|
|
114
114
|
"span",
|
|
115
115
|
{
|
|
116
116
|
ref: i,
|
|
117
|
-
className: k("inline-flex",
|
|
117
|
+
className: k("inline-flex", x),
|
|
118
118
|
children: d
|
|
119
119
|
}
|
|
120
120
|
) }),
|
|
121
|
-
/* @__PURE__ */ r(a.Portal, { children: /* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ r(a.Portal, { children: /* @__PURE__ */ L(
|
|
122
122
|
a.Content,
|
|
123
123
|
{
|
|
124
124
|
ref: f,
|
|
125
|
-
side:
|
|
126
|
-
sideOffset:
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
side: S,
|
|
126
|
+
sideOffset: D ? H - 4 : 8,
|
|
127
|
+
collisionPadding: 8,
|
|
128
|
+
className: $,
|
|
129
|
+
style: {
|
|
130
|
+
maxWidth: C ? `min(${C}, calc(100vw - 16px))` : "calc(100vw - 16px)",
|
|
131
|
+
minWidth: _
|
|
132
|
+
},
|
|
129
133
|
children: [
|
|
130
|
-
/* @__PURE__ */ r(
|
|
131
|
-
|
|
134
|
+
/* @__PURE__ */ r(I.Provider, { value: G, children: K }),
|
|
135
|
+
D && /* @__PURE__ */ r(
|
|
132
136
|
a.Arrow,
|
|
133
137
|
{
|
|
134
|
-
width:
|
|
135
|
-
height:
|
|
138
|
+
width: J,
|
|
139
|
+
height: H,
|
|
136
140
|
className: "fill-black/85"
|
|
137
141
|
}
|
|
138
142
|
)
|
|
@@ -142,16 +146,16 @@ function U({
|
|
|
142
146
|
]
|
|
143
147
|
}
|
|
144
148
|
);
|
|
145
|
-
return
|
|
149
|
+
return q ? E : /* @__PURE__ */ r(A.Provider, { value: !0, children: /* @__PURE__ */ r(
|
|
146
150
|
a.Provider,
|
|
147
151
|
{
|
|
148
152
|
delayDuration: n === "click" ? 0 : h,
|
|
149
153
|
skipDelayDuration: 300,
|
|
150
|
-
children:
|
|
154
|
+
children: E
|
|
151
155
|
}
|
|
152
156
|
) });
|
|
153
157
|
}
|
|
154
|
-
|
|
158
|
+
Q.displayName = "SimpleTooltip";
|
|
155
159
|
export {
|
|
156
|
-
|
|
160
|
+
Q as SimpleTooltip
|
|
157
161
|
};
|
|
@@ -51,9 +51,15 @@ import "../points-icon/points-icon.js";
|
|
|
51
51
|
import "../skeleton/skeleton.js";
|
|
52
52
|
import "../vertical-indicator/vertical-indicator.js";
|
|
53
53
|
import "../vertical-list/vertical-list.js";
|
|
54
|
+
import "../description/description.js";
|
|
55
|
+
import "../rounded-image/rounded-image.js";
|
|
56
|
+
import "../progress/progress.js";
|
|
57
|
+
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
58
|
+
import "../token-symbol/token-symbol.js";
|
|
59
|
+
import "../help-tip/help-tip.js";
|
|
60
|
+
import "../table/grid-table.js";
|
|
54
61
|
import "../confirm-menu/confirm-menu.js";
|
|
55
62
|
import "../currency-button/currency-button.js";
|
|
56
|
-
import "../description/description.js";
|
|
57
63
|
import "../detailed-apy/detailed-apy.js";
|
|
58
64
|
import "../detailed-page-title/detailed-page-title.js";
|
|
59
65
|
import "../detailed-page-title/detailed-page-title-copy-button.js";
|
|
@@ -98,7 +104,6 @@ import "../filter/variants.js";
|
|
|
98
104
|
import "../graph/formatters.js";
|
|
99
105
|
import "lightweight-charts";
|
|
100
106
|
import "../graph/graph-view.js";
|
|
101
|
-
import "../help-tip/help-tip.js";
|
|
102
107
|
import "../health-factor/health-factor.js";
|
|
103
108
|
import "../horizontal-indicator/horizontal-indicator.js";
|
|
104
109
|
import "../icon-button/icon-button.js";
|
|
@@ -112,7 +117,6 @@ import "../layout/main-aside-layout/main-aside-layout.js";
|
|
|
112
117
|
import "../page-title/page-title.js";
|
|
113
118
|
import "../layout/social-icons/social-icons.js";
|
|
114
119
|
import "../link/link.js";
|
|
115
|
-
import "../token-symbol/token-symbol.js";
|
|
116
120
|
import "../../utils/reactochart-compat.js";
|
|
117
121
|
import "../status-elements/status-elements.js";
|
|
118
122
|
import "../text-button/text-button.js";
|
|
@@ -126,11 +130,8 @@ import "../navbar/navbar-indicator-context.js";
|
|
|
126
130
|
import "../app-bar/app-bar.js";
|
|
127
131
|
import "../navitem/navitem.js";
|
|
128
132
|
import "../simple-dropdown/simple-dropdown.js";
|
|
129
|
-
import "../progress/progress.js";
|
|
130
|
-
import "../pool-indicator-icon/pool-indicator-icon.js";
|
|
131
133
|
import "../progress-bar/progress-bar.js";
|
|
132
134
|
import "../radio-group/radio-group.js";
|
|
133
|
-
import "../rounded-image/rounded-image.js";
|
|
134
135
|
import "../search-bar/search-bar.js";
|
|
135
136
|
import "../segmented-control/segmented-control.js";
|
|
136
137
|
import "../select/select.js";
|
|
@@ -148,7 +149,6 @@ import "../stat-badge/stat-badge.js";
|
|
|
148
149
|
import "../status-dot/status-dot.js";
|
|
149
150
|
import "../stepper/stepper.js";
|
|
150
151
|
import "../switch/switch.js";
|
|
151
|
-
import "../table/grid-table.js";
|
|
152
152
|
import "../table/table.js";
|
|
153
153
|
import "../table/grid-table-loader.js";
|
|
154
154
|
import "../textarea/textarea.js";
|