@gearbox-protocol/permissionless-ui 1.15.3 → 1.15.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/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/buttons/copy-button/copy-button.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/layout/app-logo/app-logo.cjs +1 -1
- package/dist/cjs/components/liquidation/liquidation-assets-table/liquidation-assets-table.cjs +1 -1
- package/dist/cjs/components/liquidation/liquidation-graph/liquidation-graph.cjs +1 -1
- package/dist/cjs/components/next/index.cjs +1 -1
- package/dist/cjs/components/next/token-icon.cjs +1 -1
- package/dist/cjs/components/page-title/page-title.cjs +1 -1
- package/dist/cjs/components/select/select.cjs +1 -1
- package/dist/cjs/components/tab-control/tab-control.cjs +1 -1
- package/dist/cjs/components/table/grid-error-line.cjs +1 -1
- package/dist/cjs/components/token-icon/index.cjs +1 -1
- package/dist/cjs/components/token-icon/token-icon.cjs +1 -10
- package/dist/cjs/components/typed-intl/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-number.cjs +1 -1
- package/dist/esm/components/block-sync/block-sync.js +61 -54
- package/dist/esm/components/buttons/copy-button/copy-button.js +60 -27
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +60 -37
- package/dist/esm/components/graph/graph.js +260 -301
- package/dist/esm/components/index.js +55 -54
- package/dist/esm/components/layout/app-logo/app-logo.js +4 -4
- package/dist/esm/components/layout/legal-disclaimer/legal-disclaimer.js +4 -1
- package/dist/esm/components/liquidation/liquidation-assets-table/liquidation-assets-table.js +24 -18
- package/dist/esm/components/liquidation/liquidation-graph/liquidation-graph.js +114 -100
- package/dist/esm/components/next/index.js +10 -8
- package/dist/esm/components/next/token-icon.js +4 -5
- package/dist/esm/components/page-title/page-title.js +1 -1
- package/dist/esm/components/select/select.js +7 -7
- package/dist/esm/components/tab-control/tab-control.js +24 -24
- package/dist/esm/components/table/grid-error-line.js +1 -1
- package/dist/esm/components/token-icon/index.js +3 -2
- package/dist/esm/components/token-icon/token-icon.js +42 -75
- package/dist/esm/components/typed-intl/index.js +13 -11
- package/dist/esm/components/with-copy/with-copy.js +52 -29
- package/dist/esm/index.js +169 -168
- package/dist/esm/utils/format-number.js +24 -21
- package/dist/globals.css +1 -1
- package/dist/types/components/buttons/copy-button/copy-button.d.ts +3 -2
- package/dist/types/components/detailed-page-title/detailed-page-title.d.ts +0 -1
- package/dist/types/components/layout/legal-disclaimer/legal-disclaimer.d.ts +1 -1
- package/dist/types/components/liquidation/liquidation-assets-table/liquidation-assets-table.d.ts +1 -1
- package/dist/types/components/next/index.d.ts +1 -0
- package/dist/types/components/next/token-icon.d.ts +2 -2
- package/dist/types/components/token-icon/index.d.ts +1 -1
- package/dist/types/components/token-icon/token-icon.d.ts +15 -3
- package/dist/types/components/typed-intl/index.d.ts +2 -1
- package/dist/types/components/with-copy/with-copy.d.ts +3 -3
- package/dist/types/utils/format-number.d.ts +0 -11
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { AssetsListCell as G } from "./assets-list-cell/assets-list-cell.js";
|
|
|
6
6
|
import { AssetsRatio as A } from "./assets-ratio/assets-ratio.js";
|
|
7
7
|
import { ConnectRequired as h } from "./auth/connect-required.js";
|
|
8
8
|
import { SignInRequired as w } from "./auth/signin-required.js";
|
|
9
|
-
import { SIWEClientProvider as
|
|
9
|
+
import { SIWEClientProvider as H } from "./auth/siwe-provider.js";
|
|
10
10
|
import { Avatar as E, AvatarFallback as v, AvatarImage as P } from "./avatar/avatar.js";
|
|
11
11
|
import { Badge as y, badgeVariants as O } from "./badge/badge.js";
|
|
12
12
|
import { BaseLink as _ } from "./base-link/base-link.js";
|
|
@@ -27,7 +27,7 @@ import { ExpandablCall as Lr } from "./cards/expandable-call/expandable-call.js"
|
|
|
27
27
|
import { ExpandableCard as Ir } from "./cards/expandable-card/expandable-card.js";
|
|
28
28
|
import { Checkbox as Fr } from "./checkbox/checkbox.js";
|
|
29
29
|
import { CheckboxItem as Br } from "./checkbox-item/checkbox-item.js";
|
|
30
|
-
import { ColoredText as
|
|
30
|
+
import { ColoredText as kr, coloredTextVariants as Hr } from "./colored-text/colored-text.js";
|
|
31
31
|
import { CompoundAPY as Er } from "./compound-apy/compound-apy.js";
|
|
32
32
|
import { CreditSessionStatus as Pr } from "./credit-session-status/credit-session-status.js";
|
|
33
33
|
import { Description as yr } from "./description/description.js";
|
|
@@ -50,7 +50,7 @@ import { DropdownMenuLabel as Go } from "./dropdown-menu/dropdown-menu-label.js"
|
|
|
50
50
|
import { DropdownMenuRadioItem as Ao } from "./dropdown-menu/dropdown-menu-radio-item.js";
|
|
51
51
|
import { DropdownMenuSeparator as ho } from "./dropdown-menu/dropdown-menu-separator.js";
|
|
52
52
|
import { DropdownMenuShortcut as wo } from "./dropdown-menu/dropdown-menu-shortcut.js";
|
|
53
|
-
import { DropdownMenuSubContent as
|
|
53
|
+
import { DropdownMenuSubContent as Ho } from "./dropdown-menu/dropdown-menu-sub-content.js";
|
|
54
54
|
import { DropdownMenuSubTrigger as Eo } from "./dropdown-menu/dropdown-menu-sub-trigger.js";
|
|
55
55
|
import { ErrorLineMessage as Po } from "./error-message/error-line-message.js";
|
|
56
56
|
import { ErrorMessage as yo } from "./error-message/error-message.js";
|
|
@@ -73,8 +73,8 @@ import { GeneralSelect as ce } from "./general-select/general-select.js";
|
|
|
73
73
|
import { DEFAULT_AREA_SERIES as be, DEFAULT_OPTIONS as Ce, DEFAULT_VERTICAL_LINE as Se, getDefaultOptions as De, getDefaultSeries as Ve, getDefaultVerticalLine as Le } from "./graph/default-config.js";
|
|
74
74
|
import { getXFormatter as Ie, getYFormatter as Ae } from "./graph/formatters.js";
|
|
75
75
|
import { DEFAULT_SERIES_COLORS as he, Graph as Be } from "./graph/graph.js";
|
|
76
|
-
import { GraphCurrentValue as
|
|
77
|
-
import { GraphTooltip as
|
|
76
|
+
import { GraphCurrentValue as ke } from "./graph/graph-current-value.js";
|
|
77
|
+
import { GraphTooltip as Me } from "./graph/graph-tooltip.js";
|
|
78
78
|
import { GraphView as ve, GraphViewWithData as Pe, graphViewVariants as Re, useGraphAside as ye } from "./graph/graph-view.js";
|
|
79
79
|
import { VertLine as Ne } from "./graph/plugins/vertical-line.js";
|
|
80
80
|
import { Guard as Ue } from "./guard/guard.js";
|
|
@@ -92,8 +92,8 @@ import { AppLogo as St } from "./layout/app-logo/app-logo.js";
|
|
|
92
92
|
import { Block as Vt } from "./layout/block/block.js";
|
|
93
93
|
import { Col as Gt } from "./layout/col/col.js";
|
|
94
94
|
import { Container as At } from "./layout/container/container.js";
|
|
95
|
-
import { Footer as ht, FooterLink as Bt, FooterLinkSection as wt, GearboxFooter as
|
|
96
|
-
import { Grid as
|
|
95
|
+
import { Footer as ht, FooterLink as Bt, FooterLinkSection as wt, GearboxFooter as kt } from "./layout/footer/footer.js";
|
|
96
|
+
import { Grid as Mt } from "./layout/grid/grid.js";
|
|
97
97
|
import { Header as vt, useMobileMenu as Pt } from "./layout/header/header.js";
|
|
98
98
|
import { Layout as yt } from "./layout/layout/layout.js";
|
|
99
99
|
import { LegalDisclaimer as Nt } from "./layout/legal-disclaimer/legal-disclaimer.js";
|
|
@@ -113,7 +113,7 @@ import { OptionsItem as Da, OptionsList as Va } from "./options-list/options-lis
|
|
|
113
113
|
import { PageTitle as Ga, pageTitleRootVariants as Ia, pageTitleVariants as Aa } from "./page-title/page-title.js";
|
|
114
114
|
import { PercentIndicator as ha } from "./percent-indicator/percent-indicator.js";
|
|
115
115
|
import { PointsIcon as wa } from "./points-icon/points-icon.js";
|
|
116
|
-
import { PoolPointsIndicator as
|
|
116
|
+
import { PoolPointsIndicator as Ha } from "./pool-points-indicator/pool-points-indicator.js";
|
|
117
117
|
import { Progress as Ea } from "./progress/progress.js";
|
|
118
118
|
import { ProgressCircle as Pa } from "./progress-circle/progress-circle.js";
|
|
119
119
|
import { RadioGroup as ya, RadioGroupItem as Oa, RadioOption as Na } from "./radio-group/radio-group.js";
|
|
@@ -131,7 +131,7 @@ import { SkeletonStack as Li } from "./skeleton/skeleton-stack.js";
|
|
|
131
131
|
import { Slider as Ii } from "./slider/slider.js";
|
|
132
132
|
import { SmartNumberInput as Fi } from "./smart-number-input/smart-number-input.js";
|
|
133
133
|
import { Spinner as Bi, SpinnerOverlay as wi } from "./spinner/spinner.js";
|
|
134
|
-
import { StatBadge as
|
|
134
|
+
import { StatBadge as Hi, StatBadgeGrid as Mi, statBadgeContentVariants as Ei, statBadgeGridVariants as vi, statBadgeTitleVariants as Pi, statBadgeVariants as Ri } from "./stat-badge/stat-badge.js";
|
|
135
135
|
import { StatusDot as Oi, statusDotVariants as Ni } from "./status-dot/status-dot.js";
|
|
136
136
|
import { StatusTriangle as Ui } from "./status-triangle/status-triangle.js";
|
|
137
137
|
import { Stepper as Wi } from "./stepper/stepper.js";
|
|
@@ -145,7 +145,7 @@ import { GridLoadingLine as dp } from "./table/grid-loading-line.js";
|
|
|
145
145
|
import { GridTable as gp, GridTableBody as Tp, GridTableCaption as cp, GridTableCell as up, GridTableFooter as bp, GridTableHead as Cp, GridTableHeader as Sp, GridTableRow as Dp, Td as Vp, Th as Lp, gridTableCellVariants as Gp, gridTableHeadVariants as Ip, gridTableVariants as Ap } from "./table/grid-table.js";
|
|
146
146
|
import { GridTableLoader as hp } from "./table/grid-table-loader.js";
|
|
147
147
|
import { SortableHeadCell as wp } from "./table/sortable-head-cell.js";
|
|
148
|
-
import { SortingTableHead as
|
|
148
|
+
import { SortingTableHead as Hp, Table as Mp, TableBody as Ep, TableCaption as vp, TableCell as Pp, TableFooter as Rp, TableHead as yp, TableHeader as Op, TableRow as Np, tableCellVariants as _p, tableHeadVariants as Up, tableVariants as qp } from "./table/table.js";
|
|
149
149
|
import { TableLoader as Yp } from "./table/table-loader.js";
|
|
150
150
|
import { TableLoaderGuard as zp } from "./table/table-loader-guard.js";
|
|
151
151
|
import { TableCellSm as jp, TableLineSm as Jp } from "./table/table-sm.js";
|
|
@@ -155,19 +155,19 @@ import { Textarea as pn, textareaVariants as nn } from "./textarea/textarea.js";
|
|
|
155
155
|
import { ThemeProvider as mn, useTheme as xn } from "./theme-provider.js";
|
|
156
156
|
import { ThemeToggle as dn } from "./theme-toggle/theme-toggle.js";
|
|
157
157
|
import { TipCard as gn, tipCardVariants as Tn } from "./tip-card/tip-card.js";
|
|
158
|
-
import { TokenIcon as un } from "./token-icon/token-icon.js";
|
|
159
|
-
import { TokenSymbol as
|
|
160
|
-
import { TokenTemplate as
|
|
161
|
-
import { Tooltip as
|
|
162
|
-
import { GraphDropdown as
|
|
163
|
-
import { TradingView as
|
|
164
|
-
import { FormattedMessageTyped as Mn, useIntlTyped as
|
|
165
|
-
import { Typography as
|
|
166
|
-
import { VerticalIndicator as
|
|
167
|
-
import { VerticalList as
|
|
168
|
-
import { VSpace as
|
|
169
|
-
import { WithCopy as
|
|
170
|
-
import { WithFilterButton as
|
|
158
|
+
import { TokenIcon as un, preloadTokenIcons as bn } from "./token-icon/token-icon.js";
|
|
159
|
+
import { TokenSymbol as Sn } from "./token-symbol/token-symbol.js";
|
|
160
|
+
import { TokenTemplate as Vn } from "./token-template/token-template.js";
|
|
161
|
+
import { Tooltip as Gn, TooltipContent as In, TooltipProvider as An, TooltipTrigger as Fn } from "./tooltip/tooltip.js";
|
|
162
|
+
import { GraphDropdown as Bn } from "./trading-view/graph-dropdown.js";
|
|
163
|
+
import { TradingView as kn } from "./trading-view/trading-view.js";
|
|
164
|
+
import { FormattedMessageTyped as Mn, useIntlTyped as En } from "./typed-intl/index.js";
|
|
165
|
+
import { Typography as Pn, typographyVariants as Rn } from "./typography/typography.js";
|
|
166
|
+
import { VerticalIndicator as On, verticalIndicatorVariants as Nn } from "./vertical-indicator/vertical-indicator.js";
|
|
167
|
+
import { VerticalList as Un, verticalListVariants as qn } from "./vertical-list/vertical-list.js";
|
|
168
|
+
import { VSpace as Yn } from "./vspace/vspace.js";
|
|
169
|
+
import { WithCopy as zn } from "./with-copy/with-copy.js";
|
|
170
|
+
import { WithFilterButton as jn } from "./with-filter-button/with-filter-button.js";
|
|
171
171
|
export {
|
|
172
172
|
e as Accordion,
|
|
173
173
|
t as AccordionContent,
|
|
@@ -211,7 +211,7 @@ export {
|
|
|
211
211
|
Fr as Checkbox,
|
|
212
212
|
Br as CheckboxItem,
|
|
213
213
|
Gt as Col,
|
|
214
|
-
|
|
214
|
+
kr as ColoredText,
|
|
215
215
|
Er as CompoundAPY,
|
|
216
216
|
gi as ConfirmationItem,
|
|
217
217
|
h as ConnectRequired,
|
|
@@ -248,7 +248,7 @@ export {
|
|
|
248
248
|
ho as DropdownMenuSeparator,
|
|
249
249
|
wo as DropdownMenuShortcut,
|
|
250
250
|
To as DropdownMenuSub,
|
|
251
|
-
|
|
251
|
+
Ho as DropdownMenuSubContent,
|
|
252
252
|
Eo as DropdownMenuSubTrigger,
|
|
253
253
|
co as DropdownMenuTrigger,
|
|
254
254
|
rp as EditButton,
|
|
@@ -277,15 +277,15 @@ export {
|
|
|
277
277
|
ge as FormField,
|
|
278
278
|
Mn as FormattedMessageTyped,
|
|
279
279
|
Xe as GOOD_HF,
|
|
280
|
-
|
|
280
|
+
kt as GearboxFooter,
|
|
281
281
|
ce as GeneralSelect,
|
|
282
282
|
Be as Graph,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
ke as GraphCurrentValue,
|
|
284
|
+
Bn as GraphDropdown,
|
|
285
|
+
Me as GraphTooltip,
|
|
286
286
|
ve as GraphView,
|
|
287
287
|
Pe as GraphViewWithData,
|
|
288
|
-
|
|
288
|
+
Mt as Grid,
|
|
289
289
|
xp as GridErrorLine,
|
|
290
290
|
dp as GridLoadingLine,
|
|
291
291
|
gp as GridTable,
|
|
@@ -336,14 +336,14 @@ export {
|
|
|
336
336
|
Ga as PageTitle,
|
|
337
337
|
ha as PercentIndicator,
|
|
338
338
|
wa as PointsIcon,
|
|
339
|
-
|
|
339
|
+
Ha as PoolPointsIndicator,
|
|
340
340
|
Ea as Progress,
|
|
341
341
|
Pa as ProgressCircle,
|
|
342
342
|
ya as RadioGroup,
|
|
343
343
|
Oa as RadioGroupItem,
|
|
344
344
|
Na as RadioOption,
|
|
345
345
|
nr as RangeButtons,
|
|
346
|
-
|
|
346
|
+
H as SIWEClientProvider,
|
|
347
347
|
Ua as SearchBar,
|
|
348
348
|
Wa as SearchLine,
|
|
349
349
|
ja as SegmentedControl,
|
|
@@ -367,11 +367,11 @@ export {
|
|
|
367
367
|
Ii as Slider,
|
|
368
368
|
Fi as SmartNumberInput,
|
|
369
369
|
wp as SortableHeadCell,
|
|
370
|
-
|
|
370
|
+
Hp as SortingTableHead,
|
|
371
371
|
Bi as Spinner,
|
|
372
372
|
wi as SpinnerOverlay,
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
Hi as StatBadge,
|
|
374
|
+
Mi as StatBadgeGrid,
|
|
375
375
|
Oi as StatusDot,
|
|
376
376
|
Ui as StatusTriangle,
|
|
377
377
|
Wi as Stepper,
|
|
@@ -379,7 +379,7 @@ export {
|
|
|
379
379
|
mr as TabButton,
|
|
380
380
|
Xi as TabControl,
|
|
381
381
|
ji as TabItem,
|
|
382
|
-
|
|
382
|
+
Mp as Table,
|
|
383
383
|
Ep as TableBody,
|
|
384
384
|
vp as TableCaption,
|
|
385
385
|
Pp as TableCell,
|
|
@@ -406,29 +406,29 @@ export {
|
|
|
406
406
|
gn as TipCard,
|
|
407
407
|
et as TipWrap,
|
|
408
408
|
un as TokenIcon,
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
409
|
+
Sn as TokenSymbol,
|
|
410
|
+
Vn as TokenTemplate,
|
|
411
|
+
Gn as Tooltip,
|
|
412
|
+
In as TooltipContent,
|
|
413
|
+
An as TooltipProvider,
|
|
414
|
+
Fn as TooltipTrigger,
|
|
415
|
+
kn as TradingView,
|
|
416
|
+
Pn as Typography,
|
|
417
417
|
Qp as UpdatedValue,
|
|
418
|
-
|
|
418
|
+
Yn as VSpace,
|
|
419
419
|
Ne as VertLine,
|
|
420
|
-
|
|
421
|
-
|
|
420
|
+
On as VerticalIndicator,
|
|
421
|
+
Un as VerticalList,
|
|
422
422
|
bi as VerticalTimeline,
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
zn as WithCopy,
|
|
424
|
+
jn as WithFilterButton,
|
|
425
425
|
Ya as WithSearchLine,
|
|
426
426
|
l as alertBadgeVariants,
|
|
427
427
|
X as backButtonVariants,
|
|
428
428
|
O as badgeVariants,
|
|
429
429
|
K as buttonVariants,
|
|
430
430
|
dr as cardGridVariants,
|
|
431
|
-
|
|
431
|
+
Hr as coloredTextVariants,
|
|
432
432
|
Zt as createGearboxAppConfig,
|
|
433
433
|
zt as createLegalAgreementConfig,
|
|
434
434
|
Xt as createPermissionlessInterfaceConfig,
|
|
@@ -451,6 +451,7 @@ export {
|
|
|
451
451
|
ua as navitemVariants,
|
|
452
452
|
Ia as pageTitleRootVariants,
|
|
453
453
|
Aa as pageTitleVariants,
|
|
454
|
+
bn as preloadTokenIcons,
|
|
454
455
|
Za as searchLineInputVariants,
|
|
455
456
|
za as searchLineVariants,
|
|
456
457
|
Ja as segmentedControlVariants,
|
|
@@ -466,15 +467,15 @@ export {
|
|
|
466
467
|
qp as tableVariants,
|
|
467
468
|
nn as textareaVariants,
|
|
468
469
|
Tn as tipCardVariants,
|
|
469
|
-
|
|
470
|
+
Rn as typographyVariants,
|
|
470
471
|
ye as useGraphAside,
|
|
471
472
|
Ji as useHashTabs,
|
|
472
|
-
|
|
473
|
+
En as useIntlTyped,
|
|
473
474
|
Pt as useMobileMenu,
|
|
474
475
|
ga as useNavbarIndicator,
|
|
475
476
|
Ki as useSectionTab,
|
|
476
477
|
Qi as useTabControl,
|
|
477
478
|
xn as useTheme,
|
|
478
|
-
|
|
479
|
-
|
|
479
|
+
Nn as verticalIndicatorVariants,
|
|
480
|
+
qn as verticalListVariants
|
|
480
481
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Image as r } from "../../image/image.js";
|
|
3
3
|
import { cn as o } from "../../../utils/cn.js";
|
|
4
|
-
function
|
|
4
|
+
function d({
|
|
5
5
|
appName: a,
|
|
6
6
|
size: t = "default"
|
|
7
7
|
}) {
|
|
@@ -22,16 +22,16 @@ function x({
|
|
|
22
22
|
height: t === "default" ? 24 : 20,
|
|
23
23
|
loading: "eager",
|
|
24
24
|
className: o(
|
|
25
|
-
"h-auto",
|
|
25
|
+
"h-auto flex-shrink-0",
|
|
26
26
|
t === "default" ? "w-20 sm:w-24 md:w-[120px]" : "w-16 sm:w-20 md:w-[100px]"
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground
|
|
30
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground whitespace-nowrap", children: a })
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
d as AppLogo
|
|
37
37
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { BaseLink as i } from "../../base-link/base-link.js";
|
|
3
|
-
function c({
|
|
3
|
+
function c({
|
|
4
|
+
hrefs: e,
|
|
5
|
+
appName: t = "Permissionless Interface"
|
|
6
|
+
}) {
|
|
4
7
|
return /* @__PURE__ */ o("p", { className: "text-sm text-muted-foreground max-w-md", children: [
|
|
5
8
|
"Any use of and/or interaction with the ",
|
|
6
9
|
t,
|
package/dist/esm/components/liquidation/liquidation-assets-table/liquidation-assets-table.js
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { AssetUtils as h, PRICE_DECIMALS as b } from "@gearbox-protocol/sdk";
|
|
3
3
|
import { useMemo as N } from "react";
|
|
4
4
|
import { TokenSymbol as v } from "../../token-symbol/token-symbol.js";
|
|
5
5
|
import { FormattedMessageTyped as s } from "../../typed-intl/index.js";
|
|
6
|
-
import { useIsMobile as
|
|
7
|
-
import { cn as
|
|
8
|
-
function
|
|
6
|
+
import { useIsMobile as L } from "../../../hooks/use-media-query.js";
|
|
7
|
+
import { cn as n } from "../../../utils/cn.js";
|
|
8
|
+
function q({
|
|
9
9
|
tokensList: a,
|
|
10
|
-
graphParams:
|
|
11
|
-
data:
|
|
10
|
+
graphParams: l,
|
|
11
|
+
data: i,
|
|
12
12
|
prices: m,
|
|
13
13
|
editedPrices: f
|
|
14
14
|
}) {
|
|
15
|
-
const { fixedBalances:
|
|
16
|
-
return /* @__PURE__ */
|
|
15
|
+
const { fixedBalances: o } = l, c = N(() => h.constructAssetRecord(o), [o]), u = L();
|
|
16
|
+
return !i || !i.length ? /* @__PURE__ */ e("div", { className: "w-full flex items-center justify-center py-8 text-sm text-muted-foreground", children: /* @__PURE__ */ e(
|
|
17
|
+
s,
|
|
18
|
+
{
|
|
19
|
+
messageId: "components.creditSessionDetailedLiquidation.table.noData",
|
|
20
|
+
defaultMessage: "No data"
|
|
21
|
+
}
|
|
22
|
+
) }) : /* @__PURE__ */ r("div", { className: "w-full", children: [
|
|
17
23
|
/* @__PURE__ */ r(
|
|
18
24
|
"div",
|
|
19
25
|
{
|
|
20
|
-
className:
|
|
26
|
+
className: n(
|
|
21
27
|
"grid w-full px-3 sm:px-4 gap-1 sm:gap-2 items-center",
|
|
22
28
|
"h-7 sm:h-8 md:h-[30px]",
|
|
23
29
|
"relative after:absolute after:bottom-0 after:left-2 sm:after:left-3 after:right-2 sm:after:right-3 after:h-px after:border-b after:border-border"
|
|
@@ -30,15 +36,15 @@ function D({
|
|
|
30
36
|
]
|
|
31
37
|
}
|
|
32
38
|
),
|
|
33
|
-
|
|
34
|
-
const
|
|
39
|
+
i.map((t, x, g) => {
|
|
40
|
+
const p = g.length - 1 === x;
|
|
35
41
|
return /* @__PURE__ */ r(
|
|
36
42
|
"div",
|
|
37
43
|
{
|
|
38
|
-
className:
|
|
44
|
+
className: n(
|
|
39
45
|
"grid w-full px-3 sm:px-4 gap-1 sm:gap-2 items-center relative",
|
|
40
46
|
"h-12 sm:h-14 md:h-[51px]",
|
|
41
|
-
!
|
|
47
|
+
!p && "after:absolute after:bottom-0 after:left-2 sm:after:left-3 after:right-2 sm:after:right-3 after:h-px after:border-b after:border-border"
|
|
42
48
|
),
|
|
43
49
|
style: {
|
|
44
50
|
gridTemplateColumns: "1fr 1fr 1fr"
|
|
@@ -47,7 +53,7 @@ function D({
|
|
|
47
53
|
/* @__PURE__ */ e("div", { className: "text-left min-w-0", children: /* @__PURE__ */ e(
|
|
48
54
|
v,
|
|
49
55
|
{
|
|
50
|
-
size:
|
|
56
|
+
size: u ? 18 : 24,
|
|
51
57
|
token: a[t.token],
|
|
52
58
|
showSymbol: !0,
|
|
53
59
|
maxLength: 6,
|
|
@@ -56,11 +62,11 @@ function D({
|
|
|
56
62
|
) }),
|
|
57
63
|
/* @__PURE__ */ r("div", { className: "text-right text-xs sm:text-sm md:text-base truncate", children: [
|
|
58
64
|
"$",
|
|
59
|
-
|
|
65
|
+
d(m[t.token])
|
|
60
66
|
] }),
|
|
61
67
|
/* @__PURE__ */ e("div", { className: "text-right min-w-0", children: c[t.token] ? /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: /* @__PURE__ */ e(s, { messageId: "components.creditSessionDetailedLiquidation.table.seeGraph" }) }) : /* @__PURE__ */ r("span", { className: "text-xs sm:text-sm md:text-base text-muted-foreground truncate", children: [
|
|
62
68
|
"$",
|
|
63
|
-
|
|
69
|
+
d(f[t.token] || m[t.token])
|
|
64
70
|
] }) })
|
|
65
71
|
]
|
|
66
72
|
},
|
|
@@ -69,9 +75,9 @@ function D({
|
|
|
69
75
|
})
|
|
70
76
|
] });
|
|
71
77
|
}
|
|
72
|
-
function
|
|
78
|
+
function d(a) {
|
|
73
79
|
return (Number(a || 0n) / Number(b)).toFixed(2);
|
|
74
80
|
}
|
|
75
81
|
export {
|
|
76
|
-
|
|
82
|
+
q as LiquidationModellingAssetsTable
|
|
77
83
|
};
|