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