@orderly.network/ui-scaffold 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 +36 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -36
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +12 -12
package/dist/index.mjs
CHANGED
|
@@ -537,7 +537,7 @@ var init_tradingMenu_ui = __esm({
|
|
|
537
537
|
icon,
|
|
538
538
|
/* @__PURE__ */ jsx(Text, { size: "sm", intensity: 80, weight: "semibold", children: label })
|
|
539
539
|
] }),
|
|
540
|
-
/* @__PURE__ */ jsx(Flex, { className: "oui-
|
|
540
|
+
/* @__PURE__ */ jsx(Flex, { className: "oui-ms-auto", children: selected ? /* @__PURE__ */ jsx(SelectedChoicesFillIcon, { size: 14 }) : null })
|
|
541
541
|
]
|
|
542
542
|
}
|
|
543
543
|
);
|
|
@@ -594,13 +594,13 @@ var init_tradingMenu_ui = __esm({
|
|
|
594
594
|
PopupUnionIcon,
|
|
595
595
|
{
|
|
596
596
|
size: 78,
|
|
597
|
-
className: "oui-text-base-8 oui-absolute oui-
|
|
597
|
+
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"
|
|
598
598
|
}
|
|
599
599
|
),
|
|
600
600
|
/* @__PURE__ */ jsx(
|
|
601
601
|
Flex,
|
|
602
602
|
{
|
|
603
|
-
className: "oui-absolute oui-
|
|
603
|
+
className: "oui-absolute oui-start-1/2 oui-top-1/2 -oui-translate-x-1/2 -oui-translate-y-1/2",
|
|
604
604
|
itemAlign: "center",
|
|
605
605
|
justify: "center",
|
|
606
606
|
children: /* @__PURE__ */ jsx(CloseRoundFillIcon, { size: 28 })
|
|
@@ -1090,7 +1090,7 @@ var ChainMenu = (props) => {
|
|
|
1090
1090
|
height: "10",
|
|
1091
1091
|
viewBox: "0 0 10 10",
|
|
1092
1092
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1093
|
-
className: "oui-absolute oui-
|
|
1093
|
+
className: "oui-absolute oui-end-0 oui-bottom-0",
|
|
1094
1094
|
children: [
|
|
1095
1095
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
1096
1096
|
"linearGradient",
|
|
@@ -1128,7 +1128,7 @@ var ChainMenu = (props) => {
|
|
|
1128
1128
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
1129
1129
|
onClick: (e) => e.stopPropagation(),
|
|
1130
1130
|
sideOffset: 4,
|
|
1131
|
-
collisionPadding: { right: 16 },
|
|
1131
|
+
collisionPadding: { left: 16, right: 16 },
|
|
1132
1132
|
className: cn(
|
|
1133
1133
|
"oui-bg-base-8 oui-w-[456px] oui-p-4 oui-rounded-xl",
|
|
1134
1134
|
"oui-border oui-border-line-6",
|
|
@@ -1175,7 +1175,7 @@ var ChainMenuUiMobile = (props) => {
|
|
|
1175
1175
|
className: "oui-h-[18px] oui-w-[18px]"
|
|
1176
1176
|
}
|
|
1177
1177
|
),
|
|
1178
|
-
/* @__PURE__ */ jsx("div", { className: "oui-absolute oui-
|
|
1178
|
+
/* @__PURE__ */ jsx("div", { className: "oui-absolute oui-end-0 oui-bottom-0", children: /* @__PURE__ */ jsxs(
|
|
1179
1179
|
"svg",
|
|
1180
1180
|
{
|
|
1181
1181
|
width: "9",
|
|
@@ -1358,7 +1358,7 @@ var LanguageSwitcher = (props) => {
|
|
|
1358
1358
|
className: cn(
|
|
1359
1359
|
//40 * 8 + 4 * 7 = 348px, more than 8 will show scrollbars
|
|
1360
1360
|
"oui-custom-scrollbar oui-max-h-[348px] oui-overflow-y-auto",
|
|
1361
|
-
"oui-grid oui-gap-1 oui-
|
|
1361
|
+
"oui-grid oui-gap-1 oui-pe-[6px]"
|
|
1362
1362
|
),
|
|
1363
1363
|
children: languageList
|
|
1364
1364
|
}
|
|
@@ -1372,7 +1372,7 @@ var LanguageSwitcher = (props) => {
|
|
|
1372
1372
|
onClick: (e) => e.stopPropagation(),
|
|
1373
1373
|
sideOffset: 10,
|
|
1374
1374
|
align: "start",
|
|
1375
|
-
collisionPadding: { right: 16 },
|
|
1375
|
+
collisionPadding: { left: 16, right: 16 },
|
|
1376
1376
|
className: cn(
|
|
1377
1377
|
"oui-w-[320px] lg:oui-w-[360px]",
|
|
1378
1378
|
"oui-rounded-xl oui-bg-base-8 oui-p-5",
|
|
@@ -1551,7 +1551,7 @@ var Footer = (props) => {
|
|
|
1551
1551
|
Divider,
|
|
1552
1552
|
{
|
|
1553
1553
|
direction: "vertical",
|
|
1554
|
-
className: "oui-h-[18px] oui-px-1 oui-
|
|
1554
|
+
className: "oui-h-[18px] oui-px-1 oui-ms-2 oui-border-line-12"
|
|
1555
1555
|
}
|
|
1556
1556
|
),
|
|
1557
1557
|
/* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
|
|
@@ -1688,7 +1688,7 @@ var NotificationUI = (props) => {
|
|
|
1688
1688
|
ref: notificationRef,
|
|
1689
1689
|
"data-state": showAnnouncement ? "open" : "closed",
|
|
1690
1690
|
className: cn(
|
|
1691
|
-
"oui-fixed oui-bottom-[calc(env(safe-area-inset-bottom)+8px)] oui-
|
|
1691
|
+
"oui-fixed oui-bottom-[calc(env(safe-area-inset-bottom)+8px)] oui-start-2 oui-z-50 oui-w-[calc(100%_-_16px)] oui-translate-y-[120%] oui-rounded-lg oui-border oui-border-line-6 oui-bg-base-8 md:oui-bottom-10 md:oui-start-auto md:oui-end-3 md:oui-w-[420px]",
|
|
1692
1692
|
"oui-transition-all oui-duration-300 oui-ease-in-out",
|
|
1693
1693
|
showAnnouncement ? "oui-visible" : "oui-invisible"
|
|
1694
1694
|
),
|
|
@@ -1725,7 +1725,7 @@ var menuItemVariants = tv({
|
|
|
1725
1725
|
"oui-py-2",
|
|
1726
1726
|
"oui-rounded-md",
|
|
1727
1727
|
"oui-w-full",
|
|
1728
|
-
"oui-text-
|
|
1728
|
+
"oui-text-start",
|
|
1729
1729
|
"oui-text-base",
|
|
1730
1730
|
"oui-text-base-contrast-36",
|
|
1731
1731
|
// "oui-flex",
|
|
@@ -2175,7 +2175,7 @@ var SubAccountScript = () => {
|
|
|
2175
2175
|
toast.success(t("subAccount.modal.switch.success.description"));
|
|
2176
2176
|
});
|
|
2177
2177
|
},
|
|
2178
|
-
[switchAccount]
|
|
2178
|
+
[switchAccount, t]
|
|
2179
2179
|
);
|
|
2180
2180
|
const accountsWithValues = useMemo(() => {
|
|
2181
2181
|
const mainAccountUnsettlePnl = accountValue[mainAccountId] ?? 0;
|
|
@@ -2421,9 +2421,9 @@ var AccountItem = (props) => {
|
|
|
2421
2421
|
"div",
|
|
2422
2422
|
{
|
|
2423
2423
|
className: cn(
|
|
2424
|
-
"oui-absolute -oui-
|
|
2424
|
+
"oui-absolute -oui-end-[1px] -oui-top-[1px] oui-leading-3",
|
|
2425
2425
|
"oui-text-[10px] oui-font-semibold oui-text-base-10",
|
|
2426
|
-
"oui-rounded-[6px] oui-rounded-
|
|
2426
|
+
"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]"
|
|
2427
2427
|
),
|
|
2428
2428
|
children: t("subAccount.modal.current")
|
|
2429
2429
|
}
|
|
@@ -2561,7 +2561,7 @@ var CreateSubAccount = (props) => {
|
|
|
2561
2561
|
}
|
|
2562
2562
|
}
|
|
2563
2563
|
);
|
|
2564
|
-
}, [subAccountCount, maxSubAccountCount]);
|
|
2564
|
+
}, [subAccountCount, maxSubAccountCount, t]);
|
|
2565
2565
|
const header = /* @__PURE__ */ jsxs(
|
|
2566
2566
|
Flex,
|
|
2567
2567
|
{
|
|
@@ -2889,7 +2889,7 @@ function SubAccountUI(props) {
|
|
|
2889
2889
|
align: "start",
|
|
2890
2890
|
side: "bottom",
|
|
2891
2891
|
sideOffset: 16,
|
|
2892
|
-
collisionPadding: { right: 16 },
|
|
2892
|
+
collisionPadding: { left: 16, right: 16 },
|
|
2893
2893
|
onMouseEnter,
|
|
2894
2894
|
onMouseLeave: () => {
|
|
2895
2895
|
props.onOpenChange(false);
|
|
@@ -3011,7 +3011,7 @@ var LeftNavSheet = (props) => {
|
|
|
3011
3011
|
}
|
|
3012
3012
|
)
|
|
3013
3013
|
] }),
|
|
3014
|
-
/* @__PURE__ */ jsx("div", { className: "oui-
|
|
3014
|
+
/* @__PURE__ */ jsx("div", { className: "oui-ms-auto", children: /* @__PURE__ */ jsx(SwapHorizIcon, {}) })
|
|
3015
3015
|
] });
|
|
3016
3016
|
}, [state, t]);
|
|
3017
3017
|
const openExternalLink = (url) => {
|
|
@@ -3330,10 +3330,10 @@ var ScanQRCodeContent = (props) => {
|
|
|
3330
3330
|
/* @__PURE__ */ jsx(QRCodeScanner, { onSuccess: props.onScanSuccess }),
|
|
3331
3331
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3332
3332
|
/* @__PURE__ */ jsx(LineGradient, {}),
|
|
3333
|
-
/* @__PURE__ */ jsx(RadiusGradient, { className: "oui-absolute oui-
|
|
3334
|
-
/* @__PURE__ */ jsx(RadiusGradient, { className: "oui-absolute oui-
|
|
3335
|
-
/* @__PURE__ */ jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-
|
|
3336
|
-
/* @__PURE__ */ jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-
|
|
3333
|
+
/* @__PURE__ */ jsx(RadiusGradient, { className: "oui-absolute oui-start-[-1.5px] oui-top-[-1.5px]" }),
|
|
3334
|
+
/* @__PURE__ */ jsx(RadiusGradient, { className: "oui-absolute oui-end-[-1.5px] oui-top-[-1.5px] oui-rotate-90" }),
|
|
3335
|
+
/* @__PURE__ */ jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-start-[-1.5px] -oui-rotate-90" }),
|
|
3336
|
+
/* @__PURE__ */ jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-end-[-1.5px] -oui-rotate-180" })
|
|
3337
3337
|
] })
|
|
3338
3338
|
] }),
|
|
3339
3339
|
/* @__PURE__ */ jsx(Text, { size: "sm", intensity: 98, weight: "semibold", children: t("linkDevice.scanQRCode") }),
|
|
@@ -3405,7 +3405,7 @@ var LineGradient = () => {
|
|
|
3405
3405
|
"div",
|
|
3406
3406
|
{
|
|
3407
3407
|
className: cn(
|
|
3408
|
-
"oui-absolute oui-
|
|
3408
|
+
"oui-absolute oui-start-[30px] oui-top-0",
|
|
3409
3409
|
"oui-h-[2px] oui-w-[calc(100%-60px)] oui-rounded-full",
|
|
3410
3410
|
"oui-bg-[linear-gradient(270deg,rgb(var(--oui-gradient-brand-end))_0%,rgb(var(--oui-gradient-brand-start))_100%)]",
|
|
3411
3411
|
"oui-shadow-[0_0_8px_4px_rgba(var(--oui-gradient-brand-start)/0.12)]",
|
|
@@ -4090,7 +4090,7 @@ var MainNavMobile = (props) => {
|
|
|
4090
4090
|
/* @__PURE__ */ jsx(
|
|
4091
4091
|
ChevronLeftIcon,
|
|
4092
4092
|
{
|
|
4093
|
-
className: "oui-absolute oui-
|
|
4093
|
+
className: "oui-absolute oui-start-6 oui-text-base-contrast-54",
|
|
4094
4094
|
onClick: onBack
|
|
4095
4095
|
}
|
|
4096
4096
|
),
|
|
@@ -4570,7 +4570,7 @@ var TotalValue = (props) => {
|
|
|
4570
4570
|
intensity: 98,
|
|
4571
4571
|
visible: props.visible,
|
|
4572
4572
|
unit: "USDC",
|
|
4573
|
-
unitClassName: "oui-text-base-contrast-20 oui-
|
|
4573
|
+
unitClassName: "oui-text-base-contrast-20 oui-ms-1",
|
|
4574
4574
|
as: "div",
|
|
4575
4575
|
children: totalValue ?? "-"
|
|
4576
4576
|
}
|
|
@@ -4618,7 +4618,7 @@ var FreeCollateral = (props) => {
|
|
|
4618
4618
|
{
|
|
4619
4619
|
intensity: 98,
|
|
4620
4620
|
unit: "USDC",
|
|
4621
|
-
unitClassName: "oui-text-base-contrast-20 oui-
|
|
4621
|
+
unitClassName: "oui-text-base-contrast-20 oui-ms-1",
|
|
4622
4622
|
visible,
|
|
4623
4623
|
as: "div",
|
|
4624
4624
|
children: freeCollateral ?? "-"
|
|
@@ -4720,7 +4720,7 @@ var AccountInfoPopover = (props) => {
|
|
|
4720
4720
|
visible: props.visible,
|
|
4721
4721
|
unit: "USDC",
|
|
4722
4722
|
className: "oui-transition-transform group-hover:-oui-translate-x-5",
|
|
4723
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
4723
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
4724
4724
|
children: totalValue ?? "-"
|
|
4725
4725
|
}
|
|
4726
4726
|
)
|
|
@@ -4744,7 +4744,7 @@ var AccountInfoPopover = (props) => {
|
|
|
4744
4744
|
unit: "USDC",
|
|
4745
4745
|
visible: props.visible,
|
|
4746
4746
|
className: "oui-transition-transform group-hover:-oui-translate-x-5",
|
|
4747
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
4747
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
4748
4748
|
children: props.freeCollateral ?? "-"
|
|
4749
4749
|
}
|
|
4750
4750
|
)
|
|
@@ -4826,7 +4826,7 @@ var DropdownMenu = (props) => {
|
|
|
4826
4826
|
/* @__PURE__ */ jsx(
|
|
4827
4827
|
"button",
|
|
4828
4828
|
{
|
|
4829
|
-
className: "oui-absolute oui-
|
|
4829
|
+
className: "oui-absolute oui-end-1 oui-top-1",
|
|
4830
4830
|
onClick: props.onSetTop,
|
|
4831
4831
|
children: /* @__PURE__ */ jsxs(
|
|
4832
4832
|
"svg",
|
|
@@ -5139,7 +5139,7 @@ var MessageCenter = (props) => {
|
|
|
5139
5139
|
className: "hover:oui-opacity-100"
|
|
5140
5140
|
}
|
|
5141
5141
|
),
|
|
5142
|
-
messageSize > 0 && showAnnouncement && /* @__PURE__ */ jsx("div", { className: "oui-absolute -oui-
|
|
5142
|
+
messageSize > 0 && showAnnouncement && /* @__PURE__ */ 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 oui-text-primary-contrast", children: messageSize })
|
|
5143
5143
|
] }) })
|
|
5144
5144
|
}
|
|
5145
5145
|
),
|
|
@@ -5267,7 +5267,7 @@ var NavItem2 = (props) => {
|
|
|
5267
5267
|
children: item.label ?? item.name
|
|
5268
5268
|
}
|
|
5269
5269
|
),
|
|
5270
|
-
hasSubMenu && /* @__PURE__ */ jsx("span", { className: "oui-
|
|
5270
|
+
hasSubMenu && /* @__PURE__ */ jsx("span", { className: "oui-ms-1 group-data-[open=true]:oui-rotate-180", children: isActive ? /* @__PURE__ */ jsx(ActiveIcon, {}) : /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12, color: "white" }) })
|
|
5271
5271
|
] }),
|
|
5272
5272
|
/* @__PURE__ */ jsx(
|
|
5273
5273
|
Box,
|
|
@@ -5457,7 +5457,7 @@ var Tag = (props) => {
|
|
|
5457
5457
|
return /* @__PURE__ */ jsx(
|
|
5458
5458
|
"div",
|
|
5459
5459
|
{
|
|
5460
|
-
className: "oui-
|
|
5460
|
+
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",
|
|
5461
5461
|
children: /* @__PURE__ */ jsx(
|
|
5462
5462
|
Text.gradient,
|
|
5463
5463
|
{
|
|
@@ -5470,14 +5470,14 @@ var Tag = (props) => {
|
|
|
5470
5470
|
}
|
|
5471
5471
|
);
|
|
5472
5472
|
};
|
|
5473
|
-
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-
|
|
5473
|
+
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";
|
|
5474
5474
|
var ItemIcon = (props) => {
|
|
5475
5475
|
const { isActive } = props;
|
|
5476
5476
|
if (!props.item.icon) {
|
|
5477
5477
|
return null;
|
|
5478
5478
|
}
|
|
5479
5479
|
if (typeof props.item.icon === "string") {
|
|
5480
|
-
return /* @__PURE__ */ jsx("span", { className: "oui-
|
|
5480
|
+
return /* @__PURE__ */ jsx("span", { className: "oui-me-1 oui-size-[20px]", children: /* @__PURE__ */ jsx(
|
|
5481
5481
|
"img",
|
|
5482
5482
|
{
|
|
5483
5483
|
src: isActive ? props.item.activeIcon || props.item.icon : props.item.icon,
|
|
@@ -5515,7 +5515,7 @@ var CampaignButton = (props) => {
|
|
|
5515
5515
|
item: props.item,
|
|
5516
5516
|
onClick: props.onItemClick,
|
|
5517
5517
|
classNames: {
|
|
5518
|
-
navItem: cn("oui-text-base-contrast-54 -oui-
|
|
5518
|
+
navItem: cn("oui-text-base-contrast-54 -oui-ms-2", props.className)
|
|
5519
5519
|
}
|
|
5520
5520
|
}
|
|
5521
5521
|
) });
|
|
@@ -5689,7 +5689,7 @@ var MaintenanceTipsUI = (props) => {
|
|
|
5689
5689
|
{
|
|
5690
5690
|
className: cn(
|
|
5691
5691
|
"oui-bg-warning-darken/10 oui-text-warning-darken oui-text-2xs md:oui-text-sm oui-relative oui-gap-1",
|
|
5692
|
-
"oui-mx-1 md:oui-mx-0 md:oui-w-full
|
|
5692
|
+
"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",
|
|
5693
5693
|
"oui-leading-4",
|
|
5694
5694
|
"oui-rounded-xl md:oui-rounded-none",
|
|
5695
5695
|
"oui-min-h-[48px]",
|
|
@@ -5711,7 +5711,7 @@ var MaintenanceTipsUI = (props) => {
|
|
|
5711
5711
|
CloseIcon,
|
|
5712
5712
|
{
|
|
5713
5713
|
size: 16,
|
|
5714
|
-
className: "oui-absolute oui-
|
|
5714
|
+
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",
|
|
5715
5715
|
onClick: closeTips
|
|
5716
5716
|
}
|
|
5717
5717
|
)
|