@orderly.network/ui-order-entry 3.0.4-alpha.4 → 3.1.0-alpha.0
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.js +143 -131
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +143 -131
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +13 -13
package/dist/index.mjs
CHANGED
|
@@ -70,7 +70,7 @@ var AdditionalInfo = (props) => {
|
|
|
70
70
|
htmlFor: "toggle_order_post_only",
|
|
71
71
|
className: cn(
|
|
72
72
|
"oui-postOnly-label",
|
|
73
|
-
"oui-
|
|
73
|
+
"oui-ms-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
|
|
74
74
|
"oui-cursor-pointer oui-whitespace-nowrap oui-break-normal oui-border-b oui-border-dashed oui-border-line-12"
|
|
75
75
|
),
|
|
76
76
|
children: t("orderEntry.orderType.postOnly")
|
|
@@ -104,7 +104,7 @@ var AdditionalInfo = (props) => {
|
|
|
104
104
|
htmlFor: "toggle_order_iov",
|
|
105
105
|
className: cn(
|
|
106
106
|
"oui-ioc-label",
|
|
107
|
-
"oui-
|
|
107
|
+
"oui-ms-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
|
|
108
108
|
"oui-cursor-pointer oui-whitespace-nowrap oui-break-normal oui-border-b oui-border-dashed oui-border-line-12"
|
|
109
109
|
),
|
|
110
110
|
children: t("orderEntry.orderType.ioc")
|
|
@@ -138,7 +138,7 @@ var AdditionalInfo = (props) => {
|
|
|
138
138
|
htmlFor: "toggle_order_fok",
|
|
139
139
|
className: cn(
|
|
140
140
|
"oui-fok-label",
|
|
141
|
-
"oui-
|
|
141
|
+
"oui-ms-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
|
|
142
142
|
"oui-cursor-pointer oui-whitespace-nowrap oui-break-normal oui-border-b oui-border-dashed oui-border-line-12"
|
|
143
143
|
),
|
|
144
144
|
children: t("orderEntry.orderType.fok")
|
|
@@ -169,7 +169,7 @@ var AdditionalInfo = (props) => {
|
|
|
169
169
|
"label",
|
|
170
170
|
{
|
|
171
171
|
htmlFor: "toggle_order_confirm",
|
|
172
|
-
className: "oui-orderConfirm-label oui-
|
|
172
|
+
className: "oui-orderConfirm-label oui-ms-1 oui-text-2xs",
|
|
173
173
|
children: t("orderEntry.orderConfirm")
|
|
174
174
|
}
|
|
175
175
|
)
|
|
@@ -197,7 +197,7 @@ var AdditionalInfo = (props) => {
|
|
|
197
197
|
"label",
|
|
198
198
|
{
|
|
199
199
|
htmlFor: "toggle_order_hidden",
|
|
200
|
-
className: "oui-orderHidden-label oui-
|
|
200
|
+
className: "oui-orderHidden-label oui-ms-1 oui-cursor-pointer oui-border-b oui-border-dashed oui-border-line-12 oui-text-2xs",
|
|
201
201
|
children: t("orderEntry.hidden")
|
|
202
202
|
}
|
|
203
203
|
)
|
|
@@ -223,7 +223,7 @@ var AdditionalInfo = (props) => {
|
|
|
223
223
|
"label",
|
|
224
224
|
{
|
|
225
225
|
htmlFor: "toggle_order_keep_visible",
|
|
226
|
-
className: "oui-keepVisible-label oui-
|
|
226
|
+
className: "oui-keepVisible-label oui-ms-1 oui-text-2xs",
|
|
227
227
|
children: t("orderEntry.keepVisible")
|
|
228
228
|
}
|
|
229
229
|
)
|
|
@@ -335,7 +335,7 @@ function AdvancedTPSLResult(props) {
|
|
|
335
335
|
/* @__PURE__ */ jsx(
|
|
336
336
|
Text.numeral,
|
|
337
337
|
{
|
|
338
|
-
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-
|
|
338
|
+
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
|
|
339
339
|
className: "oui-text-base-contrast",
|
|
340
340
|
dp: symbolInfo.quote_dp,
|
|
341
341
|
children: formattedOrder.tp_trigger_price ?? ""
|
|
@@ -347,7 +347,7 @@ function AdvancedTPSLResult(props) {
|
|
|
347
347
|
formattedOrder.tp_order_type === OrderType.LIMIT ? /* @__PURE__ */ jsx(
|
|
348
348
|
Text.numeral,
|
|
349
349
|
{
|
|
350
|
-
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-
|
|
350
|
+
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
|
|
351
351
|
className: "oui-text-base-contrast",
|
|
352
352
|
dp: symbolInfo.quote_dp,
|
|
353
353
|
children: formattedOrder.tp_order_price ?? ""
|
|
@@ -359,7 +359,7 @@ function AdvancedTPSLResult(props) {
|
|
|
359
359
|
/* @__PURE__ */ jsx(
|
|
360
360
|
Text.numeral,
|
|
361
361
|
{
|
|
362
|
-
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-
|
|
362
|
+
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
|
|
363
363
|
coloring: true,
|
|
364
364
|
dp: 2,
|
|
365
365
|
children: Number(formattedOrder.tp_pnl)
|
|
@@ -412,7 +412,7 @@ function AdvancedTPSLResult(props) {
|
|
|
412
412
|
/* @__PURE__ */ jsx(
|
|
413
413
|
Text.numeral,
|
|
414
414
|
{
|
|
415
|
-
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-
|
|
415
|
+
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
|
|
416
416
|
className: "oui-text-base-contrast",
|
|
417
417
|
dp: symbolInfo.quote_dp,
|
|
418
418
|
children: formattedOrder.sl_trigger_price ?? ""
|
|
@@ -424,7 +424,7 @@ function AdvancedTPSLResult(props) {
|
|
|
424
424
|
formattedOrder.sl_order_type === OrderType.LIMIT ? /* @__PURE__ */ jsx(
|
|
425
425
|
Text.numeral,
|
|
426
426
|
{
|
|
427
|
-
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-
|
|
427
|
+
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
|
|
428
428
|
className: "oui-text-base-contrast",
|
|
429
429
|
dp: symbolInfo.quote_dp,
|
|
430
430
|
children: formattedOrder.sl_order_price ?? ""
|
|
@@ -437,7 +437,7 @@ function AdvancedTPSLResult(props) {
|
|
|
437
437
|
Text.numeral,
|
|
438
438
|
{
|
|
439
439
|
coloring: true,
|
|
440
|
-
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-
|
|
440
|
+
suffix: /* @__PURE__ */ jsx(Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
|
|
441
441
|
dp: 2,
|
|
442
442
|
children: Number(formattedOrder.sl_pnl)
|
|
443
443
|
}
|
|
@@ -639,7 +639,7 @@ var OrderConfirmDialog = (props) => {
|
|
|
639
639
|
unit: quote,
|
|
640
640
|
rule: "price",
|
|
641
641
|
className: "oui-text-base-contrast",
|
|
642
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
642
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
643
643
|
dp: quote_dp,
|
|
644
644
|
padding: false,
|
|
645
645
|
children: order.order_price
|
|
@@ -669,7 +669,7 @@ var OrderConfirmDialog = (props) => {
|
|
|
669
669
|
"oui-text-base-contrast",
|
|
670
670
|
colorType === "TP" ? "oui-text-trade-profit" : "oui-text-trade-loss"
|
|
671
671
|
),
|
|
672
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
672
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
673
673
|
dp: quote_dp,
|
|
674
674
|
padding: false,
|
|
675
675
|
children: price
|
|
@@ -975,7 +975,7 @@ var OrderItem = (props) => {
|
|
|
975
975
|
dp,
|
|
976
976
|
padding: false,
|
|
977
977
|
className: "oui-text-base-contrast",
|
|
978
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
978
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
979
979
|
children: value
|
|
980
980
|
}
|
|
981
981
|
)
|
|
@@ -999,7 +999,7 @@ var OrderTypeTag = (props) => {
|
|
|
999
999
|
default:
|
|
1000
1000
|
return "";
|
|
1001
1001
|
}
|
|
1002
|
-
}, [props.type]);
|
|
1002
|
+
}, [props.type, t]);
|
|
1003
1003
|
return /* @__PURE__ */ jsx(Badge, { color: "neutral", size: "sm", children: typeStr });
|
|
1004
1004
|
};
|
|
1005
1005
|
var Dialog = (props) => {
|
|
@@ -1317,7 +1317,7 @@ var ScaledOrderConfirm = (props) => {
|
|
|
1317
1317
|
dp: base_dp,
|
|
1318
1318
|
padding: false,
|
|
1319
1319
|
intensity: 80,
|
|
1320
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
1320
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
1321
1321
|
children: totalQuantity
|
|
1322
1322
|
}
|
|
1323
1323
|
)
|
|
@@ -1332,7 +1332,7 @@ var ScaledOrderConfirm = (props) => {
|
|
|
1332
1332
|
dp: quote_dp,
|
|
1333
1333
|
padding: false,
|
|
1334
1334
|
intensity: 80,
|
|
1335
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
1335
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
1336
1336
|
children: national
|
|
1337
1337
|
}
|
|
1338
1338
|
)
|
|
@@ -1560,7 +1560,7 @@ var SlippageEditor = forwardRef((props, ref) => {
|
|
|
1560
1560
|
item
|
|
1561
1561
|
);
|
|
1562
1562
|
}),
|
|
1563
|
-
/* @__PURE__ */ jsx(
|
|
1563
|
+
/* @__PURE__ */ jsx("div", { dir: "ltr", children: /* @__PURE__ */ jsx(
|
|
1564
1564
|
Input,
|
|
1565
1565
|
{
|
|
1566
1566
|
suffix: "%",
|
|
@@ -1577,10 +1577,10 @@ var SlippageEditor = forwardRef((props, ref) => {
|
|
|
1577
1577
|
"oui-h-[40px] oui-w-[74px]"
|
|
1578
1578
|
),
|
|
1579
1579
|
input: "oui-text-base-contrast",
|
|
1580
|
-
additional: "oui-
|
|
1580
|
+
additional: "oui-ps-1"
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
|
-
)
|
|
1583
|
+
) })
|
|
1584
1584
|
] }),
|
|
1585
1585
|
!!error && /* @__PURE__ */ jsx(Box, { mt: 5, className: "-oui-mb-5", children: /* @__PURE__ */ jsx(Text, { size: "2xs", color: "danger", children: error }) })
|
|
1586
1586
|
] });
|
|
@@ -1654,50 +1654,84 @@ var SlippageCell = (props) => {
|
|
|
1654
1654
|
)
|
|
1655
1655
|
}
|
|
1656
1656
|
),
|
|
1657
|
-
/* @__PURE__ */ jsxs(
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1657
|
+
/* @__PURE__ */ jsxs(
|
|
1658
|
+
Flex,
|
|
1659
|
+
{
|
|
1660
|
+
justify: "between",
|
|
1661
|
+
itemAlign: "center",
|
|
1662
|
+
gap: 1,
|
|
1663
|
+
className: "oui-orderEntry-slippage oui-w-full",
|
|
1664
|
+
children: [
|
|
1665
|
+
/* @__PURE__ */ jsx(
|
|
1666
|
+
Text,
|
|
1667
|
+
{
|
|
1668
|
+
className: "oui-slippage-label oui-shrink-0 oui-whitespace-nowrap",
|
|
1669
|
+
size: "2xs",
|
|
1670
|
+
children: t("orderEntry.slippage")
|
|
1671
|
+
}
|
|
1672
|
+
),
|
|
1673
|
+
/* @__PURE__ */ jsx(
|
|
1674
|
+
AuthGuard,
|
|
1675
|
+
{
|
|
1676
|
+
fallback: () => /* @__PURE__ */ jsxs(Text, { size: "2xs", className: "oui-whitespace-nowrap", children: [
|
|
1677
|
+
t("orderEntry.slippage.est"),
|
|
1678
|
+
": -% / ",
|
|
1679
|
+
t("common.max"),
|
|
1680
|
+
": --%"
|
|
1681
|
+
] }),
|
|
1682
|
+
children: /* @__PURE__ */ jsxs(
|
|
1683
|
+
Flex,
|
|
1684
|
+
{
|
|
1685
|
+
gap: 1,
|
|
1686
|
+
itemAlign: "center",
|
|
1687
|
+
justify: "end",
|
|
1688
|
+
className: "oui-slippage-value-container oui-min-w-0 oui-flex-1 oui-whitespace-nowrap",
|
|
1689
|
+
children: [
|
|
1690
|
+
/* @__PURE__ */ jsx(
|
|
1691
|
+
Text.numeral,
|
|
1692
|
+
{
|
|
1693
|
+
size: "2xs",
|
|
1694
|
+
rule: "percentages",
|
|
1695
|
+
prefix: `${t("orderEntry.slippage.est")}: `,
|
|
1696
|
+
suffix: ` / ${t("common.max")}: `,
|
|
1697
|
+
className: "oui-whitespace-nowrap",
|
|
1698
|
+
children: props.estSlippage ?? 0
|
|
1699
|
+
}
|
|
1700
|
+
),
|
|
1701
|
+
/* @__PURE__ */ jsx(
|
|
1702
|
+
"button",
|
|
1703
|
+
{
|
|
1704
|
+
className: "oui-slippage-edit-btn oui-shrink-0 oui-text-2xs",
|
|
1705
|
+
onClick: () => setOpen(),
|
|
1706
|
+
children: /* @__PURE__ */ jsxs(
|
|
1707
|
+
Flex,
|
|
1708
|
+
{
|
|
1709
|
+
itemAlign: "center",
|
|
1710
|
+
className: "oui-gap-0.5 oui-whitespace-nowrap",
|
|
1711
|
+
as: "span",
|
|
1712
|
+
children: [
|
|
1713
|
+
/* @__PURE__ */ jsx(Text, { size: "2xs", className: "oui-text-primary", children: `${props.slippage || "-"}%` }),
|
|
1714
|
+
/* @__PURE__ */ jsx(
|
|
1715
|
+
EditIcon$1,
|
|
1716
|
+
{
|
|
1717
|
+
className: "oui-slippage-edit-icon oui-text-primary oui-hidden md:oui-block",
|
|
1718
|
+
size: 12,
|
|
1719
|
+
opacity: 1
|
|
1720
|
+
}
|
|
1721
|
+
)
|
|
1722
|
+
]
|
|
1723
|
+
}
|
|
1724
|
+
)
|
|
1725
|
+
}
|
|
1726
|
+
)
|
|
1727
|
+
]
|
|
1728
|
+
}
|
|
1729
|
+
)
|
|
1730
|
+
}
|
|
1731
|
+
)
|
|
1732
|
+
]
|
|
1733
|
+
}
|
|
1734
|
+
)
|
|
1701
1735
|
] });
|
|
1702
1736
|
};
|
|
1703
1737
|
var SlippageUI = (props) => {
|
|
@@ -1756,7 +1790,7 @@ function AssetInfo(props) {
|
|
|
1756
1790
|
size: "2xs",
|
|
1757
1791
|
dp: props.dp,
|
|
1758
1792
|
className: "oui-estLiqPrice-value oui-text-base-contrast-80",
|
|
1759
|
-
unitClassName: "oui-
|
|
1793
|
+
unitClassName: "oui-ms-1 oui-text-base-contrast-36",
|
|
1760
1794
|
children: canTrade ? displayEstLiqPrice ?? "--" : "--"
|
|
1761
1795
|
}
|
|
1762
1796
|
)
|
|
@@ -1993,7 +2027,7 @@ var Available = (props) => {
|
|
|
1993
2027
|
unit: quote,
|
|
1994
2028
|
size: "2xs",
|
|
1995
2029
|
className: "oui-available-value oui-text-base-contrast-80",
|
|
1996
|
-
unitClassName: "oui-
|
|
2030
|
+
unitClassName: "oui-ms-1 oui-text-base-contrast-54",
|
|
1997
2031
|
dp: 2,
|
|
1998
2032
|
padding: false,
|
|
1999
2033
|
children: canTrade ? freeCollateral : 0
|
|
@@ -2317,7 +2351,7 @@ var QuantitySlider = memo((props) => {
|
|
|
2317
2351
|
{
|
|
2318
2352
|
className: textVariants({
|
|
2319
2353
|
size: "2xs",
|
|
2320
|
-
className: "oui-quantitySlider-maxQty-btn oui-
|
|
2354
|
+
className: "oui-quantitySlider-maxQty-btn oui-me-1"
|
|
2321
2355
|
}),
|
|
2322
2356
|
onClick: onMax,
|
|
2323
2357
|
"data-testid": "oui-testid-orderEntry-maxQty-value-button",
|
|
@@ -2633,7 +2667,7 @@ var OptionCard = (props) => {
|
|
|
2633
2667
|
className: cn(
|
|
2634
2668
|
"oui-relative oui-w-full oui-rounded-md oui-p-2",
|
|
2635
2669
|
"oui-bg-base-6",
|
|
2636
|
-
"oui-text-
|
|
2670
|
+
"oui-text-start",
|
|
2637
2671
|
props.disabled ? "oui-cursor-not-allowed oui-opacity-50 oui-border oui-border-transparent" : props.selected ? "oui-border oui-border-[#38e2fe]" : "oui-border oui-border-transparent hover:oui-border-line-12",
|
|
2638
2672
|
!props.disabled && "oui-cursor-pointer"
|
|
2639
2673
|
),
|
|
@@ -2681,7 +2715,7 @@ var OptionCard = (props) => {
|
|
|
2681
2715
|
"div",
|
|
2682
2716
|
{
|
|
2683
2717
|
className: cn(
|
|
2684
|
-
"oui-absolute -oui-
|
|
2718
|
+
"oui-absolute -oui-end-px -oui-top-px",
|
|
2685
2719
|
"oui-rounded-bl-md oui-rounded-tr-md",
|
|
2686
2720
|
"oui-bg-[#38e2fe] oui-px-1 oui-py-0.5"
|
|
2687
2721
|
),
|
|
@@ -2888,7 +2922,7 @@ var useMarginModeSettingsScript = (options2) => {
|
|
|
2888
2922
|
setIsOperationLoading(false);
|
|
2889
2923
|
}
|
|
2890
2924
|
},
|
|
2891
|
-
[brokerLockedKeys, selectedKeys, updateMarginMode]
|
|
2925
|
+
[brokerLockedKeys, selectedKeys, t, updateMarginMode]
|
|
2892
2926
|
);
|
|
2893
2927
|
const isLoading = isDataLoading || isMarginModesLoading || isOperationLoading || isSettingMarginMode;
|
|
2894
2928
|
return {
|
|
@@ -2994,8 +3028,8 @@ var MarginModeSettings = (props) => {
|
|
|
2994
3028
|
props.searchKeyword.trim() ? "oui-outline-primary-light" : ""
|
|
2995
3029
|
)
|
|
2996
3030
|
},
|
|
2997
|
-
prefix: /* @__PURE__ */ jsx("div", { className: "oui-
|
|
2998
|
-
suffix: props.searchKeyword ? /* @__PURE__ */ jsx("div", { className: "oui-
|
|
3031
|
+
prefix: /* @__PURE__ */ jsx("div", { className: "oui-ps-3 oui-pe-1", "aria-hidden": "true", children: /* @__PURE__ */ jsx(SearchGlyph, { className: "oui-text-base-contrast-54" }) }),
|
|
3032
|
+
suffix: props.searchKeyword ? /* @__PURE__ */ jsx("div", { className: "oui-pe-2", children: /* @__PURE__ */ jsx(
|
|
2999
3033
|
CloseCircleFillIcon,
|
|
3000
3034
|
{
|
|
3001
3035
|
size: 14,
|
|
@@ -3349,7 +3383,7 @@ var LeverageBadge = (props) => {
|
|
|
3349
3383
|
dp: 0,
|
|
3350
3384
|
rm: Decimal.ROUND_DOWN,
|
|
3351
3385
|
unit: "x",
|
|
3352
|
-
unitClassName: "oui-
|
|
3386
|
+
unitClassName: "oui-ms-0",
|
|
3353
3387
|
children: curLeverage
|
|
3354
3388
|
}
|
|
3355
3389
|
)
|
|
@@ -3498,7 +3532,7 @@ var CustomInput = forwardRef(
|
|
|
3498
3532
|
input: cn("oui-mb-1 oui-mt-5 oui-h-5", props?.classNames?.input),
|
|
3499
3533
|
// prefix: cn(props.classNames?.prefix),
|
|
3500
3534
|
suffix: cn(
|
|
3501
|
-
"oui-absolute oui-
|
|
3535
|
+
"oui-absolute oui-end-0 oui-top-0 oui-justify-start oui-py-2 oui-text-2xs oui-text-base-contrast-36",
|
|
3502
3536
|
props.classNames?.suffix
|
|
3503
3537
|
)
|
|
3504
3538
|
},
|
|
@@ -3514,7 +3548,7 @@ var InputLabel = (props) => {
|
|
|
3514
3548
|
{
|
|
3515
3549
|
htmlFor: props.id,
|
|
3516
3550
|
className: cn(
|
|
3517
|
-
"oui-input-label oui-absolute oui-
|
|
3551
|
+
"oui-input-label oui-absolute oui-start-2 oui-top-[7px] oui-text-2xs oui-text-base-contrast-36",
|
|
3518
3552
|
props.className
|
|
3519
3553
|
),
|
|
3520
3554
|
children: props.children
|
|
@@ -3542,7 +3576,7 @@ var BBOOrderTypeSelect = (props) => {
|
|
|
3542
3576
|
value: BBOOrderType.QUEUE5
|
|
3543
3577
|
}
|
|
3544
3578
|
],
|
|
3545
|
-
[]
|
|
3579
|
+
[t]
|
|
3546
3580
|
);
|
|
3547
3581
|
return /* @__PURE__ */ jsx(
|
|
3548
3582
|
Select.options,
|
|
@@ -3698,7 +3732,7 @@ var PriceInput = (props) => {
|
|
|
3698
3732
|
{
|
|
3699
3733
|
className: cn(
|
|
3700
3734
|
"oui-orderEntry-bboSelect",
|
|
3701
|
-
"oui-absolute oui-bottom-1 oui-
|
|
3735
|
+
"oui-absolute oui-bottom-1 oui-start-0"
|
|
3702
3736
|
),
|
|
3703
3737
|
children: /* @__PURE__ */ jsx(
|
|
3704
3738
|
BBOOrderTypeSelect,
|
|
@@ -3735,7 +3769,7 @@ var QuantityInput = memo((props) => {
|
|
|
3735
3769
|
formatters: [inputFormatter.dpFormatter(base_dp)],
|
|
3736
3770
|
onFocus: onFocus(3 /* QUANTITY */),
|
|
3737
3771
|
onBlur: onBlur(3 /* QUANTITY */),
|
|
3738
|
-
className: "oui-orderEntry-quantityInput !oui-rounded-
|
|
3772
|
+
className: "oui-orderEntry-quantityInput !oui-rounded-e",
|
|
3739
3773
|
classNames: {
|
|
3740
3774
|
suffix: "oui-justify-end"
|
|
3741
3775
|
}
|
|
@@ -3770,7 +3804,7 @@ var TotalTypeSelect = memo((props) => {
|
|
|
3770
3804
|
trigger: cn(
|
|
3771
3805
|
"oui-orderEntry-totalTypeSelect-btn",
|
|
3772
3806
|
"oui-w-auto oui-border-none oui-bg-transparent oui-shadow-none",
|
|
3773
|
-
"oui-absolute oui-
|
|
3807
|
+
"oui-absolute oui-start-0 oui-top-[5px] oui-text-2xs oui-text-base-contrast-36"
|
|
3774
3808
|
)
|
|
3775
3809
|
},
|
|
3776
3810
|
onValueChange: props.onChange,
|
|
@@ -3828,7 +3862,7 @@ var TotalInput = memo((props) => {
|
|
|
3828
3862
|
formatters: [inputFormatter.dpFormatter(2)],
|
|
3829
3863
|
onFocus: onFocus(6 /* MARGIN */),
|
|
3830
3864
|
onBlur: onBlur(6 /* MARGIN */),
|
|
3831
|
-
className: "oui-orderEntry-marginInput !oui-rounded-
|
|
3865
|
+
className: "oui-orderEntry-marginInput !oui-rounded-s",
|
|
3832
3866
|
classNames: {
|
|
3833
3867
|
suffix: "oui-justify-end"
|
|
3834
3868
|
}
|
|
@@ -3848,7 +3882,7 @@ var TotalInput = memo((props) => {
|
|
|
3848
3882
|
onChange: (val) => {
|
|
3849
3883
|
setOrderValue("total", val);
|
|
3850
3884
|
},
|
|
3851
|
-
className: "oui-orderEntry-totalInput !oui-rounded-
|
|
3885
|
+
className: "oui-orderEntry-totalInput !oui-rounded-s",
|
|
3852
3886
|
classNames: {
|
|
3853
3887
|
suffix: "oui-justify-end"
|
|
3854
3888
|
},
|
|
@@ -3860,17 +3894,10 @@ var TotalInput = memo((props) => {
|
|
|
3860
3894
|
});
|
|
3861
3895
|
TotalInput.displayName = "TotalInput";
|
|
3862
3896
|
var QtyAndTotalInput = memo((props) => {
|
|
3863
|
-
return /* @__PURE__ */ jsxs(
|
|
3864
|
-
|
|
3865
|
-
{
|
|
3866
|
-
|
|
3867
|
-
className: "oui-orderEntry-qtyAndTotal oui-group oui-space-x-1",
|
|
3868
|
-
children: [
|
|
3869
|
-
/* @__PURE__ */ jsx(QuantityInput, { order_quantity: props.order_quantity }),
|
|
3870
|
-
/* @__PURE__ */ jsx(TotalInput, { total: props.total })
|
|
3871
|
-
]
|
|
3872
|
-
}
|
|
3873
|
-
);
|
|
3897
|
+
return /* @__PURE__ */ jsxs(Grid, { cols: 2, className: "oui-orderEntry-qtyAndTotal oui-group oui-gap-1", children: [
|
|
3898
|
+
/* @__PURE__ */ jsx(QuantityInput, { order_quantity: props.order_quantity }),
|
|
3899
|
+
/* @__PURE__ */ jsx(TotalInput, { total: props.total })
|
|
3900
|
+
] });
|
|
3874
3901
|
});
|
|
3875
3902
|
QtyAndTotalInput.displayName = "QtyAndTotalInput";
|
|
3876
3903
|
var QuantityDistributionInput = memo((props) => {
|
|
@@ -3961,7 +3988,7 @@ var QuantityDistributionHint = (props) => {
|
|
|
3961
3988
|
quantity: /* @__PURE__ */ jsx(DescendingQuantity, {})
|
|
3962
3989
|
}
|
|
3963
3990
|
];
|
|
3964
|
-
}, []);
|
|
3991
|
+
}, [t]);
|
|
3965
3992
|
const currentContent = useMemo(() => {
|
|
3966
3993
|
return content.find((item) => item.type === type);
|
|
3967
3994
|
}, [content, type]);
|
|
@@ -3977,7 +4004,7 @@ var QuantityDistributionHint = (props) => {
|
|
|
3977
4004
|
intensity: type === item.type ? 500 : 600,
|
|
3978
4005
|
width: 78,
|
|
3979
4006
|
p: 2,
|
|
3980
|
-
className: "oui-cursor-pointer oui-rounded-
|
|
4007
|
+
className: "oui-cursor-pointer oui-rounded-s",
|
|
3981
4008
|
onClick: () => {
|
|
3982
4009
|
setType(item.type);
|
|
3983
4010
|
},
|
|
@@ -3995,10 +4022,10 @@ var QuantityDistributionHint = (props) => {
|
|
|
3995
4022
|
intensity: 500,
|
|
3996
4023
|
width: "100%",
|
|
3997
4024
|
className: cn(
|
|
3998
|
-
"oui-rounded-
|
|
3999
|
-
type === DistributionType.FLAT && "oui-rounded-
|
|
4000
|
-
type === DistributionType.ASCENDING && "oui-rounded-
|
|
4001
|
-
type === DistributionType.DESCENDING && "oui-rounded-
|
|
4025
|
+
"oui-rounded-e",
|
|
4026
|
+
type === DistributionType.FLAT && "oui-rounded-es",
|
|
4027
|
+
type === DistributionType.ASCENDING && "oui-rounded-s",
|
|
4028
|
+
type === DistributionType.DESCENDING && "oui-rounded-ss"
|
|
4002
4029
|
),
|
|
4003
4030
|
children: [
|
|
4004
4031
|
/* @__PURE__ */ jsx("div", { children: currentContent?.formula }),
|
|
@@ -4060,7 +4087,7 @@ var QuantityDistribution = (props) => {
|
|
|
4060
4087
|
className: cn(
|
|
4061
4088
|
"oui-quantityDistribution-option-label",
|
|
4062
4089
|
"oui-text-2xs",
|
|
4063
|
-
"oui-
|
|
4090
|
+
"oui-ms-1",
|
|
4064
4091
|
"oui-whitespace-nowrap oui-break-normal"
|
|
4065
4092
|
),
|
|
4066
4093
|
children: distributionTypeMap[type]
|
|
@@ -4394,7 +4421,7 @@ var ScaledQuantityUnit = (props) => {
|
|
|
4394
4421
|
classNames: {
|
|
4395
4422
|
trigger: cn(
|
|
4396
4423
|
"oui-orderEntry-scaledQuantityUnit-btn",
|
|
4397
|
-
"oui-absolute oui-
|
|
4424
|
+
"oui-absolute oui-end-0 oui-top-1",
|
|
4398
4425
|
"oui-w-full oui-justify-end",
|
|
4399
4426
|
"oui-shadow-none"
|
|
4400
4427
|
)
|
|
@@ -4440,7 +4467,7 @@ var ScaledQuantityInput = memo((props) => {
|
|
|
4440
4467
|
suffix,
|
|
4441
4468
|
id: "order_quantity_input",
|
|
4442
4469
|
name: "order_quantity_input",
|
|
4443
|
-
className: "oui-orderEntry-scaledOrder-quantityInput !oui-rounded-
|
|
4470
|
+
className: "oui-orderEntry-scaledOrder-quantityInput !oui-rounded-e",
|
|
4444
4471
|
value: props.order_quantity,
|
|
4445
4472
|
error: getErrorMsg(
|
|
4446
4473
|
"order_quantity",
|
|
@@ -4462,7 +4489,7 @@ var ScaledQuantityInput = memo((props) => {
|
|
|
4462
4489
|
suffix,
|
|
4463
4490
|
id: "order_total_input",
|
|
4464
4491
|
name: "order_total_input",
|
|
4465
|
-
className: "oui-orderEntry-scaledOrder-totalInput !oui-rounded-
|
|
4492
|
+
className: "oui-orderEntry-scaledOrder-totalInput !oui-rounded-e",
|
|
4466
4493
|
value: props.total,
|
|
4467
4494
|
error: getErrorMsg("order_quantity", `${errors?.total?.value} ${quote}`),
|
|
4468
4495
|
onChange: (val) => {
|
|
@@ -4509,7 +4536,7 @@ var TotalOrdersInput = memo((props) => {
|
|
|
4509
4536
|
label: t("orderEntry.totalOrders"),
|
|
4510
4537
|
placeholder: "2-20",
|
|
4511
4538
|
id: "order_total_orders_input",
|
|
4512
|
-
className: "oui-orderEntry-scaledOrder-totalOrdersInput !oui-rounded-
|
|
4539
|
+
className: "oui-orderEntry-scaledOrder-totalOrdersInput !oui-rounded-s",
|
|
4513
4540
|
value: props.total_orders,
|
|
4514
4541
|
error: getErrorMsg("total_orders"),
|
|
4515
4542
|
onChange: (val) => {
|
|
@@ -4540,7 +4567,7 @@ var ScaledOrderInput = (props) => {
|
|
|
4540
4567
|
Grid,
|
|
4541
4568
|
{
|
|
4542
4569
|
cols: 2,
|
|
4543
|
-
className: "oui-scaledOrderInput-qtyAndOrders oui-group oui-
|
|
4570
|
+
className: "oui-scaledOrderInput-qtyAndOrders oui-group oui-gap-1",
|
|
4544
4571
|
children: [
|
|
4545
4572
|
/* @__PURE__ */ jsx(
|
|
4546
4573
|
ScaledQuantityInput,
|
|
@@ -4678,7 +4705,7 @@ var TrailingCallbackSelect = memo(
|
|
|
4678
4705
|
classNames: {
|
|
4679
4706
|
trigger: cn(
|
|
4680
4707
|
"oui-orderEntry-trailingCallbackSelect-btn",
|
|
4681
|
-
"oui-absolute oui-
|
|
4708
|
+
"oui-absolute oui-end-0 oui-top-1",
|
|
4682
4709
|
"oui-w-[124px] oui-justify-end",
|
|
4683
4710
|
"oui-text-base-contrast-36"
|
|
4684
4711
|
)
|
|
@@ -4781,7 +4808,7 @@ var TrailingCallbackInput = memo(
|
|
|
4781
4808
|
/* @__PURE__ */ jsx(
|
|
4782
4809
|
CallbackRatePercentages,
|
|
4783
4810
|
{
|
|
4784
|
-
className: "oui-trailingCallback-percentages oui-absolute oui-bottom-1 oui-
|
|
4811
|
+
className: "oui-trailingCallback-percentages oui-absolute oui-bottom-1 oui-start-2",
|
|
4785
4812
|
callback_rate
|
|
4786
4813
|
}
|
|
4787
4814
|
)
|
|
@@ -5155,7 +5182,7 @@ var PNLInput = (props) => {
|
|
|
5155
5182
|
onBlur();
|
|
5156
5183
|
},
|
|
5157
5184
|
suffix: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5158
|
-
isPercentageMode && !!value && /* @__PURE__ */ jsx(Text, { size: "2xs", color: "inherit", className: "oui-
|
|
5185
|
+
isPercentageMode && !!value && /* @__PURE__ */ jsx(Text, { size: "2xs", color: "inherit", className: "oui-ms-[2px]", children: "%" }),
|
|
5159
5186
|
/* @__PURE__ */ jsx(
|
|
5160
5187
|
PNLMenus,
|
|
5161
5188
|
{
|
|
@@ -5214,7 +5241,7 @@ var PnlInputProvider = (props) => {
|
|
|
5214
5241
|
{
|
|
5215
5242
|
rule: "percentages",
|
|
5216
5243
|
className: cn(
|
|
5217
|
-
"oui-
|
|
5244
|
+
"oui-ms-1 oui-text-xs",
|
|
5218
5245
|
type === "TP" ? "oui-text-trade-profit" : "oui-text-trade-loss"
|
|
5219
5246
|
),
|
|
5220
5247
|
children: values.ROI
|
|
@@ -5224,14 +5251,14 @@ var PnlInputProvider = (props) => {
|
|
|
5224
5251
|
{
|
|
5225
5252
|
rule: "price",
|
|
5226
5253
|
className: cn(
|
|
5227
|
-
"oui-
|
|
5254
|
+
"oui-ms-1 oui-text-xs",
|
|
5228
5255
|
type === "TP" ? "oui-text-trade-profit" : "oui-text-trade-loss"
|
|
5229
5256
|
),
|
|
5230
5257
|
children: values.PnL
|
|
5231
5258
|
}
|
|
5232
5259
|
)
|
|
5233
5260
|
] });
|
|
5234
|
-
}, [mode, values.ROI, values.PnL, values.trigger_price]);
|
|
5261
|
+
}, [mode, t, type, values.ROI, values.PnL, values.trigger_price]);
|
|
5235
5262
|
const memoizedValue = useMemo(() => {
|
|
5236
5263
|
return { mode, setMode, tipsEle };
|
|
5237
5264
|
}, [mode, setMode, tipsEle]);
|
|
@@ -5444,7 +5471,6 @@ var TPSLTriggerPriceInput = (props) => {
|
|
|
5444
5471
|
const { t } = useTranslation();
|
|
5445
5472
|
const { errorMsgVisible } = useOrderEntryContext();
|
|
5446
5473
|
const { tipsEle } = usePnlInputContext();
|
|
5447
|
-
const [prefix, setPrefix] = useState(`${props.type} Price`);
|
|
5448
5474
|
const [placeholder, setPlaceholder] = useState("USDC");
|
|
5449
5475
|
const [tipVisible, setTipVisible] = useState(false);
|
|
5450
5476
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -5469,31 +5495,17 @@ var TPSLTriggerPriceInput = (props) => {
|
|
|
5469
5495
|
tipsEle,
|
|
5470
5496
|
props.displayErrorMessage
|
|
5471
5497
|
]);
|
|
5472
|
-
const
|
|
5473
|
-
let _prefix = props.type === "TP" ? t("tpsl.tpPrice") : t("tpsl.slPrice");
|
|
5474
|
-
if (trigger_price) {
|
|
5475
|
-
_prefix = props.type === "TP" ? t("tpsl.tp") : t("tpsl.sl");
|
|
5476
|
-
}
|
|
5477
|
-
return _prefix;
|
|
5478
|
-
};
|
|
5498
|
+
const prefix = isFocused || innerValue ? props.type === "TP" ? t("tpsl.tp") : t("tpsl.sl") : props.type === "TP" ? t("tpsl.tpPrice") : t("tpsl.slPrice");
|
|
5479
5499
|
const onValueChange = (value) => {
|
|
5480
5500
|
setInnerValue(value);
|
|
5481
5501
|
props.onChange(value);
|
|
5482
5502
|
};
|
|
5483
|
-
useEffect(() => {
|
|
5484
|
-
setPrefix(getPrefixLabel(props.values.trigger_price));
|
|
5485
|
-
if (!isFocused) {
|
|
5486
|
-
setInnerValue(props.values.trigger_price ?? "");
|
|
5487
|
-
}
|
|
5488
|
-
}, [props.type, props.values.trigger_price]);
|
|
5489
5503
|
const onFocus = () => {
|
|
5490
|
-
setPrefix(props.type === "TP" ? t("tpsl.tp") : t("tpsl.sl"));
|
|
5491
5504
|
setPlaceholder("");
|
|
5492
5505
|
setTipVisible(true);
|
|
5493
5506
|
setIsFocused(true);
|
|
5494
5507
|
};
|
|
5495
5508
|
const onBlur = () => {
|
|
5496
|
-
setPrefix(getPrefixLabel(props.values.trigger_price));
|
|
5497
5509
|
setPlaceholder("USDC");
|
|
5498
5510
|
setTipVisible(false);
|
|
5499
5511
|
setIsFocused(false);
|
|
@@ -5522,10 +5534,10 @@ var TPSLTriggerPriceInput = (props) => {
|
|
|
5522
5534
|
additional: "oui-text-base-contrast-54",
|
|
5523
5535
|
root: cn(
|
|
5524
5536
|
"oui-orderEntry-tpsl-triggerPrice",
|
|
5525
|
-
"oui-
|
|
5537
|
+
"oui-pe-2 md:oui-pe-3",
|
|
5526
5538
|
props.classNames?.root
|
|
5527
5539
|
),
|
|
5528
|
-
prefix: cn("oui-
|
|
5540
|
+
prefix: cn("oui-pe-1 md:oui-pe-2", props.classNames?.prefix),
|
|
5529
5541
|
input: cn(
|
|
5530
5542
|
"oui-text-2xs placeholder:oui-text-2xs",
|
|
5531
5543
|
props.classNames?.input
|
|
@@ -6090,7 +6102,7 @@ var OrderEntry = (props) => {
|
|
|
6090
6102
|
},
|
|
6091
6103
|
className: cn(
|
|
6092
6104
|
"oui-additional-pin-btn",
|
|
6093
|
-
"oui-group oui-absolute oui-
|
|
6105
|
+
"oui-group oui-absolute oui-end-2 oui-top-2"
|
|
6094
6106
|
),
|
|
6095
6107
|
"data-testid": "oui-testid-orderEntry-pinned-button"
|
|
6096
6108
|
}
|
|
@@ -6115,7 +6127,7 @@ var OrderEntry = (props) => {
|
|
|
6115
6127
|
content: cn(
|
|
6116
6128
|
"oui-tpslAdvanced-sheet",
|
|
6117
6129
|
"oui-rounded-[16px] oui-border-none !oui-p-0",
|
|
6118
|
-
isMobile ? "oui-inset-y-0 oui-
|
|
6130
|
+
isMobile ? "oui-inset-y-0 oui-end-0 oui-w-[280px]" : "!oui-bottom-[40px] oui-end-3 oui-top-[44px] !oui-h-auto oui-w-[360px]"
|
|
6119
6131
|
)
|
|
6120
6132
|
},
|
|
6121
6133
|
contentProps: { side: "right", closeable: false },
|