@loafmarkets/ui 0.1.370 → 0.1.371
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +154 -95
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +155 -95
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -83,6 +83,8 @@ interface OrderbookProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
83
83
|
amountPrecision?: number;
|
|
84
84
|
defaultTab?: "orderbook" | "trades";
|
|
85
85
|
onTabChange?: (tab: "orderbook" | "trades") => void;
|
|
86
|
+
/** When false, the "Trades" tab is hidden and only the orderbook shows (e.g. on mobile). Default true. */
|
|
87
|
+
showTradesTab?: boolean;
|
|
86
88
|
rightHeader?: React$1.ReactNode;
|
|
87
89
|
variant?: "auto" | "default" | "compact";
|
|
88
90
|
/**
|
|
@@ -1019,8 +1021,10 @@ type AssetSelectorBarProps = {
|
|
|
1019
1021
|
trailing?: ReactNode;
|
|
1020
1022
|
imageUrl?: string;
|
|
1021
1023
|
badgeLabel?: string;
|
|
1024
|
+
/** Stack the TICKER as the primary label with the asset name beneath (InstrumentTile-style), instead of "Name (TICKER)". */
|
|
1025
|
+
tickerPrimary?: boolean;
|
|
1022
1026
|
};
|
|
1023
|
-
declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, badgeLabel, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
|
|
1027
|
+
declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, badgeLabel, tickerPrimary, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
|
|
1024
1028
|
|
|
1025
1029
|
type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
|
|
1026
1030
|
type ToastData = {
|
package/dist/index.d.ts
CHANGED
|
@@ -83,6 +83,8 @@ interface OrderbookProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
83
83
|
amountPrecision?: number;
|
|
84
84
|
defaultTab?: "orderbook" | "trades";
|
|
85
85
|
onTabChange?: (tab: "orderbook" | "trades") => void;
|
|
86
|
+
/** When false, the "Trades" tab is hidden and only the orderbook shows (e.g. on mobile). Default true. */
|
|
87
|
+
showTradesTab?: boolean;
|
|
86
88
|
rightHeader?: React$1.ReactNode;
|
|
87
89
|
variant?: "auto" | "default" | "compact";
|
|
88
90
|
/**
|
|
@@ -1019,8 +1021,10 @@ type AssetSelectorBarProps = {
|
|
|
1019
1021
|
trailing?: ReactNode;
|
|
1020
1022
|
imageUrl?: string;
|
|
1021
1023
|
badgeLabel?: string;
|
|
1024
|
+
/** Stack the TICKER as the primary label with the asset name beneath (InstrumentTile-style), instead of "Name (TICKER)". */
|
|
1025
|
+
tickerPrimary?: boolean;
|
|
1022
1026
|
};
|
|
1023
|
-
declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, badgeLabel, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
|
|
1027
|
+
declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, badgeLabel, tickerPrimary, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
|
|
1024
1028
|
|
|
1025
1029
|
type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
|
|
1026
1030
|
type ToastData = {
|
package/dist/index.js
CHANGED
|
@@ -1900,6 +1900,7 @@ var Orderbook = React5__namespace.forwardRef(
|
|
|
1900
1900
|
amountPrecision = 2,
|
|
1901
1901
|
defaultTab = "orderbook",
|
|
1902
1902
|
onTabChange,
|
|
1903
|
+
showTradesTab = true,
|
|
1903
1904
|
rightHeader,
|
|
1904
1905
|
variant = "auto",
|
|
1905
1906
|
userOrderPrices,
|
|
@@ -1913,7 +1914,9 @@ var Orderbook = React5__namespace.forwardRef(
|
|
|
1913
1914
|
...props
|
|
1914
1915
|
}, ref) => {
|
|
1915
1916
|
const resolvedRightHeader = rightHeader ?? /* @__PURE__ */ jsxRuntime.jsx(LoafLiquidityBadge, { className: "text-[0.6rem] orderbook-ll-badge", onClick: onLoafLiquidityClick });
|
|
1916
|
-
const [tab,
|
|
1917
|
+
const [tab, setTabState] = React5__namespace.useState(defaultTab);
|
|
1918
|
+
const setTab = setTabState;
|
|
1919
|
+
const effectiveTab = showTradesTab ? tab : "orderbook";
|
|
1917
1920
|
const [tradeFilter, setTradeFilter] = React5__namespace.useState("all");
|
|
1918
1921
|
const viewportCompact = useViewportCompact(COMPACT_BREAKPOINT_PX);
|
|
1919
1922
|
const { userAskPrices, userBidPrices } = React5__namespace.useMemo(() => {
|
|
@@ -2007,7 +2010,8 @@ var Orderbook = React5__namespace.forwardRef(
|
|
|
2007
2010
|
const midClass = midChangePercent == null ? "text-white" : midChangePercent >= 0 ? "text-[#0ecb81]" : "text-[#f6465d]";
|
|
2008
2011
|
const tradeFiltered = trades.filter((t) => tradeFilter === "all" || t.type === tradeFilter);
|
|
2009
2012
|
const layoutProps = {
|
|
2010
|
-
tab,
|
|
2013
|
+
tab: effectiveTab,
|
|
2014
|
+
showTradesTab,
|
|
2011
2015
|
handleTab,
|
|
2012
2016
|
tradeFilter,
|
|
2013
2017
|
setTradeFilter,
|
|
@@ -2084,6 +2088,7 @@ function SkeletonRow({ compact }) {
|
|
|
2084
2088
|
}
|
|
2085
2089
|
function DesktopOrderbookLayout({
|
|
2086
2090
|
tab,
|
|
2091
|
+
showTradesTab = true,
|
|
2087
2092
|
handleTab,
|
|
2088
2093
|
tradeFilter,
|
|
2089
2094
|
setTradeFilter,
|
|
@@ -2133,7 +2138,7 @@ function DesktopOrderbookLayout({
|
|
|
2133
2138
|
]
|
|
2134
2139
|
}
|
|
2135
2140
|
),
|
|
2136
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2141
|
+
showTradesTab ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2137
2142
|
"button",
|
|
2138
2143
|
{
|
|
2139
2144
|
type: "button",
|
|
@@ -2147,7 +2152,7 @@ function DesktopOrderbookLayout({
|
|
|
2147
2152
|
tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -bottom-px left-0 h-[2px] w-full bg-[#E6C87E]" }) : null
|
|
2148
2153
|
]
|
|
2149
2154
|
}
|
|
2150
|
-
)
|
|
2155
|
+
) : null
|
|
2151
2156
|
] }),
|
|
2152
2157
|
tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 text-xs", children: [
|
|
2153
2158
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2286,6 +2291,7 @@ function DesktopOrderbookLayout({
|
|
|
2286
2291
|
}
|
|
2287
2292
|
function MobileOrderbookLayout({
|
|
2288
2293
|
tab,
|
|
2294
|
+
showTradesTab = true,
|
|
2289
2295
|
handleTab,
|
|
2290
2296
|
tradeFilter,
|
|
2291
2297
|
setTradeFilter,
|
|
@@ -2334,7 +2340,7 @@ function MobileOrderbookLayout({
|
|
|
2334
2340
|
children: "Orderbook"
|
|
2335
2341
|
}
|
|
2336
2342
|
),
|
|
2337
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2343
|
+
showTradesTab ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2338
2344
|
"span",
|
|
2339
2345
|
{
|
|
2340
2346
|
onClick: () => handleTab("trades"),
|
|
@@ -2348,7 +2354,7 @@ function MobileOrderbookLayout({
|
|
|
2348
2354
|
},
|
|
2349
2355
|
children: "Trades"
|
|
2350
2356
|
}
|
|
2351
|
-
)
|
|
2357
|
+
) : null
|
|
2352
2358
|
] }),
|
|
2353
2359
|
tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1 text-[0.6rem] text-white/70", children: ["all", "buy", "sell"].map((filter) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2354
2360
|
"button",
|
|
@@ -5379,7 +5385,7 @@ var Header = ({
|
|
|
5379
5385
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5380
5386
|
/* @__PURE__ */ jsxRuntime.jsx(SafeAreaCover, {}),
|
|
5381
5387
|
/* @__PURE__ */ jsxRuntime.jsx(Overlay, { $isOpen: isMobileMenuOpen, onClick: () => setIsMobileMenuOpen(false) }),
|
|
5382
|
-
/* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { id: "loaf-header", $bgOpacity: headerBgOpacity, children: [
|
|
5388
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { id: "loaf-header", $bgOpacity: headerBgOpacity, $menuOpen: isMobileMenuOpen, children: [
|
|
5383
5389
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
5384
5390
|
/* @__PURE__ */ jsxRuntime.jsxs(Logo, { children: [
|
|
5385
5391
|
/* @__PURE__ */ jsxRuntime.jsx(LogoLink, { href: logoHref ?? resolvedHomePath, onClick: handleLogoNavigation, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: Loaf_logo_Banner_default, alt: "LOAF Logo" }) }),
|
|
@@ -5810,7 +5816,8 @@ var Overlay = styled10__default.default.div`
|
|
|
5810
5816
|
height: 100%;
|
|
5811
5817
|
background-color: rgba(0, 0, 0, 0.7);
|
|
5812
5818
|
backdrop-filter: blur(3px);
|
|
5813
|
-
z
|
|
5819
|
+
/* Above the trade page's sticky/console layers (z 2000) + close modal (10001). */
|
|
5820
|
+
z-index: 10070;
|
|
5814
5821
|
`;
|
|
5815
5822
|
var MobileOnlyButton = styled10__default.default.button.attrs({ type: "button" })`
|
|
5816
5823
|
display: none;
|
|
@@ -5858,7 +5865,11 @@ var HeaderContainer = styled10__default.default.header`
|
|
|
5858
5865
|
top: 0;
|
|
5859
5866
|
left: 0;
|
|
5860
5867
|
right: 0;
|
|
5861
|
-
|
|
5868
|
+
/* Normally 1000. When the mobile menu is open, lift the whole header
|
|
5869
|
+
(and the Nav drawer trapped inside its stacking context) above the
|
|
5870
|
+
backdrop Overlay (10070) AND the trade page's modal layers (10001) so
|
|
5871
|
+
the drawer renders on top instead of being dimmed by the backdrop. */
|
|
5872
|
+
z-index: ${({ $menuOpen }) => $menuOpen ? 10075 : 1e3};
|
|
5862
5873
|
width: 100%;
|
|
5863
5874
|
/* Fallback min-height for browsers that can't evaluate calc+env */
|
|
5864
5875
|
min-height: 56px;
|
|
@@ -5952,7 +5963,8 @@ var Nav = styled10__default.default.nav`
|
|
|
5952
5963
|
max-width: 100%;
|
|
5953
5964
|
height: calc(100dvh - var(--loaf-menu-top, calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)))));
|
|
5954
5965
|
background: rgb(17, 17, 19);
|
|
5955
|
-
z
|
|
5966
|
+
/* Above the trade page's sticky/console layers (z 2000) + close modal (10001). */
|
|
5967
|
+
z-index: 10080;
|
|
5956
5968
|
/* Gentle fade + slide-down instead of an abrupt slide-in. */
|
|
5957
5969
|
opacity: ${(props) => props.$isOpen ? "1" : "0"};
|
|
5958
5970
|
transform: ${(props) => props.$isOpen ? "translateY(0)" : "translateY(-14px)"};
|
|
@@ -7188,8 +7200,8 @@ var LoginPopup = ({
|
|
|
7188
7200
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
|
|
7189
7201
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
7190
7202
|
] }) }),
|
|
7191
|
-
/* @__PURE__ */ jsxRuntime.jsx(KycHeading, { children: "Verify
|
|
7192
|
-
/* @__PURE__ */ jsxRuntime.jsx(KycSubline, { children: "Initial offerings are only available to
|
|
7203
|
+
/* @__PURE__ */ jsxRuntime.jsx(KycHeading, { children: "Verify Wholesale Status" }),
|
|
7204
|
+
/* @__PURE__ */ jsxRuntime.jsx(KycSubline, { children: "Initial offerings are only available to accredited or wholesale investors" }),
|
|
7193
7205
|
/* @__PURE__ */ jsxRuntime.jsx(KycStartButton, { type: "button", onClick: handleKycStart, disabled: kycLoading, children: kycLoading ? "Verifying\u2026" : kycStatusProp === "PENDING" || kycStatusProp === "ON_HOLD" ? "Resume Verification" : "Start Verification" }),
|
|
7194
7206
|
/* @__PURE__ */ jsxRuntime.jsx(KycDuration, { children: "Takes about 2 minutes" }),
|
|
7195
7207
|
/* @__PURE__ */ jsxRuntime.jsx(KycDivider, {}),
|
|
@@ -7275,7 +7287,7 @@ var LoginPopup = ({
|
|
|
7275
7287
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Deposit USDC from an exchange or wallet" })
|
|
7276
7288
|
] })
|
|
7277
7289
|
] }),
|
|
7278
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleFiatFund, disabled:
|
|
7290
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleFiatFund, disabled: true, children: [
|
|
7279
7291
|
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: [
|
|
7280
7292
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "22", x2: "21", y2: "22" }),
|
|
7281
7293
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "18", x2: "6", y2: "11" }),
|
|
@@ -7285,7 +7297,10 @@ var LoginPopup = ({
|
|
|
7285
7297
|
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "12 2 20 7 4 7" })
|
|
7286
7298
|
] }),
|
|
7287
7299
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
|
|
7288
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7300
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "0.25rem" }, children: [
|
|
7301
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem" }, children: fiatFundingLoading ? "Loading widget\u2026" : "Bank Deposit" }),
|
|
7302
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.6rem", fontWeight: 700, color: "#E6C87E", background: "rgba(230,198,86,0.12)", padding: "0.12rem 0.4rem", borderRadius: "4px", textTransform: "uppercase", letterSpacing: "0.04em", whiteSpace: "nowrap" }, children: "Coming Soon" })
|
|
7303
|
+
] }),
|
|
7289
7304
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Deposit to your account via card or bank transfer" })
|
|
7290
7305
|
] })
|
|
7291
7306
|
] })
|
|
@@ -11872,7 +11887,8 @@ function AssetSelectorBar({
|
|
|
11872
11887
|
onSelect,
|
|
11873
11888
|
trailing,
|
|
11874
11889
|
imageUrl,
|
|
11875
|
-
badgeLabel
|
|
11890
|
+
badgeLabel,
|
|
11891
|
+
tickerPrimary
|
|
11876
11892
|
}) {
|
|
11877
11893
|
const [isDropdownOpen, setIsDropdownOpen] = React5.useState(false);
|
|
11878
11894
|
const hasItems = selectorItems && selectorItems.length > 0;
|
|
@@ -11883,9 +11899,14 @@ function AssetSelectorBar({
|
|
|
11883
11899
|
];
|
|
11884
11900
|
return /* @__PURE__ */ jsxRuntime.jsx(AssetSelectorWrapper, { children: /* @__PURE__ */ jsxRuntime.jsxs(IPOAssetSelector, { children: [
|
|
11885
11901
|
imageUrl && /* @__PURE__ */ jsxRuntime.jsx(AssetThumbnail, { src: imageUrl, alt: propertyName }),
|
|
11886
|
-
/* @__PURE__ */ jsxRuntime.jsx(AssetSelectorDropdown, { onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxRuntime.jsxs(AssetName, { children: [
|
|
11887
|
-
|
|
11888
|
-
|
|
11902
|
+
/* @__PURE__ */ jsxRuntime.jsx(AssetSelectorDropdown, { $flush: tickerPrimary, onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxRuntime.jsxs(AssetName, { children: [
|
|
11903
|
+
tickerPrimary && currentTicker ? /* @__PURE__ */ jsxRuntime.jsxs(AssetIdentity, { children: [
|
|
11904
|
+
/* @__PURE__ */ jsxRuntime.jsx(AssetTicker, { children: currentTicker.toUpperCase() }),
|
|
11905
|
+
/* @__PURE__ */ jsxRuntime.jsx(AssetSubName, { children: propertyName })
|
|
11906
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11907
|
+
propertyName,
|
|
11908
|
+
currentTicker ? ` (${currentTicker.toUpperCase()})` : ""
|
|
11909
|
+
] }),
|
|
11889
11910
|
badgeLabel && /* @__PURE__ */ jsxRuntime.jsx(CompetitionBadge, { children: badgeLabel }),
|
|
11890
11911
|
hasItems && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11891
11912
|
"svg",
|
|
@@ -11914,7 +11935,7 @@ function AssetSelectorBar({
|
|
|
11914
11935
|
] })
|
|
11915
11936
|
] })
|
|
11916
11937
|
] }, m.label)) }),
|
|
11917
|
-
trailing != null && /* @__PURE__ */ jsxRuntime.jsx(TrailingWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(TrailingInner, { children: trailing }) }),
|
|
11938
|
+
trailing != null && /* @__PURE__ */ jsxRuntime.jsx(TrailingWrapper, { className: "asset-bar-trailing", children: /* @__PURE__ */ jsxRuntime.jsx(TrailingInner, { children: trailing }) }),
|
|
11918
11939
|
isDropdownOpen && hasItems && /* @__PURE__ */ jsxRuntime.jsx(IPODropdown, { children: selectorItems.map((item) => {
|
|
11919
11940
|
const isCurrent = item.tokenName === currentTokenName;
|
|
11920
11941
|
const status = item.status?.toUpperCase();
|
|
@@ -12005,13 +12026,40 @@ var AssetSelectorDropdown = styled10__default.default.div`
|
|
|
12005
12026
|
display: flex;
|
|
12006
12027
|
align-items: center;
|
|
12007
12028
|
cursor: pointer;
|
|
12008
|
-
|
|
12029
|
+
/* $flush (tickerPrimary): no horizontal padding / no hover box, so opening the
|
|
12030
|
+
selector doesn't make the ticker appear shoved right by the highlight box. */
|
|
12031
|
+
padding: ${(p) => p.$flush ? "0.25rem 0" : "0.5rem"};
|
|
12009
12032
|
border-radius: 8px;
|
|
12010
|
-
transition: all 0.2s ease;
|
|
12033
|
+
transition: ${(p) => p.$flush ? "none" : "all 0.2s ease"};
|
|
12011
12034
|
flex: 0 1 auto;
|
|
12012
12035
|
min-width: 0;
|
|
12013
12036
|
overflow: hidden;
|
|
12014
|
-
&:hover { background-color: rgba(255,255,255,0.05); }
|
|
12037
|
+
&:hover { background-color: ${(p) => p.$flush ? "transparent" : "rgba(255,255,255,0.05)"}; }
|
|
12038
|
+
`;
|
|
12039
|
+
var AssetIdentity = styled10__default.default.div`
|
|
12040
|
+
display: flex;
|
|
12041
|
+
flex-direction: column;
|
|
12042
|
+
min-width: 0;
|
|
12043
|
+
line-height: 1.2;
|
|
12044
|
+
`;
|
|
12045
|
+
var AssetTicker = styled10__default.default.span`
|
|
12046
|
+
font-weight: 700;
|
|
12047
|
+
font-size: 1.35rem;
|
|
12048
|
+
color: var(--color-text);
|
|
12049
|
+
letter-spacing: -0.01em;
|
|
12050
|
+
white-space: nowrap;
|
|
12051
|
+
overflow: hidden;
|
|
12052
|
+
text-overflow: ellipsis;
|
|
12053
|
+
|
|
12054
|
+
@media (max-width: 480px) { font-size: 1.2rem; }
|
|
12055
|
+
`;
|
|
12056
|
+
var AssetSubName = styled10__default.default.span`
|
|
12057
|
+
font-size: 0.8rem;
|
|
12058
|
+
font-weight: 500;
|
|
12059
|
+
color: rgba(255, 255, 255, 0.4);
|
|
12060
|
+
white-space: nowrap;
|
|
12061
|
+
overflow: hidden;
|
|
12062
|
+
text-overflow: ellipsis;
|
|
12015
12063
|
`;
|
|
12016
12064
|
var AssetName = styled10__default.default.div`
|
|
12017
12065
|
display: flex;
|
|
@@ -14689,27 +14737,30 @@ function PortfolioActivityPanel({
|
|
|
14689
14737
|
] }, pos.tokenName);
|
|
14690
14738
|
})
|
|
14691
14739
|
] }),
|
|
14692
|
-
positions.length > 0 && closeAllOpen && onClosePosition &&
|
|
14693
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14697
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
|
|
14711
|
-
|
|
14712
|
-
|
|
14740
|
+
positions.length > 0 && closeAllOpen && onClosePosition && typeof document !== "undefined" && ReactDOM.createPortal(
|
|
14741
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllOverlay, { onClick: () => setCloseAllOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(CloseAllModal, { onClick: (e) => e.stopPropagation(), children: [
|
|
14742
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllModalX, { onClick: () => setCloseAllOpen(false), children: "\xD7" }),
|
|
14743
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllTitle, { children: "Confirm Sell All" }),
|
|
14744
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllDesc, { children: "This will sell all your positions and cancel their associated TP/SL orders." }),
|
|
14745
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CloseAllOption, { onClick: () => setCloseAllType("market"), children: [
|
|
14746
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllRadio, { $selected: closeAllType === "market" }),
|
|
14747
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Market Sell" })
|
|
14748
|
+
] }),
|
|
14749
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CloseAllOption, { onClick: () => setCloseAllType("limit"), children: [
|
|
14750
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllRadio, { $selected: closeAllType === "limit" }),
|
|
14751
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Limit Sell at Mid Price" })
|
|
14752
|
+
] }),
|
|
14753
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CloseAllConfirmBtn, { onClick: () => {
|
|
14754
|
+
positions.forEach((pos) => onClosePosition(pos.tokenName, closeAllType, pos.quantity, pos.marketPrice));
|
|
14755
|
+
setCloseAllOpen(false);
|
|
14756
|
+
}, children: [
|
|
14757
|
+
"Confirm ",
|
|
14758
|
+
closeAllType === "market" ? "Market" : "Limit",
|
|
14759
|
+
" Sell"
|
|
14760
|
+
] })
|
|
14761
|
+
] }) }),
|
|
14762
|
+
document.body
|
|
14763
|
+
)
|
|
14713
14764
|
] }),
|
|
14714
14765
|
activeTab === "subscriptions" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14715
14766
|
offeringOrders.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { children: "IPO allocations will appear here once you subscribe." }),
|
|
@@ -15166,57 +15217,63 @@ function PortfolioActivityPanel({
|
|
|
15166
15217
|
] }),
|
|
15167
15218
|
/* @__PURE__ */ jsxRuntime.jsx(PaginationBtn, { disabled: currentPage >= totalPages - 1, onClick: () => setCurrentPage((p) => p + 1), children: "Next \u203A" })
|
|
15168
15219
|
] }),
|
|
15169
|
-
cancelAllConfirmOpen &&
|
|
15170
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15171
|
-
|
|
15172
|
-
|
|
15173
|
-
|
|
15174
|
-
|
|
15175
|
-
|
|
15176
|
-
|
|
15177
|
-
/* @__PURE__ */ jsxRuntime.
|
|
15178
|
-
|
|
15179
|
-
|
|
15180
|
-
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
|
|
15184
|
-
|
|
15185
|
-
|
|
15186
|
-
|
|
15187
|
-
|
|
15188
|
-
|
|
15189
|
-
|
|
15220
|
+
cancelAllConfirmOpen && typeof document !== "undefined" && ReactDOM.createPortal(
|
|
15221
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmOverlay, { onClick: () => setCancelAllConfirmOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmModal, { onClick: (e) => e.stopPropagation(), children: [
|
|
15222
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmTitle, { children: "Cancel All Orders" }),
|
|
15223
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmBody, { children: [
|
|
15224
|
+
"Are you sure you want to cancel all ",
|
|
15225
|
+
openOrdersCount,
|
|
15226
|
+
" open orders? This action cannot be undone."
|
|
15227
|
+
] }),
|
|
15228
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmActions, { children: [
|
|
15229
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmDismiss, { type: "button", onClick: () => setCancelAllConfirmOpen(false), children: "Keep Orders" }),
|
|
15230
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15231
|
+
CancelConfirmProceed,
|
|
15232
|
+
{
|
|
15233
|
+
type: "button",
|
|
15234
|
+
disabled: cancellingAll,
|
|
15235
|
+
onClick: async () => {
|
|
15236
|
+
if (onCancelAllOrders) {
|
|
15237
|
+
setCancellingAll(true);
|
|
15238
|
+
try {
|
|
15239
|
+
await onCancelAllOrders();
|
|
15240
|
+
} finally {
|
|
15241
|
+
setCancellingAll(false);
|
|
15242
|
+
}
|
|
15190
15243
|
}
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
|
|
15195
|
-
|
|
15196
|
-
)
|
|
15197
|
-
] })
|
|
15198
|
-
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15202
|
-
|
|
15203
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15204
|
-
/* @__PURE__ */ jsxRuntime.
|
|
15205
|
-
|
|
15206
|
-
|
|
15207
|
-
|
|
15208
|
-
|
|
15209
|
-
|
|
15210
|
-
|
|
15211
|
-
|
|
15212
|
-
|
|
15213
|
-
|
|
15214
|
-
|
|
15215
|
-
|
|
15216
|
-
|
|
15217
|
-
|
|
15218
|
-
|
|
15219
|
-
|
|
15244
|
+
setCancelAllConfirmOpen(false);
|
|
15245
|
+
},
|
|
15246
|
+
children: cancellingAll ? "Cancelling\u2026" : "Yes, Cancel All"
|
|
15247
|
+
}
|
|
15248
|
+
)
|
|
15249
|
+
] })
|
|
15250
|
+
] }) }),
|
|
15251
|
+
document.body
|
|
15252
|
+
),
|
|
15253
|
+
pendingCancelOrderId !== null && typeof document !== "undefined" && ReactDOM.createPortal(
|
|
15254
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmOverlay, { onClick: () => setPendingCancelOrderId(null), children: /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmModal, { onClick: (e) => e.stopPropagation(), children: [
|
|
15255
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmTitle, { children: "Cancel Order" }),
|
|
15256
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmBody, { children: "Are you sure you want to cancel this order? This action cannot be undone." }),
|
|
15257
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmActions, { children: [
|
|
15258
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmDismiss, { type: "button", onClick: () => setPendingCancelOrderId(null), children: "Keep Order" }),
|
|
15259
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15260
|
+
CancelConfirmProceed,
|
|
15261
|
+
{
|
|
15262
|
+
type: "button",
|
|
15263
|
+
disabled: cancellingOrderId != null,
|
|
15264
|
+
onClick: async () => {
|
|
15265
|
+
if (onCancelOrder && pendingCancelOrderId !== null) {
|
|
15266
|
+
await onCancelOrder(pendingCancelOrderId);
|
|
15267
|
+
}
|
|
15268
|
+
setPendingCancelOrderId(null);
|
|
15269
|
+
},
|
|
15270
|
+
children: cancellingOrderId === pendingCancelOrderId ? "Cancelling\u2026" : "Yes, Cancel"
|
|
15271
|
+
}
|
|
15272
|
+
)
|
|
15273
|
+
] })
|
|
15274
|
+
] }) }),
|
|
15275
|
+
document.body
|
|
15276
|
+
)
|
|
15220
15277
|
] });
|
|
15221
15278
|
}
|
|
15222
15279
|
var Container2 = styled10__default.default.div`
|
|
@@ -15472,7 +15529,8 @@ var CancelConfirmOverlay = styled10__default.default.div`
|
|
|
15472
15529
|
display: flex;
|
|
15473
15530
|
align-items: center;
|
|
15474
15531
|
justify-content: center;
|
|
15475
|
-
|
|
15532
|
+
/* Above the trade page's fullscreen/sticky layers (TradePage.css uses up to 10001). */
|
|
15533
|
+
z-index: 10050;
|
|
15476
15534
|
`;
|
|
15477
15535
|
var CancelConfirmModal = styled10__default.default.div`
|
|
15478
15536
|
background: #1a1a1a;
|
|
@@ -15586,7 +15644,8 @@ var CloseAllOverlay = styled10__default.default.div`
|
|
|
15586
15644
|
display: flex;
|
|
15587
15645
|
align-items: center;
|
|
15588
15646
|
justify-content: center;
|
|
15589
|
-
|
|
15647
|
+
/* Above the trade page's fullscreen/sticky layers (TradePage.css uses up to 10001). */
|
|
15648
|
+
z-index: 10050;
|
|
15590
15649
|
`;
|
|
15591
15650
|
var CloseAllModal = styled10__default.default.div`
|
|
15592
15651
|
background: #1a1a1a;
|