@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.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 h-4 w-4 rounded-full bg-destructive text-[10px] font-medium text-destructive-foreground flex items-center justify-center", children: notifications.count })
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(MoonUIDropdownMenuContentPro, { align: "end", className: "w-80", children: [
75487
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-4", children: [
75488
- /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold", children: "Notifications" }),
75489
- notifications.count && notifications.count > 0 && /* @__PURE__ */ jsxs(MoonUIBadgePro, { variant: "secondary", children: [
75490
- notifications.count,
75491
- " new"
75492
- ] })
75493
- ] }),
75494
- /* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
75495
- /* @__PURE__ */ jsx("div", { className: "max-h-[300px] overflow-y-auto", children: notifications.items && notifications.items.length > 0 ? notifications.items.map((notification) => /* @__PURE__ */ jsxs(
75496
- MoonUIDropdownMenuItemPro,
75497
- {
75498
- className: "flex flex-col items-start p-4 cursor-pointer",
75499
- onClick: () => notifications.onNotificationClick?.(notification.id),
75500
- children: [
75501
- /* @__PURE__ */ jsxs("div", { className: "flex w-full items-start justify-between", children: [
75502
- /* @__PURE__ */ jsx("p", { className: cn(
75503
- "text-sm font-medium",
75504
- !notification.read && "text-primary"
75505
- ), children: notification.title }),
75506
- !notification.read && /* @__PURE__ */ jsx("span", { className: "h-2 w-2 rounded-full bg-primary" })
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
- notification.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: notification.description }),
75509
- notification.time && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-2", children: notification.time })
75510
- ]
75511
- },
75512
- notification.id
75513
- )) : /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "No notifications" }) })
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.19",
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",