@gearbox-protocol/ui-kit 4.0.0-next.3 → 4.0.0-next.4
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.
- package/dist/cjs/components/base/borrow-rate-block/borrow-rate-block.cjs +1 -1
- package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/base/health-factor-block/health-factor-block.cjs +1 -1
- package/dist/cjs/components/base/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
- package/dist/cjs/components/base/liquidation-price-block/liquidation-price-block.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/constants.cjs +1 -1
- package/dist/cjs/components/base/manage-pane/manage-pane.cjs +1 -1
- package/dist/cjs/components/base/page-title/index.cjs +1 -1
- package/dist/cjs/components/base/page-title/page-title.cjs +1 -1
- package/dist/cjs/components/base/stat-badge/stat-badge.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/time-to-liquidation-block/time-to-liquidation-block.cjs +1 -1
- package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
- package/dist/cjs/components/base/values/constants.cjs +1 -1
- package/dist/cjs/components/base/values/index.cjs +1 -1
- package/dist/cjs/components/base/values/points-value.cjs +1 -0
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
- package/dist/cjs/components/graph/graph-view.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/utils/format-leverage.cjs +1 -0
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +3 -2
- package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +26 -27
- package/dist/esm/components/base/health-factor-block/health-factor-block.js +25 -25
- package/dist/esm/components/base/index.js +139 -135
- package/dist/esm/components/base/info-list/index.js +5 -4
- package/dist/esm/components/base/info-list/info-list.js +52 -27
- package/dist/esm/components/base/leverage-input/leverage-input.js +17 -19
- package/dist/esm/components/base/liquidation-price-block/liquidation-price-block.js +33 -28
- package/dist/esm/components/base/manage-pane/constants.js +3 -2
- package/dist/esm/components/base/manage-pane/manage-pane.js +154 -113
- package/dist/esm/components/base/page-title/index.js +5 -4
- package/dist/esm/components/base/page-title/page-title.js +31 -23
- package/dist/esm/components/base/stat-badge/stat-badge.js +18 -9
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +3 -2
- package/dist/esm/components/base/time-to-liquidation-block/time-to-liquidation-block.js +31 -31
- package/dist/esm/components/base/token-amount/token-amount.js +17 -16
- package/dist/esm/components/base/values/constants.js +1 -0
- package/dist/esm/components/base/values/index.js +16 -14
- package/dist/esm/components/base/values/points-value.js +30 -0
- package/dist/esm/components/base/values/scalars.js +18 -17
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +17 -16
- package/dist/esm/components/checkbox/checkbox-labeled.js +15 -14
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +15 -14
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +9 -8
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +24 -23
- package/dist/esm/components/graph/graph-view.js +78 -95
- package/dist/esm/components/index.js +664 -660
- package/dist/esm/components/with-copy/with-copy.js +17 -16
- package/dist/esm/index.js +841 -835
- package/dist/esm/utils/format-leverage.js +6 -0
- package/dist/esm/utils/index.js +80 -78
- package/dist/globals.css +1 -1
- package/dist/types/components/base/detailed-page-title/detailed-page-title.d.ts +1 -3
- package/dist/types/components/base/health-factor-block/health-factor-block.d.ts +6 -6
- package/dist/types/components/base/info-list/info-list.d.ts +7 -0
- package/dist/types/components/base/liquidation-price-block/liquidation-price-block.d.ts +6 -4
- package/dist/types/components/base/manage-pane/constants.d.ts +1 -0
- package/dist/types/components/base/manage-pane/manage-pane.d.ts +3 -1
- package/dist/types/components/base/page-title/page-title.d.ts +12 -6
- package/dist/types/components/base/time-to-liquidation-block/time-to-liquidation-block.d.ts +5 -6
- package/dist/types/components/base/token-amount/token-amount.d.ts +8 -2
- package/dist/types/components/base/values/constants.d.ts +1 -0
- package/dist/types/components/base/values/index.d.ts +1 -0
- package/dist/types/components/base/values/points-value.d.ts +11 -0
- package/dist/types/components/base/values/position-short-label.d.ts +1 -1
- package/dist/types/utils/format-leverage.d.ts +5 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,107 +1,109 @@
|
|
|
1
1
|
import { generateId as r, useFormFieldIds as t } from "./a11y.js";
|
|
2
2
|
import { pointProgramsOf as m, positiveTokenRewardsOf as n, tokenRewardsOf as i, totalApyOf as p } from "./apy-breakdown.js";
|
|
3
3
|
import { bnToInputView as l } from "./bn-to-input-view.js";
|
|
4
|
-
import { bnToPrettyView as
|
|
4
|
+
import { bnToPrettyView as x } from "./bn-to-pretty-view.js";
|
|
5
5
|
import { bpsToPercent as c } from "./bps.js";
|
|
6
6
|
import { cn as S, cn as d } from "./cn.js";
|
|
7
7
|
import { generateColorsFromBase as h, getCSSVariable as b, hexToRgba as A, hslToHex as I, resolveCSSColor as N } from "./colors.js";
|
|
8
|
-
import { copyToClipboard as
|
|
9
|
-
import { convertPercent as y, formatBytecodeSize as
|
|
8
|
+
import { copyToClipboard as v } from "./copy.js";
|
|
9
|
+
import { convertPercent as y, formatBytecodeSize as L, formatBytecodeVersion as w, formatTimestamp as C, shortenHash as F, significantTrunc as D } from "./format.js";
|
|
10
10
|
import { formatAssetAmount as V } from "./format-asset-amount.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
11
|
+
import { formatLeverage as M } from "./format-leverage.js";
|
|
12
|
+
import { formatMoney as _, formatMoneyAmount as E, formatPercentAmount as H, percentTemplate as W, percentageTemplate as Z } from "./format-money.js";
|
|
13
|
+
import { FORMAT_CONSTANTS as U, formatNumberWithSuffix as X, formatPrice as q, getAdaptiveDecimals as j, isBelowDisplayThreshold as G, isEffectivelyZero as J, toSignificantDigits as K } from "./format-number.js";
|
|
14
|
+
import { slippageTemplate as Y } from "./format-slippage.js";
|
|
15
|
+
import { allLoaded as ee, loadingProgress as oe, round5 as re } from "./loading.js";
|
|
16
|
+
import { decimalsToStep as ae, findClosestPoint as me, formatWithDecimals as ne, formatWithoutDecimals as ie, splitInterval as pe, validateMinMax as fe } from "./math.js";
|
|
17
|
+
import { getNetworkIcon as se } from "./network-icons.js";
|
|
18
|
+
import { bnToLiquidationPriceView as Te, isPositiveFloat as ce, parseInputToBN as ge, parseSmallNumber as Se } from "./parse-input-to-bn.js";
|
|
19
|
+
import { pluralize as ue, selectPluralString as he } from "./plural.js";
|
|
20
|
+
import { getAvailableRanges as Ae } from "./ranges.js";
|
|
21
|
+
import { extractTextFromLabel as Ne, serializeValue as ke } from "./react.js";
|
|
22
|
+
import { searchInString as Pe } from "./search.js";
|
|
23
|
+
import { createTokenSearchFilter as Le, searchInToken as we } from "./search-in-token.js";
|
|
24
|
+
import { shortSHA as Fe } from "./short-sha.js";
|
|
25
|
+
import { isLongString as Oe, shortenString as Ve } from "./shorten-string.js";
|
|
26
|
+
import { negativeTokenTemplate as Me, tokenTemplate as Re, tokenTemplateNumber as _e, tokenTemplateString as Ee } from "./templates.js";
|
|
27
|
+
import { getTokenIcon as We, parseShareTokenUnderlying as Ze } from "./token-icon-source.js";
|
|
28
|
+
import { TTL_CONSTANTS as Ue, getTTLZones as Xe, ttlFromTimestamp as qe, ttlLeft as je, ttlLeftHuman as Ge } from "./ttl.js";
|
|
29
|
+
import { openInNewWindow as Ke } from "./window.js";
|
|
30
|
+
import { Z_INDEX as Ye, Z_INDEX_VALUES as $e } from "./z-index.js";
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
U as FORMAT_CONSTANTS,
|
|
33
|
+
Ue as TTL_CONSTANTS,
|
|
34
|
+
Ye as Z_INDEX,
|
|
35
|
+
$e as Z_INDEX_VALUES,
|
|
36
|
+
ee as allLoaded,
|
|
36
37
|
l as bnToInputView,
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
Te as bnToLiquidationPriceView,
|
|
39
|
+
x as bnToPrettyView,
|
|
39
40
|
c as bpsToPercent,
|
|
40
41
|
S as cn,
|
|
41
42
|
y as convertPercent,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
v as copyToClipboard,
|
|
44
|
+
Le as createTokenSearchFilter,
|
|
45
|
+
ae as decimalsToStep,
|
|
45
46
|
d as default,
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
Ne as extractTextFromLabel,
|
|
48
|
+
me as findClosestPoint,
|
|
48
49
|
V as formatAssetAmount,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
M as
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
L as formatBytecodeSize,
|
|
51
|
+
w as formatBytecodeVersion,
|
|
52
|
+
M as formatLeverage,
|
|
53
|
+
_ as formatMoney,
|
|
54
|
+
E as formatMoneyAmount,
|
|
55
|
+
X as formatNumberWithSuffix,
|
|
56
|
+
H as formatPercentAmount,
|
|
57
|
+
q as formatPrice,
|
|
56
58
|
C as formatTimestamp,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
ne as formatWithDecimals,
|
|
60
|
+
ie as formatWithoutDecimals,
|
|
59
61
|
h as generateColorsFromBase,
|
|
60
62
|
r as generateId,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
j as getAdaptiveDecimals,
|
|
64
|
+
Ae as getAvailableRanges,
|
|
63
65
|
b as getCSSVariable,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
se as getNetworkIcon,
|
|
67
|
+
Xe as getTTLZones,
|
|
68
|
+
We as getTokenIcon,
|
|
67
69
|
A as hexToRgba,
|
|
68
70
|
I as hslToHex,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
G as isBelowDisplayThreshold,
|
|
72
|
+
J as isEffectivelyZero,
|
|
73
|
+
Oe as isLongString,
|
|
74
|
+
ce as isPositiveFloat,
|
|
75
|
+
oe as loadingProgress,
|
|
76
|
+
Me as negativeTokenTemplate,
|
|
77
|
+
Ke as openInNewWindow,
|
|
78
|
+
ge as parseInputToBN,
|
|
79
|
+
Ze as parseShareTokenUnderlying,
|
|
80
|
+
Se as parseSmallNumber,
|
|
81
|
+
W as percentTemplate,
|
|
82
|
+
Z as percentageTemplate,
|
|
83
|
+
ue as pluralize,
|
|
82
84
|
m as pointProgramsOf,
|
|
83
85
|
n as positiveTokenRewardsOf,
|
|
84
86
|
N as resolveCSSColor,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
re as round5,
|
|
88
|
+
Pe as searchInString,
|
|
89
|
+
we as searchInToken,
|
|
90
|
+
he as selectPluralString,
|
|
91
|
+
ke as serializeValue,
|
|
92
|
+
Fe as shortSHA,
|
|
91
93
|
F as shortenHash,
|
|
92
|
-
|
|
94
|
+
Ve as shortenString,
|
|
93
95
|
D as significantTrunc,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
Y as slippageTemplate,
|
|
97
|
+
pe as splitInterval,
|
|
98
|
+
K as toSignificantDigits,
|
|
97
99
|
i as tokenRewardsOf,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
Re as tokenTemplate,
|
|
101
|
+
_e as tokenTemplateNumber,
|
|
102
|
+
Ee as tokenTemplateString,
|
|
101
103
|
p as totalApyOf,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
qe as ttlFromTimestamp,
|
|
105
|
+
je as ttlLeft,
|
|
106
|
+
Ge as ttlLeftHuman,
|
|
105
107
|
t as useFormFieldIds,
|
|
106
|
-
|
|
108
|
+
fe as validateMinMax
|
|
107
109
|
};
|