@gearbox-protocol/permissionless-ui 1.22.0-next.2 → 1.22.0-next.21

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 (147) hide show
  1. package/dist/cjs/components/buttons/button/button.cjs +1 -1
  2. package/dist/cjs/components/buttons/navigation-button/navigation-button.cjs +1 -1
  3. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  4. package/dist/cjs/components/client-adapters/index.cjs +1 -1
  5. package/dist/cjs/components/client-adapters/styled-button/styled-button.cjs +1 -1
  6. package/dist/cjs/components/client-adapters/styled-dialog-container/index.cjs +1 -0
  7. package/dist/cjs/components/client-adapters/styled-dialog-container/styled-dialog-container.cjs +1 -0
  8. package/dist/cjs/components/client-adapters/styled-rounded-image/index.cjs +1 -0
  9. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -0
  10. package/dist/cjs/components/description/description.cjs +1 -1
  11. package/dist/cjs/components/dialog/dialog-container.cjs +1 -1
  12. package/dist/cjs/components/dialog/dialog-modal-container.cjs +1 -1
  13. package/dist/cjs/components/dialog/index.cjs +1 -1
  14. package/dist/cjs/components/filter/filter-modal.cjs +1 -1
  15. package/dist/cjs/components/index.cjs +1 -1
  16. package/dist/cjs/components/layout/app-logo/app-logo.cjs +1 -1
  17. package/dist/cjs/components/layout/col/col.cjs +1 -1
  18. package/dist/cjs/components/layout/container/container.cjs +1 -1
  19. package/dist/cjs/components/layout/footer/footer.cjs +1 -1
  20. package/dist/cjs/components/layout/grid/grid.cjs +1 -1
  21. package/dist/cjs/components/layout/header/header.cjs +1 -1
  22. package/dist/cjs/components/layout/layout/layout.cjs +2 -2
  23. package/dist/cjs/components/modal/index.cjs +1 -0
  24. package/dist/cjs/components/modal/modal.cjs +1 -0
  25. package/dist/cjs/components/network-icon/network-icon.cjs +1 -1
  26. package/dist/cjs/components/points-icon/points-icon.cjs +1 -1
  27. package/dist/cjs/components/rounded-image/rounded-image.cjs +1 -1
  28. package/dist/cjs/components/short-string/short-string.cjs +1 -1
  29. package/dist/cjs/components/table/grid-table.cjs +1 -1
  30. package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
  31. package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
  32. package/dist/cjs/components/typography/typography.cjs +1 -1
  33. package/dist/cjs/components/vertical-list/vertical-list.cjs +1 -1
  34. package/dist/cjs/configs/tailwind-preset.cjs +1 -1
  35. package/dist/cjs/index.cjs +1 -1
  36. package/dist/cjs/utils/format-money.cjs +1 -1
  37. package/dist/cjs/utils/format-slippage.cjs +1 -0
  38. package/dist/cjs/utils/index.cjs +1 -1
  39. package/dist/cjs/utils/network-icons.cjs +1 -1
  40. package/dist/cjs/utils/search-in-token.cjs +1 -1
  41. package/dist/cjs/utils/shorten-string.cjs +1 -1
  42. package/dist/cjs/utils/static.cjs +1 -0
  43. package/dist/cjs/utils/templates.cjs +1 -1
  44. package/dist/cjs/utils/window.cjs +1 -1
  45. package/dist/cjs/utils/z-index.cjs +1 -0
  46. package/dist/esm/components/buttons/button/button.js +22 -15
  47. package/dist/esm/components/buttons/navigation-button/navigation-button.js +6 -6
  48. package/dist/esm/components/checkbox/checkbox-labeled.js +7 -1
  49. package/dist/esm/components/client-adapters/index.js +6 -2
  50. package/dist/esm/components/client-adapters/styled-button/styled-button.js +24 -13
  51. package/dist/esm/components/client-adapters/styled-dialog-container/index.js +4 -0
  52. package/dist/esm/components/client-adapters/styled-dialog-container/styled-dialog-container.js +39 -0
  53. package/dist/esm/components/client-adapters/styled-rounded-image/index.js +4 -0
  54. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +136 -0
  55. package/dist/esm/components/description/description.js +16 -10
  56. package/dist/esm/components/dialog/dialog-container.js +55 -21
  57. package/dist/esm/components/dialog/dialog-modal-container.js +38 -17
  58. package/dist/esm/components/dialog/index.js +18 -18
  59. package/dist/esm/components/filter/filter-modal.js +1 -1
  60. package/dist/esm/components/index.js +470 -466
  61. package/dist/esm/components/layout/app-logo/app-logo.js +8 -7
  62. package/dist/esm/components/layout/col/col.js +4 -4
  63. package/dist/esm/components/layout/container/container.js +5 -5
  64. package/dist/esm/components/layout/footer/footer.js +3 -3
  65. package/dist/esm/components/layout/grid/grid.js +9 -9
  66. package/dist/esm/components/layout/header/header.js +12 -12
  67. package/dist/esm/components/layout/layout/layout.js +4 -4
  68. package/dist/esm/components/modal/index.js +4 -0
  69. package/dist/esm/components/modal/modal.js +108 -0
  70. package/dist/esm/components/network-icon/network-icon.js +22 -21
  71. package/dist/esm/components/points-icon/points-icon.js +34 -37
  72. package/dist/esm/components/rounded-image/rounded-image.js +59 -27
  73. package/dist/esm/components/short-string/short-string.js +19 -23
  74. package/dist/esm/components/table/grid-table.js +2 -0
  75. package/dist/esm/components/token-icon/token-icon.js +45 -39
  76. package/dist/esm/components/token-symbol/token-symbol.js +98 -40
  77. package/dist/esm/components/typography/typography.js +15 -12
  78. package/dist/esm/components/vertical-list/vertical-list.js +39 -33
  79. package/dist/esm/configs/tailwind-preset.js +5 -3
  80. package/dist/esm/index.js +606 -601
  81. package/dist/esm/utils/format-money.js +13 -17
  82. package/dist/esm/utils/format-slippage.js +7 -0
  83. package/dist/esm/utils/index.js +66 -65
  84. package/dist/esm/utils/network-icons.js +4 -53
  85. package/dist/esm/utils/search-in-token.js +8 -8
  86. package/dist/esm/utils/shorten-string.js +7 -3
  87. package/dist/esm/utils/static.js +6 -0
  88. package/dist/esm/utils/templates.js +8 -9
  89. package/dist/esm/utils/window.js +4 -3
  90. package/dist/esm/utils/z-index.js +7 -0
  91. package/dist/globals.css +1 -1
  92. package/dist/types/components/auth/connect-required.d.ts +2 -2
  93. package/dist/types/components/auth/signin-required.d.ts +2 -2
  94. package/dist/types/components/buttons/button/button.d.ts +1 -1
  95. package/dist/types/components/buttons/navigation-button/navigation-button.d.ts +1 -1
  96. package/dist/types/components/client-adapters/index.d.ts +2 -0
  97. package/dist/types/components/client-adapters/styled-button/styled-button.d.ts +2 -2
  98. package/dist/types/components/client-adapters/styled-dialog-container/index.d.ts +1 -0
  99. package/dist/types/components/client-adapters/styled-dialog-container/styled-dialog-container.d.ts +13 -0
  100. package/dist/types/components/client-adapters/styled-rounded-image/index.d.ts +1 -0
  101. package/dist/types/components/client-adapters/styled-rounded-image/styled-rounded-image.d.ts +9 -0
  102. package/dist/types/components/description/description.d.ts +5 -3
  103. package/dist/types/components/dialog/dialog-container.d.ts +8 -3
  104. package/dist/types/components/dialog/dialog-modal-container.d.ts +9 -3
  105. package/dist/types/components/dialog/dialog.d.ts +3 -3
  106. package/dist/types/components/dialog/index.d.ts +1 -1
  107. package/dist/types/components/index.d.ts +1 -0
  108. package/dist/types/components/layout/col/col.d.ts +1 -1
  109. package/dist/types/components/layout/container/container.d.ts +1 -1
  110. package/dist/types/components/layout/footer/footer.d.ts +1 -1
  111. package/dist/types/components/layout/grid/grid.d.ts +1 -1
  112. package/dist/types/components/layout/header/header.d.ts +1 -1
  113. package/dist/types/components/layout/layout/layout.d.ts +1 -1
  114. package/dist/types/components/modal/index.d.ts +1 -0
  115. package/dist/types/components/modal/modal.d.ts +33 -0
  116. package/dist/types/components/navbar/navbar-indicator-context.d.ts +1 -1
  117. package/dist/types/components/points-icon/points-icon.d.ts +2 -5
  118. package/dist/types/components/pool-points-indicator/pool-points-indicator.d.ts +1 -1
  119. package/dist/types/components/rounded-image/rounded-image.d.ts +19 -4
  120. package/dist/types/components/short-string/short-string.d.ts +4 -4
  121. package/dist/types/components/skeleton/skeleton.d.ts +1 -1
  122. package/dist/types/components/theme-provider.d.ts +1 -1
  123. package/dist/types/components/tip-card/tip-card.d.ts +1 -1
  124. package/dist/types/components/token-icon/token-icon.d.ts +10 -4
  125. package/dist/types/components/token-symbol/token-symbol.d.ts +9 -4
  126. package/dist/types/components/typography/typography.d.ts +2 -2
  127. package/dist/types/components/vertical-list/vertical-list.d.ts +2 -5
  128. package/dist/types/components/with-copy/with-copy.d.ts +1 -1
  129. package/dist/types/configs/tailwind-preset.d.ts +2 -0
  130. package/dist/types/hooks/use-filter.d.ts +2 -2
  131. package/dist/types/index.d.ts +1 -0
  132. package/dist/types/types/component-props.d.ts +1 -1
  133. package/dist/types/utils/format-money.d.ts +0 -15
  134. package/dist/types/utils/format-slippage.d.ts +15 -0
  135. package/dist/types/utils/index.d.ts +3 -1
  136. package/dist/types/utils/network-icons.d.ts +3 -32
  137. package/dist/types/utils/shorten-string.d.ts +2 -1
  138. package/dist/types/utils/static.d.ts +3 -0
  139. package/dist/types/utils/templates.d.ts +1 -1
  140. package/dist/types/utils/window.d.ts +3 -1
  141. package/dist/types/utils/z-index.d.ts +8 -0
  142. package/package.json +4 -1
  143. package/src/styles/base.css +17 -6
  144. package/src/styles/theme.css +26 -0
  145. package/dist/cjs/components/dialog/dialog-modal.cjs +0 -1
  146. package/dist/esm/components/dialog/dialog-modal.js +0 -70
  147. package/dist/types/components/dialog/dialog-modal.d.ts +0 -30
@@ -3,9 +3,9 @@ const N = 10000000000000000n;
3
3
  function b(t) {
4
4
  return BigInt(t.toFixed(18).replace(".", ""));
5
5
  }
6
- function T(t, e) {
7
- const r = typeof t == "number" && t < 0 || typeof t == "bigint" && t < 0n ? "-" : "", o = typeof t == "number" ? b(Math.abs(t)) : f.abs(t), u = o < N && o > 0n, c = u ? "0.01" : a(o, s, e), i = `${r}$${c}`;
8
- return u ? `< ${i}` : i;
6
+ function p(t, e) {
7
+ const r = typeof t == "number" && t < 0 || typeof t == "bigint" && t < 0n ? "-" : "", o = typeof t == "number" ? b(Math.abs(t)) : f.abs(t), u = o < N && o > 0n, i = u ? "0.01" : a(o, s, e), c = `${r}$${i}`;
8
+ return u ? `< ${c}` : c;
9
9
  }
10
10
  const y = 1e4;
11
11
  function m(t, e, n = !0) {
@@ -15,13 +15,13 @@ function m(t, e, n = !0) {
15
15
  function g(t, e = 2) {
16
16
  return `${m(t, e)}%`;
17
17
  }
18
- const l = 1e4;
19
- function A(t, e = 2) {
20
- const n = Number(t) / Number(l);
18
+ const E = 1e4;
19
+ function T(t, e = 2) {
20
+ const n = Number(t) / Number(E);
21
21
  return `${m(n, e)}%`;
22
22
  }
23
- const p = 1000n;
24
- function F(t, e) {
23
+ const A = 1000n;
24
+ function S(t, e) {
25
25
  let n;
26
26
  return typeof t == "string" ? n = Number.parseFloat(t) || 0 : typeof t == "bigint" ? n = Number(t) : n = t, typeof e == "number" ? new Intl.NumberFormat("en-US", {
27
27
  style: "currency",
@@ -37,16 +37,12 @@ function F(t, e) {
37
37
  currency: "USD"
38
38
  }).format(n);
39
39
  }
40
- function S(t, e = 1) {
41
- return t === void 0 ? "-" : `${(t / Number(p)).toFixed(e)}%`;
42
- }
43
40
  export {
44
- l as PERCENTAGE_FACTOR,
45
- p as SLIPPAGE_DECIMALS,
46
- T as formatMoney,
47
- F as formatMoneyAmount,
41
+ E as PERCENTAGE_FACTOR,
42
+ A as SLIPPAGE_DECIMALS,
43
+ p as formatMoney,
44
+ S as formatMoneyAmount,
48
45
  m as formatPercentAmount,
49
46
  g as percentTemplate,
50
- A as percentageTemplate,
51
- S as slippageTemplate
47
+ T as percentageTemplate
52
48
  };
@@ -0,0 +1,7 @@
1
+ import { SLIPPAGE_DECIMALS as r } from "@gearbox-protocol/sdk";
2
+ function i(e, o = 1) {
3
+ return e === void 0 ? "-" : `${(e / Number(r)).toFixed(o)}%`;
4
+ }
5
+ export {
6
+ i as slippageTemplate
7
+ };
@@ -1,82 +1,83 @@
1
- import { generateId as o, useFormFieldIds as r } from "./a11y.js";
2
- import { bnToInputView as m } from "./bn-to-input-view.js";
1
+ import { generateId as r, useFormFieldIds as t } from "./a11y.js";
2
+ import { bnToInputView as a } from "./bn-to-input-view.js";
3
3
  import { bnToPrettyView as p } from "./bn-to-pretty-view.js";
4
4
  import { cn as i, cn as l } from "./cn.js";
5
5
  import { generateColorsFromBase as T, getCSSVariable as x, hexToRgba as c, resolveCSSColor as g } from "./colors.js";
6
- import { copyToClipboard as A } from "./copy.js";
7
- import { convertPercent as N, formatBytecodeSize as d, formatBytecodeVersion as h, formatTimestamp as C, shortenHash as I, significantTrunc as k } from "./format.js";
8
- import { formatAssetAmount as b } from "./format-asset-amount.js";
9
- import { PERCENTAGE_FACTOR as P, SLIPPAGE_DECIMALS as F, formatMoney as L, formatMoney as v, formatPercentAmount as B, percentTemplate as E, percentageTemplate as M, slippageTemplate as R } from "./format-money.js";
10
- import { FORMAT_CONSTANTS as D, formatNumberWithSuffix as O, formatPrice as _, getAdaptiveDecimals as z, isBelowDisplayThreshold as G, isEffectivelyZero as H, toSignificantDigits as W } from "./format-number.js";
11
- import { getAllNetworks as j, getNetworkByChainId as q, getNetworkConfig as J, getNetworkIcon as K } from "./network-icons.js";
12
- import { parseInputToBN as U } from "./parse-input-to-bn.js";
13
- import { pluralize as Y, selectPluralString as $ } from "./plural.js";
14
- import { getAvailableRanges as te } from "./ranges.js";
15
- import { extractTextFromLabel as re, serializeValue as ae } from "./react.js";
16
- import { searchInString as ne } from "./search.js";
17
- import { createTokenSearchFilter as fe, searchInToken as ie } from "./search-in-token.js";
18
- import { shortSHA as se } from "./short-sha.js";
19
- import { shortenString as xe } from "./shorten-string.js";
20
- import { negativeTokenTemplate as ge, tokenTemplate as Se, tokenTemplateNumber as Ae, tokenTemplateString as ue } from "./templates.js";
21
- import { TTL_CONSTANTS as de, getTTLZone as he, ttlFromTimestamp as Ce, ttlLeft as Ie, ttlLeftParsed as ke } from "./ttl.js";
22
- import { openInNewWindow as be } from "./window.js";
6
+ import { copyToClipboard as u } from "./copy.js";
7
+ import { convertPercent as d, formatBytecodeSize as h, formatBytecodeVersion as I, formatTimestamp as N, shortenHash as C, significantTrunc as b } from "./format.js";
8
+ import { formatAssetAmount as P } from "./format-asset-amount.js";
9
+ import { PERCENTAGE_FACTOR as L, SLIPPAGE_DECIMALS as k, formatMoney as E, formatMoney as v, formatPercentAmount as w, percentTemplate as B, percentageTemplate as D } from "./format-money.js";
10
+ import { FORMAT_CONSTANTS as R, formatNumberWithSuffix as V, formatPrice as _, getAdaptiveDecimals as O, isBelowDisplayThreshold as z, isEffectivelyZero as Z, toSignificantDigits as G } from "./format-number.js";
11
+ import { slippageTemplate as W } from "./format-slippage.js";
12
+ import { getNetworkIcon as j } from "./network-icons.js";
13
+ import { parseInputToBN as J } from "./parse-input-to-bn.js";
14
+ import { pluralize as Q, selectPluralString as U } from "./plural.js";
15
+ import { getAvailableRanges as $ } from "./ranges.js";
16
+ import { extractTextFromLabel as oe, serializeValue as re } from "./react.js";
17
+ import { searchInString as me } from "./search.js";
18
+ import { createTokenSearchFilter as ne, searchInToken as pe } from "./search-in-token.js";
19
+ import { shortSHA as ie } from "./short-sha.js";
20
+ import { isLongString as se, shortenString as Te } from "./shorten-string.js";
21
+ import { negativeTokenTemplate as ce, tokenTemplate as ge, tokenTemplateNumber as Se, tokenTemplateString as ue } from "./templates.js";
22
+ import { TTL_CONSTANTS as de, getTTLZone as he, ttlFromTimestamp as Ie, ttlLeft as Ne, ttlLeftParsed as Ce } from "./ttl.js";
23
+ import { openInNewWindow as ye } from "./window.js";
24
+ import { Z_INDEX as Fe } from "./z-index.js";
23
25
  export {
24
- D as FORMAT_CONSTANTS,
25
- P as PERCENTAGE_FACTOR,
26
- F as SLIPPAGE_DECIMALS,
26
+ R as FORMAT_CONSTANTS,
27
+ L as PERCENTAGE_FACTOR,
28
+ k as SLIPPAGE_DECIMALS,
27
29
  de as TTL_CONSTANTS,
28
- m as bnToInputView,
30
+ Fe as Z_INDEX,
31
+ a as bnToInputView,
29
32
  p as bnToPrettyView,
30
33
  i as cn,
31
- N as convertPercent,
32
- A as copyToClipboard,
33
- fe as createTokenSearchFilter,
34
+ d as convertPercent,
35
+ u as copyToClipboard,
36
+ ne as createTokenSearchFilter,
34
37
  l as default,
35
- re as extractTextFromLabel,
36
- b as formatAssetAmount,
37
- d as formatBytecodeSize,
38
- h as formatBytecodeVersion,
39
- L as formatMoney,
38
+ oe as extractTextFromLabel,
39
+ P as formatAssetAmount,
40
+ h as formatBytecodeSize,
41
+ I as formatBytecodeVersion,
42
+ E as formatMoney,
40
43
  v as formatMoneyAmount,
41
- O as formatNumberWithSuffix,
42
- B as formatPercentAmount,
44
+ V as formatNumberWithSuffix,
45
+ w as formatPercentAmount,
43
46
  _ as formatPrice,
44
- C as formatTimestamp,
47
+ N as formatTimestamp,
45
48
  T as generateColorsFromBase,
46
- o as generateId,
47
- z as getAdaptiveDecimals,
48
- j as getAllNetworks,
49
- te as getAvailableRanges,
49
+ r as generateId,
50
+ O as getAdaptiveDecimals,
51
+ $ as getAvailableRanges,
50
52
  x as getCSSVariable,
51
- q as getNetworkByChainId,
52
- J as getNetworkConfig,
53
- K as getNetworkIcon,
53
+ j as getNetworkIcon,
54
54
  he as getTTLZone,
55
55
  c as hexToRgba,
56
- G as isBelowDisplayThreshold,
57
- H as isEffectivelyZero,
58
- ge as negativeTokenTemplate,
59
- be as openInNewWindow,
60
- U as parseInputToBN,
61
- E as percentTemplate,
62
- M as percentageTemplate,
63
- Y as pluralize,
56
+ z as isBelowDisplayThreshold,
57
+ Z as isEffectivelyZero,
58
+ se as isLongString,
59
+ ce as negativeTokenTemplate,
60
+ ye as openInNewWindow,
61
+ J as parseInputToBN,
62
+ B as percentTemplate,
63
+ D as percentageTemplate,
64
+ Q as pluralize,
64
65
  g as resolveCSSColor,
65
- ne as searchInString,
66
- ie as searchInToken,
67
- $ as selectPluralString,
68
- ae as serializeValue,
69
- se as shortSHA,
70
- I as shortenHash,
71
- xe as shortenString,
72
- k as significantTrunc,
73
- R as slippageTemplate,
74
- W as toSignificantDigits,
75
- Se as tokenTemplate,
76
- Ae as tokenTemplateNumber,
66
+ me as searchInString,
67
+ pe as searchInToken,
68
+ U as selectPluralString,
69
+ re as serializeValue,
70
+ ie as shortSHA,
71
+ C as shortenHash,
72
+ Te as shortenString,
73
+ b as significantTrunc,
74
+ W as slippageTemplate,
75
+ G as toSignificantDigits,
76
+ ge as tokenTemplate,
77
+ Se as tokenTemplateNumber,
77
78
  ue as tokenTemplateString,
78
- Ce as ttlFromTimestamp,
79
- Ie as ttlLeft,
80
- ke as ttlLeftParsed,
81
- r as useFormFieldIds
79
+ Ie as ttlFromTimestamp,
80
+ Ne as ttlLeft,
81
+ Ce as ttlLeftParsed,
82
+ t as useFormFieldIds
82
83
  };
@@ -1,56 +1,7 @@
1
- const i = {
2
- Mainnet: {
3
- name: "Ethereum",
4
- icon: "/icons/networks/ethereum.svg",
5
- chainId: 1
6
- },
7
- Arbitrum: {
8
- name: "Arbitrum",
9
- icon: "/icons/networks/arbitrum.svg",
10
- chainId: 42161
11
- },
12
- Optimism: {
13
- name: "Optimism",
14
- icon: "/icons/networks/optimism.svg",
15
- chainId: 10
16
- },
17
- Sonic: {
18
- name: "Sonic",
19
- icon: "/icons/networks/sonic.svg",
20
- chainId: 146
21
- },
22
- Monad: {
23
- name: "Monad",
24
- icon: "/icons/networks/monad.svg",
25
- chainId: 0
26
- // TBD
27
- },
28
- AllNetworks: {
29
- name: "All Networks",
30
- icon: "/icons/networks/all.svg",
31
- chainId: 0
32
- }
33
- }, o = {
34
- 1: "Mainnet",
35
- 42161: "Arbitrum",
36
- 10: "Optimism",
37
- 146: "Sonic"
38
- };
39
- function t(n) {
40
- return i[n]?.icon || "";
41
- }
42
- function e(n) {
43
- return o[n];
44
- }
45
- function c(n) {
46
- return i[n];
47
- }
48
- function r() {
49
- return Object.values(i);
1
+ import { getStatic as o } from "./static.js";
2
+ function r(t) {
3
+ return o(`/chains/${t.toLowerCase()}.svg`);
50
4
  }
51
5
  export {
52
- r as getAllNetworks,
53
- e as getNetworkByChainId,
54
- c as getNetworkConfig,
55
- t as getNetworkIcon
6
+ r as getNetworkIcon
56
7
  };
@@ -1,14 +1,14 @@
1
- function a(e, t) {
2
- if (!e || !t) return !0;
3
- const r = t.toLowerCase().trim();
4
- if (!r) return !0;
5
- const s = e.title?.toLowerCase() || "", o = e.symbol?.toLowerCase() || "", n = e.name?.toLowerCase() || "", c = e.address?.toLowerCase() || "";
6
- return s.includes(r) || o.includes(r) || n.includes(r) || c.includes(r);
1
+ function c(e, t) {
2
+ if (!e || !t) return !1;
3
+ const s = t.toLowerCase().trim();
4
+ if (!s) return !1;
5
+ const r = e.title?.toLowerCase() || "", o = e.symbol?.toLowerCase() || "", n = e.name?.toLowerCase() || "", a = e.address?.toLowerCase() || "";
6
+ return r.includes(s) || o.includes(s) || n.includes(s) || s.length > 2 && a.toLowerCase().startsWith(s);
7
7
  }
8
8
  function i(e) {
9
- return (t) => a(t, e);
9
+ return (t) => c(t, e);
10
10
  }
11
11
  export {
12
12
  i as createTokenSearchFilter,
13
- a as searchInToken
13
+ c as searchInToken
14
14
  };
@@ -1,6 +1,10 @@
1
- function r(n, e = 10) {
2
- return n.length <= e ? n : `${n.slice(0, e)}...`;
1
+ function t(n, r) {
2
+ return i(n, r) ? `${n.slice(0, r - 3)}...` : n;
3
+ }
4
+ function i(n, r) {
5
+ return n.length > r;
3
6
  }
4
7
  export {
5
- r as shortenString
8
+ i as isLongString,
9
+ t as shortenString
6
10
  };
@@ -0,0 +1,6 @@
1
+ const a = "https://static.gearbox.finance", i = (t = a) => (c) => `${t}${c}`, n = i();
2
+ export {
3
+ a as STATIC_SERVER,
4
+ i as buildStaticUrl,
5
+ n as getStatic
6
+ };
@@ -1,19 +1,18 @@
1
1
  import { jsx as u, Fragment as d } from "react/jsx-runtime";
2
- import { formatBN as a, toBigInt as g, BigIntMath as $ } from "@gearbox-protocol/sdk";
2
+ import { formatBN as l, toBigInt as g, BigIntMath as $ } from "@gearbox-protocol/sdk";
3
3
  import { percentTemplate as p } from "./format-money.js";
4
4
  function T(o, t = 2) {
5
5
  return /* @__PURE__ */ u(d, { children: p(o, t) });
6
6
  }
7
7
  function B(o, t, s, e = " ", i) {
8
8
  const { decimals: r = 18 } = t || {};
9
- let n = a(o, r, s);
9
+ let n = l(o, r, s);
10
10
  const c = t?.title || t?.symbol || "undefined";
11
11
  if (i !== void 0 && n !== "-") {
12
- const f = e.length + c.length, l = i - f;
13
- l > 0 && n.length > l && (n = n.slice(0, l));
12
+ const f = e.length + c.length, m = i - f;
13
+ m > 0 && n.length > m && (n = n.slice(0, m));
14
14
  }
15
- const m = n === "-" ? n : `${n}${e}${c}`;
16
- return /* @__PURE__ */ u(d, { children: m });
15
+ return n === "-" ? n : `${n}${e}${c}`;
17
16
  }
18
17
  function x(o, t, s = 2) {
19
18
  if (o === void 0) return "-";
@@ -21,11 +20,11 @@ function x(o, t, s = 2) {
21
20
  return `${i}${r} ${t?.title}`;
22
21
  }
23
22
  function v(o, t, s, e = " ") {
24
- const i = g(o || 0), r = i < 0n, { decimals: n = 18 } = t || {}, c = a($.abs(i), n, s), m = t?.title || t?.symbol || "undefined";
25
- return c === "-" ? c : `${r ? "-" : ""}${c}${e}${m}`;
23
+ const i = g(o || 0), r = i < 0n, { decimals: n = 18 } = t || {}, c = l($.abs(i), n, s), a = t?.title || t?.symbol || "undefined";
24
+ return c === "-" ? c : `${r ? "-" : ""}${c}${e}${a}`;
26
25
  }
27
26
  function P(o, t, s, e = " ") {
28
- const { decimals: i = 18 } = t || {}, r = a(o, i, s), n = t?.title || t?.symbol || "undefined";
27
+ const { decimals: i = 18 } = t || {}, r = l(o, i, s), n = t?.title || t?.symbol || "undefined";
29
28
  return r === "-" ? r : `${r}${e}${n}`;
30
29
  }
31
30
  export {
@@ -1,6 +1,7 @@
1
- function e(n) {
2
- window.open(n, "_blank", "noopener,noreferrer");
1
+ function i(o, n = "_blank", w) {
2
+ const e = n === "_blank" ? window.open(o, n, "noreferrer,noopener") : window.open(o, n, w);
3
+ e && e.focus();
3
4
  }
4
5
  export {
5
- e as openInNewWindow
6
+ i as openInNewWindow
6
7
  };
@@ -0,0 +1,7 @@
1
+ const O = {
2
+ MODAL: "z-[50]",
3
+ TOOLTIP: "z-[9999]"
4
+ };
5
+ export {
6
+ O as Z_INDEX
7
+ };