@gearbox-protocol/ui-kit 4.2.0 → 4.2.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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../token-amount/token-amount.cjs"),i=require("../../no-value/no-value.cjs"),s=require("../../tooltip/simple-tooltip.cjs");require("../../tooltip/tooltip.cjs");const c=require("./constants.cjs"),a=require("./price-impact.cjs");function u({data:t,absoluteValue:n}){if(t===void 0)return e.jsx(i.NoValue,{});const o=e.jsx("span",{"data-testid":c.ValueTest.priceImpact,children:a.priceImpact(t)});return n?e.jsx(s.SimpleTooltip,{placement:"top",triangle:!1,title:o,children:e.jsx(r.TokenAmount,{data:n,align:"start"})}):o}exports.PriceImpactValue=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("../token-amount/token-amount.cjs"),i=require("../../no-value/no-value.cjs"),s=require("../../tooltip/simple-tooltip.cjs");require("../../tooltip/tooltip.cjs");const c=require("./constants.cjs"),a=require("./price-impact.cjs");function u({data:n,absoluteValue:e}){if(n===void 0)return t.jsx(i.NoValue,{});const o=t.jsx("span",{"data-testid":c.ValueTest.priceImpact,children:a.priceImpact(n)});return e?t.jsx(s.SimpleTooltip,{placement:"top",triangle:!1,title:o,children:t.jsx(r.TokenAmount,{data:{...e,value:e.value<0n?-e.value:e.value,valueUsd:e.valueUsd===null?null:Math.abs(e.valueUsd)},align:"start"})}):o}exports.PriceImpactValue=u;
@@ -1,19 +1,29 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { TokenAmount as e } from "../token-amount/token-amount.js";
3
- import { NoValue as m } from "../../no-value/no-value.js";
4
- import { SimpleTooltip as p } from "../../tooltip/simple-tooltip.js";
2
+ import { TokenAmount as p } from "../token-amount/token-amount.js";
3
+ import { NoValue as e } from "../../no-value/no-value.js";
4
+ import { SimpleTooltip as n } from "../../tooltip/simple-tooltip.js";
5
5
  import "../../tooltip/tooltip.js";
6
- import { ValueTest as n } from "./constants.js";
6
+ import { ValueTest as o } from "./constants.js";
7
7
  import { priceImpact as a } from "./price-impact.js";
8
- function T({
9
- data: r,
10
- absoluteValue: i
8
+ function h({
9
+ data: i,
10
+ absoluteValue: r
11
11
  }) {
12
- if (r === void 0)
13
- return /* @__PURE__ */ t(m, {});
14
- const o = /* @__PURE__ */ t("span", { "data-testid": n.priceImpact, children: a(r) });
15
- return i ? /* @__PURE__ */ t(p, { placement: "top", triangle: !1, title: o, children: /* @__PURE__ */ t(e, { data: i, align: "start" }) }) : o;
12
+ if (i === void 0)
13
+ return /* @__PURE__ */ t(e, {});
14
+ const m = /* @__PURE__ */ t("span", { "data-testid": o.priceImpact, children: a(i) });
15
+ return r ? /* @__PURE__ */ t(n, { placement: "top", triangle: !1, title: m, children: /* @__PURE__ */ t(
16
+ p,
17
+ {
18
+ data: {
19
+ ...r,
20
+ value: r.value < 0n ? -r.value : r.value,
21
+ valueUsd: r.valueUsd === null ? null : Math.abs(r.valueUsd)
22
+ },
23
+ align: "start"
24
+ }
25
+ ) }) : m;
16
26
  }
17
27
  export {
18
- T as PriceImpactValue
28
+ h as PriceImpactValue
19
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "Internal UI components",
5
5
  "repository": {
6
6
  "type": "git",