@orderly.network/ui-scaffold 3.0.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.js
CHANGED
|
@@ -544,7 +544,7 @@ var init_tradingMenu_ui = __esm({
|
|
|
544
544
|
icon,
|
|
545
545
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "sm", intensity: 80, weight: "semibold", children: label })
|
|
546
546
|
] }),
|
|
547
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Flex, { className: "oui-
|
|
547
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Flex, { className: "oui-ms-auto", children: selected ? /* @__PURE__ */ jsxRuntime.jsx(ui.SelectedChoicesFillIcon, { size: 14 }) : null })
|
|
548
548
|
]
|
|
549
549
|
}
|
|
550
550
|
);
|
|
@@ -601,13 +601,13 @@ var init_tradingMenu_ui = __esm({
|
|
|
601
601
|
ui.PopupUnionIcon,
|
|
602
602
|
{
|
|
603
603
|
size: 78,
|
|
604
|
-
className: "oui-text-base-8 oui-absolute oui-
|
|
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
|
ui.Flex,
|
|
609
609
|
{
|
|
610
|
-
className: "oui-absolute oui-
|
|
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(ui.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-
|
|
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: ui.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-
|
|
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: ui.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-
|
|
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: ui.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
|
ui.Divider,
|
|
1559
1559
|
{
|
|
1560
1560
|
direction: "vertical",
|
|
1561
|
-
className: "oui-h-[18px] oui-px-1 oui-
|
|
1561
|
+
className: "oui-h-[18px] oui-px-1 oui-ms-2 oui-border-line-12"
|
|
1562
1562
|
}
|
|
1563
1563
|
),
|
|
1564
1564
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { gap: 2, children: [
|
|
@@ -1695,7 +1695,7 @@ var NotificationUI = (props) => {
|
|
|
1695
1695
|
ref: notificationRef,
|
|
1696
1696
|
"data-state": showAnnouncement ? "open" : "closed",
|
|
1697
1697
|
className: ui.cn(
|
|
1698
|
-
"oui-fixed oui-bottom-[calc(env(safe-area-inset-bottom)+8px)] oui-
|
|
1698
|
+
"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]",
|
|
1699
1699
|
"oui-transition-all oui-duration-300 oui-ease-in-out",
|
|
1700
1700
|
showAnnouncement ? "oui-visible" : "oui-invisible"
|
|
1701
1701
|
),
|
|
@@ -1732,7 +1732,7 @@ var menuItemVariants = ui.tv({
|
|
|
1732
1732
|
"oui-py-2",
|
|
1733
1733
|
"oui-rounded-md",
|
|
1734
1734
|
"oui-w-full",
|
|
1735
|
-
"oui-text-
|
|
1735
|
+
"oui-text-start",
|
|
1736
1736
|
"oui-text-base",
|
|
1737
1737
|
"oui-text-base-contrast-36",
|
|
1738
1738
|
// "oui-flex",
|
|
@@ -2182,7 +2182,7 @@ var SubAccountScript = () => {
|
|
|
2182
2182
|
ui.toast.success(t("subAccount.modal.switch.success.description"));
|
|
2183
2183
|
});
|
|
2184
2184
|
},
|
|
2185
|
-
[switchAccount]
|
|
2185
|
+
[switchAccount, t]
|
|
2186
2186
|
);
|
|
2187
2187
|
const accountsWithValues = React7.useMemo(() => {
|
|
2188
2188
|
const mainAccountUnsettlePnl = accountValue[mainAccountId] ?? 0;
|
|
@@ -2428,9 +2428,9 @@ var AccountItem = (props) => {
|
|
|
2428
2428
|
"div",
|
|
2429
2429
|
{
|
|
2430
2430
|
className: ui.cn(
|
|
2431
|
-
"oui-absolute -oui-
|
|
2431
|
+
"oui-absolute -oui-end-[1px] -oui-top-[1px] oui-leading-3",
|
|
2432
2432
|
"oui-text-[10px] oui-font-semibold oui-text-base-10",
|
|
2433
|
-
"oui-rounded-[6px] oui-rounded-
|
|
2433
|
+
"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]"
|
|
2434
2434
|
),
|
|
2435
2435
|
children: t("subAccount.modal.current")
|
|
2436
2436
|
}
|
|
@@ -2568,7 +2568,7 @@ var CreateSubAccount = (props) => {
|
|
|
2568
2568
|
}
|
|
2569
2569
|
}
|
|
2570
2570
|
);
|
|
2571
|
-
}, [subAccountCount, maxSubAccountCount]);
|
|
2571
|
+
}, [subAccountCount, maxSubAccountCount, t]);
|
|
2572
2572
|
const header = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2573
2573
|
ui.Flex,
|
|
2574
2574
|
{
|
|
@@ -2896,7 +2896,7 @@ function SubAccountUI(props) {
|
|
|
2896
2896
|
align: "start",
|
|
2897
2897
|
side: "bottom",
|
|
2898
2898
|
sideOffset: 16,
|
|
2899
|
-
collisionPadding: { right: 16 },
|
|
2899
|
+
collisionPadding: { left: 16, right: 16 },
|
|
2900
2900
|
onMouseEnter,
|
|
2901
2901
|
onMouseLeave: () => {
|
|
2902
2902
|
props.onOpenChange(false);
|
|
@@ -3018,7 +3018,7 @@ var LeftNavSheet = (props) => {
|
|
|
3018
3018
|
}
|
|
3019
3019
|
)
|
|
3020
3020
|
] }),
|
|
3021
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-
|
|
3021
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-ms-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ui.SwapHorizIcon, {}) })
|
|
3022
3022
|
] });
|
|
3023
3023
|
}, [state, t]);
|
|
3024
3024
|
const openExternalLink = (url) => {
|
|
@@ -3337,10 +3337,10 @@ var ScanQRCodeContent = (props) => {
|
|
|
3337
3337
|
/* @__PURE__ */ jsxRuntime.jsx(QRCodeScanner, { onSuccess: props.onScanSuccess }),
|
|
3338
3338
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3339
3339
|
/* @__PURE__ */ jsxRuntime.jsx(LineGradient, {}),
|
|
3340
|
-
/* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-
|
|
3341
|
-
/* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-
|
|
3342
|
-
/* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-
|
|
3343
|
-
/* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-
|
|
3340
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-start-[-1.5px] oui-top-[-1.5px]" }),
|
|
3341
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-end-[-1.5px] oui-top-[-1.5px] oui-rotate-90" }),
|
|
3342
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-start-[-1.5px] -oui-rotate-90" }),
|
|
3343
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadiusGradient, { className: "oui-absolute oui-bottom-[-1.5px] oui-end-[-1.5px] -oui-rotate-180" })
|
|
3344
3344
|
] })
|
|
3345
3345
|
] }),
|
|
3346
3346
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "sm", intensity: 98, weight: "semibold", children: t("linkDevice.scanQRCode") }),
|
|
@@ -3412,7 +3412,7 @@ var LineGradient = () => {
|
|
|
3412
3412
|
"div",
|
|
3413
3413
|
{
|
|
3414
3414
|
className: ui.cn(
|
|
3415
|
-
"oui-absolute oui-
|
|
3415
|
+
"oui-absolute oui-start-[30px] oui-top-0",
|
|
3416
3416
|
"oui-h-[2px] oui-w-[calc(100%-60px)] oui-rounded-full",
|
|
3417
3417
|
"oui-bg-[linear-gradient(270deg,rgb(var(--oui-gradient-brand-end))_0%,rgb(var(--oui-gradient-brand-start))_100%)]",
|
|
3418
3418
|
"oui-shadow-[0_0_8px_4px_rgba(var(--oui-gradient-brand-start)/0.12)]",
|
|
@@ -4097,7 +4097,7 @@ var MainNavMobile = (props) => {
|
|
|
4097
4097
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4098
4098
|
ui.ChevronLeftIcon,
|
|
4099
4099
|
{
|
|
4100
|
-
className: "oui-absolute oui-
|
|
4100
|
+
className: "oui-absolute oui-start-6 oui-text-base-contrast-54",
|
|
4101
4101
|
onClick: onBack
|
|
4102
4102
|
}
|
|
4103
4103
|
),
|
|
@@ -4577,7 +4577,7 @@ var TotalValue = (props) => {
|
|
|
4577
4577
|
intensity: 98,
|
|
4578
4578
|
visible: props.visible,
|
|
4579
4579
|
unit: "USDC",
|
|
4580
|
-
unitClassName: "oui-text-base-contrast-20 oui-
|
|
4580
|
+
unitClassName: "oui-text-base-contrast-20 oui-ms-1",
|
|
4581
4581
|
as: "div",
|
|
4582
4582
|
children: totalValue ?? "-"
|
|
4583
4583
|
}
|
|
@@ -4625,7 +4625,7 @@ var FreeCollateral = (props) => {
|
|
|
4625
4625
|
{
|
|
4626
4626
|
intensity: 98,
|
|
4627
4627
|
unit: "USDC",
|
|
4628
|
-
unitClassName: "oui-text-base-contrast-20 oui-
|
|
4628
|
+
unitClassName: "oui-text-base-contrast-20 oui-ms-1",
|
|
4629
4629
|
visible,
|
|
4630
4630
|
as: "div",
|
|
4631
4631
|
children: freeCollateral ?? "-"
|
|
@@ -4727,7 +4727,7 @@ var AccountInfoPopover = (props) => {
|
|
|
4727
4727
|
visible: props.visible,
|
|
4728
4728
|
unit: "USDC",
|
|
4729
4729
|
className: "oui-transition-transform group-hover:-oui-translate-x-5",
|
|
4730
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
4730
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
4731
4731
|
children: totalValue ?? "-"
|
|
4732
4732
|
}
|
|
4733
4733
|
)
|
|
@@ -4751,7 +4751,7 @@ var AccountInfoPopover = (props) => {
|
|
|
4751
4751
|
unit: "USDC",
|
|
4752
4752
|
visible: props.visible,
|
|
4753
4753
|
className: "oui-transition-transform group-hover:-oui-translate-x-5",
|
|
4754
|
-
unitClassName: "oui-text-base-contrast-36 oui-
|
|
4754
|
+
unitClassName: "oui-text-base-contrast-36 oui-ms-1",
|
|
4755
4755
|
children: props.freeCollateral ?? "-"
|
|
4756
4756
|
}
|
|
4757
4757
|
)
|
|
@@ -4833,7 +4833,7 @@ var DropdownMenu = (props) => {
|
|
|
4833
4833
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4834
4834
|
"button",
|
|
4835
4835
|
{
|
|
4836
|
-
className: "oui-absolute oui-
|
|
4836
|
+
className: "oui-absolute oui-end-1 oui-top-1",
|
|
4837
4837
|
onClick: props.onSetTop,
|
|
4838
4838
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4839
4839
|
"svg",
|
|
@@ -5146,7 +5146,7 @@ var MessageCenter = (props) => {
|
|
|
5146
5146
|
className: "hover:oui-opacity-100"
|
|
5147
5147
|
}
|
|
5148
5148
|
),
|
|
5149
|
-
messageSize > 0 && showAnnouncement && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-absolute -oui-
|
|
5149
|
+
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 oui-text-primary-contrast", children: messageSize })
|
|
5150
5150
|
] }) })
|
|
5151
5151
|
}
|
|
5152
5152
|
),
|
|
@@ -5274,7 +5274,7 @@ var NavItem2 = (props) => {
|
|
|
5274
5274
|
children: item.label ?? item.name
|
|
5275
5275
|
}
|
|
5276
5276
|
),
|
|
5277
|
-
hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-
|
|
5277
|
+
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(ui.ChevronDownIcon, { size: 12, color: "white" }) })
|
|
5278
5278
|
] }),
|
|
5279
5279
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5280
5280
|
ui.Box,
|
|
@@ -5464,7 +5464,7 @@ var Tag = (props) => {
|
|
|
5464
5464
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5465
5465
|
"div",
|
|
5466
5466
|
{
|
|
5467
|
-
className: "oui-
|
|
5467
|
+
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",
|
|
5468
5468
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5469
5469
|
ui.Text.gradient,
|
|
5470
5470
|
{
|
|
@@ -5477,14 +5477,14 @@ var Tag = (props) => {
|
|
|
5477
5477
|
}
|
|
5478
5478
|
);
|
|
5479
5479
|
};
|
|
5480
|
-
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-
|
|
5480
|
+
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";
|
|
5481
5481
|
var ItemIcon = (props) => {
|
|
5482
5482
|
const { isActive } = props;
|
|
5483
5483
|
if (!props.item.icon) {
|
|
5484
5484
|
return null;
|
|
5485
5485
|
}
|
|
5486
5486
|
if (typeof props.item.icon === "string") {
|
|
5487
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-
|
|
5487
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-me-1 oui-size-[20px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5488
5488
|
"img",
|
|
5489
5489
|
{
|
|
5490
5490
|
src: isActive ? props.item.activeIcon || props.item.icon : props.item.icon,
|
|
@@ -5522,7 +5522,7 @@ var CampaignButton = (props) => {
|
|
|
5522
5522
|
item: props.item,
|
|
5523
5523
|
onClick: props.onItemClick,
|
|
5524
5524
|
classNames: {
|
|
5525
|
-
navItem: ui.cn("oui-text-base-contrast-54 -oui-
|
|
5525
|
+
navItem: ui.cn("oui-text-base-contrast-54 -oui-ms-2", props.className)
|
|
5526
5526
|
}
|
|
5527
5527
|
}
|
|
5528
5528
|
) });
|
|
@@ -5696,7 +5696,7 @@ var MaintenanceTipsUI = (props) => {
|
|
|
5696
5696
|
{
|
|
5697
5697
|
className: ui.cn(
|
|
5698
5698
|
"oui-bg-warning-darken/10 oui-text-warning-darken oui-text-2xs md:oui-text-sm oui-relative oui-gap-1",
|
|
5699
|
-
"oui-mx-1 md:oui-mx-0 md:oui-w-full
|
|
5699
|
+
"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",
|
|
5700
5700
|
"oui-leading-4",
|
|
5701
5701
|
"oui-rounded-xl md:oui-rounded-none",
|
|
5702
5702
|
"oui-min-h-[48px]",
|
|
@@ -5718,7 +5718,7 @@ var MaintenanceTipsUI = (props) => {
|
|
|
5718
5718
|
CloseIcon,
|
|
5719
5719
|
{
|
|
5720
5720
|
size: 16,
|
|
5721
|
-
className: "oui-absolute oui-
|
|
5721
|
+
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",
|
|
5722
5722
|
onClick: closeTips
|
|
5723
5723
|
}
|
|
5724
5724
|
)
|