@gearbox-protocol/permissionless-ui 1.22.0-next.13 → 1.22.0-next.15

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 (30) hide show
  1. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  2. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  3. package/dist/cjs/components/short-string/short-string.cjs +1 -1
  4. package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
  5. package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
  6. package/dist/cjs/index.cjs +1 -1
  7. package/dist/cjs/utils/index.cjs +1 -1
  8. package/dist/cjs/utils/network-icons.cjs +1 -1
  9. package/dist/cjs/utils/shorten-string.cjs +1 -1
  10. package/dist/cjs/utils/z-index.cjs +1 -0
  11. package/dist/esm/components/buttons/button/button.js +2 -0
  12. package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
  13. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
  14. package/dist/esm/components/short-string/short-string.js +19 -23
  15. package/dist/esm/components/token-icon/token-icon.js +23 -22
  16. package/dist/esm/components/token-symbol/token-symbol.js +98 -40
  17. package/dist/esm/index.js +208 -208
  18. package/dist/esm/utils/index.js +68 -68
  19. package/dist/esm/utils/network-icons.js +4 -53
  20. package/dist/esm/utils/shorten-string.js +7 -3
  21. package/dist/esm/utils/z-index.js +7 -0
  22. package/dist/globals.css +1 -1
  23. package/dist/types/components/short-string/short-string.d.ts +4 -4
  24. package/dist/types/components/token-icon/token-icon.d.ts +1 -1
  25. package/dist/types/components/token-symbol/token-symbol.d.ts +9 -4
  26. package/dist/types/utils/index.d.ts +1 -0
  27. package/dist/types/utils/network-icons.d.ts +3 -32
  28. package/dist/types/utils/shorten-string.d.ts +2 -1
  29. package/dist/types/utils/z-index.d.ts +8 -0
  30. package/package.json +1 -1
@@ -1,83 +1,83 @@
1
- import { generateId as t, 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 } from "./format-money.js";
10
- import { FORMAT_CONSTANTS as V, formatNumberWithSuffix as D, formatPrice as O, getAdaptiveDecimals as _, isBelowDisplayThreshold as z, isEffectivelyZero as G, toSignificantDigits as H } from "./format-number.js";
11
- import { slippageTemplate as Z } from "./format-slippage.js";
12
- import { getAllNetworks as q, getNetworkByChainId as J, getNetworkConfig as K, getNetworkIcon as Q } from "./network-icons.js";
13
- import { parseInputToBN as X } from "./parse-input-to-bn.js";
14
- import { pluralize as $, selectPluralString as ee } from "./plural.js";
15
- import { getAvailableRanges as te } from "./ranges.js";
16
- import { extractTextFromLabel as ae, serializeValue as me } from "./react.js";
17
- import { searchInString as pe } from "./search.js";
18
- import { createTokenSearchFilter as ie, searchInToken as le } from "./search-in-token.js";
19
- import { shortSHA as Te } from "./short-sha.js";
20
- import { shortenString as ce } from "./shorten-string.js";
21
- import { negativeTokenTemplate as Se, tokenTemplate as Ae, tokenTemplateNumber as ue, tokenTemplateString as Ne } from "./templates.js";
22
- import { TTL_CONSTANTS as he, getTTLZone as Ce, ttlFromTimestamp as Ie, ttlLeft as ke, ttlLeftParsed as ye } from "./ttl.js";
23
- import { openInNewWindow as we } 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";
24
25
  export {
25
- V as FORMAT_CONSTANTS,
26
- P as PERCENTAGE_FACTOR,
27
- F as SLIPPAGE_DECIMALS,
28
- he as TTL_CONSTANTS,
29
- m as bnToInputView,
26
+ R as FORMAT_CONSTANTS,
27
+ L as PERCENTAGE_FACTOR,
28
+ k as SLIPPAGE_DECIMALS,
29
+ de as TTL_CONSTANTS,
30
+ Fe as Z_INDEX,
31
+ a as bnToInputView,
30
32
  p as bnToPrettyView,
31
33
  i as cn,
32
- N as convertPercent,
33
- A as copyToClipboard,
34
- ie as createTokenSearchFilter,
34
+ d as convertPercent,
35
+ u as copyToClipboard,
36
+ ne as createTokenSearchFilter,
35
37
  l as default,
36
- ae as extractTextFromLabel,
37
- b as formatAssetAmount,
38
- d as formatBytecodeSize,
39
- h as formatBytecodeVersion,
40
- L as formatMoney,
38
+ oe as extractTextFromLabel,
39
+ P as formatAssetAmount,
40
+ h as formatBytecodeSize,
41
+ I as formatBytecodeVersion,
42
+ E as formatMoney,
41
43
  v as formatMoneyAmount,
42
- D as formatNumberWithSuffix,
43
- B as formatPercentAmount,
44
- O as formatPrice,
45
- C as formatTimestamp,
44
+ V as formatNumberWithSuffix,
45
+ w as formatPercentAmount,
46
+ _ as formatPrice,
47
+ N as formatTimestamp,
46
48
  T as generateColorsFromBase,
47
- t as generateId,
48
- _ as getAdaptiveDecimals,
49
- q as getAllNetworks,
50
- te as getAvailableRanges,
49
+ r as generateId,
50
+ O as getAdaptiveDecimals,
51
+ $ as getAvailableRanges,
51
52
  x as getCSSVariable,
52
- J as getNetworkByChainId,
53
- K as getNetworkConfig,
54
- Q as getNetworkIcon,
55
- Ce as getTTLZone,
53
+ j as getNetworkIcon,
54
+ he as getTTLZone,
56
55
  c as hexToRgba,
57
56
  z as isBelowDisplayThreshold,
58
- G as isEffectivelyZero,
59
- Se as negativeTokenTemplate,
60
- we as openInNewWindow,
61
- X as parseInputToBN,
62
- E as percentTemplate,
63
- M as percentageTemplate,
64
- $ as pluralize,
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,
65
65
  g as resolveCSSColor,
66
- pe as searchInString,
67
- le as searchInToken,
68
- ee as selectPluralString,
69
- me as serializeValue,
70
- Te as shortSHA,
71
- I as shortenHash,
72
- ce as shortenString,
73
- k as significantTrunc,
74
- Z as slippageTemplate,
75
- H as toSignificantDigits,
76
- Ae as tokenTemplate,
77
- ue as tokenTemplateNumber,
78
- Ne as tokenTemplateString,
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,
78
+ ue as tokenTemplateString,
79
79
  Ie as ttlFromTimestamp,
80
- ke as ttlLeft,
81
- ye as ttlLeftParsed,
82
- r as useFormFieldIds
80
+ Ne as ttlLeft,
81
+ Ce as ttlLeftParsed,
82
+ t as useFormFieldIds
83
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,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,7 @@
1
+ const O = {
2
+ MODAL: "z-[1300]",
3
+ TOOLTIP: "z-[9999]"
4
+ };
5
+ export {
6
+ O as Z_INDEX
7
+ };