@gearbox-protocol/ui-kit 4.0.0-next.42 → 4.0.0-next.44
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/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
- package/dist/cjs/components/base/values/constants.cjs +1 -1
- package/dist/cjs/components/base/values/index.cjs +1 -1
- package/dist/cjs/components/base/values/no-value.cjs +1 -0
- package/dist/cjs/components/base/values/pnl-value.cjs +1 -1
- package/dist/cjs/components/base/values/price-impact-value.cjs +1 -1
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/base-table/base-table-line.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-button/styled-button.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.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/link/link.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +3 -2
- package/dist/esm/components/base/index.js +63 -61
- package/dist/esm/components/base/info-list/info-list.js +8 -7
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +74 -61
- package/dist/esm/components/base/position-assets/position-assets.js +4 -3
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +86 -74
- package/dist/esm/components/base/token-amount/token-amount.js +32 -16
- package/dist/esm/components/base/values/constants.js +1 -0
- package/dist/esm/components/base/values/index.js +21 -19
- package/dist/esm/components/base/values/no-value.js +34 -0
- package/dist/esm/components/base/values/pnl-value.js +10 -9
- package/dist/esm/components/base/values/price-impact-value.js +6 -5
- package/dist/esm/components/base/values/scalars.js +23 -26
- package/dist/esm/components/base-table/base-table-line.js +44 -36
- package/dist/esm/components/checkbox/checkbox-labeled.js +1 -1
- package/dist/esm/components/client-adapters/styled-button/styled-button.js +5 -11
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -1
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +47 -46
- package/dist/esm/components/compound-apy/compound-apy.js +48 -40
- package/dist/esm/components/help-tip/help-tip.js +64 -59
- package/dist/esm/components/index.js +624 -622
- package/dist/esm/components/link/link.js +48 -34
- package/dist/esm/components/with-copy/with-copy.js +1 -1
- package/dist/esm/index.js +805 -803
- package/dist/esm/locale/en.json.js +1 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/base/apy-breakdown-body/apy-breakdown-body.d.ts +4 -3
- package/dist/types/components/base/values/constants.d.ts +1 -0
- package/dist/types/components/base/values/index.d.ts +1 -0
- package/dist/types/components/base/values/no-value.d.ts +25 -0
- package/dist/types/components/base/values/scalars.d.ts +7 -2
- package/dist/types/components/client-adapters/styled-button/styled-button.d.ts +10 -5
- package/dist/types/locale/en.json.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { faCircleQuestion as u } from "@fortawesome/free-solid-svg-icons";
|
|
3
|
+
import { IconInfo as v } from "@gearbox-protocol/static";
|
|
3
4
|
import { cva as T } from "class-variance-authority";
|
|
4
|
-
import * as
|
|
5
|
+
import * as p from "react";
|
|
6
|
+
import { FaIcon as C } from "../icons/fa-icon.js";
|
|
5
7
|
import "@gearbox-protocol/sdk/onchain";
|
|
6
|
-
import { cn as
|
|
8
|
+
import { cn as m } from "../../utils/cn.js";
|
|
7
9
|
import "sonner";
|
|
8
10
|
import "luxon";
|
|
9
11
|
import "../../utils/z-index.js";
|
|
10
|
-
import { SimpleTooltip as
|
|
11
|
-
const
|
|
12
|
+
import { SimpleTooltip as H } from "../tooltip/simple-tooltip.js";
|
|
13
|
+
const I = T("transition-colors", {
|
|
12
14
|
variants: {
|
|
13
15
|
iconColor: {
|
|
14
16
|
"gray-10": "text-gray-10",
|
|
@@ -42,89 +44,92 @@ const H = T("transition-colors", {
|
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
46
|
defaultVariants: { iconColor: "gray-90", iconHoverColor: "gray-110" }
|
|
45
|
-
}),
|
|
47
|
+
}), N = p.forwardRef(
|
|
46
48
|
({
|
|
47
|
-
className:
|
|
48
|
-
children:
|
|
49
|
-
maxWidth:
|
|
50
|
-
minWidth:
|
|
49
|
+
className: o,
|
|
50
|
+
children: r,
|
|
51
|
+
maxWidth: a,
|
|
52
|
+
minWidth: e,
|
|
51
53
|
delayShow: g = 200,
|
|
52
54
|
placement: y = "bottom",
|
|
53
55
|
iconSize: i = 14,
|
|
54
56
|
iconColor: n = "gray-90",
|
|
55
|
-
iconHoverColor:
|
|
57
|
+
iconHoverColor: s = "gray-110",
|
|
56
58
|
iconVariant: x = "question",
|
|
57
|
-
onPointerEnter:
|
|
58
|
-
...
|
|
59
|
-
},
|
|
60
|
-
const
|
|
59
|
+
onPointerEnter: c,
|
|
60
|
+
...f
|
|
61
|
+
}, d) => {
|
|
62
|
+
const h = /* @__PURE__ */ t(
|
|
61
63
|
l,
|
|
62
64
|
{
|
|
63
|
-
ref:
|
|
65
|
+
ref: d,
|
|
64
66
|
iconSize: i,
|
|
65
67
|
iconColor: n,
|
|
66
|
-
iconHoverColor:
|
|
68
|
+
iconHoverColor: s,
|
|
67
69
|
iconVariant: x,
|
|
68
|
-
onPointerEnter:
|
|
69
|
-
className:
|
|
70
|
-
...
|
|
70
|
+
onPointerEnter: c,
|
|
71
|
+
className: o,
|
|
72
|
+
...f
|
|
71
73
|
}
|
|
72
74
|
);
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
|
|
75
|
+
return /* @__PURE__ */ t(
|
|
76
|
+
H,
|
|
75
77
|
{
|
|
76
|
-
title:
|
|
78
|
+
title: h,
|
|
77
79
|
placement: y,
|
|
78
80
|
delayShow: g,
|
|
79
|
-
maxWidth:
|
|
80
|
-
minWidth:
|
|
81
|
-
children:
|
|
81
|
+
maxWidth: a,
|
|
82
|
+
minWidth: e,
|
|
83
|
+
children: r
|
|
82
84
|
}
|
|
83
85
|
);
|
|
84
86
|
}
|
|
85
87
|
);
|
|
86
|
-
|
|
87
|
-
const l =
|
|
88
|
+
N.displayName = "HelpTip";
|
|
89
|
+
const l = p.forwardRef(
|
|
88
90
|
({
|
|
89
|
-
className:
|
|
90
|
-
iconSize:
|
|
91
|
-
iconColor:
|
|
92
|
-
iconHoverColor:
|
|
91
|
+
className: o,
|
|
92
|
+
iconSize: r = 14,
|
|
93
|
+
iconColor: a = "gray-90",
|
|
94
|
+
iconHoverColor: e = "gray-110",
|
|
93
95
|
iconVariant: g = "question",
|
|
94
96
|
onPointerEnter: y,
|
|
95
97
|
...i
|
|
96
|
-
}, n) =>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
98
|
+
}, n) => /* @__PURE__ */ t(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
ref: n,
|
|
102
|
+
role: "img",
|
|
103
|
+
"aria-hidden": !0,
|
|
104
|
+
className: m(
|
|
105
|
+
"inline-block cursor-help",
|
|
106
|
+
I({ iconColor: a, iconHoverColor: e }),
|
|
107
|
+
o
|
|
108
|
+
),
|
|
109
|
+
onPointerEnter: y,
|
|
110
|
+
...i,
|
|
111
|
+
children: g === "question" ? /* @__PURE__ */ t(
|
|
112
|
+
C,
|
|
113
|
+
{
|
|
114
|
+
icon: u,
|
|
115
|
+
style: { width: r, height: r }
|
|
116
|
+
}
|
|
117
|
+
) : /* @__PURE__ */ t(v, { size: r })
|
|
118
|
+
}
|
|
119
|
+
)
|
|
115
120
|
);
|
|
116
121
|
l.displayName = "HelpTipIcon";
|
|
117
|
-
const
|
|
122
|
+
const w = p.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
118
123
|
"span",
|
|
119
124
|
{
|
|
120
|
-
ref:
|
|
121
|
-
className:
|
|
122
|
-
...
|
|
125
|
+
ref: a,
|
|
126
|
+
className: m("ml-1.5 inline-block leading-[0]", o),
|
|
127
|
+
...r
|
|
123
128
|
}
|
|
124
129
|
));
|
|
125
|
-
|
|
130
|
+
w.displayName = "TipWrap";
|
|
126
131
|
export {
|
|
127
|
-
|
|
132
|
+
N as HelpTip,
|
|
128
133
|
l as HelpTipIcon,
|
|
129
|
-
|
|
134
|
+
w as TipWrap
|
|
130
135
|
};
|