@refinn/core-ui 0.1.18 → 0.1.19

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.cjs CHANGED
@@ -1485,19 +1485,23 @@ function useMountTransition(open, duration = 300) {
1485
1485
  (0, import_react13.useEffect)(() => {
1486
1486
  if (open) {
1487
1487
  setMounted(true);
1488
- let raf2 = 0;
1489
- const raf1 = requestAnimationFrame(() => {
1490
- raf2 = requestAnimationFrame(() => setAnimate(true));
1491
- });
1492
- return () => {
1493
- cancelAnimationFrame(raf1);
1494
- cancelAnimationFrame(raf2);
1495
- };
1488
+ return;
1496
1489
  }
1497
1490
  setAnimate(false);
1498
1491
  const timer = setTimeout(() => setMounted(false), duration);
1499
1492
  return () => clearTimeout(timer);
1500
1493
  }, [open, duration]);
1494
+ (0, import_react13.useEffect)(() => {
1495
+ if (!open || !mounted) return;
1496
+ let raf2 = 0;
1497
+ const raf1 = requestAnimationFrame(() => {
1498
+ raf2 = requestAnimationFrame(() => setAnimate(true));
1499
+ });
1500
+ return () => {
1501
+ cancelAnimationFrame(raf1);
1502
+ cancelAnimationFrame(raf2);
1503
+ };
1504
+ }, [open, mounted]);
1501
1505
  return { mounted, animate };
1502
1506
  }
1503
1507
  function DialogAction({
@@ -1679,19 +1683,23 @@ function useMountTransition2(open, duration = 300) {
1679
1683
  (0, import_react14.useEffect)(() => {
1680
1684
  if (open) {
1681
1685
  setMounted(true);
1682
- let raf2 = 0;
1683
- const raf1 = requestAnimationFrame(() => {
1684
- raf2 = requestAnimationFrame(() => setAnimate(true));
1685
- });
1686
- return () => {
1687
- cancelAnimationFrame(raf1);
1688
- cancelAnimationFrame(raf2);
1689
- };
1686
+ return;
1690
1687
  }
1691
1688
  setAnimate(false);
1692
1689
  const timer = setTimeout(() => setMounted(false), duration);
1693
1690
  return () => clearTimeout(timer);
1694
1691
  }, [open, duration]);
1692
+ (0, import_react14.useEffect)(() => {
1693
+ if (!open || !mounted) return;
1694
+ let raf2 = 0;
1695
+ const raf1 = requestAnimationFrame(() => {
1696
+ raf2 = requestAnimationFrame(() => setAnimate(true));
1697
+ });
1698
+ return () => {
1699
+ cancelAnimationFrame(raf1);
1700
+ cancelAnimationFrame(raf2);
1701
+ };
1702
+ }, [open, mounted]);
1695
1703
  return { mounted, animate };
1696
1704
  }
1697
1705
  function DrawerAction({
package/dist/index.js CHANGED
@@ -1467,19 +1467,23 @@ function useMountTransition(open, duration = 300) {
1467
1467
  useEffect2(() => {
1468
1468
  if (open) {
1469
1469
  setMounted(true);
1470
- let raf2 = 0;
1471
- const raf1 = requestAnimationFrame(() => {
1472
- raf2 = requestAnimationFrame(() => setAnimate(true));
1473
- });
1474
- return () => {
1475
- cancelAnimationFrame(raf1);
1476
- cancelAnimationFrame(raf2);
1477
- };
1470
+ return;
1478
1471
  }
1479
1472
  setAnimate(false);
1480
1473
  const timer = setTimeout(() => setMounted(false), duration);
1481
1474
  return () => clearTimeout(timer);
1482
1475
  }, [open, duration]);
1476
+ useEffect2(() => {
1477
+ if (!open || !mounted) return;
1478
+ let raf2 = 0;
1479
+ const raf1 = requestAnimationFrame(() => {
1480
+ raf2 = requestAnimationFrame(() => setAnimate(true));
1481
+ });
1482
+ return () => {
1483
+ cancelAnimationFrame(raf1);
1484
+ cancelAnimationFrame(raf2);
1485
+ };
1486
+ }, [open, mounted]);
1483
1487
  return { mounted, animate };
1484
1488
  }
1485
1489
  function DialogAction({
@@ -1665,19 +1669,23 @@ function useMountTransition2(open, duration = 300) {
1665
1669
  useEffect3(() => {
1666
1670
  if (open) {
1667
1671
  setMounted(true);
1668
- let raf2 = 0;
1669
- const raf1 = requestAnimationFrame(() => {
1670
- raf2 = requestAnimationFrame(() => setAnimate(true));
1671
- });
1672
- return () => {
1673
- cancelAnimationFrame(raf1);
1674
- cancelAnimationFrame(raf2);
1675
- };
1672
+ return;
1676
1673
  }
1677
1674
  setAnimate(false);
1678
1675
  const timer = setTimeout(() => setMounted(false), duration);
1679
1676
  return () => clearTimeout(timer);
1680
1677
  }, [open, duration]);
1678
+ useEffect3(() => {
1679
+ if (!open || !mounted) return;
1680
+ let raf2 = 0;
1681
+ const raf1 = requestAnimationFrame(() => {
1682
+ raf2 = requestAnimationFrame(() => setAnimate(true));
1683
+ });
1684
+ return () => {
1685
+ cancelAnimationFrame(raf1);
1686
+ cancelAnimationFrame(raf2);
1687
+ };
1688
+ }, [open, mounted]);
1681
1689
  return { mounted, animate };
1682
1690
  }
1683
1691
  function DrawerAction({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinn/core-ui",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Refinn Design System — UI components + Tailwind v4 theme preset",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",