@gearbox-protocol/ui-kit 3.13.0-next.1 → 3.13.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.
Files changed (34) hide show
  1. package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
  2. package/dist/cjs/components/composites/pool-table/pool-table.cjs +1 -1
  3. package/dist/cjs/components/composites/strategies-table/columns.cjs +1 -1
  4. package/dist/cjs/components/composites/strategies-table/components/cells/cells.cjs +1 -1
  5. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  6. package/dist/cjs/components/layout/main-aside-layout/main-aside-layout.cjs +1 -1
  7. package/dist/cjs/components/rounded-image/rounded-image.cjs +1 -1
  8. package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
  9. package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
  10. package/dist/cjs/locale/en.json.cjs +1 -1
  11. package/dist/cjs/types/common.cjs +1 -1
  12. package/dist/esm/components/composites/pool-table/columns.js +344 -207
  13. package/dist/esm/components/composites/pool-table/pool-table.js +94 -102
  14. package/dist/esm/components/composites/strategies-table/columns.js +1 -1
  15. package/dist/esm/components/composites/strategies-table/components/cells/cells.js +31 -28
  16. package/dist/esm/components/compound-apy/compound-apy.js +71 -68
  17. package/dist/esm/components/layout/main-aside-layout/main-aside-layout.js +22 -70
  18. package/dist/esm/components/rounded-image/rounded-image.js +16 -16
  19. package/dist/esm/components/token-icon/token-icon.js +134 -44
  20. package/dist/esm/components/token-symbol/token-symbol.js +55 -46
  21. package/dist/esm/locale/en.json.js +1 -0
  22. package/dist/esm/types/common.js +6 -1
  23. package/dist/globals.css +1 -1
  24. package/dist/types/components/composites/pool-table/columns.d.ts +0 -2
  25. package/dist/types/components/composites/strategies-table/components/cells/cells.d.ts +2 -1
  26. package/dist/types/components/compound-apy/compound-apy.d.ts +1 -3
  27. package/dist/types/components/help-tip/help-tip.d.ts +2 -2
  28. package/dist/types/components/layout/main-aside-layout/main-aside-layout.d.ts +5 -46
  29. package/dist/types/components/token-icon/index.d.ts +1 -1
  30. package/dist/types/components/token-icon/token-icon.d.ts +8 -3
  31. package/dist/types/locale/en.json.d.ts +1 -0
  32. package/dist/types/types/common.d.ts +11 -1
  33. package/package.json +4 -4
  34. package/src/styles/base.css +2 -4
@@ -1,19 +1,20 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { cva as N } from "class-variance-authority";
3
- import x from "react";
4
- import { RoundedImage as y } from "../rounded-image/rounded-image.js";
1
+ import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
+ import { cva as y } from "class-variance-authority";
3
+ import N from "react";
4
+ import { RoundedImage as x } from "../rounded-image/rounded-image.js";
5
5
  import { ShortString as S } from "../short-string/short-string.js";
6
- import { TokenIcon as c } from "../token-icon/token-icon.js";
7
- import { SimpleTooltip as b } from "../tooltip/simple-tooltip.js";
6
+ import { TokenIcon as l } from "../token-icon/token-icon.js";
7
+ import { SimpleTooltip as I } from "../tooltip/simple-tooltip.js";
8
8
  import "../tooltip/tooltip.js";
9
+ import { isIconComposite as b } from "../../types/common.js";
9
10
  import "@gearbox-protocol/sdk";
10
- import { cn as I } from "../../utils/cn.js";
11
+ import { cn as T } from "../../utils/cn.js";
11
12
  import "sonner";
12
13
  import "@gearbox-protocol/sdk/common-utils";
13
- import { getNetworkIcon as T } from "../../utils/network-icons.js";
14
+ import { getNetworkIcon as R } from "../../utils/network-icons.js";
14
15
  import "luxon";
15
16
  import "../../utils/z-index.js";
16
- const R = N("", {
17
+ const _ = y("", {
17
18
  variants: {
18
19
  marginSize: {
19
20
  sm: "gap-1",
@@ -25,52 +26,60 @@ const R = N("", {
25
26
  marginSize: "md"
26
27
  }
27
28
  });
28
- function _(r) {
29
- if (r)
30
- return typeof r == "string" ? r : r.icon ? { icon: r.icon } : r.symbol;
31
- }
32
29
  function j(r) {
30
+ if (r) {
31
+ if (typeof r == "string") return r;
32
+ if (r.icon !== void 0) {
33
+ if (typeof r.icon == "string")
34
+ return { icon: r.icon };
35
+ if (b(r.icon))
36
+ return r.icon;
37
+ }
38
+ return r.symbol;
39
+ }
40
+ }
41
+ function z(r) {
33
42
  if (r)
34
43
  return typeof r == "string" ? r : r.title;
35
44
  }
36
- const z = x.forwardRef(
45
+ const V = N.forwardRef(
37
46
  ({
38
47
  className: r,
39
48
  marginSize: d = "lg",
40
- token: m,
41
- title: n,
42
- size: a = 24,
49
+ token: n,
50
+ title: m,
51
+ size: s = 24,
43
52
  showSymbol: f = !1,
44
53
  showIcon: p = !0,
45
- maxLength: g,
46
- chainId: V,
47
- comment: l,
48
- network: i,
49
- ...u
54
+ maxLength: u,
55
+ chainId: C,
56
+ comment: c,
57
+ network: e,
58
+ ...g
50
59
  }, h) => {
51
- const o = _(m), v = n || j(m), s = () => i ? /* @__PURE__ */ t("div", { className: "relative", children: [
52
- /* @__PURE__ */ e(
53
- c,
60
+ const o = j(n), v = m || z(n), a = () => e ? /* @__PURE__ */ t("div", { className: "relative", children: [
61
+ /* @__PURE__ */ i(
62
+ l,
54
63
  {
55
64
  symbol: o,
56
- size: a,
65
+ size: s,
57
66
  className: "shrink-0 self-center"
58
67
  }
59
68
  ),
60
- /* @__PURE__ */ e("div", { className: "absolute -top-[10px] -right-[7px]", children: /* @__PURE__ */ e(
61
- y,
69
+ /* @__PURE__ */ i("div", { className: "absolute -top-[10px] -right-[7px]", children: /* @__PURE__ */ i(
70
+ x,
62
71
  {
63
- src: T(i),
64
- alt: i,
72
+ src: R(e),
73
+ alt: e,
65
74
  size: 14,
66
75
  rounded: !0
67
76
  }
68
77
  ) })
69
- ] }) : /* @__PURE__ */ e(
70
- c,
78
+ ] }) : /* @__PURE__ */ i(
79
+ l,
71
80
  {
72
81
  symbol: o,
73
- size: a,
82
+ size: s,
74
83
  className: "shrink-0 self-center"
75
84
  }
76
85
  );
@@ -78,22 +87,22 @@ const z = x.forwardRef(
78
87
  "div",
79
88
  {
80
89
  ref: h,
81
- className: I(
90
+ className: T(
82
91
  "flex items-center",
83
- R({ marginSize: d }),
92
+ _({ marginSize: d }),
84
93
  r
85
94
  ),
86
- ...u,
95
+ ...g,
87
96
  children: [
88
- p && o && (i !== void 0 ? /* @__PURE__ */ t(b, { title: s(), children: [
97
+ p && o && (e !== void 0 ? /* @__PURE__ */ t(I, { title: a(), children: [
89
98
  "Network: ",
90
- i
91
- ] }) : s()),
92
- (n || f) && /* @__PURE__ */ t("div", { className: "flex items-center gap-1 self-center", children: [
93
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(S, { maxLength: g, children: v }) }),
94
- l && /* @__PURE__ */ t("div", { className: "text-md text-muted-foreground leading-tight", children: [
99
+ e
100
+ ] }) : a()),
101
+ (m || f) && /* @__PURE__ */ t("div", { className: "flex items-center gap-1 self-center", children: [
102
+ /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(S, { maxLength: u, children: v }) }),
103
+ c && /* @__PURE__ */ t("div", { className: "text-md text-muted-foreground leading-tight", children: [
95
104
  "(",
96
- l,
105
+ c,
97
106
  ")"
98
107
  ] })
99
108
  ] })
@@ -102,8 +111,8 @@ const z = x.forwardRef(
102
111
  );
103
112
  }
104
113
  );
105
- z.displayName = "TokenSymbol";
114
+ V.displayName = "TokenSymbol";
106
115
  export {
107
- z as TokenSymbol,
108
- _ as getSymbolOrIcon
116
+ V as TokenSymbol,
117
+ j as getSymbolOrIcon
109
118
  };
@@ -102,6 +102,7 @@ const e = {
102
102
  "components.poolTable.notFound.description.dashboard": "Choose earn above.",
103
103
  "components.poolTable.notFound.description.list": "Choose another chain or toggle Show All Markets",
104
104
  "components.poolTable.externalApy.tooltipShort": "{value} APY boost when depositing via {name}",
105
+ "components.poolTable.line.rwa.tip": "This is RWA market.",
105
106
  "components.rewardsTooltip.without.title": "Without Leverage",
106
107
  "components.rewardsTooltip.without.extra": "Extra APY",
107
108
  "components.rewardsTooltip.without.extra.tip": "Any deposit through Gearbox",
@@ -1 +1,6 @@
1
-
1
+ function n(o) {
2
+ return typeof o == "object" && o !== null && "kind" in o && o.kind === "composite";
3
+ }
4
+ export {
5
+ n as isIconComposite
6
+ };