@hyperbridge/ui 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -4
- package/dist/index.mjs +335 -306
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -575,6 +575,7 @@ type TimelineData = {
|
|
|
575
575
|
};
|
|
576
576
|
} | {
|
|
577
577
|
processingStatus: "upcoming" | "error";
|
|
578
|
+
data?: never;
|
|
578
579
|
} | {
|
|
579
580
|
processingStatus: "completed";
|
|
580
581
|
data?: {
|
|
@@ -587,7 +588,7 @@ type TimelineItemProps = Prettify<TimelineData & Level & {
|
|
|
587
588
|
secondary?: string;
|
|
588
589
|
durationMode?: "none" | "visible";
|
|
589
590
|
}>;
|
|
590
|
-
declare
|
|
591
|
+
declare const TimelineItem: React__default.ForwardRefExoticComponent<TimelineItemProps & React__default.RefAttributes<HTMLLIElement>>;
|
|
591
592
|
declare function TimelineListGroup(props: {
|
|
592
593
|
children: React__default.ReactNode;
|
|
593
594
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -601,6 +602,8 @@ type TimerProps = {
|
|
|
601
602
|
seconds: number;
|
|
602
603
|
progress: number;
|
|
603
604
|
severity?: "default" | "warning";
|
|
605
|
+
tooltipContent?: string;
|
|
606
|
+
timerMessage?: string;
|
|
604
607
|
};
|
|
605
608
|
declare function TransactionTimer(props: TimerProps): react_jsx_runtime.JSX.Element;
|
|
606
609
|
declare function TimerWrap(props: {
|
|
@@ -759,8 +762,8 @@ interface NetworkSelectorProps {
|
|
|
759
762
|
declare const NetworkSelector: ({ title, availableNetworks, unavailableNetworks, selectedNetwork, onNetworkSelect, isOpen, onClose, }: NetworkSelectorProps) => react_jsx_runtime.JSX.Element;
|
|
760
763
|
declare function NetworkSelectionItem(props: {
|
|
761
764
|
network: Network;
|
|
762
|
-
variant: "default" | "secondary";
|
|
763
765
|
isActive?: boolean;
|
|
766
|
+
variant: "default" | "secondary";
|
|
764
767
|
SecondaryContent: React__default.ReactNode;
|
|
765
768
|
} & React__default.ComponentPropsWithoutRef<"button">): react_jsx_runtime.JSX.Element;
|
|
766
769
|
|
|
@@ -790,7 +793,13 @@ declare function SheetContent({ className, children, side, ...props }: React__de
|
|
|
790
793
|
declare function Drawer({ ...props }: React$1.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
791
794
|
declare function DrawerContent({ className, children, ...props }: React$1.ComponentProps<typeof Drawer$1.Content>): react_jsx_runtime.JSX.Element;
|
|
792
795
|
|
|
793
|
-
|
|
796
|
+
/**
|
|
797
|
+
* @deprecated use <ChooseProviderHeader /> instead
|
|
798
|
+
* @description To be Remove in v1
|
|
799
|
+
* @returns
|
|
800
|
+
*/
|
|
801
|
+
declare function ManageAccounts(): null;
|
|
802
|
+
declare function HeaderChooseProvider(): react_jsx_runtime.JSX.Element;
|
|
794
803
|
declare function HeaderNested(props: {
|
|
795
804
|
heading: string;
|
|
796
805
|
image: {
|
|
@@ -934,4 +943,4 @@ declare function HBDrawerFooter({ className, ...props }: React$1.ComponentProps<
|
|
|
934
943
|
declare function HBDrawerTitle({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Title>): react_jsx_runtime.JSX.Element;
|
|
935
944
|
declare function HBDrawerDescription({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Description>): react_jsx_runtime.JSX.Element;
|
|
936
945
|
|
|
937
|
-
export { AccessoryButton, type AccessoryButtonProps, AccountItem, AccountStack, type AccountStackProps, AddressInput, AddressInputFocusBehaviour, AssetList, AssetListItem, AssetValueTrend, Badge, BadgeIcon, Balance, BridgeForm, type BridgeFormProps, BridgeInput, BridgeSettings, type BridgeSettingsProps, BridgeTokenButton, Button, type ButtonProps, CWDrawerContent, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMorphContent, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerContent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateConceal, EmptyStateContent, EmptyStateDescription, EmptyStateTitle, type EstimatedTimeFormatted, GradientButton, HBDrawer, HBDrawerClose, HBDrawerContent, HBDrawerDescription, HBDrawerFooter, HBDrawerHeader, HBDrawerOverlay, HBDrawerPortal, HBDrawerTitle, HBDrawerTrigger, Header, HeaderContent, HeaderGradient, HeaderNested, IconButton, Input, type InputProps, LabelledSeperator, ListHeading, ListSection, ManageAccounts, Modal, type ModalProps, type Network, NetworkGroupItem, NetworkSelectionItem, NetworkSelector, type NetworkSelectorProps, NetworkSwitcher, NetworkSwitcherButton, type NetworkSwitcherProps, ReviewItem, ReviewItemAddress, ReviewItemCopyAddressButton, ScrollAwareSeparator, SearchInput, type SearchInputProps, Settings, type SettingsProps, Sheet, SheetContent, SheetTrigger, Summary, SummaryValues, SwapForm, type SwapFormProps, SwapTokenButton, SwapTokenItem, type SwapTokenItemProps, SwapTokenSelector, SwapTokenSelectorContent, type SwapTokenSelectorContentProps, SwapTokenSelectorEmpty, type SwapTokenSelectorEmptyProps, SwapTokenSelectorHeader, type SwapTokenSelectorHeaderProps, type SwapTokenSelectorProps, SwapTokenSelectorSearch, type SwapTokenSelectorSearchProps, SwapTokenSelectorSection, type SwapTokenSelectorSectionProps, TabAlt, TabAltContent, TabAltHeader, TabAltHeaders, TabAltPanel, TabItem, Tabs, TabsContent, TabsList, TagButton, Text, TimelineItem, TimelineList, TimelineListGroup, TimelineRoot, TimerWrap, ToastBox, type Token, TokenImage, type TokenInfo, TokenSelectionItem, TokenSelector, type TokenSelectorProps, TokenTransferPair, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionTimer, TxList, TxListItem, TxListItemProcessing, type WalletAccount, WalletAccountItem, WalletConnectedHeader, type WalletConnectedHeaderProps, WalletHeader, type WalletHeaderCallbacks, WalletHeaderContent, WalletHeaderContentBlur, type WalletHeaderContentProps, type WalletHeaderProps, WalletHeaderTabItem, WalletHeaderTabs, WalletHeaderTabsContent, WalletHeaderTabsList, type WalletHeaderTabsProps, WalletManagerUIContent, WalletManagerUIProvider, WalletProviderItem, badgeVariants, makeEntry };
|
|
946
|
+
export { AccessoryButton, type AccessoryButtonProps, AccountItem, AccountStack, type AccountStackProps, AddressInput, AddressInputFocusBehaviour, AssetList, AssetListItem, AssetValueTrend, Badge, BadgeIcon, Balance, BridgeForm, type BridgeFormProps, BridgeInput, BridgeSettings, type BridgeSettingsProps, BridgeTokenButton, Button, type ButtonProps, CWDrawerContent, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMorphContent, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerContent, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateConceal, EmptyStateContent, EmptyStateDescription, EmptyStateTitle, type EstimatedTimeFormatted, GradientButton, HBDrawer, HBDrawerClose, HBDrawerContent, HBDrawerDescription, HBDrawerFooter, HBDrawerHeader, HBDrawerOverlay, HBDrawerPortal, HBDrawerTitle, HBDrawerTrigger, Header, HeaderChooseProvider, HeaderContent, HeaderGradient, HeaderNested, IconButton, Input, type InputProps, LabelledSeperator, ListHeading, ListSection, ManageAccounts, Modal, type ModalProps, type Network, NetworkGroupItem, NetworkSelectionItem, NetworkSelector, type NetworkSelectorProps, NetworkSwitcher, NetworkSwitcherButton, type NetworkSwitcherProps, ReviewItem, ReviewItemAddress, ReviewItemCopyAddressButton, ScrollAwareSeparator, SearchInput, type SearchInputProps, Settings, type SettingsProps, Sheet, SheetContent, SheetTrigger, Summary, SummaryValues, SwapForm, type SwapFormProps, SwapTokenButton, SwapTokenItem, type SwapTokenItemProps, SwapTokenSelector, SwapTokenSelectorContent, type SwapTokenSelectorContentProps, SwapTokenSelectorEmpty, type SwapTokenSelectorEmptyProps, SwapTokenSelectorHeader, type SwapTokenSelectorHeaderProps, type SwapTokenSelectorProps, SwapTokenSelectorSearch, type SwapTokenSelectorSearchProps, SwapTokenSelectorSection, type SwapTokenSelectorSectionProps, TabAlt, TabAltContent, TabAltHeader, TabAltHeaders, TabAltPanel, TabItem, Tabs, TabsContent, TabsList, TagButton, Text, TimelineItem, TimelineList, TimelineListGroup, TimelineRoot, TimerWrap, ToastBox, type Token, TokenImage, type TokenInfo, TokenSelectionItem, TokenSelector, type TokenSelectorProps, TokenTransferPair, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransactionTimer, TxList, TxListItem, TxListItemProcessing, type WalletAccount, WalletAccountItem, WalletConnectedHeader, type WalletConnectedHeaderProps, WalletHeader, type WalletHeaderCallbacks, WalletHeaderContent, WalletHeaderContentBlur, type WalletHeaderContentProps, type WalletHeaderProps, WalletHeaderTabItem, WalletHeaderTabs, WalletHeaderTabsContent, WalletHeaderTabsList, type WalletHeaderTabsProps, WalletManagerUIContent, WalletManagerUIProvider, WalletProviderItem, badgeVariants, makeEntry };
|
package/dist/index.mjs
CHANGED
|
@@ -1111,16 +1111,111 @@ function NetworkSwitcherButton(props) {
|
|
|
1111
1111
|
|
|
1112
1112
|
// src/components/network/network-selector.tsx
|
|
1113
1113
|
import { useMemo } from "react";
|
|
1114
|
+
import React5 from "react";
|
|
1115
|
+
|
|
1116
|
+
// src/hooks/selector-hooks.ts
|
|
1117
|
+
import { useState as useState2, useRef, useEffect } from "react";
|
|
1118
|
+
var useScrollBorder = () => {
|
|
1119
|
+
const [showHeaderBorder, setShowHeaderBorder] = useState2(false);
|
|
1120
|
+
const scrollableRef = useRef(null);
|
|
1121
|
+
useEffect(() => {
|
|
1122
|
+
const scrollableElement = scrollableRef.current;
|
|
1123
|
+
if (!scrollableElement) return;
|
|
1124
|
+
const handleScroll = () => {
|
|
1125
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollableElement;
|
|
1126
|
+
const hasOverflow = scrollHeight > clientHeight;
|
|
1127
|
+
const hasScrolled = scrollTop > 0;
|
|
1128
|
+
setShowHeaderBorder(hasOverflow && hasScrolled);
|
|
1129
|
+
};
|
|
1130
|
+
handleScroll();
|
|
1131
|
+
scrollableElement.addEventListener("scroll", handleScroll);
|
|
1132
|
+
const resizeObserver = new ResizeObserver(handleScroll);
|
|
1133
|
+
resizeObserver.observe(scrollableElement);
|
|
1134
|
+
return () => {
|
|
1135
|
+
scrollableElement.removeEventListener("scroll", handleScroll);
|
|
1136
|
+
resizeObserver.disconnect();
|
|
1137
|
+
};
|
|
1138
|
+
}, []);
|
|
1139
|
+
return { showHeaderBorder, scrollableRef };
|
|
1140
|
+
};
|
|
1141
|
+
var useSearch = () => {
|
|
1142
|
+
const [searchQuery, setSearchQuery] = useState2("");
|
|
1143
|
+
const resetSearch = () => setSearchQuery("");
|
|
1144
|
+
return { searchQuery, setSearchQuery, resetSearch };
|
|
1145
|
+
};
|
|
1146
|
+
var filterItems = (items, searchQuery, searchFields) => {
|
|
1147
|
+
if (!searchQuery.trim()) return items;
|
|
1148
|
+
const query = searchQuery.toLowerCase();
|
|
1149
|
+
return items.filter(
|
|
1150
|
+
(item) => searchFields(item).some((field) => field.toLowerCase().includes(query))
|
|
1151
|
+
);
|
|
1152
|
+
};
|
|
1153
|
+
var sortItems = (items, sortFn) => {
|
|
1154
|
+
return [...items].sort(sortFn);
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
// src/components/molecules/empty-state.tsx
|
|
1158
|
+
import React3 from "react";
|
|
1159
|
+
import { Fragment, jsx as jsx15 } from "react/jsx-runtime";
|
|
1160
|
+
var ContextDefault = {
|
|
1161
|
+
isEmpty: true
|
|
1162
|
+
};
|
|
1163
|
+
var EmptyStateCtx = isSSR() ? {} : React3.createContext(ContextDefault);
|
|
1164
|
+
function useContext() {
|
|
1165
|
+
const context = React3.useContext(EmptyStateCtx);
|
|
1166
|
+
return isSSR() ? ContextDefault : context;
|
|
1167
|
+
}
|
|
1168
|
+
var EmptyStateContent = React3.forwardRef(function Content2(props, ref) {
|
|
1169
|
+
const { isEmpty } = useContext();
|
|
1170
|
+
if (!isEmpty) return null;
|
|
1171
|
+
return /* @__PURE__ */ jsx15(
|
|
1172
|
+
"div",
|
|
1173
|
+
__spreadProps(__spreadValues({}, props), {
|
|
1174
|
+
ref,
|
|
1175
|
+
className: cn("flex flex-col items-center gap-4", props.className)
|
|
1176
|
+
})
|
|
1177
|
+
);
|
|
1178
|
+
});
|
|
1179
|
+
var EmptyStateTitle = React3.forwardRef(function ESTitle(props, ref) {
|
|
1180
|
+
return /* @__PURE__ */ jsx15(
|
|
1181
|
+
"h6",
|
|
1182
|
+
__spreadProps(__spreadValues({
|
|
1183
|
+
ref
|
|
1184
|
+
}, props), {
|
|
1185
|
+
className: cn("font-500 text-center font-semibold", props.className)
|
|
1186
|
+
})
|
|
1187
|
+
);
|
|
1188
|
+
});
|
|
1189
|
+
var EmptyStateDescription = React3.forwardRef(function ESDescription(props, ref) {
|
|
1190
|
+
return /* @__PURE__ */ jsx15(
|
|
1191
|
+
"div",
|
|
1192
|
+
__spreadProps(__spreadValues({
|
|
1193
|
+
ref
|
|
1194
|
+
}, props), {
|
|
1195
|
+
className: cn("text-xs text-muted-foreground", props.className)
|
|
1196
|
+
})
|
|
1197
|
+
);
|
|
1198
|
+
});
|
|
1199
|
+
function EmptyStateConceal(props) {
|
|
1200
|
+
const { isEmpty } = useContext();
|
|
1201
|
+
if (isEmpty) return null;
|
|
1202
|
+
return /* @__PURE__ */ jsx15(Fragment, { children: props.children });
|
|
1203
|
+
}
|
|
1204
|
+
function EmptyState(props) {
|
|
1205
|
+
const { isEmpty = true, children } = props;
|
|
1206
|
+
if (isSSR()) return /* @__PURE__ */ jsx15(Fragment, { children });
|
|
1207
|
+
return /* @__PURE__ */ jsx15(EmptyStateCtx.Provider, { value: { isEmpty }, children });
|
|
1208
|
+
}
|
|
1114
1209
|
|
|
1115
1210
|
// src/components/molecules/modal.tsx
|
|
1116
1211
|
import { AnimatePresence, motion } from "motion/react";
|
|
1117
|
-
import { useEffect as
|
|
1212
|
+
import { useEffect as useEffect3 } from "react";
|
|
1118
1213
|
|
|
1119
1214
|
// src/hooks/is-mobile.ts
|
|
1120
|
-
import { useEffect, useState as
|
|
1215
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
1121
1216
|
var useIsMobile = () => {
|
|
1122
|
-
const [isMobile, setIsMobile] =
|
|
1123
|
-
|
|
1217
|
+
const [isMobile, setIsMobile] = useState3(false);
|
|
1218
|
+
useEffect2(() => {
|
|
1124
1219
|
const checkIsMobile = () => {
|
|
1125
1220
|
setIsMobile(window.innerWidth < 768);
|
|
1126
1221
|
};
|
|
@@ -1243,10 +1338,10 @@ var animationPresets = {
|
|
|
1243
1338
|
|
|
1244
1339
|
// src/@/ui/drawer.tsx
|
|
1245
1340
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
1246
|
-
import { Fragment, jsx as
|
|
1341
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1247
1342
|
function Drawer(_a) {
|
|
1248
1343
|
var props = __objRest(_a, []);
|
|
1249
|
-
return /* @__PURE__ */
|
|
1344
|
+
return /* @__PURE__ */ jsx16(DrawerPrimitive.Root, __spreadValues({ "data-slot": "drawer" }, props));
|
|
1250
1345
|
}
|
|
1251
1346
|
function DrawerOverlay(_a) {
|
|
1252
1347
|
var _b = _a, {
|
|
@@ -1254,7 +1349,7 @@ function DrawerOverlay(_a) {
|
|
|
1254
1349
|
} = _b, props = __objRest(_b, [
|
|
1255
1350
|
"className"
|
|
1256
1351
|
]);
|
|
1257
|
-
return /* @__PURE__ */
|
|
1352
|
+
return /* @__PURE__ */ jsx16(
|
|
1258
1353
|
DrawerPrimitive.Overlay,
|
|
1259
1354
|
__spreadValues({
|
|
1260
1355
|
"data-slot": "drawer-overlay",
|
|
@@ -1273,8 +1368,8 @@ function DrawerContent(_a) {
|
|
|
1273
1368
|
"className",
|
|
1274
1369
|
"children"
|
|
1275
1370
|
]);
|
|
1276
|
-
return /* @__PURE__ */ jsxs10(
|
|
1277
|
-
/* @__PURE__ */
|
|
1371
|
+
return /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1372
|
+
/* @__PURE__ */ jsx16(DrawerOverlay, {}),
|
|
1278
1373
|
/* @__PURE__ */ jsxs10(
|
|
1279
1374
|
DrawerPrimitive.Content,
|
|
1280
1375
|
__spreadProps(__spreadValues({
|
|
@@ -1289,7 +1384,7 @@ function DrawerContent(_a) {
|
|
|
1289
1384
|
)
|
|
1290
1385
|
}, props), {
|
|
1291
1386
|
children: [
|
|
1292
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ jsx16("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" }),
|
|
1293
1388
|
children
|
|
1294
1389
|
]
|
|
1295
1390
|
})
|
|
@@ -1298,14 +1393,14 @@ function DrawerContent(_a) {
|
|
|
1298
1393
|
}
|
|
1299
1394
|
|
|
1300
1395
|
// src/components/molecules/modal.tsx
|
|
1301
|
-
import { jsx as
|
|
1396
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1302
1397
|
var Modal = (props) => {
|
|
1303
1398
|
const { isOpen, children, onClose } = props;
|
|
1304
1399
|
const isMobile = useIsMobile();
|
|
1305
1400
|
if (isMobile) {
|
|
1306
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ jsx17(Drawer, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsx17(DrawerContent, { className: "bg-brand-black-550 border-brand-black-300 min-h-[90dvh]", children }) });
|
|
1307
1402
|
}
|
|
1308
|
-
return /* @__PURE__ */
|
|
1403
|
+
return /* @__PURE__ */ jsx17(DestkopModal, __spreadValues({}, props));
|
|
1309
1404
|
};
|
|
1310
1405
|
function DestkopModal(props) {
|
|
1311
1406
|
const {
|
|
@@ -1316,7 +1411,7 @@ function DestkopModal(props) {
|
|
|
1316
1411
|
className
|
|
1317
1412
|
} = props;
|
|
1318
1413
|
const { variants, transition } = animationPresets[animationPreset];
|
|
1319
|
-
|
|
1414
|
+
useEffect3(() => {
|
|
1320
1415
|
const handleEscapeKey = (event) => {
|
|
1321
1416
|
if (event.key === "Escape" && isOpen && onClose) {
|
|
1322
1417
|
onClose();
|
|
@@ -1329,7 +1424,7 @@ function DestkopModal(props) {
|
|
|
1329
1424
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
1330
1425
|
};
|
|
1331
1426
|
}, [isOpen, onClose]);
|
|
1332
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ jsx17(AnimatePresence, { mode: "wait", children: isOpen && /* @__PURE__ */ jsx17(
|
|
1333
1428
|
motion.div,
|
|
1334
1429
|
{
|
|
1335
1430
|
"data-modal": "true",
|
|
@@ -1347,103 +1442,6 @@ function DestkopModal(props) {
|
|
|
1347
1442
|
) });
|
|
1348
1443
|
}
|
|
1349
1444
|
|
|
1350
|
-
// src/hooks/selector-hooks.ts
|
|
1351
|
-
import { useState as useState4, useRef, useEffect as useEffect3 } from "react";
|
|
1352
|
-
var useScrollBorder = () => {
|
|
1353
|
-
const [showHeaderBorder, setShowHeaderBorder] = useState4(false);
|
|
1354
|
-
const scrollableRef = useRef(null);
|
|
1355
|
-
useEffect3(() => {
|
|
1356
|
-
const scrollableElement = scrollableRef.current;
|
|
1357
|
-
if (!scrollableElement) return;
|
|
1358
|
-
const handleScroll = () => {
|
|
1359
|
-
const { scrollTop, scrollHeight, clientHeight } = scrollableElement;
|
|
1360
|
-
const hasOverflow = scrollHeight > clientHeight;
|
|
1361
|
-
const hasScrolled = scrollTop > 0;
|
|
1362
|
-
setShowHeaderBorder(hasOverflow && hasScrolled);
|
|
1363
|
-
};
|
|
1364
|
-
handleScroll();
|
|
1365
|
-
scrollableElement.addEventListener("scroll", handleScroll);
|
|
1366
|
-
const resizeObserver = new ResizeObserver(handleScroll);
|
|
1367
|
-
resizeObserver.observe(scrollableElement);
|
|
1368
|
-
return () => {
|
|
1369
|
-
scrollableElement.removeEventListener("scroll", handleScroll);
|
|
1370
|
-
resizeObserver.disconnect();
|
|
1371
|
-
};
|
|
1372
|
-
}, []);
|
|
1373
|
-
return { showHeaderBorder, scrollableRef };
|
|
1374
|
-
};
|
|
1375
|
-
var useSearch = () => {
|
|
1376
|
-
const [searchQuery, setSearchQuery] = useState4("");
|
|
1377
|
-
const resetSearch = () => setSearchQuery("");
|
|
1378
|
-
return { searchQuery, setSearchQuery, resetSearch };
|
|
1379
|
-
};
|
|
1380
|
-
var filterItems = (items, searchQuery, searchFields) => {
|
|
1381
|
-
if (!searchQuery.trim()) return items;
|
|
1382
|
-
const query = searchQuery.toLowerCase();
|
|
1383
|
-
return items.filter(
|
|
1384
|
-
(item) => searchFields(item).some((field) => field.toLowerCase().includes(query))
|
|
1385
|
-
);
|
|
1386
|
-
};
|
|
1387
|
-
var sortItems = (items, sortFn) => {
|
|
1388
|
-
return [...items].sort(sortFn);
|
|
1389
|
-
};
|
|
1390
|
-
|
|
1391
|
-
// src/components/molecules/empty-state.tsx
|
|
1392
|
-
import React3 from "react";
|
|
1393
|
-
import { Fragment as Fragment2, jsx as jsx17 } from "react/jsx-runtime";
|
|
1394
|
-
var ContextDefault = {
|
|
1395
|
-
isEmpty: true
|
|
1396
|
-
};
|
|
1397
|
-
var EmptyStateCtx = isSSR() ? {} : React3.createContext(ContextDefault);
|
|
1398
|
-
function useContext() {
|
|
1399
|
-
const context = React3.useContext(EmptyStateCtx);
|
|
1400
|
-
return isSSR() ? ContextDefault : context;
|
|
1401
|
-
}
|
|
1402
|
-
var EmptyStateContent = React3.forwardRef(function Content2(props, ref) {
|
|
1403
|
-
const { isEmpty } = useContext();
|
|
1404
|
-
if (!isEmpty) return null;
|
|
1405
|
-
return /* @__PURE__ */ jsx17(
|
|
1406
|
-
"div",
|
|
1407
|
-
__spreadProps(__spreadValues({}, props), {
|
|
1408
|
-
ref,
|
|
1409
|
-
className: cn("flex flex-col items-center gap-4", props.className)
|
|
1410
|
-
})
|
|
1411
|
-
);
|
|
1412
|
-
});
|
|
1413
|
-
var EmptyStateTitle = React3.forwardRef(function ESTitle(props, ref) {
|
|
1414
|
-
return /* @__PURE__ */ jsx17(
|
|
1415
|
-
"h6",
|
|
1416
|
-
__spreadProps(__spreadValues({
|
|
1417
|
-
ref
|
|
1418
|
-
}, props), {
|
|
1419
|
-
className: cn("font-500 text-center font-semibold", props.className)
|
|
1420
|
-
})
|
|
1421
|
-
);
|
|
1422
|
-
});
|
|
1423
|
-
var EmptyStateDescription = React3.forwardRef(function ESDescription(props, ref) {
|
|
1424
|
-
return /* @__PURE__ */ jsx17(
|
|
1425
|
-
"div",
|
|
1426
|
-
__spreadProps(__spreadValues({
|
|
1427
|
-
ref
|
|
1428
|
-
}, props), {
|
|
1429
|
-
className: cn("text-xs text-muted-foreground", props.className)
|
|
1430
|
-
})
|
|
1431
|
-
);
|
|
1432
|
-
});
|
|
1433
|
-
function EmptyStateConceal(props) {
|
|
1434
|
-
const { isEmpty } = useContext();
|
|
1435
|
-
if (isEmpty) return null;
|
|
1436
|
-
return /* @__PURE__ */ jsx17(Fragment2, { children: props.children });
|
|
1437
|
-
}
|
|
1438
|
-
function EmptyState(props) {
|
|
1439
|
-
const { isEmpty = true, children } = props;
|
|
1440
|
-
if (isSSR()) return /* @__PURE__ */ jsx17(Fragment2, { children });
|
|
1441
|
-
return /* @__PURE__ */ jsx17(EmptyStateCtx.Provider, { value: { isEmpty }, children });
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
// src/components/network/network-selector.tsx
|
|
1445
|
-
import React5 from "react";
|
|
1446
|
-
|
|
1447
1445
|
// src/components/molecules/scroll-aware-area.tsx
|
|
1448
1446
|
import React4 from "react";
|
|
1449
1447
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
@@ -1602,12 +1600,14 @@ function NetworkSelectionItem(props) {
|
|
|
1602
1600
|
network,
|
|
1603
1601
|
disabled = false,
|
|
1604
1602
|
variant = "default",
|
|
1605
|
-
isActive
|
|
1603
|
+
isActive,
|
|
1604
|
+
SecondaryContent
|
|
1606
1605
|
} = _a, PROPS = __objRest(_a, [
|
|
1607
1606
|
"network",
|
|
1608
1607
|
"disabled",
|
|
1609
1608
|
"variant",
|
|
1610
|
-
"isActive"
|
|
1609
|
+
"isActive",
|
|
1610
|
+
"SecondaryContent"
|
|
1611
1611
|
]);
|
|
1612
1612
|
const buttonRef = React5.useRef(null);
|
|
1613
1613
|
const is_default_mode = variant === "default";
|
|
@@ -1647,7 +1647,7 @@ function NetworkSelectionItem(props) {
|
|
|
1647
1647
|
})
|
|
1648
1648
|
),
|
|
1649
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,
|
|
1650
|
-
variant === "secondary" ?
|
|
1650
|
+
variant === "secondary" ? SecondaryContent : null
|
|
1651
1651
|
]
|
|
1652
1652
|
}
|
|
1653
1653
|
);
|
|
@@ -3244,26 +3244,93 @@ function Progress(_a) {
|
|
|
3244
3244
|
);
|
|
3245
3245
|
}
|
|
3246
3246
|
|
|
3247
|
-
// src/
|
|
3247
|
+
// src/@/ui/tooltip.tsx
|
|
3248
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3248
3249
|
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3250
|
+
function TooltipProvider(_a) {
|
|
3251
|
+
var _b = _a, {
|
|
3252
|
+
delayDuration = 0
|
|
3253
|
+
} = _b, props = __objRest(_b, [
|
|
3254
|
+
"delayDuration"
|
|
3255
|
+
]);
|
|
3256
|
+
return /* @__PURE__ */ jsx35(
|
|
3257
|
+
TooltipPrimitive.Provider,
|
|
3258
|
+
__spreadValues({
|
|
3259
|
+
"data-slot": "tooltip-provider",
|
|
3260
|
+
delayDuration
|
|
3261
|
+
}, props)
|
|
3262
|
+
);
|
|
3263
|
+
}
|
|
3264
|
+
function Tooltip(_a) {
|
|
3265
|
+
var props = __objRest(_a, []);
|
|
3266
|
+
return /* @__PURE__ */ jsx35(TooltipProvider, { children: /* @__PURE__ */ jsx35(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
|
|
3267
|
+
}
|
|
3268
|
+
function TooltipTrigger(_a) {
|
|
3269
|
+
var props = __objRest(_a, []);
|
|
3270
|
+
return /* @__PURE__ */ jsx35(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
3271
|
+
}
|
|
3272
|
+
function TooltipContent(_a) {
|
|
3273
|
+
var _b = _a, {
|
|
3274
|
+
className,
|
|
3275
|
+
sideOffset = 0,
|
|
3276
|
+
children
|
|
3277
|
+
} = _b, props = __objRest(_b, [
|
|
3278
|
+
"className",
|
|
3279
|
+
"sideOffset",
|
|
3280
|
+
"children"
|
|
3281
|
+
]);
|
|
3282
|
+
return /* @__PURE__ */ jsx35(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs24(
|
|
3283
|
+
TooltipPrimitive.Content,
|
|
3284
|
+
__spreadProps(__spreadValues({
|
|
3285
|
+
"data-slot": "tooltip-content",
|
|
3286
|
+
sideOffset,
|
|
3287
|
+
className: cn(
|
|
3288
|
+
"bg-brand-black-600 text-brand-black-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
3289
|
+
className
|
|
3290
|
+
)
|
|
3291
|
+
}, props), {
|
|
3292
|
+
children: [
|
|
3293
|
+
children,
|
|
3294
|
+
/* @__PURE__ */ jsx35(TooltipPrimitive.Arrow, { className: "bg-brand-black-600 fill-brand-black-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
3295
|
+
]
|
|
3296
|
+
})
|
|
3297
|
+
) });
|
|
3298
|
+
}
|
|
3299
|
+
|
|
3300
|
+
// src/components/molecules/timeline.tsx
|
|
3301
|
+
import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3249
3302
|
var StatusTextMap = {
|
|
3250
3303
|
processing: "Processing",
|
|
3251
3304
|
upcoming: "Upcoming",
|
|
3252
3305
|
error: "Failed"
|
|
3253
3306
|
};
|
|
3254
|
-
|
|
3255
|
-
var
|
|
3256
|
-
const
|
|
3307
|
+
var TimelineItem = React13.forwardRef(function TimelineItem2(props, ref) {
|
|
3308
|
+
var _b, _c, _d, _e;
|
|
3309
|
+
const _a = props, {
|
|
3310
|
+
processingStatus,
|
|
3311
|
+
caption,
|
|
3312
|
+
secondary,
|
|
3313
|
+
data,
|
|
3314
|
+
durationMode = "none"
|
|
3315
|
+
} = _a, REST = __objRest(_a, [
|
|
3316
|
+
"processingStatus",
|
|
3317
|
+
"caption",
|
|
3318
|
+
"secondary",
|
|
3319
|
+
"data",
|
|
3320
|
+
"durationMode"
|
|
3321
|
+
]);
|
|
3257
3322
|
const is_visually_active = processingStatus !== "upcoming";
|
|
3258
3323
|
const id = React13.useId();
|
|
3259
3324
|
const layoutId = `${id}/${caption}/content-2`;
|
|
3260
3325
|
const hideTime = durationMode === "none";
|
|
3261
|
-
return /* @__PURE__ */
|
|
3326
|
+
return /* @__PURE__ */ jsx36(
|
|
3262
3327
|
motion3.li,
|
|
3263
|
-
{
|
|
3328
|
+
__spreadProps(__spreadValues({
|
|
3329
|
+
ref
|
|
3330
|
+
}, REST), {
|
|
3264
3331
|
"data-process-status": processingStatus,
|
|
3265
3332
|
className: "block bg-brand-black-350 cursor-default select-none font-medium text-brand-white-500",
|
|
3266
|
-
children: /* @__PURE__ */
|
|
3333
|
+
children: /* @__PURE__ */ jsxs25(
|
|
3267
3334
|
motion3.div,
|
|
3268
3335
|
{
|
|
3269
3336
|
initial: { opacity: 0.5 },
|
|
@@ -3272,7 +3339,7 @@ function TimelineItem(props) {
|
|
|
3272
3339
|
},
|
|
3273
3340
|
className: "flex h-[3.5rem] items-center gap-[0.86rem] py-[0.5625rem] px-[0.75rem] ",
|
|
3274
3341
|
children: [
|
|
3275
|
-
props.level === 0 ? /* @__PURE__ */
|
|
3342
|
+
props.level === 0 ? /* @__PURE__ */ jsx36(BadgeIcon, __spreadValues({}, props.badge)) : /* @__PURE__ */ jsx36(
|
|
3276
3343
|
IconButton,
|
|
3277
3344
|
{
|
|
3278
3345
|
variant: "level_2",
|
|
@@ -3282,7 +3349,7 @@ function TimelineItem(props) {
|
|
|
3282
3349
|
style: {
|
|
3283
3350
|
boxShadow: "0 4px 24px 0 rgba(255, 255, 255, 0.05) inset"
|
|
3284
3351
|
},
|
|
3285
|
-
children: /* @__PURE__ */
|
|
3352
|
+
children: /* @__PURE__ */ jsx36(
|
|
3286
3353
|
"span",
|
|
3287
3354
|
{
|
|
3288
3355
|
className: cn(
|
|
@@ -3296,9 +3363,9 @@ function TimelineItem(props) {
|
|
|
3296
3363
|
)
|
|
3297
3364
|
}
|
|
3298
3365
|
),
|
|
3299
|
-
/* @__PURE__ */
|
|
3300
|
-
/* @__PURE__ */
|
|
3301
|
-
/* @__PURE__ */
|
|
3366
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col flex-1 gap-[calc(4/16rem)]", children: [
|
|
3367
|
+
/* @__PURE__ */ jsx36("div", { className: "text-brand-white-500 text-[1rem] h-[1.25rem]", children: caption }),
|
|
3368
|
+
/* @__PURE__ */ jsx36("div", { className: "text-xs h-[1rem] text-brand-black-100", children: processingStatus === "completed" ? ((_b = props.data) == null ? void 0 : _b.transactionUrl) ? /* @__PURE__ */ jsxs25(
|
|
3302
3369
|
"a",
|
|
3303
3370
|
{
|
|
3304
3371
|
href: props.data.transactionUrl,
|
|
@@ -3306,14 +3373,14 @@ function TimelineItem(props) {
|
|
|
3306
3373
|
target: "_blank",
|
|
3307
3374
|
rel: "noopener noreferrer",
|
|
3308
3375
|
children: [
|
|
3309
|
-
/* @__PURE__ */
|
|
3310
|
-
/* @__PURE__ */
|
|
3376
|
+
/* @__PURE__ */ jsx36("span", { children: "View in explorer " }),
|
|
3377
|
+
/* @__PURE__ */ jsx36(ArrowUpRight_default, { width: "0.75rem", height: "0.75rem" })
|
|
3311
3378
|
]
|
|
3312
3379
|
}
|
|
3313
|
-
) : /* @__PURE__ */
|
|
3380
|
+
) : /* @__PURE__ */ jsx36("span", { children: props.secondary }) : /* @__PURE__ */ jsx36("span", { children: (_c = props == null ? void 0 : props.secondary) != null ? _c : StatusTextMap[processingStatus] }) })
|
|
3314
3381
|
] }),
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
processingStatus === "completed" ? /* @__PURE__ */
|
|
3382
|
+
/* @__PURE__ */ jsxs25(AnimatePresence2, { children: [
|
|
3383
|
+
processingStatus === "completed" ? /* @__PURE__ */ jsxs25(
|
|
3317
3384
|
motion3.div,
|
|
3318
3385
|
{
|
|
3319
3386
|
layoutId,
|
|
@@ -3322,8 +3389,8 @@ function TimelineItem(props) {
|
|
|
3322
3389
|
exit: { x: 10, opacity: 0 },
|
|
3323
3390
|
className: "flex gap-[calc(8rem/16)] items-center",
|
|
3324
3391
|
children: [
|
|
3325
|
-
!hideTime && /* @__PURE__ */
|
|
3326
|
-
/* @__PURE__ */
|
|
3392
|
+
!hideTime && /* @__PURE__ */ jsx36("span", { className: "text-[calc(13rem/16)] text-brand-black-100", children: (_d = props == null ? void 0 : props.data) == null ? void 0 : _d.completedIn }),
|
|
3393
|
+
/* @__PURE__ */ jsx36(
|
|
3327
3394
|
Check_default,
|
|
3328
3395
|
{
|
|
3329
3396
|
height: "1rem",
|
|
@@ -3334,7 +3401,7 @@ function TimelineItem(props) {
|
|
|
3334
3401
|
]
|
|
3335
3402
|
}
|
|
3336
3403
|
) : null,
|
|
3337
|
-
processingStatus === "processing" ? /* @__PURE__ */
|
|
3404
|
+
processingStatus === "processing" ? /* @__PURE__ */ jsxs25(
|
|
3338
3405
|
motion3.div,
|
|
3339
3406
|
{
|
|
3340
3407
|
initial: { x: 10, opacity: 0 },
|
|
@@ -3343,8 +3410,8 @@ function TimelineItem(props) {
|
|
|
3343
3410
|
layoutId,
|
|
3344
3411
|
className: "flex gap-[calc(10rem/16)] items-center",
|
|
3345
3412
|
children: [
|
|
3346
|
-
!hideTime && /* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
3413
|
+
!hideTime && /* @__PURE__ */ jsx36("span", { className: "text-[calc(13rem/16)]", children: (_e = props == null ? void 0 : props.data) == null ? void 0 : _e.eta }),
|
|
3414
|
+
/* @__PURE__ */ jsx36(
|
|
3348
3415
|
Loader2,
|
|
3349
3416
|
{
|
|
3350
3417
|
size: "1rem",
|
|
@@ -3358,17 +3425,17 @@ function TimelineItem(props) {
|
|
|
3358
3425
|
]
|
|
3359
3426
|
}
|
|
3360
3427
|
)
|
|
3361
|
-
}
|
|
3428
|
+
})
|
|
3362
3429
|
);
|
|
3363
|
-
}
|
|
3430
|
+
});
|
|
3364
3431
|
function TimelineListGroup(props) {
|
|
3365
|
-
return /* @__PURE__ */
|
|
3432
|
+
return /* @__PURE__ */ jsx36("ul", { className: cn("flex flex-col overflow-hidden"), children: props.children });
|
|
3366
3433
|
}
|
|
3367
3434
|
function TimelineList(props) {
|
|
3368
|
-
return /* @__PURE__ */
|
|
3435
|
+
return /* @__PURE__ */ jsx36("ul", { className: "flex flex-col", children: props.children });
|
|
3369
3436
|
}
|
|
3370
3437
|
var TimelineRoot = React13.forwardRef((props, ref) => {
|
|
3371
|
-
return /* @__PURE__ */
|
|
3438
|
+
return /* @__PURE__ */ jsx36(
|
|
3372
3439
|
"ul",
|
|
3373
3440
|
__spreadProps(__spreadValues({
|
|
3374
3441
|
ref
|
|
@@ -3387,9 +3454,16 @@ var trackColorMap = {
|
|
|
3387
3454
|
default: "var(--color-brand-black-100)"
|
|
3388
3455
|
};
|
|
3389
3456
|
function TransactionTimer(props) {
|
|
3390
|
-
const {
|
|
3391
|
-
|
|
3392
|
-
|
|
3457
|
+
const {
|
|
3458
|
+
mins,
|
|
3459
|
+
hours,
|
|
3460
|
+
seconds,
|
|
3461
|
+
severity = "warning",
|
|
3462
|
+
tooltipContent,
|
|
3463
|
+
timerMessage = "Transaction will timeout in"
|
|
3464
|
+
} = props;
|
|
3465
|
+
return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-[calc(6rem/16)]", children: [
|
|
3466
|
+
/* @__PURE__ */ jsxs25(
|
|
3393
3467
|
"div",
|
|
3394
3468
|
{
|
|
3395
3469
|
className: cn(
|
|
@@ -3400,19 +3474,22 @@ function TransactionTimer(props) {
|
|
|
3400
3474
|
}
|
|
3401
3475
|
),
|
|
3402
3476
|
children: [
|
|
3403
|
-
/* @__PURE__ */
|
|
3404
|
-
/* @__PURE__ */
|
|
3477
|
+
/* @__PURE__ */ jsx36("span", { children: timerMessage }),
|
|
3478
|
+
/* @__PURE__ */ jsxs25("span", { className: "text-brand-white-500", children: [
|
|
3405
3479
|
String(hours).padStart(2, "0"),
|
|
3406
3480
|
":",
|
|
3407
3481
|
String(mins).padStart(2, "0"),
|
|
3408
3482
|
":",
|
|
3409
3483
|
String(seconds).padStart(2, "0")
|
|
3410
3484
|
] }),
|
|
3411
|
-
/* @__PURE__ */
|
|
3485
|
+
tooltipContent && /* @__PURE__ */ jsx36(TooltipProvider, { children: /* @__PURE__ */ jsxs25(Tooltip, { children: [
|
|
3486
|
+
/* @__PURE__ */ jsx36(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx36("span", { children: /* @__PURE__ */ jsx36(CircleInfo_default, { width: "1em", height: "1em" }) }) }),
|
|
3487
|
+
/* @__PURE__ */ jsx36(TooltipContent, { children: /* @__PURE__ */ jsx36("p", { children: tooltipContent }) })
|
|
3488
|
+
] }) })
|
|
3412
3489
|
]
|
|
3413
3490
|
}
|
|
3414
3491
|
),
|
|
3415
|
-
/* @__PURE__ */
|
|
3492
|
+
/* @__PURE__ */ jsx36(
|
|
3416
3493
|
Progress,
|
|
3417
3494
|
{
|
|
3418
3495
|
value: props.progress,
|
|
@@ -3426,7 +3503,7 @@ function TransactionTimer(props) {
|
|
|
3426
3503
|
}
|
|
3427
3504
|
function TimerWrap(props) {
|
|
3428
3505
|
const show = props.reveal;
|
|
3429
|
-
return /* @__PURE__ */
|
|
3506
|
+
return /* @__PURE__ */ jsxs25(
|
|
3430
3507
|
motion3.div,
|
|
3431
3508
|
{
|
|
3432
3509
|
initial: { paddingTop: 0 },
|
|
@@ -3436,7 +3513,7 @@ function TimerWrap(props) {
|
|
|
3436
3513
|
},
|
|
3437
3514
|
className: "flex flex-col items-stretch justify-start relative",
|
|
3438
3515
|
children: [
|
|
3439
|
-
/* @__PURE__ */
|
|
3516
|
+
/* @__PURE__ */ jsx36(
|
|
3440
3517
|
"div",
|
|
3441
3518
|
{
|
|
3442
3519
|
className: cn(
|
|
@@ -3446,7 +3523,7 @@ function TimerWrap(props) {
|
|
|
3446
3523
|
children: props.Timer
|
|
3447
3524
|
}
|
|
3448
3525
|
),
|
|
3449
|
-
/* @__PURE__ */
|
|
3526
|
+
/* @__PURE__ */ jsx36(
|
|
3450
3527
|
Slot9,
|
|
3451
3528
|
{
|
|
3452
3529
|
className: cn("min-h-[calc(56rem/11)] z-20 relative !rounded-[1rem]", {
|
|
@@ -3461,7 +3538,7 @@ function TimerWrap(props) {
|
|
|
3461
3538
|
}
|
|
3462
3539
|
|
|
3463
3540
|
// src/components/molecules/toast.tsx
|
|
3464
|
-
import { Fragment as Fragment8, jsx as
|
|
3541
|
+
import { Fragment as Fragment8, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3465
3542
|
var SeverityConfig = {
|
|
3466
3543
|
error: {
|
|
3467
3544
|
icon: Alert_default,
|
|
@@ -3487,23 +3564,23 @@ function ToastBox(props) {
|
|
|
3487
3564
|
event.stopPropagation();
|
|
3488
3565
|
onDismiss == null ? void 0 : onDismiss(event);
|
|
3489
3566
|
};
|
|
3490
|
-
return /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ jsx37(SmoothCorners, { size: "sm", children: /* @__PURE__ */ jsxs26(
|
|
3491
3568
|
"div",
|
|
3492
3569
|
{
|
|
3493
3570
|
"data-is-toast": "true",
|
|
3494
3571
|
className: "bg-brand-black-500 flex flex-col md:flex-row gap-[0.75rem] items-start py-[calc(10rem/16)] px-[calc(12rem/16)] text-muted-foreground",
|
|
3495
3572
|
children: [
|
|
3496
|
-
/* @__PURE__ */
|
|
3573
|
+
/* @__PURE__ */ jsx37(
|
|
3497
3574
|
"div",
|
|
3498
3575
|
{
|
|
3499
3576
|
className: cn("items-center justify-center shrink-0 grow-0", color),
|
|
3500
3577
|
style: { fontSize: "calc(calc(24/16) * 1rem)" },
|
|
3501
|
-
children: /* @__PURE__ */
|
|
3578
|
+
children: /* @__PURE__ */ jsx37(Icon, { width: "1em", height: "1em" })
|
|
3502
3579
|
}
|
|
3503
3580
|
),
|
|
3504
|
-
/* @__PURE__ */
|
|
3505
|
-
/* @__PURE__ */
|
|
3506
|
-
/* @__PURE__ */
|
|
3581
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex flex-col flex-1", children: [
|
|
3582
|
+
/* @__PURE__ */ jsx37(Text, { variant: "body1", className: "text-foreground", children: props.heading }),
|
|
3583
|
+
/* @__PURE__ */ jsx37(
|
|
3507
3584
|
Text,
|
|
3508
3585
|
{
|
|
3509
3586
|
variant: "caption2",
|
|
@@ -3512,9 +3589,9 @@ function ToastBox(props) {
|
|
|
3512
3589
|
}
|
|
3513
3590
|
)
|
|
3514
3591
|
] }),
|
|
3515
|
-
/* @__PURE__ */
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ jsx37("div", { className: "flex gap-[calc(6rem/16)] items-center self-center w-full md:w-auto", children: actions ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
3593
|
+
/* @__PURE__ */ jsx37("div", { className: "flex gap-[calc(6rem/16)] flex-1 items-center *:flex-1", children: actions }),
|
|
3594
|
+
/* @__PURE__ */ jsx37(
|
|
3518
3595
|
IconButton,
|
|
3519
3596
|
{
|
|
3520
3597
|
className: "cursor-pointer",
|
|
@@ -3522,10 +3599,10 @@ function ToastBox(props) {
|
|
|
3522
3599
|
size: "smx",
|
|
3523
3600
|
variant: "level_2",
|
|
3524
3601
|
rounded: "default",
|
|
3525
|
-
children: /* @__PURE__ */
|
|
3602
|
+
children: /* @__PURE__ */ jsx37(XIcon_default, { width: "1rem" })
|
|
3526
3603
|
}
|
|
3527
3604
|
)
|
|
3528
|
-
] }) : /* @__PURE__ */
|
|
3605
|
+
] }) : /* @__PURE__ */ jsx37(
|
|
3529
3606
|
Button2,
|
|
3530
3607
|
{
|
|
3531
3608
|
size: "sm",
|
|
@@ -3542,10 +3619,10 @@ function ToastBox(props) {
|
|
|
3542
3619
|
|
|
3543
3620
|
// src/components/molecules/transaction-list.tsx
|
|
3544
3621
|
import { motion as motion4 } from "motion/react";
|
|
3545
|
-
import { Fragment as Fragment9, jsx as
|
|
3622
|
+
import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3546
3623
|
function TxListItemProcessing(props) {
|
|
3547
|
-
return /* @__PURE__ */
|
|
3548
|
-
/* @__PURE__ */
|
|
3624
|
+
return /* @__PURE__ */ jsx38(GradientContainer, { children: /* @__PURE__ */ jsxs27("div", { className: "rounded-[1rem] bg-brand-black-350 px-[0.75rem] h-[3.75rem] flex items-center", children: [
|
|
3625
|
+
/* @__PURE__ */ jsx38(
|
|
3549
3626
|
GradientLine,
|
|
3550
3627
|
{
|
|
3551
3628
|
behaviour: "progress",
|
|
@@ -3553,8 +3630,8 @@ function TxListItemProcessing(props) {
|
|
|
3553
3630
|
mode: props.status === "failed" ? "error" : "default"
|
|
3554
3631
|
}
|
|
3555
3632
|
),
|
|
3556
|
-
/* @__PURE__ */
|
|
3557
|
-
/* @__PURE__ */
|
|
3633
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex gap-[1rem] flex-1 z-20 text-brand-black-100 font-medium", children: [
|
|
3634
|
+
/* @__PURE__ */ jsx38(
|
|
3558
3635
|
TokenTransferPair,
|
|
3559
3636
|
{
|
|
3560
3637
|
fromToken: props.from,
|
|
@@ -3562,48 +3639,48 @@ function TxListItemProcessing(props) {
|
|
|
3562
3639
|
size: "2rem"
|
|
3563
3640
|
}
|
|
3564
3641
|
),
|
|
3565
|
-
/* @__PURE__ */
|
|
3566
|
-
/* @__PURE__ */
|
|
3567
|
-
/* @__PURE__ */
|
|
3642
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex flex-grow flex-col text-start", children: [
|
|
3643
|
+
/* @__PURE__ */ jsx38("span", { className: "text-brand-white-500 whitespace-nowrap text-[0.875rem] h-[1.25rem]", children: props.caption }),
|
|
3644
|
+
/* @__PURE__ */ jsxs27(StatusBadge, { variant: props.status === "failed" ? "error" : "none", children: [
|
|
3568
3645
|
"~ ",
|
|
3569
3646
|
props.eta
|
|
3570
3647
|
] })
|
|
3571
3648
|
] }),
|
|
3572
|
-
/* @__PURE__ */
|
|
3649
|
+
/* @__PURE__ */ jsx38("div", { className: "basis-4/12 max-w-xs shrink-0 flex justify-end h-[2.25rem] whitespace-nowrap", children: /* @__PURE__ */ jsxs27(
|
|
3573
3650
|
motion4.div,
|
|
3574
3651
|
{
|
|
3575
3652
|
initial: { y: 0 },
|
|
3576
3653
|
animate: { y: props.status === "failed" ? "-100%" : 0 },
|
|
3577
3654
|
className: "grid",
|
|
3578
3655
|
children: [
|
|
3579
|
-
/* @__PURE__ */
|
|
3656
|
+
/* @__PURE__ */ jsxs27(
|
|
3580
3657
|
motion4.div,
|
|
3581
3658
|
{
|
|
3582
3659
|
animate: { opacity: props.status === "processing" ? 1 : 0 },
|
|
3583
3660
|
className: "flex flex-col text-end h-[2.25rem]",
|
|
3584
3661
|
children: [
|
|
3585
|
-
/* @__PURE__ */
|
|
3586
|
-
/* @__PURE__ */
|
|
3662
|
+
/* @__PURE__ */ jsx38("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: props.amount }),
|
|
3663
|
+
/* @__PURE__ */ jsxs27("span", { className: "text-xs h-[1rem]", children: [
|
|
3587
3664
|
props.percentage,
|
|
3588
3665
|
"%"
|
|
3589
3666
|
] })
|
|
3590
3667
|
]
|
|
3591
3668
|
}
|
|
3592
3669
|
),
|
|
3593
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ jsxs27(
|
|
3594
3671
|
motion4.div,
|
|
3595
3672
|
{
|
|
3596
3673
|
animate: { opacity: props.status === "failed" ? 1 : 0 },
|
|
3597
3674
|
className: "flex gap-[0.75rem] items-center h-[2.25rem] justify-end",
|
|
3598
3675
|
children: [
|
|
3599
|
-
/* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
3676
|
+
/* @__PURE__ */ jsx38("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: props.amount }),
|
|
3677
|
+
/* @__PURE__ */ jsx38(
|
|
3601
3678
|
IconButton,
|
|
3602
3679
|
{
|
|
3603
3680
|
variant: "destructive",
|
|
3604
3681
|
rounded: "default",
|
|
3605
3682
|
size: "smx",
|
|
3606
|
-
children: /* @__PURE__ */
|
|
3683
|
+
children: /* @__PURE__ */ jsx38(RotateCcw_default, { className: "size-4 text-[currentColor]" })
|
|
3607
3684
|
}
|
|
3608
3685
|
)
|
|
3609
3686
|
]
|
|
@@ -3617,7 +3694,7 @@ function TxListItemProcessing(props) {
|
|
|
3617
3694
|
}
|
|
3618
3695
|
var TxListItem = function TxListItem2(props) {
|
|
3619
3696
|
const _a = props, { caption, completedAt, mode, from, to, amount } = _a, rest = __objRest(_a, ["caption", "completedAt", "mode", "from", "to", "amount"]);
|
|
3620
|
-
return /* @__PURE__ */
|
|
3697
|
+
return /* @__PURE__ */ jsx38(
|
|
3621
3698
|
"button",
|
|
3622
3699
|
__spreadProps(__spreadValues({}, rest), {
|
|
3623
3700
|
type: "button",
|
|
@@ -3625,15 +3702,15 @@ var TxListItem = function TxListItem2(props) {
|
|
|
3625
3702
|
"apperance-none rounded-[1rem] bg-brand-black-350 px-[0.75rem] h-[3.75rem] flex items-center",
|
|
3626
3703
|
props.className
|
|
3627
3704
|
),
|
|
3628
|
-
children: /* @__PURE__ */
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3631
|
-
/* @__PURE__ */
|
|
3632
|
-
/* @__PURE__ */
|
|
3705
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "flex gap-[1rem] flex-1 z-20 text-brand-black-100 font-medium", children: [
|
|
3706
|
+
/* @__PURE__ */ jsx38(TokenTransferPair, { fromToken: from, toToken: to, size: "2rem" }),
|
|
3707
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex flex-grow flex-col text-start whitespace-nowrap", children: [
|
|
3708
|
+
/* @__PURE__ */ jsx38("span", { className: "text-brand-white-500 text-[0.875rem] h-[1.25rem]", children: caption }),
|
|
3709
|
+
/* @__PURE__ */ jsx38(StatusBadge, { variant: mode === "rollback" ? "refunded" : "success" })
|
|
3633
3710
|
] }),
|
|
3634
|
-
/* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3636
|
-
/* @__PURE__ */
|
|
3711
|
+
/* @__PURE__ */ jsxs27("div", { className: "shrink-0 flex flex-col text-end", children: [
|
|
3712
|
+
/* @__PURE__ */ jsx38("span", { className: "text-base text-brand-white-500 h-[1.25rem]", children: amount }),
|
|
3713
|
+
/* @__PURE__ */ jsx38("span", { className: "text-xs h-[1rem]", children: completedAt })
|
|
3637
3714
|
] })
|
|
3638
3715
|
] })
|
|
3639
3716
|
})
|
|
@@ -3643,18 +3720,18 @@ function StatusBadge({
|
|
|
3643
3720
|
variant,
|
|
3644
3721
|
children
|
|
3645
3722
|
}) {
|
|
3646
|
-
return /* @__PURE__ */
|
|
3647
|
-
variant === "success" ? /* @__PURE__ */
|
|
3648
|
-
/* @__PURE__ */
|
|
3723
|
+
return /* @__PURE__ */ jsxs27("span", { className: "text-xs h-[1rem] flex items-center gap-[0.125rem]", children: [
|
|
3724
|
+
variant === "success" ? /* @__PURE__ */ jsxs27("span", { className: "text-brand-success-400 flex items-center gap-[0.125rem]", children: [
|
|
3725
|
+
/* @__PURE__ */ jsx38(Check_default, { width: "0.75rem", height: "0.75rem" }),
|
|
3649
3726
|
" ",
|
|
3650
|
-
/* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ jsx38("span", { children: "Success" })
|
|
3651
3728
|
] }) : null,
|
|
3652
|
-
variant === "refunded" ? /* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3729
|
+
variant === "refunded" ? /* @__PURE__ */ jsxs27(Fragment9, { children: [
|
|
3730
|
+
/* @__PURE__ */ jsx38(StepBack_default, { strokeWidth: 2, width: "0.75rem", height: "0.75rem" }),
|
|
3731
|
+
/* @__PURE__ */ jsx38("span", { children: "Refunded" })
|
|
3655
3732
|
] }) : null,
|
|
3656
|
-
variant === "error" ? /* @__PURE__ */
|
|
3657
|
-
/* @__PURE__ */
|
|
3733
|
+
variant === "error" ? /* @__PURE__ */ jsxs27(Fragment9, { children: [
|
|
3734
|
+
/* @__PURE__ */ jsx38(
|
|
3658
3735
|
Alert_default,
|
|
3659
3736
|
{
|
|
3660
3737
|
width: "0.75rem",
|
|
@@ -3662,13 +3739,13 @@ function StatusBadge({
|
|
|
3662
3739
|
className: "text-brand-danger-500"
|
|
3663
3740
|
}
|
|
3664
3741
|
),
|
|
3665
|
-
/* @__PURE__ */
|
|
3742
|
+
/* @__PURE__ */ jsx38("span", { className: "text-brand-danger-500", children: "Order expired" })
|
|
3666
3743
|
] }) : null,
|
|
3667
3744
|
variant === "none" ? children : null
|
|
3668
3745
|
] });
|
|
3669
3746
|
}
|
|
3670
3747
|
function TxList({ children }) {
|
|
3671
|
-
return /* @__PURE__ */
|
|
3748
|
+
return /* @__PURE__ */ jsx38("ul", { className: "flex flex-col gap-[0.5rem]", children });
|
|
3672
3749
|
}
|
|
3673
3750
|
|
|
3674
3751
|
// src/components/molecules/wallet-header.tsx
|
|
@@ -3682,14 +3759,14 @@ import * as Tab_ from "@radix-ui/react-tabs";
|
|
|
3682
3759
|
|
|
3683
3760
|
// src/@/ui/tabs.tsx
|
|
3684
3761
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3685
|
-
import { jsx as
|
|
3762
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3686
3763
|
function Tabs(_a) {
|
|
3687
3764
|
var _b = _a, {
|
|
3688
3765
|
className
|
|
3689
3766
|
} = _b, props = __objRest(_b, [
|
|
3690
3767
|
"className"
|
|
3691
3768
|
]);
|
|
3692
|
-
return /* @__PURE__ */
|
|
3769
|
+
return /* @__PURE__ */ jsx39(
|
|
3693
3770
|
TabsPrimitive.Root,
|
|
3694
3771
|
__spreadValues({
|
|
3695
3772
|
"data-slot": "tabs",
|
|
@@ -3703,7 +3780,7 @@ function TabsContent(_a) {
|
|
|
3703
3780
|
} = _b, props = __objRest(_b, [
|
|
3704
3781
|
"className"
|
|
3705
3782
|
]);
|
|
3706
|
-
return /* @__PURE__ */
|
|
3783
|
+
return /* @__PURE__ */ jsx39(
|
|
3707
3784
|
TabsPrimitive.Content,
|
|
3708
3785
|
__spreadValues({
|
|
3709
3786
|
"data-slot": "tabs-content",
|
|
@@ -3713,12 +3790,12 @@ function TabsContent(_a) {
|
|
|
3713
3790
|
}
|
|
3714
3791
|
|
|
3715
3792
|
// src/components/organisms/assets-collection.tsx
|
|
3716
|
-
import { jsx as
|
|
3793
|
+
import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3717
3794
|
function TabsList2(props) {
|
|
3718
|
-
return /* @__PURE__ */
|
|
3795
|
+
return /* @__PURE__ */ jsx40("nav", { className: "flex flex-col", children: /* @__PURE__ */ jsx40(Tab_.TabsList, { asChild: true, children: /* @__PURE__ */ jsx40("ul", { className: "flex p-0 bg-transparent gap-3", children: props.children }) }) });
|
|
3719
3796
|
}
|
|
3720
3797
|
function TabItem(props) {
|
|
3721
|
-
return /* @__PURE__ */
|
|
3798
|
+
return /* @__PURE__ */ jsx40(
|
|
3722
3799
|
Tab_.TabsTrigger,
|
|
3723
3800
|
{
|
|
3724
3801
|
value: props.value,
|
|
@@ -3731,7 +3808,7 @@ function AssetValueTrend(props) {
|
|
|
3731
3808
|
const { percentage = 0, direction: dir, dollarValue = 0 } = props;
|
|
3732
3809
|
const isZero = dollarValue === 0;
|
|
3733
3810
|
const isUp = isZero ? "up" : dir === "up";
|
|
3734
|
-
return /* @__PURE__ */
|
|
3811
|
+
return /* @__PURE__ */ jsxs28(
|
|
3735
3812
|
"div",
|
|
3736
3813
|
{
|
|
3737
3814
|
className: "inline-flex select-none gap-[0.125rem] text-brand-black-100 h-[1rem] text-[0.7rem] font-medium items-center",
|
|
@@ -3740,7 +3817,7 @@ function AssetValueTrend(props) {
|
|
|
3740
3817
|
"--trend-color": isZero ? "inherit" : !isUp ? "var(--color-brand-danger-500, indigo)" : "var(--color-brand-success-400, cyan)"
|
|
3741
3818
|
},
|
|
3742
3819
|
children: [
|
|
3743
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ jsx40("span", { className: "text-[var(--trend-color)]", children: /* @__PURE__ */ jsx40(
|
|
3744
3821
|
ArrowTriangleBottom_default,
|
|
3745
3822
|
{
|
|
3746
3823
|
width: "0.75rem",
|
|
@@ -3751,13 +3828,13 @@ function AssetValueTrend(props) {
|
|
|
3751
3828
|
)
|
|
3752
3829
|
}
|
|
3753
3830
|
) }),
|
|
3754
|
-
/* @__PURE__ */
|
|
3755
|
-
/* @__PURE__ */
|
|
3831
|
+
/* @__PURE__ */ jsxs28("span", { className: "flex items-center", children: [
|
|
3832
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-[var(--trend-color)]", children: [
|
|
3756
3833
|
"$",
|
|
3757
3834
|
dollarValue
|
|
3758
3835
|
] }),
|
|
3759
3836
|
"\xA0",
|
|
3760
|
-
/* @__PURE__ */
|
|
3837
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-[var(--trend-base)]", children: [
|
|
3761
3838
|
"(",
|
|
3762
3839
|
percentage,
|
|
3763
3840
|
"%)"
|
|
@@ -3775,8 +3852,8 @@ function Balance(props) {
|
|
|
3775
3852
|
const [int_, decimal] = String(props.amount).split(".");
|
|
3776
3853
|
const int = Number.isNaN(+int_) ? 0 : int_;
|
|
3777
3854
|
const is_zero = props.amount === 0;
|
|
3778
|
-
return /* @__PURE__ */
|
|
3779
|
-
/* @__PURE__ */
|
|
3855
|
+
return /* @__PURE__ */ jsx40("div", { className: "select-none", children: /* @__PURE__ */ jsxs28("span", { className: "text-[2.375rem] font-medium leading-[2.875rem] whitespace-nowrap", children: [
|
|
3856
|
+
/* @__PURE__ */ jsxs28(
|
|
3780
3857
|
"span",
|
|
3781
3858
|
{
|
|
3782
3859
|
className: cn(
|
|
@@ -3788,11 +3865,11 @@ function Balance(props) {
|
|
|
3788
3865
|
]
|
|
3789
3866
|
}
|
|
3790
3867
|
),
|
|
3791
|
-
/* @__PURE__ */
|
|
3868
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-brand-black-100", children: [
|
|
3792
3869
|
".",
|
|
3793
3870
|
decimal != null ? decimal : "00"
|
|
3794
3871
|
] }),
|
|
3795
|
-
/* @__PURE__ */
|
|
3872
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-brand-white-500", children: [
|
|
3796
3873
|
"\xA0",
|
|
3797
3874
|
suffix
|
|
3798
3875
|
] })
|
|
@@ -3800,7 +3877,7 @@ function Balance(props) {
|
|
|
3800
3877
|
}
|
|
3801
3878
|
|
|
3802
3879
|
// src/components/molecules/wallet-header.tsx
|
|
3803
|
-
import { Fragment as Fragment11, jsx as
|
|
3880
|
+
import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3804
3881
|
var WalletHeaderContext = React14.createContext(null);
|
|
3805
3882
|
function useWalletHeader() {
|
|
3806
3883
|
const context = React14.useContext(WalletHeaderContext);
|
|
@@ -3846,7 +3923,7 @@ var WalletHeader = React14.forwardRef(
|
|
|
3846
3923
|
React14.useEffect(() => {
|
|
3847
3924
|
globalWalletHeaderState = show;
|
|
3848
3925
|
}, [show]);
|
|
3849
|
-
return /* @__PURE__ */
|
|
3926
|
+
return /* @__PURE__ */ jsx41(WalletHeaderContext.Provider, { value: { show, setShow }, children: /* @__PURE__ */ jsx41(
|
|
3850
3927
|
Comp,
|
|
3851
3928
|
__spreadProps(__spreadValues({
|
|
3852
3929
|
ref,
|
|
@@ -3862,7 +3939,7 @@ WalletHeader.displayName = "WalletHeader";
|
|
|
3862
3939
|
var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
|
|
3863
3940
|
var _b = _a, { className, accounts, children } = _b, props = __objRest(_b, ["className", "accounts", "children"]);
|
|
3864
3941
|
const { show: open, setShow } = useWalletHeader();
|
|
3865
|
-
return /* @__PURE__ */
|
|
3942
|
+
return /* @__PURE__ */ jsx41(
|
|
3866
3943
|
"button",
|
|
3867
3944
|
__spreadProps(__spreadValues({
|
|
3868
3945
|
ref,
|
|
@@ -3876,9 +3953,9 @@ var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
|
|
|
3876
3953
|
),
|
|
3877
3954
|
onClick: () => setShow((e) => !e)
|
|
3878
3955
|
}, props), {
|
|
3879
|
-
children: /* @__PURE__ */
|
|
3880
|
-
children || /* @__PURE__ */
|
|
3881
|
-
/* @__PURE__ */
|
|
3956
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "flex w-full gap-2 justify-between items-center", children: [
|
|
3957
|
+
children || /* @__PURE__ */ jsx41(AccountStack, { accounts }),
|
|
3958
|
+
/* @__PURE__ */ jsx41(
|
|
3882
3959
|
IconButton,
|
|
3883
3960
|
{
|
|
3884
3961
|
variant: "level_1",
|
|
@@ -3887,7 +3964,7 @@ var WalletConnectedHeader = React14.forwardRef((_a, ref) => {
|
|
|
3887
3964
|
rounded: "full",
|
|
3888
3965
|
size: "sm",
|
|
3889
3966
|
asChild: true,
|
|
3890
|
-
children: /* @__PURE__ */
|
|
3967
|
+
children: /* @__PURE__ */ jsx41("span", { children: /* @__PURE__ */ jsx41(ChevronBottomDown_default, {}) })
|
|
3891
3968
|
}
|
|
3892
3969
|
)
|
|
3893
3970
|
] })
|
|
@@ -3959,7 +4036,7 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
|
|
|
3959
4036
|
"onTransitionRun",
|
|
3960
4037
|
"onTransitionCancel"
|
|
3961
4038
|
]);
|
|
3962
|
-
return /* @__PURE__ */
|
|
4039
|
+
return /* @__PURE__ */ jsx41(
|
|
3963
4040
|
motion5.div,
|
|
3964
4041
|
{
|
|
3965
4042
|
ref: parentRef,
|
|
@@ -3968,7 +4045,7 @@ var WalletHeaderContent = React14.forwardRef((_a, _ref) => {
|
|
|
3968
4045
|
className: cn("z-10 relative", {
|
|
3969
4046
|
"pointer-events-none": !open
|
|
3970
4047
|
}),
|
|
3971
|
-
children: /* @__PURE__ */
|
|
4048
|
+
children: /* @__PURE__ */ jsx41(
|
|
3972
4049
|
motion5.div,
|
|
3973
4050
|
__spreadProps(__spreadValues({
|
|
3974
4051
|
ref: containerRef,
|
|
@@ -3991,15 +4068,15 @@ WalletHeaderContent.displayName = "WalletHeaderContent";
|
|
|
3991
4068
|
var AccountStack = React14.forwardRef(
|
|
3992
4069
|
({ accounts = [] }, ref) => {
|
|
3993
4070
|
var _a, _b;
|
|
3994
|
-
return /* @__PURE__ */
|
|
3995
|
-
/* @__PURE__ */
|
|
4071
|
+
return /* @__PURE__ */ jsx41("div", { ref, className: "flex gap-[0.625rem] items-center", children: accounts.length > 0 ? /* @__PURE__ */ jsxs29(React14.Fragment, { children: [
|
|
4072
|
+
/* @__PURE__ */ jsx41("div", { className: "inline-flex -space-x-[0.3125rem]", children: accounts.map((account, index) => /* @__PURE__ */ jsx41(
|
|
3996
4073
|
"div",
|
|
3997
4074
|
{
|
|
3998
4075
|
style: {
|
|
3999
4076
|
zIndex: accounts.length - index,
|
|
4000
4077
|
position: "relative"
|
|
4001
4078
|
},
|
|
4002
|
-
children: /* @__PURE__ */
|
|
4079
|
+
children: /* @__PURE__ */ jsx41(
|
|
4003
4080
|
BadgeIcon,
|
|
4004
4081
|
{
|
|
4005
4082
|
outline: true,
|
|
@@ -4013,15 +4090,15 @@ var AccountStack = React14.forwardRef(
|
|
|
4013
4090
|
},
|
|
4014
4091
|
account.address
|
|
4015
4092
|
)) }),
|
|
4016
|
-
/* @__PURE__ */
|
|
4017
|
-
/* @__PURE__ */
|
|
4093
|
+
/* @__PURE__ */ jsxs29("span", { className: "flex flex-col whitespace-nowrap", children: [
|
|
4094
|
+
/* @__PURE__ */ jsx41("span", { className: "text-base font-medium h-[1.25rem] text-brand-white-500", children: accounts.length > 1 ? /* @__PURE__ */ jsxs29(Fragment11, { children: [
|
|
4018
4095
|
accounts.length,
|
|
4019
4096
|
" wallets"
|
|
4020
|
-
] }) : /* @__PURE__ */
|
|
4021
|
-
/* @__PURE__ */
|
|
4097
|
+
] }) : /* @__PURE__ */ jsx41(Fragment11, { children: shortenAccountAddress((_b = (_a = accounts[0]) == null ? void 0 : _a.address) != null ? _b : "") || "--" }) }),
|
|
4098
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs text-start h-[1rem] font-medium inline-flex items-center gap-[0.125rem] text-brand-black-100", children: "Connected" })
|
|
4022
4099
|
] })
|
|
4023
|
-
] }) : /* @__PURE__ */
|
|
4024
|
-
/* @__PURE__ */
|
|
4100
|
+
] }) : /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
|
|
4101
|
+
/* @__PURE__ */ jsx41(
|
|
4025
4102
|
IconButton,
|
|
4026
4103
|
{
|
|
4027
4104
|
disabled: true,
|
|
@@ -4029,22 +4106,22 @@ var AccountStack = React14.forwardRef(
|
|
|
4029
4106
|
variant: "level_2",
|
|
4030
4107
|
rounded: "full",
|
|
4031
4108
|
size: "sm",
|
|
4032
|
-
children: /* @__PURE__ */
|
|
4109
|
+
children: /* @__PURE__ */ jsx41(Wallet_default, { className: "size-5" })
|
|
4033
4110
|
}
|
|
4034
4111
|
),
|
|
4035
|
-
/* @__PURE__ */
|
|
4112
|
+
/* @__PURE__ */ jsx41("p", { className: "text-base font-medium text-brand-white-100", children: "Select an account" })
|
|
4036
4113
|
] }) });
|
|
4037
4114
|
}
|
|
4038
4115
|
);
|
|
4039
4116
|
AccountStack.displayName = "AccountStack";
|
|
4040
4117
|
var WalletHeaderTabs = React14.forwardRef((_a, ref) => {
|
|
4041
4118
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4042
|
-
return /* @__PURE__ */
|
|
4119
|
+
return /* @__PURE__ */ jsx41(Tabs, __spreadProps(__spreadValues({ ref, className: cn("gap-0 pt-3", className) }, props), { children }));
|
|
4043
4120
|
});
|
|
4044
4121
|
WalletHeaderTabs.displayName = "WalletHeaderTabs";
|
|
4045
4122
|
var WalletHeaderTabsList = React14.forwardRef((_a, ref) => {
|
|
4046
4123
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4047
|
-
return /* @__PURE__ */
|
|
4124
|
+
return /* @__PURE__ */ jsx41(
|
|
4048
4125
|
TabsList2,
|
|
4049
4126
|
__spreadProps(__spreadValues({
|
|
4050
4127
|
ref,
|
|
@@ -4057,7 +4134,7 @@ var WalletHeaderTabsList = React14.forwardRef((_a, ref) => {
|
|
|
4057
4134
|
WalletHeaderTabsList.displayName = "WalletHeaderTabsList";
|
|
4058
4135
|
var WalletHeaderTabItem = React14.forwardRef((_a, ref) => {
|
|
4059
4136
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4060
|
-
return /* @__PURE__ */
|
|
4137
|
+
return /* @__PURE__ */ jsx41(
|
|
4061
4138
|
TabItem,
|
|
4062
4139
|
__spreadProps(__spreadValues({
|
|
4063
4140
|
ref,
|
|
@@ -4073,7 +4150,7 @@ var WalletHeaderTabItem = React14.forwardRef((_a, ref) => {
|
|
|
4073
4150
|
WalletHeaderTabItem.displayName = "WalletHeaderTabItem";
|
|
4074
4151
|
var WalletHeaderTabsContent = React14.forwardRef((_a, ref) => {
|
|
4075
4152
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
4076
|
-
return /* @__PURE__ */
|
|
4153
|
+
return /* @__PURE__ */ jsx41(
|
|
4077
4154
|
TabsContent,
|
|
4078
4155
|
__spreadProps(__spreadValues({
|
|
4079
4156
|
ref,
|
|
@@ -4088,7 +4165,7 @@ var WalletHeaderContentBlur = React14.forwardRef((_a, ref) => {
|
|
|
4088
4165
|
var _b = _a, { className, children, asChild = false } = _b, props = __objRest(_b, ["className", "children", "asChild"]);
|
|
4089
4166
|
const { show: open } = useWalletHeader();
|
|
4090
4167
|
const Comp = asChild ? Slot10 : "div";
|
|
4091
|
-
return /* @__PURE__ */
|
|
4168
|
+
return /* @__PURE__ */ jsx41(
|
|
4092
4169
|
Comp,
|
|
4093
4170
|
__spreadProps(__spreadValues({
|
|
4094
4171
|
ref,
|
|
@@ -4107,15 +4184,15 @@ var WalletHeaderContentBlur = React14.forwardRef((_a, ref) => {
|
|
|
4107
4184
|
WalletHeaderContentBlur.displayName = "WalletHeaderContentBlur";
|
|
4108
4185
|
|
|
4109
4186
|
// src/components/navigation/header.tsx
|
|
4110
|
-
import { jsx as
|
|
4187
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
4111
4188
|
function HeaderGradient() {
|
|
4112
|
-
return /* @__PURE__ */
|
|
4189
|
+
return /* @__PURE__ */ jsx42("div", { className: "absolute inset-0 h-[3px] bg-gradient-brand-animated" });
|
|
4113
4190
|
}
|
|
4114
4191
|
function HeaderContent({
|
|
4115
4192
|
children,
|
|
4116
4193
|
className
|
|
4117
4194
|
}) {
|
|
4118
|
-
return /* @__PURE__ */
|
|
4195
|
+
return /* @__PURE__ */ jsx42(
|
|
4119
4196
|
"div",
|
|
4120
4197
|
{
|
|
4121
4198
|
className: cn(
|
|
@@ -4130,7 +4207,7 @@ function Header({
|
|
|
4130
4207
|
children,
|
|
4131
4208
|
className
|
|
4132
4209
|
}) {
|
|
4133
|
-
return /* @__PURE__ */
|
|
4210
|
+
return /* @__PURE__ */ jsx42(
|
|
4134
4211
|
"header",
|
|
4135
4212
|
{
|
|
4136
4213
|
className: cn(
|
|
@@ -4143,7 +4220,7 @@ function Header({
|
|
|
4143
4220
|
}
|
|
4144
4221
|
|
|
4145
4222
|
// src/components/navigation/tabs.tsx
|
|
4146
|
-
import { jsx as
|
|
4223
|
+
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4147
4224
|
function TabAltHeader({
|
|
4148
4225
|
label,
|
|
4149
4226
|
isNew,
|
|
@@ -4151,7 +4228,7 @@ function TabAltHeader({
|
|
|
4151
4228
|
onClick,
|
|
4152
4229
|
className = ""
|
|
4153
4230
|
}) {
|
|
4154
|
-
return /* @__PURE__ */
|
|
4231
|
+
return /* @__PURE__ */ jsx43(
|
|
4155
4232
|
"button",
|
|
4156
4233
|
{
|
|
4157
4234
|
type: "button",
|
|
@@ -4161,9 +4238,9 @@ function TabAltHeader({
|
|
|
4161
4238
|
isActive ? "text-white" : "text-brand-black-100 hover:text-white",
|
|
4162
4239
|
className
|
|
4163
4240
|
),
|
|
4164
|
-
children: /* @__PURE__ */
|
|
4165
|
-
/* @__PURE__ */
|
|
4166
|
-
isNew && /* @__PURE__ */
|
|
4241
|
+
children: /* @__PURE__ */ jsxs30("span", { className: "relative z-10 flex items-center gap-2", children: [
|
|
4242
|
+
/* @__PURE__ */ jsx43("span", { className: "font-medium", children: label }),
|
|
4243
|
+
isNew && /* @__PURE__ */ jsx43("span", { className: "text-brand-warning-500 caption-text absolute top-0 left-[100%] w-max", children: "New" })
|
|
4167
4244
|
] })
|
|
4168
4245
|
}
|
|
4169
4246
|
);
|
|
@@ -4172,13 +4249,13 @@ function TabAltHeaders({
|
|
|
4172
4249
|
children,
|
|
4173
4250
|
className = ""
|
|
4174
4251
|
}) {
|
|
4175
|
-
return /* @__PURE__ */
|
|
4252
|
+
return /* @__PURE__ */ jsx43("div", { className: cn("flex space-x-3 mb-6", className), children });
|
|
4176
4253
|
}
|
|
4177
4254
|
function TabAltContent({
|
|
4178
4255
|
children,
|
|
4179
4256
|
className = ""
|
|
4180
4257
|
}) {
|
|
4181
|
-
return /* @__PURE__ */
|
|
4258
|
+
return /* @__PURE__ */ jsx43("div", { className, children });
|
|
4182
4259
|
}
|
|
4183
4260
|
function TabAltPanel({
|
|
4184
4261
|
id,
|
|
@@ -4187,66 +4264,13 @@ function TabAltPanel({
|
|
|
4187
4264
|
className = ""
|
|
4188
4265
|
}) {
|
|
4189
4266
|
if (activeTab !== id) return null;
|
|
4190
|
-
return /* @__PURE__ */
|
|
4267
|
+
return /* @__PURE__ */ jsx43("div", { className, children }, id);
|
|
4191
4268
|
}
|
|
4192
4269
|
function TabAlt({
|
|
4193
4270
|
children,
|
|
4194
4271
|
className = ""
|
|
4195
4272
|
}) {
|
|
4196
|
-
return /* @__PURE__ */
|
|
4197
|
-
}
|
|
4198
|
-
|
|
4199
|
-
// src/@/ui/tooltip.tsx
|
|
4200
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4201
|
-
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4202
|
-
function TooltipProvider(_a) {
|
|
4203
|
-
var _b = _a, {
|
|
4204
|
-
delayDuration = 0
|
|
4205
|
-
} = _b, props = __objRest(_b, [
|
|
4206
|
-
"delayDuration"
|
|
4207
|
-
]);
|
|
4208
|
-
return /* @__PURE__ */ jsx43(
|
|
4209
|
-
TooltipPrimitive.Provider,
|
|
4210
|
-
__spreadValues({
|
|
4211
|
-
"data-slot": "tooltip-provider",
|
|
4212
|
-
delayDuration
|
|
4213
|
-
}, props)
|
|
4214
|
-
);
|
|
4215
|
-
}
|
|
4216
|
-
function Tooltip(_a) {
|
|
4217
|
-
var props = __objRest(_a, []);
|
|
4218
|
-
return /* @__PURE__ */ jsx43(TooltipProvider, { children: /* @__PURE__ */ jsx43(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
|
|
4219
|
-
}
|
|
4220
|
-
function TooltipTrigger(_a) {
|
|
4221
|
-
var props = __objRest(_a, []);
|
|
4222
|
-
return /* @__PURE__ */ jsx43(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
4223
|
-
}
|
|
4224
|
-
function TooltipContent(_a) {
|
|
4225
|
-
var _b = _a, {
|
|
4226
|
-
className,
|
|
4227
|
-
sideOffset = 0,
|
|
4228
|
-
children
|
|
4229
|
-
} = _b, props = __objRest(_b, [
|
|
4230
|
-
"className",
|
|
4231
|
-
"sideOffset",
|
|
4232
|
-
"children"
|
|
4233
|
-
]);
|
|
4234
|
-
return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs30(
|
|
4235
|
-
TooltipPrimitive.Content,
|
|
4236
|
-
__spreadProps(__spreadValues({
|
|
4237
|
-
"data-slot": "tooltip-content",
|
|
4238
|
-
sideOffset,
|
|
4239
|
-
className: cn(
|
|
4240
|
-
"bg-brand-black-600 text-brand-black-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
4241
|
-
className
|
|
4242
|
-
)
|
|
4243
|
-
}, props), {
|
|
4244
|
-
children: [
|
|
4245
|
-
children,
|
|
4246
|
-
/* @__PURE__ */ jsx43(TooltipPrimitive.Arrow, { className: "bg-brand-black-600 fill-brand-black-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
4247
|
-
]
|
|
4248
|
-
})
|
|
4249
|
-
) });
|
|
4273
|
+
return /* @__PURE__ */ jsx43("div", { className: cn("w-full", className), children });
|
|
4250
4274
|
}
|
|
4251
4275
|
|
|
4252
4276
|
// src/components/organisms/settings.tsx
|
|
@@ -4682,6 +4706,10 @@ function HBDrawerDescription(_a) {
|
|
|
4682
4706
|
// src/components/organisms/manage-account.tsx
|
|
4683
4707
|
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4684
4708
|
function ManageAccounts() {
|
|
4709
|
+
console.warn("ManageAccounts is deprecated");
|
|
4710
|
+
return null;
|
|
4711
|
+
}
|
|
4712
|
+
function HeaderChooseProvider() {
|
|
4685
4713
|
return /* @__PURE__ */ jsxs34(SheetHeader, { className: "p-[1rem] -mx-[1rem]", children: [
|
|
4686
4714
|
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-[0.625rem] select-none", children: [
|
|
4687
4715
|
/* @__PURE__ */ jsx48(
|
|
@@ -5232,6 +5260,7 @@ export {
|
|
|
5232
5260
|
HBDrawerTitle,
|
|
5233
5261
|
HBDrawerTrigger,
|
|
5234
5262
|
Header,
|
|
5263
|
+
HeaderChooseProvider,
|
|
5235
5264
|
HeaderContent,
|
|
5236
5265
|
HeaderGradient,
|
|
5237
5266
|
HeaderNested,
|