@gearbox-protocol/permissionless-ui 1.22.0-next.104 → 1.22.0-next.105
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");require("@gearbox-protocol/sdk");const l=require("../../utils/cn.cjs");require("sonner");require("luxon");function a({className:t,children:s,...r}){return e.jsx("div",{className:l.cn("m-0 p-0 w-full flex flex-wrap",t),...r,children:s})}function u({icon:t,title:s,subTitle:r,onClick:i,endingIcon:o,last:n=!1,className:f}){return e.jsxs("button",{type:"button",onClick:i,className:l.cn("group relative z-0 pt-5 px-4 flex flex-row items-start gap-4 w-full cursor-pointer text-left","before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-muted/50 before:rounded-lg",!n&&"after:absolute after:bottom-0 after:inset-x-3 after:h-px after:content-[''] after:bg-border","hover:before:block","hover:after:hidden",f),children:[t&&e.jsx("div",{className:"w-6 h-6 text-muted-foreground flex items-center justify-center",children:t}),e.jsx("div",{className:"pb-5 flex-1 flex flex-col gap-2",children:e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-base leading-[1.2] font-medium",children:s}),r&&e.jsx("div",{className:"text-sm text-muted-foreground",children:r})]})}),o&&e.jsx("div",{className:"ml-4 text-muted-foreground transition-colors",children:o})]})}exports.OptionsItem=u;exports.OptionsList=a;
|
|
@@ -1,60 +1,50 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
3
|
import "@gearbox-protocol/sdk";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as a } from "../../utils/cn.js";
|
|
5
5
|
import "sonner";
|
|
6
6
|
import "luxon";
|
|
7
|
-
function
|
|
8
|
-
className:
|
|
7
|
+
function b({
|
|
8
|
+
className: t,
|
|
9
9
|
children: o,
|
|
10
|
-
...
|
|
10
|
+
...r
|
|
11
11
|
}) {
|
|
12
|
-
|
|
13
|
-
if (s.isValidElement(t)) {
|
|
14
|
-
const m = f === 0, u = f === n - 1;
|
|
15
|
-
return s.cloneElement(t, {
|
|
16
|
-
first: m,
|
|
17
|
-
last: u
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return t;
|
|
21
|
-
});
|
|
22
|
-
return /* @__PURE__ */ e("div", { className: d("m-0 p-0 w-full flex flex-wrap", r), ...l, children: i });
|
|
12
|
+
return /* @__PURE__ */ e("div", { className: a("m-0 p-0 w-full flex flex-wrap", t), ...r, children: o });
|
|
23
13
|
}
|
|
24
|
-
function
|
|
25
|
-
icon:
|
|
14
|
+
function h({
|
|
15
|
+
icon: t,
|
|
26
16
|
title: o,
|
|
27
|
-
subTitle:
|
|
28
|
-
onClick:
|
|
29
|
-
endingIcon:
|
|
30
|
-
last:
|
|
31
|
-
className:
|
|
17
|
+
subTitle: r,
|
|
18
|
+
onClick: i,
|
|
19
|
+
endingIcon: l,
|
|
20
|
+
last: s = !1,
|
|
21
|
+
className: n
|
|
32
22
|
}) {
|
|
33
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ f(
|
|
34
24
|
"button",
|
|
35
25
|
{
|
|
36
26
|
type: "button",
|
|
37
|
-
onClick:
|
|
38
|
-
className:
|
|
27
|
+
onClick: i,
|
|
28
|
+
className: a(
|
|
39
29
|
"group relative z-0 pt-5 px-4 flex flex-row items-start gap-4 w-full cursor-pointer text-left",
|
|
40
30
|
"before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-muted/50 before:rounded-lg",
|
|
41
|
-
!
|
|
31
|
+
!s && "after:absolute after:bottom-0 after:inset-x-3 after:h-px after:content-[''] after:bg-border",
|
|
42
32
|
"hover:before:block",
|
|
43
33
|
"hover:after:hidden",
|
|
44
|
-
|
|
34
|
+
n
|
|
45
35
|
),
|
|
46
36
|
children: [
|
|
47
|
-
|
|
48
|
-
/* @__PURE__ */ e("div", { className: "pb-5 flex-1 flex flex-col gap-2", children: /* @__PURE__ */
|
|
37
|
+
t && /* @__PURE__ */ e("div", { className: "w-6 h-6 text-muted-foreground flex items-center justify-center", children: t }),
|
|
38
|
+
/* @__PURE__ */ e("div", { className: "pb-5 flex-1 flex flex-col gap-2", children: /* @__PURE__ */ f("div", { className: "flex flex-col gap-1.5", children: [
|
|
49
39
|
/* @__PURE__ */ e("div", { className: "text-base leading-[1.2] font-medium", children: o }),
|
|
50
|
-
|
|
40
|
+
r && /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: r })
|
|
51
41
|
] }) }),
|
|
52
|
-
|
|
42
|
+
l && /* @__PURE__ */ e("div", { className: "ml-4 text-muted-foreground transition-colors", children: l })
|
|
53
43
|
]
|
|
54
44
|
}
|
|
55
45
|
);
|
|
56
46
|
}
|
|
57
47
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
h as OptionsItem,
|
|
49
|
+
b as OptionsList
|
|
60
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
export interface OptionsListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
@@ -9,7 +9,6 @@ export interface OptionsItemProps {
|
|
|
9
9
|
subTitle?: string | React.ReactNode;
|
|
10
10
|
onClick?: () => void;
|
|
11
11
|
endingIcon?: React.ReactNode;
|
|
12
|
-
first?: boolean;
|
|
13
12
|
last?: boolean;
|
|
14
13
|
className?: string;
|
|
15
14
|
}
|