@gearbox-protocol/permissionless-ui 1.0.4 → 1.0.5

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.
@@ -18,15 +18,47 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var editable_table_exports = {};
20
20
  __export(editable_table_exports, {
21
+ TableCellAsset: () => TableCellAsset,
21
22
  TableCellUpdatable: () => TableCellUpdatable,
22
23
  TableEditable: () => TableEditable
23
24
  });
24
25
  module.exports = __toCommonJS(editable_table_exports);
25
26
  var import_jsx_runtime = require("react/jsx-runtime");
27
+ var import_lucide_react = require("lucide-react");
26
28
  var import_auth = require('../auth/index.js');
27
29
  var import_buttons = require('../buttons/index.js');
28
30
  var import_table = require('../table.js');
31
+ var import_token_icon = require('../token-icon.js');
29
32
  var import_updated_value = require('./updated-value.js');
33
+ function TableCellAsset({
34
+ assetAddress,
35
+ symbol,
36
+ iconSymbol,
37
+ comment,
38
+ explorerUrl
39
+ }) {
40
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3", children: [
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_token_icon.TokenIcon, { symbol: iconSymbol ?? symbol, size: 24 }),
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1", children: [
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "font-medium", children: symbol }),
44
+ comment && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-md text-muted-foreground", children: [
45
+ "(",
46
+ comment,
47
+ ")"
48
+ ] }),
49
+ explorerUrl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
+ import_buttons.Button,
51
+ {
52
+ variant: "ghost",
53
+ size: "sm",
54
+ className: "text-muted-foreground hover:text-white p-0 h-auto",
55
+ onClick: () => window.open(`${explorerUrl}/address/${assetAddress}`, "_blank"),
56
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, { className: "h-3 w-3" })
57
+ }
58
+ )
59
+ ] })
60
+ ] }) });
61
+ }
30
62
  function TableCellUpdatable({
31
63
  oldValue,
32
64
  newValue,
@@ -90,6 +122,7 @@ function TableEditable({
90
122
  }
91
123
  // Annotate the CommonJS export names for ESM import in node:
92
124
  0 && (module.exports = {
125
+ TableCellAsset,
93
126
  TableCellUpdatable,
94
127
  TableEditable
95
128
  });
@@ -1,8 +1,39 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { ExternalLink } from "lucide-react";
2
3
  import { SignInRequired } from "../auth/index.js";
3
- import { TabButton } from "../buttons/index.js";
4
+ import { Button, TabButton } from "../buttons/index.js";
4
5
  import { Table, TableCell } from "../table.js";
6
+ import { TokenIcon } from "../token-icon.js";
5
7
  import { UpdatedValue } from "./updated-value.js";
8
+ function TableCellAsset({
9
+ assetAddress,
10
+ symbol,
11
+ iconSymbol,
12
+ comment,
13
+ explorerUrl
14
+ }) {
15
+ return /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
16
+ /* @__PURE__ */ jsx(TokenIcon, { symbol: iconSymbol ?? symbol, size: 24 }),
17
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
18
+ /* @__PURE__ */ jsx("div", { className: "font-medium", children: symbol }),
19
+ comment && /* @__PURE__ */ jsxs("div", { className: "text-md text-muted-foreground", children: [
20
+ "(",
21
+ comment,
22
+ ")"
23
+ ] }),
24
+ explorerUrl && /* @__PURE__ */ jsx(
25
+ Button,
26
+ {
27
+ variant: "ghost",
28
+ size: "sm",
29
+ className: "text-muted-foreground hover:text-white p-0 h-auto",
30
+ onClick: () => window.open(`${explorerUrl}/address/${assetAddress}`, "_blank"),
31
+ children: /* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3" })
32
+ }
33
+ )
34
+ ] })
35
+ ] }) });
36
+ }
6
37
  function TableCellUpdatable({
7
38
  oldValue,
8
39
  newValue,
@@ -65,6 +96,7 @@ function TableEditable({
65
96
  ] });
66
97
  }
67
98
  export {
99
+ TableCellAsset,
68
100
  TableCellUpdatable,
69
101
  TableEditable
70
102
  };
@@ -1,3 +1,12 @@
1
+ import type { Address } from "viem";
2
+ interface TableCellAssetProps {
3
+ assetAddress: Address;
4
+ symbol: string;
5
+ comment?: string;
6
+ explorerUrl?: string;
7
+ iconSymbol?: string;
8
+ }
9
+ export declare function TableCellAsset({ assetAddress, symbol, iconSymbol, comment, explorerUrl, }: TableCellAssetProps): import("react/jsx-runtime").JSX.Element;
1
10
  export interface TableCellUpdatableProps {
2
11
  oldValue?: string;
3
12
  newValue: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",