@loafmarkets/ui 0.1.309 → 0.1.311

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
@@ -11786,6 +11786,51 @@ var IPOOptionLocation = styled9__default.default.div`
11786
11786
  font-weight: 500;
11787
11787
  }
11788
11788
  `;
11789
+ var slideDown = styled9.keyframes`
11790
+ 0% { transform: translateY(-100%); opacity: 0; }
11791
+ 40% { opacity: 1; }
11792
+ 100% { transform: translateY(0); }
11793
+ `;
11794
+ var slideOut = styled9.keyframes`
11795
+ 0% { transform: translateY(0); opacity: 1; }
11796
+ 60% { opacity: 0; }
11797
+ 100% { transform: translateY(100%); opacity: 0; }
11798
+ `;
11799
+ var SlideWrap = styled9__default.default.span`
11800
+ display: inline-block;
11801
+ position: relative;
11802
+ overflow: hidden;
11803
+ height: 1.15em;
11804
+ vertical-align: bottom;
11805
+ `;
11806
+ var SlideInner = styled9__default.default.span`
11807
+ display: inline-block;
11808
+ animation: ${(p) => p.$animate ? slideDown : "none"} 0.35s cubic-bezier(0.2, 0.6, 0.35, 1) forwards;
11809
+ `;
11810
+ var SlideOld = styled9__default.default.span`
11811
+ position: absolute;
11812
+ top: 0;
11813
+ left: 0;
11814
+ animation: ${slideOut} 0.35s cubic-bezier(0.2, 0.6, 0.35, 1) forwards;
11815
+ `;
11816
+ function SlideDigit({ value }) {
11817
+ const prevRef = React5.useRef(value);
11818
+ const [prev, setPrev] = React5.useState(null);
11819
+ const [animKey, setAnimKey] = React5.useState(0);
11820
+ React5.useEffect(() => {
11821
+ if (value !== prevRef.current) {
11822
+ setPrev(prevRef.current);
11823
+ prevRef.current = value;
11824
+ setAnimKey((k) => k + 1);
11825
+ const timer = setTimeout(() => setPrev(null), 350);
11826
+ return () => clearTimeout(timer);
11827
+ }
11828
+ }, [value]);
11829
+ return /* @__PURE__ */ jsxRuntime.jsxs(SlideWrap, { children: [
11830
+ prev !== null && /* @__PURE__ */ jsxRuntime.jsx(SlideOld, { children: prev }, `old-${animKey}`),
11831
+ /* @__PURE__ */ jsxRuntime.jsx(SlideInner, { $animate: prev !== null, children: value }, `new-${animKey}`)
11832
+ ] });
11833
+ }
11789
11834
  var formatCurrency3 = (amount) => {
11790
11835
  if (amount >= 1e6) return `$${(amount / 1e6).toFixed(1)}M`;
11791
11836
  if (amount >= 1e3) return `$${(amount / 1e3).toFixed(0)}K`;
@@ -11876,16 +11921,16 @@ function OfferingProgressCard({
11876
11921
  countdown ? /* @__PURE__ */ jsxRuntime.jsxs(HomeCountdownSide, { children: [
11877
11922
  /* @__PURE__ */ jsxRuntime.jsx(CountdownLabel, { children: "Opens In" }),
11878
11923
  /* @__PURE__ */ jsxRuntime.jsxs(CountdownDigits, { children: [
11879
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: String(countdown.days).padStart(2, "0") }),
11924
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.days).padStart(2, "0") }) }),
11880
11925
  /* @__PURE__ */ jsxRuntime.jsx(CountdownUnitLabel, { children: "D" }),
11881
11926
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSeparator, { children: ":" }),
11882
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: String(countdown.hours).padStart(2, "0") }),
11927
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.hours).padStart(2, "0") }) }),
11883
11928
  /* @__PURE__ */ jsxRuntime.jsx(CountdownUnitLabel, { children: "H" }),
11884
11929
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSeparator, { children: ":" }),
11885
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: String(countdown.minutes).padStart(2, "0") }),
11930
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.minutes).padStart(2, "0") }) }),
11886
11931
  /* @__PURE__ */ jsxRuntime.jsx(CountdownUnitLabel, { children: "M" }),
11887
11932
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSeparator, { children: ":" }),
11888
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: String(countdown.seconds).padStart(2, "0") }),
11933
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.seconds).padStart(2, "0") }) }),
11889
11934
  /* @__PURE__ */ jsxRuntime.jsx(CountdownUnitLabel, { children: "S" })
11890
11935
  ] })
11891
11936
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(HomeCountdownSide, { children: /* @__PURE__ */ jsxRuntime.jsx(PreLiveStatus, { $statusColor: statusColor, children: "Sale Not Yet Open" }) }),
@@ -11971,16 +12016,16 @@ function OfferingProgressCard({
11971
12016
  countdown ? /* @__PURE__ */ jsxRuntime.jsxs(CountdownCenter, { children: [
11972
12017
  /* @__PURE__ */ jsxRuntime.jsx(CountdownLabel, { children: isPrivateClient ? "Public Offering In" : "Opens In" }),
11973
12018
  /* @__PURE__ */ jsxRuntime.jsxs(CountdownDigits, { children: [
11974
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: String(countdown.days).padStart(2, "0") }),
12019
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.days).padStart(2, "0") }) }),
11975
12020
  /* @__PURE__ */ jsxRuntime.jsx(CountdownUnitLabel, { children: "D" }),
11976
12021
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSeparator, { children: ":" }),
11977
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: String(countdown.hours).padStart(2, "0") }),
12022
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.hours).padStart(2, "0") }) }),
11978
12023
  /* @__PURE__ */ jsxRuntime.jsx(CountdownUnitLabel, { children: "H" }),
11979
12024
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSeparator, { children: ":" }),
11980
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: String(countdown.minutes).padStart(2, "0") }),
12025
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.minutes).padStart(2, "0") }) }),
11981
12026
  /* @__PURE__ */ jsxRuntime.jsx(CountdownUnitLabel, { children: "M" }),
11982
12027
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSeparator, { children: ":" }),
11983
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: String(countdown.seconds).padStart(2, "0") }),
12028
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNumber, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.seconds).padStart(2, "0") }) }),
11984
12029
  /* @__PURE__ */ jsxRuntime.jsx(CountdownUnitLabel, { children: "S" })
11985
12030
  ] })
11986
12031
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(PreLiveStatus, { $statusColor: statusColor, children: "Sale Not Yet Open" }),
@@ -12298,7 +12343,7 @@ var slideIn = styled9.keyframes`
12298
12343
  from { transform: translateX(110%); opacity: 0; }
12299
12344
  to { transform: translateX(0); opacity: 1; }
12300
12345
  `;
12301
- var slideOut = styled9.keyframes`
12346
+ var slideOut2 = styled9.keyframes`
12302
12347
  from { transform: translateX(0); opacity: 1; }
12303
12348
  to { transform: translateX(110%); opacity: 0; }
12304
12349
  `;
@@ -12324,7 +12369,7 @@ var Wrapper2 = styled9__default.default.div`
12324
12369
  border-radius: 10px;
12325
12370
  overflow: hidden;
12326
12371
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
12327
- animation: ${({ $exiting }) => $exiting ? styled9.css`${slideOut} 0.28s cubic-bezier(0.4,0,1,1) forwards` : styled9.css`${slideIn} 0.32s cubic-bezier(0,0,0.2,1) forwards`};
12372
+ animation: ${({ $exiting }) => $exiting ? styled9.css`${slideOut2} 0.28s cubic-bezier(0.4,0,1,1) forwards` : styled9.css`${slideIn} 0.32s cubic-bezier(0,0,0.2,1) forwards`};
12328
12373
  pointer-events: all;
12329
12374
  `;
12330
12375
  var Body = styled9__default.default.div`
@@ -12588,22 +12633,22 @@ function OrderPanel({
12588
12633
  /* @__PURE__ */ jsxRuntime.jsx(CountdownLabel2, { children: "OFFERING OPENS IN" }),
12589
12634
  /* @__PURE__ */ jsxRuntime.jsxs(CountdownRow, { children: [
12590
12635
  /* @__PURE__ */ jsxRuntime.jsxs(CountdownUnit, { children: [
12591
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNum, { children: String(countdown.d).padStart(2, "0") }),
12636
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNum, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.d).padStart(2, "0") }) }),
12592
12637
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSuffix, { children: "D" })
12593
12638
  ] }),
12594
12639
  /* @__PURE__ */ jsxRuntime.jsx(CountdownColon, { children: ":" }),
12595
12640
  /* @__PURE__ */ jsxRuntime.jsxs(CountdownUnit, { children: [
12596
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNum, { children: String(countdown.h).padStart(2, "0") }),
12641
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNum, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.h).padStart(2, "0") }) }),
12597
12642
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSuffix, { children: "H" })
12598
12643
  ] }),
12599
12644
  /* @__PURE__ */ jsxRuntime.jsx(CountdownColon, { children: ":" }),
12600
12645
  /* @__PURE__ */ jsxRuntime.jsxs(CountdownUnit, { children: [
12601
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNum, { children: String(countdown.m).padStart(2, "0") }),
12646
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNum, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.m).padStart(2, "0") }) }),
12602
12647
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSuffix, { children: "M" })
12603
12648
  ] }),
12604
12649
  /* @__PURE__ */ jsxRuntime.jsx(CountdownColon, { children: ":" }),
12605
12650
  /* @__PURE__ */ jsxRuntime.jsxs(CountdownUnit, { children: [
12606
- /* @__PURE__ */ jsxRuntime.jsx(CountdownNum, { children: String(countdown.s).padStart(2, "0") }),
12651
+ /* @__PURE__ */ jsxRuntime.jsx(CountdownNum, { children: /* @__PURE__ */ jsxRuntime.jsx(SlideDigit, { value: String(countdown.s).padStart(2, "0") }) }),
12607
12652
  /* @__PURE__ */ jsxRuntime.jsx(CountdownSuffix, { children: "S" })
12608
12653
  ] })
12609
12654
  ] })