@gearbox-protocol/permissionless-ui 2.0.0-next.1 → 2.0.1
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 e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),L=require("react"),x=require("../description/description.cjs"),h=require("../short-string/short-string.cjs"),o=require("../table/grid-table.cjs"),v=require("../token-symbol/token-symbol.cjs"),g=require("../vspace/vspace.cjs");require("@gearbox-protocol/sdk");const A=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../utils/z-index.cjs");function C(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const G=C(L),P={default:24,sm:20,md:24,lg:28},j={default:0,sm:2,md:4,lg:4},p=G.forwardRef(({token:t,tokenLabel:s,tokenDescription:r,network:n,chainId:S,value:a,valueDescription:i,size:c="default",iconSize:b=c,gapSize:d=c,last:_,symbolMaxLength:q,descriptionMaxLength:y,onSelect:u,hideValue:m=!1,rounded:N=!0,className:T,height:w,...O},R)=>{const l=s||t?.title,f=c==="md"?"default":c;return e.jsxs(o.GridTableRow,{...O,ref:R,className:A.cn(u&&"cursor-pointer",T),onRowClick:u,cols:m?"1fr":"1fr 1fr",noRound:!N,last:_,height:w,children:[e.jsx(o.GridTableCell,{size:f,className:"text-left",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v.TokenSymbol,{token:t,size:P[b],chainId:S,network:n}),e.jsxs("div",{className:"flex-1 min-w-0",children:[l&&e.jsx(h.ShortString,{maxLength:q,children:l}),l&&r&&e.jsx(g.VSpace,{height:j[d]}),r&&e.jsx(x.Description,{children:e.jsx(h.ShortString,{maxLength:y,showTooltip:!1,children:String(r)})})]})]})}),!m&&e.jsx(o.GridTableCell,{size:f,className:"text-right",children:e.jsxs("div",{className:"w-full flex flex-col items-end justify-end",children:[a,a&&i&&e.jsx(g.VSpace,{height:j[d]}),i&&e.jsx(x.Description,{children:i})]})})]})});p.displayName="AssetLine";exports.AssetLine=p;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as G from "react";
|
|
3
3
|
import { Description as n } from "../description/description.js";
|
|
4
4
|
import { ShortString as h } from "../short-string/short-string.js";
|
|
5
|
-
import { GridTableRow as
|
|
6
|
-
import { TokenSymbol as
|
|
5
|
+
import { GridTableRow as I, GridTableCell as p } from "../table/grid-table.js";
|
|
6
|
+
import { TokenSymbol as E } from "../token-symbol/token-symbol.js";
|
|
7
7
|
import { VSpace as x } from "../vspace/vspace.js";
|
|
8
8
|
import "@gearbox-protocol/sdk";
|
|
9
|
-
import { cn as
|
|
9
|
+
import { cn as Z } from "../../utils/cn.js";
|
|
10
10
|
import "sonner";
|
|
11
11
|
import "@gearbox-protocol/sdk/common-utils";
|
|
12
12
|
import "luxon";
|
|
13
13
|
import "../../utils/z-index.js";
|
|
14
|
-
const
|
|
14
|
+
const _ = {
|
|
15
15
|
default: 24,
|
|
16
16
|
sm: 20,
|
|
17
17
|
md: 24,
|
|
@@ -21,7 +21,7 @@ const Z = {
|
|
|
21
21
|
sm: 2,
|
|
22
22
|
md: 4,
|
|
23
23
|
lg: 4
|
|
24
|
-
},
|
|
24
|
+
}, O = G.forwardRef(
|
|
25
25
|
({
|
|
26
26
|
token: o,
|
|
27
27
|
tokenLabel: N,
|
|
@@ -40,14 +40,16 @@ const Z = {
|
|
|
40
40
|
hideValue: f = !1,
|
|
41
41
|
rounded: T = !0,
|
|
42
42
|
className: j,
|
|
43
|
-
height: y
|
|
44
|
-
|
|
43
|
+
height: y,
|
|
44
|
+
...A
|
|
45
|
+
}, C) => {
|
|
45
46
|
const i = N || o?.title, a = e === "md" ? "default" : e;
|
|
46
47
|
return /* @__PURE__ */ t(
|
|
47
|
-
|
|
48
|
+
I,
|
|
48
49
|
{
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
...A,
|
|
51
|
+
ref: C,
|
|
52
|
+
className: Z(d && "cursor-pointer", j),
|
|
51
53
|
onRowClick: d,
|
|
52
54
|
cols: f ? "1fr" : "1fr 1fr",
|
|
53
55
|
noRound: !T,
|
|
@@ -56,10 +58,10 @@ const Z = {
|
|
|
56
58
|
children: [
|
|
57
59
|
/* @__PURE__ */ r(p, { size: a, className: "text-left", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
58
60
|
/* @__PURE__ */ r(
|
|
59
|
-
|
|
61
|
+
E,
|
|
60
62
|
{
|
|
61
63
|
token: o,
|
|
62
|
-
size:
|
|
64
|
+
size: _[w],
|
|
63
65
|
chainId: u,
|
|
64
66
|
network: S
|
|
65
67
|
}
|
|
@@ -87,7 +89,7 @@ const Z = {
|
|
|
87
89
|
);
|
|
88
90
|
}
|
|
89
91
|
);
|
|
90
|
-
|
|
92
|
+
O.displayName = "AssetLine";
|
|
91
93
|
export {
|
|
92
|
-
|
|
94
|
+
O as AssetLine
|
|
93
95
|
};
|