@gearbox-protocol/ui-kit 4.0.0-next.51 → 4.0.0-next.53
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/copy-button.cjs +1 -0
- package/dist/cjs/components/base/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/base/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/manage-pane/manage-pane.cjs +1 -1
- package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/position-assets/position-assets.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/tabber/tabber.cjs +1 -1
- package/dist/cjs/components/base/token-amount/token-amount.cjs +1 -1
- package/dist/cjs/components/base/values/index.cjs +1 -1
- package/dist/cjs/components/base-table/base-table-line.cjs +1 -1
- package/dist/cjs/components/base-table/base-table.cjs +1 -1
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/index.cjs +1 -1
- package/dist/cjs/components/graph/formatters.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/loading/loading.cjs +1 -1
- package/dist/cjs/components/sdk-status-pill/sdk-status-pill.cjs +1 -1
- package/dist/cjs/components/table/index.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/base/borrow-rate-block/borrow-rate-block.js +2 -3
- package/dist/esm/components/{detailed-page-title/detailed-page-title-copy-button.js → base/detailed-page-title/copy-button.js} +8 -8
- package/dist/esm/components/base/detailed-page-title/detailed-page-title.js +6 -6
- package/dist/esm/components/base/index.js +144 -153
- package/dist/esm/components/base/info-list/info-list.js +47 -24
- package/dist/esm/components/base/leverage-input/leverage-input.js +65 -47
- package/dist/esm/components/base/manage-pane/manage-pane.js +83 -73
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +1 -1
- package/dist/esm/components/base/position-assets/position-assets.js +2 -3
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +1 -1
- package/dist/esm/components/base/tabber/tabber.js +51 -39
- package/dist/esm/components/base/token-amount/token-amount.js +1 -1
- package/dist/esm/components/base/values/index.js +17 -19
- package/dist/esm/components/base-table/base-table-line.js +1 -1
- package/dist/esm/components/base-table/base-table.js +60 -55
- package/dist/esm/components/checkbox/checkbox-labeled.js +17 -20
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +2 -3
- package/dist/esm/components/compound-apy/compound-apy.js +2 -3
- package/dist/esm/components/detailed-page-title/index.js +2 -4
- package/dist/esm/components/graph/formatters.js +39 -39
- package/dist/esm/components/index.js +581 -603
- package/dist/esm/components/loading/loading.js +22 -15
- package/dist/esm/components/sdk-status-pill/sdk-status-pill.js +19 -14
- package/dist/esm/components/table/index.js +16 -20
- package/dist/esm/components/with-copy/with-copy.js +19 -22
- package/dist/esm/index.js +712 -734
- package/dist/globals.css +1 -1
- package/dist/types/components/base/index.d.ts +0 -2
- package/dist/types/components/base/leverage-input/leverage-input.d.ts +2 -2
- package/dist/types/components/base/values/index.d.ts +0 -1
- package/dist/types/components/detailed-page-title/index.d.ts +0 -1
- package/dist/types/components/index.d.ts +0 -3
- package/dist/types/components/spinner-loader/spinner-loader.d.ts +1 -1
- package/dist/types/components/table/index.d.ts +0 -2
- package/dist/types/index.d.ts +0 -3
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/utils/ranges.spec.d.ts +0 -1
- package/package.json +1 -1
- package/dist/cjs/components/base/info-portal/index.cjs +0 -1
- package/dist/cjs/components/base/info-portal/info-portal.cjs +0 -1
- package/dist/cjs/components/base/sticky-bar/constants.cjs +0 -1
- package/dist/cjs/components/base/sticky-bar/index.cjs +0 -1
- package/dist/cjs/components/base/sticky-bar/sticky-bar.cjs +0 -1
- package/dist/cjs/components/base/values/points-value.cjs +0 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title-copy-button.cjs +0 -1
- package/dist/cjs/components/loading-bar/index.cjs +0 -1
- package/dist/cjs/components/loading-bar/loading-bar.cjs +0 -1
- package/dist/cjs/components/status-dot/index.cjs +0 -1
- package/dist/cjs/components/status-dot/status-dot.cjs +0 -1
- package/dist/cjs/components/table/table-loader-guard.cjs +0 -1
- package/dist/cjs/components/table/table-loader.cjs +0 -1
- package/dist/cjs/components/with-title/index.cjs +0 -1
- package/dist/cjs/components/with-title/with-title.cjs +0 -1
- package/dist/cjs/types/filter.cjs +0 -1
- package/dist/esm/components/base/info-portal/index.js +0 -5
- package/dist/esm/components/base/info-portal/info-portal.js +0 -20
- package/dist/esm/components/base/sticky-bar/constants.js +0 -6
- package/dist/esm/components/base/sticky-bar/index.js +0 -6
- package/dist/esm/components/base/sticky-bar/sticky-bar.js +0 -28
- package/dist/esm/components/base/values/points-value.js +0 -30
- package/dist/esm/components/loading-bar/index.js +0 -4
- package/dist/esm/components/loading-bar/loading-bar.js +0 -27
- package/dist/esm/components/status-dot/index.js +0 -5
- package/dist/esm/components/status-dot/status-dot.js +0 -49
- package/dist/esm/components/table/table-loader-guard.js +0 -31
- package/dist/esm/components/table/table-loader.js +0 -25
- package/dist/esm/components/with-title/index.js +0 -4
- package/dist/esm/components/with-title/with-title.js +0 -43
- package/dist/esm/types/filter.js +0 -1
- package/dist/types/components/base/info-portal/index.d.ts +0 -1
- package/dist/types/components/base/info-portal/info-portal.d.ts +0 -8
- package/dist/types/components/base/sticky-bar/constants.d.ts +0 -3
- package/dist/types/components/base/sticky-bar/index.d.ts +0 -1
- package/dist/types/components/base/sticky-bar/sticky-bar.d.ts +0 -9
- package/dist/types/components/base/values/points-value.d.ts +0 -11
- package/dist/types/components/loading-bar/index.d.ts +0 -1
- package/dist/types/components/loading-bar/loading-bar.d.ts +0 -25
- package/dist/types/components/status-dot/index.d.ts +0 -1
- package/dist/types/components/status-dot/status-dot.d.ts +0 -47
- package/dist/types/components/table/table-loader-guard.d.ts +0 -45
- package/dist/types/components/table/table-loader.d.ts +0 -50
- package/dist/types/components/with-title/index.d.ts +0 -1
- package/dist/types/components/with-title/with-title.d.ts +0 -31
- package/dist/types/types/filter.d.ts +0 -8
- /package/dist/types/components/{detailed-page-title/detailed-page-title-copy-button.d.ts → base/detailed-page-title/copy-button.d.ts} +0 -0
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { Modal as c } from "../modal/modal.js";
|
|
3
|
+
import { SpinnerLoader as p } from "../spinner-loader/spinner-loader.js";
|
|
4
|
+
import { useIntlTyped as g } from "../typed-intl/index.js";
|
|
5
|
+
import { loadingProgress as x } from "../../utils/loading.js";
|
|
6
|
+
function f({
|
|
7
|
+
data: s,
|
|
8
|
+
loadingFunction: a = x,
|
|
9
|
+
message: d,
|
|
10
|
+
subMessage: i
|
|
10
11
|
}) {
|
|
11
|
-
const { formatMessage:
|
|
12
|
+
const { formatMessage: n } = g(), o = s.length === 0 ? 0 : a(s), l = Number.isFinite(o) ? o : 0, m = d ?? n(
|
|
12
13
|
{ messageId: "components.loading.loadingPercent" },
|
|
13
|
-
{ percent:
|
|
14
|
-
),
|
|
15
|
-
return /* @__PURE__ */
|
|
14
|
+
{ percent: l }
|
|
15
|
+
), r = i ?? n({ messageId: "components.loading.wait" });
|
|
16
|
+
return /* @__PURE__ */ e(c, { show: !0, xsCentered: !0, zIndexLayer: "LOADING", children: /* @__PURE__ */ t("div", { className: "flex min-h-[120px] w-[250px] flex-col items-center justify-center rounded-md bg-gray-10 p-[16px] text-center", children: [
|
|
17
|
+
/* @__PURE__ */ e("div", { className: "mb-5", children: /* @__PURE__ */ e(p, {}) }),
|
|
18
|
+
/* @__PURE__ */ t("div", { className: "flex w-full flex-col gap-0", children: [
|
|
19
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-foreground", children: m }),
|
|
20
|
+
r !== "" && /* @__PURE__ */ e("span", { className: "text-sm text-secondary-foreground", children: r })
|
|
21
|
+
] })
|
|
22
|
+
] }) });
|
|
16
23
|
}
|
|
17
|
-
|
|
24
|
+
f.displayName = "Loading";
|
|
18
25
|
export {
|
|
19
|
-
|
|
26
|
+
f as Loading
|
|
20
27
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { SimpleTooltip as c } from "../tooltip/simple-tooltip.js";
|
|
2
|
+
import { SimpleTooltip as a } from "../tooltip/simple-tooltip.js";
|
|
4
3
|
import "../tooltip/tooltip.js";
|
|
5
|
-
import { useIntlTyped as
|
|
4
|
+
import { useIntlTyped as c } from "../typed-intl/index.js";
|
|
6
5
|
import "react";
|
|
7
|
-
import { useMediaQuery as
|
|
6
|
+
import { useMediaQuery as m } from "../../hooks/use-media-query.js";
|
|
7
|
+
import "@gearbox-protocol/sdk/onchain";
|
|
8
|
+
import { cn as d } from "../../utils/cn.js";
|
|
9
|
+
import "luxon";
|
|
10
|
+
import "../../utils/z-index.js";
|
|
8
11
|
import { SdkStatusPillTest as e } from "./constants.js";
|
|
9
12
|
import { sdkStatusDotVariant as l } from "./sdk-status.js";
|
|
10
13
|
const p = "(hover: none)", u = {
|
|
@@ -12,10 +15,10 @@ const p = "(hover: none)", u = {
|
|
|
12
15
|
ready: "components.sdkStatus.connected",
|
|
13
16
|
error: "components.sdkStatus.disconnected"
|
|
14
17
|
};
|
|
15
|
-
function
|
|
18
|
+
function M({
|
|
16
19
|
status: o
|
|
17
20
|
}) {
|
|
18
|
-
const { formatMessage: s } =
|
|
21
|
+
const { formatMessage: s } = c(), i = !m(p), r = s({ messageId: u[o] }), n = (
|
|
19
22
|
// `<output>` rather than a span with role="status": same implicit live
|
|
20
23
|
// region, and the status is announced without the dot being focusable.
|
|
21
24
|
//
|
|
@@ -32,11 +35,13 @@ function E({
|
|
|
32
35
|
"data-testid": e.root,
|
|
33
36
|
"aria-label": r,
|
|
34
37
|
children: /* @__PURE__ */ t(
|
|
35
|
-
|
|
38
|
+
"div",
|
|
36
39
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
className: d(
|
|
41
|
+
"size-1.5 shrink-0 rounded-full",
|
|
42
|
+
l(o) === "success" ? "bg-success" : "bg-muted-foreground",
|
|
43
|
+
o === "loading" && "animate-pulse"
|
|
44
|
+
),
|
|
40
45
|
"data-testid": e.dot
|
|
41
46
|
}
|
|
42
47
|
)
|
|
@@ -44,15 +49,15 @@ function E({
|
|
|
44
49
|
)
|
|
45
50
|
);
|
|
46
51
|
return /* @__PURE__ */ t(
|
|
47
|
-
|
|
52
|
+
a,
|
|
48
53
|
{
|
|
49
|
-
title:
|
|
50
|
-
trigger:
|
|
54
|
+
title: n,
|
|
55
|
+
trigger: i ? "hover" : "click",
|
|
51
56
|
placement: "top",
|
|
52
57
|
children: /* @__PURE__ */ t("span", { className: "text-xs", "data-testid": e.tooltip, children: r })
|
|
53
58
|
}
|
|
54
59
|
);
|
|
55
60
|
}
|
|
56
61
|
export {
|
|
57
|
-
|
|
62
|
+
M as SdkStatusPill
|
|
58
63
|
};
|
|
@@ -1,34 +1,30 @@
|
|
|
1
1
|
import { GridErrorLine as r } from "./grid-error-line.js";
|
|
2
|
-
import { GridLoadingLine as
|
|
3
|
-
import { GridTable as
|
|
4
|
-
import { Table as
|
|
5
|
-
import {
|
|
6
|
-
import { TableLoaderGuard as c } from "./table-loader-guard.js";
|
|
7
|
-
import { TableCellSm as j, TableLineSm as k } from "./table-sm.js";
|
|
2
|
+
import { GridLoadingLine as i } from "./grid-loading-line.js";
|
|
3
|
+
import { GridTable as d, GridTableBody as o, GridTableCaption as T, GridTableCell as t, GridTableFooter as n, GridTableHead as G, GridTableHeader as m, GridTableRow as p, gridTableCellVariants as s, gridTableHeadVariants as C, gridTableVariants as H } from "./grid-table.js";
|
|
4
|
+
import { Table as f, TableBody as x, TableCell as g, TableHead as L, TableHeader as w, TableRow as y, tableCellVariants as B, tableHeadVariants as R, tableVariants as S } from "./table.js";
|
|
5
|
+
import { TableCellSm as F, TableLineSm as c } from "./table-sm.js";
|
|
8
6
|
export {
|
|
9
7
|
r as GridErrorLine,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
i as GridLoadingLine,
|
|
9
|
+
d as GridTable,
|
|
10
|
+
o as GridTableBody,
|
|
13
11
|
T as GridTableCaption,
|
|
14
12
|
t as GridTableCell,
|
|
15
13
|
n as GridTableFooter,
|
|
16
14
|
G as GridTableHead,
|
|
17
15
|
m as GridTableHeader,
|
|
18
16
|
p as GridTableRow,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
f as Table,
|
|
18
|
+
x as TableBody,
|
|
19
|
+
g as TableCell,
|
|
20
|
+
F as TableCellSm,
|
|
21
|
+
L as TableHead,
|
|
24
22
|
w as TableHeader,
|
|
25
|
-
|
|
26
|
-
E as TableLoader,
|
|
27
|
-
c as TableLoaderGuard,
|
|
23
|
+
c as TableLineSm,
|
|
28
24
|
y as TableRow,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
s as gridTableCellVariants,
|
|
26
|
+
C as gridTableHeadVariants,
|
|
27
|
+
H as gridTableVariants,
|
|
32
28
|
B as tableCellVariants,
|
|
33
29
|
R as tableHeadVariants,
|
|
34
30
|
S as tableVariants
|
|
@@ -32,12 +32,12 @@ import "../simple-accordion/simple-accordion.js";
|
|
|
32
32
|
import "../tip-card/tip-card.js";
|
|
33
33
|
import "../typography/typography.js";
|
|
34
34
|
import "../help-tip/help-tip.js";
|
|
35
|
-
import "../points-icon/points-icon.js";
|
|
36
35
|
import "viem";
|
|
36
|
+
import "../points-icon/points-icon.js";
|
|
37
37
|
import "../vertical-indicator/vertical-indicator.js";
|
|
38
38
|
import "../base/page-title/page-title.js";
|
|
39
|
-
import "../detailed-page-title/detailed-page-title-copy-button.js";
|
|
40
39
|
import "../detailed-page-title/detailed-page-title-explorer-dropdown.js";
|
|
40
|
+
import "../base/detailed-page-title/copy-button.js";
|
|
41
41
|
import "../base/details-view/detail-aside/detail-aside-scope.js";
|
|
42
42
|
import "../layout/main-aside-layout/main-aside-layout.js";
|
|
43
43
|
import "../base/details-view/details-view.js";
|
|
@@ -52,16 +52,29 @@ import "../breakpoint-provider.js";
|
|
|
52
52
|
import "lightweight-charts";
|
|
53
53
|
import "../graph/formatters.js";
|
|
54
54
|
import "../graph/graph-view.js";
|
|
55
|
-
import "../base/info-portal/info-portal.js";
|
|
56
55
|
import "../edit-input/edit-input.js";
|
|
57
56
|
import "../slider/slider.js";
|
|
58
57
|
import "../slider/slider-context.js";
|
|
59
58
|
import "../text-button/text-button.js";
|
|
60
|
-
import "../with-title/with-title.js";
|
|
61
59
|
import "react-router-dom";
|
|
62
60
|
import "../status-elements/status-elements.js";
|
|
61
|
+
import "../base/manage-pane/manage-pane.js";
|
|
62
|
+
import "../base/tabber/tabber.js";
|
|
63
|
+
import "../link/link.js";
|
|
64
|
+
import "../rounded-image/rounded-image.js";
|
|
65
|
+
import "../base-link/base-link.js";
|
|
66
|
+
import "../base-table/base-table-line.js";
|
|
67
|
+
import "../navigation-context/navigation-context.js";
|
|
68
|
+
import "../cards/card/card.js";
|
|
69
|
+
import "../client-adapters/styled-button/styled-button.js";
|
|
63
70
|
import "../client-adapters/styled-dialog-container/styled-dialog-container.js";
|
|
71
|
+
import "../simple-dropdown/simple-dropdown.js";
|
|
72
|
+
import "../simple-dropdown/simple-dropdown-menu-item.js";
|
|
73
|
+
import "../composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
|
|
74
|
+
import "../composites/tx-preview/confirm/dialog/constants.js";
|
|
64
75
|
import "../modal/modal.js";
|
|
76
|
+
import "../spinner/spinner.js";
|
|
77
|
+
import "../spinner-loader/spinner-loader.js";
|
|
65
78
|
import "@radix-ui/react-dialog";
|
|
66
79
|
import "../dialog/dialog-container.js";
|
|
67
80
|
import "../dialog/dialog-content.js";
|
|
@@ -73,20 +86,6 @@ import "../dialog/dialog-modal-container.js";
|
|
|
73
86
|
import "../dialog/dialog-overlay.js";
|
|
74
87
|
import "../input/input.js";
|
|
75
88
|
import "../label/label.js";
|
|
76
|
-
import "../simple-dropdown/simple-dropdown.js";
|
|
77
|
-
import "../simple-dropdown/simple-dropdown-menu-item.js";
|
|
78
|
-
import "../base/tabber/tabber.js";
|
|
79
|
-
import "../link/link.js";
|
|
80
|
-
import "../rounded-image/rounded-image.js";
|
|
81
|
-
import "../base-link/base-link.js";
|
|
82
|
-
import "../base-table/base-table-line.js";
|
|
83
|
-
import "../navigation-context/navigation-context.js";
|
|
84
|
-
import "../cards/card/card.js";
|
|
85
|
-
import "../client-adapters/styled-button/styled-button.js";
|
|
86
|
-
import "../composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js";
|
|
87
|
-
import "../composites/tx-preview/confirm/dialog/constants.js";
|
|
88
|
-
import "../spinner/spinner.js";
|
|
89
|
-
import "../spinner-loader/spinner-loader.js";
|
|
90
89
|
import "../dropdown-menu/dropdown-menu.js";
|
|
91
90
|
import "../dropdown-menu/dropdown-menu-content.js";
|
|
92
91
|
import "../dropdown-menu/dropdown-menu-item.js";
|
|
@@ -101,9 +100,7 @@ import "../layout/layout/layout.js";
|
|
|
101
100
|
import "../legal-agreement/legal-agreement-theme.js";
|
|
102
101
|
import "../loader/loader.js";
|
|
103
102
|
import "../loading/loading.js";
|
|
104
|
-
import "../loading-bar/loading-bar.js";
|
|
105
103
|
import "../radio-group/radio-group.js";
|
|
106
|
-
import "../status-dot/status-dot.js";
|
|
107
104
|
import "../search-line/search-line.js";
|
|
108
105
|
import "../segmented-control/segmented-control.js";
|
|
109
106
|
import "../separate-line/separate-line.js";
|
|
@@ -111,7 +108,7 @@ import "../split-list/split-list.js";
|
|
|
111
108
|
import "../tabs/tabs.js";
|
|
112
109
|
import "../textarea/textarea.js";
|
|
113
110
|
import "../theme-provider.js";
|
|
114
|
-
function
|
|
111
|
+
function Fo({
|
|
115
112
|
toCopy: u,
|
|
116
113
|
children: d,
|
|
117
114
|
onCopySuccess: f,
|
|
@@ -193,5 +190,5 @@ function Bo({
|
|
|
193
190
|
return a ? /* @__PURE__ */ t(T, { placement: "top", triangle: !0, title: c(), children: a }) : c();
|
|
194
191
|
}
|
|
195
192
|
export {
|
|
196
|
-
|
|
193
|
+
Fo as WithCopy
|
|
197
194
|
};
|