@kodiak-finance/orderly-ui-order-entry 2.9.2-alpha.1 → 2.9.3

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 CHANGED
@@ -77,7 +77,7 @@ var AdditionalInfo = (props) => {
77
77
  htmlFor: "toggle_order_post_only",
78
78
  className: orderlyUi.cn(
79
79
  "oui-postOnly-label",
80
- "oui-ml-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
80
+ "oui-ms-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
81
81
  "oui-cursor-pointer oui-whitespace-nowrap oui-break-normal oui-border-b oui-border-dashed oui-border-line-12"
82
82
  ),
83
83
  children: t("orderEntry.orderType.postOnly")
@@ -111,7 +111,7 @@ var AdditionalInfo = (props) => {
111
111
  htmlFor: "toggle_order_iov",
112
112
  className: orderlyUi.cn(
113
113
  "oui-ioc-label",
114
- "oui-ml-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
114
+ "oui-ms-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
115
115
  "oui-cursor-pointer oui-whitespace-nowrap oui-break-normal oui-border-b oui-border-dashed oui-border-line-12"
116
116
  ),
117
117
  children: t("orderEntry.orderType.ioc")
@@ -145,7 +145,7 @@ var AdditionalInfo = (props) => {
145
145
  htmlFor: "toggle_order_fok",
146
146
  className: orderlyUi.cn(
147
147
  "oui-fok-label",
148
- "oui-ml-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
148
+ "oui-ms-1 oui-text-2xs peer-data-[disabled]:oui-text-base-contrast-20",
149
149
  "oui-cursor-pointer oui-whitespace-nowrap oui-break-normal oui-border-b oui-border-dashed oui-border-line-12"
150
150
  ),
151
151
  children: t("orderEntry.orderType.fok")
@@ -176,7 +176,7 @@ var AdditionalInfo = (props) => {
176
176
  "label",
177
177
  {
178
178
  htmlFor: "toggle_order_confirm",
179
- className: "oui-orderConfirm-label oui-ml-1 oui-text-2xs",
179
+ className: "oui-orderConfirm-label oui-ms-1 oui-text-2xs",
180
180
  children: t("orderEntry.orderConfirm")
181
181
  }
182
182
  )
@@ -204,7 +204,7 @@ var AdditionalInfo = (props) => {
204
204
  "label",
205
205
  {
206
206
  htmlFor: "toggle_order_hidden",
207
- className: "oui-orderHidden-label oui-ml-1 oui-cursor-pointer oui-border-b oui-border-dashed oui-border-line-12 oui-text-2xs",
207
+ className: "oui-orderHidden-label oui-ms-1 oui-cursor-pointer oui-border-b oui-border-dashed oui-border-line-12 oui-text-2xs",
208
208
  children: t("orderEntry.hidden")
209
209
  }
210
210
  )
@@ -230,7 +230,7 @@ var AdditionalInfo = (props) => {
230
230
  "label",
231
231
  {
232
232
  htmlFor: "toggle_order_keep_visible",
233
- className: "oui-keepVisible-label oui-ml-1 oui-text-2xs",
233
+ className: "oui-keepVisible-label oui-ms-1 oui-text-2xs",
234
234
  children: t("orderEntry.keepVisible")
235
235
  }
236
236
  )
@@ -342,7 +342,7 @@ function AdvancedTPSLResult(props) {
342
342
  /* @__PURE__ */ jsxRuntime.jsx(
343
343
  orderlyUi.Text.numeral,
344
344
  {
345
- suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ml-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
345
+ suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
346
346
  className: "oui-text-base-contrast",
347
347
  dp: symbolInfo.quote_dp,
348
348
  children: formattedOrder.tp_trigger_price ?? ""
@@ -354,7 +354,7 @@ function AdvancedTPSLResult(props) {
354
354
  formattedOrder.tp_order_type === orderlyTypes.OrderType.LIMIT ? /* @__PURE__ */ jsxRuntime.jsx(
355
355
  orderlyUi.Text.numeral,
356
356
  {
357
- suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ml-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
357
+ suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
358
358
  className: "oui-text-base-contrast",
359
359
  dp: symbolInfo.quote_dp,
360
360
  children: formattedOrder.tp_order_price ?? ""
@@ -366,7 +366,7 @@ function AdvancedTPSLResult(props) {
366
366
  /* @__PURE__ */ jsxRuntime.jsx(
367
367
  orderlyUi.Text.numeral,
368
368
  {
369
- suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ml-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
369
+ suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
370
370
  coloring: true,
371
371
  dp: 2,
372
372
  children: Number(formattedOrder.tp_pnl)
@@ -419,7 +419,7 @@ function AdvancedTPSLResult(props) {
419
419
  /* @__PURE__ */ jsxRuntime.jsx(
420
420
  orderlyUi.Text.numeral,
421
421
  {
422
- suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ml-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
422
+ suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
423
423
  className: "oui-text-base-contrast",
424
424
  dp: symbolInfo.quote_dp,
425
425
  children: formattedOrder.sl_trigger_price ?? ""
@@ -431,7 +431,7 @@ function AdvancedTPSLResult(props) {
431
431
  formattedOrder.sl_order_type === orderlyTypes.OrderType.LIMIT ? /* @__PURE__ */ jsxRuntime.jsx(
432
432
  orderlyUi.Text.numeral,
433
433
  {
434
- suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ml-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
434
+ suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
435
435
  className: "oui-text-base-contrast",
436
436
  dp: symbolInfo.quote_dp,
437
437
  children: formattedOrder.sl_order_price ?? ""
@@ -444,7 +444,7 @@ function AdvancedTPSLResult(props) {
444
444
  orderlyUi.Text.numeral,
445
445
  {
446
446
  coloring: true,
447
- suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ml-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
447
+ suffix: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-ms-1 oui-text-base-contrast-36", children: symbolInfo.quote }),
448
448
  dp: 2,
449
449
  children: Number(formattedOrder.sl_pnl)
450
450
  }
@@ -646,7 +646,7 @@ var OrderConfirmDialog = (props) => {
646
646
  unit: quote,
647
647
  rule: "price",
648
648
  className: "oui-text-base-contrast",
649
- unitClassName: "oui-text-base-contrast-36 oui-ml-1",
649
+ unitClassName: "oui-text-base-contrast-36 oui-ms-1",
650
650
  dp: quote_dp,
651
651
  padding: false,
652
652
  children: order.order_price
@@ -676,7 +676,7 @@ var OrderConfirmDialog = (props) => {
676
676
  "oui-text-base-contrast",
677
677
  colorType === "TP" ? "oui-text-trade-profit" : "oui-text-trade-loss"
678
678
  ),
679
- unitClassName: "oui-text-base-contrast-36 oui-ml-1",
679
+ unitClassName: "oui-text-base-contrast-36 oui-ms-1",
680
680
  dp: quote_dp,
681
681
  padding: false,
682
682
  children: price
@@ -982,7 +982,7 @@ var OrderItem = (props) => {
982
982
  dp,
983
983
  padding: false,
984
984
  className: "oui-text-base-contrast",
985
- unitClassName: "oui-text-base-contrast-36 oui-ml-1",
985
+ unitClassName: "oui-text-base-contrast-36 oui-ms-1",
986
986
  children: value
987
987
  }
988
988
  )
@@ -1006,7 +1006,7 @@ var OrderTypeTag = (props) => {
1006
1006
  default:
1007
1007
  return "";
1008
1008
  }
1009
- }, [props.type]);
1009
+ }, [props.type, t]);
1010
1010
  return /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Badge, { color: "neutral", size: "sm", children: typeStr });
1011
1011
  };
1012
1012
  var Dialog = (props) => {
@@ -1324,7 +1324,7 @@ var ScaledOrderConfirm = (props) => {
1324
1324
  dp: base_dp,
1325
1325
  padding: false,
1326
1326
  intensity: 80,
1327
- unitClassName: "oui-text-base-contrast-36 oui-ml-1",
1327
+ unitClassName: "oui-text-base-contrast-36 oui-ms-1",
1328
1328
  children: totalQuantity
1329
1329
  }
1330
1330
  )
@@ -1339,7 +1339,7 @@ var ScaledOrderConfirm = (props) => {
1339
1339
  dp: quote_dp,
1340
1340
  padding: false,
1341
1341
  intensity: 80,
1342
- unitClassName: "oui-text-base-contrast-36 oui-ml-1",
1342
+ unitClassName: "oui-text-base-contrast-36 oui-ms-1",
1343
1343
  children: national
1344
1344
  }
1345
1345
  )
@@ -1777,19 +1777,26 @@ var MarginModeSwitch = (props) => {
1777
1777
  var OptionCard = (props) => {
1778
1778
  const { t } = orderlyI18n.useTranslation();
1779
1779
  const title = props.mode === orderlyTypes.MarginMode.CROSS ? t("marginMode.crossMargin") : t("marginMode.isolatedMargin");
1780
- const desc = props.mode === orderlyTypes.MarginMode.CROSS ? t("marginMode.crossMarginDescription") : t("marginMode.isolatedMarginDescription");
1781
1780
  return /* @__PURE__ */ jsxRuntime.jsxs(
1782
- "button",
1781
+ "div",
1783
1782
  {
1784
- type: "button",
1783
+ role: "button",
1784
+ tabIndex: props.disabled ? -1 : 0,
1785
1785
  className: orderlyUi.cn(
1786
1786
  "oui-relative oui-w-full oui-rounded-md oui-p-2",
1787
1787
  "oui-bg-base-6",
1788
- "oui-text-left",
1789
- 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"
1788
+ "oui-text-start",
1789
+ 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",
1790
+ !props.disabled && "oui-cursor-pointer"
1790
1791
  ),
1791
1792
  onClick: props.disabled ? void 0 : props.onClick,
1792
- disabled: props.disabled,
1793
+ onKeyDown: (e) => {
1794
+ if (props.disabled) return;
1795
+ if (e.key === "Enter" || e.key === " ") {
1796
+ e.preventDefault();
1797
+ props.onClick();
1798
+ }
1799
+ },
1793
1800
  "aria-disabled": props.disabled,
1794
1801
  "data-testid": `oui-testid-marginModeSwitch-option-${props.mode}`,
1795
1802
  children: [
@@ -1802,13 +1809,31 @@ var OptionCard = (props) => {
1802
1809
  children: title
1803
1810
  }
1804
1811
  ),
1805
- /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-text-2xs oui-leading-[15px] oui-text-base-contrast-36 oui-font-semibold oui-tracking-[0.03em]", children: desc })
1812
+ props.mode === orderlyTypes.MarginMode.ISOLATED ? /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-text-2xs oui-leading-[15px] oui-text-base-contrast-36 oui-font-semibold oui-tracking-[0.03em]", children: /* @__PURE__ */ jsxRuntime.jsx(
1813
+ orderlyI18n.Trans,
1814
+ {
1815
+ i18nKey: "marginMode.isolatedMarginDescription",
1816
+ components: [
1817
+ /* @__PURE__ */ jsxRuntime.jsx(
1818
+ "a",
1819
+ {
1820
+ href: "https://orderly.network/docs/introduction/trade-on-orderly/perpetual-futures/isolated-margin",
1821
+ target: "_blank",
1822
+ rel: "noopener noreferrer",
1823
+ className: "whitespace-nowrap oui-font-semibold oui-text-warning oui-underline oui-underline-offset-2 hover:oui-text-warning/90",
1824
+ onClick: (e) => e.stopPropagation()
1825
+ },
1826
+ "isolated-margin-doc"
1827
+ )
1828
+ ]
1829
+ }
1830
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-text-2xs oui-leading-[15px] oui-text-base-contrast-36 oui-font-semibold oui-tracking-[0.03em]", children: t("marginMode.crossMarginDescription") })
1806
1831
  ] }),
1807
1832
  props.isCurrent ? /* @__PURE__ */ jsxRuntime.jsx(
1808
1833
  "div",
1809
1834
  {
1810
1835
  className: orderlyUi.cn(
1811
- "oui-absolute -oui-right-px -oui-top-px",
1836
+ "oui-absolute -oui-end-px -oui-top-px",
1812
1837
  "oui-rounded-bl-md oui-rounded-tr-md",
1813
1838
  "oui-bg-[#38e2fe] oui-px-1 oui-py-0.5"
1814
1839
  ),
@@ -1823,7 +1848,11 @@ var useMarginModeSwitchScript = (options2) => {
1823
1848
  const { symbol, close } = options2;
1824
1849
  const { isMobile } = orderlyUi.useScreen();
1825
1850
  const { t } = orderlyI18n.useTranslation();
1826
- const { marginMode: currentMarginMode, update } = orderlyHooks.useMarginModeBySymbol(symbol);
1851
+ const {
1852
+ marginMode: currentMarginMode,
1853
+ update,
1854
+ isPermissionlessListing
1855
+ } = orderlyHooks.useMarginModeBySymbol(symbol);
1827
1856
  const [selectedMarginMode, setSelectedMarginMode] = React4.useState(currentMarginMode);
1828
1857
  React4.useEffect(() => {
1829
1858
  setSelectedMarginMode(currentMarginMode);
@@ -1861,7 +1890,8 @@ var useMarginModeSwitchScript = (options2) => {
1861
1890
  setSelectedMarginMode,
1862
1891
  applyMarginMode,
1863
1892
  close,
1864
- onSelect
1893
+ onSelect,
1894
+ isPermissionlessListing
1865
1895
  };
1866
1896
  };
1867
1897
  var useMarginModeSettingsScript = (options2) => {
@@ -2010,7 +2040,7 @@ var useMarginModeSettingsScript = (options2) => {
2010
2040
  setIsOperationLoading(false);
2011
2041
  }
2012
2042
  },
2013
- [brokerLockedKeys, selectedKeys, updateMarginMode]
2043
+ [brokerLockedKeys, selectedKeys, t, updateMarginMode]
2014
2044
  );
2015
2045
  const isLoading = isDataLoading || isMarginModesLoading || isOperationLoading || isSettingMarginMode;
2016
2046
  return {
@@ -2116,8 +2146,8 @@ var MarginModeSettings = (props) => {
2116
2146
  props.searchKeyword.trim() ? "oui-outline-primary-light" : ""
2117
2147
  )
2118
2148
  },
2119
- prefix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-pl-3 oui-pr-1", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(SearchGlyph, { className: "oui-text-base-contrast-54" }) }),
2120
- suffix: props.searchKeyword ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-pr-2", children: /* @__PURE__ */ jsxRuntime.jsx(
2149
+ prefix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-ps-3 oui-pe-1", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(SearchGlyph, { className: "oui-text-base-contrast-54" }) }),
2150
+ suffix: props.searchKeyword ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-pe-2", children: /* @__PURE__ */ jsxRuntime.jsx(
2121
2151
  orderlyUi.CloseCircleFillIcon,
2122
2152
  {
2123
2153
  size: 14,
@@ -2471,7 +2501,7 @@ var LeverageBadge = (props) => {
2471
2501
  dp: 0,
2472
2502
  rm: orderlyUtils.Decimal.ROUND_DOWN,
2473
2503
  unit: "x",
2474
- unitClassName: "oui-ml-0",
2504
+ unitClassName: "oui-ms-0",
2475
2505
  children: curLeverage
2476
2506
  }
2477
2507
  )
@@ -2843,7 +2873,7 @@ var SlippageEditor = React4.forwardRef((props, ref) => {
2843
2873
  item
2844
2874
  );
2845
2875
  }),
2846
- /* @__PURE__ */ jsxRuntime.jsx(
2876
+ /* @__PURE__ */ jsxRuntime.jsx("div", { dir: "ltr", children: /* @__PURE__ */ jsxRuntime.jsx(
2847
2877
  orderlyUi.Input,
2848
2878
  {
2849
2879
  suffix: "%",
@@ -2860,10 +2890,10 @@ var SlippageEditor = React4.forwardRef((props, ref) => {
2860
2890
  "oui-h-[40px] oui-w-[74px]"
2861
2891
  ),
2862
2892
  input: "oui-text-base-contrast",
2863
- additional: "oui-pl-1"
2893
+ additional: "oui-ps-1"
2864
2894
  }
2865
2895
  }
2866
- )
2896
+ ) })
2867
2897
  ] }),
2868
2898
  !!error && /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Box, { mt: 5, className: "-oui-mb-5", children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "2xs", color: "danger", children: error }) })
2869
2899
  ] });
@@ -2937,50 +2967,84 @@ var SlippageCell = (props) => {
2937
2967
  )
2938
2968
  }
2939
2969
  ),
2940
- /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { justify: "between", className: "oui-orderEntry-slippage", children: [
2941
- /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-slippage-label", size: "2xs", children: t("orderEntry.slippage") }),
2942
- /* @__PURE__ */ jsxRuntime.jsx(
2943
- orderlyUiConnector.AuthGuard,
2944
- {
2945
- fallback: () => /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Text, { size: "2xs", children: [
2946
- t("orderEntry.slippage.est"),
2947
- ": -% / ",
2948
- t("common.max"),
2949
- ": --%"
2950
- ] }),
2951
- children: /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { gap: 1, className: "oui-slippage-value-container", children: [
2952
- /* @__PURE__ */ jsxRuntime.jsx(
2953
- orderlyUi.Text.numeral,
2954
- {
2955
- size: "2xs",
2956
- rule: "percentages",
2957
- prefix: `${t("orderEntry.slippage.est")}: `,
2958
- suffix: ` / ${t("common.max")}: `,
2959
- children: props.estSlippage ?? 0
2960
- }
2961
- ),
2962
- /* @__PURE__ */ jsxRuntime.jsx(
2963
- "button",
2964
- {
2965
- className: "oui-slippage-edit-btn oui-text-2xs",
2966
- onClick: () => setOpen(),
2967
- children: /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { className: "oui-gap-0.5", as: "span", children: [
2968
- /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "2xs", className: "oui-text-primary", children: `${props.slippage || "-"}%` }),
2969
- /* @__PURE__ */ jsxRuntime.jsx(
2970
- orderlyUi.EditIcon,
2971
- {
2972
- className: "oui-slippage-edit-icon oui-text-primary oui-hidden md:oui-block",
2973
- size: 12,
2974
- opacity: 1
2975
- }
2976
- )
2977
- ] })
2978
- }
2979
- )
2980
- ] })
2981
- }
2982
- )
2983
- ] })
2970
+ /* @__PURE__ */ jsxRuntime.jsxs(
2971
+ orderlyUi.Flex,
2972
+ {
2973
+ justify: "between",
2974
+ itemAlign: "center",
2975
+ gap: 1,
2976
+ className: "oui-orderEntry-slippage oui-w-full",
2977
+ children: [
2978
+ /* @__PURE__ */ jsxRuntime.jsx(
2979
+ orderlyUi.Text,
2980
+ {
2981
+ className: "oui-slippage-label oui-shrink-0 oui-whitespace-nowrap",
2982
+ size: "2xs",
2983
+ children: t("orderEntry.slippage")
2984
+ }
2985
+ ),
2986
+ /* @__PURE__ */ jsxRuntime.jsx(
2987
+ orderlyUiConnector.AuthGuard,
2988
+ {
2989
+ fallback: () => /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Text, { size: "2xs", className: "oui-whitespace-nowrap", children: [
2990
+ t("orderEntry.slippage.est"),
2991
+ ": -% / ",
2992
+ t("common.max"),
2993
+ ": --%"
2994
+ ] }),
2995
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2996
+ orderlyUi.Flex,
2997
+ {
2998
+ gap: 1,
2999
+ itemAlign: "center",
3000
+ justify: "end",
3001
+ className: "oui-slippage-value-container oui-min-w-0 oui-flex-1 oui-whitespace-nowrap",
3002
+ children: [
3003
+ /* @__PURE__ */ jsxRuntime.jsx(
3004
+ orderlyUi.Text.numeral,
3005
+ {
3006
+ size: "2xs",
3007
+ rule: "percentages",
3008
+ prefix: `${t("orderEntry.slippage.est")}: `,
3009
+ suffix: ` / ${t("common.max")}: `,
3010
+ className: "oui-whitespace-nowrap",
3011
+ children: props.estSlippage ?? 0
3012
+ }
3013
+ ),
3014
+ /* @__PURE__ */ jsxRuntime.jsx(
3015
+ "button",
3016
+ {
3017
+ className: "oui-slippage-edit-btn oui-shrink-0 oui-text-2xs",
3018
+ onClick: () => setOpen(),
3019
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
3020
+ orderlyUi.Flex,
3021
+ {
3022
+ itemAlign: "center",
3023
+ className: "oui-gap-0.5 oui-whitespace-nowrap",
3024
+ as: "span",
3025
+ children: [
3026
+ /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "2xs", className: "oui-text-primary", children: `${props.slippage || "-"}%` }),
3027
+ /* @__PURE__ */ jsxRuntime.jsx(
3028
+ orderlyUi.EditIcon,
3029
+ {
3030
+ className: "oui-slippage-edit-icon oui-text-primary oui-hidden md:oui-block",
3031
+ size: 12,
3032
+ opacity: 1
3033
+ }
3034
+ )
3035
+ ]
3036
+ }
3037
+ )
3038
+ }
3039
+ )
3040
+ ]
3041
+ }
3042
+ )
3043
+ }
3044
+ )
3045
+ ]
3046
+ }
3047
+ )
2984
3048
  ] });
2985
3049
  };
2986
3050
  var SlippageUI = (props) => {
@@ -2995,33 +3059,38 @@ function AssetInfo(props) {
2995
3059
  symbol,
2996
3060
  side: props.side
2997
3061
  });
3062
+ const estLiqTipsContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-min-w-[204px] oui-max-w-[280px] oui-text-2xs oui-leading-normal oui-text-base-contrast-80", children: [
3063
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-text-pretty", children: t("common.liquidationPrice.tooltip") }),
3064
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
3065
+ "a",
3066
+ {
3067
+ href: "https://orderly.network/docs/introduction/trade-on-orderly/perpetual-futures/liquidations",
3068
+ target: "_blank",
3069
+ rel: "noopener noreferrer",
3070
+ className: "oui-text-primary oui-underline",
3071
+ children: t("common.liquidationPrice.tooltip.learnMore")
3072
+ }
3073
+ ) })
3074
+ ] });
2998
3075
  return /* @__PURE__ */ jsxRuntime.jsxs(
2999
3076
  "div",
3000
3077
  {
3001
3078
  className: "oui-orderEntry-assetInfo oui-space-y-[2px] xl:oui-space-y-1",
3002
3079
  children: [
3003
3080
  /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { justify: "between", className: "oui-orderEntry-estLiqPrice", children: [
3004
- isMobile ? /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "2xs", children: t("orderEntry.estLiqPrice") }) : /* @__PURE__ */ jsxRuntime.jsx(
3005
- orderlyUi.Tooltip,
3081
+ /* @__PURE__ */ jsxRuntime.jsx(
3082
+ orderlyUi.Tips,
3006
3083
  {
3007
- content: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-min-w-[204px] oui-max-w-[280px] oui-text-2xs oui-leading-normal oui-text-base-contrast-80", children: [
3008
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-text-pretty", children: t("common.liquidationPrice.tooltip") }),
3009
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
3010
- "a",
3011
- {
3012
- href: "https://orderly.network/docs/introduction/trade-on-orderly/perpetual-futures/liquidations",
3013
- target: "_blank",
3014
- rel: "noopener noreferrer",
3015
- className: "oui-text-primary oui-underline",
3016
- children: t("common.liquidationPrice.tooltip.learnMore")
3017
- }
3018
- ) })
3019
- ] }),
3020
- children: /* @__PURE__ */ jsxRuntime.jsx(
3084
+ title: t("common.tips"),
3085
+ content: estLiqTipsContent,
3086
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(
3021
3087
  orderlyUi.Text,
3022
3088
  {
3023
3089
  size: "2xs",
3024
- className: "oui-estLiqPrice-label oui-cursor-pointer oui-border-b oui-border-dashed oui-border-line-12",
3090
+ className: orderlyUi.cn(
3091
+ "oui-estLiqPrice-label oui-cursor-pointer",
3092
+ "oui-border-b oui-border-dashed oui-border-line-12"
3093
+ ),
3025
3094
  children: t("orderEntry.estLiqPrice")
3026
3095
  }
3027
3096
  )
@@ -3034,7 +3103,7 @@ function AssetInfo(props) {
3034
3103
  size: "2xs",
3035
3104
  dp: props.dp,
3036
3105
  className: "oui-estLiqPrice-value oui-text-base-contrast-80",
3037
- unitClassName: "oui-ml-1 oui-text-base-contrast-36",
3106
+ unitClassName: "oui-ms-1 oui-text-base-contrast-36",
3038
3107
  children: canTrade ? displayEstLiqPrice ?? "--" : "--"
3039
3108
  }
3040
3109
  )
@@ -3131,6 +3200,7 @@ var LTVRiskTooltipUI = (props) => {
3131
3200
  threshold: isThresholdLoading ? "-" : ltv_threshold,
3132
3201
  usdcThreshold: isThresholdLoading ? "-" : negative_usdc_threshold
3133
3202
  }) }),
3203
+ marginMode === orderlyTypes.MarginMode.ISOLATED ? /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-pb-2", intensity: 54, size: "2xs", children: t("transfer.LTV.isolatedMarginOrderHint") }) : null,
3134
3204
  /* @__PURE__ */ jsxRuntime.jsx(
3135
3205
  orderlyUi.Button,
3136
3206
  {
@@ -3160,6 +3230,7 @@ var useConvertThreshold = () => {
3160
3230
  };
3161
3231
  };
3162
3232
  var useLTVTooltipScript = (marginMode) => {
3233
+ const { isMobile } = orderlyUi.useScreen();
3163
3234
  const { data: holdingList = [], isLoading: isHoldingLoading } = orderlyHooks.useHoldingStream();
3164
3235
  const {
3165
3236
  ltv_threshold,
@@ -3191,8 +3262,8 @@ var useLTVTooltipScript = (marginMode) => {
3191
3262
  });
3192
3263
  const currentLtv = orderlyHooks.useComputedLTV();
3193
3264
  const onConvert = React4.useCallback(async () => {
3194
- return orderlyUi.modal.show("ConvertDialogId");
3195
- }, []);
3265
+ return orderlyUi.modal.show(isMobile ? "ConvertSheetId" : "ConvertDialogId");
3266
+ }, [isMobile]);
3196
3267
  return {
3197
3268
  holdingData,
3198
3269
  isHoldingLoading,
@@ -3217,6 +3288,13 @@ var Available = (props) => {
3217
3288
  const showLTV = React4.useMemo(() => {
3218
3289
  return typeof currentLtv === "number" && !Number.isNaN(currentLtv) && currentLtv > 0;
3219
3290
  }, [currentLtv]);
3291
+ const availableTooltip = React4.useMemo(() => {
3292
+ return marginMode === orderlyTypes.MarginMode.ISOLATED ? t("transfer.LTV.isolatedModeUsdcOnly") : t("transfer.LTV.availableCrossMarginHint");
3293
+ }, [marginMode, t]);
3294
+ const availableTipsContent = React4.useMemo(
3295
+ () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-text-pretty oui-text-2xs oui-leading-normal oui-text-base-contrast-80", children: availableTooltip }),
3296
+ [availableTooltip]
3297
+ );
3220
3298
  return /* @__PURE__ */ jsxRuntime.jsxs(
3221
3299
  orderlyUi.Flex,
3222
3300
  {
@@ -3224,14 +3302,31 @@ var Available = (props) => {
3224
3302
  justify: "between",
3225
3303
  className: "oui-orderEntry-available",
3226
3304
  children: [
3227
- marginMode === orderlyTypes.MarginMode.ISOLATED ? /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Tooltip, { content: t("transfer.LTV.isolatedModeUsdcOnly"), children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-available-label oui-cursor-pointer", size: "2xs", children: t("common.available") }) }) : /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { className: "oui-available-label", size: "2xs", children: t("common.available") }),
3305
+ /* @__PURE__ */ jsxRuntime.jsx(
3306
+ orderlyUi.Tips,
3307
+ {
3308
+ title: t("common.tips"),
3309
+ content: availableTipsContent,
3310
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(
3311
+ orderlyUi.Text,
3312
+ {
3313
+ size: "2xs",
3314
+ className: orderlyUi.cn(
3315
+ "oui-available-label oui-cursor-pointer",
3316
+ "oui-border-b oui-border-dashed oui-border-line-12"
3317
+ ),
3318
+ children: t("common.available")
3319
+ }
3320
+ )
3321
+ }
3322
+ ),
3228
3323
  /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { itemAlign: "center", justify: "center", gap: 1, children: [
3229
3324
  showLTV && /* @__PURE__ */ jsxRuntime.jsx(
3230
- orderlyUi.Tooltip,
3325
+ orderlyUi.Tips,
3231
3326
  {
3232
- className: "oui-available-ltvRisk-tooltip oui-bg-base-6 oui-p-2",
3327
+ title: t("common.tips"),
3233
3328
  content: /* @__PURE__ */ jsxRuntime.jsx(LTVRiskTooltipWidget, { marginMode }),
3234
- children: /* @__PURE__ */ jsxRuntime.jsx(
3329
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(
3235
3330
  orderlyUi.InfoCircleIcon,
3236
3331
  {
3237
3332
  className: "oui-cursor-pointer oui-text-warning oui-opacity-80"
@@ -3245,7 +3340,7 @@ var Available = (props) => {
3245
3340
  unit: quote,
3246
3341
  size: "2xs",
3247
3342
  className: "oui-available-value oui-text-base-contrast-80",
3248
- unitClassName: "oui-ml-1 oui-text-base-contrast-54",
3343
+ unitClassName: "oui-ms-1 oui-text-base-contrast-54",
3249
3344
  dp: 2,
3250
3345
  padding: false,
3251
3346
  children: canTrade ? freeCollateral : 0
@@ -3375,7 +3470,7 @@ var QuantitySlider = React4.memo((props) => {
3375
3470
  {
3376
3471
  className: orderlyUi.textVariants({
3377
3472
  size: "2xs",
3378
- className: "oui-quantitySlider-maxQty-btn oui-mr-1"
3473
+ className: "oui-quantitySlider-maxQty-btn oui-me-1"
3379
3474
  }),
3380
3475
  onClick: onMax,
3381
3476
  "data-testid": "oui-testid-orderEntry-maxQty-value-button",
@@ -3636,7 +3731,7 @@ var CustomInput = React4.forwardRef(
3636
3731
  input: orderlyUi.cn("oui-mb-1 oui-mt-5 oui-h-5", props?.classNames?.input),
3637
3732
  // prefix: cn(props.classNames?.prefix),
3638
3733
  suffix: orderlyUi.cn(
3639
- "oui-absolute oui-right-0 oui-top-0 oui-justify-start oui-py-2 oui-text-2xs oui-text-base-contrast-36",
3734
+ "oui-absolute oui-end-0 oui-top-0 oui-justify-start oui-py-2 oui-text-2xs oui-text-base-contrast-36",
3640
3735
  props.classNames?.suffix
3641
3736
  )
3642
3737
  },
@@ -3652,7 +3747,7 @@ var InputLabel = (props) => {
3652
3747
  {
3653
3748
  htmlFor: props.id,
3654
3749
  className: orderlyUi.cn(
3655
- "oui-absolute oui-left-2 oui-top-[7px] oui-text-2xs oui-text-base-contrast-36",
3750
+ "oui-absolute oui-start-2 oui-top-[7px] oui-text-2xs oui-text-base-contrast-36",
3656
3751
  props.className
3657
3752
  ),
3658
3753
  children: props.children
@@ -3680,7 +3775,7 @@ var BBOOrderTypeSelect = (props) => {
3680
3775
  value: orderlyTypes.BBOOrderType.QUEUE5
3681
3776
  }
3682
3777
  ],
3683
- []
3778
+ [t]
3684
3779
  );
3685
3780
  return /* @__PURE__ */ jsxRuntime.jsx(
3686
3781
  orderlyUi.Select.options,
@@ -3836,7 +3931,7 @@ var PriceInput = (props) => {
3836
3931
  {
3837
3932
  className: orderlyUi.cn(
3838
3933
  "oui-orderEntry-bboSelect",
3839
- "oui-absolute oui-bottom-1 oui-left-0"
3934
+ "oui-absolute oui-bottom-1 oui-start-0"
3840
3935
  ),
3841
3936
  children: /* @__PURE__ */ jsxRuntime.jsx(
3842
3937
  BBOOrderTypeSelect,
@@ -3858,7 +3953,7 @@ var QtyAndTotalInput = React4.memo((props) => {
3858
3953
  const { t } = orderlyI18n.useTranslation();
3859
3954
  const { symbolInfo, onFocus, onBlur, getErrorMsg, setOrderValue } = useOrderEntryContext();
3860
3955
  const { base, quote, base_dp, quote_dp } = symbolInfo;
3861
- return /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Grid, { cols: 2, className: "oui-group oui-space-x-1", children: [
3956
+ return /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Grid, { cols: 2, className: "oui-group oui-gap-1", children: [
3862
3957
  /* @__PURE__ */ jsxRuntime.jsx(
3863
3958
  CustomInput,
3864
3959
  {
@@ -3988,7 +4083,7 @@ var QuantityDistributionHint = (props) => {
3988
4083
  quantity: /* @__PURE__ */ jsxRuntime.jsx(DescendingQuantity, {})
3989
4084
  }
3990
4085
  ];
3991
- }, []);
4086
+ }, [t]);
3992
4087
  const currentContent = React4.useMemo(() => {
3993
4088
  return content.find((item) => item.type === type);
3994
4089
  }, [content, type]);
@@ -4004,7 +4099,7 @@ var QuantityDistributionHint = (props) => {
4004
4099
  intensity: type === item.type ? 500 : 600,
4005
4100
  width: 78,
4006
4101
  p: 2,
4007
- className: "oui-cursor-pointer oui-rounded-l",
4102
+ className: "oui-cursor-pointer oui-rounded-s",
4008
4103
  onClick: () => {
4009
4104
  setType(item.type);
4010
4105
  },
@@ -4022,10 +4117,10 @@ var QuantityDistributionHint = (props) => {
4022
4117
  intensity: 500,
4023
4118
  width: "100%",
4024
4119
  className: orderlyUi.cn(
4025
- "oui-rounded-r",
4026
- type === orderlyTypes.DistributionType.FLAT && "oui-rounded-bl",
4027
- type === orderlyTypes.DistributionType.ASCENDING && "oui-rounded-l",
4028
- type === orderlyTypes.DistributionType.DESCENDING && "oui-rounded-tl"
4120
+ "oui-rounded-e",
4121
+ type === orderlyTypes.DistributionType.FLAT && "oui-rounded-es",
4122
+ type === orderlyTypes.DistributionType.ASCENDING && "oui-rounded-s",
4123
+ type === orderlyTypes.DistributionType.DESCENDING && "oui-rounded-ss"
4029
4124
  ),
4030
4125
  children: [
4031
4126
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: currentContent?.formula }),
@@ -4087,7 +4182,7 @@ var QuantityDistribution = (props) => {
4087
4182
  className: orderlyUi.cn(
4088
4183
  "oui-quantityDistribution-option-label",
4089
4184
  "oui-text-2xs",
4090
- "oui-ml-1",
4185
+ "oui-ms-1",
4091
4186
  "oui-whitespace-nowrap oui-break-normal"
4092
4187
  ),
4093
4188
  children: distributionTypeMap[type]
@@ -4423,7 +4518,7 @@ var ScaledQuantityUnit = (props) => {
4423
4518
  classNames: {
4424
4519
  trigger: orderlyUi.cn(
4425
4520
  "oui-orderEntry-scaledQuantityUnit-btn",
4426
- "oui-absolute oui-right-0 oui-top-1",
4521
+ "oui-absolute oui-end-0 oui-top-1",
4427
4522
  "oui-w-full oui-justify-end",
4428
4523
  "oui-shadow-none"
4429
4524
  )
@@ -4469,7 +4564,7 @@ var ScaledQuantityInput = React4.memo((props) => {
4469
4564
  suffix,
4470
4565
  id: "order_quantity_input",
4471
4566
  name: "order_quantity_input",
4472
- className: "oui-orderEntry-scaledOrder-quantityInput !oui-rounded-r",
4567
+ className: "oui-orderEntry-scaledOrder-quantityInput !oui-rounded-e",
4473
4568
  value: props.order_quantity,
4474
4569
  error: getErrorMsg(
4475
4570
  "order_quantity",
@@ -4492,7 +4587,7 @@ var ScaledQuantityInput = React4.memo((props) => {
4492
4587
  suffix,
4493
4588
  id: "order_total_input",
4494
4589
  name: "order_total_input",
4495
- className: "oui-orderEntry-scaledOrder-totalInput !oui-rounded-r",
4590
+ className: "oui-orderEntry-scaledOrder-totalInput !oui-rounded-e",
4496
4591
  value: props.total,
4497
4592
  error: getErrorMsg("order_quantity", `${errors?.total?.value} ${quote}`),
4498
4593
  onChange: (val) => {
@@ -4541,7 +4636,7 @@ var TotalOrdersInput = React4.memo((props) => {
4541
4636
  label: t("orderEntry.totalOrders"),
4542
4637
  placeholder: "2-20",
4543
4638
  id: "order_total_orders_input",
4544
- className: "oui-orderEntry-scaledOrder-totalOrdersInput !oui-rounded-l",
4639
+ className: "oui-orderEntry-scaledOrder-totalOrdersInput !oui-rounded-s",
4545
4640
  value: props.total_orders,
4546
4641
  error: getErrorMsg("total_orders"),
4547
4642
  onChange: (val) => {
@@ -4569,7 +4664,7 @@ var ScaledOrderInput = (props) => {
4569
4664
  end_price: values.end_price
4570
4665
  }
4571
4666
  ),
4572
- /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Grid, { cols: 2, className: "oui-group oui-space-x-1", children: [
4667
+ /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Grid, { cols: 2, className: "oui-group oui-gap-1", children: [
4573
4668
  /* @__PURE__ */ jsxRuntime.jsx(
4574
4669
  ScaledQuantityInput,
4575
4670
  {
@@ -4704,7 +4799,7 @@ var TrailingCallbackSelect = React4.memo(
4704
4799
  classNames: {
4705
4800
  trigger: orderlyUi.cn(
4706
4801
  "oui-orderEntry-trailingCallbackSelect-btn",
4707
- "oui-absolute oui-right-0 oui-top-1",
4802
+ "oui-absolute oui-end-0 oui-top-1",
4708
4803
  "oui-w-[124px] oui-justify-end",
4709
4804
  "oui-text-base-contrast-36"
4710
4805
  )
@@ -4807,7 +4902,7 @@ var TrailingCallbackInput = React4.memo(
4807
4902
  /* @__PURE__ */ jsxRuntime.jsx(
4808
4903
  CallbackRatePercentages,
4809
4904
  {
4810
- className: "oui-trailingCallback-percentages oui-absolute oui-bottom-1 oui-left-2",
4905
+ className: "oui-trailingCallback-percentages oui-absolute oui-bottom-1 oui-start-2",
4811
4906
  callback_rate
4812
4907
  }
4813
4908
  )
@@ -5181,7 +5276,7 @@ var PNLInput = (props) => {
5181
5276
  onBlur();
5182
5277
  },
5183
5278
  suffix: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5184
- isPercentageMode && !!value && /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "2xs", color: "inherit", className: "oui-ml-[2px]", children: "%" }),
5279
+ isPercentageMode && !!value && /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "2xs", color: "inherit", className: "oui-ms-[2px]", children: "%" }),
5185
5280
  /* @__PURE__ */ jsxRuntime.jsx(
5186
5281
  PNLMenus,
5187
5282
  {
@@ -5240,7 +5335,7 @@ var PnlInputProvider = (props) => {
5240
5335
  {
5241
5336
  rule: "percentages",
5242
5337
  className: orderlyUi.cn(
5243
- "oui-ml-1 oui-text-xs",
5338
+ "oui-ms-1 oui-text-xs",
5244
5339
  type === "TP" ? "oui-text-trade-profit" : "oui-text-trade-loss"
5245
5340
  ),
5246
5341
  children: values.ROI
@@ -5250,14 +5345,14 @@ var PnlInputProvider = (props) => {
5250
5345
  {
5251
5346
  rule: "price",
5252
5347
  className: orderlyUi.cn(
5253
- "oui-ml-1 oui-text-xs",
5348
+ "oui-ms-1 oui-text-xs",
5254
5349
  type === "TP" ? "oui-text-trade-profit" : "oui-text-trade-loss"
5255
5350
  ),
5256
5351
  children: values.PnL
5257
5352
  }
5258
5353
  )
5259
5354
  ] });
5260
- }, [mode, values.ROI, values.PnL, values.trigger_price]);
5355
+ }, [mode, t, type, values.ROI, values.PnL, values.trigger_price]);
5261
5356
  const memoizedValue = React4.useMemo(() => {
5262
5357
  return { mode, setMode, tipsEle };
5263
5358
  }, [mode, setMode, tipsEle]);
@@ -5326,7 +5421,7 @@ var OrderTPSL = (props) => {
5326
5421
  {
5327
5422
  className: orderlyUi.cn(
5328
5423
  "oui-orderEntry-tpsl-body",
5329
- "oui-max-h-0 oui-overflow-hidden oui-transition-all",
5424
+ "oui-overflow-hidden oui-transition-all",
5330
5425
  props.switchState ? "oui-max-h-[120px]" : "oui-max-h-0"
5331
5426
  ),
5332
5427
  onTransitionEnd: () => {
@@ -5470,7 +5565,6 @@ var TPSLTriggerPriceInput = (props) => {
5470
5565
  const { t } = orderlyI18n.useTranslation();
5471
5566
  const { errorMsgVisible } = useOrderEntryContext();
5472
5567
  const { tipsEle } = usePnlInputContext();
5473
- const [prefix, setPrefix] = React4.useState(`${props.type} Price`);
5474
5568
  const [placeholder, setPlaceholder] = React4.useState("USDC");
5475
5569
  const [tipVisible, setTipVisible] = React4.useState(false);
5476
5570
  const [isFocused, setIsFocused] = React4.useState(false);
@@ -5495,31 +5589,17 @@ var TPSLTriggerPriceInput = (props) => {
5495
5589
  tipsEle,
5496
5590
  props.displayErrorMessage
5497
5591
  ]);
5498
- const getPrefixLabel = (trigger_price) => {
5499
- let _prefix = props.type === "TP" ? t("tpsl.tpPrice") : t("tpsl.slPrice");
5500
- if (trigger_price) {
5501
- _prefix = props.type === "TP" ? t("tpsl.tp") : t("tpsl.sl");
5502
- }
5503
- return _prefix;
5504
- };
5592
+ const prefix = isFocused || innerValue ? props.type === "TP" ? t("tpsl.tp") : t("tpsl.sl") : props.type === "TP" ? t("tpsl.tpPrice") : t("tpsl.slPrice");
5505
5593
  const onValueChange = (value) => {
5506
5594
  setInnerValue(value);
5507
5595
  props.onChange(value);
5508
5596
  };
5509
- React4.useEffect(() => {
5510
- setPrefix(getPrefixLabel(props.values.trigger_price));
5511
- if (!isFocused) {
5512
- setInnerValue(props.values.trigger_price ?? "");
5513
- }
5514
- }, [props.type, props.values.trigger_price]);
5515
5597
  const onFocus = () => {
5516
- setPrefix(props.type === "TP" ? t("tpsl.tp") : t("tpsl.sl"));
5517
5598
  setPlaceholder("");
5518
5599
  setTipVisible(true);
5519
5600
  setIsFocused(true);
5520
5601
  };
5521
5602
  const onBlur = () => {
5522
- setPrefix(getPrefixLabel(props.values.trigger_price));
5523
5603
  setPlaceholder("USDC");
5524
5604
  setTipVisible(false);
5525
5605
  setIsFocused(false);
@@ -5548,10 +5628,10 @@ var TPSLTriggerPriceInput = (props) => {
5548
5628
  additional: "oui-text-base-contrast-54",
5549
5629
  root: orderlyUi.cn(
5550
5630
  "oui-orderEntry-tpsl-triggerPrice",
5551
- "oui-pr-2 md:oui-pr-3",
5631
+ "oui-pe-2 md:oui-pe-3",
5552
5632
  props.classNames?.root
5553
5633
  ),
5554
- prefix: orderlyUi.cn("oui-pr-1 md:oui-pr-2", props.classNames?.prefix),
5634
+ prefix: orderlyUi.cn("oui-pe-1 md:oui-pe-2", props.classNames?.prefix),
5555
5635
  input: orderlyUi.cn(
5556
5636
  "oui-text-2xs placeholder:oui-text-2xs",
5557
5637
  props.classNames?.input
@@ -6097,7 +6177,7 @@ var OrderEntry = (props) => {
6097
6177
  onClick: () => {
6098
6178
  setPinned(false);
6099
6179
  },
6100
- className: "oui-group oui-absolute oui-right-2 oui-top-2",
6180
+ className: "oui-group oui-absolute oui-end-2 oui-top-2",
6101
6181
  "data-testid": "oui-testid-orderEntry-pinned-button"
6102
6182
  }
6103
6183
  )
@@ -6115,7 +6195,7 @@ var OrderEntry = (props) => {
6115
6195
  overlay: "!oui-bg-base-10/60",
6116
6196
  content: orderlyUi.cn(
6117
6197
  "oui-rounded-[16px] oui-border-none !oui-p-0",
6118
- isMobile ? "oui-inset-y-0 oui-right-0 oui-w-[280px]" : "!oui-bottom-[40px] oui-right-3 oui-top-[44px] !oui-h-auto oui-w-[360px]"
6198
+ 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
6199
  )
6120
6200
  },
6121
6201
  contentProps: { side: "right", closeable: false },