@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
|
@@ -1,48 +1,66 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cva as u } from "class-variance-authority";
|
|
2
3
|
import "react";
|
|
3
4
|
import "@gearbox-protocol/sdk";
|
|
4
5
|
import { cn as o } from "../../utils/cn.js";
|
|
5
6
|
import "sonner";
|
|
6
|
-
const
|
|
7
|
+
const d = {
|
|
7
8
|
good: "bg-success",
|
|
8
9
|
medium: "bg-warning",
|
|
9
10
|
bad: "bg-destructive",
|
|
10
11
|
critical: "bg-destructive",
|
|
11
12
|
liquidation: "bg-liquidation"
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
medium: 2,
|
|
15
|
-
bad: 1,
|
|
16
|
-
critical: 1,
|
|
17
|
-
liquidation: 1
|
|
18
|
-
}, u = 3;
|
|
19
|
-
function b({ zone: t, size: i = 8 }) {
|
|
13
|
+
};
|
|
14
|
+
function O({ zone: i, size: t = 8 }) {
|
|
20
15
|
return /* @__PURE__ */ a(
|
|
21
16
|
"div",
|
|
22
17
|
{
|
|
23
|
-
className: o("rounded-full shrink-0",
|
|
24
|
-
style: { width:
|
|
18
|
+
className: o("rounded-full shrink-0", d[i]),
|
|
19
|
+
style: { width: t, height: t },
|
|
25
20
|
"aria-hidden": !0
|
|
26
21
|
}
|
|
27
22
|
);
|
|
28
23
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
24
|
+
const l = {
|
|
25
|
+
good: 3,
|
|
26
|
+
medium: 2,
|
|
27
|
+
bad: 1,
|
|
28
|
+
critical: 1,
|
|
29
|
+
liquidation: 1
|
|
30
|
+
}, g = 3, m = {
|
|
31
|
+
good: "success",
|
|
32
|
+
medium: "warning",
|
|
33
|
+
bad: "destructive",
|
|
34
|
+
critical: "destructive",
|
|
35
|
+
liquidation: "liquidation"
|
|
36
|
+
}, b = u(
|
|
37
|
+
[
|
|
38
|
+
"h-[3px] rounded-[1.5px]",
|
|
39
|
+
"w-full max-w-full grow-0 shrink-0 basis-full"
|
|
40
|
+
].join(" "),
|
|
41
|
+
{
|
|
42
|
+
variants: {
|
|
43
|
+
color: {
|
|
44
|
+
success: "bg-success",
|
|
45
|
+
warning: "bg-warning",
|
|
46
|
+
destructive: "bg-destructive",
|
|
47
|
+
liquidation: "bg-liquidation",
|
|
48
|
+
"gray-50": "bg-gray-50"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
function B({ zone: i }) {
|
|
54
|
+
const t = l[i], e = m[i], n = Array.from({ length: g }, (s, r) => {
|
|
55
|
+
const c = r < t;
|
|
56
|
+
return {
|
|
57
|
+
key: r,
|
|
58
|
+
color: c ? e : "gray-50"
|
|
59
|
+
};
|
|
60
|
+
}).reverse();
|
|
61
|
+
return /* @__PURE__ */ a("div", { className: o("flex flex-wrap gap-0.5 w-2"), "aria-hidden": !0, children: n.map(({ key: s, color: r }) => /* @__PURE__ */ a("div", { className: b({ color: r }) }, s)) });
|
|
44
62
|
}
|
|
45
63
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
64
|
+
O as HealthDot,
|
|
65
|
+
B as StatusBars
|
|
48
66
|
};
|
|
@@ -1,55 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cva as
|
|
3
|
-
import * as
|
|
4
|
-
import { faArrowRight as V } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
-
import { FaIcon as y } from "../icons/fa-icon.js";
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { cva as l } from "class-variance-authority";
|
|
3
|
+
import * as V from "react";
|
|
6
4
|
import "@gearbox-protocol/sdk";
|
|
7
|
-
import { cn as
|
|
5
|
+
import { cn as a } from "../../utils/cn.js";
|
|
8
6
|
import "sonner";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
import { Description as f } from "../description/description.js";
|
|
8
|
+
import { HelpTip as v } from "../help-tip/help-tip.js";
|
|
9
|
+
const y = l(
|
|
10
|
+
["flex flex-nowrap", "w-full max-w-full grow-0 shrink-0 basis-full"].join(
|
|
11
|
+
" "
|
|
12
|
+
),
|
|
13
|
+
{
|
|
14
|
+
variants: {
|
|
15
|
+
align: {
|
|
16
|
+
start: "items-start",
|
|
17
|
+
center: "items-center",
|
|
18
|
+
end: "items-end",
|
|
19
|
+
baseline: "items-baseline"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: { align: "start" }
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
), k = l(
|
|
25
|
+
"flex items-center grow shrink-0 basis-[0%] text-left text-foreground",
|
|
26
|
+
{
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
xs: "text-xs leading-[14px]",
|
|
30
|
+
sm: "text-sm leading-[17px]",
|
|
31
|
+
default: "text-base leading-[19px]",
|
|
32
|
+
unset: "text-[length:unset] leading-[unset]"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: { size: "default" }
|
|
32
36
|
}
|
|
33
|
-
|
|
37
|
+
), u = l("text-right font-medium", {
|
|
34
38
|
variants: {
|
|
35
39
|
size: {
|
|
36
|
-
xs: "text-xs",
|
|
37
|
-
sm: "text-sm",
|
|
38
|
-
default: "text-base",
|
|
39
|
-
unset: ""
|
|
40
|
+
xs: "text-xs leading-[14px]",
|
|
41
|
+
sm: "text-sm leading-[17px]",
|
|
42
|
+
default: "text-base leading-[19px]",
|
|
43
|
+
unset: "text-[length:unset] leading-[unset]"
|
|
40
44
|
},
|
|
41
45
|
weight: {
|
|
42
46
|
normal: "font-normal",
|
|
43
47
|
medium: "font-medium",
|
|
44
|
-
unset: ""
|
|
48
|
+
unset: "[font-weight:unset]"
|
|
45
49
|
},
|
|
46
50
|
color: {
|
|
47
51
|
default: "text-foreground",
|
|
48
|
-
muted: "text-
|
|
49
|
-
success: "text-
|
|
50
|
-
warning: "text-
|
|
52
|
+
muted: "text-gray-70",
|
|
53
|
+
success: "text-success",
|
|
54
|
+
warning: "text-warning",
|
|
51
55
|
alert: "text-destructive",
|
|
52
|
-
primary: "text-primary"
|
|
56
|
+
primary: "text-primary",
|
|
57
|
+
secondary: "text-secondary-foreground"
|
|
53
58
|
}
|
|
54
59
|
},
|
|
55
60
|
defaultVariants: {
|
|
@@ -57,75 +62,70 @@ const j = m("flex flex-nowrap gap-3 items-center", {
|
|
|
57
62
|
weight: "medium",
|
|
58
63
|
color: "default"
|
|
59
64
|
}
|
|
60
|
-
}),
|
|
65
|
+
}), j = V.forwardRef(
|
|
61
66
|
({
|
|
62
|
-
className:
|
|
63
|
-
align:
|
|
64
|
-
label:
|
|
65
|
-
description:
|
|
66
|
-
valueDescription:
|
|
67
|
-
tip:
|
|
68
|
-
value:
|
|
69
|
-
valueTo:
|
|
70
|
-
size:
|
|
67
|
+
className: g,
|
|
68
|
+
align: h,
|
|
69
|
+
label: s,
|
|
70
|
+
description: n,
|
|
71
|
+
valueDescription: m,
|
|
72
|
+
tip: d,
|
|
73
|
+
value: o,
|
|
74
|
+
valueTo: r,
|
|
75
|
+
size: i = "sm",
|
|
71
76
|
weight: c = "medium",
|
|
72
|
-
color:
|
|
73
|
-
onPointerEnterTip:
|
|
74
|
-
...
|
|
75
|
-
}, N) => /* @__PURE__ */
|
|
77
|
+
color: x = "default",
|
|
78
|
+
onPointerEnterTip: p,
|
|
79
|
+
...w
|
|
80
|
+
}, N) => /* @__PURE__ */ t(
|
|
76
81
|
"div",
|
|
77
82
|
{
|
|
78
83
|
ref: N,
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
84
|
+
className: a(y({ align: h }), g),
|
|
85
|
+
...w,
|
|
81
86
|
children: [
|
|
82
|
-
(
|
|
83
|
-
|
|
87
|
+
(s || n) && /* @__PURE__ */ t("div", { className: "grow shrink-0 basis-[0%] h-min flex flex-col", children: [
|
|
88
|
+
s && /* @__PURE__ */ t("div", { className: a(k({ size: i })), children: [
|
|
89
|
+
s,
|
|
90
|
+
d && /* @__PURE__ */ e("span", { className: "ml-2 inline-block leading-none", children: /* @__PURE__ */ e(v, { onPointerEnter: p, children: d }) })
|
|
91
|
+
] }),
|
|
92
|
+
n && /* @__PURE__ */ e(f, { className: "text-left", children: n })
|
|
93
|
+
] }),
|
|
94
|
+
o && /* @__PURE__ */ t("div", { className: "w-auto grow-0 shrink-0 basis-auto flex flex-col", children: [
|
|
95
|
+
/* @__PURE__ */ t(
|
|
84
96
|
"div",
|
|
85
97
|
{
|
|
86
|
-
className:
|
|
87
|
-
"flex
|
|
88
|
-
|
|
98
|
+
className: a(
|
|
99
|
+
"flex flex-nowrap",
|
|
100
|
+
"w-full max-w-full grow-0 shrink-0 basis-full",
|
|
101
|
+
"justify-end items-center"
|
|
89
102
|
),
|
|
90
103
|
children: [
|
|
91
|
-
|
|
92
|
-
|
|
104
|
+
/* @__PURE__ */ e(
|
|
105
|
+
"span",
|
|
106
|
+
{
|
|
107
|
+
className: a(
|
|
108
|
+
u({ size: i, weight: c, color: x }),
|
|
109
|
+
r && "line-through [&>*]:line-through"
|
|
110
|
+
),
|
|
111
|
+
children: o
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
r && /* @__PURE__ */ t(b, { children: [
|
|
115
|
+
/* @__PURE__ */ e("span", { className: "px-1.5 text-gray-70", children: "→" }),
|
|
116
|
+
/* @__PURE__ */ e("span", { className: a(u({ size: i, weight: c, color: x })), children: r })
|
|
117
|
+
] })
|
|
93
118
|
]
|
|
94
119
|
}
|
|
95
120
|
),
|
|
96
|
-
|
|
97
|
-
] }),
|
|
98
|
-
d && /* @__PURE__ */ e("div", { className: "flex flex-col flex-auto", children: [
|
|
99
|
-
/* @__PURE__ */ e("div", { className: "flex flex-nowrap gap-3 justify-end items-center", children: [
|
|
100
|
-
/* @__PURE__ */ t(
|
|
101
|
-
"span",
|
|
102
|
-
{
|
|
103
|
-
className: r(
|
|
104
|
-
x({ size: n, weight: c, color: f }),
|
|
105
|
-
i && "line-through opacity-60"
|
|
106
|
-
),
|
|
107
|
-
children: d
|
|
108
|
-
}
|
|
109
|
-
),
|
|
110
|
-
i && /* @__PURE__ */ e(v, { children: [
|
|
111
|
-
/* @__PURE__ */ t(
|
|
112
|
-
y,
|
|
113
|
-
{
|
|
114
|
-
icon: V,
|
|
115
|
-
className: "size-3 text-muted-foreground"
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
/* @__PURE__ */ t("span", { className: r(x({ size: n, weight: c, color: f })), children: i })
|
|
119
|
-
] })
|
|
120
|
-
] }),
|
|
121
|
-
l && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground text-right", children: l })
|
|
121
|
+
m && /* @__PURE__ */ e(f, { className: "text-right", children: m })
|
|
122
122
|
] })
|
|
123
123
|
]
|
|
124
124
|
}
|
|
125
125
|
)
|
|
126
126
|
);
|
|
127
|
-
|
|
127
|
+
j.displayName = "VerticalIndicator";
|
|
128
128
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
j as VerticalIndicator,
|
|
130
|
+
y as verticalIndicatorVariants
|
|
131
131
|
};
|