@gearbox-protocol/permissionless-ui 1.22.0-next.40 → 1.22.0-next.41
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/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/fadeout-loading/fadeout-loading.cjs +1 -1
- package/dist/cjs/components/health-factor/health-factor.cjs +1 -1
- package/dist/cjs/components/help-tip/help-tip.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/liquidation-price/index.cjs +1 -0
- package/dist/cjs/components/liquidation-price/liquidation-price.cjs +1 -0
- package/dist/cjs/components/status-elements/status-elements.cjs +1 -1
- package/dist/cjs/components/vertical-indicator/vertical-indicator.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/block-sync/block-sync.js +4 -2
- package/dist/esm/components/checkbox/checkbox-labeled.js +2 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +2 -0
- package/dist/esm/components/complex-input/complex-input.js +4 -2
- package/dist/esm/components/fadeout-loading/fadeout-loading.js +12 -12
- package/dist/esm/components/health-factor/health-factor.js +53 -42
- package/dist/esm/components/help-tip/help-tip.js +113 -64
- package/dist/esm/components/index.js +241 -239
- package/dist/esm/components/liquidation-price/index.js +4 -0
- package/dist/esm/components/liquidation-price/liquidation-price.js +43 -0
- package/dist/esm/components/status-elements/status-elements.js +46 -28
- package/dist/esm/components/vertical-indicator/vertical-indicator.js +90 -90
- package/dist/esm/index.js +398 -396
- package/dist/globals.css +1 -1
- package/dist/types/components/fadeout-loading/fadeout-loading.d.ts +5 -13
- package/dist/types/components/health-factor/health-factor.d.ts +16 -35
- package/dist/types/components/help-tip/help-tip.d.ts +33 -44
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/liquidation-price/index.d.ts +1 -0
- package/dist/types/components/liquidation-price/liquidation-price.d.ts +41 -0
- package/dist/types/components/status-elements/status-elements.d.ts +11 -1
- package/dist/types/components/vertical-indicator/vertical-indicator.d.ts +24 -51
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -87,6 +87,7 @@ import "../graph/formatters.js";
|
|
|
87
87
|
import "lightweight-charts";
|
|
88
88
|
import "../graph/graph-view.js";
|
|
89
89
|
import "../help-tip/help-tip.js";
|
|
90
|
+
import "../health-factor/health-factor.js";
|
|
90
91
|
import "../horizontal-indicator/horizontal-indicator.js";
|
|
91
92
|
import "../layout/col/col.js";
|
|
92
93
|
import "../layout/container/container.js";
|
|
@@ -95,6 +96,7 @@ import "../layout/grid/grid.js";
|
|
|
95
96
|
import "../layout/header/header.js";
|
|
96
97
|
import "../layout/layout/layout.js";
|
|
97
98
|
import "../../utils/reactochart-compat.js";
|
|
99
|
+
import "../status-elements/status-elements.js";
|
|
98
100
|
import "react-markdown";
|
|
99
101
|
import "remark-gfm";
|
|
100
102
|
import "../navbar/navbar.js";
|
|
@@ -126,7 +128,7 @@ import "../vertical-indicator/vertical-indicator.js";
|
|
|
126
128
|
import "../vertical-list/vertical-list.js";
|
|
127
129
|
import "../with-filter-button/with-filter-button.js";
|
|
128
130
|
const D = 1e3 * 60 * 10;
|
|
129
|
-
function
|
|
131
|
+
function Yr({
|
|
130
132
|
blockByChain: i,
|
|
131
133
|
explorerAddresses: S,
|
|
132
134
|
networkById: v
|
|
@@ -190,5 +192,5 @@ function Wr({
|
|
|
190
192
|
return i ? /* @__PURE__ */ o(j, { title: d(), children: N() }) : /* @__PURE__ */ o("div", { className: "select-none", children: d() });
|
|
191
193
|
}
|
|
192
194
|
export {
|
|
193
|
-
|
|
195
|
+
Yr as BlockSync
|
|
194
196
|
};
|
|
@@ -87,6 +87,7 @@ import "../graph/formatters.js";
|
|
|
87
87
|
import "lightweight-charts";
|
|
88
88
|
import "../graph/graph-view.js";
|
|
89
89
|
import "../help-tip/help-tip.js";
|
|
90
|
+
import "../health-factor/health-factor.js";
|
|
90
91
|
import "../horizontal-indicator/horizontal-indicator.js";
|
|
91
92
|
import "../layout/col/col.js";
|
|
92
93
|
import "../layout/container/container.js";
|
|
@@ -95,6 +96,7 @@ import "../layout/grid/grid.js";
|
|
|
95
96
|
import "../layout/header/header.js";
|
|
96
97
|
import "../layout/layout/layout.js";
|
|
97
98
|
import "../../utils/reactochart-compat.js";
|
|
99
|
+
import "../status-elements/status-elements.js";
|
|
98
100
|
import "react-markdown";
|
|
99
101
|
import "remark-gfm";
|
|
100
102
|
import "../navbar/navbar.js";
|
|
@@ -87,6 +87,7 @@ import "../../graph/formatters.js";
|
|
|
87
87
|
import "lightweight-charts";
|
|
88
88
|
import "../../graph/graph-view.js";
|
|
89
89
|
import "../../help-tip/help-tip.js";
|
|
90
|
+
import "../../health-factor/health-factor.js";
|
|
90
91
|
import "../../horizontal-indicator/horizontal-indicator.js";
|
|
91
92
|
import "../../layout/col/col.js";
|
|
92
93
|
import "../../layout/container/container.js";
|
|
@@ -95,6 +96,7 @@ import "../../layout/grid/grid.js";
|
|
|
95
96
|
import "../../layout/header/header.js";
|
|
96
97
|
import "../../layout/layout/layout.js";
|
|
97
98
|
import "../../../utils/reactochart-compat.js";
|
|
99
|
+
import "../../status-elements/status-elements.js";
|
|
98
100
|
import "react-markdown";
|
|
99
101
|
import "remark-gfm";
|
|
100
102
|
import "../../navbar/navbar.js";
|
|
@@ -89,6 +89,7 @@ import "../graph/formatters.js";
|
|
|
89
89
|
import "lightweight-charts";
|
|
90
90
|
import "../graph/graph-view.js";
|
|
91
91
|
import "../help-tip/help-tip.js";
|
|
92
|
+
import "../health-factor/health-factor.js";
|
|
92
93
|
import "../horizontal-indicator/horizontal-indicator.js";
|
|
93
94
|
import "../layout/col/col.js";
|
|
94
95
|
import "../layout/container/container.js";
|
|
@@ -98,6 +99,7 @@ import "../layout/header/header.js";
|
|
|
98
99
|
import "../layout/layout/layout.js";
|
|
99
100
|
import "../../utils/reactochart-compat.js";
|
|
100
101
|
import { ShortString as j } from "../short-string/short-string.js";
|
|
102
|
+
import "../status-elements/status-elements.js";
|
|
101
103
|
import "react-markdown";
|
|
102
104
|
import "remark-gfm";
|
|
103
105
|
import "../navbar/navbar.js";
|
|
@@ -174,7 +176,7 @@ function A({
|
|
|
174
176
|
) })
|
|
175
177
|
] });
|
|
176
178
|
}
|
|
177
|
-
function
|
|
179
|
+
function nr({
|
|
178
180
|
titleProps: e,
|
|
179
181
|
inputProps: n,
|
|
180
182
|
balanceIndicatorProps: s
|
|
@@ -237,5 +239,5 @@ function pr({
|
|
|
237
239
|
}
|
|
238
240
|
export {
|
|
239
241
|
A as BalanceIndicator,
|
|
240
|
-
|
|
242
|
+
nr as ComplexInput
|
|
241
243
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
3
|
import "@gearbox-protocol/sdk";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as n } from "../../utils/cn.js";
|
|
5
5
|
import "sonner";
|
|
6
|
-
const d =
|
|
7
|
-
({ className:
|
|
6
|
+
const d = p.forwardRef(
|
|
7
|
+
({ className: a, loading: o, duration: t = 100, children: r, style: i, ...e }, m) => /* @__PURE__ */ s(
|
|
8
8
|
"span",
|
|
9
9
|
{
|
|
10
|
-
ref:
|
|
11
|
-
className:
|
|
10
|
+
ref: m,
|
|
11
|
+
className: n(a),
|
|
12
12
|
style: {
|
|
13
|
-
opacity:
|
|
13
|
+
opacity: o ? 0.5 : 1,
|
|
14
14
|
transition: `opacity ${t}ms ease-in-out`,
|
|
15
|
-
...
|
|
15
|
+
...i
|
|
16
16
|
},
|
|
17
|
-
"data-loading":
|
|
18
|
-
...
|
|
19
|
-
children:
|
|
17
|
+
"data-loading": o,
|
|
18
|
+
...e,
|
|
19
|
+
children: r
|
|
20
20
|
}
|
|
21
21
|
)
|
|
22
22
|
);
|
|
@@ -1,51 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { PERCENTAGE_FACTOR as
|
|
1
|
+
import { jsxs as f, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { PERCENTAGE_FACTOR as v, formatPercentage as x } from "@gearbox-protocol/sdk";
|
|
3
|
+
import { cva as p } from "class-variance-authority";
|
|
3
4
|
import "react";
|
|
4
|
-
import { cn as
|
|
5
|
+
import { cn as C } from "../../utils/cn.js";
|
|
5
6
|
import "sonner";
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
import { StatusBars as F } from "../status-elements/status-elements.js";
|
|
8
|
+
const g = 15e3, A = 11e3, H = 10500, N = (t) => {
|
|
9
|
+
if (t)
|
|
10
|
+
return t >= g ? "good" : t > A ? "medium" : t > H ? "bad" : t > v ? "critical" : "liquidation";
|
|
11
|
+
}, b = p(
|
|
12
|
+
"inline-flex items-center font-medium [text-decoration:inherit]",
|
|
13
|
+
{
|
|
14
|
+
variants: {
|
|
15
|
+
zone: {
|
|
16
|
+
good: "text-success",
|
|
17
|
+
medium: "text-warning",
|
|
18
|
+
bad: "text-destructive",
|
|
19
|
+
critical: "text-destructive",
|
|
20
|
+
liquidation: "text-liquidation",
|
|
21
|
+
unset: "[color:unset]"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
function R({
|
|
27
|
+
value: t,
|
|
28
|
+
debt: e,
|
|
29
|
+
decimals: a = 3,
|
|
30
|
+
zone: o,
|
|
31
|
+
zoneType: n = "color",
|
|
32
|
+
className: u,
|
|
19
33
|
...m
|
|
20
34
|
}) {
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (!c || o === void 0) return "";
|
|
26
|
-
switch (o) {
|
|
27
|
-
case "good":
|
|
28
|
-
return "text-green-600";
|
|
29
|
-
case "medium":
|
|
30
|
-
return "text-yellow-600";
|
|
31
|
-
case "bad":
|
|
32
|
-
return "text-orange-500";
|
|
33
|
-
case "critical":
|
|
34
|
-
case "liquidation":
|
|
35
|
-
return "text-destructive";
|
|
36
|
-
default:
|
|
37
|
-
return "";
|
|
38
|
-
}
|
|
39
|
-
}, d = () => {
|
|
40
|
-
if (n) return "N/A";
|
|
41
|
-
const f = Number(r) / Number(i), l = v(f, u, !1);
|
|
42
|
-
return String(l);
|
|
35
|
+
const i = e !== void 0 && e === 0n, r = !i && n === "color" ? o === void 0 ? N(t) : o : void 0, s = r === void 0 ? void 0 : r === null ? "unset" : r, d = () => {
|
|
36
|
+
if (i) return "N/A";
|
|
37
|
+
const l = Number(t);
|
|
38
|
+
return x(l, a);
|
|
43
39
|
};
|
|
44
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ f(
|
|
41
|
+
"span",
|
|
42
|
+
{
|
|
43
|
+
className: C(
|
|
44
|
+
b(
|
|
45
|
+
s !== void 0 ? { zone: s } : {}
|
|
46
|
+
),
|
|
47
|
+
u
|
|
48
|
+
),
|
|
49
|
+
...m,
|
|
50
|
+
children: [
|
|
51
|
+
o && n === "bars" && /* @__PURE__ */ c("span", { className: "mr-6 shrink-0", children: /* @__PURE__ */ c(F, { zone: o }) }),
|
|
52
|
+
d()
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
45
56
|
}
|
|
46
57
|
export {
|
|
47
58
|
A as BAD_HF,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
g as GOOD_HF,
|
|
60
|
+
R as HealthFactor,
|
|
61
|
+
N as getHFZones
|
|
51
62
|
};
|
|
@@ -1,80 +1,129 @@
|
|
|
1
|
-
import { jsx as e
|
|
2
|
-
import { IconQuestionCircle as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconQuestionCircle as u, IconInfo as v } from "@gearbox-protocol/static";
|
|
3
|
+
import { cva as T } from "class-variance-authority";
|
|
3
4
|
import * as l from "react";
|
|
4
5
|
import "@gearbox-protocol/sdk";
|
|
5
|
-
import { cn as
|
|
6
|
+
import { cn as p } from "../../utils/cn.js";
|
|
6
7
|
import "sonner";
|
|
7
|
-
import "../tooltip/simple-tooltip.js";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import { SimpleTooltip as C } from "../tooltip/simple-tooltip.js";
|
|
9
|
+
const H = T("transition-colors", {
|
|
10
|
+
variants: {
|
|
11
|
+
iconColor: {
|
|
12
|
+
"gray-10": "text-gray-10",
|
|
13
|
+
"gray-20": "text-gray-20",
|
|
14
|
+
"gray-30": "text-gray-30",
|
|
15
|
+
"gray-40": "text-gray-40",
|
|
16
|
+
"gray-50": "text-gray-50",
|
|
17
|
+
"gray-60": "text-gray-60",
|
|
18
|
+
"gray-70": "text-gray-70",
|
|
19
|
+
"gray-80": "text-gray-80",
|
|
20
|
+
"gray-90": "text-gray-90",
|
|
21
|
+
"gray-100": "text-gray-100",
|
|
22
|
+
"gray-110": "text-gray-110",
|
|
23
|
+
muted: "text-secondary-foreground",
|
|
24
|
+
foreground: "text-foreground"
|
|
25
|
+
},
|
|
26
|
+
iconHoverColor: {
|
|
27
|
+
"gray-10": "hover:text-gray-10",
|
|
28
|
+
"gray-20": "hover:text-gray-20",
|
|
29
|
+
"gray-30": "hover:text-gray-30",
|
|
30
|
+
"gray-40": "hover:text-gray-40",
|
|
31
|
+
"gray-50": "hover:text-gray-50",
|
|
32
|
+
"gray-60": "hover:text-gray-60",
|
|
33
|
+
"gray-70": "hover:text-gray-70",
|
|
34
|
+
"gray-80": "hover:text-gray-80",
|
|
35
|
+
"gray-90": "hover:text-gray-90",
|
|
36
|
+
"gray-100": "hover:text-gray-100",
|
|
37
|
+
"gray-110": "hover:text-gray-110",
|
|
38
|
+
muted: "hover:text-secondary-foreground",
|
|
39
|
+
foreground: "hover:text-foreground"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: { iconColor: "gray-90", iconHoverColor: "gray-110" }
|
|
43
|
+
}), I = l.forwardRef(
|
|
10
44
|
({
|
|
11
|
-
className:
|
|
12
|
-
children:
|
|
13
|
-
maxWidth:
|
|
14
|
-
minWidth:
|
|
15
|
-
delayShow:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
45
|
+
className: t,
|
|
46
|
+
children: r,
|
|
47
|
+
maxWidth: o,
|
|
48
|
+
minWidth: a,
|
|
49
|
+
delayShow: g = 200,
|
|
50
|
+
placement: y = "bottom",
|
|
51
|
+
iconSize: n = 14,
|
|
52
|
+
iconColor: i = "gray-90",
|
|
53
|
+
iconHoverColor: s = "gray-110",
|
|
54
|
+
iconVariant: x = "question",
|
|
55
|
+
onPointerEnter: m,
|
|
56
|
+
...d
|
|
57
|
+
}, f) => {
|
|
58
|
+
const h = /* @__PURE__ */ e(
|
|
59
|
+
c,
|
|
25
60
|
{
|
|
26
|
-
ref:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
onPointerEnter:
|
|
32
|
-
|
|
33
|
-
|
|
61
|
+
ref: f,
|
|
62
|
+
iconSize: n,
|
|
63
|
+
iconColor: i,
|
|
64
|
+
iconHoverColor: s,
|
|
65
|
+
iconVariant: x,
|
|
66
|
+
onPointerEnter: m,
|
|
67
|
+
className: t,
|
|
68
|
+
...d
|
|
34
69
|
}
|
|
35
|
-
)
|
|
36
|
-
/* @__PURE__ */ e(
|
|
37
|
-
|
|
70
|
+
);
|
|
71
|
+
return /* @__PURE__ */ e(
|
|
72
|
+
C,
|
|
38
73
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
children: o
|
|
74
|
+
title: h,
|
|
75
|
+
placement: y,
|
|
76
|
+
delayShow: g,
|
|
77
|
+
maxWidth: o,
|
|
78
|
+
minWidth: a,
|
|
79
|
+
children: r
|
|
47
80
|
}
|
|
48
|
-
)
|
|
49
|
-
|
|
81
|
+
);
|
|
82
|
+
}
|
|
50
83
|
);
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
84
|
+
I.displayName = "HelpTip";
|
|
85
|
+
const c = l.forwardRef(
|
|
86
|
+
({
|
|
87
|
+
className: t,
|
|
88
|
+
iconSize: r = 14,
|
|
89
|
+
iconColor: o = "gray-90",
|
|
90
|
+
iconHoverColor: a = "gray-110",
|
|
91
|
+
iconVariant: g = "question",
|
|
92
|
+
onPointerEnter: y,
|
|
93
|
+
...n
|
|
94
|
+
}, i) => {
|
|
95
|
+
const s = g === "question" ? u : v;
|
|
96
|
+
return /* @__PURE__ */ e(
|
|
97
|
+
"span",
|
|
98
|
+
{
|
|
99
|
+
ref: i,
|
|
100
|
+
role: "img",
|
|
101
|
+
"aria-hidden": !0,
|
|
102
|
+
className: p(
|
|
103
|
+
"inline-block cursor-help",
|
|
104
|
+
H({ iconColor: o, iconHoverColor: a }),
|
|
105
|
+
t
|
|
106
|
+
),
|
|
107
|
+
style: { width: r, height: r },
|
|
108
|
+
onPointerEnter: y,
|
|
109
|
+
...n,
|
|
110
|
+
children: /* @__PURE__ */ e(s, { size: r })
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
65
114
|
);
|
|
66
|
-
|
|
67
|
-
const
|
|
115
|
+
c.displayName = "HelpTipIcon";
|
|
116
|
+
const N = l.forwardRef(({ className: t, ...r }, o) => /* @__PURE__ */ e(
|
|
68
117
|
"span",
|
|
69
118
|
{
|
|
70
|
-
ref:
|
|
71
|
-
className:
|
|
72
|
-
...
|
|
119
|
+
ref: o,
|
|
120
|
+
className: p("ml-1.5 inline-block leading-none", t),
|
|
121
|
+
...r
|
|
73
122
|
}
|
|
74
123
|
));
|
|
75
|
-
|
|
124
|
+
N.displayName = "TipWrap";
|
|
76
125
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
126
|
+
I as HelpTip,
|
|
127
|
+
c as HelpTipIcon,
|
|
128
|
+
N as TipWrap
|
|
80
129
|
};
|