@hyperbridge/ui 0.0.10 → 0.0.12
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/index.d.mts +9 -5
- package/dist/index.mjs +320 -319
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -259,7 +259,7 @@ type Props$1 = PercentageProps & {
|
|
|
259
259
|
balance: React__default.JSX.Element;
|
|
260
260
|
address: string;
|
|
261
261
|
amount: string;
|
|
262
|
-
|
|
262
|
+
secondaryAmount: React__default.ReactNode;
|
|
263
263
|
token: {
|
|
264
264
|
image: string;
|
|
265
265
|
symbol: string;
|
|
@@ -267,8 +267,8 @@ type Props$1 = PercentageProps & {
|
|
|
267
267
|
};
|
|
268
268
|
receiver: {
|
|
269
269
|
address: string;
|
|
270
|
-
amount:
|
|
271
|
-
|
|
270
|
+
amount: React__default.ReactNode;
|
|
271
|
+
secondaryAmount: React__default.ReactNode;
|
|
272
272
|
network: Omit<Network, "group">;
|
|
273
273
|
estimatedTime?: string;
|
|
274
274
|
};
|
|
@@ -382,7 +382,7 @@ declare function ReviewItem(props: {
|
|
|
382
382
|
asset: {
|
|
383
383
|
amount: string;
|
|
384
384
|
symbol: string;
|
|
385
|
-
secondaryValue:
|
|
385
|
+
secondaryValue: React__default.ReactNode;
|
|
386
386
|
};
|
|
387
387
|
AddressInfo: (props: {
|
|
388
388
|
tag: string;
|
|
@@ -829,8 +829,12 @@ interface TokenSelectorProps {
|
|
|
829
829
|
onAddToWallet?: (token: Token) => void;
|
|
830
830
|
}
|
|
831
831
|
declare const TokenSelector: ({ title, isOpen, onClose, allTokens, availableTokens, selectedToken, onTokenSelect, onAddToWallet, }: TokenSelectorProps) => react_jsx_runtime.JSX.Element;
|
|
832
|
+
interface TokenItem extends Pick<Token, "name" | "symbol" | "image" | "address"> {
|
|
833
|
+
amount: React__default.ReactNode;
|
|
834
|
+
secondaryAmount: React__default.ReactNode;
|
|
835
|
+
}
|
|
832
836
|
declare function TokenSelectionItem(props: {
|
|
833
|
-
token:
|
|
837
|
+
token: TokenItem;
|
|
834
838
|
isActive: boolean;
|
|
835
839
|
isAvailable: boolean;
|
|
836
840
|
AddWalletButton: React__default.ReactNode;
|
package/dist/index.mjs
CHANGED
|
@@ -839,28 +839,17 @@ function SwapForm({
|
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
-
// src/components/
|
|
843
|
-
import {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
Image3,
|
|
848
|
-
{
|
|
849
|
-
src: props.src,
|
|
850
|
-
alt: props.alt,
|
|
851
|
-
layout: "constrained",
|
|
852
|
-
className: cn("shrink-0 object-cover rounded-full", props.className),
|
|
853
|
-
width: 20,
|
|
854
|
-
aspectRatio: 1
|
|
855
|
-
}
|
|
856
|
-
);
|
|
857
|
-
}
|
|
842
|
+
// src/components/form/bridge-form.tsx
|
|
843
|
+
import { useState as useState5 } from "react";
|
|
844
|
+
|
|
845
|
+
// src/@/ui/dialog.tsx
|
|
846
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
858
847
|
|
|
859
848
|
// src/components/atoms/smooth-corners.tsx
|
|
860
849
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
861
850
|
import React2 from "react";
|
|
862
851
|
import { cva as cva5 } from "class-variance-authority";
|
|
863
|
-
import { jsx as
|
|
852
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
864
853
|
var SmoothCornersSingleton = {
|
|
865
854
|
activated: false,
|
|
866
855
|
promise: null,
|
|
@@ -900,7 +889,7 @@ function SmoothCorners(props) {
|
|
|
900
889
|
);
|
|
901
890
|
});
|
|
902
891
|
}, []);
|
|
903
|
-
return /* @__PURE__ */
|
|
892
|
+
return /* @__PURE__ */ jsx11(
|
|
904
893
|
Slot5,
|
|
905
894
|
{
|
|
906
895
|
className: cn(
|
|
@@ -913,8 +902,157 @@ function SmoothCorners(props) {
|
|
|
913
902
|
);
|
|
914
903
|
}
|
|
915
904
|
|
|
905
|
+
// src/@/ui/dialog.tsx
|
|
906
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
907
|
+
function Dialog(_a) {
|
|
908
|
+
var props = __objRest(_a, []);
|
|
909
|
+
return /* @__PURE__ */ jsx12(DialogPrimitive.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
910
|
+
}
|
|
911
|
+
function DialogTrigger(_a) {
|
|
912
|
+
var props = __objRest(_a, []);
|
|
913
|
+
return /* @__PURE__ */ jsx12(DialogPrimitive.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
|
|
914
|
+
}
|
|
915
|
+
function DialogPortal(_a) {
|
|
916
|
+
var props = __objRest(_a, []);
|
|
917
|
+
return /* @__PURE__ */ jsx12(DialogPrimitive.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
918
|
+
}
|
|
919
|
+
function DialogClose(_a) {
|
|
920
|
+
var props = __objRest(_a, []);
|
|
921
|
+
return /* @__PURE__ */ jsx12(DialogPrimitive.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
|
|
922
|
+
}
|
|
923
|
+
function DialogOverlay(_a) {
|
|
924
|
+
var _b = _a, {
|
|
925
|
+
className
|
|
926
|
+
} = _b, props = __objRest(_b, [
|
|
927
|
+
"className"
|
|
928
|
+
]);
|
|
929
|
+
return /* @__PURE__ */ jsx12(
|
|
930
|
+
DialogPrimitive.Overlay,
|
|
931
|
+
__spreadValues({
|
|
932
|
+
"data-slot": "dialog-overlay",
|
|
933
|
+
className: cn(
|
|
934
|
+
"data-[state=open]:animate-in backdrop-blur-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 tile-bg",
|
|
935
|
+
className
|
|
936
|
+
)
|
|
937
|
+
}, props)
|
|
938
|
+
);
|
|
939
|
+
}
|
|
940
|
+
function DialogContent(_a) {
|
|
941
|
+
var _b = _a, {
|
|
942
|
+
className,
|
|
943
|
+
children,
|
|
944
|
+
showCloseButton = true
|
|
945
|
+
} = _b, props = __objRest(_b, [
|
|
946
|
+
"className",
|
|
947
|
+
"children",
|
|
948
|
+
"showCloseButton"
|
|
949
|
+
]);
|
|
950
|
+
return /* @__PURE__ */ jsxs8(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
951
|
+
/* @__PURE__ */ jsx12(DialogOverlay, {}),
|
|
952
|
+
/* @__PURE__ */ jsx12(SmoothCorners, { children: /* @__PURE__ */ jsxs8(
|
|
953
|
+
DialogPrimitive.Content,
|
|
954
|
+
__spreadProps(__spreadValues({
|
|
955
|
+
"data-slot": "dialog-content",
|
|
956
|
+
className: cn(
|
|
957
|
+
"bg-brand-black-600 text-brand-black-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 pt-4 p-6 shadow-lg duration-200 sm:max-w-[28rem]",
|
|
958
|
+
className
|
|
959
|
+
)
|
|
960
|
+
}, props), {
|
|
961
|
+
children: [
|
|
962
|
+
children,
|
|
963
|
+
showCloseButton && /* @__PURE__ */ jsxs8(
|
|
964
|
+
DialogPrimitive.Close,
|
|
965
|
+
{
|
|
966
|
+
"data-slot": "dialog-close",
|
|
967
|
+
className: "ring-offset-background w-[calc(32rem/16)] inline-flex items-center justify-center !rounded-full text-brand-black-100 aspect-square focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
968
|
+
children: [
|
|
969
|
+
/* @__PURE__ */ jsx12(XIcon_default, { className: "size-4" }),
|
|
970
|
+
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: "Close" })
|
|
971
|
+
]
|
|
972
|
+
}
|
|
973
|
+
)
|
|
974
|
+
]
|
|
975
|
+
})
|
|
976
|
+
) })
|
|
977
|
+
] });
|
|
978
|
+
}
|
|
979
|
+
function DialogHeader(_a) {
|
|
980
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
981
|
+
return /* @__PURE__ */ jsx12(
|
|
982
|
+
"div",
|
|
983
|
+
__spreadValues({
|
|
984
|
+
"data-slot": "dialog-header",
|
|
985
|
+
className: cn(
|
|
986
|
+
"flex flex-col justify-center px-6 py-[calc(18rem/16)] gap-2 sm:text-left min-h-[calc(64rem/16)] items-start -mt-6 -mx-6",
|
|
987
|
+
className
|
|
988
|
+
)
|
|
989
|
+
}, props)
|
|
990
|
+
);
|
|
991
|
+
}
|
|
992
|
+
function DialogFooter(_a) {
|
|
993
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
994
|
+
return /* @__PURE__ */ jsx12(
|
|
995
|
+
"div",
|
|
996
|
+
__spreadValues({
|
|
997
|
+
"data-slot": "dialog-footer",
|
|
998
|
+
className: cn(
|
|
999
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
1000
|
+
className
|
|
1001
|
+
)
|
|
1002
|
+
}, props)
|
|
1003
|
+
);
|
|
1004
|
+
}
|
|
1005
|
+
function DialogTitle(_a) {
|
|
1006
|
+
var _b = _a, {
|
|
1007
|
+
className
|
|
1008
|
+
} = _b, props = __objRest(_b, [
|
|
1009
|
+
"className"
|
|
1010
|
+
]);
|
|
1011
|
+
return /* @__PURE__ */ jsx12(
|
|
1012
|
+
DialogPrimitive.Title,
|
|
1013
|
+
__spreadValues({
|
|
1014
|
+
"data-slot": "dialog-title",
|
|
1015
|
+
className: cn(
|
|
1016
|
+
"text-[calc(20rem/16)] leading-[calc(28rem/16)] font-medium text-brand-white-500",
|
|
1017
|
+
className
|
|
1018
|
+
)
|
|
1019
|
+
}, props)
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
1022
|
+
function DialogDescription(_a) {
|
|
1023
|
+
var _b = _a, {
|
|
1024
|
+
className
|
|
1025
|
+
} = _b, props = __objRest(_b, [
|
|
1026
|
+
"className"
|
|
1027
|
+
]);
|
|
1028
|
+
return /* @__PURE__ */ jsx12(
|
|
1029
|
+
DialogPrimitive.Description,
|
|
1030
|
+
__spreadValues({
|
|
1031
|
+
"data-slot": "dialog-description",
|
|
1032
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
1033
|
+
}, props)
|
|
1034
|
+
);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
// src/components/images/token-image.tsx
|
|
1038
|
+
import { Image as Image3 } from "@unpic/react";
|
|
1039
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1040
|
+
function TokenImage(props) {
|
|
1041
|
+
return /* @__PURE__ */ jsx13(
|
|
1042
|
+
Image3,
|
|
1043
|
+
{
|
|
1044
|
+
src: props.src,
|
|
1045
|
+
alt: props.alt,
|
|
1046
|
+
layout: "constrained",
|
|
1047
|
+
className: cn("shrink-0 object-cover rounded-full", props.className),
|
|
1048
|
+
width: 20,
|
|
1049
|
+
aspectRatio: 1
|
|
1050
|
+
}
|
|
1051
|
+
);
|
|
1052
|
+
}
|
|
1053
|
+
|
|
916
1054
|
// src/components/molecules/network-switcher.tsx
|
|
917
|
-
import { jsx as
|
|
1055
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
918
1056
|
var NetworkSwitcher = ({
|
|
919
1057
|
from,
|
|
920
1058
|
to,
|
|
@@ -922,8 +1060,8 @@ var NetworkSwitcher = ({
|
|
|
922
1060
|
onSourceClick,
|
|
923
1061
|
onDestinationClick
|
|
924
1062
|
}) => {
|
|
925
|
-
return /* @__PURE__ */
|
|
926
|
-
/* @__PURE__ */
|
|
1063
|
+
return /* @__PURE__ */ jsxs9("div", { className: "relative flex w-full max-w-[440px] gap-2", children: [
|
|
1064
|
+
/* @__PURE__ */ jsx14(
|
|
927
1065
|
NetworkSwitcherButton,
|
|
928
1066
|
{
|
|
929
1067
|
label: "From",
|
|
@@ -932,7 +1070,7 @@ var NetworkSwitcher = ({
|
|
|
932
1070
|
children: from.name
|
|
933
1071
|
}
|
|
934
1072
|
),
|
|
935
|
-
/* @__PURE__ */
|
|
1073
|
+
/* @__PURE__ */ jsx14(
|
|
936
1074
|
NetworkSwitcherButton,
|
|
937
1075
|
{
|
|
938
1076
|
label: "To",
|
|
@@ -941,30 +1079,30 @@ var NetworkSwitcher = ({
|
|
|
941
1079
|
children: to.name
|
|
942
1080
|
}
|
|
943
1081
|
),
|
|
944
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ jsx14(
|
|
945
1083
|
Button,
|
|
946
1084
|
{
|
|
947
1085
|
type: "button",
|
|
948
1086
|
onClick: onNetworkInvert,
|
|
949
1087
|
className: "size-6 rounded-[7.5px] p-0 bg-brand-black-600 flex items-center justify-center absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 hover:scale-110 transition-all",
|
|
950
1088
|
"aria-label": "Switch networks",
|
|
951
|
-
children: /* @__PURE__ */
|
|
1089
|
+
children: /* @__PURE__ */ jsx14("div", { className: "size-[19.2px] rounded-[6px] bg-brand-black-500 flex items-center justify-center", children: /* @__PURE__ */ jsx14(ArrowRight_default, { className: "text-brand-black-100 size-3" }) })
|
|
952
1090
|
}
|
|
953
1091
|
)
|
|
954
1092
|
] });
|
|
955
1093
|
};
|
|
956
1094
|
function NetworkSwitcherButton(props) {
|
|
957
1095
|
const _a = props, { image, label } = _a, _props = __objRest(_a, ["image", "label"]);
|
|
958
|
-
return /* @__PURE__ */
|
|
1096
|
+
return /* @__PURE__ */ jsx14(SmoothCorners, { children: /* @__PURE__ */ jsx14(
|
|
959
1097
|
"button",
|
|
960
1098
|
__spreadProps(__spreadValues({}, _props), {
|
|
961
1099
|
type: "button",
|
|
962
1100
|
className: "bg-brand-black-500 select-none rounded-[16px] py-[10px] px-3 w-[49%] cursor-pointer hover:bg-brand-black-300 duration-200 transition-all",
|
|
963
|
-
children: /* @__PURE__ */
|
|
964
|
-
/* @__PURE__ */
|
|
965
|
-
/* @__PURE__ */
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
1101
|
+
children: /* @__PURE__ */ jsxs9("span", { className: "flex gap-3 items-center", children: [
|
|
1102
|
+
/* @__PURE__ */ jsx14(TokenImage, { className: "size-8", src: image.src, alt: image.alt }),
|
|
1103
|
+
/* @__PURE__ */ jsxs9("span", { className: "flex flex-col items-start", children: [
|
|
1104
|
+
/* @__PURE__ */ jsx14("span", { className: "text-caption font-medium text-brand-black-100", children: label }),
|
|
1105
|
+
/* @__PURE__ */ jsx14("span", { className: "text-body text-white font-medium", children: props.children })
|
|
968
1106
|
] })
|
|
969
1107
|
] })
|
|
970
1108
|
})
|
|
@@ -1105,10 +1243,10 @@ var animationPresets = {
|
|
|
1105
1243
|
|
|
1106
1244
|
// src/@/ui/drawer.tsx
|
|
1107
1245
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
1108
|
-
import { Fragment, jsx as
|
|
1246
|
+
import { Fragment, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1109
1247
|
function Drawer(_a) {
|
|
1110
1248
|
var props = __objRest(_a, []);
|
|
1111
|
-
return /* @__PURE__ */
|
|
1249
|
+
return /* @__PURE__ */ jsx15(DrawerPrimitive.Root, __spreadValues({ "data-slot": "drawer" }, props));
|
|
1112
1250
|
}
|
|
1113
1251
|
function DrawerOverlay(_a) {
|
|
1114
1252
|
var _b = _a, {
|
|
@@ -1116,7 +1254,7 @@ function DrawerOverlay(_a) {
|
|
|
1116
1254
|
} = _b, props = __objRest(_b, [
|
|
1117
1255
|
"className"
|
|
1118
1256
|
]);
|
|
1119
|
-
return /* @__PURE__ */
|
|
1257
|
+
return /* @__PURE__ */ jsx15(
|
|
1120
1258
|
DrawerPrimitive.Overlay,
|
|
1121
1259
|
__spreadValues({
|
|
1122
1260
|
"data-slot": "drawer-overlay",
|
|
@@ -1135,9 +1273,9 @@ function DrawerContent(_a) {
|
|
|
1135
1273
|
"className",
|
|
1136
1274
|
"children"
|
|
1137
1275
|
]);
|
|
1138
|
-
return /* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
/* @__PURE__ */
|
|
1276
|
+
return /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
1277
|
+
/* @__PURE__ */ jsx15(DrawerOverlay, {}),
|
|
1278
|
+
/* @__PURE__ */ jsxs10(
|
|
1141
1279
|
DrawerPrimitive.Content,
|
|
1142
1280
|
__spreadProps(__spreadValues({
|
|
1143
1281
|
"data-slot": "drawer-content",
|
|
@@ -1151,7 +1289,7 @@ function DrawerContent(_a) {
|
|
|
1151
1289
|
)
|
|
1152
1290
|
}, props), {
|
|
1153
1291
|
children: [
|
|
1154
|
-
/* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ jsx15("div", { className: "bg-brand-black-350 mx-auto my-2 hidden h-[5px] w-16 shrink-0 rounded-[2.5px] group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
1155
1293
|
children
|
|
1156
1294
|
]
|
|
1157
1295
|
})
|
|
@@ -1160,14 +1298,14 @@ function DrawerContent(_a) {
|
|
|
1160
1298
|
}
|
|
1161
1299
|
|
|
1162
1300
|
// src/components/molecules/modal.tsx
|
|
1163
|
-
import { jsx as
|
|
1301
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1164
1302
|
var Modal = (props) => {
|
|
1165
1303
|
const { isOpen, children, onClose } = props;
|
|
1166
1304
|
const isMobile = useIsMobile();
|
|
1167
1305
|
if (isMobile) {
|
|
1168
|
-
return /* @__PURE__ */
|
|
1306
|
+
return /* @__PURE__ */ jsx16(Drawer, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsx16(DrawerContent, { className: "bg-brand-black-550 border-brand-black-300 min-h-[90dvh]", children }) });
|
|
1169
1307
|
}
|
|
1170
|
-
return /* @__PURE__ */
|
|
1308
|
+
return /* @__PURE__ */ jsx16(DestkopModal, __spreadValues({}, props));
|
|
1171
1309
|
};
|
|
1172
1310
|
function DestkopModal(props) {
|
|
1173
1311
|
const {
|
|
@@ -1191,7 +1329,7 @@ function DestkopModal(props) {
|
|
|
1191
1329
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
1192
1330
|
};
|
|
1193
1331
|
}, [isOpen, onClose]);
|
|
1194
|
-
return /* @__PURE__ */
|
|
1332
|
+
return /* @__PURE__ */ jsx16(AnimatePresence, { mode: "wait", children: isOpen && /* @__PURE__ */ jsx16(
|
|
1195
1333
|
motion.div,
|
|
1196
1334
|
{
|
|
1197
1335
|
"data-modal": "true",
|
|
@@ -1252,7 +1390,7 @@ var sortItems = (items, sortFn) => {
|
|
|
1252
1390
|
|
|
1253
1391
|
// src/components/molecules/empty-state.tsx
|
|
1254
1392
|
import React3 from "react";
|
|
1255
|
-
import { Fragment as Fragment2, jsx as
|
|
1393
|
+
import { Fragment as Fragment2, jsx as jsx17 } from "react/jsx-runtime";
|
|
1256
1394
|
var ContextDefault = {
|
|
1257
1395
|
isEmpty: true
|
|
1258
1396
|
};
|
|
@@ -1261,10 +1399,10 @@ function useContext() {
|
|
|
1261
1399
|
const context = React3.useContext(EmptyStateCtx);
|
|
1262
1400
|
return isSSR() ? ContextDefault : context;
|
|
1263
1401
|
}
|
|
1264
|
-
var EmptyStateContent = React3.forwardRef(function
|
|
1402
|
+
var EmptyStateContent = React3.forwardRef(function Content2(props, ref) {
|
|
1265
1403
|
const { isEmpty } = useContext();
|
|
1266
1404
|
if (!isEmpty) return null;
|
|
1267
|
-
return /* @__PURE__ */
|
|
1405
|
+
return /* @__PURE__ */ jsx17(
|
|
1268
1406
|
"div",
|
|
1269
1407
|
__spreadProps(__spreadValues({}, props), {
|
|
1270
1408
|
ref,
|
|
@@ -1273,7 +1411,7 @@ var EmptyStateContent = React3.forwardRef(function Content(props, ref) {
|
|
|
1273
1411
|
);
|
|
1274
1412
|
});
|
|
1275
1413
|
var EmptyStateTitle = React3.forwardRef(function ESTitle(props, ref) {
|
|
1276
|
-
return /* @__PURE__ */
|
|
1414
|
+
return /* @__PURE__ */ jsx17(
|
|
1277
1415
|
"h6",
|
|
1278
1416
|
__spreadProps(__spreadValues({
|
|
1279
1417
|
ref
|
|
@@ -1283,7 +1421,7 @@ var EmptyStateTitle = React3.forwardRef(function ESTitle(props, ref) {
|
|
|
1283
1421
|
);
|
|
1284
1422
|
});
|
|
1285
1423
|
var EmptyStateDescription = React3.forwardRef(function ESDescription(props, ref) {
|
|
1286
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ jsx17(
|
|
1287
1425
|
"div",
|
|
1288
1426
|
__spreadProps(__spreadValues({
|
|
1289
1427
|
ref
|
|
@@ -1295,12 +1433,12 @@ var EmptyStateDescription = React3.forwardRef(function ESDescription(props, ref)
|
|
|
1295
1433
|
function EmptyStateConceal(props) {
|
|
1296
1434
|
const { isEmpty } = useContext();
|
|
1297
1435
|
if (isEmpty) return null;
|
|
1298
|
-
return /* @__PURE__ */
|
|
1436
|
+
return /* @__PURE__ */ jsx17(Fragment2, { children: props.children });
|
|
1299
1437
|
}
|
|
1300
1438
|
function EmptyState(props) {
|
|
1301
1439
|
const { isEmpty = true, children } = props;
|
|
1302
|
-
if (isSSR()) return /* @__PURE__ */
|
|
1303
|
-
return /* @__PURE__ */
|
|
1440
|
+
if (isSSR()) return /* @__PURE__ */ jsx17(Fragment2, { children });
|
|
1441
|
+
return /* @__PURE__ */ jsx17(EmptyStateCtx.Provider, { value: { isEmpty }, children });
|
|
1304
1442
|
}
|
|
1305
1443
|
|
|
1306
1444
|
// src/components/network/network-selector.tsx
|
|
@@ -1308,7 +1446,7 @@ import React5 from "react";
|
|
|
1308
1446
|
|
|
1309
1447
|
// src/components/molecules/scroll-aware-area.tsx
|
|
1310
1448
|
import React4 from "react";
|
|
1311
|
-
import { jsx as
|
|
1449
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1312
1450
|
function ScrollAwareSeparator(props) {
|
|
1313
1451
|
const _a = props, { scrollRef } = _a, props_ = __objRest(_a, ["scrollRef"]);
|
|
1314
1452
|
const [showHeaderBorder, setShowHeaderBorder] = React4.useState(false);
|
|
@@ -1334,7 +1472,7 @@ function ScrollAwareSeparator(props) {
|
|
|
1334
1472
|
resizeObserver.disconnect();
|
|
1335
1473
|
};
|
|
1336
1474
|
}, [scrollRef]);
|
|
1337
|
-
return /* @__PURE__ */
|
|
1475
|
+
return /* @__PURE__ */ jsx18(
|
|
1338
1476
|
"div",
|
|
1339
1477
|
__spreadProps(__spreadValues({}, props_), {
|
|
1340
1478
|
className: cn(
|
|
@@ -1347,7 +1485,7 @@ function ScrollAwareSeparator(props) {
|
|
|
1347
1485
|
}
|
|
1348
1486
|
|
|
1349
1487
|
// src/components/network/network-selector.tsx
|
|
1350
|
-
import { jsx as
|
|
1488
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1351
1489
|
var NetworkSelector = ({
|
|
1352
1490
|
title,
|
|
1353
1491
|
availableNetworks,
|
|
@@ -1374,41 +1512,41 @@ var NetworkSelector = ({
|
|
|
1374
1512
|
};
|
|
1375
1513
|
const renderNetworkItem = (network, isAvailable) => {
|
|
1376
1514
|
const isSelected = (selectedNetwork == null ? void 0 : selectedNetwork.name) === network.name;
|
|
1377
|
-
return /* @__PURE__ */
|
|
1515
|
+
return /* @__PURE__ */ jsx19(
|
|
1378
1516
|
NetworkSelectionItem,
|
|
1379
1517
|
{
|
|
1380
1518
|
network,
|
|
1381
1519
|
isActive: isSelected,
|
|
1382
1520
|
variant: isAvailable ? "default" : "secondary",
|
|
1383
1521
|
onClick: () => isAvailable && handleNetworkSelect(network),
|
|
1384
|
-
SecondaryContent: /* @__PURE__ */
|
|
1522
|
+
SecondaryContent: /* @__PURE__ */ jsx19(Button2, { variant: "message", size: "sm", children: /* @__PURE__ */ jsx19("span", { className: "text-caption font-medium", children: "Connect" }) })
|
|
1385
1523
|
}
|
|
1386
1524
|
);
|
|
1387
1525
|
};
|
|
1388
1526
|
const hasNoResults = searchQuery.trim() && filteredAvailableNetworks.length === 0 && filteredUnavailableNetworks.length === 0;
|
|
1389
1527
|
const isEmpty = availableNetworks.length === 0 && unavailableNetworks.length === 0;
|
|
1390
|
-
return /* @__PURE__ */
|
|
1391
|
-
/* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ jsxs11(Modal, { isOpen, onClose, children: [
|
|
1529
|
+
/* @__PURE__ */ jsxs11(
|
|
1392
1530
|
"div",
|
|
1393
1531
|
{
|
|
1394
1532
|
className: cn(
|
|
1395
1533
|
"bg-brand-black-550 px-6 pt-6 pb-4 transition-all duration-200"
|
|
1396
1534
|
),
|
|
1397
1535
|
children: [
|
|
1398
|
-
/* @__PURE__ */
|
|
1399
|
-
/* @__PURE__ */
|
|
1400
|
-
/* @__PURE__ */
|
|
1536
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between", children: [
|
|
1537
|
+
/* @__PURE__ */ jsx19("div", { className: "body-1 font-medium text-white max-w-[200px] break-words", children: title != null ? title : "Select chain" }),
|
|
1538
|
+
/* @__PURE__ */ jsx19(
|
|
1401
1539
|
IconButton,
|
|
1402
1540
|
{
|
|
1403
1541
|
size: "xs",
|
|
1404
1542
|
onClick: onClose,
|
|
1405
1543
|
variant: "unset",
|
|
1406
1544
|
className: "text-brand-black-100 hover:text-white",
|
|
1407
|
-
children: /* @__PURE__ */
|
|
1545
|
+
children: /* @__PURE__ */ jsx19(XIcon_default, {})
|
|
1408
1546
|
}
|
|
1409
1547
|
)
|
|
1410
1548
|
] }),
|
|
1411
|
-
/* @__PURE__ */
|
|
1549
|
+
/* @__PURE__ */ jsx19("div", { className: "mt-4", children: /* @__PURE__ */ jsx19(
|
|
1412
1550
|
SearchInput,
|
|
1413
1551
|
{
|
|
1414
1552
|
className: "h-10",
|
|
@@ -1420,45 +1558,41 @@ var NetworkSelector = ({
|
|
|
1420
1558
|
]
|
|
1421
1559
|
}
|
|
1422
1560
|
),
|
|
1423
|
-
/* @__PURE__ */
|
|
1424
|
-
/* @__PURE__ */
|
|
1425
|
-
/* @__PURE__ */
|
|
1561
|
+
/* @__PURE__ */ jsxs11(EmptyState, { isEmpty, children: [
|
|
1562
|
+
/* @__PURE__ */ jsxs11(EmptyStateConceal, { children: [
|
|
1563
|
+
/* @__PURE__ */ jsx19(
|
|
1426
1564
|
ScrollAwareSeparator,
|
|
1427
1565
|
{
|
|
1428
1566
|
scrollRef: scrollableRef,
|
|
1429
1567
|
className: "data-[active=true]:border-brand-black-300/70 data-[active=false]:border-brand-black-300/0"
|
|
1430
1568
|
}
|
|
1431
1569
|
),
|
|
1432
|
-
/* @__PURE__ */
|
|
1570
|
+
/* @__PURE__ */ jsxs11(
|
|
1433
1571
|
"div",
|
|
1434
1572
|
{
|
|
1435
1573
|
ref: scrollableRef,
|
|
1436
1574
|
className: "px-6 pb-6 overflow-y-auto h-full space-y-4 no-scrollbar",
|
|
1437
1575
|
children: [
|
|
1438
|
-
filteredAvailableNetworks.length > 0 && /* @__PURE__ */
|
|
1439
|
-
/* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
(network) => renderNetworkItem(network, true)
|
|
1442
|
-
) })
|
|
1576
|
+
filteredAvailableNetworks.length > 0 && /* @__PURE__ */ jsxs11("div", { children: [
|
|
1577
|
+
/* @__PURE__ */ jsx19("p", { className: "text-caption text-brand-black-100", children: "Available" }),
|
|
1578
|
+
/* @__PURE__ */ jsx19("div", { className: "mt-[6px] space-y-2", children: filteredAvailableNetworks.map((network) => /* @__PURE__ */ jsx19(React5.Fragment, { children: renderNetworkItem(network, true) }, network.name)) })
|
|
1443
1579
|
] }),
|
|
1444
|
-
filteredUnavailableNetworks.length > 0 && /* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
(network) => renderNetworkItem(network, false)
|
|
1448
|
-
) })
|
|
1580
|
+
filteredUnavailableNetworks.length > 0 && /* @__PURE__ */ jsxs11("div", { children: [
|
|
1581
|
+
/* @__PURE__ */ jsx19("p", { className: "text-caption text-brand-black-100", children: "Not available" }),
|
|
1582
|
+
/* @__PURE__ */ jsx19("div", { className: "mt-[6px] space-y-2", children: filteredUnavailableNetworks.map((network) => /* @__PURE__ */ jsx19(React5.Fragment, { children: "renderNetworkItem(network, false)," }, network.name)) })
|
|
1449
1583
|
] }),
|
|
1450
|
-
hasNoResults && /* @__PURE__ */
|
|
1584
|
+
hasNoResults && /* @__PURE__ */ jsx19("div", { className: "text-center py-8 h-full flex items-center justify-center", children: /* @__PURE__ */ jsxs11("p", { className: "text-caption text-brand-black-100", children: [
|
|
1451
1585
|
"No results found for",
|
|
1452
1586
|
" ",
|
|
1453
|
-
/* @__PURE__ */
|
|
1587
|
+
/* @__PURE__ */ jsx19("span", { className: "text-white font-medium", children: searchQuery })
|
|
1454
1588
|
] }) })
|
|
1455
1589
|
]
|
|
1456
1590
|
}
|
|
1457
1591
|
)
|
|
1458
1592
|
] }),
|
|
1459
|
-
/* @__PURE__ */
|
|
1460
|
-
/* @__PURE__ */
|
|
1461
|
-
/* @__PURE__ */
|
|
1593
|
+
/* @__PURE__ */ jsx19(EmptyStateContent, { className: "text-center py-8 h-full flex items-center justify-center", children: /* @__PURE__ */ jsxs11("div", { children: [
|
|
1594
|
+
/* @__PURE__ */ jsx19("p", { className: "body-2 text-brand-black-100 mb-1", children: "No networks available" }),
|
|
1595
|
+
/* @__PURE__ */ jsx19("p", { className: "text-caption text-brand-black-100", children: "Networks will appear here when available" })
|
|
1462
1596
|
] }) })
|
|
1463
1597
|
] })
|
|
1464
1598
|
] });
|
|
@@ -1477,7 +1611,7 @@ function NetworkSelectionItem(props) {
|
|
|
1477
1611
|
]);
|
|
1478
1612
|
const buttonRef = React5.useRef(null);
|
|
1479
1613
|
const is_default_mode = variant === "default";
|
|
1480
|
-
const buttonContent = /* @__PURE__ */
|
|
1614
|
+
const buttonContent = /* @__PURE__ */ jsxs11(
|
|
1481
1615
|
"div",
|
|
1482
1616
|
{
|
|
1483
1617
|
className: cn(
|
|
@@ -1495,7 +1629,7 @@ function NetworkSelectionItem(props) {
|
|
|
1495
1629
|
return (_a2 = buttonRef.current) == null ? void 0 : _a2.click();
|
|
1496
1630
|
},
|
|
1497
1631
|
children: [
|
|
1498
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ jsxs11(
|
|
1499
1633
|
"button",
|
|
1500
1634
|
__spreadProps(__spreadValues({
|
|
1501
1635
|
type: "button",
|
|
@@ -1504,20 +1638,20 @@ function NetworkSelectionItem(props) {
|
|
|
1504
1638
|
}, PROPS), {
|
|
1505
1639
|
disabled,
|
|
1506
1640
|
children: [
|
|
1507
|
-
/* @__PURE__ */
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1641
|
+
/* @__PURE__ */ jsx19(TokenImage, { className: "size-8", src: network.image, alt: network.name }),
|
|
1642
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-col items-start", children: [
|
|
1643
|
+
/* @__PURE__ */ jsx19("div", { className: "body-2 font-medium text-white", children: network.name }),
|
|
1644
|
+
/* @__PURE__ */ jsx19("div", { className: "text-caption font-medium text-brand-black-100", children: network.group })
|
|
1511
1645
|
] })
|
|
1512
1646
|
]
|
|
1513
1647
|
})
|
|
1514
1648
|
),
|
|
1515
|
-
is_default_mode ? /* @__PURE__ */
|
|
1649
|
+
is_default_mode ? /* @__PURE__ */ jsx19(IconButton, { className: "cursor-pointer group", variant: "secondary", children: isActive ? /* @__PURE__ */ jsx19(Check_default, { className: "size-4 text-white" }) : /* @__PURE__ */ jsx19(Circle_default, { className: "size-4 text-brand-black-100 group-hover:text-white duration-200 transition-colors" }) }) : null,
|
|
1516
1650
|
variant === "secondary" ? props.SecondaryContent : null
|
|
1517
1651
|
]
|
|
1518
1652
|
}
|
|
1519
1653
|
);
|
|
1520
|
-
return /* @__PURE__ */
|
|
1654
|
+
return /* @__PURE__ */ jsx19(
|
|
1521
1655
|
"div",
|
|
1522
1656
|
{
|
|
1523
1657
|
className: cn(
|
|
@@ -1535,7 +1669,7 @@ import React6 from "react";
|
|
|
1535
1669
|
|
|
1536
1670
|
// src/@/ui/scroll-area.tsx
|
|
1537
1671
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
1538
|
-
import { jsx as
|
|
1672
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1539
1673
|
function ScrollArea(_a) {
|
|
1540
1674
|
var _b = _a, {
|
|
1541
1675
|
className,
|
|
@@ -1544,14 +1678,14 @@ function ScrollArea(_a) {
|
|
|
1544
1678
|
"className",
|
|
1545
1679
|
"children"
|
|
1546
1680
|
]);
|
|
1547
|
-
return /* @__PURE__ */
|
|
1681
|
+
return /* @__PURE__ */ jsxs12(
|
|
1548
1682
|
ScrollAreaPrimitive.Root,
|
|
1549
1683
|
__spreadProps(__spreadValues({
|
|
1550
1684
|
"data-slot": "scroll-area",
|
|
1551
1685
|
className: cn("relative", className)
|
|
1552
1686
|
}, props), {
|
|
1553
1687
|
children: [
|
|
1554
|
-
/* @__PURE__ */
|
|
1688
|
+
/* @__PURE__ */ jsx20(
|
|
1555
1689
|
ScrollAreaPrimitive.Viewport,
|
|
1556
1690
|
{
|
|
1557
1691
|
"data-slot": "scroll-area-viewport",
|
|
@@ -1559,8 +1693,8 @@ function ScrollArea(_a) {
|
|
|
1559
1693
|
children
|
|
1560
1694
|
}
|
|
1561
1695
|
),
|
|
1562
|
-
/* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */
|
|
1696
|
+
/* @__PURE__ */ jsx20(ScrollBar, {}),
|
|
1697
|
+
/* @__PURE__ */ jsx20(ScrollAreaPrimitive.Corner, {})
|
|
1564
1698
|
]
|
|
1565
1699
|
})
|
|
1566
1700
|
);
|
|
@@ -1573,7 +1707,7 @@ function ScrollBar(_a) {
|
|
|
1573
1707
|
"className",
|
|
1574
1708
|
"orientation"
|
|
1575
1709
|
]);
|
|
1576
|
-
return /* @__PURE__ */
|
|
1710
|
+
return /* @__PURE__ */ jsx20(
|
|
1577
1711
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1578
1712
|
__spreadProps(__spreadValues({
|
|
1579
1713
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -1585,7 +1719,7 @@ function ScrollBar(_a) {
|
|
|
1585
1719
|
className
|
|
1586
1720
|
)
|
|
1587
1721
|
}, props), {
|
|
1588
|
-
children: /* @__PURE__ */
|
|
1722
|
+
children: /* @__PURE__ */ jsx20(
|
|
1589
1723
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
1590
1724
|
{
|
|
1591
1725
|
"data-slot": "scroll-area-thumb",
|
|
@@ -1597,7 +1731,7 @@ function ScrollBar(_a) {
|
|
|
1597
1731
|
}
|
|
1598
1732
|
|
|
1599
1733
|
// src/components/tokens/token-selector.tsx
|
|
1600
|
-
import { Fragment as Fragment3, jsx as
|
|
1734
|
+
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1601
1735
|
var tokenSortFn = (a, b) => {
|
|
1602
1736
|
const aHasAmount = a.amount > 0;
|
|
1603
1737
|
const bHasAmount = b.amount > 0;
|
|
@@ -1666,14 +1800,14 @@ var TokenSelector = ({
|
|
|
1666
1800
|
const renderTokenItem = (token) => {
|
|
1667
1801
|
const isSelected = (selectedToken == null ? void 0 : selectedToken.symbol) === token.symbol && (selectedToken == null ? void 0 : selectedToken.address) === token.address;
|
|
1668
1802
|
const isAvailable = isTokenAvailable(token);
|
|
1669
|
-
return /* @__PURE__ */
|
|
1803
|
+
return /* @__PURE__ */ jsx21(
|
|
1670
1804
|
TokenSelectionItem,
|
|
1671
1805
|
{
|
|
1672
|
-
token,
|
|
1806
|
+
token: __spreadProps(__spreadValues({}, token), { secondaryAmount: token.usdValue }),
|
|
1673
1807
|
isActive: isSelected,
|
|
1674
1808
|
isAvailable,
|
|
1675
1809
|
onClick: () => handleTokenSelect(token),
|
|
1676
|
-
AddWalletButton: /* @__PURE__ */
|
|
1810
|
+
AddWalletButton: /* @__PURE__ */ jsx21(
|
|
1677
1811
|
Button,
|
|
1678
1812
|
{
|
|
1679
1813
|
variant: "message",
|
|
@@ -1682,7 +1816,7 @@ var TokenSelector = ({
|
|
|
1682
1816
|
e.stopPropagation();
|
|
1683
1817
|
handleAddToWallet(token);
|
|
1684
1818
|
},
|
|
1685
|
-
children: /* @__PURE__ */
|
|
1819
|
+
children: /* @__PURE__ */ jsx21("span", { className: "text-caption font-medium", children: "Add to wallet" })
|
|
1686
1820
|
}
|
|
1687
1821
|
)
|
|
1688
1822
|
},
|
|
@@ -1692,8 +1826,8 @@ var TokenSelector = ({
|
|
|
1692
1826
|
const hasSearchResults = searchQuery.trim() && searchResults.length > 0;
|
|
1693
1827
|
const hasNoResults = searchQuery.trim() && searchResults.length === 0;
|
|
1694
1828
|
const isEmpty = availableTokens.length === 0 && allTokens.length === 0;
|
|
1695
|
-
return /* @__PURE__ */
|
|
1696
|
-
/* @__PURE__ */
|
|
1829
|
+
return /* @__PURE__ */ jsxs13(Modal, { isOpen, onClose, children: [
|
|
1830
|
+
/* @__PURE__ */ jsxs13(
|
|
1697
1831
|
"div",
|
|
1698
1832
|
{
|
|
1699
1833
|
className: cn(
|
|
@@ -1701,9 +1835,9 @@ var TokenSelector = ({
|
|
|
1701
1835
|
showHeaderBorder && "border-b border-brand-black-300/70"
|
|
1702
1836
|
),
|
|
1703
1837
|
children: [
|
|
1704
|
-
/* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1706
|
-
/* @__PURE__ */
|
|
1838
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between", children: [
|
|
1839
|
+
/* @__PURE__ */ jsx21("div", { className: "body-1 font-medium text-white max-w-[200px] break-words", children: title != null ? title : "Select token" }),
|
|
1840
|
+
/* @__PURE__ */ jsx21(
|
|
1707
1841
|
XIcon_default,
|
|
1708
1842
|
{
|
|
1709
1843
|
className: "size-4 cursor-pointer text-brand-black-100 hover:text-white duration-200 transition-colors",
|
|
@@ -1711,7 +1845,7 @@ var TokenSelector = ({
|
|
|
1711
1845
|
}
|
|
1712
1846
|
)
|
|
1713
1847
|
] }),
|
|
1714
|
-
/* @__PURE__ */
|
|
1848
|
+
/* @__PURE__ */ jsx21("div", { className: "mt-4", children: /* @__PURE__ */ jsx21(
|
|
1715
1849
|
SearchInput,
|
|
1716
1850
|
{
|
|
1717
1851
|
className: "h-10",
|
|
@@ -1723,37 +1857,46 @@ var TokenSelector = ({
|
|
|
1723
1857
|
]
|
|
1724
1858
|
}
|
|
1725
1859
|
),
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
/* @__PURE__ */
|
|
1728
|
-
hasSearchResults && /* @__PURE__ */
|
|
1729
|
-
/* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
1860
|
+
/* @__PURE__ */ jsx21(ScrollAwareSeparator, { scrollRef: scrollableRef }),
|
|
1861
|
+
/* @__PURE__ */ jsx21(ScrollArea, { ref: scrollableRef, className: "h-full", children: /* @__PURE__ */ jsxs13("div", { className: "px-6 pb-6 space-y-4", children: [
|
|
1862
|
+
hasSearchResults && /* @__PURE__ */ jsxs13("div", { children: [
|
|
1863
|
+
/* @__PURE__ */ jsx21("p", { className: "text-caption text-brand-black-100", children: "Search results" }),
|
|
1864
|
+
/* @__PURE__ */ jsx21("div", { className: "mt-[6px] space-y-2", children: searchResults.map(renderTokenItem) })
|
|
1731
1865
|
] }),
|
|
1732
|
-
!searchQuery.trim() && sortedAvailableTokens.length > 0 && /* @__PURE__ */
|
|
1733
|
-
/* @__PURE__ */
|
|
1734
|
-
/* @__PURE__ */
|
|
1866
|
+
!searchQuery.trim() && sortedAvailableTokens.length > 0 && /* @__PURE__ */ jsxs13("div", { children: [
|
|
1867
|
+
/* @__PURE__ */ jsx21("p", { className: "text-caption text-brand-black-100", children: "Your tokens" }),
|
|
1868
|
+
/* @__PURE__ */ jsx21("div", { className: "mt-[6px] space-y-2", children: sortedAvailableTokens.map(renderTokenItem) })
|
|
1735
1869
|
] }),
|
|
1736
|
-
!searchQuery.trim() && sortedAllTokens.length > 0 && /* @__PURE__ */
|
|
1737
|
-
/* @__PURE__ */
|
|
1738
|
-
/* @__PURE__ */
|
|
1870
|
+
!searchQuery.trim() && sortedAllTokens.length > 0 && /* @__PURE__ */ jsxs13("div", { children: [
|
|
1871
|
+
/* @__PURE__ */ jsx21("p", { className: "text-caption text-brand-black-100", children: "All tokens" }),
|
|
1872
|
+
/* @__PURE__ */ jsx21("div", { className: "mt-[6px] space-y-2", children: sortedAllTokens.map(renderTokenItem) })
|
|
1739
1873
|
] }),
|
|
1740
|
-
hasNoResults && /* @__PURE__ */
|
|
1874
|
+
hasNoResults && /* @__PURE__ */ jsx21("div", { className: "text-center py-8 h-full flex items-center justify-center", children: /* @__PURE__ */ jsxs13("p", { className: "text-caption text-brand-black-100", children: [
|
|
1741
1875
|
"No results found for",
|
|
1742
1876
|
" ",
|
|
1743
|
-
/* @__PURE__ */
|
|
1877
|
+
/* @__PURE__ */ jsx21("span", { className: "text-white font-medium", children: searchQuery })
|
|
1744
1878
|
] }) }),
|
|
1745
|
-
isEmpty && /* @__PURE__ */
|
|
1746
|
-
/* @__PURE__ */
|
|
1747
|
-
/* @__PURE__ */
|
|
1879
|
+
isEmpty && /* @__PURE__ */ jsx21("div", { className: "text-center py-8 h-full flex items-center justify-center", children: /* @__PURE__ */ jsxs13("div", { children: [
|
|
1880
|
+
/* @__PURE__ */ jsx21("p", { className: "body-2 text-brand-black-100 mb-1", children: "No tokens available" }),
|
|
1881
|
+
/* @__PURE__ */ jsx21("p", { className: "text-caption text-brand-black-100", children: "Tokens will appear here when available" })
|
|
1748
1882
|
] }) })
|
|
1749
1883
|
] }) })
|
|
1750
1884
|
] });
|
|
1751
1885
|
};
|
|
1752
1886
|
function TokenSelectionItem(props) {
|
|
1753
|
-
const _a = props, {
|
|
1754
|
-
|
|
1887
|
+
const _a = props, {
|
|
1888
|
+
token,
|
|
1889
|
+
isAvailable = true,
|
|
1890
|
+
isActive,
|
|
1891
|
+
AddWalletButton
|
|
1892
|
+
} = _a, PROPS = __objRest(_a, [
|
|
1893
|
+
"token",
|
|
1894
|
+
"isAvailable",
|
|
1895
|
+
"isActive",
|
|
1896
|
+
"AddWalletButton"
|
|
1897
|
+
]);
|
|
1755
1898
|
const buttonRef = React6.useRef(null);
|
|
1756
|
-
const buttonContent = /* @__PURE__ */
|
|
1899
|
+
const buttonContent = /* @__PURE__ */ jsxs13(
|
|
1757
1900
|
"div",
|
|
1758
1901
|
{
|
|
1759
1902
|
className: "cursor-pointer flex items-center justify-between w-full bg-brand-black-500 hover:bg-brand-black-300 duration-200 transition-colors p-3 rounded-[16px]",
|
|
@@ -1766,7 +1909,7 @@ function TokenSelectionItem(props) {
|
|
|
1766
1909
|
return (_a2 = buttonRef.current) == null ? void 0 : _a2.click();
|
|
1767
1910
|
},
|
|
1768
1911
|
children: [
|
|
1769
|
-
/* @__PURE__ */
|
|
1912
|
+
/* @__PURE__ */ jsxs13(
|
|
1770
1913
|
"button",
|
|
1771
1914
|
__spreadProps(__spreadValues({
|
|
1772
1915
|
ref: buttonRef
|
|
@@ -1775,10 +1918,10 @@ function TokenSelectionItem(props) {
|
|
|
1775
1918
|
className: "flex items-center text-start gap-3",
|
|
1776
1919
|
disabled: !isAvailable || props.disabled,
|
|
1777
1920
|
children: [
|
|
1778
|
-
/* @__PURE__ */
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1781
|
-
/* @__PURE__ */
|
|
1921
|
+
/* @__PURE__ */ jsx21(TokenImage, { src: token.image, alt: token.symbol, className: "size-6" }),
|
|
1922
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-[2px] items-start", children: [
|
|
1923
|
+
/* @__PURE__ */ jsx21("p", { className: "body-1 font-medium text-white", children: token.name }),
|
|
1924
|
+
/* @__PURE__ */ jsxs13("p", { className: "text-caption text-brand-black-100", children: [
|
|
1782
1925
|
token.symbol,
|
|
1783
1926
|
" \u2022 ",
|
|
1784
1927
|
token.address
|
|
@@ -1787,14 +1930,14 @@ function TokenSelectionItem(props) {
|
|
|
1787
1930
|
]
|
|
1788
1931
|
})
|
|
1789
1932
|
),
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */
|
|
1792
|
-
/* @__PURE__ */
|
|
1793
|
-
] }) :
|
|
1933
|
+
/* @__PURE__ */ jsx21("div", { className: "flex flex-col items-end gap-[2px]", children: isAvailable ? /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
1934
|
+
/* @__PURE__ */ jsx21("p", { className: "body-1 font-medium text-white", children: token.amount }),
|
|
1935
|
+
/* @__PURE__ */ jsx21("p", { className: "text-caption text-brand-black-100", children: token.secondaryAmount })
|
|
1936
|
+
] }) : AddWalletButton })
|
|
1794
1937
|
]
|
|
1795
1938
|
}
|
|
1796
1939
|
);
|
|
1797
|
-
return /* @__PURE__ */
|
|
1940
|
+
return /* @__PURE__ */ jsx21(
|
|
1798
1941
|
"div",
|
|
1799
1942
|
{
|
|
1800
1943
|
className: cn(
|
|
@@ -1806,20 +1949,17 @@ function TokenSelectionItem(props) {
|
|
|
1806
1949
|
);
|
|
1807
1950
|
}
|
|
1808
1951
|
|
|
1809
|
-
// src/components/form/bridge-form.tsx
|
|
1810
|
-
import { useState as useState5 } from "react";
|
|
1811
|
-
|
|
1812
1952
|
// src/components/form/bridge-input.tsx
|
|
1813
1953
|
import React8 from "react";
|
|
1814
1954
|
|
|
1815
1955
|
// src/components/input/input.tsx
|
|
1816
1956
|
import * as React7 from "react";
|
|
1817
|
-
import { jsx as
|
|
1957
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1818
1958
|
var Input2 = React7.forwardRef((_a, ref) => {
|
|
1819
1959
|
var _b = _a, { className, label, error, helperText, id } = _b, props = __objRest(_b, ["className", "label", "error", "helperText", "id"]);
|
|
1820
1960
|
const inputId = id || React7.useId();
|
|
1821
|
-
return /* @__PURE__ */
|
|
1822
|
-
label && /* @__PURE__ */
|
|
1961
|
+
return /* @__PURE__ */ jsxs14("div", { className: "space-y-2", children: [
|
|
1962
|
+
label && /* @__PURE__ */ jsx22(
|
|
1823
1963
|
"label",
|
|
1824
1964
|
{
|
|
1825
1965
|
htmlFor: inputId,
|
|
@@ -1827,7 +1967,7 @@ var Input2 = React7.forwardRef((_a, ref) => {
|
|
|
1827
1967
|
children: label
|
|
1828
1968
|
}
|
|
1829
1969
|
),
|
|
1830
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ jsx22(
|
|
1831
1971
|
Input,
|
|
1832
1972
|
__spreadValues({
|
|
1833
1973
|
ref,
|
|
@@ -1838,7 +1978,7 @@ var Input2 = React7.forwardRef((_a, ref) => {
|
|
|
1838
1978
|
)
|
|
1839
1979
|
}, props)
|
|
1840
1980
|
),
|
|
1841
|
-
(error || helperText) && /* @__PURE__ */
|
|
1981
|
+
(error || helperText) && /* @__PURE__ */ jsx22(
|
|
1842
1982
|
"p",
|
|
1843
1983
|
{
|
|
1844
1984
|
className: cn(
|
|
@@ -1853,7 +1993,7 @@ var Input2 = React7.forwardRef((_a, ref) => {
|
|
|
1853
1993
|
Input2.displayName = "Input";
|
|
1854
1994
|
|
|
1855
1995
|
// src/components/form/bridge-input.tsx
|
|
1856
|
-
import { jsx as
|
|
1996
|
+
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1857
1997
|
function BridgeInput(props) {
|
|
1858
1998
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1859
1999
|
const {
|
|
@@ -1873,7 +2013,7 @@ function BridgeInput(props) {
|
|
|
1873
2013
|
const formatPercentageLabel = (percentage2) => {
|
|
1874
2014
|
return percentage2 === 100 ? "Max" : `${percentage2}%`;
|
|
1875
2015
|
};
|
|
1876
|
-
return /* @__PURE__ */
|
|
2016
|
+
return /* @__PURE__ */ jsxs15(
|
|
1877
2017
|
"div",
|
|
1878
2018
|
{
|
|
1879
2019
|
className: cn(
|
|
@@ -1881,7 +2021,7 @@ function BridgeInput(props) {
|
|
|
1881
2021
|
isConnected && "border-dashed-wide"
|
|
1882
2022
|
),
|
|
1883
2023
|
children: [
|
|
1884
|
-
/* @__PURE__ */
|
|
2024
|
+
/* @__PURE__ */ jsx23(
|
|
1885
2025
|
"section",
|
|
1886
2026
|
{
|
|
1887
2027
|
"data-testid": "send-section",
|
|
@@ -1890,23 +2030,23 @@ function BridgeInput(props) {
|
|
|
1890
2030
|
isConnected && "bg-brand-black-200",
|
|
1891
2031
|
error ? "bg-brand-danger-500" : "bridge-form-border"
|
|
1892
2032
|
),
|
|
1893
|
-
children: /* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
1897
|
-
/* @__PURE__ */
|
|
2033
|
+
children: /* @__PURE__ */ jsxs15("div", { className: "bg-brand-black-500 rounded-[14.5px] h-full relative px-3", children: [
|
|
2034
|
+
/* @__PURE__ */ jsxs15("div", { className: "w-full flex justify-between h-10 items-center", children: [
|
|
2035
|
+
/* @__PURE__ */ jsx23("div", { className: "w-1/2", children: /* @__PURE__ */ jsx23("p", { className: "text-caption text-brand-black-100 font-medium", children: "Send" }) }),
|
|
2036
|
+
/* @__PURE__ */ jsx23("div", { className: "w-1/2", children: /* @__PURE__ */ jsxs15("div", { className: "text-caption text-brand-black-100 font-medium text-right flex items-center gap-1 justify-end", children: [
|
|
2037
|
+
/* @__PURE__ */ jsx23("span", { className: "max-w-[100px] truncate", children: sender.address ? sender.address : "Balance" }),
|
|
1898
2038
|
" ",
|
|
1899
|
-
/* @__PURE__ */
|
|
2039
|
+
/* @__PURE__ */ jsx23(
|
|
1900
2040
|
"span",
|
|
1901
2041
|
{
|
|
1902
2042
|
className: cn(
|
|
1903
2043
|
"max-w-[100px] truncate",
|
|
1904
2044
|
props.hasError ? "text-brand-danger-500" : "text-white"
|
|
1905
2045
|
),
|
|
1906
|
-
children: /* @__PURE__ */
|
|
2046
|
+
children: /* @__PURE__ */ jsx23(
|
|
1907
2047
|
React8.Suspense,
|
|
1908
2048
|
{
|
|
1909
|
-
fallback: /* @__PURE__ */
|
|
2049
|
+
fallback: /* @__PURE__ */ jsx23(
|
|
1910
2050
|
"div",
|
|
1911
2051
|
{
|
|
1912
2052
|
className: cn(
|
|
@@ -1922,8 +2062,8 @@ function BridgeInput(props) {
|
|
|
1922
2062
|
)
|
|
1923
2063
|
] }) })
|
|
1924
2064
|
] }),
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex h-[70px] items-center", children: [
|
|
2066
|
+
/* @__PURE__ */ jsx23(
|
|
1927
2067
|
Input2,
|
|
1928
2068
|
{
|
|
1929
2069
|
min: 0,
|
|
@@ -1940,21 +2080,18 @@ function BridgeInput(props) {
|
|
|
1940
2080
|
}
|
|
1941
2081
|
}
|
|
1942
2082
|
),
|
|
1943
|
-
/* @__PURE__ */
|
|
2083
|
+
/* @__PURE__ */ jsx23("div", { className: "w-[170px] pl-3 py-[13px] flex justify-end", children: props.TokenChangeButton })
|
|
1944
2084
|
] }),
|
|
1945
|
-
/* @__PURE__ */
|
|
1946
|
-
/* @__PURE__ */
|
|
2085
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex justify-between h-10", children: [
|
|
2086
|
+
/* @__PURE__ */ jsx23(
|
|
1947
2087
|
"div",
|
|
1948
2088
|
{
|
|
1949
2089
|
"data-testid": "sender-usd-value",
|
|
1950
2090
|
className: "flex items-center text-caption text-brand-black-100 font-medium min-h-6 hover:text-white duration-200 transition-colors",
|
|
1951
|
-
children:
|
|
1952
|
-
"$",
|
|
1953
|
-
isLoading ? /* @__PURE__ */ jsx22("div", { className: "w-8 h-3 bg-brand-black-200 animate-pulse rounded ml-1" }) : sender.usdValue
|
|
1954
|
-
]
|
|
2091
|
+
children: isLoading ? /* @__PURE__ */ jsx23("div", { className: "w-8 h-3 bg-brand-black-200 animate-pulse rounded ml-1" }) : sender.secondaryAmount
|
|
1955
2092
|
}
|
|
1956
2093
|
),
|
|
1957
|
-
isConnected && /* @__PURE__ */
|
|
2094
|
+
isConnected && /* @__PURE__ */ jsx23("div", { className: "flex gap-[6px] pt-1", children: percentage.options.map((percent_value) => /* @__PURE__ */ jsx23(
|
|
1958
2095
|
Button2,
|
|
1959
2096
|
{
|
|
1960
2097
|
type: "button",
|
|
@@ -1974,17 +2111,17 @@ function BridgeInput(props) {
|
|
|
1974
2111
|
] })
|
|
1975
2112
|
}
|
|
1976
2113
|
),
|
|
1977
|
-
/* @__PURE__ */
|
|
2114
|
+
/* @__PURE__ */ jsx23(
|
|
1978
2115
|
"section",
|
|
1979
2116
|
{
|
|
1980
2117
|
className: cn(
|
|
1981
2118
|
"grid transition-all duration-200 ease-out",
|
|
1982
2119
|
isConnected ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
1983
2120
|
),
|
|
1984
|
-
children: /* @__PURE__ */
|
|
1985
|
-
/* @__PURE__ */
|
|
1986
|
-
/* @__PURE__ */
|
|
1987
|
-
!props.EditDestAddressTrigger ? /* @__PURE__ */
|
|
2121
|
+
children: /* @__PURE__ */ jsx23("div", { className: "overflow-hidden min-h-0", children: /* @__PURE__ */ jsxs15("div", { className: "p-3", children: [
|
|
2122
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex justify-between", children: [
|
|
2123
|
+
/* @__PURE__ */ jsx23("p", { className: "text-caption text-brand-black-100 font-medium w-1/2", children: "Receive" }),
|
|
2124
|
+
!props.EditDestAddressTrigger ? /* @__PURE__ */ jsx23("span", { className: "text-caption text-brand-black-100 font-medium text-right flex items-center justify-end w-1/2", children: /* @__PURE__ */ jsx23("span", { className: "max-w-[100px] truncate", children: receiver.address }) }) : /* @__PURE__ */ jsx23(props.EditDestAddressTrigger, { asChild: true, children: /* @__PURE__ */ jsxs15(
|
|
1988
2125
|
"button",
|
|
1989
2126
|
{
|
|
1990
2127
|
type: "button",
|
|
@@ -1992,29 +2129,29 @@ function BridgeInput(props) {
|
|
|
1992
2129
|
"aria-label": "Edit receiver address",
|
|
1993
2130
|
className: "cursor-pointer flex !gap-1.5 !text-caption text-brand-black-100 font-medium text-right items-center justify-end w-1/2",
|
|
1994
2131
|
children: [
|
|
1995
|
-
/* @__PURE__ */
|
|
1996
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ jsx23("span", { className: "max-w-[100px] truncate", children: receiver.address }),
|
|
2133
|
+
/* @__PURE__ */ jsx23(
|
|
1997
2134
|
"span",
|
|
1998
2135
|
{
|
|
1999
2136
|
"aria-label": "Edit address",
|
|
2000
2137
|
className: "cursor-pointer text-foreground hover:scale-110 transition-transform disabled:opacity-50",
|
|
2001
|
-
children: /* @__PURE__ */
|
|
2138
|
+
children: /* @__PURE__ */ jsx23(Pen_default, { className: "size-[0.875rem]" })
|
|
2002
2139
|
}
|
|
2003
2140
|
)
|
|
2004
2141
|
]
|
|
2005
2142
|
}
|
|
2006
2143
|
) })
|
|
2007
2144
|
] }),
|
|
2008
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ jsx23(
|
|
2009
2146
|
"div",
|
|
2010
2147
|
{
|
|
2011
2148
|
className: cn(
|
|
2012
2149
|
"grid transition-all duration-200 ease-out",
|
|
2013
2150
|
sender.amount ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
2014
2151
|
),
|
|
2015
|
-
children: /* @__PURE__ */
|
|
2016
|
-
/* @__PURE__ */
|
|
2017
|
-
/* @__PURE__ */
|
|
2152
|
+
children: /* @__PURE__ */ jsxs15("div", { className: "overflow-hidden min-h-0", children: [
|
|
2153
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2 py-2", children: [
|
|
2154
|
+
/* @__PURE__ */ jsx23(
|
|
2018
2155
|
BadgeIcon,
|
|
2019
2156
|
{
|
|
2020
2157
|
src: (_b = (_a = sender.token) == null ? void 0 : _a.image) != null ? _b : "",
|
|
@@ -2023,21 +2160,18 @@ function BridgeInput(props) {
|
|
|
2023
2160
|
badgeSrc: (_h = (_g = receiver.network) == null ? void 0 : _g.image) != null ? _h : ""
|
|
2024
2161
|
}
|
|
2025
2162
|
),
|
|
2026
|
-
/* @__PURE__ */
|
|
2163
|
+
/* @__PURE__ */ jsx23("span", { className: "text-[20px] leading-[1] font-medium text-brand-black-100", children: isLoading ? /* @__PURE__ */ jsx23("div", { className: "w-16 h-5 bg-brand-black-200 animate-pulse rounded" }) : `${receiver.amount} ${((_i = sender.token) == null ? void 0 : _i.symbol) || ""}` })
|
|
2027
2164
|
] }),
|
|
2028
|
-
/* @__PURE__ */
|
|
2029
|
-
/* @__PURE__ */
|
|
2165
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex justify-between pt-1", children: [
|
|
2166
|
+
/* @__PURE__ */ jsx23(
|
|
2030
2167
|
"div",
|
|
2031
2168
|
{
|
|
2032
2169
|
"data-testid": "receiver-usd-value",
|
|
2033
2170
|
className: "flex items-center text-caption text-brand-black-100 font-medium",
|
|
2034
|
-
children:
|
|
2035
|
-
"$",
|
|
2036
|
-
isLoading ? /* @__PURE__ */ jsx22("div", { className: "w-8 h-3 bg-brand-black-200 animate-pulse rounded ml-1" }) : receiver.usdValue
|
|
2037
|
-
]
|
|
2171
|
+
children: isLoading ? /* @__PURE__ */ jsx23("div", { className: "w-8 h-3 bg-brand-black-200 animate-pulse rounded ml-1" }) : receiver.secondaryAmount
|
|
2038
2172
|
}
|
|
2039
2173
|
),
|
|
2040
|
-
isConnected && /* @__PURE__ */
|
|
2174
|
+
isConnected && /* @__PURE__ */ jsx23("div", { className: "text-brand-black-100 text-caption font-medium", children: isLoading ? /* @__PURE__ */ jsx23("div", { className: "w-12 h-3 bg-brand-black-200 animate-pulse rounded" }) : receiver.estimatedTime })
|
|
2041
2175
|
] })
|
|
2042
2176
|
] })
|
|
2043
2177
|
}
|
|
@@ -2050,139 +2184,6 @@ function BridgeInput(props) {
|
|
|
2050
2184
|
);
|
|
2051
2185
|
}
|
|
2052
2186
|
|
|
2053
|
-
// src/@/ui/dialog.tsx
|
|
2054
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2055
|
-
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2056
|
-
function Dialog(_a) {
|
|
2057
|
-
var props = __objRest(_a, []);
|
|
2058
|
-
return /* @__PURE__ */ jsx23(DialogPrimitive.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
2059
|
-
}
|
|
2060
|
-
function DialogTrigger(_a) {
|
|
2061
|
-
var props = __objRest(_a, []);
|
|
2062
|
-
return /* @__PURE__ */ jsx23(DialogPrimitive.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
|
|
2063
|
-
}
|
|
2064
|
-
function DialogPortal(_a) {
|
|
2065
|
-
var props = __objRest(_a, []);
|
|
2066
|
-
return /* @__PURE__ */ jsx23(DialogPrimitive.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
2067
|
-
}
|
|
2068
|
-
function DialogClose(_a) {
|
|
2069
|
-
var props = __objRest(_a, []);
|
|
2070
|
-
return /* @__PURE__ */ jsx23(DialogPrimitive.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
|
|
2071
|
-
}
|
|
2072
|
-
function DialogOverlay(_a) {
|
|
2073
|
-
var _b = _a, {
|
|
2074
|
-
className
|
|
2075
|
-
} = _b, props = __objRest(_b, [
|
|
2076
|
-
"className"
|
|
2077
|
-
]);
|
|
2078
|
-
return /* @__PURE__ */ jsx23(
|
|
2079
|
-
DialogPrimitive.Overlay,
|
|
2080
|
-
__spreadValues({
|
|
2081
|
-
"data-slot": "dialog-overlay",
|
|
2082
|
-
className: cn(
|
|
2083
|
-
"data-[state=open]:animate-in backdrop-blur-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 tile-bg",
|
|
2084
|
-
className
|
|
2085
|
-
)
|
|
2086
|
-
}, props)
|
|
2087
|
-
);
|
|
2088
|
-
}
|
|
2089
|
-
function DialogContent(_a) {
|
|
2090
|
-
var _b = _a, {
|
|
2091
|
-
className,
|
|
2092
|
-
children,
|
|
2093
|
-
showCloseButton = true
|
|
2094
|
-
} = _b, props = __objRest(_b, [
|
|
2095
|
-
"className",
|
|
2096
|
-
"children",
|
|
2097
|
-
"showCloseButton"
|
|
2098
|
-
]);
|
|
2099
|
-
return /* @__PURE__ */ jsxs15(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
2100
|
-
/* @__PURE__ */ jsx23(DialogOverlay, {}),
|
|
2101
|
-
/* @__PURE__ */ jsx23(SmoothCorners, { children: /* @__PURE__ */ jsxs15(
|
|
2102
|
-
DialogPrimitive.Content,
|
|
2103
|
-
__spreadProps(__spreadValues({
|
|
2104
|
-
"data-slot": "dialog-content",
|
|
2105
|
-
className: cn(
|
|
2106
|
-
"bg-brand-black-600 text-brand-black-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 pt-4 p-6 shadow-lg duration-200 sm:max-w-[28rem]",
|
|
2107
|
-
className
|
|
2108
|
-
)
|
|
2109
|
-
}, props), {
|
|
2110
|
-
children: [
|
|
2111
|
-
children,
|
|
2112
|
-
showCloseButton && /* @__PURE__ */ jsxs15(
|
|
2113
|
-
DialogPrimitive.Close,
|
|
2114
|
-
{
|
|
2115
|
-
"data-slot": "dialog-close",
|
|
2116
|
-
className: "ring-offset-background w-[calc(32rem/16)] inline-flex items-center justify-center !rounded-full text-brand-black-100 aspect-square focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2117
|
-
children: [
|
|
2118
|
-
/* @__PURE__ */ jsx23(XIcon_default, { className: "size-4" }),
|
|
2119
|
-
/* @__PURE__ */ jsx23("span", { className: "sr-only", children: "Close" })
|
|
2120
|
-
]
|
|
2121
|
-
}
|
|
2122
|
-
)
|
|
2123
|
-
]
|
|
2124
|
-
})
|
|
2125
|
-
) })
|
|
2126
|
-
] });
|
|
2127
|
-
}
|
|
2128
|
-
function DialogHeader(_a) {
|
|
2129
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2130
|
-
return /* @__PURE__ */ jsx23(
|
|
2131
|
-
"div",
|
|
2132
|
-
__spreadValues({
|
|
2133
|
-
"data-slot": "dialog-header",
|
|
2134
|
-
className: cn(
|
|
2135
|
-
"flex flex-col justify-center px-6 py-[calc(18rem/16)] gap-2 sm:text-left min-h-[calc(64rem/16)] items-start -mt-6 -mx-6",
|
|
2136
|
-
className
|
|
2137
|
-
)
|
|
2138
|
-
}, props)
|
|
2139
|
-
);
|
|
2140
|
-
}
|
|
2141
|
-
function DialogFooter(_a) {
|
|
2142
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2143
|
-
return /* @__PURE__ */ jsx23(
|
|
2144
|
-
"div",
|
|
2145
|
-
__spreadValues({
|
|
2146
|
-
"data-slot": "dialog-footer",
|
|
2147
|
-
className: cn(
|
|
2148
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
2149
|
-
className
|
|
2150
|
-
)
|
|
2151
|
-
}, props)
|
|
2152
|
-
);
|
|
2153
|
-
}
|
|
2154
|
-
function DialogTitle(_a) {
|
|
2155
|
-
var _b = _a, {
|
|
2156
|
-
className
|
|
2157
|
-
} = _b, props = __objRest(_b, [
|
|
2158
|
-
"className"
|
|
2159
|
-
]);
|
|
2160
|
-
return /* @__PURE__ */ jsx23(
|
|
2161
|
-
DialogPrimitive.Title,
|
|
2162
|
-
__spreadValues({
|
|
2163
|
-
"data-slot": "dialog-title",
|
|
2164
|
-
className: cn(
|
|
2165
|
-
"text-[calc(20rem/16)] leading-[calc(28rem/16)] font-medium text-brand-white-500",
|
|
2166
|
-
className
|
|
2167
|
-
)
|
|
2168
|
-
}, props)
|
|
2169
|
-
);
|
|
2170
|
-
}
|
|
2171
|
-
function DialogDescription(_a) {
|
|
2172
|
-
var _b = _a, {
|
|
2173
|
-
className
|
|
2174
|
-
} = _b, props = __objRest(_b, [
|
|
2175
|
-
"className"
|
|
2176
|
-
]);
|
|
2177
|
-
return /* @__PURE__ */ jsx23(
|
|
2178
|
-
DialogPrimitive.Description,
|
|
2179
|
-
__spreadValues({
|
|
2180
|
-
"data-slot": "dialog-description",
|
|
2181
|
-
className: cn("text-muted-foreground text-sm", className)
|
|
2182
|
-
}, props)
|
|
2183
|
-
);
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
2187
|
// src/components/form/bridge-form.tsx
|
|
2187
2188
|
import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2188
2189
|
function BridgeForm({
|
|
@@ -2344,7 +2345,7 @@ function BridgeForm({
|
|
|
2344
2345
|
token: senderToken,
|
|
2345
2346
|
amount: senderAmount,
|
|
2346
2347
|
balance: /* @__PURE__ */ jsx24(Fragment4, { children: senderBalance }),
|
|
2347
|
-
|
|
2348
|
+
secondaryAmount: senderUsdValue,
|
|
2348
2349
|
address: senderAddress || ""
|
|
2349
2350
|
},
|
|
2350
2351
|
receiver: {
|
|
@@ -2353,7 +2354,7 @@ function BridgeForm({
|
|
|
2353
2354
|
image: receiverToken.image
|
|
2354
2355
|
},
|
|
2355
2356
|
amount: receiverAmount,
|
|
2356
|
-
|
|
2357
|
+
secondaryAmount: receiverUsdValue,
|
|
2357
2358
|
address: effectiveReceiverAddress || "",
|
|
2358
2359
|
estimatedTime: estimatedTime != null ? estimatedTime : "~ 10 min"
|
|
2359
2360
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperbridge/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"typescript": "5.8.3",
|
|
34
34
|
"vite": "^6.3.4",
|
|
35
35
|
"vitest": "^3.1.2",
|
|
36
|
-
"@repo/
|
|
37
|
-
"@repo/
|
|
36
|
+
"@repo/typescript-config": "0.0.0",
|
|
37
|
+
"@repo/eslint-config": "0.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@radix-ui/react-dialog": "^1.1.14",
|