@gearbox-protocol/ui-kit 3.1.0-next.1 → 3.1.0

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.
Files changed (68) hide show
  1. package/README.md +6 -86
  2. package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
  3. package/dist/cjs/components/auth/connect-required.cjs +1 -1
  4. package/dist/cjs/components/auth/index.cjs +1 -1
  5. package/dist/cjs/components/auth/signin-required.cjs +1 -1
  6. package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
  7. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  8. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  9. package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
  10. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  11. package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
  12. package/dist/cjs/components/graph/graph.cjs +1 -1
  13. package/dist/cjs/components/index.cjs +1 -1
  14. package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
  15. package/dist/cjs/components/next/index.cjs +1 -1
  16. package/dist/cjs/components/next/siwe-provider.cjs +1 -0
  17. package/dist/cjs/components/table/editable-grid-table.cjs +1 -1
  18. package/dist/cjs/components/table/editable-table.cjs +1 -1
  19. package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
  20. package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
  21. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  22. package/dist/cjs/index.cjs +1 -1
  23. package/dist/esm/components/assets-list-cell/assets-list-cell.js +4 -3
  24. package/dist/esm/components/auth/connect-required.js +11 -18
  25. package/dist/esm/components/auth/index.js +4 -5
  26. package/dist/esm/components/auth/signin-required.js +23 -30
  27. package/dist/esm/components/block-sync/block-sync.js +4 -3
  28. package/dist/esm/components/checkbox/checkbox-labeled.js +2 -1
  29. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +2 -1
  30. package/dist/esm/components/complex-input/complex-input.js +4 -3
  31. package/dist/esm/components/compound-apy/compound-apy.js +4 -3
  32. package/dist/esm/components/detailed-page-title/detailed-page-title.js +2 -1
  33. package/dist/esm/components/graph/graph.js +280 -266
  34. package/dist/esm/components/index.js +607 -608
  35. package/dist/esm/components/markdown-viewer/markdown-viewer.js +4 -3
  36. package/dist/esm/components/next/index.js +8 -6
  37. package/dist/esm/components/next/{connectkit/siwe-provider.js → siwe-provider.js} +1 -1
  38. package/dist/esm/components/table/editable-grid-table.js +37 -36
  39. package/dist/esm/components/table/editable-table.js +18 -17
  40. package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +2 -1
  41. package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +4 -3
  42. package/dist/esm/components/with-copy/with-copy.js +4 -3
  43. package/dist/esm/index.js +767 -768
  44. package/dist/types/components/auth/connect-required.d.ts +11 -10
  45. package/dist/types/components/auth/index.d.ts +1 -1
  46. package/dist/types/components/auth/signin-required.d.ts +5 -7
  47. package/dist/types/components/auth/siwe-provider.d.ts +31 -0
  48. package/dist/types/components/graph/graph.d.ts +14 -1
  49. package/dist/types/components/next/index.d.ts +1 -0
  50. package/dist/types/components/next/siwe-provider.d.ts +7 -0
  51. package/package.json +4 -21
  52. package/dist/cjs/components/auth/wallet-ui-context.cjs +0 -1
  53. package/dist/cjs/components/connectkit/connect-kit-wallet-adapter.cjs +0 -1
  54. package/dist/cjs/components/connectkit/index.cjs +0 -1
  55. package/dist/cjs/components/next/connectkit/index.cjs +0 -1
  56. package/dist/cjs/components/next/connectkit/siwe-provider.cjs +0 -1
  57. package/dist/esm/components/auth/wallet-ui-context.js +0 -13
  58. package/dist/esm/components/connectkit/connect-kit-wallet-adapter.js +0 -32
  59. package/dist/esm/components/connectkit/index.js +0 -6
  60. package/dist/esm/components/next/connectkit/index.js +0 -4
  61. package/dist/types/components/auth/wallet-ui-context.d.ts +0 -36
  62. package/dist/types/components/connectkit/connect-kit-wallet-adapter.d.ts +0 -12
  63. package/dist/types/components/connectkit/index.d.ts +0 -2
  64. package/dist/types/components/connectkit/siwe-provider.d.ts +0 -30
  65. package/dist/types/components/next/connectkit/index.d.ts +0 -1
  66. package/dist/types/components/next/connectkit/siwe-provider.d.ts +0 -8
  67. /package/dist/cjs/components/{connectkit → auth}/siwe-provider.cjs +0 -0
  68. /package/dist/esm/components/{connectkit → auth}/siwe-provider.js +0 -0
@@ -37,8 +37,9 @@ import "../buttons/filter-button/filter-button.js";
37
37
  import "../buttons/navigation-button/navigation-button.js";
38
38
  import "../buttons/tab-button/tab-button.js";
39
39
  import "../token-icon/token-icon.js";
40
+ import "connectkit";
40
41
  import "wagmi";
41
- import "../auth/wallet-ui-context.js";
42
+ import "viem/siwe";
42
43
  import "../avatar/avatar.js";
43
44
  import "../badge/badge.js";
44
45
  import "../navigation-context/navigation-context.js";
@@ -178,7 +179,7 @@ function a(o) {
178
179
  }
179
180
  return { id: T(l), displayText: o };
180
181
  }
181
- function Tr({
182
+ function vr({
182
183
  content: o,
183
184
  title: l,
184
185
  backButton: s,
@@ -390,5 +391,5 @@ function Tr({
390
391
  return c ? d : /* @__PURE__ */ r(w, { title: l || "", backButton: s, children: d });
391
392
  }
392
393
  export {
393
- Tr as MarkdownViewer
394
+ vr as MarkdownViewer
394
395
  };
@@ -1,14 +1,16 @@
1
1
  import { SignInRequired as e } from "../auth/signin-required.js";
2
2
  import { preloadTokenIcons as n } from "../token-icon/token-icon.js";
3
- import { BackButton as p } from "./back-button.js";
4
- import { NextMarkdownViewer as i } from "./next-markdown-viewer.js";
3
+ import { BackButton as i } from "./back-button.js";
4
+ import { NextMarkdownViewer as f } from "./next-markdown-viewer.js";
5
5
  import { NextNavigationProvider as a } from "./next-navigation-provider.js";
6
- import { TokenIcon as k } from "./token-icon.js";
6
+ import { SIWEClientProvider as k } from "./siwe-provider.js";
7
+ import { TokenIcon as c } from "./token-icon.js";
7
8
  export {
8
- p as BackButton,
9
- i as NextMarkdownViewer,
9
+ i as BackButton,
10
+ f as NextMarkdownViewer,
10
11
  a as NextNavigationProvider,
12
+ k as SIWEClientProvider,
11
13
  e as SignInRequired,
12
- k as TokenIcon,
14
+ c as TokenIcon,
13
15
  n as preloadTokenIcons
14
16
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useRouter as t } from "next/navigation";
3
- import { SIWEClientProvider as i } from "../../connectkit/siwe-provider.js";
3
+ import { SIWEClientProvider as i } from "../auth/siwe-provider.js";
4
4
  function s(r) {
5
5
  const e = t();
6
6
  return /* @__PURE__ */ o(i, { ...r, onRefresh: () => e.refresh() });
@@ -1,7 +1,7 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
2
  import { IconExternal as x } from "@gearbox-protocol/static";
3
+ import "connectkit";
3
4
  import "wagmi";
4
- import "../auth/wallet-ui-context.js";
5
5
  import "../buttons/back-button/back-button.js";
6
6
  import { Button as g } from "../buttons/button/button.js";
7
7
  import "../buttons/copy-button/copy-button.js";
@@ -18,22 +18,23 @@ import "luxon";
18
18
  import "../../utils/z-index.js";
19
19
  import { TabButton as u } from "../buttons/tab-button/tab-button.js";
20
20
  import { SignInRequired as b } from "../auth/signin-required.js";
21
+ import "viem/siwe";
21
22
  import { TokenIcon as v } from "../token-icon/token-icon.js";
22
23
  import { GridTableCell as h, GridTable as N } from "./grid-table.js";
23
24
  import { UpdatedValue as C } from "./updated-value.js";
24
- function K({
25
- assetAddress: o,
25
+ function M({
26
+ assetAddress: n,
26
27
  symbol: i,
27
- iconSymbol: s,
28
+ iconSymbol: m,
28
29
  comment: l,
29
30
  explorerUrl: r,
30
- span: d = 1
31
+ span: o = 1
31
32
  }) {
32
- return /* @__PURE__ */ e(h, { span: d, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
33
- /* @__PURE__ */ e(v, { symbol: s ?? i, size: 24 }),
34
- /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
33
+ return /* @__PURE__ */ e(h, { span: o, children: /* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
34
+ /* @__PURE__ */ e(v, { symbol: m ?? i, size: 24 }),
35
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-1", children: [
35
36
  /* @__PURE__ */ e("div", { className: "font-medium", children: i }),
36
- l && /* @__PURE__ */ n("div", { className: "text-md text-muted-foreground", children: [
37
+ l && /* @__PURE__ */ d("div", { className: "text-md text-muted-foreground", children: [
37
38
  "(",
38
39
  l,
39
40
  ")"
@@ -44,22 +45,22 @@ function K({
44
45
  variant: "ghost",
45
46
  size: "sm",
46
47
  className: "text-muted-foreground hover:text-foreground p-0 h-auto",
47
- onClick: () => window.open(`${r}/address/${o}`, "_blank"),
48
+ onClick: () => window.open(`${r}/address/${n}`, "_blank"),
48
49
  children: /* @__PURE__ */ e(x, { size: 12, className: "size-3" })
49
50
  }
50
51
  )
51
52
  ] })
52
53
  ] }) });
53
54
  }
54
- function M({
55
- oldValue: o,
55
+ function O({
56
+ oldValue: n,
56
57
  newValue: i,
57
- onEdit: s,
58
+ onEdit: m,
58
59
  isEditable: l = !0,
59
60
  className: r,
60
- align: d = "right",
61
+ align: o = "right",
61
62
  customButton: a,
62
- postfix: m,
63
+ postfix: s,
63
64
  disabled: c,
64
65
  nowrap: p,
65
66
  span: t = 1
@@ -68,43 +69,43 @@ function M({
68
69
  left: "justify-start",
69
70
  right: "justify-end",
70
71
  center: "justify-center"
71
- }[d];
72
- return /* @__PURE__ */ e(h, { span: t, className: r, children: /* @__PURE__ */ e("div", { className: `flex ${f} w-full text-${d}`, children: /* @__PURE__ */ e(
72
+ }[o];
73
+ return /* @__PURE__ */ e(h, { span: t, className: r, children: /* @__PURE__ */ e("div", { className: `flex ${f} w-full text-${o}`, children: /* @__PURE__ */ e(
73
74
  C,
74
75
  {
75
- oldValue: o,
76
+ oldValue: n,
76
77
  newValue: i,
77
- onEdit: s,
78
+ onEdit: m,
78
79
  isEditable: l,
79
80
  customButton: a,
80
- postfix: m,
81
+ postfix: s,
81
82
  disabled: c,
82
83
  nowrap: p
83
84
  }
84
85
  ) }) });
85
86
  }
86
- function O({
87
- title: o,
87
+ function P({
88
+ title: n,
88
89
  onNew: i,
89
- newButtonText: s = "New",
90
+ newButtonText: m = "New",
90
91
  buttonLoadingText: l = "Adding...",
91
92
  isLoading: r,
92
- actions: d,
93
+ actions: o,
93
94
  children: a,
94
- disabled: m = !1,
95
+ disabled: s = !1,
95
96
  skipSignIn: c = !0,
96
97
  cols: p = 12
97
98
  }) {
98
- return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
99
- /* @__PURE__ */ n("div", { className: "flex justify-between items-center", children: [
100
- /* @__PURE__ */ e("h2", { className: "text-2xl font-bold", children: o }),
101
- /* @__PURE__ */ e(b, { skipSignIn: c, variant: "pink", size: "sm", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
102
- i && /* @__PURE__ */ e(u, { onClick: i, disabled: r || m, children: r ? l : s }),
103
- d?.map((t, f) => /* @__PURE__ */ e(
99
+ return /* @__PURE__ */ d("div", { className: "space-y-4", children: [
100
+ /* @__PURE__ */ d("div", { className: "flex justify-between items-center", children: [
101
+ /* @__PURE__ */ e("h2", { className: "text-2xl font-bold", children: n }),
102
+ /* @__PURE__ */ e(b, { skipSignIn: c, variant: "pink", size: "sm", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
103
+ i && /* @__PURE__ */ e(u, { onClick: i, disabled: r || s, children: r ? l : m }),
104
+ o?.map((t, f) => /* @__PURE__ */ e(
104
105
  u,
105
106
  {
106
107
  onClick: t.onClick,
107
- disabled: t.isLoading || m,
108
+ disabled: t.isLoading || s,
108
109
  children: t.isLoading ? t.loadingText || "Loading..." : t.text
109
110
  },
110
111
  f
@@ -115,7 +116,7 @@ function O({
115
116
  ] });
116
117
  }
117
118
  export {
118
- K as GridTableCellAsset,
119
- M as GridTableCellUpdatable,
120
- O as GridTableEditable
119
+ M as GridTableCellAsset,
120
+ O as GridTableCellUpdatable,
121
+ P as GridTableEditable
121
122
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
+ import "connectkit";
2
3
  import "wagmi";
3
- import "../auth/wallet-ui-context.js";
4
4
  import "../buttons/back-button/back-button.js";
5
5
  import "../buttons/button/button.js";
6
6
  import "../buttons/copy-button/copy-button.js";
@@ -17,10 +17,11 @@ import "luxon";
17
17
  import "../../utils/z-index.js";
18
18
  import { TabButton as f } from "../buttons/tab-button/tab-button.js";
19
19
  import { SignInRequired as x } from "../auth/signin-required.js";
20
+ import "viem/siwe";
20
21
  import { TokenIcon as b } from "../token-icon/token-icon.js";
21
22
  import { TableCell as u, Table as g } from "./table.js";
22
23
  import { UpdatedValue as v } from "./updated-value.js";
23
- function H({
24
+ function J({
24
25
  assetAddress: n,
25
26
  symbol: t,
26
27
  iconSymbol: s,
@@ -40,15 +41,15 @@ function H({
40
41
  ] })
41
42
  ] }) });
42
43
  }
43
- function J({
44
+ function K({
44
45
  oldValue: n,
45
46
  newValue: t,
46
47
  onEdit: s,
47
48
  isEditable: l = !0,
48
49
  className: i,
49
- align: d = "right",
50
+ align: o = "right",
50
51
  customButton: a,
51
- postfix: o,
52
+ postfix: d,
52
53
  disabled: c,
53
54
  nowrap: r
54
55
  }) {
@@ -56,8 +57,8 @@ function J({
56
57
  left: "justify-start",
57
58
  right: "justify-end",
58
59
  center: "justify-center"
59
- }[d];
60
- return /* @__PURE__ */ e(u, { className: i, children: /* @__PURE__ */ e("div", { className: `flex ${p} w-full text-${d}`, children: /* @__PURE__ */ e(
60
+ }[o];
61
+ return /* @__PURE__ */ e(u, { className: i, children: /* @__PURE__ */ e("div", { className: `flex ${p} w-full text-${o}`, children: /* @__PURE__ */ e(
61
62
  v,
62
63
  {
63
64
  oldValue: n,
@@ -65,33 +66,33 @@ function J({
65
66
  onEdit: s,
66
67
  isEditable: l,
67
68
  customButton: a,
68
- postfix: o,
69
+ postfix: d,
69
70
  disabled: c,
70
71
  nowrap: r
71
72
  }
72
73
  ) }) });
73
74
  }
74
- function K({
75
+ function M({
75
76
  title: n,
76
77
  onNew: t,
77
78
  newButtonText: s = "New",
78
79
  buttonLoadingText: l = "Adding...",
79
80
  isLoading: i,
80
- actions: d,
81
+ actions: o,
81
82
  children: a,
82
- disabled: o = !1,
83
+ disabled: d = !1,
83
84
  skipSignIn: c = !0
84
85
  }) {
85
86
  return /* @__PURE__ */ m("div", { className: "space-y-4", children: [
86
87
  /* @__PURE__ */ m("div", { className: "flex justify-between items-center", children: [
87
88
  /* @__PURE__ */ e("h2", { className: "text-2xl font-bold", children: n }),
88
89
  /* @__PURE__ */ e(x, { skipSignIn: c, variant: "pink", size: "sm", children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
89
- t && /* @__PURE__ */ e(f, { onClick: t, disabled: i || o, children: i ? l : s }),
90
- d?.map((r, p) => /* @__PURE__ */ e(
90
+ t && /* @__PURE__ */ e(f, { onClick: t, disabled: i || d, children: i ? l : s }),
91
+ o?.map((r, p) => /* @__PURE__ */ e(
91
92
  f,
92
93
  {
93
94
  onClick: r.onClick,
94
- disabled: r.isLoading || o,
95
+ disabled: r.isLoading || d,
95
96
  children: r.isLoading ? r.loadingText || "Loading..." : r.text
96
97
  },
97
98
  p
@@ -102,7 +103,7 @@ function K({
102
103
  ] });
103
104
  }
104
105
  export {
105
- H as TableCellAsset,
106
- J as TableCellUpdatable,
107
- K as TableEditable
106
+ J as TableCellAsset,
107
+ K as TableCellUpdatable,
108
+ M as TableEditable
108
109
  };
@@ -27,8 +27,9 @@ import "../buttons/filter-button/filter-button.js";
27
27
  import "../buttons/navigation-button/navigation-button.js";
28
28
  import "../buttons/tab-button/tab-button.js";
29
29
  import "../token-icon/token-icon.js";
30
+ import "connectkit";
30
31
  import "wagmi";
31
- import "../auth/wallet-ui-context.js";
32
+ import "viem/siwe";
32
33
  import "../avatar/avatar.js";
33
34
  import "../badge/badge.js";
34
35
  import "../base-link/base-link.js";
@@ -26,8 +26,9 @@ import "../buttons/external-button/external-button.js";
26
26
  import "../buttons/filter-button/filter-button.js";
27
27
  import "../buttons/navigation-button/navigation-button.js";
28
28
  import "../buttons/tab-button/tab-button.js";
29
+ import "connectkit";
29
30
  import "wagmi";
30
- import "../auth/wallet-ui-context.js";
31
+ import "viem/siwe";
31
32
  import "../avatar/avatar.js";
32
33
  import "../badge/badge.js";
33
34
  import "../base-link/base-link.js";
@@ -157,7 +158,7 @@ import "../tip-card/tip-card.js";
157
158
  import "../toggle/toggle.js";
158
159
  import "../typography/typography.js";
159
160
  import "../with-filter-button/with-filter-button.js";
160
- function Mr({
161
+ function zr({
161
162
  balances: a,
162
163
  tokensList: l,
163
164
  maxAssets: p = 3,
@@ -220,5 +221,5 @@ function Mr({
220
221
  ] });
221
222
  }
222
223
  export {
223
- Mr as TokensListCell
224
+ zr as TokensListCell
224
225
  };
@@ -26,8 +26,9 @@ import "../buttons/filter-button/filter-button.js";
26
26
  import "../buttons/navigation-button/navigation-button.js";
27
27
  import "../buttons/tab-button/tab-button.js";
28
28
  import "../token-icon/token-icon.js";
29
+ import "connectkit";
29
30
  import "wagmi";
30
- import "../auth/wallet-ui-context.js";
31
+ import "viem/siwe";
31
32
  import "../avatar/avatar.js";
32
33
  import "../badge/badge.js";
33
34
  import "../base-link/base-link.js";
@@ -157,7 +158,7 @@ import "../tip-card/tip-card.js";
157
158
  import "../toggle/toggle.js";
158
159
  import "../typography/typography.js";
159
160
  import "../with-filter-button/with-filter-button.js";
160
- function jr({
161
+ function Tr({
161
162
  toCopy: u,
162
163
  children: d,
163
164
  onCopySuccess: f,
@@ -239,5 +240,5 @@ function jr({
239
240
  return a ? /* @__PURE__ */ t(T, { placement: "top", triangle: !0, title: c(), children: a }) : c();
240
241
  }
241
242
  export {
242
- jr as WithCopy
243
+ Tr as WithCopy
243
244
  };