@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,27 +1,23 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { TooltipProvider as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { TooltipProvider as c, Tooltip as f, TooltipTrigger as m, TooltipContent as d } from "../tooltip/tooltip.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { cn as u } from "../../utils/cn.js";
|
|
5
|
+
import "sonner";
|
|
6
|
+
import "@gearbox-protocol/sdk";
|
|
7
|
+
import { isLongString as T, shortenString as a } from "../../utils/shorten-string.js";
|
|
8
|
+
import { Z_INDEX as S } from "../../utils/z-index.js";
|
|
9
|
+
function N({
|
|
10
|
+
children: o,
|
|
11
|
+
maxLength: t,
|
|
12
|
+
showTooltip: l = !0,
|
|
13
|
+
className: i
|
|
9
14
|
}) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
] }) }) : l;
|
|
16
|
-
}
|
|
17
|
-
if (!t || t.length <= i)
|
|
18
|
-
return /* @__PURE__ */ r("span", { className: n, children: t });
|
|
19
|
-
const e = `${t.slice(0, i)}...`;
|
|
20
|
-
return o ? /* @__PURE__ */ r(p, { delayDuration: 200, children: /* @__PURE__ */ u(c, { children: [
|
|
21
|
-
/* @__PURE__ */ r(d, { asChild: !0, children: /* @__PURE__ */ r("span", { className: n, children: e }) }),
|
|
22
|
-
/* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("p", { children: t }) })
|
|
23
|
-
] }) }) : /* @__PURE__ */ r("span", { className: n, children: e });
|
|
15
|
+
const e = (n, p) => p === "text-overflow" ? /* @__PURE__ */ r("span", { className: u("inline-block max-w-full truncate", i), children: n }) : /* @__PURE__ */ r("span", { className: i, children: a(n, p) });
|
|
16
|
+
return typeof o == "string" && t !== void 0 ? l && (t === "text-overflow" || T(o, t)) ? /* @__PURE__ */ r(c, { delayDuration: 200, children: /* @__PURE__ */ s(f, { children: [
|
|
17
|
+
/* @__PURE__ */ r(m, { asChild: !0, children: e(o, t) }),
|
|
18
|
+
/* @__PURE__ */ r(d, { className: S.TOOLTIP, children: /* @__PURE__ */ r("p", { children: o }) })
|
|
19
|
+
] }) }) : e(o, t) : o;
|
|
24
20
|
}
|
|
25
21
|
export {
|
|
26
|
-
|
|
22
|
+
N as ShortString
|
|
27
23
|
};
|
|
@@ -36,6 +36,8 @@ const H = r.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ l(
|
|
|
36
36
|
"contents",
|
|
37
37
|
// Full-width border for header (no insets)
|
|
38
38
|
"[&>*>*]:after:absolute [&>*>*]:after:bottom-0 [&>*>*]:after:inset-x-0 [&>*>*]:after:h-px [&>*>*]:after:bg-border",
|
|
39
|
+
// Disable hover effect on header rows by default
|
|
40
|
+
"hover:[&>*>*]:before:!opacity-0",
|
|
39
41
|
e
|
|
40
42
|
),
|
|
41
43
|
...t
|
|
@@ -1,47 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const r = `https://static.gearbox.fi/tokens/${e}.svg`;
|
|
9
|
-
return i.has(r) ? a : r;
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { getStatic as c } from "../../utils/static.js";
|
|
4
|
+
import { RoundedImage as m } from "../rounded-image/rounded-image.js";
|
|
5
|
+
const r = c("/tokens/default.svg");
|
|
6
|
+
function d(e) {
|
|
7
|
+
return e.replace("/", "").replace(" ", "").replace("-f", "").replace("-", "_").toLowerCase();
|
|
10
8
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
function a(e) {
|
|
10
|
+
if (!e) return r;
|
|
11
|
+
if (typeof e == "object" && e !== null && "icon" in e)
|
|
12
|
+
return e.icon;
|
|
13
|
+
const n = d(e);
|
|
14
|
+
return n ? c(`/tokens/${n}.svg`) : r;
|
|
15
|
+
}
|
|
16
|
+
const g = l.forwardRef(
|
|
17
|
+
({
|
|
18
|
+
symbol: e,
|
|
19
|
+
size: n = 48,
|
|
20
|
+
fit: o = "contain",
|
|
21
|
+
rounded: t = !1,
|
|
22
|
+
className: f,
|
|
23
|
+
...i
|
|
24
|
+
}, u) => {
|
|
25
|
+
const p = a(e);
|
|
26
|
+
return /* @__PURE__ */ s(
|
|
27
|
+
m,
|
|
21
28
|
{
|
|
22
|
-
|
|
29
|
+
ref: u,
|
|
30
|
+
className: f,
|
|
31
|
+
src: p,
|
|
23
32
|
alt: "",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
),
|
|
31
|
-
style: { width: e, height: e },
|
|
32
|
-
onError: u,
|
|
33
|
-
onLoad: g
|
|
33
|
+
rounded: t,
|
|
34
|
+
fit: o,
|
|
35
|
+
width: n,
|
|
36
|
+
height: n,
|
|
37
|
+
size: n,
|
|
38
|
+
...i
|
|
34
39
|
}
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
o
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
g.displayName = "TokenIcon";
|
|
44
|
+
function h(e) {
|
|
45
|
+
e.forEach((n) => {
|
|
46
|
+
const o = a(n), t = new window.Image();
|
|
47
|
+
t.src = o;
|
|
42
48
|
});
|
|
43
49
|
}
|
|
44
50
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
g as TokenIcon,
|
|
52
|
+
h as preloadTokenIcons
|
|
47
53
|
};
|
|
@@ -1,50 +1,108 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import "react";
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cva as T } from "class-variance-authority";
|
|
3
|
+
import N from "react";
|
|
4
|
+
import { RoundedImage as y } from "../rounded-image/rounded-image.js";
|
|
5
|
+
import { ShortString as x } from "../short-string/short-string.js";
|
|
6
|
+
import { TokenIcon as s } from "../token-icon/token-icon.js";
|
|
7
|
+
import { TooltipProvider as I, Tooltip as S, TooltipTrigger as b, TooltipContent as _ } from "../tooltip/tooltip.js";
|
|
8
|
+
import { cn as O } from "../../utils/cn.js";
|
|
5
9
|
import "sonner";
|
|
6
10
|
import "@gearbox-protocol/sdk";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
import { getNetworkIcon as R } from "../../utils/network-icons.js";
|
|
12
|
+
import { Z_INDEX as j } from "../../utils/z-index.js";
|
|
13
|
+
const z = T("", {
|
|
14
|
+
variants: {
|
|
15
|
+
marginSize: {
|
|
16
|
+
sm: "gap-1",
|
|
17
|
+
md: "gap-2",
|
|
18
|
+
lg: "gap-3"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
marginSize: "md"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function C(r) {
|
|
26
|
+
if (r)
|
|
27
|
+
return typeof r == "string" ? r : r.icon ? { icon: r.icon } : r.symbol;
|
|
10
28
|
}
|
|
11
|
-
function
|
|
12
|
-
if (
|
|
13
|
-
return typeof
|
|
29
|
+
function D(r) {
|
|
30
|
+
if (r)
|
|
31
|
+
return typeof r == "string" ? r : r.title;
|
|
14
32
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
l
|
|
31
|
-
|
|
33
|
+
const P = N.forwardRef(
|
|
34
|
+
({
|
|
35
|
+
className: r,
|
|
36
|
+
marginSize: d = "lg",
|
|
37
|
+
token: n,
|
|
38
|
+
title: l,
|
|
39
|
+
size: a = 24,
|
|
40
|
+
showSymbol: f = !1,
|
|
41
|
+
showIcon: p = !0,
|
|
42
|
+
maxLength: g,
|
|
43
|
+
chainId: V,
|
|
44
|
+
comment: m,
|
|
45
|
+
network: t,
|
|
46
|
+
...u
|
|
47
|
+
}, h) => {
|
|
48
|
+
const o = C(n), v = l || D(n), c = () => t ? /* @__PURE__ */ i("div", { className: "relative", children: [
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
s,
|
|
51
|
+
{
|
|
52
|
+
symbol: o,
|
|
53
|
+
size: a,
|
|
54
|
+
className: "shrink-0 self-center"
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ e("div", { className: "absolute -top-[10px] -right-[7px]", children: /* @__PURE__ */ e(
|
|
58
|
+
y,
|
|
59
|
+
{
|
|
60
|
+
src: R(t),
|
|
61
|
+
alt: t,
|
|
62
|
+
size: 14,
|
|
63
|
+
rounded: !0
|
|
64
|
+
}
|
|
65
|
+
) })
|
|
66
|
+
] }) : /* @__PURE__ */ e(
|
|
67
|
+
s,
|
|
32
68
|
{
|
|
33
|
-
symbol:
|
|
69
|
+
symbol: o,
|
|
34
70
|
size: a,
|
|
35
71
|
className: "shrink-0 self-center"
|
|
36
72
|
}
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
73
|
+
);
|
|
74
|
+
return /* @__PURE__ */ i(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
ref: h,
|
|
78
|
+
className: O(
|
|
79
|
+
"flex items-center",
|
|
80
|
+
z({ marginSize: d }),
|
|
81
|
+
r
|
|
82
|
+
),
|
|
83
|
+
...u,
|
|
84
|
+
children: [
|
|
85
|
+
p && o && (t !== void 0 ? /* @__PURE__ */ e(I, { delayDuration: 200, children: /* @__PURE__ */ i(S, { children: [
|
|
86
|
+
/* @__PURE__ */ e(b, { asChild: !0, children: c() }),
|
|
87
|
+
/* @__PURE__ */ e(_, { className: j.TOOLTIP, children: /* @__PURE__ */ i("p", { children: [
|
|
88
|
+
"Network: ",
|
|
89
|
+
t
|
|
90
|
+
] }) })
|
|
91
|
+
] }) }) : c()),
|
|
92
|
+
(l || f) && /* @__PURE__ */ i("div", { className: "flex items-center gap-1 self-center", children: [
|
|
93
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(x, { maxLength: g, children: v }) }),
|
|
94
|
+
m && /* @__PURE__ */ i("div", { className: "text-md text-muted-foreground leading-tight", children: [
|
|
95
|
+
"(",
|
|
96
|
+
m,
|
|
97
|
+
")"
|
|
98
|
+
] })
|
|
99
|
+
] })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
P.displayName = "TokenSymbol";
|
|
48
106
|
export {
|
|
49
|
-
|
|
107
|
+
P as TokenSymbol
|
|
50
108
|
};
|
|
@@ -7,6 +7,7 @@ import "@gearbox-protocol/sdk";
|
|
|
7
7
|
const p = x("", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
+
inherit: "",
|
|
10
11
|
h1: "text-4xl font-bold tracking-tight",
|
|
11
12
|
h2: "text-3xl font-semibold tracking-tight",
|
|
12
13
|
h3: "text-2xl font-semibold",
|
|
@@ -25,7 +26,8 @@ const p = x("", {
|
|
|
25
26
|
success: "text-success",
|
|
26
27
|
warning: "text-warning",
|
|
27
28
|
destructive: "text-destructive",
|
|
28
|
-
primary: "text-primary"
|
|
29
|
+
primary: "text-primary",
|
|
30
|
+
secondary: "text-secondary-foreground"
|
|
29
31
|
},
|
|
30
32
|
weight: {
|
|
31
33
|
inherit: "",
|
|
@@ -69,36 +71,37 @@ const p = x("", {
|
|
|
69
71
|
body: "p",
|
|
70
72
|
bodySmall: "p",
|
|
71
73
|
caption: "span",
|
|
72
|
-
overline: "span"
|
|
74
|
+
overline: "span",
|
|
75
|
+
inherit: "span"
|
|
73
76
|
}, u = c.forwardRef(
|
|
74
77
|
({
|
|
75
78
|
className: e,
|
|
76
79
|
variant: t = "body",
|
|
77
|
-
color:
|
|
78
|
-
weight:
|
|
80
|
+
color: r,
|
|
81
|
+
weight: i,
|
|
79
82
|
align: n,
|
|
80
83
|
leading: o,
|
|
81
84
|
truncate: a,
|
|
82
85
|
as: l,
|
|
83
|
-
...
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
+
...d
|
|
87
|
+
}, h) => {
|
|
88
|
+
const m = l || f[t || "body"];
|
|
86
89
|
return /* @__PURE__ */ s(
|
|
87
|
-
|
|
90
|
+
m,
|
|
88
91
|
{
|
|
89
|
-
ref:
|
|
92
|
+
ref: h,
|
|
90
93
|
className: g(
|
|
91
94
|
p({
|
|
92
95
|
variant: t,
|
|
93
|
-
color:
|
|
94
|
-
weight:
|
|
96
|
+
color: r,
|
|
97
|
+
weight: i,
|
|
95
98
|
align: n,
|
|
96
99
|
leading: o,
|
|
97
100
|
truncate: a
|
|
98
101
|
}),
|
|
99
102
|
e
|
|
100
103
|
),
|
|
101
|
-
...
|
|
104
|
+
...d
|
|
102
105
|
}
|
|
103
106
|
);
|
|
104
107
|
}
|
|
@@ -1,69 +1,75 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cva as
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { cva as c } from "class-variance-authority";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { cn as t } from "../../utils/cn.js";
|
|
5
5
|
import "sonner";
|
|
6
6
|
import "@gearbox-protocol/sdk";
|
|
7
|
-
const u =
|
|
7
|
+
const u = c("flex flex-col [&>li:empty]:hidden", {
|
|
8
8
|
variants: {
|
|
9
|
-
|
|
10
|
-
xs: "gap-1",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
md: "gap-4",
|
|
14
|
-
lg: "gap-6"
|
|
9
|
+
rowGap: {
|
|
10
|
+
xs: "gap-1 [&>li:empty+li]:-mt-1",
|
|
11
|
+
default: "gap-4 [&>li:empty+li]:-mt-4",
|
|
12
|
+
md: "gap-6 [&>li:empty+li]:-mt-6"
|
|
15
13
|
},
|
|
16
14
|
divided: {
|
|
17
15
|
true: "",
|
|
18
16
|
false: ""
|
|
17
|
+
},
|
|
18
|
+
nested: {
|
|
19
|
+
true: t(
|
|
20
|
+
"relative py-[2px] pr-0 pl-3",
|
|
21
|
+
"before:content-[''] before:absolute before:top-0 before:left-0 before:block",
|
|
22
|
+
"before:h-full before:border-l-2 before:border-l-gray-40"
|
|
23
|
+
),
|
|
24
|
+
false: ""
|
|
19
25
|
}
|
|
20
26
|
},
|
|
21
27
|
defaultVariants: {
|
|
22
|
-
|
|
23
|
-
divided: !1
|
|
28
|
+
rowGap: "default",
|
|
29
|
+
divided: !1,
|
|
30
|
+
nested: !1
|
|
24
31
|
}
|
|
25
|
-
}),
|
|
32
|
+
}), y = r.forwardRef(
|
|
26
33
|
({
|
|
27
|
-
className:
|
|
28
|
-
|
|
29
|
-
divided:
|
|
30
|
-
nested:
|
|
31
|
-
children:
|
|
34
|
+
className: s,
|
|
35
|
+
rowGap: f = "default",
|
|
36
|
+
divided: l = !1,
|
|
37
|
+
nested: m = !1,
|
|
38
|
+
children: p,
|
|
32
39
|
...n
|
|
33
40
|
}, d) => {
|
|
34
|
-
const
|
|
41
|
+
const a = r.Children.toArray(p).filter(
|
|
35
42
|
(e) => e != null
|
|
36
43
|
);
|
|
37
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ i(
|
|
38
45
|
"ul",
|
|
39
46
|
{
|
|
40
47
|
ref: d,
|
|
41
|
-
className:
|
|
42
|
-
u({
|
|
43
|
-
p && "m-0 p-0",
|
|
48
|
+
className: t(
|
|
49
|
+
u({ rowGap: f, divided: l, nested: m }),
|
|
44
50
|
"list-none",
|
|
45
|
-
|
|
51
|
+
s
|
|
46
52
|
),
|
|
47
53
|
...n,
|
|
48
|
-
children:
|
|
49
|
-
const
|
|
50
|
-
return /* @__PURE__ */
|
|
54
|
+
children: a.map((e, o) => {
|
|
55
|
+
const b = r.isValidElement(e) && e.key ? e.key : `vertical-list-item-${o}`;
|
|
56
|
+
return /* @__PURE__ */ i(
|
|
51
57
|
"li",
|
|
52
58
|
{
|
|
53
|
-
className:
|
|
54
|
-
|
|
59
|
+
className: t(
|
|
60
|
+
l && o !== a.length - 1 && "pb-3 border-b border-border"
|
|
55
61
|
),
|
|
56
62
|
children: e
|
|
57
63
|
},
|
|
58
|
-
|
|
64
|
+
b
|
|
59
65
|
);
|
|
60
66
|
})
|
|
61
67
|
}
|
|
62
68
|
);
|
|
63
69
|
}
|
|
64
70
|
);
|
|
65
|
-
|
|
71
|
+
y.displayName = "VerticalList";
|
|
66
72
|
export {
|
|
67
|
-
|
|
73
|
+
y as VerticalList,
|
|
68
74
|
u as verticalListVariants
|
|
69
75
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "../_virtual/index.js";
|
|
2
2
|
import a from "tailwindcss-animate";
|
|
3
|
-
const
|
|
3
|
+
const e = {
|
|
4
4
|
darkMode: "class",
|
|
5
5
|
safelist: [
|
|
6
6
|
// Grid columns - dynamically generated in Grid component
|
|
@@ -58,6 +58,8 @@ const s = {
|
|
|
58
58
|
foreground: "hsl(var(--destructive-foreground))"
|
|
59
59
|
},
|
|
60
60
|
success: "hsl(var(--success))",
|
|
61
|
+
"success-foreground": "hsl(var(--success-foreground))",
|
|
62
|
+
"success-hover": "hsl(var(--success-hover))",
|
|
61
63
|
warning: "hsl(var(--warning))",
|
|
62
64
|
liquidation: "hsl(var(--liquidation))",
|
|
63
65
|
border: "hsl(var(--border))",
|
|
@@ -128,6 +130,6 @@ const s = {
|
|
|
128
130
|
plugins: [a, r({ nocompatible: !0 })]
|
|
129
131
|
};
|
|
130
132
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
e as default,
|
|
134
|
+
e as preset
|
|
133
135
|
};
|