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

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/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/liquidation-price-block/liquidation-price-block.cjs +1 -1
  5. package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
  6. package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -1
  7. package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
  8. package/dist/cjs/components/base/time-to-liquidation-block/time-to-liquidation-block.cjs +1 -1
  9. package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
  10. package/dist/cjs/components/base/values/constants.cjs +1 -1
  11. package/dist/cjs/components/base/values/index.cjs +1 -1
  12. package/dist/cjs/components/base/values/no-value.cjs +1 -0
  13. package/dist/cjs/components/base/values/pnl-value.cjs +1 -1
  14. package/dist/cjs/components/base/values/price-impact-value.cjs +1 -1
  15. package/dist/cjs/components/base/values/scalars.cjs +1 -1
  16. package/dist/cjs/components/base-table/base-table-line.cjs +1 -1
  17. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  18. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  19. package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
  20. package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
  21. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  22. package/dist/cjs/components/help-tip/help-tip.cjs +1 -1
  23. package/dist/cjs/components/index.cjs +1 -1
  24. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  25. package/dist/cjs/index.cjs +1 -1
  26. package/dist/cjs/locale/en.json.cjs +1 -1
  27. package/dist/cjs/utils/format.cjs +1 -1
  28. package/dist/cjs/utils/index.cjs +1 -1
  29. package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +3 -2
  30. package/dist/esm/components/base/index.js +63 -61
  31. package/dist/esm/components/base/info-list/info-list.js +8 -7
  32. package/dist/esm/components/base/liquidation-price-block/liquidation-price-block.js +46 -38
  33. package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +74 -61
  34. package/dist/esm/components/base/position-assets/position-assets.js +45 -41
  35. package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +86 -74
  36. package/dist/esm/components/base/time-to-liquidation-block/time-to-liquidation-block.js +40 -32
  37. package/dist/esm/components/base/token-amount/token-amount.js +32 -16
  38. package/dist/esm/components/base/values/constants.js +1 -0
  39. package/dist/esm/components/base/values/index.js +21 -19
  40. package/dist/esm/components/base/values/no-value.js +34 -0
  41. package/dist/esm/components/base/values/pnl-value.js +10 -9
  42. package/dist/esm/components/base/values/price-impact-value.js +6 -5
  43. package/dist/esm/components/base/values/scalars.js +23 -26
  44. package/dist/esm/components/base-table/base-table-line.js +44 -36
  45. package/dist/esm/components/checkbox/checkbox-labeled.js +1 -1
  46. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -1
  47. package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +47 -46
  48. package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +26 -25
  49. package/dist/esm/components/compound-apy/compound-apy.js +48 -40
  50. package/dist/esm/components/help-tip/help-tip.js +64 -59
  51. package/dist/esm/components/index.js +624 -622
  52. package/dist/esm/components/with-copy/with-copy.js +1 -1
  53. package/dist/esm/index.js +814 -811
  54. package/dist/esm/locale/en.json.js +1 -0
  55. package/dist/esm/utils/format.js +14 -12
  56. package/dist/esm/utils/index.js +76 -75
  57. package/dist/globals.css +1 -1
  58. package/dist/types/components/base/apy-breakdown-body/apy-breakdown-body.d.ts +4 -3
  59. package/dist/types/components/base/liquidation-price-block/liquidation-price-block.d.ts +8 -1
  60. package/dist/types/components/base/position-assets/position-assets.d.ts +7 -1
  61. package/dist/types/components/base/time-to-liquidation-block/time-to-liquidation-block.d.ts +8 -1
  62. package/dist/types/components/base/values/constants.d.ts +1 -0
  63. package/dist/types/components/base/values/index.d.ts +1 -0
  64. package/dist/types/components/base/values/no-value.d.ts +25 -0
  65. package/dist/types/components/base/values/scalars.d.ts +7 -2
  66. package/dist/types/locale/en.json.d.ts +1 -0
  67. package/dist/types/utils/format.d.ts +8 -0
  68. package/package.json +1 -1
@@ -1,60 +1,68 @@
1
- import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import { useTitleText as T } from "../text/use-title-text.js";
3
- import { FadeoutLoading as l } from "../../fadeout-loading/fadeout-loading.js";
4
- import { HealthDot as f } from "../../status-elements/status-elements.js";
5
- import { FormattedMessageTyped as m } from "../../typed-intl/index.js";
6
- import { VerticalIndicator as h } from "../../vertical-indicator/vertical-indicator.js";
7
- import { ttlLeft as g, getTTLZones as x } from "../../../utils/ttl.js";
8
- import { TimeToLiquidationBlockTest as r } from "./constants.js";
1
+ import { jsx as t, jsxs as m, Fragment as f } from "react/jsx-runtime";
2
+ import { useTitleText as h } from "../text/use-title-text.js";
3
+ import { FadeoutLoading as s } from "../../fadeout-loading/fadeout-loading.js";
4
+ import { HealthDot as g } from "../../status-elements/status-elements.js";
5
+ import { FormattedMessageTyped as u } from "../../typed-intl/index.js";
6
+ import { VerticalIndicator as L } from "../../vertical-indicator/vertical-indicator.js";
7
+ import { APPROXIMATE_SYMBOL as I } from "../../../utils/format.js";
8
+ import { ttlLeft as x, getTTLZones as B } from "../../../utils/ttl.js";
9
+ import { TimeToLiquidationBlockTest as a } from "./constants.js";
9
10
  function j({
10
11
  data: o,
11
12
  dataTo: n,
12
- zone: a,
13
+ approximate: r,
14
+ zone: l,
13
15
  isLoading: e,
14
16
  title: i,
15
- tip: s,
16
- testId: v
17
+ tip: v,
18
+ testId: p
17
19
  }) {
18
- const p = T(), d = n !== void 0;
20
+ const T = h(), d = n !== void 0;
19
21
  return /* @__PURE__ */ t(
20
- h,
22
+ L,
21
23
  {
22
24
  align: "center",
23
25
  dimPreviousValue: !1,
24
- "data-testid": v ?? r.root,
25
- label: i !== void 0 ? p(i) : /* @__PURE__ */ t(m, { messageId: "components.timeToLiquidationBlock.label" }),
26
- tip: s ?? /* @__PURE__ */ t(m, { messageId: "components.timeToLiquidationBlock.tip" }),
27
- value: /* @__PURE__ */ t(l, { loading: e, children: /* @__PURE__ */ t(
28
- u,
26
+ "data-testid": p ?? a.root,
27
+ label: i !== void 0 ? T(i) : /* @__PURE__ */ t(u, { messageId: "components.timeToLiquidationBlock.label" }),
28
+ tip: v ?? /* @__PURE__ */ t(u, { messageId: "components.timeToLiquidationBlock.tip" }),
29
+ value: /* @__PURE__ */ t(s, { loading: e, children: /* @__PURE__ */ t(
30
+ c,
29
31
  {
30
32
  milliseconds: o,
31
- zone: d ? void 0 : a,
32
- testId: r.value
33
+ approximate: r,
34
+ zone: d ? void 0 : l,
35
+ testId: a.value
33
36
  }
34
37
  ) }),
35
- valueTo: d ? /* @__PURE__ */ t(l, { loading: e, children: /* @__PURE__ */ t(
36
- u,
38
+ valueTo: d ? /* @__PURE__ */ t(s, { loading: e, children: /* @__PURE__ */ t(
39
+ c,
37
40
  {
38
41
  milliseconds: n ?? null,
39
- zone: a,
40
- testId: r.valueTo
42
+ approximate: r,
43
+ zone: l,
44
+ testId: a.valueTo
41
45
  }
42
46
  ) }) : void 0
43
47
  }
44
48
  );
45
49
  }
46
- function u({
50
+ function c({
47
51
  milliseconds: o,
48
- zone: n,
49
- testId: a
52
+ approximate: n,
53
+ zone: r,
54
+ testId: l
50
55
  }) {
51
- const e = o == null ? void 0 : g(o), i = n ?? (o == null ? void 0 : x(o));
52
- return /* @__PURE__ */ c("span", { className: "inline-flex items-center", "data-testid": a, children: [
53
- o === void 0 ? "—" : o === null ? "N/A" : e?.months !== void 0 ? `${e.months}mo` : e?.day !== void 0 ? `${e.day}d` : "<1d",
54
- o != null && i ? /* @__PURE__ */ t("span", { className: "ml-1.5", children: /* @__PURE__ */ t(f, { zone: i }) }) : null
56
+ const e = o == null ? void 0 : x(o), i = r ?? (o == null ? void 0 : B(o));
57
+ return /* @__PURE__ */ m("span", { className: "inline-flex items-center", "data-testid": l, children: [
58
+ o === void 0 ? "—" : o === null ? "N/A" : /* @__PURE__ */ m(f, { children: [
59
+ n ? /* @__PURE__ */ t("span", { className: "mr-0.5", children: I }) : null,
60
+ e?.months !== void 0 ? `${e.months}mo` : e?.day !== void 0 ? `${e.day}d` : "<1d"
61
+ ] }),
62
+ o != null && i ? /* @__PURE__ */ t("span", { className: "ml-1.5", children: /* @__PURE__ */ t(g, { zone: i }) }) : null
55
63
  ] });
56
64
  }
57
65
  export {
58
66
  j as TimeToLiquidationBlock,
59
- r as TimeToLiquidationBlockTest
67
+ a as TimeToLiquidationBlockTest
60
68
  };
@@ -1,30 +1,46 @@
1
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
- import { Stack as s } from "../stack/stack.js";
3
- import { TokenTemplate as a } from "../../token-template/token-template.js";
4
- import { Typography as l } from "../../typography/typography.js";
5
- import { formatMoney as p } from "../../../utils/format-money.js";
6
- import { TokenAmountTest as n } from "./constants.js";
7
- function v({
1
+ import { jsx as r, jsxs as e } from "react/jsx-runtime";
2
+ import { Stack as n } from "../stack/stack.js";
3
+ import { NoValue as a } from "../values/no-value.js";
4
+ import "react";
5
+ import "@gearbox-protocol/sdk/onchain";
6
+ import "clsx";
7
+ import "tailwind-merge";
8
+ import "sonner";
9
+ import { formatMoney as s } from "../../../utils/format-money.js";
10
+ import "luxon";
11
+ import "../../../utils/z-index.js";
12
+ import "../../points-icon/points-icon.js";
13
+ import "viem";
14
+ import "../../token-icon/token-icon.js";
15
+ import "react-intl";
16
+ import "../../tooltip/simple-tooltip.js";
17
+ import "../../tooltip/tooltip.js";
18
+ import "../../badge/badge.js";
19
+ import "../../badge/chip.js";
20
+ import { TokenTemplate as l } from "../../token-template/token-template.js";
21
+ import { Typography as u } from "../../typography/typography.js";
22
+ import { TokenAmountTest as t } from "./constants.js";
23
+ function C({
8
24
  data: o,
9
- token: e,
10
- align: t = "end"
25
+ token: m,
26
+ align: i = "end"
11
27
  }) {
12
28
  if (o === null)
13
29
  return /* @__PURE__ */ r(
14
30
  "span",
15
31
  {
16
32
  className: "text-secondary-foreground",
17
- "data-testid": n.root,
33
+ "data-testid": t.root,
18
34
  children: "—"
19
35
  }
20
36
  );
21
- const m = e ?? o.token;
22
- return /* @__PURE__ */ i(s, { gap: "xs", align: t, "data-testid": n.root, children: [
23
- /* @__PURE__ */ r(a, { value: o.value, token: m }),
24
- /* @__PURE__ */ r(l, { as: "span", variant: "caption", color: "secondary", children: o.valueUsd === null ? "—" : p(o.valueUsd) })
37
+ const p = m ?? o.token;
38
+ return /* @__PURE__ */ e(n, { gap: "xs", align: i, "data-testid": t.root, children: [
39
+ /* @__PURE__ */ r(l, { value: o.value, token: p }),
40
+ /* @__PURE__ */ r(u, { as: "span", variant: "caption", color: "secondary", children: o.valueUsd === null ? /* @__PURE__ */ r(a, {}) : s(o.valueUsd) })
25
41
  ] });
26
42
  }
27
43
  export {
28
- v as TokenAmount,
29
- n as TokenAmountTest
44
+ C as TokenAmount,
45
+ t as TokenAmountTest
30
46
  };
@@ -9,6 +9,7 @@ class a {
9
9
  static tokenBigint = "value-token-bigint";
10
10
  static points = "value-points";
11
11
  static placeholder = "value-placeholder";
12
+ static accruing = "value-accruing";
12
13
  }
13
14
  class e {
14
15
  static root = "position-short-label";
@@ -1,26 +1,28 @@
1
1
  import { PositionShortLabelTest as t, ValueTest as r } from "./constants.js";
2
- import { PnlValue as i } from "./pnl-value.js";
3
- import { PointsValue as p } from "./points-value.js";
4
- import { PositionShortLabel as s } from "./position-short-label.js";
2
+ import { NoValue as i } from "./no-value.js";
3
+ import { PnlValue as p } from "./pnl-value.js";
4
+ import { PointsValue as u } from "./points-value.js";
5
+ import { PositionShortLabel as V } from "./position-short-label.js";
5
6
  import { PositionStatusBadge as n } from "./position-status-badge.js";
6
- import { PositionTypeBadge as f } from "./position-type-badge.js";
7
- import { PriceImpactValue as P, priceImpact as c } from "./price-impact-value.js";
8
- import { ApyValue as T, HealthFactorValue as b, LeverageValue as d, TokenBigint as h, UsdValue as B, UtilizationValue as L, bps as S } from "./scalars.js";
7
+ import { PositionTypeBadge as P } from "./position-type-badge.js";
8
+ import { PriceImpactValue as g, priceImpact as T } from "./price-impact-value.js";
9
+ import { ApyValue as d, HealthFactorValue as h, LeverageValue as B, TokenBigint as L, UsdValue as S, UtilizationValue as y, bps as I } from "./scalars.js";
9
10
  export {
10
- T as ApyValue,
11
- b as HealthFactorValue,
12
- d as LeverageValue,
13
- i as PnlValue,
14
- p as PointsValue,
15
- s as PositionShortLabel,
11
+ d as ApyValue,
12
+ h as HealthFactorValue,
13
+ B as LeverageValue,
14
+ i as NoValue,
15
+ p as PnlValue,
16
+ u as PointsValue,
17
+ V as PositionShortLabel,
16
18
  t as PositionShortLabelTest,
17
19
  n as PositionStatusBadge,
18
- f as PositionTypeBadge,
19
- P as PriceImpactValue,
20
- h as TokenBigint,
21
- B as UsdValue,
22
- L as UtilizationValue,
20
+ P as PositionTypeBadge,
21
+ g as PriceImpactValue,
22
+ L as TokenBigint,
23
+ S as UsdValue,
24
+ y as UtilizationValue,
23
25
  r as ValueTest,
24
- S as bps,
25
- c as priceImpact
26
+ I as bps,
27
+ T as priceImpact
26
28
  };
@@ -0,0 +1,34 @@
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { HelpTip as o } from "../../help-tip/help-tip.js";
3
+ import { useIntlTyped as i } from "../../typed-intl/index.js";
4
+ import { ValueTest as n } from "./constants.js";
5
+ const c = "—";
6
+ function u({ reason: r }) {
7
+ const t = i();
8
+ if (r === void 0)
9
+ return /* @__PURE__ */ e(
10
+ "span",
11
+ {
12
+ className: "text-secondary-foreground",
13
+ "data-testid": n.placeholder,
14
+ children: c
15
+ }
16
+ );
17
+ const s = t.formatMessage({
18
+ messageId: "components.value.accruing"
19
+ });
20
+ return /* @__PURE__ */ a(
21
+ "span",
22
+ {
23
+ className: "inline-flex items-center leading-[0]",
24
+ "data-testid": n.accruing,
25
+ children: [
26
+ /* @__PURE__ */ e(o, { iconSize: 18, children: s }),
27
+ /* @__PURE__ */ e("span", { className: "sr-only", children: s })
28
+ ]
29
+ }
30
+ );
31
+ }
32
+ export {
33
+ u as NoValue
34
+ };
@@ -5,23 +5,24 @@ import { cn as i } from "../../../utils/cn.js";
5
5
  import "sonner";
6
6
  import "luxon";
7
7
  import "../../../utils/z-index.js";
8
- import { ValueTest as o } from "./constants.js";
9
- function f({
10
- data: e
8
+ import { ValueTest as s } from "./constants.js";
9
+ import { NoValue as m } from "./no-value.js";
10
+ function V({
11
+ data: o
11
12
  }) {
12
- const t = typeof e == "number" ? e : e?.total.valueUsd ?? null;
13
+ const t = typeof o == "number" ? o : o?.total.valueUsd ?? null;
13
14
  if (t === null)
14
- return /* @__PURE__ */ r("span", { "data-testid": o.placeholder, children: "—" });
15
- const s = t > 0 ? "+" : t < 0 ? "−" : "";
15
+ return /* @__PURE__ */ r(m, {});
16
+ const e = t > 0 ? "+" : t < 0 ? "−" : "";
16
17
  return /* @__PURE__ */ r(
17
18
  "span",
18
19
  {
19
- "data-testid": o.pnl,
20
+ "data-testid": s.pnl,
20
21
  className: i(t > 0 && "text-success", t < 0 && "text-destructive"),
21
- children: `${s}$${Math.abs(t).toFixed(2)}`
22
+ children: `${e}$${Math.abs(t).toFixed(2)}`
22
23
  }
23
24
  );
24
25
  }
25
26
  export {
26
- f as PnlValue
27
+ V as PnlValue
27
28
  };
@@ -8,15 +8,16 @@ import { formatPercentAmount as o } from "../../../utils/format-money.js";
8
8
  import "luxon";
9
9
  import "../../../utils/z-index.js";
10
10
  import { ValueTest as i } from "./constants.js";
11
- function e(r) {
11
+ import { NoValue as m } from "./no-value.js";
12
+ function p(r) {
12
13
  return `${r > 0n ? "+" : ""}${o(Number(r) / 1e4, 2)}%`;
13
14
  }
14
- function I({
15
+ function x({
15
16
  data: r
16
17
  }) {
17
- return r === void 0 ? /* @__PURE__ */ t("span", { "data-testid": i.placeholder, children: "—" }) : /* @__PURE__ */ t("span", { "data-testid": i.priceImpact, children: e(r) });
18
+ return r === void 0 ? /* @__PURE__ */ t(m, {}) : /* @__PURE__ */ t("span", { "data-testid": i.priceImpact, children: p(r) });
18
19
  }
19
20
  export {
20
- I as PriceImpactValue,
21
- e as priceImpact
21
+ x as PriceImpactValue,
22
+ p as priceImpact
22
23
  };
@@ -1,5 +1,5 @@
1
- import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
- import { formatUnits as u } from "viem";
1
+ import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
+ import { formatUnits as l } from "viem";
3
3
  import { CompoundAPY as p } from "../../compound-apy/compound-apy.js";
4
4
  import { SimpleTooltip as a } from "../../tooltip/simple-tooltip.js";
5
5
  import "../../tooltip/tooltip.js";
@@ -7,42 +7,39 @@ import "react";
7
7
  import "@gearbox-protocol/sdk/onchain";
8
8
  import { cn as c } from "../../../utils/cn.js";
9
9
  import "sonner";
10
- import { formatAssetAmount as d } from "../../../utils/format-asset-amount.js";
11
- import { formatLeverage as f } from "../../../utils/format-leverage.js";
10
+ import { formatAssetAmount as f } from "../../../utils/format-asset-amount.js";
11
+ import { formatLeverage as d } from "../../../utils/format-leverage.js";
12
12
  import { formatPercentAmount as h, formatMoney as v } from "../../../utils/format-money.js";
13
13
  import "luxon";
14
14
  import "../../../utils/z-index.js";
15
15
  import { ValueTest as i } from "./constants.js";
16
- const x = "";
17
- function n() {
18
- return /* @__PURE__ */ r("span", { "data-testid": i.placeholder, children: x });
19
- }
16
+ import { NoValue as n } from "./no-value.js";
20
17
  function s(t) {
21
18
  return `${h(t / 100, 2)}%`;
22
19
  }
23
- function E({
20
+ function w({
24
21
  data: t,
25
22
  tooltip: e = !0,
26
23
  period: o
27
24
  }) {
28
- return t === void 0 ? /* @__PURE__ */ r(n, {}) : typeof t == "number" ? /* @__PURE__ */ r("span", { "data-testid": i.apy, children: s(t) }) : /* @__PURE__ */ r("span", { "data-testid": i.apy, children: /* @__PURE__ */ r(p, { apy: t, tooltip: e, period: o }) });
25
+ return t === void 0 ? /* @__PURE__ */ r(n, { reason: o }) : typeof t == "number" ? /* @__PURE__ */ r("span", { "data-testid": i.apy, children: s(t) }) : /* @__PURE__ */ r("span", { "data-testid": i.apy, children: /* @__PURE__ */ r(p, { apy: t, tooltip: e, period: o }) });
29
26
  }
30
- function H({
27
+ function C({
31
28
  data: t
32
29
  }) {
33
30
  return t == null ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r("span", { "data-testid": i.usd, children: v(t) });
34
31
  }
35
- function N({
32
+ function H({
36
33
  data: t
37
34
  }) {
38
- return t === void 0 ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r("span", { "data-testid": i.leverage, children: `${f(t)}x` });
35
+ return t === void 0 ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r("span", { "data-testid": i.leverage, children: `${d(t)}x` });
39
36
  }
40
- function w({
37
+ function M({
41
38
  data: t
42
39
  }) {
43
40
  return t === void 0 ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r("span", { "data-testid": i.utilization, children: s(t) });
44
41
  }
45
- function D({
42
+ function S({
46
43
  data: t
47
44
  }) {
48
45
  if (t === void 0)
@@ -50,26 +47,26 @@ function D({
50
47
  const e = t < 1e4 ? "text-destructive" : t < 11e3 ? "text-warning" : "text-success";
51
48
  return /* @__PURE__ */ r("span", { "data-testid": i.healthFactor, className: c(e), children: (t / 1e4).toFixed(2) });
52
49
  }
53
- function M({
50
+ function Y({
54
51
  data: t,
55
52
  token: e,
56
53
  showSymbol: o = !0
57
54
  }) {
58
55
  if (t === void 0 || e === void 0)
59
56
  return /* @__PURE__ */ r(n, {});
60
- const l = u(t, e.decimals);
57
+ const m = l(t, e.decimals);
61
58
  return (
62
59
  // `title` also keeps the amount where a hover tooltip cannot reach:
63
60
  // keyboard, touch, and the browser's own find — and keeps the symbol
64
61
  // reachable there even when the row is the one printing it
65
- /* @__PURE__ */ m("span", { "data-testid": i.tokenBigint, title: `${l} ${e.symbol}`, children: [
62
+ /* @__PURE__ */ u("span", { "data-testid": i.tokenBigint, title: `${m} ${e.symbol}`, children: [
66
63
  /* @__PURE__ */ r(
67
64
  a,
68
65
  {
69
66
  placement: "top",
70
67
  className: "break-all",
71
- title: /* @__PURE__ */ r("span", { children: d(t, e.decimals) }),
72
- children: /* @__PURE__ */ r("span", { children: l })
68
+ title: /* @__PURE__ */ r("span", { children: f(t, e.decimals) }),
69
+ children: /* @__PURE__ */ r("span", { children: m })
73
70
  }
74
71
  ),
75
72
  o && ` ${e.symbol}`
@@ -77,11 +74,11 @@ function M({
77
74
  );
78
75
  }
79
76
  export {
80
- E as ApyValue,
81
- D as HealthFactorValue,
82
- N as LeverageValue,
83
- M as TokenBigint,
84
- H as UsdValue,
85
- w as UtilizationValue,
77
+ w as ApyValue,
78
+ S as HealthFactorValue,
79
+ H as LeverageValue,
80
+ Y as TokenBigint,
81
+ C as UsdValue,
82
+ M as UtilizationValue,
86
83
  s as bps
87
84
  };
@@ -1,30 +1,38 @@
1
1
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
- import "react-intl";
3
- import "../buttons/button/button.js";
2
+ import { NoValue as G } from "../base/values/no-value.js";
4
3
  import "react";
5
4
  import "@gearbox-protocol/sdk/onchain";
6
- import { cn as o } from "../../utils/cn.js";
5
+ import { cn as s } from "../../utils/cn.js";
7
6
  import "sonner";
8
7
  import "luxon";
9
8
  import "../../utils/z-index.js";
9
+ import "../points-icon/points-icon.js";
10
+ import "viem";
11
+ import "../token-icon/token-icon.js";
12
+ import "react-intl";
13
+ import "../tooltip/simple-tooltip.js";
14
+ import "../tooltip/tooltip.js";
15
+ import "../badge/badge.js";
16
+ import "../badge/chip.js";
17
+ import "../buttons/button/button.js";
10
18
  import { GridTableRow as h, GridTableCell as u } from "../table/grid-table.js";
11
19
  import "../skeleton/skeleton.js";
12
20
  import "../table/table.js";
13
- import { Typography as G } from "../typography/typography.js";
14
- import { useIsMedium as k, useIsMobile as z } from "../../hooks/use-media-query.js";
15
- import { BaseTableLineTest as D } from "./constants.js";
16
- const O = "min-w-0 max-w-full overflow-hidden", P = o(
21
+ import { Typography as k } from "../typography/typography.js";
22
+ import { useIsMedium as z, useIsMobile as D } from "../../hooks/use-media-query.js";
23
+ import { BaseTableLineTest as O } from "./constants.js";
24
+ const P = "min-w-0 max-w-full overflow-hidden", S = s(
17
25
  "min-w-0 max-w-full self-stretch items-center overflow-x-clip py-2 pl-4",
18
26
  "[&_span.truncate]:whitespace-normal",
19
27
  "[&_div.overflow-hidden]:overflow-visible"
20
- ), S = "min-w-0 max-w-full overflow-visible whitespace-nowrap";
28
+ ), F = "min-w-0 max-w-full overflow-visible whitespace-nowrap";
21
29
  function v({
22
30
  label: t,
23
31
  children: r
24
32
  }) {
25
33
  return /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-col gap-1", children: [
26
34
  /* @__PURE__ */ i(
27
- G,
35
+ k,
28
36
  {
29
37
  as: "span",
30
38
  variant: "caption",
@@ -36,62 +44,62 @@ function v({
36
44
  /* @__PURE__ */ i("div", { className: "min-w-0 text-sm", children: r })
37
45
  ] });
38
46
  }
39
- function ie({
47
+ function pe({
40
48
  columns: t,
41
49
  cells: r,
42
- last: x,
43
- href: b,
50
+ last: b,
51
+ href: x,
44
52
  disabled: l = !1,
45
53
  disabledStyle: g = !1,
46
54
  accentClassName: C,
47
- onRowClick: n,
55
+ onRowClick: m,
48
56
  "data-testid": N,
49
57
  minHeightClassName: L = "min-h-[66px]"
50
58
  }) {
51
- const _ = k(), y = z(), m = t.filter((e) => e.mobile === "title"), d = m.length > 0 ? m : t.slice(0, 1), T = t.filter((e) => e.mobile === "badge"), B = new Set(d.map((e) => e.id)), p = t.filter(
59
+ const _ = z(), T = D(), n = t.filter((e) => e.mobile === "title"), p = n.length > 0 ? n : t.slice(0, 1), y = t.filter((e) => e.mobile === "badge"), B = new Set(p.map((e) => e.id)), d = t.filter(
52
60
  (e) => !B.has(e.id) && (e.mobile ?? "stat") === "stat"
53
- ), j = t.filter((e) => e.mobile === "block"), c = {
54
- last: x,
55
- href: b,
61
+ ), j = t.filter((e) => e.mobile === "block"), f = {
62
+ last: b,
63
+ href: x,
56
64
  noHover: l,
57
65
  "data-disabled": l,
58
- "data-testid": N ?? D.root,
59
- onRowClick: l ? void 0 : n
60
- }, f = o(
61
- n && !l && "cursor-pointer",
66
+ "data-testid": N ?? O.root,
67
+ onRowClick: l ? void 0 : m
68
+ }, c = s(
69
+ m && !l && "cursor-pointer",
62
70
  g && "text-secondary-foreground!",
63
71
  l && "cursor-not-allowed",
64
72
  C
65
73
  );
66
- return y ? /* @__PURE__ */ i(h, { ...c, className: f, children: /* @__PURE__ */ a(
74
+ return T ? /* @__PURE__ */ i(h, { ...f, className: c, children: /* @__PURE__ */ a(
67
75
  u,
68
76
  {
69
77
  span: "full",
70
78
  size: "sm",
71
- className: o(
79
+ className: s(
72
80
  "flex min-w-0 max-w-full flex-col items-start gap-3 overflow-x-clip py-3",
73
81
  "[&_span.truncate]:whitespace-normal [&_div.overflow-hidden]:overflow-visible"
74
82
  ),
75
83
  children: [
76
84
  /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
77
- d.map((e) => /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: r[e.id] }, e.id)),
78
- T.map((e) => /* @__PURE__ */ i("div", { children: r[e.id] }, e.id))
85
+ p.map((e) => /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: r[e.id] }, e.id)),
86
+ y.map((e) => /* @__PURE__ */ i("div", { children: r[e.id] }, e.id))
79
87
  ] }),
80
- p.length > 0 && /* @__PURE__ */ i("div", { className: "grid w-full min-w-0 grid-cols-3 gap-x-2 gap-y-3 [&_*]:text-left [&_*]:justify-start", children: p.map((e) => /* @__PURE__ */ i(v, { label: e.title, children: r[e.id] }, e.id)) }),
88
+ d.length > 0 && /* @__PURE__ */ i("div", { className: "grid w-full min-w-0 grid-cols-3 gap-x-2 gap-y-3 [&_*]:text-left [&_*]:justify-start", children: d.map((e) => /* @__PURE__ */ i(v, { label: e.title, children: r[e.id] }, e.id)) }),
81
89
  j.map((e) => {
82
- const s = r[e.id];
83
- return s == null || s === !1 ? null : /* @__PURE__ */ i(v, { label: e.title, children: s }, e.id);
90
+ const o = r[e.id];
91
+ return o == null || o === !1 ? null : /* @__PURE__ */ i(v, { label: e.title, children: o }, e.id);
84
92
  })
85
93
  ]
86
94
  }
87
95
  ) }) : /* @__PURE__ */ i(
88
96
  h,
89
97
  {
90
- ...c,
91
- className: o(L, f),
92
- children: t.map((e, s) => {
93
- const I = e.justify ?? "start", M = s === 0, w = s === t.length - 1, A = e.mobile === "badge", E = o(
94
- M ? P : A ? S : O,
98
+ ...f,
99
+ className: s(L, c),
100
+ children: t.map((e, o) => {
101
+ const I = e.justify ?? "start", M = o === 0, w = o === t.length - 1, A = e.mobile === "badge", E = s(
102
+ M ? S : A ? F : P,
95
103
  w && "pr-4",
96
104
  e.cellClassName
97
105
  );
@@ -102,7 +110,7 @@ function ie({
102
110
  textAlign: I === "end" ? "right" : "left",
103
111
  gapBefore: w ? _ ? "sm" : "md" : void 0,
104
112
  className: E,
105
- children: r[e.id] ?? /* @__PURE__ */ i("span", { className: "text-secondary-foreground", children: "—" })
113
+ children: r[e.id] ?? /* @__PURE__ */ i(G, {})
106
114
  },
107
115
  e.id
108
116
  );
@@ -111,6 +119,6 @@ function ie({
111
119
  );
112
120
  }
113
121
  export {
114
- ie as BaseTableLine,
115
- D as BaseTableLineTest
122
+ pe as BaseTableLine,
123
+ O as BaseTableLineTest
116
124
  };
@@ -35,6 +35,7 @@ import "../token-symbol/token-symbol.js";
35
35
  import "../simple-accordion/simple-accordion.js";
36
36
  import "../tip-card/tip-card.js";
37
37
  import "../typography/typography.js";
38
+ import "../help-tip/help-tip.js";
38
39
  import "../points-icon/points-icon.js";
39
40
  import "viem";
40
41
  import "../vertical-indicator/vertical-indicator.js";
@@ -81,7 +82,6 @@ import "../link/link.js";
81
82
  import "../rounded-image/rounded-image.js";
82
83
  import "../network-icon/network-indicator.js";
83
84
  import "../base-link/base-link.js";
84
- import "../help-tip/help-tip.js";
85
85
  import "../base-table/base-table-line.js";
86
86
  import "../navigation-context/navigation-context.js";
87
87
  import "../cards/card/card.js";
@@ -35,6 +35,7 @@ import "../../token-symbol/token-symbol.js";
35
35
  import "../../simple-accordion/simple-accordion.js";
36
36
  import "../../tip-card/tip-card.js";
37
37
  import "../../typography/typography.js";
38
+ import "../../help-tip/help-tip.js";
38
39
  import "../../points-icon/points-icon.js";
39
40
  import "viem";
40
41
  import "../../vertical-indicator/vertical-indicator.js";
@@ -82,7 +83,6 @@ import "../../link/link.js";
82
83
  import { RoundedImage as d } from "../../rounded-image/rounded-image.js";
83
84
  import "../../network-icon/network-indicator.js";
84
85
  import "../../base-link/base-link.js";
85
- import "../../help-tip/help-tip.js";
86
86
  import "../../base-table/base-table-line.js";
87
87
  import "../../navigation-context/navigation-context.js";
88
88
  import "../../cards/card/card.js";