@gearbox-protocol/permissionless-ui 1.26.7 → 1.26.9
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/auth/connect-required.cjs +1 -1
- package/dist/cjs/components/detailed-apy/detailed-apy.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/esm/components/auth/connect-required.js +7 -6
- package/dist/esm/components/detailed-apy/detailed-apy.js +27 -21
- package/dist/esm/components/table/table.js +80 -84
- package/dist/types/components/auth/connect-required.d.ts +2 -1
- package/dist/types/components/table/table.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),q=require("connectkit"),a=require("wagmi");require("../buttons/back-button/back-button.cjs");const l=require("../buttons/button/button.cjs");require("../buttons/copy-button/copy-button.cjs");require("../buttons/external-button/external-button.cjs");require("../buttons/filter-button/filter-button.cjs");require("../buttons/navigation-button/navigation-button.cjs");require("react");require("@gearbox-protocol/sdk");require("clsx");require("tailwind-merge");require("sonner");require("luxon");require("../../utils/z-index.cjs");const d=require("../buttons/tab-button/tab-button.cjs");function b({children:o,owner:t,hideConnectButton:i,...e}){const{setOpen:c}=q.useModal(),{isConnected:s,address:r}=a.useAccount(),n=Object.keys(e).length>0?l.Button:d.TabButton;return s&&r?t&&r?.toLowerCase()!==t.toLowerCase()?u.jsx(n,{...e,disabled:!0,children:"You are not the author"}):o:i?null:u.jsx(n,{...e,onClick:()=>c(!0),children:"Connect Wallet"})}exports.ConnectRequired=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),y=require("../rounded-image/rounded-image.cjs"),g=require("../skeleton/skeleton.cjs");require("@gearbox-protocol/sdk");require("clsx");require("tailwind-merge");require("sonner");const c=require("../../utils/format-money.cjs"),u=require("../../utils/static.cjs");require("luxon");require("../../utils/z-index.cjs");function d({reward:r,tokensList:s,...n}){const t=s?.[r?.rewardToken||""]?.symbol||r?.rewardTokenSymbol,{size:e=t==="GEAR"?11:12,margin:a=t==="GEAR"?"-5px 2px 0 2px":"-3px 2px 0 2px"}=n;return o.jsx(y.RoundedImage,{src:t==="GEAR"?u.getStatic("/logo/logo_symbol.png"):u.getStatic(`/tokens/${t?.toLowerCase()}.svg`),size:e,rounded:!1,style:{margin:a,height:"auto"}})}const p=i.forwardRef(({poolAPY:r,extraAPY:s,tokensList:n},t)=>o.jsx("div",{ref:t,className:"inline-block",children:s.length>0&&o.jsx("span",{className:"text-xs",children:o.jsxs("span",{className:"flex items-start text-secondary-foreground font-normal",children:[c.percentTemplate(r)," +",o.jsx("span",{className:"flex flex-col items-end flex-wrap",children:s.map(e=>{const a=e.apy||0;return a>0&&o.jsxs("span",{children:[o.jsx(d,{reward:e,tokensList:n}),c.percentTemplate(a)]},`${e.token}-${e.rewardToken}-${e.apy}-${e.endTimestamp}`)})})]})})}));p.displayName="ApyParts";function f({totalAPY:r,totalAPYLoading:s,baseAPY:n,extraAPY:t,tokensList:e}){const a=i.useMemo(()=>n.reduce((l,x)=>l+x.apy,0),[n]),m=i.useMemo(()=>t.filter(l=>(l.apy||0)>0),[t]);return o.jsx(g.Skeleton,{width:80,loading:s,children:r>=.001&&o.jsx(p,{extraAPY:m,poolAPY:a,tokensList:e})})}exports.DetailedApy=f;exports.PoolRewardsIcon=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("class-variance-authority"),C=require("react"),q=require("../buttons/button/button.cjs"),d=require("@fortawesome/free-solid-svg-icons"),H=require("../icons/fa-icon.cjs");require("../tooltip/simple-tooltip.cjs");const n=require("../tooltip/tooltip.cjs");require("@gearbox-protocol/sdk");const s=require("../../utils/cn.cjs");require("sonner");require("luxon");require("../../utils/z-index.cjs");function z(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=z(C),f=c.cva("w-full caption-bottom",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),u=l.forwardRef(({className:e,size:a,wrapperClassName:t,...o},i)=>r.jsx("div",{className:s.cn("relative w-full overflow-auto rounded-lg border border-input bg-card",t),children:r.jsx("table",{ref:i,className:s.cn(f({size:a,className:e})),...o})}));u.displayName="Table";const p=l.forwardRef(({className:e,...a},t)=>r.jsx("thead",{ref:t,className:s.cn("[&_tr]:after:inset-x-0 [&_tr]:after:bg-input [&_tr]:hover:bg-transparent [&_tr]:hover:before:opacity-0",e),...a}));p.displayName="TableHeader";const m=l.forwardRef(({className:e,...a},t)=>r.jsx("tbody",{ref:t,className:s.cn("[&_tr:last-child]:after:hidden",e),...a}));m.displayName="TableBody";const x=l.forwardRef(({className:e,...a},t)=>r.jsx("tfoot",{ref:t,className:s.cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));x.displayName="TableFooter";const g=l.forwardRef(({className:e,...a},t)=>r.jsx("tr",{ref:t,className:s.cn("relative isolate transition-colors data-[state=selected]:bg-muted","before:absolute before:inset-0 before:-z-10 before:rounded-lg before:bg-muted/50 before:opacity-0 before:transition-opacity before:pointer-events-none","hover:before:opacity-100","after:absolute after:bottom-0 after:inset-x-3 after:h-px after:bg-border",e),...a}));g.displayName="TableRow";const T=c.cva("border-b bg-muted/50 text-left align-middle font-medium text-muted-foreground border-input",{variants:{size:{sm:"h-8 px-1 text-xs",default:"h-10 px-2",lg:"h-12 px-4"}},defaultVariants:{size:"default"}}),b=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("th",{ref:o,className:s.cn(T({size:a,className:e})),...t}));b.displayName="TableHead";const y=c.cva("align-middle",{variants:{size:{sm:"p-1",default:"p-2",lg:"p-4"}},defaultVariants:{size:"default"}}),h=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("td",{ref:o,className:s.cn(y({size:a,className:e})),...t}));h.displayName="TableCell";const v=l.forwardRef(({className:e,...a},t)=>r.jsx("caption",{ref:t,className:s.cn("mt-4 text-sm text-muted-foreground",e),...a}));v.displayName="TableCaption";const j=l.forwardRef(({title:e,isSorted:a,direction:t,setSort:o,placement:i="right",children:N,className:w,..._},R)=>r.jsx(b,{ref:R,className:w,..._,children:r.jsx(n.TooltipProvider,{children:r.jsxs(n.Tooltip,{delayDuration:200,children:[r.jsx(n.TooltipTrigger,{asChild:!0,children:r.jsxs("div",{className:s.cn("group flex items-center gap-1 w-fit cursor-pointer hover:text-foreground",i==="left"?"flex-row-reverse":"flex-row"),onClick:()=>o(t==="asc"?"desc":"asc"),children:[N,r.jsx(q.Button,{variant:"text",size:"auto",className:a?void 0:"opacity-0 group-hover:opacity-100",children:r.jsx(H.FaIcon,{icon:a&&t==="asc"?d.faCaretUp:d.faCaretDown,className:"size-3 text-muted-foreground transition-opacity duration-200"})})]})}),r.jsxs(n.TooltipContent,{side:"top",children:["Sort by ",e]})]})})}));j.displayName="SortingTableHead";exports.SortingTableHead=j;exports.Table=u;exports.TableBody=m;exports.TableCaption=v;exports.TableCell=h;exports.TableFooter=x;exports.TableHead=b;exports.TableHeader=p;exports.TableRow=g;exports.tableCellVariants=y;exports.tableHeadVariants=T;exports.tableVariants=f;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { useAccount as
|
|
2
|
+
import { useModal as c } from "connectkit";
|
|
3
|
+
import { useAccount as l } from "wagmi";
|
|
4
4
|
import "../buttons/back-button/back-button.js";
|
|
5
5
|
import { Button as s } from "../buttons/button/button.js";
|
|
6
6
|
import "../buttons/copy-button/copy-button.js";
|
|
@@ -15,14 +15,15 @@ import "sonner";
|
|
|
15
15
|
import "luxon";
|
|
16
16
|
import "../../utils/z-index.js";
|
|
17
17
|
import { TabButton as a } from "../buttons/tab-button/tab-button.js";
|
|
18
|
-
function
|
|
18
|
+
function R({
|
|
19
19
|
children: n,
|
|
20
20
|
owner: o,
|
|
21
|
+
hideConnectButton: m,
|
|
21
22
|
...t
|
|
22
23
|
}) {
|
|
23
|
-
const { setOpen:
|
|
24
|
-
return
|
|
24
|
+
const { setOpen: p } = c(), { isConnected: u, address: r } = l(), e = Object.keys(t).length > 0 ? s : a;
|
|
25
|
+
return u && r ? o && r?.toLowerCase() !== o.toLowerCase() ? /* @__PURE__ */ i(e, { ...t, disabled: !0, children: "You are not the author" }) : n : m ? null : /* @__PURE__ */ i(e, { ...t, onClick: () => p(!0), children: "Connect Wallet" });
|
|
25
26
|
}
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
R as ConnectRequired
|
|
28
29
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { forwardRef as y, useMemo as
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y, useMemo as l } from "react";
|
|
3
3
|
import { RoundedImage as u } from "../rounded-image/rounded-image.js";
|
|
4
4
|
import { Skeleton as g } from "../skeleton/skeleton.js";
|
|
5
5
|
import "@gearbox-protocol/sdk";
|
|
@@ -15,53 +15,59 @@ function h({
|
|
|
15
15
|
tokensList: n,
|
|
16
16
|
...a
|
|
17
17
|
}) {
|
|
18
|
-
const
|
|
19
|
-
size:
|
|
20
|
-
margin: s =
|
|
18
|
+
const o = n?.[t?.rewardToken || ""]?.symbol || t?.rewardTokenSymbol, {
|
|
19
|
+
size: e = o === "GEAR" ? 11 : 12,
|
|
20
|
+
margin: s = o === "GEAR" ? "-5px 2px 0 2px" : "-3px 2px 0 2px"
|
|
21
21
|
} = a;
|
|
22
22
|
return /* @__PURE__ */ r(
|
|
23
23
|
u,
|
|
24
24
|
{
|
|
25
|
-
src:
|
|
26
|
-
size:
|
|
25
|
+
src: o === "GEAR" ? c("/logo/logo_symbol.png") : c(`/tokens/${o?.toLowerCase()}.svg`),
|
|
26
|
+
size: e,
|
|
27
27
|
rounded: !1,
|
|
28
28
|
style: { margin: s, height: "auto" }
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
const d = y(({ poolAPY: t, extraAPY: n, tokensList: a },
|
|
32
|
+
const d = y(({ poolAPY: t, extraAPY: n, tokensList: a }, o) => /* @__PURE__ */ r("div", { ref: o, className: "inline-block", children: n.length > 0 && /* @__PURE__ */ r("span", { className: "text-xs", children: /* @__PURE__ */ m("span", { className: "flex items-start text-secondary-foreground font-normal", children: [
|
|
33
33
|
i(t),
|
|
34
34
|
" +",
|
|
35
|
-
/* @__PURE__ */ r("span", { className: "flex flex-col items-end flex-wrap", children: n.map((
|
|
36
|
-
const s =
|
|
37
|
-
return s > 0 && /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
/* @__PURE__ */ r("span", { className: "flex flex-col items-end flex-wrap", children: n.map((e) => {
|
|
36
|
+
const s = e.apy || 0;
|
|
37
|
+
return s > 0 && /* @__PURE__ */ m(
|
|
38
|
+
"span",
|
|
39
|
+
{
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ r(h, { reward: e, tokensList: a }),
|
|
42
|
+
i(s)
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
`${e.token}-${e.rewardToken}-${e.apy}-${e.endTimestamp}`
|
|
46
|
+
);
|
|
41
47
|
}) })
|
|
42
48
|
] }) }) }));
|
|
43
49
|
d.displayName = "ApyParts";
|
|
44
|
-
function
|
|
50
|
+
function j({
|
|
45
51
|
totalAPY: t,
|
|
46
52
|
totalAPYLoading: n,
|
|
47
53
|
baseAPY: a,
|
|
48
|
-
extraAPY:
|
|
49
|
-
tokensList:
|
|
54
|
+
extraAPY: o,
|
|
55
|
+
tokensList: e
|
|
50
56
|
}) {
|
|
51
|
-
const s =
|
|
57
|
+
const s = l(
|
|
52
58
|
() => a.reduce((p, x) => p + x.apy, 0),
|
|
53
59
|
[a]
|
|
54
|
-
), f =
|
|
60
|
+
), f = l(() => o.filter((p) => (p.apy || 0) > 0), [o]);
|
|
55
61
|
return /* @__PURE__ */ r(g, { width: 80, loading: n, children: t >= 1e-3 && /* @__PURE__ */ r(
|
|
56
62
|
d,
|
|
57
63
|
{
|
|
58
64
|
extraAPY: f,
|
|
59
65
|
poolAPY: s,
|
|
60
|
-
tokensList:
|
|
66
|
+
tokensList: e
|
|
61
67
|
}
|
|
62
68
|
) });
|
|
63
69
|
}
|
|
64
70
|
export {
|
|
65
|
-
|
|
71
|
+
j as DetailedApy,
|
|
66
72
|
h as PoolRewardsIcon
|
|
67
73
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { cva as n } from "class-variance-authority";
|
|
3
|
-
import * as
|
|
4
|
-
import { Button as
|
|
5
|
-
import {
|
|
6
|
-
import { FaIcon as
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import { Button as g } from "../buttons/button/button.js";
|
|
5
|
+
import { faCaretUp as x, faCaretDown as f } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
+
import { FaIcon as h } from "../icons/fa-icon.js";
|
|
7
7
|
import "../tooltip/simple-tooltip.js";
|
|
8
|
-
import { TooltipProvider as
|
|
8
|
+
import { TooltipProvider as T, Tooltip as y, TooltipTrigger as N, TooltipContent as v } from "../tooltip/tooltip.js";
|
|
9
9
|
import "@gearbox-protocol/sdk";
|
|
10
10
|
import { cn as o } from "../../utils/cn.js";
|
|
11
11
|
import "sonner";
|
|
12
12
|
import "luxon";
|
|
13
13
|
import "../../utils/z-index.js";
|
|
14
|
-
const
|
|
14
|
+
const w = n("w-full caption-bottom", {
|
|
15
15
|
variants: {
|
|
16
16
|
size: {
|
|
17
17
|
sm: "text-xs",
|
|
@@ -22,63 +22,63 @@ const v = n("w-full caption-bottom", {
|
|
|
22
22
|
defaultVariants: {
|
|
23
23
|
size: "default"
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
26
|
-
({ className:
|
|
25
|
+
}), R = l.forwardRef(
|
|
26
|
+
({ className: a, size: e, wrapperClassName: t, ...i }, s) => /* @__PURE__ */ r(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
29
|
className: o(
|
|
30
30
|
"relative w-full overflow-auto rounded-lg border border-input bg-card",
|
|
31
|
-
|
|
31
|
+
t
|
|
32
32
|
),
|
|
33
33
|
children: /* @__PURE__ */ r(
|
|
34
34
|
"table",
|
|
35
35
|
{
|
|
36
36
|
ref: s,
|
|
37
|
-
className: o(
|
|
38
|
-
...
|
|
37
|
+
className: o(w({ size: e, className: a })),
|
|
38
|
+
...i
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
41
|
}
|
|
42
42
|
)
|
|
43
43
|
);
|
|
44
|
-
|
|
45
|
-
const
|
|
44
|
+
R.displayName = "Table";
|
|
45
|
+
const C = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
46
46
|
"thead",
|
|
47
47
|
{
|
|
48
|
-
ref:
|
|
48
|
+
ref: t,
|
|
49
49
|
className: o(
|
|
50
50
|
"[&_tr]:after:inset-x-0 [&_tr]:after:bg-input [&_tr]:hover:bg-transparent [&_tr]:hover:before:opacity-0",
|
|
51
|
-
|
|
51
|
+
a
|
|
52
52
|
),
|
|
53
|
-
...
|
|
53
|
+
...e
|
|
54
54
|
}
|
|
55
55
|
));
|
|
56
|
-
|
|
57
|
-
const z =
|
|
56
|
+
C.displayName = "TableHeader";
|
|
57
|
+
const z = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
58
58
|
"tbody",
|
|
59
59
|
{
|
|
60
|
-
ref:
|
|
61
|
-
className: o("[&_tr:last-child]:after:hidden",
|
|
62
|
-
...
|
|
60
|
+
ref: t,
|
|
61
|
+
className: o("[&_tr:last-child]:after:hidden", a),
|
|
62
|
+
...e
|
|
63
63
|
}
|
|
64
64
|
));
|
|
65
65
|
z.displayName = "TableBody";
|
|
66
|
-
const
|
|
66
|
+
const H = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
67
67
|
"tfoot",
|
|
68
68
|
{
|
|
69
|
-
ref:
|
|
69
|
+
ref: t,
|
|
70
70
|
className: o(
|
|
71
71
|
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
72
|
-
|
|
72
|
+
a
|
|
73
73
|
),
|
|
74
|
-
...
|
|
74
|
+
...e
|
|
75
75
|
}
|
|
76
76
|
));
|
|
77
|
-
|
|
78
|
-
const
|
|
77
|
+
H.displayName = "TableFooter";
|
|
78
|
+
const V = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
79
79
|
"tr",
|
|
80
80
|
{
|
|
81
|
-
ref:
|
|
81
|
+
ref: t,
|
|
82
82
|
className: o(
|
|
83
83
|
"relative isolate transition-colors data-[state=selected]:bg-muted",
|
|
84
84
|
// Hover background with rounded corners
|
|
@@ -86,13 +86,13 @@ const H = i.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ r(
|
|
|
86
86
|
"hover:before:opacity-100",
|
|
87
87
|
// Border line that doesn't extend to rounded corners
|
|
88
88
|
"after:absolute after:bottom-0 after:inset-x-3 after:h-px after:bg-border",
|
|
89
|
-
|
|
89
|
+
a
|
|
90
90
|
),
|
|
91
|
-
...
|
|
91
|
+
...e
|
|
92
92
|
}
|
|
93
93
|
));
|
|
94
|
-
|
|
95
|
-
const
|
|
94
|
+
V.displayName = "TableRow";
|
|
95
|
+
const _ = n(
|
|
96
96
|
"border-b bg-muted/50 text-left align-middle font-medium text-muted-foreground border-input",
|
|
97
97
|
{
|
|
98
98
|
variants: {
|
|
@@ -106,18 +106,18 @@ const V = n(
|
|
|
106
106
|
size: "default"
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
),
|
|
110
|
-
({ className:
|
|
109
|
+
), m = l.forwardRef(
|
|
110
|
+
({ className: a, size: e, ...t }, i) => /* @__PURE__ */ r(
|
|
111
111
|
"th",
|
|
112
112
|
{
|
|
113
|
-
ref:
|
|
114
|
-
className: o(
|
|
115
|
-
...
|
|
113
|
+
ref: i,
|
|
114
|
+
className: o(_({ size: e, className: a })),
|
|
115
|
+
...t
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
);
|
|
119
|
-
|
|
120
|
-
const
|
|
119
|
+
m.displayName = "TableHead";
|
|
120
|
+
const B = n("align-middle", {
|
|
121
121
|
variants: {
|
|
122
122
|
size: {
|
|
123
123
|
sm: "p-1",
|
|
@@ -128,37 +128,37 @@ const _ = n("align-middle", {
|
|
|
128
128
|
defaultVariants: {
|
|
129
129
|
size: "default"
|
|
130
130
|
}
|
|
131
|
-
}),
|
|
132
|
-
({ className:
|
|
131
|
+
}), F = l.forwardRef(
|
|
132
|
+
({ className: a, size: e, ...t }, i) => /* @__PURE__ */ r(
|
|
133
133
|
"td",
|
|
134
134
|
{
|
|
135
|
-
ref:
|
|
136
|
-
className: o(
|
|
137
|
-
...
|
|
135
|
+
ref: i,
|
|
136
|
+
className: o(B({ size: e, className: a })),
|
|
137
|
+
...t
|
|
138
138
|
}
|
|
139
139
|
)
|
|
140
140
|
);
|
|
141
|
-
|
|
142
|
-
const
|
|
141
|
+
F.displayName = "TableCell";
|
|
142
|
+
const j = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
143
143
|
"caption",
|
|
144
144
|
{
|
|
145
|
-
ref:
|
|
146
|
-
className: o("mt-4 text-sm text-muted-foreground",
|
|
147
|
-
...
|
|
145
|
+
ref: t,
|
|
146
|
+
className: o("mt-4 text-sm text-muted-foreground", a),
|
|
147
|
+
...e
|
|
148
148
|
}
|
|
149
149
|
));
|
|
150
|
-
|
|
151
|
-
const
|
|
150
|
+
j.displayName = "TableCaption";
|
|
151
|
+
const D = l.forwardRef(
|
|
152
152
|
({
|
|
153
|
-
title:
|
|
154
|
-
isSorted:
|
|
155
|
-
direction:
|
|
156
|
-
setSort:
|
|
153
|
+
title: a,
|
|
154
|
+
isSorted: e,
|
|
155
|
+
direction: t,
|
|
156
|
+
setSort: i,
|
|
157
157
|
placement: s = "right",
|
|
158
|
-
children:
|
|
159
|
-
className:
|
|
160
|
-
...
|
|
161
|
-
},
|
|
158
|
+
children: b,
|
|
159
|
+
className: c,
|
|
160
|
+
...p
|
|
161
|
+
}, u) => /* @__PURE__ */ r(m, { ref: u, className: c, ...p, children: /* @__PURE__ */ r(T, { children: /* @__PURE__ */ d(y, { delayDuration: 200, children: [
|
|
162
162
|
/* @__PURE__ */ r(N, { asChild: !0, children: /* @__PURE__ */ d(
|
|
163
163
|
"div",
|
|
164
164
|
{
|
|
@@ -166,24 +166,20 @@ const S = i.forwardRef(
|
|
|
166
166
|
"group flex items-center gap-1 w-fit cursor-pointer hover:text-foreground",
|
|
167
167
|
s === "left" ? "flex-row-reverse" : "flex-row"
|
|
168
168
|
),
|
|
169
|
-
onClick: () =>
|
|
169
|
+
onClick: () => i(t === "asc" ? "desc" : "asc"),
|
|
170
170
|
children: [
|
|
171
|
-
|
|
171
|
+
b,
|
|
172
172
|
/* @__PURE__ */ r(
|
|
173
|
-
|
|
173
|
+
g,
|
|
174
174
|
{
|
|
175
175
|
variant: "text",
|
|
176
176
|
size: "auto",
|
|
177
|
-
className:
|
|
177
|
+
className: e ? void 0 : "opacity-0 group-hover:opacity-100",
|
|
178
178
|
children: /* @__PURE__ */ r(
|
|
179
|
-
|
|
179
|
+
h,
|
|
180
180
|
{
|
|
181
|
-
icon:
|
|
182
|
-
className:
|
|
183
|
-
"size-4",
|
|
184
|
-
e === "desc" ? "rotate-180" : "",
|
|
185
|
-
"transition-transform duration-200 ease-in-out"
|
|
186
|
-
)
|
|
181
|
+
icon: e ? t === "asc" ? x : f : f,
|
|
182
|
+
className: "size-3 text-muted-foreground transition-opacity duration-200"
|
|
187
183
|
}
|
|
188
184
|
)
|
|
189
185
|
}
|
|
@@ -191,24 +187,24 @@ const S = i.forwardRef(
|
|
|
191
187
|
]
|
|
192
188
|
}
|
|
193
189
|
) }),
|
|
194
|
-
/* @__PURE__ */ d(
|
|
190
|
+
/* @__PURE__ */ d(v, { side: "top", children: [
|
|
195
191
|
"Sort by ",
|
|
196
|
-
|
|
192
|
+
a
|
|
197
193
|
] })
|
|
198
194
|
] }) }) })
|
|
199
195
|
);
|
|
200
|
-
|
|
196
|
+
D.displayName = "SortingTableHead";
|
|
201
197
|
export {
|
|
202
|
-
|
|
203
|
-
|
|
198
|
+
D as SortingTableHead,
|
|
199
|
+
R as Table,
|
|
204
200
|
z as TableBody,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
201
|
+
j as TableCaption,
|
|
202
|
+
F as TableCell,
|
|
203
|
+
H as TableFooter,
|
|
204
|
+
m as TableHead,
|
|
205
|
+
C as TableHeader,
|
|
206
|
+
V as TableRow,
|
|
207
|
+
B as tableCellVariants,
|
|
208
|
+
_ as tableHeadVariants,
|
|
209
|
+
w as tableVariants
|
|
214
210
|
};
|
|
@@ -28,5 +28,6 @@ import { TabButtonProps } from '../buttons';
|
|
|
28
28
|
export interface ConnectRequiredProps extends TabButtonProps {
|
|
29
29
|
owner?: Address;
|
|
30
30
|
children: ReactNode;
|
|
31
|
+
hideConnectButton?: boolean;
|
|
31
32
|
}
|
|
32
|
-
export declare function ConnectRequired({ children, owner, ...customProps }: ConnectRequiredProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
33
|
+
export declare function ConnectRequired({ children, owner, hideConnectButton, ...customProps }: ConnectRequiredProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
@@ -116,7 +116,7 @@ export interface SortTableHeadProps extends React.ThHTMLAttributes<HTMLTableCell
|
|
|
116
116
|
* - All standard HTML th props are supported (className, etc.).
|
|
117
117
|
*
|
|
118
118
|
* Note: Clicking the header toggles sort direction (asc ↔ desc).
|
|
119
|
-
* Sort indicator (
|
|
119
|
+
* Sort indicator (caret up/down, same as HeadCell) is visible when sorted or on header hover.
|
|
120
120
|
* Includes tooltip showing "Sort by {title}" on hover.
|
|
121
121
|
*
|
|
122
122
|
* Do NOT use SortingTableHead:
|