@gearbox-protocol/ui-kit 4.0.0-next.43 → 4.0.0-next.44

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 (53) hide show
  1. package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
  2. package/dist/cjs/components/base/index.cjs +1 -1
  3. package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
  4. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
  5. package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -1
  6. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  7. package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
  8. package/dist/cjs/components/base/values/constants.cjs +1 -1
  9. package/dist/cjs/components/base/values/index.cjs +1 -1
  10. package/dist/cjs/components/base/values/no-value.cjs +1 -0
  11. package/dist/cjs/components/base/values/pnl-value.cjs +1 -1
  12. package/dist/cjs/components/base/values/price-impact-value.cjs +1 -1
  13. package/dist/cjs/components/base/values/scalars.cjs +1 -1
  14. package/dist/cjs/components/base-table/base-table-line.cjs +1 -1
  15. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  16. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  17. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  18. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  19. package/dist/cjs/components/help-tip/help-tip.cjs +1 -1
  20. package/dist/cjs/components/index.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/cjs/locale/en.json.cjs +1 -1
  24. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +3 -2
  25. package/dist/esm/components/base/index.js +63 -61
  26. package/dist/esm/components/base/info-list/info-list.js +8 -7
  27. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +74 -61
  28. package/dist/esm/components/base/position-assets/position-assets.js +4 -3
  29. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +86 -74
  30. package/dist/esm/components/base/token-amount/token-amount.js +32 -16
  31. package/dist/esm/components/base/values/constants.js +1 -0
  32. package/dist/esm/components/base/values/index.js +21 -19
  33. package/dist/esm/components/base/values/no-value.js +34 -0
  34. package/dist/esm/components/base/values/pnl-value.js +10 -9
  35. package/dist/esm/components/base/values/price-impact-value.js +6 -5
  36. package/dist/esm/components/base/values/scalars.js +23 -26
  37. package/dist/esm/components/base-table/base-table-line.js +44 -36
  38. package/dist/esm/components/checkbox/checkbox-labeled.js +1 -1
  39. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -1
  40. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +47 -46
  41. package/dist/esm/components/compound-apy/compound-apy.js +48 -40
  42. package/dist/esm/components/help-tip/help-tip.js +64 -59
  43. package/dist/esm/components/index.js +624 -622
  44. package/dist/esm/components/with-copy/with-copy.js +1 -1
  45. package/dist/esm/index.js +805 -803
  46. package/dist/esm/locale/en.json.js +1 -0
  47. package/dist/types/components/base/apy-breakdown-body/apy-breakdown-body.d.ts +4 -3
  48. package/dist/types/components/base/values/constants.d.ts +1 -0
  49. package/dist/types/components/base/values/index.d.ts +1 -0
  50. package/dist/types/components/base/values/no-value.d.ts +25 -0
  51. package/dist/types/components/base/values/scalars.d.ts +7 -2
  52. package/dist/types/locale/en.json.d.ts +1 -0
  53. package/package.json +1 -1
@@ -1,14 +1,16 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { IconQuestionCircle as v, IconInfo as h } from "@gearbox-protocol/static";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { faCircleQuestion as u } from "@fortawesome/free-solid-svg-icons";
3
+ import { IconInfo as v } from "@gearbox-protocol/static";
3
4
  import { cva as T } from "class-variance-authority";
4
- import * as c from "react";
5
+ import * as p from "react";
6
+ import { FaIcon as C } from "../icons/fa-icon.js";
5
7
  import "@gearbox-protocol/sdk/onchain";
6
- import { cn as s } from "../../utils/cn.js";
8
+ import { cn as m } from "../../utils/cn.js";
7
9
  import "sonner";
8
10
  import "luxon";
9
11
  import "../../utils/z-index.js";
10
- import { SimpleTooltip as C } from "../tooltip/simple-tooltip.js";
11
- const H = T("transition-colors", {
12
+ import { SimpleTooltip as H } from "../tooltip/simple-tooltip.js";
13
+ const I = T("transition-colors", {
12
14
  variants: {
13
15
  iconColor: {
14
16
  "gray-10": "text-gray-10",
@@ -42,89 +44,92 @@ const H = T("transition-colors", {
42
44
  }
43
45
  },
44
46
  defaultVariants: { iconColor: "gray-90", iconHoverColor: "gray-110" }
45
- }), I = c.forwardRef(
47
+ }), N = p.forwardRef(
46
48
  ({
47
- className: r,
48
- children: o,
49
- maxWidth: t,
50
- minWidth: a,
49
+ className: o,
50
+ children: r,
51
+ maxWidth: a,
52
+ minWidth: e,
51
53
  delayShow: g = 200,
52
54
  placement: y = "bottom",
53
55
  iconSize: i = 14,
54
56
  iconColor: n = "gray-90",
55
- iconHoverColor: p = "gray-110",
57
+ iconHoverColor: s = "gray-110",
56
58
  iconVariant: x = "question",
57
- onPointerEnter: m,
58
- ...d
59
- }, f) => {
60
- const u = /* @__PURE__ */ e(
59
+ onPointerEnter: c,
60
+ ...f
61
+ }, d) => {
62
+ const h = /* @__PURE__ */ t(
61
63
  l,
62
64
  {
63
- ref: f,
65
+ ref: d,
64
66
  iconSize: i,
65
67
  iconColor: n,
66
- iconHoverColor: p,
68
+ iconHoverColor: s,
67
69
  iconVariant: x,
68
- onPointerEnter: m,
69
- className: r,
70
- ...d
70
+ onPointerEnter: c,
71
+ className: o,
72
+ ...f
71
73
  }
72
74
  );
73
- return /* @__PURE__ */ e(
74
- C,
75
+ return /* @__PURE__ */ t(
76
+ H,
75
77
  {
76
- title: u,
78
+ title: h,
77
79
  placement: y,
78
80
  delayShow: g,
79
- maxWidth: t,
80
- minWidth: a,
81
- children: o
81
+ maxWidth: a,
82
+ minWidth: e,
83
+ children: r
82
84
  }
83
85
  );
84
86
  }
85
87
  );
86
- I.displayName = "HelpTip";
87
- const l = c.forwardRef(
88
+ N.displayName = "HelpTip";
89
+ const l = p.forwardRef(
88
90
  ({
89
- className: r,
90
- iconSize: o = 14,
91
- iconColor: t = "gray-90",
92
- iconHoverColor: a = "gray-110",
91
+ className: o,
92
+ iconSize: r = 14,
93
+ iconColor: a = "gray-90",
94
+ iconHoverColor: e = "gray-110",
93
95
  iconVariant: g = "question",
94
96
  onPointerEnter: y,
95
97
  ...i
96
- }, n) => {
97
- const p = g === "question" ? v : h;
98
- return /* @__PURE__ */ e(
99
- "span",
100
- {
101
- ref: n,
102
- role: "img",
103
- "aria-hidden": !0,
104
- className: s(
105
- "inline-block cursor-help",
106
- H({ iconColor: t, iconHoverColor: a }),
107
- r
108
- ),
109
- onPointerEnter: y,
110
- ...i,
111
- children: /* @__PURE__ */ e(p, { size: o })
112
- }
113
- );
114
- }
98
+ }, n) => /* @__PURE__ */ t(
99
+ "span",
100
+ {
101
+ ref: n,
102
+ role: "img",
103
+ "aria-hidden": !0,
104
+ className: m(
105
+ "inline-block cursor-help",
106
+ I({ iconColor: a, iconHoverColor: e }),
107
+ o
108
+ ),
109
+ onPointerEnter: y,
110
+ ...i,
111
+ children: g === "question" ? /* @__PURE__ */ t(
112
+ C,
113
+ {
114
+ icon: u,
115
+ style: { width: r, height: r }
116
+ }
117
+ ) : /* @__PURE__ */ t(v, { size: r })
118
+ }
119
+ )
115
120
  );
116
121
  l.displayName = "HelpTipIcon";
117
- const N = c.forwardRef(({ className: r, ...o }, t) => /* @__PURE__ */ e(
122
+ const w = p.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
118
123
  "span",
119
124
  {
120
- ref: t,
121
- className: s("ml-1.5 inline-block leading-[0]", r),
122
- ...o
125
+ ref: a,
126
+ className: m("ml-1.5 inline-block leading-[0]", o),
127
+ ...r
123
128
  }
124
129
  ));
125
- N.displayName = "TipWrap";
130
+ w.displayName = "TipWrap";
126
131
  export {
127
- I as HelpTip,
132
+ N as HelpTip,
128
133
  l as HelpTipIcon,
129
- N as TipWrap
134
+ w as TipWrap
130
135
  };