@moontra/moonui-pro 3.4.13 → 3.4.14
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/cdn/index.global.js +90 -90
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.mjs +73 -125
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17375,24 +17375,6 @@ var FloatingDockInternal = React71__default.forwardRef(
|
|
|
17375
17375
|
}
|
|
17376
17376
|
};
|
|
17377
17377
|
}, [isMobileOpen, autoHideDelay, mobileMode, isMobile]);
|
|
17378
|
-
const slideVariants = {
|
|
17379
|
-
right: {
|
|
17380
|
-
hidden: { x: "calc(100% + 24px)", opacity: 0 },
|
|
17381
|
-
visible: { x: 0, opacity: 1 }
|
|
17382
|
-
},
|
|
17383
|
-
left: {
|
|
17384
|
-
hidden: { x: "calc(-100% - 24px)", opacity: 0 },
|
|
17385
|
-
visible: { x: 0, opacity: 1 }
|
|
17386
|
-
},
|
|
17387
|
-
bottom: {
|
|
17388
|
-
hidden: { y: "calc(100% + 24px)", opacity: 0 },
|
|
17389
|
-
visible: { y: 0, opacity: 1 }
|
|
17390
|
-
},
|
|
17391
|
-
top: {
|
|
17392
|
-
hidden: { y: "calc(-100% - 24px)", opacity: 0 },
|
|
17393
|
-
visible: { y: 0, opacity: 1 }
|
|
17394
|
-
}
|
|
17395
|
-
};
|
|
17396
17378
|
const getPositionClass = () => {
|
|
17397
17379
|
if (containerMode) {
|
|
17398
17380
|
switch (position) {
|
|
@@ -17422,35 +17404,6 @@ var FloatingDockInternal = React71__default.forwardRef(
|
|
|
17422
17404
|
}
|
|
17423
17405
|
}
|
|
17424
17406
|
};
|
|
17425
|
-
const getToggleButtonClass = () => {
|
|
17426
|
-
if (containerMode) {
|
|
17427
|
-
switch (position) {
|
|
17428
|
-
case "right":
|
|
17429
|
-
return "absolute right-2 top-1/2 -translate-y-1/2";
|
|
17430
|
-
case "left":
|
|
17431
|
-
return "absolute left-2 top-1/2 -translate-y-1/2";
|
|
17432
|
-
case "bottom":
|
|
17433
|
-
return "absolute bottom-2 left-1/2 -translate-x-1/2";
|
|
17434
|
-
case "top":
|
|
17435
|
-
return "absolute top-2 left-1/2 -translate-x-1/2";
|
|
17436
|
-
default:
|
|
17437
|
-
return "absolute right-2 top-1/2 -translate-y-1/2";
|
|
17438
|
-
}
|
|
17439
|
-
} else {
|
|
17440
|
-
switch (position) {
|
|
17441
|
-
case "right":
|
|
17442
|
-
return "fixed right-2 top-1/2 -translate-y-1/2";
|
|
17443
|
-
case "left":
|
|
17444
|
-
return "fixed left-2 top-1/2 -translate-y-1/2";
|
|
17445
|
-
case "bottom":
|
|
17446
|
-
return "fixed bottom-2 left-1/2 -translate-x-1/2";
|
|
17447
|
-
case "top":
|
|
17448
|
-
return "fixed top-2 left-1/2 -translate-x-1/2";
|
|
17449
|
-
default:
|
|
17450
|
-
return "fixed right-2 top-1/2 -translate-y-1/2";
|
|
17451
|
-
}
|
|
17452
|
-
}
|
|
17453
|
-
};
|
|
17454
17407
|
const getToggleIconRotation = () => {
|
|
17455
17408
|
if (!isMobileOpen) {
|
|
17456
17409
|
switch (position) {
|
|
@@ -17480,6 +17433,21 @@ var FloatingDockInternal = React71__default.forwardRef(
|
|
|
17480
17433
|
}
|
|
17481
17434
|
}
|
|
17482
17435
|
};
|
|
17436
|
+
const getSlideOffset = () => {
|
|
17437
|
+
const offset4 = "calc(100% + 56px)";
|
|
17438
|
+
switch (position) {
|
|
17439
|
+
case "right":
|
|
17440
|
+
return { x: offset4, y: 0 };
|
|
17441
|
+
case "left":
|
|
17442
|
+
return { x: `-${offset4}`, y: 0 };
|
|
17443
|
+
case "bottom":
|
|
17444
|
+
return { x: 0, y: offset4 };
|
|
17445
|
+
case "top":
|
|
17446
|
+
return { x: 0, y: `-${offset4}` };
|
|
17447
|
+
default:
|
|
17448
|
+
return { x: offset4, y: 0 };
|
|
17449
|
+
}
|
|
17450
|
+
};
|
|
17483
17451
|
if (!isMobile || mobileMode === "always") {
|
|
17484
17452
|
return /* @__PURE__ */ jsx(
|
|
17485
17453
|
motion.div,
|
|
@@ -17511,88 +17479,68 @@ var FloatingDockInternal = React71__default.forwardRef(
|
|
|
17511
17479
|
if (mobileMode === "hidden") {
|
|
17512
17480
|
return null;
|
|
17513
17481
|
}
|
|
17514
|
-
|
|
17515
|
-
|
|
17516
|
-
|
|
17517
|
-
|
|
17518
|
-
|
|
17519
|
-
|
|
17520
|
-
|
|
17521
|
-
|
|
17522
|
-
|
|
17523
|
-
|
|
17524
|
-
|
|
17525
|
-
|
|
17526
|
-
|
|
17527
|
-
|
|
17528
|
-
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
|
|
17534
|
-
|
|
17535
|
-
|
|
17536
|
-
|
|
17537
|
-
|
|
17538
|
-
|
|
17539
|
-
|
|
17540
|
-
|
|
17541
|
-
|
|
17542
|
-
|
|
17543
|
-
|
|
17544
|
-
|
|
17545
|
-
|
|
17546
|
-
|
|
17547
|
-
|
|
17548
|
-
|
|
17549
|
-
|
|
17550
|
-
|
|
17551
|
-
className: cn(
|
|
17552
|
-
"absolute p-2.5 rounded-full bg-background/95 backdrop-blur-md border border-border shadow-lg hover:shadow-xl transition-shadow",
|
|
17553
|
-
position === "right" && "-left-14 top-1/2 -translate-y-1/2",
|
|
17554
|
-
position === "left" && "-right-14 top-1/2 -translate-y-1/2",
|
|
17555
|
-
position === "bottom" && "left-1/2 -translate-x-1/2 -top-14",
|
|
17556
|
-
position === "top" && "left-1/2 -translate-x-1/2 -bottom-14"
|
|
17557
|
-
),
|
|
17558
|
-
onClick: () => setIsMobileOpen(!isMobileOpen),
|
|
17559
|
-
whileTap: { scale: 0.95 },
|
|
17560
|
-
children: /* @__PURE__ */ jsx(
|
|
17561
|
-
motion.div,
|
|
17562
|
-
{
|
|
17563
|
-
animate: { rotate: getToggleIconRotation() },
|
|
17564
|
-
transition: { duration: 0.3, ease: "easeOut" },
|
|
17565
|
-
children: toggleIcon || /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4" })
|
|
17566
|
-
}
|
|
17567
|
-
)
|
|
17568
|
-
}
|
|
17569
|
-
)
|
|
17570
|
-
] })
|
|
17571
|
-
}
|
|
17572
|
-
),
|
|
17573
|
-
!isMobileOpen && /* @__PURE__ */ jsx(
|
|
17574
|
-
motion.button,
|
|
17575
|
-
{
|
|
17576
|
-
className: cn(
|
|
17577
|
-
"z-[99999] p-2.5 rounded-full bg-background/95 backdrop-blur-md border border-border shadow-lg hover:shadow-xl transition-shadow",
|
|
17578
|
-
getToggleButtonClass()
|
|
17482
|
+
const slideOffset = getSlideOffset();
|
|
17483
|
+
return /* @__PURE__ */ jsx("div", { className: cn("z-[99999]", getPositionClass()), children: /* @__PURE__ */ jsxs(
|
|
17484
|
+
motion.div,
|
|
17485
|
+
{
|
|
17486
|
+
className: "relative",
|
|
17487
|
+
initial: false,
|
|
17488
|
+
animate: {
|
|
17489
|
+
x: isMobileOpen ? 0 : slideOffset.x,
|
|
17490
|
+
y: isMobileOpen ? 0 : slideOffset.y
|
|
17491
|
+
},
|
|
17492
|
+
transition: {
|
|
17493
|
+
duration: 0.35,
|
|
17494
|
+
ease: [0.4, 0, 0.2, 1]
|
|
17495
|
+
// cubic-bezier for smooth motion
|
|
17496
|
+
},
|
|
17497
|
+
children: [
|
|
17498
|
+
/* @__PURE__ */ jsx(
|
|
17499
|
+
motion.button,
|
|
17500
|
+
{
|
|
17501
|
+
className: cn(
|
|
17502
|
+
"absolute p-2.5 rounded-full bg-background/95 backdrop-blur-md border border-border shadow-lg hover:shadow-xl transition-shadow",
|
|
17503
|
+
position === "right" && "-left-14 top-1/2 -translate-y-1/2",
|
|
17504
|
+
position === "left" && "-right-14 top-1/2 -translate-y-1/2",
|
|
17505
|
+
position === "bottom" && "left-1/2 -translate-x-1/2 -top-14",
|
|
17506
|
+
position === "top" && "left-1/2 -translate-x-1/2 -bottom-14"
|
|
17507
|
+
),
|
|
17508
|
+
onClick: () => setIsMobileOpen(!isMobileOpen),
|
|
17509
|
+
whileTap: { scale: 0.95 },
|
|
17510
|
+
children: /* @__PURE__ */ jsx(
|
|
17511
|
+
motion.div,
|
|
17512
|
+
{
|
|
17513
|
+
animate: { rotate: getToggleIconRotation() },
|
|
17514
|
+
transition: { duration: 0.3, ease: "easeOut" },
|
|
17515
|
+
children: toggleIcon || /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4" })
|
|
17516
|
+
}
|
|
17517
|
+
)
|
|
17518
|
+
}
|
|
17579
17519
|
),
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
initial: { opacity: 0, scale: 0.8 },
|
|
17583
|
-
animate: { opacity: 1, scale: 1 },
|
|
17584
|
-
transition: { duration: 0.3 },
|
|
17585
|
-
children: /* @__PURE__ */ jsx(
|
|
17586
|
-
motion.div,
|
|
17520
|
+
/* @__PURE__ */ jsx(
|
|
17521
|
+
"div",
|
|
17587
17522
|
{
|
|
17588
|
-
|
|
17589
|
-
|
|
17590
|
-
|
|
17523
|
+
ref,
|
|
17524
|
+
className: cn(
|
|
17525
|
+
floatingDockVariants({ size: size4, position }),
|
|
17526
|
+
className
|
|
17527
|
+
),
|
|
17528
|
+
children: items.map((item) => /* @__PURE__ */ jsx(
|
|
17529
|
+
DockIcon,
|
|
17530
|
+
{
|
|
17531
|
+
item,
|
|
17532
|
+
size: size4 || "md",
|
|
17533
|
+
magnification,
|
|
17534
|
+
showTooltip,
|
|
17535
|
+
position: position || "bottom"
|
|
17536
|
+
},
|
|
17537
|
+
item.id
|
|
17538
|
+
))
|
|
17591
17539
|
}
|
|
17592
17540
|
)
|
|
17593
|
-
|
|
17594
|
-
|
|
17595
|
-
|
|
17541
|
+
]
|
|
17542
|
+
}
|
|
17543
|
+
) });
|
|
17596
17544
|
}
|
|
17597
17545
|
);
|
|
17598
17546
|
FloatingDockInternal.displayName = "FloatingDockInternal";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.14",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|