@kodiak-finance/orderly-ui-scaffold 2.9.2 → 2.9.4

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
@@ -544,7 +544,7 @@ var init_tradingMenu_ui = __esm({
544
544
  icon,
545
545
  /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "sm", intensity: 80, weight: "semibold", children: label })
546
546
  ] }),
547
- /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Flex, { className: "oui-ml-auto", children: selected ? /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.SelectedChoicesFillIcon, { size: 14 }) : null })
547
+ /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Flex, { className: "oui-ms-auto", children: selected ? /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.SelectedChoicesFillIcon, { size: 14 }) : null })
548
548
  ]
549
549
  }
550
550
  );
@@ -601,13 +601,13 @@ var init_tradingMenu_ui = __esm({
601
601
  orderlyUi.PopupUnionIcon,
602
602
  {
603
603
  size: 78,
604
- className: "oui-text-base-8 oui-absolute oui-left-1/2 oui-top-1/2 -oui-translate-x-1/2 -oui-translate-y-1/2"
604
+ className: "oui-text-base-8 oui-absolute oui-start-1/2 oui-top-1/2 -oui-translate-x-1/2 -oui-translate-y-1/2"
605
605
  }
606
606
  ),
607
607
  /* @__PURE__ */ jsxRuntime.jsx(
608
608
  orderlyUi.Flex,
609
609
  {
610
- className: "oui-absolute oui-left-1/2 oui-top-1/2 -oui-translate-x-1/2 -oui-translate-y-1/2",
610
+ className: "oui-absolute oui-start-1/2 oui-top-1/2 -oui-translate-x-1/2 -oui-translate-y-1/2",
611
611
  itemAlign: "center",
612
612
  justify: "center",
613
613
  children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.CloseRoundFillIcon, { size: 28 })
@@ -1097,7 +1097,7 @@ var ChainMenu = (props) => {
1097
1097
  height: "10",
1098
1098
  viewBox: "0 0 10 10",
1099
1099
  xmlns: "http://www.w3.org/2000/svg",
1100
- className: "oui-absolute oui-right-0 oui-bottom-0",
1100
+ className: "oui-absolute oui-end-0 oui-bottom-0",
1101
1101
  children: [
1102
1102
  /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
1103
1103
  "linearGradient",
@@ -1135,7 +1135,7 @@ var ChainMenu = (props) => {
1135
1135
  onCloseAutoFocus: (e) => e.preventDefault(),
1136
1136
  onClick: (e) => e.stopPropagation(),
1137
1137
  sideOffset: 4,
1138
- collisionPadding: { right: 16 },
1138
+ collisionPadding: { left: 16, right: 16 },
1139
1139
  className: orderlyUi.cn(
1140
1140
  "oui-bg-base-8 oui-w-[456px] oui-p-4 oui-rounded-xl",
1141
1141
  "oui-border oui-border-line-6",
@@ -1182,7 +1182,7 @@ var ChainMenuUiMobile = (props) => {
1182
1182
  className: "oui-h-[18px] oui-w-[18px]"
1183
1183
  }
1184
1184
  ),
1185
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute oui-right-0 oui-bottom-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
1185
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute oui-end-0 oui-bottom-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
1186
1186
  "svg",
1187
1187
  {
1188
1188
  width: "9",
@@ -1365,7 +1365,7 @@ var LanguageSwitcher = (props) => {
1365
1365
  className: orderlyUi.cn(
1366
1366
  //40 * 8 + 4 * 7 = 348px, more than 8 will show scrollbars
1367
1367
  "oui-custom-scrollbar oui-max-h-[348px] oui-overflow-y-auto",
1368
- "oui-grid oui-gap-1 oui-pr-[6px]"
1368
+ "oui-grid oui-gap-1 oui-pe-[6px]"
1369
1369
  ),
1370
1370
  children: languageList
1371
1371
  }
@@ -1379,7 +1379,7 @@ var LanguageSwitcher = (props) => {
1379
1379
  onClick: (e) => e.stopPropagation(),
1380
1380
  sideOffset: 10,
1381
1381
  align: "start",
1382
- collisionPadding: { right: 16 },
1382
+ collisionPadding: { left: 16, right: 16 },
1383
1383
  className: orderlyUi.cn(
1384
1384
  "oui-w-[320px] lg:oui-w-[360px]",
1385
1385
  "oui-rounded-xl oui-bg-base-8 oui-p-5",
@@ -1558,7 +1558,7 @@ var Footer = (props) => {
1558
1558
  orderlyUi.Divider,
1559
1559
  {
1560
1560
  direction: "vertical",
1561
- className: "oui-h-[18px] oui-px-1 oui-ml-2 oui-border-line-12"
1561
+ className: "oui-h-[18px] oui-px-1 oui-ms-2 oui-border-line-12"
1562
1562
  }
1563
1563
  ),
1564
1564
  /* @__PURE__ */ jsxRuntime.jsxs(orderlyUi.Flex, { gap: 2, children: [
@@ -1700,7 +1700,7 @@ var menuItemVariants = orderlyUi.tv({
1700
1700
  "oui-py-2",
1701
1701
  "oui-rounded-md",
1702
1702
  "oui-w-full",
1703
- "oui-text-left",
1703
+ "oui-text-start",
1704
1704
  "oui-text-base",
1705
1705
  "oui-text-base-contrast-36",
1706
1706
  // "oui-flex",
@@ -2159,7 +2159,7 @@ var SubAccountScript = () => {
2159
2159
  orderlyUi.toast.success(t("subAccount.modal.switch.success.description"));
2160
2160
  });
2161
2161
  },
2162
- [switchAccount]
2162
+ [switchAccount, t]
2163
2163
  );
2164
2164
  const accountsWithValues = React7.useMemo(() => {
2165
2165
  const mainAccountUnsettlePnl = accountValue[mainAccountId] ?? 0;
@@ -2405,9 +2405,9 @@ var AccountItem = (props) => {
2405
2405
  "div",
2406
2406
  {
2407
2407
  className: orderlyUi.cn(
2408
- "oui-absolute -oui-right-[1px] -oui-top-[1px] oui-leading-3",
2408
+ "oui-absolute -oui-end-[1px] -oui-top-[1px] oui-leading-3",
2409
2409
  "oui-text-[10px] oui-font-semibold oui-text-base-10",
2410
- "oui-rounded-[6px] oui-rounded-br-none oui-rounded-tl-none oui-bg-[rgb(var(--oui-gradient-brand-start))] oui-py-0.5 oui-pl-1 oui-pr-[5px]"
2410
+ "oui-rounded-[6px] oui-rounded-ee-none oui-rounded-ss-none oui-bg-[rgb(var(--oui-gradient-brand-start))] oui-py-0.5 oui-ps-1 oui-pe-[5px]"
2411
2411
  ),
2412
2412
  children: t("subAccount.modal.current")
2413
2413
  }
@@ -2545,7 +2545,7 @@ var CreateSubAccount = (props) => {
2545
2545
  }
2546
2546
  }
2547
2547
  );
2548
- }, [subAccountCount, maxSubAccountCount]);
2548
+ }, [subAccountCount, maxSubAccountCount, t]);
2549
2549
  const header = /* @__PURE__ */ jsxRuntime.jsxs(
2550
2550
  orderlyUi.Flex,
2551
2551
  {
@@ -2873,7 +2873,7 @@ function SubAccountUI(props) {
2873
2873
  align: "start",
2874
2874
  side: "bottom",
2875
2875
  sideOffset: 16,
2876
- collisionPadding: { right: 16 },
2876
+ collisionPadding: { left: 16, right: 16 },
2877
2877
  onMouseEnter,
2878
2878
  onMouseLeave: () => {
2879
2879
  props.onOpenChange(false);
@@ -2995,7 +2995,7 @@ var LeftNavSheet = (props) => {
2995
2995
  }
2996
2996
  )
2997
2997
  ] }),
2998
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-ml-auto", children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.SwapHorizIcon, {}) })
2998
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-ms-auto", children: /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.SwapHorizIcon, {}) })
2999
2999
  ] });
3000
3000
  }, [state, t]);
3001
3001
  const openExternalLink = (url) => {
@@ -3314,10 +3314,10 @@ var ScanQRCodeContent = (props) => {
3314
3314
  /* @__PURE__ */ jsxRuntime.jsx(QRCodeScanner, { onSuccess: props.onScanSuccess }),
3315
3315
  /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3316
3316
  /* @__PURE__ */ jsxRuntime.jsx(LineGradient, {}),
3317
- /* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-left-[-1.5px] oui-top-[-1.5px]" }),
3318
- /* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-right-[-1.5px] oui-top-[-1.5px] oui-rotate-90" }),
3319
- /* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-left-[-1.5px] -oui-rotate-90" }),
3320
- /* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-right-[-1.5px] -oui-rotate-180" })
3317
+ /* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-start-[-1.5px] oui-top-[-1.5px]" }),
3318
+ /* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-end-[-1.5px] oui-top-[-1.5px] oui-rotate-90" }),
3319
+ /* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-start-[-1.5px] -oui-rotate-90" }),
3320
+ /* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-end-[-1.5px] -oui-rotate-180" })
3321
3321
  ] })
3322
3322
  ] }),
3323
3323
  /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.Text, { size: "sm", intensity: 98, weight: "semibold", children: t("linkDevice.scanQRCode") }),
@@ -3389,7 +3389,7 @@ var LineGradient = () => {
3389
3389
  "div",
3390
3390
  {
3391
3391
  className: orderlyUi.cn(
3392
- "oui-absolute oui-left-[30px] oui-top-0",
3392
+ "oui-absolute oui-start-[30px] oui-top-0",
3393
3393
  "oui-h-[2px] oui-w-[calc(100%-60px)] oui-rounded-full",
3394
3394
  "oui-bg-[linear-gradient(270deg,rgb(var(--oui-gradient-brand-end))_0%,rgb(var(--oui-gradient-brand-start))_100%)]",
3395
3395
  "oui-shadow-[0_0_8px_4px_rgba(var(--oui-gradient-brand-start)/0.12)]",
@@ -4074,7 +4074,7 @@ var MainNavMobile = (props) => {
4074
4074
  /* @__PURE__ */ jsxRuntime.jsx(
4075
4075
  orderlyUi.ChevronLeftIcon,
4076
4076
  {
4077
- className: "oui-absolute oui-left-6 oui-text-base-contrast-54",
4077
+ className: "oui-absolute oui-start-6 oui-text-base-contrast-54",
4078
4078
  onClick: onBack
4079
4079
  }
4080
4080
  ),
@@ -4554,7 +4554,7 @@ var TotalValue = (props) => {
4554
4554
  intensity: 98,
4555
4555
  visible: props.visible,
4556
4556
  unit: "USDC",
4557
- unitClassName: "oui-text-base-contrast-20 oui-ml-1",
4557
+ unitClassName: "oui-text-base-contrast-20 oui-ms-1",
4558
4558
  as: "div",
4559
4559
  children: totalValue ?? "-"
4560
4560
  }
@@ -4602,7 +4602,7 @@ var FreeCollateral = (props) => {
4602
4602
  {
4603
4603
  intensity: 98,
4604
4604
  unit: "USDC",
4605
- unitClassName: "oui-text-base-contrast-20 oui-ml-1",
4605
+ unitClassName: "oui-text-base-contrast-20 oui-ms-1",
4606
4606
  visible,
4607
4607
  as: "div",
4608
4608
  children: freeCollateral ?? "-"
@@ -4704,7 +4704,7 @@ var AccountInfoPopover = (props) => {
4704
4704
  visible: props.visible,
4705
4705
  unit: "USDC",
4706
4706
  className: "oui-transition-transform group-hover:-oui-translate-x-5",
4707
- unitClassName: "oui-text-base-contrast-36 oui-ml-1",
4707
+ unitClassName: "oui-text-base-contrast-36 oui-ms-1",
4708
4708
  children: totalValue ?? "-"
4709
4709
  }
4710
4710
  )
@@ -4728,7 +4728,7 @@ var AccountInfoPopover = (props) => {
4728
4728
  unit: "USDC",
4729
4729
  visible: props.visible,
4730
4730
  className: "oui-transition-transform group-hover:-oui-translate-x-5",
4731
- unitClassName: "oui-text-base-contrast-36 oui-ml-1",
4731
+ unitClassName: "oui-text-base-contrast-36 oui-ms-1",
4732
4732
  children: props.freeCollateral ?? "-"
4733
4733
  }
4734
4734
  )
@@ -4810,7 +4810,7 @@ var DropdownMenu = (props) => {
4810
4810
  /* @__PURE__ */ jsxRuntime.jsx(
4811
4811
  "button",
4812
4812
  {
4813
- className: "oui-absolute oui-right-1 oui-top-1",
4813
+ className: "oui-absolute oui-end-1 oui-top-1",
4814
4814
  onClick: props.onSetTop,
4815
4815
  children: /* @__PURE__ */ jsxRuntime.jsxs(
4816
4816
  "svg",
@@ -5123,7 +5123,7 @@ var MessageCenter = (props) => {
5123
5123
  className: "hover:oui-opacity-100"
5124
5124
  }
5125
5125
  ),
5126
- messageSize > 0 && showAnnouncement && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute -oui-right-[6px] -oui-top-[6px] oui-flex oui-size-4 oui-items-center oui-justify-center oui-rounded-full oui-bg-primary-darken oui-text-[10px] oui-leading-none", children: messageSize })
5126
+ messageSize > 0 && showAnnouncement && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute -oui-end-[6px] -oui-top-[6px] oui-flex oui-size-4 oui-items-center oui-justify-center oui-rounded-full oui-bg-primary-darken oui-text-[10px] oui-leading-none", children: messageSize })
5127
5127
  ] }) })
5128
5128
  }
5129
5129
  ),
@@ -5251,7 +5251,7 @@ var NavItem2 = (props) => {
5251
5251
  children: item.label ?? item.name
5252
5252
  }
5253
5253
  ),
5254
- hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-ml-1 group-data-[open=true]:oui-rotate-180", children: isActive ? /* @__PURE__ */ jsxRuntime.jsx(ActiveIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.ChevronDownIcon, { size: 12, color: "white" }) })
5254
+ hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-ms-1 group-data-[open=true]:oui-rotate-180", children: isActive ? /* @__PURE__ */ jsxRuntime.jsx(ActiveIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(orderlyUi.ChevronDownIcon, { size: 12, color: "white" }) })
5255
5255
  ] }),
5256
5256
  /* @__PURE__ */ jsxRuntime.jsx(
5257
5257
  orderlyUi.Box,
@@ -5440,7 +5440,7 @@ var Tag = (props) => {
5440
5440
  return /* @__PURE__ */ jsxRuntime.jsx(
5441
5441
  "div",
5442
5442
  {
5443
- className: "oui-ml-1 oui-inline-flex oui-rounded oui-bg-gradient-to-r oui-from-[rgb(var(--oui-gradient-brand-start)_/_0.12)] oui-to-[rgb(var(--oui-gradient-brand-end)_/_0.12)] oui-px-2 oui-py-1",
5443
+ className: "oui-ms-1 oui-inline-flex oui-rounded oui-bg-gradient-to-r oui-from-[rgb(var(--oui-gradient-brand-start)_/_0.12)] oui-to-[rgb(var(--oui-gradient-brand-end)_/_0.12)] oui-px-2 oui-py-1",
5444
5444
  children: /* @__PURE__ */ jsxRuntime.jsx(
5445
5445
  orderlyUi.Text.gradient,
5446
5446
  {
@@ -5453,14 +5453,14 @@ var Tag = (props) => {
5453
5453
  }
5454
5454
  );
5455
5455
  };
5456
- var ICON_CLASSNAME = "oui-flex oui-border oui-border-line oui-w-6 oui-h-6 oui-rounded-md oui-justify-center oui-items-center oui-absolute oui-left-0 oui-top-0";
5456
+ var ICON_CLASSNAME = "oui-flex oui-border oui-border-line oui-w-6 oui-h-6 oui-rounded-md oui-justify-center oui-items-center oui-absolute oui-start-0 oui-top-0";
5457
5457
  var ItemIcon = (props) => {
5458
5458
  const { isActive } = props;
5459
5459
  if (!props.item.icon) {
5460
5460
  return null;
5461
5461
  }
5462
5462
  if (typeof props.item.icon === "string") {
5463
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-mr-1 oui-size-[20px]", children: /* @__PURE__ */ jsxRuntime.jsx(
5463
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-me-1 oui-size-[20px]", children: /* @__PURE__ */ jsxRuntime.jsx(
5464
5464
  "img",
5465
5465
  {
5466
5466
  src: isActive ? props.item.activeIcon || props.item.icon : props.item.icon,
@@ -5498,7 +5498,7 @@ var CampaignButton = (props) => {
5498
5498
  item: props.item,
5499
5499
  onClick: props.onItemClick,
5500
5500
  classNames: {
5501
- navItem: orderlyUi.cn("oui-text-base-contrast-54 -oui-ml-2", props.className)
5501
+ navItem: orderlyUi.cn("oui-text-base-contrast-54 -oui-ms-2", props.className)
5502
5502
  }
5503
5503
  }
5504
5504
  ) });
@@ -5672,7 +5672,7 @@ var MaintenanceTipsUI = (props) => {
5672
5672
  {
5673
5673
  className: orderlyUi.cn(
5674
5674
  "oui-bg-warning-darken/10 oui-text-warning-darken oui-text-2xs md:oui-text-sm oui-relative oui-gap-1",
5675
- "oui-mx-1 md:oui-mx-0 md:oui-w-full oui-pl-2 md:oui-pl-4 oui-pr-9 md:oui-pr-[60px] oui-py-2 md:oui-py-3",
5675
+ "oui-mx-1 md:oui-mx-0 md:oui-w-full oui-ps-2 md:oui-ps-4 oui-pe-9 md:oui-pe-[60px] oui-py-2 md:oui-py-3",
5676
5676
  "oui-leading-4",
5677
5677
  "oui-rounded-xl md:oui-rounded-none",
5678
5678
  "oui-min-h-[48px]",
@@ -5694,7 +5694,7 @@ var MaintenanceTipsUI = (props) => {
5694
5694
  CloseIcon,
5695
5695
  {
5696
5696
  size: 16,
5697
- className: "oui-absolute oui-right-2 md:oui-right-4 oui-text-secondary/[0.36] hover:oui-text-secondary/80 oui-cursor-pointer -oui-translate-y-2/4 oui-top-2/4",
5697
+ className: "oui-absolute oui-end-2 md:oui-end-4 oui-text-secondary/[0.36] hover:oui-text-secondary/80 oui-cursor-pointer -oui-translate-y-2/4 oui-top-2/4",
5698
5698
  onClick: closeTips
5699
5699
  }
5700
5700
  )