@moontra/moonui-pro 2.25.19 → 2.25.20
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.global.js +60 -60
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +83 -29
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -75481,37 +75481,91 @@ function NavbarInternal({
|
|
|
75481
75481
|
notifications && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
75482
75482
|
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "icon", className: "relative", children: [
|
|
75483
75483
|
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
|
|
75484
|
-
notifications.count && notifications.count > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1
|
|
75484
|
+
notifications.count && notifications.count > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1", children: notifications.count > 9 ? "9+" : notifications.count })
|
|
75485
75485
|
] }) }),
|
|
75486
|
-
/* @__PURE__ */ jsxs(
|
|
75487
|
-
|
|
75488
|
-
|
|
75489
|
-
|
|
75490
|
-
|
|
75491
|
-
|
|
75492
|
-
|
|
75493
|
-
|
|
75494
|
-
|
|
75495
|
-
|
|
75496
|
-
|
|
75497
|
-
|
|
75498
|
-
|
|
75499
|
-
|
|
75500
|
-
|
|
75501
|
-
|
|
75502
|
-
|
|
75503
|
-
|
|
75504
|
-
|
|
75505
|
-
|
|
75506
|
-
|
|
75486
|
+
/* @__PURE__ */ jsxs(
|
|
75487
|
+
MoonUIDropdownMenuContentPro,
|
|
75488
|
+
{
|
|
75489
|
+
align: "end",
|
|
75490
|
+
className: "w-[380px] p-0",
|
|
75491
|
+
sideOffset: 8,
|
|
75492
|
+
children: [
|
|
75493
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b", children: [
|
|
75494
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
75495
|
+
/* @__PURE__ */ jsx("h4", { className: "text-base font-semibold", children: "Notifications" }),
|
|
75496
|
+
notifications.count && notifications.count > 0 && /* @__PURE__ */ jsxs(
|
|
75497
|
+
MoonUIBadgePro,
|
|
75498
|
+
{
|
|
75499
|
+
variant: "secondary",
|
|
75500
|
+
className: "h-5 px-2 rounded-full bg-primary/10 text-primary border-0",
|
|
75501
|
+
children: [
|
|
75502
|
+
notifications.count,
|
|
75503
|
+
" new"
|
|
75504
|
+
]
|
|
75505
|
+
}
|
|
75506
|
+
)
|
|
75507
75507
|
] }),
|
|
75508
|
-
|
|
75509
|
-
|
|
75510
|
-
|
|
75511
|
-
|
|
75512
|
-
|
|
75513
|
-
|
|
75514
|
-
|
|
75508
|
+
notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx(
|
|
75509
|
+
MoonUIButtonPro,
|
|
75510
|
+
{
|
|
75511
|
+
variant: "ghost",
|
|
75512
|
+
size: "sm",
|
|
75513
|
+
className: "text-xs h-7 px-2 text-muted-foreground hover:text-foreground",
|
|
75514
|
+
onClick: (e) => {
|
|
75515
|
+
e.preventDefault();
|
|
75516
|
+
console.log("Mark all as read");
|
|
75517
|
+
},
|
|
75518
|
+
children: "Mark all read"
|
|
75519
|
+
}
|
|
75520
|
+
)
|
|
75521
|
+
] }),
|
|
75522
|
+
/* @__PURE__ */ jsx("div", { className: "max-h-[400px] overflow-y-auto", children: notifications.items && notifications.items.length > 0 ? /* @__PURE__ */ jsx("div", { className: "py-1", children: notifications.items.map((notification, index2) => /* @__PURE__ */ jsxs("div", { children: [
|
|
75523
|
+
/* @__PURE__ */ jsx(
|
|
75524
|
+
"button",
|
|
75525
|
+
{
|
|
75526
|
+
className: cn(
|
|
75527
|
+
"w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors",
|
|
75528
|
+
"focus:outline-none focus:bg-muted/50",
|
|
75529
|
+
!notification.read && "bg-primary/5 hover:bg-primary/10"
|
|
75530
|
+
),
|
|
75531
|
+
onClick: () => notifications.onNotificationClick?.(notification.id),
|
|
75532
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
75533
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx("div", { className: cn(
|
|
75534
|
+
"h-2 w-2 rounded-full",
|
|
75535
|
+
!notification.read ? "bg-primary" : "bg-transparent"
|
|
75536
|
+
) }) }),
|
|
75537
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
75538
|
+
/* @__PURE__ */ jsx("p", { className: cn(
|
|
75539
|
+
"text-sm leading-tight",
|
|
75540
|
+
!notification.read ? "font-medium" : "font-normal"
|
|
75541
|
+
), children: notification.title }),
|
|
75542
|
+
notification.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: notification.description }),
|
|
75543
|
+
notification.time && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: notification.time })
|
|
75544
|
+
] })
|
|
75545
|
+
] })
|
|
75546
|
+
}
|
|
75547
|
+
),
|
|
75548
|
+
index2 < (notifications.items?.length || 0) - 1 && /* @__PURE__ */ jsx("div", { className: "mx-4 border-b" })
|
|
75549
|
+
] }, notification.id)) }) : /* @__PURE__ */ jsxs("div", { className: "py-12 text-center", children: [
|
|
75550
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-10 w-10 mx-auto text-muted-foreground/30 mb-3" }),
|
|
75551
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: "No new notifications" }),
|
|
75552
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: "You're all caught up!" })
|
|
75553
|
+
] }) }),
|
|
75554
|
+
notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-t p-2", children: /* @__PURE__ */ jsx(
|
|
75555
|
+
MoonUIButtonPro,
|
|
75556
|
+
{
|
|
75557
|
+
variant: "ghost",
|
|
75558
|
+
className: "w-full h-8 text-xs text-muted-foreground hover:text-foreground",
|
|
75559
|
+
onClick: (e) => {
|
|
75560
|
+
e.preventDefault();
|
|
75561
|
+
console.log("View all notifications");
|
|
75562
|
+
},
|
|
75563
|
+
children: "View all notifications"
|
|
75564
|
+
}
|
|
75565
|
+
) })
|
|
75566
|
+
]
|
|
75567
|
+
}
|
|
75568
|
+
)
|
|
75515
75569
|
] }),
|
|
75516
75570
|
cta && /* @__PURE__ */ jsx(
|
|
75517
75571
|
MoonUIButtonPro,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.20",
|
|
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",
|