@orderly.network/trading-leaderboard 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 +62 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -55
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -249,7 +249,7 @@ var useRankingColumns = (fields, address, enableSort, type) => {
|
|
|
249
249
|
alt: `${value}th badge`,
|
|
250
250
|
className: ui.cn(
|
|
251
251
|
"oui-z-0 oui-h-[38px] oui-opacity-30 md:oui-h-[46px]",
|
|
252
|
-
"oui-absolute oui-
|
|
252
|
+
"oui-absolute oui-start-0 oui-top-0",
|
|
253
253
|
"oui-mix-blend-luminosity",
|
|
254
254
|
// force create a separate layer in order to fix mix-blend-luminosity not working on ios
|
|
255
255
|
"oui-transform-gpu"
|
|
@@ -554,17 +554,17 @@ var Ranking = (props) => {
|
|
|
554
554
|
className: ui.cn(
|
|
555
555
|
"after:oui-absolute after:oui-h-[40px] after:oui-w-full md:after:oui-h-[48px]",
|
|
556
556
|
"after:oui-border-[rgb(var(--oui-gradient-brand-start))]",
|
|
557
|
-
"after:oui-
|
|
557
|
+
"after:oui-start-0 after:oui-top-[2px] after:oui-z-[-1]",
|
|
558
558
|
"after:oui-border-y",
|
|
559
|
-
isFirstColumn && "after:oui-rounded-
|
|
560
|
-
isLastColumn && "after:oui-rounded-
|
|
559
|
+
isFirstColumn && "after:oui-rounded-s-lg after:oui-border-s",
|
|
560
|
+
isLastColumn && "after:oui-rounded-e-lg after:oui-border-e"
|
|
561
561
|
)
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
564
|
return {
|
|
565
565
|
className: ui.cn(
|
|
566
|
-
isFirstColumn && isRank && "oui-rounded-
|
|
567
|
-
isLastColumn && isRank && "oui-rounded-
|
|
566
|
+
isFirstColumn && isRank && "oui-rounded-s-lg oui-mix-blend-luminosity",
|
|
567
|
+
isLastColumn && isRank && "oui-rounded-e-lg oui-mix-blend-luminosity"
|
|
568
568
|
)
|
|
569
569
|
// style: isRank
|
|
570
570
|
// ? {
|
|
@@ -2084,42 +2084,48 @@ var LeaderboardBackground = (props) => {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
const linearGradient = "linear-gradient(180deg, rgba(var(--oui-color-base-10) / 0.3) 0%, rgba(var(--oui-color-base-10) / 0) 70%, rgba(var(--oui-color-base-10) / 1) 100%)";
|
|
2086
2086
|
if (isVideo) {
|
|
2087
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
autoPlay: true,
|
|
2103
|
-
loop: true,
|
|
2104
|
-
muted: true,
|
|
2105
|
-
className: ui.cn(
|
|
2106
|
-
// rest style
|
|
2107
|
-
"oui-border-none oui-bg-transparent oui-outline-none",
|
|
2108
|
-
"oui-size-full",
|
|
2109
|
-
// "oui-absolute oui-top-0 oui-left-0",
|
|
2110
|
-
"oui-object-cover",
|
|
2111
|
-
"oui-opacity-50"
|
|
2087
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2088
|
+
"div",
|
|
2089
|
+
{
|
|
2090
|
+
className: ui.cn("oui-absolute oui-start-0 oui-top-0", "oui-size-full"),
|
|
2091
|
+
children: [
|
|
2092
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2093
|
+
"div",
|
|
2094
|
+
{
|
|
2095
|
+
style: {
|
|
2096
|
+
backgroundImage: linearGradient,
|
|
2097
|
+
backgroundSize: "cover",
|
|
2098
|
+
backgroundRepeat: "no-repeat"
|
|
2099
|
+
},
|
|
2100
|
+
className: ui.cn("oui-absolute oui-start-0 oui-top-0", "oui-size-full")
|
|
2101
|
+
}
|
|
2112
2102
|
),
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2103
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2104
|
+
"video",
|
|
2105
|
+
{
|
|
2106
|
+
autoPlay: true,
|
|
2107
|
+
loop: true,
|
|
2108
|
+
muted: true,
|
|
2109
|
+
className: ui.cn(
|
|
2110
|
+
// rest style
|
|
2111
|
+
"oui-border-none oui-bg-transparent oui-outline-none",
|
|
2112
|
+
"oui-size-full",
|
|
2113
|
+
// "oui-absolute oui-top-0 oui-start-0",
|
|
2114
|
+
"oui-object-cover",
|
|
2115
|
+
"oui-opacity-50"
|
|
2116
|
+
),
|
|
2117
|
+
children: [
|
|
2118
|
+
/* @__PURE__ */ jsxRuntime.jsx("source", { src: props.backgroundSrc, type: "video/mp4" }),
|
|
2119
|
+
/* @__PURE__ */ jsxRuntime.jsx("source", { src: props.backgroundSrc, type: "video/webm" }),
|
|
2120
|
+
/* @__PURE__ */ jsxRuntime.jsx("source", { src: props.backgroundSrc, type: "video/ogg" }),
|
|
2121
|
+
/* @__PURE__ */ jsxRuntime.jsx("source", { src: props.backgroundSrc, type: "video/avi" }),
|
|
2122
|
+
"Your browser does not support the video tag."
|
|
2123
|
+
]
|
|
2124
|
+
}
|
|
2125
|
+
)
|
|
2126
|
+
]
|
|
2127
|
+
}
|
|
2128
|
+
);
|
|
2123
2129
|
}
|
|
2124
2130
|
if (props.backgroundSrc) {
|
|
2125
2131
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2132,7 +2138,7 @@ var LeaderboardBackground = (props) => {
|
|
|
2132
2138
|
},
|
|
2133
2139
|
className: ui.cn(
|
|
2134
2140
|
"oui-general-leaderboard-background",
|
|
2135
|
-
"oui-absolute oui-
|
|
2141
|
+
"oui-absolute oui-start-0 oui-top-0 oui-z-[-1]",
|
|
2136
2142
|
"oui-size-full",
|
|
2137
2143
|
"oui-opacity-50"
|
|
2138
2144
|
)
|
|
@@ -2777,13 +2783,13 @@ var TradingVolumeAndParticipation = ({
|
|
|
2777
2783
|
const { t } = i18n.useTranslation();
|
|
2778
2784
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-items-center oui-text-2xs oui-font-semibold oui-text-base-contrast-36", children: [
|
|
2779
2785
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: t("tradingLeaderboard.tradingVolume") }),
|
|
2780
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-
|
|
2786
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-ms-1 oui-me-2", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.gradient, { color: "brand", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: 2, prefix: "$", children: tradingVolume }) }) }),
|
|
2781
2787
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: t("tradingLeaderboard.participants") }),
|
|
2782
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-
|
|
2788
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-ms-1 oui-text-base-contrast-54", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text.numeral, { dp: 0, children: statistics?.total_participants }) }),
|
|
2783
2789
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2784
2790
|
"div",
|
|
2785
2791
|
{
|
|
2786
|
-
className: "oui-
|
|
2792
|
+
className: "oui-ms-auto oui-flex oui-cursor-pointer oui-items-center oui-gap-0.5 oui-text-2xs oui-leading-[15px] oui-text-base-contrast-36",
|
|
2787
2793
|
onClick: onLearnMore,
|
|
2788
2794
|
children: [
|
|
2789
2795
|
t("tradingLeaderboard.viewRules"),
|
|
@@ -2808,7 +2814,7 @@ var PricePoolProgress = ({
|
|
|
2808
2814
|
"div",
|
|
2809
2815
|
{
|
|
2810
2816
|
className: ui.cn([
|
|
2811
|
-
"oui-relative oui-flex oui-items-center oui-p-4 oui-
|
|
2817
|
+
"oui-relative oui-flex oui-items-center oui-p-4 oui-pe-12 oui-font-medium",
|
|
2812
2818
|
"oui-rounded-[10px] oui-border oui-border-solid oui-border-base-contrast/[0.12]",
|
|
2813
2819
|
"oui-trading-leaderboard-title",
|
|
2814
2820
|
isMobile ? "oui-h-[88px] oui-text-3xs" : "oui-h-[114px] oui-text-sm"
|
|
@@ -2849,8 +2855,8 @@ var PricePoolProgress = ({
|
|
|
2849
2855
|
"div",
|
|
2850
2856
|
{
|
|
2851
2857
|
className: ui.cn(
|
|
2852
|
-
"oui-absolute oui-
|
|
2853
|
-
"oui-p-4 oui-
|
|
2858
|
+
"oui-absolute oui-start-1 oui-flex oui-w-[calc(100%-64px)] oui-items-center",
|
|
2859
|
+
"oui-p-4 oui-pe-12"
|
|
2854
2860
|
),
|
|
2855
2861
|
children: tieredPrizePools?.map((prizePool, index) => {
|
|
2856
2862
|
const isReached = index <= currentTierIndex;
|
|
@@ -3556,6 +3562,7 @@ var CampaignsCountdown = ({ campaign, isMobile }) => {
|
|
|
3556
3562
|
] });
|
|
3557
3563
|
};
|
|
3558
3564
|
var CampaignsTimeDesktopUI = ({ campaign, isMobile }) => {
|
|
3565
|
+
i18n.useTranslation();
|
|
3559
3566
|
const timelineData = generateCampaignTimeline(campaign);
|
|
3560
3567
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3561
3568
|
"div",
|
|
@@ -3622,7 +3629,7 @@ var CampaignItemUI = ({
|
|
|
3622
3629
|
{
|
|
3623
3630
|
className: ui.cn([
|
|
3624
3631
|
"oui-size-full",
|
|
3625
|
-
"oui-absolute oui-
|
|
3632
|
+
"oui-absolute oui-start-0 oui-top-0",
|
|
3626
3633
|
"oui-bg-cover oui-bg-center oui-bg-no-repeat oui-bg-blend-luminosity",
|
|
3627
3634
|
active ? "oui-bg-transparent" : "oui-bg-[lightgray] oui-opacity-40",
|
|
3628
3635
|
"group-hover:oui-bg-transparent group-hover:oui-opacity-100"
|
|
@@ -3637,7 +3644,7 @@ var CampaignItemUI = ({
|
|
|
3637
3644
|
{
|
|
3638
3645
|
className: ui.cn([
|
|
3639
3646
|
"oui-flex oui-size-full oui-flex-col oui-items-center oui-justify-center oui-gap-1",
|
|
3640
|
-
"oui-absolute oui-
|
|
3647
|
+
"oui-absolute oui-start-0 oui-top-0 oui-z-10",
|
|
3641
3648
|
classNames?.content
|
|
3642
3649
|
]),
|
|
3643
3650
|
children: [
|
|
@@ -3679,7 +3686,7 @@ var CampaignTag = ({ tag, active, classNames }) => {
|
|
|
3679
3686
|
{
|
|
3680
3687
|
className: ui.cn([
|
|
3681
3688
|
"oui-w-fit oui-rounded-br-lg",
|
|
3682
|
-
"oui-absolute oui-
|
|
3689
|
+
"oui-absolute oui-start-0 oui-top-0 oui-z-10 oui-flex oui-items-center",
|
|
3683
3690
|
active && tag !== "coming" /* COMING */ ? "oui-bg-[rgba(var(--oui-gradient-brand-start))]" : "oui-bg-base-4",
|
|
3684
3691
|
active && tag !== "ended" /* ENDED */ && "group-hover:oui-bg-base-4",
|
|
3685
3692
|
tag === "ended" /* ENDED */ && "oui-bg-base-6 group-hover:oui-bg-base-6",
|
|
@@ -3715,7 +3722,7 @@ var PriceTag = ({ price, active }) => {
|
|
|
3715
3722
|
{
|
|
3716
3723
|
className: ui.cn([
|
|
3717
3724
|
"oui-flex oui-h-[18px] oui-items-center oui-gap-0.5 oui-rounded-lg oui-bg-warning/70 oui-px-1 oui-py-0.5 oui-backdrop-blur-[2px]",
|
|
3718
|
-
"oui-absolute oui-
|
|
3725
|
+
"oui-absolute oui-end-1 oui-top-1 oui-z-10 oui-flex oui-items-center",
|
|
3719
3726
|
active ? "oui-opacity-100" : "oui-opacity-60"
|
|
3720
3727
|
]),
|
|
3721
3728
|
children: [
|
|
@@ -4102,7 +4109,7 @@ var RewardsDesktopUI = ({
|
|
|
4102
4109
|
const ticketText = formatTicketCount(estimatedTickets);
|
|
4103
4110
|
const canTrade = react.useMemo(() => {
|
|
4104
4111
|
return campaign?.start_time && campaign?.end_time && campaign.start_time < (/* @__PURE__ */ new Date()).toISOString() && campaign.end_time > (/* @__PURE__ */ new Date()).toISOString();
|
|
4105
|
-
}, [campaign]);
|
|
4112
|
+
}, [campaign, t]);
|
|
4106
4113
|
const ticketTooltipContent = react.useMemo(() => {
|
|
4107
4114
|
const ticketRules = campaign?.ticket_rules;
|
|
4108
4115
|
if (!ticketRules) {
|
|
@@ -4139,7 +4146,7 @@ var RewardsDesktopUI = ({
|
|
|
4139
4146
|
tier.value
|
|
4140
4147
|
);
|
|
4141
4148
|
}) });
|
|
4142
|
-
}, [campaign]);
|
|
4149
|
+
}, [campaign, t]);
|
|
4143
4150
|
const extraProps = react.useMemo(() => {
|
|
4144
4151
|
if (!userdata || !campaign?.ticket_rules || campaign.end_time < (/* @__PURE__ */ new Date()).toISOString() || campaign.start_time > (/* @__PURE__ */ new Date()).toISOString()) {
|
|
4145
4152
|
return {
|
|
@@ -4479,7 +4486,7 @@ var DescriptionContent = ({ description, config }) => {
|
|
|
4479
4486
|
// Use list-outside for proper alignment
|
|
4480
4487
|
"oui-list-outside",
|
|
4481
4488
|
// Add left padding for proper spacing
|
|
4482
|
-
level === 0 ? "oui-
|
|
4489
|
+
level === 0 ? "oui-ps-5" : "oui-ps-4",
|
|
4483
4490
|
// Get list style class
|
|
4484
4491
|
getListStyleClass(defaultListStyle),
|
|
4485
4492
|
// Custom list container class
|