@gearbox-protocol/permissionless-ui 1.22.0-next.2 → 1.22.0-next.21
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/buttons/button/button.cjs +1 -1
- package/dist/cjs/components/buttons/navigation-button/navigation-button.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/index.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-button/styled-button.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-dialog-container/index.cjs +1 -0
- package/dist/cjs/components/client-adapters/styled-dialog-container/styled-dialog-container.cjs +1 -0
- package/dist/cjs/components/client-adapters/styled-rounded-image/index.cjs +1 -0
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -0
- package/dist/cjs/components/description/description.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-container.cjs +1 -1
- package/dist/cjs/components/dialog/dialog-modal-container.cjs +1 -1
- package/dist/cjs/components/dialog/index.cjs +1 -1
- package/dist/cjs/components/filter/filter-modal.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/layout/app-logo/app-logo.cjs +1 -1
- package/dist/cjs/components/layout/col/col.cjs +1 -1
- package/dist/cjs/components/layout/container/container.cjs +1 -1
- package/dist/cjs/components/layout/footer/footer.cjs +1 -1
- package/dist/cjs/components/layout/grid/grid.cjs +1 -1
- package/dist/cjs/components/layout/header/header.cjs +1 -1
- package/dist/cjs/components/layout/layout/layout.cjs +2 -2
- package/dist/cjs/components/modal/index.cjs +1 -0
- package/dist/cjs/components/modal/modal.cjs +1 -0
- package/dist/cjs/components/network-icon/network-icon.cjs +1 -1
- package/dist/cjs/components/points-icon/points-icon.cjs +1 -1
- package/dist/cjs/components/rounded-image/rounded-image.cjs +1 -1
- package/dist/cjs/components/short-string/short-string.cjs +1 -1
- package/dist/cjs/components/table/grid-table.cjs +1 -1
- package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
- package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
- package/dist/cjs/components/typography/typography.cjs +1 -1
- package/dist/cjs/components/vertical-list/vertical-list.cjs +1 -1
- package/dist/cjs/configs/tailwind-preset.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/utils/format-money.cjs +1 -1
- package/dist/cjs/utils/format-slippage.cjs +1 -0
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/network-icons.cjs +1 -1
- package/dist/cjs/utils/search-in-token.cjs +1 -1
- package/dist/cjs/utils/shorten-string.cjs +1 -1
- package/dist/cjs/utils/static.cjs +1 -0
- package/dist/cjs/utils/templates.cjs +1 -1
- package/dist/cjs/utils/window.cjs +1 -1
- package/dist/cjs/utils/z-index.cjs +1 -0
- package/dist/esm/components/buttons/button/button.js +22 -15
- package/dist/esm/components/buttons/navigation-button/navigation-button.js +6 -6
- package/dist/esm/components/checkbox/checkbox-labeled.js +7 -1
- package/dist/esm/components/client-adapters/index.js +6 -2
- package/dist/esm/components/client-adapters/styled-button/styled-button.js +24 -13
- package/dist/esm/components/client-adapters/styled-dialog-container/index.js +4 -0
- package/dist/esm/components/client-adapters/styled-dialog-container/styled-dialog-container.js +39 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/index.js +4 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +136 -0
- package/dist/esm/components/description/description.js +16 -10
- package/dist/esm/components/dialog/dialog-container.js +55 -21
- package/dist/esm/components/dialog/dialog-modal-container.js +38 -17
- package/dist/esm/components/dialog/index.js +18 -18
- package/dist/esm/components/filter/filter-modal.js +1 -1
- package/dist/esm/components/index.js +470 -466
- package/dist/esm/components/layout/app-logo/app-logo.js +8 -7
- package/dist/esm/components/layout/col/col.js +4 -4
- package/dist/esm/components/layout/container/container.js +5 -5
- package/dist/esm/components/layout/footer/footer.js +3 -3
- package/dist/esm/components/layout/grid/grid.js +9 -9
- package/dist/esm/components/layout/header/header.js +12 -12
- package/dist/esm/components/layout/layout/layout.js +4 -4
- package/dist/esm/components/modal/index.js +4 -0
- package/dist/esm/components/modal/modal.js +108 -0
- package/dist/esm/components/network-icon/network-icon.js +22 -21
- package/dist/esm/components/points-icon/points-icon.js +34 -37
- package/dist/esm/components/rounded-image/rounded-image.js +59 -27
- package/dist/esm/components/short-string/short-string.js +19 -23
- package/dist/esm/components/table/grid-table.js +2 -0
- package/dist/esm/components/token-icon/token-icon.js +45 -39
- package/dist/esm/components/token-symbol/token-symbol.js +98 -40
- package/dist/esm/components/typography/typography.js +15 -12
- package/dist/esm/components/vertical-list/vertical-list.js +39 -33
- package/dist/esm/configs/tailwind-preset.js +5 -3
- package/dist/esm/index.js +606 -601
- package/dist/esm/utils/format-money.js +13 -17
- package/dist/esm/utils/format-slippage.js +7 -0
- package/dist/esm/utils/index.js +66 -65
- package/dist/esm/utils/network-icons.js +4 -53
- package/dist/esm/utils/search-in-token.js +8 -8
- package/dist/esm/utils/shorten-string.js +7 -3
- package/dist/esm/utils/static.js +6 -0
- package/dist/esm/utils/templates.js +8 -9
- package/dist/esm/utils/window.js +4 -3
- package/dist/esm/utils/z-index.js +7 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/auth/connect-required.d.ts +2 -2
- package/dist/types/components/auth/signin-required.d.ts +2 -2
- package/dist/types/components/buttons/button/button.d.ts +1 -1
- package/dist/types/components/buttons/navigation-button/navigation-button.d.ts +1 -1
- package/dist/types/components/client-adapters/index.d.ts +2 -0
- package/dist/types/components/client-adapters/styled-button/styled-button.d.ts +2 -2
- package/dist/types/components/client-adapters/styled-dialog-container/index.d.ts +1 -0
- package/dist/types/components/client-adapters/styled-dialog-container/styled-dialog-container.d.ts +13 -0
- package/dist/types/components/client-adapters/styled-rounded-image/index.d.ts +1 -0
- package/dist/types/components/client-adapters/styled-rounded-image/styled-rounded-image.d.ts +9 -0
- package/dist/types/components/description/description.d.ts +5 -3
- package/dist/types/components/dialog/dialog-container.d.ts +8 -3
- package/dist/types/components/dialog/dialog-modal-container.d.ts +9 -3
- package/dist/types/components/dialog/dialog.d.ts +3 -3
- package/dist/types/components/dialog/index.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/layout/col/col.d.ts +1 -1
- package/dist/types/components/layout/container/container.d.ts +1 -1
- package/dist/types/components/layout/footer/footer.d.ts +1 -1
- package/dist/types/components/layout/grid/grid.d.ts +1 -1
- package/dist/types/components/layout/header/header.d.ts +1 -1
- package/dist/types/components/layout/layout/layout.d.ts +1 -1
- package/dist/types/components/modal/index.d.ts +1 -0
- package/dist/types/components/modal/modal.d.ts +33 -0
- package/dist/types/components/navbar/navbar-indicator-context.d.ts +1 -1
- package/dist/types/components/points-icon/points-icon.d.ts +2 -5
- package/dist/types/components/pool-points-indicator/pool-points-indicator.d.ts +1 -1
- package/dist/types/components/rounded-image/rounded-image.d.ts +19 -4
- package/dist/types/components/short-string/short-string.d.ts +4 -4
- package/dist/types/components/skeleton/skeleton.d.ts +1 -1
- package/dist/types/components/theme-provider.d.ts +1 -1
- package/dist/types/components/tip-card/tip-card.d.ts +1 -1
- package/dist/types/components/token-icon/token-icon.d.ts +10 -4
- package/dist/types/components/token-symbol/token-symbol.d.ts +9 -4
- package/dist/types/components/typography/typography.d.ts +2 -2
- package/dist/types/components/vertical-list/vertical-list.d.ts +2 -5
- package/dist/types/components/with-copy/with-copy.d.ts +1 -1
- package/dist/types/configs/tailwind-preset.d.ts +2 -0
- package/dist/types/hooks/use-filter.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/component-props.d.ts +1 -1
- package/dist/types/utils/format-money.d.ts +0 -15
- package/dist/types/utils/format-slippage.d.ts +15 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/utils/network-icons.d.ts +3 -32
- package/dist/types/utils/shorten-string.d.ts +2 -1
- package/dist/types/utils/static.d.ts +3 -0
- package/dist/types/utils/templates.d.ts +1 -1
- package/dist/types/utils/window.d.ts +3 -1
- package/dist/types/utils/z-index.d.ts +8 -0
- package/package.json +4 -1
- package/src/styles/base.css +17 -6
- package/src/styles/theme.css +26 -0
- package/dist/cjs/components/dialog/dialog-modal.cjs +0 -1
- package/dist/esm/components/dialog/dialog-modal.js +0 -70
- package/dist/types/components/dialog/dialog-modal.d.ts +0 -30
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Image as r } from "../../image/image.js";
|
|
3
3
|
import { cn as o } from "../../../utils/cn.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { getStatic as l } from "../../../utils/static.js";
|
|
5
|
+
function p({
|
|
6
|
+
appName: m,
|
|
6
7
|
size: t = "default"
|
|
7
8
|
}) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ a(
|
|
9
10
|
"div",
|
|
10
11
|
{
|
|
11
12
|
className: o(
|
|
@@ -16,7 +17,7 @@ function d({
|
|
|
16
17
|
/* @__PURE__ */ e(
|
|
17
18
|
r,
|
|
18
19
|
{
|
|
19
|
-
src: "
|
|
20
|
+
src: l("/logo/logo_monochrome_white@2x.png"),
|
|
20
21
|
alt: "Gearbox Protocol",
|
|
21
22
|
width: t === "default" ? 120 : 100,
|
|
22
23
|
height: t === "default" ? 24 : 20,
|
|
@@ -27,11 +28,11 @@ function d({
|
|
|
27
28
|
)
|
|
28
29
|
}
|
|
29
30
|
),
|
|
30
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground whitespace-nowrap", children:
|
|
31
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground whitespace-nowrap", children: m })
|
|
31
32
|
]
|
|
32
33
|
}
|
|
33
34
|
);
|
|
34
35
|
}
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
p as AppLogo
|
|
37
38
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import S from "react";
|
|
2
|
+
import * as S from "react";
|
|
3
3
|
import { cn as f } from "../../../utils/cn.js";
|
|
4
4
|
const C = {
|
|
5
5
|
1: "col-span-1",
|
|
@@ -31,7 +31,7 @@ const C = {
|
|
|
31
31
|
12: "sm:col-span-12",
|
|
32
32
|
full: "sm:col-span-full",
|
|
33
33
|
auto: "sm:col-auto"
|
|
34
|
-
},
|
|
34
|
+
}, x = {
|
|
35
35
|
1: "md:col-span-1",
|
|
36
36
|
2: "md:col-span-2",
|
|
37
37
|
3: "md:col-span-3",
|
|
@@ -46,7 +46,7 @@ const C = {
|
|
|
46
46
|
12: "md:col-span-12",
|
|
47
47
|
full: "md:col-span-full",
|
|
48
48
|
auto: "md:col-auto"
|
|
49
|
-
},
|
|
49
|
+
}, _ = {
|
|
50
50
|
1: "lg:col-span-1",
|
|
51
51
|
2: "lg:col-span-2",
|
|
52
52
|
3: "lg:col-span-3",
|
|
@@ -76,7 +76,7 @@ const C = {
|
|
|
76
76
|
12: "xl:col-span-12",
|
|
77
77
|
full: "xl:col-span-full",
|
|
78
78
|
auto: "xl:col-auto"
|
|
79
|
-
}, s = (l, o) => !l || l === 1 && !o ? "" : o === "sm" ? g[l] || "" : o === "md" ?
|
|
79
|
+
}, s = (l, o) => !l || l === 1 && !o ? "" : o === "sm" ? g[l] || "" : o === "md" ? x[l] || "" : o === "lg" ? _[l] || "" : o === "xl" ? L[l] || "" : C[l] || "", A = {
|
|
80
80
|
1: "col-start-1",
|
|
81
81
|
2: "col-start-2",
|
|
82
82
|
3: "col-start-3",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import n from "react";
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import { cn as o } from "../../../utils/cn.js";
|
|
4
4
|
const c = {
|
|
5
5
|
sm: "max-w-screen-sm",
|
|
@@ -14,12 +14,12 @@ const c = {
|
|
|
14
14
|
padding: m = !0,
|
|
15
15
|
center: r = !0,
|
|
16
16
|
className: a,
|
|
17
|
-
children:
|
|
17
|
+
children: s,
|
|
18
18
|
...x
|
|
19
|
-
},
|
|
19
|
+
}, l) => /* @__PURE__ */ t(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
|
-
ref:
|
|
22
|
+
ref: l,
|
|
23
23
|
className: o(
|
|
24
24
|
"w-full",
|
|
25
25
|
c[e],
|
|
@@ -28,7 +28,7 @@ const c = {
|
|
|
28
28
|
a
|
|
29
29
|
),
|
|
30
30
|
...x,
|
|
31
|
-
children:
|
|
31
|
+
children: s
|
|
32
32
|
}
|
|
33
33
|
)
|
|
34
34
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t, Fragment as o } from "react/jsx-runtime";
|
|
2
|
-
import m from "react";
|
|
2
|
+
import * as m from "react";
|
|
3
3
|
import { cn as d } from "../../../utils/cn.js";
|
|
4
4
|
import { AppLogo as N } from "../app-logo/app-logo.js";
|
|
5
5
|
import { LegalDisclaimer as v } from "../legal-disclaimer/legal-disclaimer.js";
|
|
@@ -90,7 +90,7 @@ function n({
|
|
|
90
90
|
] }, r.href)) })
|
|
91
91
|
] });
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function D({
|
|
94
94
|
appName: l,
|
|
95
95
|
legalAppName: s,
|
|
96
96
|
legalReferences: r,
|
|
@@ -163,5 +163,5 @@ export {
|
|
|
163
163
|
b as Footer,
|
|
164
164
|
w as FooterLink,
|
|
165
165
|
n as FooterLinkSection,
|
|
166
|
-
|
|
166
|
+
D as GearboxFooter
|
|
167
167
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { cn as u } from "../../../utils/cn.js";
|
|
4
|
+
const _ = {
|
|
5
5
|
1: "grid-cols-1",
|
|
6
6
|
2: "grid-cols-2",
|
|
7
7
|
3: "grid-cols-3",
|
|
@@ -114,17 +114,17 @@ const u = {
|
|
|
114
114
|
16: "gap-y-16",
|
|
115
115
|
20: "gap-y-20",
|
|
116
116
|
24: "gap-y-24"
|
|
117
|
-
}, s = (g, r) => !g || typeof g == "string" ? "" : typeof g == "number" ? r === "sm" ? C[g] || "" : r === "md" ? L[g] || "" : r === "lg" ? G[g] || "" : r === "xl" ? A[g] || "" :
|
|
117
|
+
}, s = (g, r) => !g || typeof g == "string" ? "" : typeof g == "number" ? r === "sm" ? C[g] || "" : r === "md" ? L[g] || "" : r === "lg" ? G[g] || "" : r === "xl" ? A[g] || "" : _[g] || "" : "", l = (g, r) => g === void 0 ? "" : r === "x" ? R[g] || "" : r === "y" ? D[g] || "" : E[g] || "", I = f.forwardRef(
|
|
118
118
|
({
|
|
119
119
|
cols: g = 12,
|
|
120
120
|
sm: r,
|
|
121
121
|
md: c,
|
|
122
122
|
lg: a,
|
|
123
123
|
xl: p,
|
|
124
|
-
gap:
|
|
124
|
+
gap: m = 4,
|
|
125
125
|
gapX: d,
|
|
126
126
|
gapY: i,
|
|
127
|
-
className:
|
|
127
|
+
className: t,
|
|
128
128
|
style: o,
|
|
129
129
|
children: x,
|
|
130
130
|
...S
|
|
@@ -137,16 +137,16 @@ const u = {
|
|
|
137
137
|
"div",
|
|
138
138
|
{
|
|
139
139
|
ref: n,
|
|
140
|
-
className:
|
|
140
|
+
className: u(
|
|
141
141
|
"grid",
|
|
142
142
|
s(g),
|
|
143
143
|
s(r, "sm"),
|
|
144
144
|
s(c, "md"),
|
|
145
145
|
s(a, "lg"),
|
|
146
146
|
s(p, "xl"),
|
|
147
|
-
d !== void 0 ? l(d, "x") : l(
|
|
147
|
+
d !== void 0 ? l(d, "x") : l(m),
|
|
148
148
|
i !== void 0 && l(i, "y"),
|
|
149
|
-
|
|
149
|
+
t
|
|
150
150
|
),
|
|
151
151
|
style: e,
|
|
152
152
|
...S,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { X as b, Menu as N } from "lucide-react";
|
|
3
|
-
import c from "react";
|
|
3
|
+
import * as c from "react";
|
|
4
4
|
import { cn as o } from "../../../utils/cn.js";
|
|
5
5
|
const m = c.createContext(
|
|
6
6
|
null
|
|
7
7
|
);
|
|
8
|
-
function
|
|
8
|
+
function j() {
|
|
9
9
|
const e = c.useContext(m);
|
|
10
10
|
if (!e)
|
|
11
11
|
throw new Error("useMobileMenu must be used within Header component");
|
|
@@ -21,10 +21,10 @@ const w = c.forwardRef(
|
|
|
21
21
|
containerClassName: u,
|
|
22
22
|
className: p,
|
|
23
23
|
children: v,
|
|
24
|
-
mobileMenuContent:
|
|
24
|
+
mobileMenuContent: s,
|
|
25
25
|
...h
|
|
26
26
|
}, x) => {
|
|
27
|
-
const [
|
|
27
|
+
const [d, i] = c.useState(!1);
|
|
28
28
|
return /* @__PURE__ */ t(
|
|
29
29
|
"header",
|
|
30
30
|
{
|
|
@@ -50,32 +50,32 @@ const w = c.forwardRef(
|
|
|
50
50
|
e && /* @__PURE__ */ r("div", { className: "hidden md:flex items-center", children: e }),
|
|
51
51
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 sm:gap-2", children: [
|
|
52
52
|
l && /* @__PURE__ */ r("div", { className: "hidden md:flex items-center gap-2", children: l }),
|
|
53
|
-
(e ||
|
|
53
|
+
(e || s || l) && /* @__PURE__ */ r(
|
|
54
54
|
"button",
|
|
55
55
|
{
|
|
56
56
|
type: "button",
|
|
57
57
|
className: "md:hidden flex items-center justify-center p-2 rounded-md hover:bg-secondary hover:text-accent-foreground focus:outline-none cursor-pointer",
|
|
58
|
-
onClick: () => i(!
|
|
59
|
-
"aria-label":
|
|
60
|
-
children:
|
|
58
|
+
onClick: () => i(!d),
|
|
59
|
+
"aria-label": d ? "Close menu" : "Open menu",
|
|
60
|
+
children: d ? /* @__PURE__ */ r(b, { className: "h-6 w-6" }) : /* @__PURE__ */ r(N, { className: "h-6 w-6" })
|
|
61
61
|
}
|
|
62
62
|
)
|
|
63
63
|
] })
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
|
|
67
|
+
d && (e || s || l) && /* @__PURE__ */ r(
|
|
68
68
|
m.Provider,
|
|
69
69
|
{
|
|
70
70
|
value: { closeMobileMenu: () => i(!1) },
|
|
71
71
|
children: /* @__PURE__ */ r("div", { className: "absolute top-full left-0 right-0 bg-background border-b border-border md:hidden z-40 shadow-lg", children: /* @__PURE__ */ t("div", { className: "flex flex-col px-4 sm:px-6 py-4 space-y-2", children: [
|
|
72
|
-
|
|
72
|
+
s || e,
|
|
73
73
|
l && /* @__PURE__ */ r(
|
|
74
74
|
"div",
|
|
75
75
|
{
|
|
76
76
|
className: o(
|
|
77
77
|
"flex flex-col gap-2",
|
|
78
|
-
(
|
|
78
|
+
(s || e) && "pt-4 border-t border-border mt-4"
|
|
79
79
|
),
|
|
80
80
|
children: l
|
|
81
81
|
}
|
|
@@ -91,5 +91,5 @@ const w = c.forwardRef(
|
|
|
91
91
|
w.displayName = "Header";
|
|
92
92
|
export {
|
|
93
93
|
w as Header,
|
|
94
|
-
|
|
94
|
+
j as useMobileMenu
|
|
95
95
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import l from "react";
|
|
2
|
+
import * as l from "react";
|
|
3
3
|
import { cn as n } from "../../../utils/cn.js";
|
|
4
4
|
const m = l.forwardRef(
|
|
5
|
-
({ header: e, footer: a, children: o, className:
|
|
5
|
+
({ header: e, footer: a, children: o, className: i, ...d }, s) => /* @__PURE__ */ t(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
8
8
|
ref: s,
|
|
9
|
-
className: n("grid min-h-screen grid-rows-[auto_1fr_auto]",
|
|
9
|
+
className: n("grid min-h-screen grid-rows-[auto_1fr_auto]", i),
|
|
10
10
|
style: {
|
|
11
11
|
gridTemplateAreas: `
|
|
12
12
|
"header"
|
|
@@ -14,7 +14,7 @@ const m = l.forwardRef(
|
|
|
14
14
|
"footer"
|
|
15
15
|
`
|
|
16
16
|
},
|
|
17
|
-
...
|
|
17
|
+
...d,
|
|
18
18
|
children: [
|
|
19
19
|
e && /* @__PURE__ */ r("div", { style: { gridArea: "header" }, children: e }),
|
|
20
20
|
/* @__PURE__ */ r(
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "@radix-ui/react-dialog";
|
|
3
|
+
import { cva as C } from "class-variance-authority";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
import { cn as o } from "../../utils/cn.js";
|
|
6
|
+
import "sonner";
|
|
7
|
+
import "@gearbox-protocol/sdk";
|
|
8
|
+
import { Z_INDEX as c } from "../../utils/z-index.js";
|
|
9
|
+
const f = "gb-modal-open";
|
|
10
|
+
let n = 0;
|
|
11
|
+
const m = "before:content-[''] before:absolute before:inset-0 after:z-[-1] before:opacity-40", v = C("", {
|
|
12
|
+
variants: {
|
|
13
|
+
colorTheme: {
|
|
14
|
+
default: "bg-black/30",
|
|
15
|
+
dark: "bg-black",
|
|
16
|
+
"dark-transparent": "bg-black/85"
|
|
17
|
+
},
|
|
18
|
+
backdrop: {
|
|
19
|
+
success: `${m} before:bg-[linear-gradient(180deg,rgba(146,255,176,0.85)_0%,rgba(146,255,176,0)_50%)]`,
|
|
20
|
+
failure: `${m} before:bg-[linear-gradient(180deg,rgba(255,61,64,0.85)_0%,rgba(255,61,64,0)_50%)]`,
|
|
21
|
+
default: ""
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
colorTheme: "default",
|
|
26
|
+
backdrop: "default"
|
|
27
|
+
}
|
|
28
|
+
}), _ = i.forwardRef(
|
|
29
|
+
({
|
|
30
|
+
show: t = !0,
|
|
31
|
+
colorTheme: u = "default",
|
|
32
|
+
backdrop: b = "default",
|
|
33
|
+
onClickOutside: d,
|
|
34
|
+
className: p,
|
|
35
|
+
children: g,
|
|
36
|
+
...h
|
|
37
|
+
}, y) => {
|
|
38
|
+
i.useEffect(() => {
|
|
39
|
+
if (!(typeof document > "u") && t)
|
|
40
|
+
return n += 1, document.body.classList.add(f), () => {
|
|
41
|
+
n = Math.max(0, n - 1), n === 0 && document.body.classList.remove(f);
|
|
42
|
+
};
|
|
43
|
+
}, [t]);
|
|
44
|
+
const l = i.useCallback(
|
|
45
|
+
(e) => {
|
|
46
|
+
e || d?.();
|
|
47
|
+
},
|
|
48
|
+
[d]
|
|
49
|
+
);
|
|
50
|
+
return t ? /* @__PURE__ */ a(r.Root, { open: t, onOpenChange: l, modal: !0, children: /* @__PURE__ */ s(r.Portal, { children: [
|
|
51
|
+
/* @__PURE__ */ a(
|
|
52
|
+
r.Overlay,
|
|
53
|
+
{
|
|
54
|
+
className: o(
|
|
55
|
+
"fixed inset-0",
|
|
56
|
+
"pointer-events-auto",
|
|
57
|
+
c.MODAL,
|
|
58
|
+
v({ colorTheme: u, backdrop: b })
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ a(
|
|
63
|
+
r.Content,
|
|
64
|
+
{
|
|
65
|
+
className: o("fixed inset-0", "overflow-y-auto", c.MODAL),
|
|
66
|
+
onClick: (e) => {
|
|
67
|
+
e.target === e.currentTarget && l(!1);
|
|
68
|
+
},
|
|
69
|
+
children: /* @__PURE__ */ a(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: o(
|
|
73
|
+
"min-h-full",
|
|
74
|
+
"flex flex-col justify-center items-center",
|
|
75
|
+
"animate-[modalContentShow_225ms_cubic-bezier(0.4,0,0.2,1)]"
|
|
76
|
+
),
|
|
77
|
+
role: "presentation",
|
|
78
|
+
onClick: (e) => {
|
|
79
|
+
e.target === e.currentTarget && l(!1);
|
|
80
|
+
},
|
|
81
|
+
children: /* @__PURE__ */ s(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
ref: y,
|
|
85
|
+
className: o(
|
|
86
|
+
"relative",
|
|
87
|
+
"w-full sm:w-auto",
|
|
88
|
+
"m-auto py-0 px-0 sm:py-5",
|
|
89
|
+
p
|
|
90
|
+
),
|
|
91
|
+
...h,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ a(r.Title, { className: "sr-only", children: "Modal Window" }),
|
|
94
|
+
g
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] }) }) : null;
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
_.displayName = "Modal";
|
|
106
|
+
export {
|
|
107
|
+
_ as Modal
|
|
108
|
+
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as i, useRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
+
import { useState as i, useRef as p, useEffect as w } from "react";
|
|
3
|
+
import { cn as E } from "../../utils/cn.js";
|
|
4
|
+
import { getStatic as l } from "../../utils/static.js";
|
|
5
|
+
const o = l("/chains/allnetworks.svg"), d = /* @__PURE__ */ new Set();
|
|
6
|
+
function f(r) {
|
|
7
|
+
if (!r) return o;
|
|
8
|
+
const t = r.toLowerCase(), e = l(`/chains/${t}.svg`);
|
|
8
9
|
return d.has(e) ? o : e;
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
network:
|
|
12
|
-
size:
|
|
11
|
+
function C({
|
|
12
|
+
network: r,
|
|
13
|
+
size: t = 20,
|
|
13
14
|
className: e
|
|
14
15
|
}) {
|
|
15
|
-
const u = f(
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
c(
|
|
19
|
-
}, [
|
|
16
|
+
const u = f(r), [s, c] = i(u), [h, a] = i(!1), n = p(!1);
|
|
17
|
+
w(() => {
|
|
18
|
+
const L = f(r);
|
|
19
|
+
c(L), a(!1), n.current = !1;
|
|
20
|
+
}, [r]);
|
|
20
21
|
const g = () => {
|
|
21
22
|
n.current || (n.current = !0, d.add(s), c(o));
|
|
22
23
|
}, m = () => {
|
|
@@ -24,19 +25,19 @@ function N({
|
|
|
24
25
|
};
|
|
25
26
|
return (
|
|
26
27
|
// biome-ignore lint/performance/noImgElement: Simple img for CDN icons with browser caching
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ S(
|
|
28
29
|
"img",
|
|
29
30
|
{
|
|
30
31
|
src: s,
|
|
31
32
|
alt: "",
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
34
|
-
className:
|
|
33
|
+
width: t,
|
|
34
|
+
height: t,
|
|
35
|
+
className: E(
|
|
35
36
|
"object-contain shrink-0",
|
|
36
37
|
!h && "bg-gray-200 dark:bg-gray-700 rounded-full",
|
|
37
38
|
e
|
|
38
39
|
),
|
|
39
|
-
style: { width:
|
|
40
|
+
style: { width: t, height: t },
|
|
40
41
|
onError: g,
|
|
41
42
|
onLoad: m
|
|
42
43
|
}
|
|
@@ -44,5 +45,5 @@ function N({
|
|
|
44
45
|
);
|
|
45
46
|
}
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
+
C as NetworkIcon
|
|
48
49
|
};
|
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
const l = "https://static.gearbox.fi", h = p.forwardRef(
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { RoundedImage as l } from "../rounded-image/rounded-image.js";
|
|
4
|
+
import { buildStaticUrl as d } from "../../utils/static.js";
|
|
5
|
+
const g = f.forwardRef(
|
|
7
6
|
({
|
|
8
|
-
reward:
|
|
9
|
-
size:
|
|
10
|
-
staticBaseUrl:
|
|
11
|
-
rounded:
|
|
12
|
-
className:
|
|
13
|
-
style:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
)
|
|
7
|
+
reward: t,
|
|
8
|
+
size: o = 24,
|
|
9
|
+
staticBaseUrl: r,
|
|
10
|
+
rounded: n = !1,
|
|
11
|
+
className: i,
|
|
12
|
+
style: a,
|
|
13
|
+
fit: m = "contain",
|
|
14
|
+
...e
|
|
15
|
+
}, s) => {
|
|
16
|
+
const c = d(r)(
|
|
17
|
+
`/points/${t.type.toLowerCase()}.svg`
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ p(
|
|
20
|
+
l,
|
|
21
|
+
{
|
|
22
|
+
className: i,
|
|
23
|
+
ref: s,
|
|
24
|
+
src: c,
|
|
25
|
+
width: o,
|
|
26
|
+
height: o,
|
|
27
|
+
size: o,
|
|
28
|
+
rounded: n,
|
|
29
|
+
fit: m,
|
|
30
|
+
alt: t.name,
|
|
31
|
+
style: a,
|
|
32
|
+
...e
|
|
33
|
+
}
|
|
37
34
|
);
|
|
38
35
|
}
|
|
39
36
|
);
|
|
40
|
-
|
|
37
|
+
g.displayName = "PointsIcon";
|
|
41
38
|
export {
|
|
42
|
-
|
|
39
|
+
g as PointsIcon
|
|
43
40
|
};
|
|
@@ -1,32 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as L } from "react/jsx-runtime";
|
|
2
|
+
import * as b from "react";
|
|
3
|
+
import { useState as s, useRef as E, useEffect as j } from "react";
|
|
4
|
+
import { cn as k } from "../../utils/cn.js";
|
|
4
5
|
import "sonner";
|
|
5
6
|
import "@gearbox-protocol/sdk";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...m
|
|
11
|
-
}) {
|
|
12
|
-
return (
|
|
13
|
-
// biome-ignore lint/performance/noImgElement: Universal component that works outside Next.js
|
|
14
|
-
/* @__PURE__ */ e(
|
|
15
|
-
"img",
|
|
16
|
-
{
|
|
17
|
-
alt: "",
|
|
18
|
-
className: i("rounded-full object-cover", t),
|
|
19
|
-
style: {
|
|
20
|
-
...o ? { width: o, height: o } : {},
|
|
21
|
-
...r
|
|
22
|
-
},
|
|
23
|
-
loading: "lazy",
|
|
24
|
-
decoding: "async",
|
|
25
|
-
...m
|
|
26
|
-
}
|
|
27
|
-
)
|
|
28
|
-
);
|
|
7
|
+
import { getStatic as w } from "../../utils/static.js";
|
|
8
|
+
const c = w("/tokens/default.svg"), f = /* @__PURE__ */ new Map();
|
|
9
|
+
function d(e) {
|
|
10
|
+
return f.get(e) ? c : e;
|
|
29
11
|
}
|
|
12
|
+
const N = b.forwardRef(
|
|
13
|
+
({
|
|
14
|
+
className: e,
|
|
15
|
+
size: o,
|
|
16
|
+
rounded: i = !0,
|
|
17
|
+
style: l,
|
|
18
|
+
src: r,
|
|
19
|
+
defaultIcon: u = c,
|
|
20
|
+
fit: m = "cover",
|
|
21
|
+
...g
|
|
22
|
+
}, p) => {
|
|
23
|
+
const [h, a] = s(void 0), [v, n] = s(!1), t = E(!1);
|
|
24
|
+
j(() => {
|
|
25
|
+
d(r), a(void 0), n(!1), t.current = !1;
|
|
26
|
+
}, [r]);
|
|
27
|
+
const y = (I) => {
|
|
28
|
+
t.current || (t.current = !0, f.set(I.currentTarget.src, !0), a(u));
|
|
29
|
+
}, R = () => {
|
|
30
|
+
n(!0);
|
|
31
|
+
};
|
|
32
|
+
return (
|
|
33
|
+
// biome-ignore lint/performance/noImgElement: Universal component that works outside Next.js
|
|
34
|
+
/* @__PURE__ */ L(
|
|
35
|
+
"img",
|
|
36
|
+
{
|
|
37
|
+
ref: p,
|
|
38
|
+
src: h || d(r),
|
|
39
|
+
alt: "",
|
|
40
|
+
className: k(
|
|
41
|
+
m === "cover" ? "object-cover" : "object-contain",
|
|
42
|
+
i && "rounded-full",
|
|
43
|
+
!v && "bg-gray-90 dark:bg-gray-110 rounded-full",
|
|
44
|
+
e
|
|
45
|
+
),
|
|
46
|
+
style: {
|
|
47
|
+
width: o,
|
|
48
|
+
height: o,
|
|
49
|
+
...l
|
|
50
|
+
},
|
|
51
|
+
loading: "lazy",
|
|
52
|
+
decoding: "async",
|
|
53
|
+
onError: y,
|
|
54
|
+
onLoad: R,
|
|
55
|
+
...g
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
N.displayName = "RoundedImage";
|
|
30
62
|
export {
|
|
31
|
-
|
|
63
|
+
N as RoundedImage
|
|
32
64
|
};
|