@prediktif/ui 0.1.25 → 0.1.26

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.
Files changed (3) hide show
  1. package/dist/index.js +154 -116
  2. package/dist/index.mjs +176 -138
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1403,7 +1403,7 @@ function isRouteActive(url, pathname) {
1403
1403
  if (cleanUrl === "/") return cleanPath === "/";
1404
1404
  return cleanPath === cleanUrl || cleanPath.startsWith(`${cleanUrl}/`);
1405
1405
  }
1406
- var AppSidebar = (0, import_react.memo)(function AppSidebar2({
1406
+ function AppSidebarInner({
1407
1407
  name = "",
1408
1408
  email = "",
1409
1409
  orgRole = "",
@@ -1412,7 +1412,6 @@ var AppSidebar = (0, import_react.memo)(function AppSidebar2({
1412
1412
  confirmDialog = false,
1413
1413
  headerDropdown = false,
1414
1414
  image,
1415
- defaultOpen = true,
1416
1415
  navMainItems,
1417
1416
  navSecondaryItems = [],
1418
1417
  organizations,
@@ -1420,11 +1419,19 @@ var AppSidebar = (0, import_react.memo)(function AppSidebar2({
1420
1419
  setActiveOrg,
1421
1420
  children
1422
1421
  }) {
1423
- const _isMobile = useIsMobile();
1424
1422
  const pathname = (0, import_navigation.usePathname)();
1423
+ const { setOpenMobile } = useSidebar();
1425
1424
  const segments = pathname ? pathname.split("/").filter(Boolean) : [];
1425
+ (0, import_react.useEffect)(() => {
1426
+ if (pathname) {
1427
+ setOpenMobile(false);
1428
+ }
1429
+ }, [pathname, setOpenMobile]);
1430
+ const handleLinkClick = () => {
1431
+ setOpenMobile(false);
1432
+ };
1426
1433
  const initials = name ? name.trim().split(" ").map((n) => n[0]).join("").substring(0, 2).toUpperCase() : "U";
1427
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarProvider, { defaultOpen, children: [
1434
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1428
1435
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Sidebar, { collapsible: "icon", children: [
1429
1436
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarHeader, { children: headerDropdown ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DropdownMenu, { children: [
1430
1437
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
@@ -1473,55 +1480,73 @@ var AppSidebar = (0, import_react.memo)(function AppSidebar2({
1473
1480
  ] })
1474
1481
  }
1475
1482
  )
1476
- ] }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuButton, { size: "lg", render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: "/" }), children: [
1477
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Command, { className: "size-4" }) }),
1478
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1479
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate font-medium", children: brand }),
1480
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate text-xs capitalize", children: orgRole })
1481
- ] })
1482
- ] }) }) }) }),
1483
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarContent, { children: [
1484
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarGroup, { children: [
1485
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroupLabel, { children: "Platform" }),
1486
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: navMainItems.map(({ title, url, icon, locked }) => {
1487
- const isActive = isRouteActive(url, pathname);
1488
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuItem, { children: [
1489
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1490
- SidebarMenuButton,
1491
- {
1492
- isActive,
1493
- tooltip: title,
1494
- render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: url }),
1495
- children: [
1496
- renderNavIcon(icon),
1497
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: title })
1498
- ]
1499
- }
1500
- ),
1501
- locked && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuBadge, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.LockIcon, { size: 12 }) })
1502
- ] }, title);
1503
- }) })
1504
- ] }),
1505
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroup, { className: "mt-auto", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroupContent, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: navSecondaryItems.map(({ title, url, icon, locked }) => {
1506
- const isActive = isRouteActive(url, pathname);
1507
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuItem, { children: [
1508
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1509
- SidebarMenuButton,
1510
- {
1511
- size: "sm",
1512
- isActive,
1513
- tooltip: title,
1514
- render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: url }),
1515
- children: [
1516
- renderNavIcon(icon),
1517
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: title })
1518
- ]
1519
- }
1520
- ),
1521
- locked && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuBadge, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.LockIcon, { size: 12 }) })
1522
- ] }, title);
1523
- }) }) }) })
1524
- ] }),
1483
+ ] }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1484
+ SidebarMenuButton,
1485
+ {
1486
+ size: "lg",
1487
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: "/", onClick: handleLinkClick }),
1488
+ children: [
1489
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Command, { className: "size-4" }) }),
1490
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1491
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate font-medium", children: brand }),
1492
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate text-xs capitalize", children: orgRole })
1493
+ ] })
1494
+ ]
1495
+ }
1496
+ ) }) }) }),
1497
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1498
+ SidebarContent,
1499
+ {
1500
+ onClick: (e) => {
1501
+ const target = e.target;
1502
+ if (target.closest("a")) {
1503
+ setOpenMobile(false);
1504
+ }
1505
+ },
1506
+ children: [
1507
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarGroup, { children: [
1508
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroupLabel, { children: "Platform" }),
1509
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: navMainItems.map(({ title, url, icon, locked }) => {
1510
+ const isActive = isRouteActive(url, pathname);
1511
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuItem, { children: [
1512
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1513
+ SidebarMenuButton,
1514
+ {
1515
+ isActive,
1516
+ tooltip: title,
1517
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: url, onClick: handleLinkClick }),
1518
+ children: [
1519
+ renderNavIcon(icon),
1520
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: title })
1521
+ ]
1522
+ }
1523
+ ),
1524
+ locked && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuBadge, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.LockIcon, { size: 12 }) })
1525
+ ] }, title);
1526
+ }) })
1527
+ ] }),
1528
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroup, { className: "mt-auto", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroupContent, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: navSecondaryItems.map(({ title, url, icon, locked }) => {
1529
+ const isActive = isRouteActive(url, pathname);
1530
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuItem, { children: [
1531
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1532
+ SidebarMenuButton,
1533
+ {
1534
+ size: "sm",
1535
+ isActive,
1536
+ tooltip: title,
1537
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: url, onClick: handleLinkClick }),
1538
+ children: [
1539
+ renderNavIcon(icon),
1540
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: title })
1541
+ ]
1542
+ }
1543
+ ),
1544
+ locked && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuBadge, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.LockIcon, { size: 12 }) })
1545
+ ] }, title);
1546
+ }) }) }) })
1547
+ ]
1548
+ }
1549
+ ),
1525
1550
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuItem, { children: confirmDialog ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AlertDialog, { children: [
1526
1551
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1527
1552
  AlertDialogTrigger,
@@ -1549,22 +1574,36 @@ var AppSidebar = (0, import_react.memo)(function AppSidebar2({
1549
1574
  AlertDialogAction,
1550
1575
  {
1551
1576
  nativeButton: false,
1552
- render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href, target: "_blank" }),
1577
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1578
+ import_link.default,
1579
+ {
1580
+ href,
1581
+ target: "_blank",
1582
+ onClick: handleLinkClick
1583
+ }
1584
+ ),
1553
1585
  children: "Continue"
1554
1586
  }
1555
1587
  )
1556
1588
  ] })
1557
1589
  ] })
1558
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuButton, { size: "lg", render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href }), children: [
1559
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Avatar, { children: [
1560
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarImage, { src: image || "", alt: name || "" }),
1561
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarFallback, { children: initials })
1562
- ] }),
1563
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1564
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate font-medium", children: name }),
1565
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: email })
1566
- ] })
1567
- ] }) }) }) }),
1590
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1591
+ SidebarMenuButton,
1592
+ {
1593
+ size: "lg",
1594
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href, onClick: handleLinkClick }),
1595
+ children: [
1596
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Avatar, { children: [
1597
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarImage, { src: image || "", alt: name || "" }),
1598
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarFallback, { children: initials })
1599
+ ] }),
1600
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1601
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate font-medium", children: name }),
1602
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: email })
1603
+ ] })
1604
+ ]
1605
+ }
1606
+ ) }) }) }),
1568
1607
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarRail, {})
1569
1608
  ] }),
1570
1609
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarInset, { children: [
@@ -1591,6 +1630,14 @@ var AppSidebar = (0, import_react.memo)(function AppSidebar2({
1591
1630
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "p-4 pt-0", children })
1592
1631
  ] })
1593
1632
  ] });
1633
+ }
1634
+ var AppSidebar = (0, import_react.memo)(function AppSidebar2(_a) {
1635
+ var _b = _a, {
1636
+ defaultOpen = true
1637
+ } = _b, props = __objRest(_b, [
1638
+ "defaultOpen"
1639
+ ]);
1640
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarProvider, { defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AppSidebarInner, __spreadValues({}, props)) });
1594
1641
  });
1595
1642
 
1596
1643
  // src/components/composed/columns/avatar-group-invitations.tsx
@@ -1598,14 +1645,14 @@ var import_react2 = require("react");
1598
1645
  var import_jsx_runtime13 = require("react/jsx-runtime");
1599
1646
  function getInitials(name, email) {
1600
1647
  const target = (name || email || "U").trim();
1601
- return target.split(/[\s.@]/).filter(Boolean).map((n) => n[0]).join("").slice(0, 2).toUpperCase();
1648
+ return target.split(/[\s.@]/).filter(Boolean).map((n) => n[0]).join("").slice(0, 1).toUpperCase();
1602
1649
  }
1603
1650
  var AvatarGroupInvitations = (0, import_react2.memo)(function AvatarGroupInvitations2({
1604
1651
  invitations,
1605
1652
  maxDisplay = 3,
1606
1653
  onlyPending = true,
1607
1654
  fallback = null,
1608
- size = "default",
1655
+ size = "sm",
1609
1656
  className
1610
1657
  }) {
1611
1658
  const list = invitations != null ? invitations : [];
@@ -1632,7 +1679,7 @@ var AvatarGroupInvitations = (0, import_react2.memo)(function AvatarGroupInvitat
1632
1679
  Avatar,
1633
1680
  {
1634
1681
  size,
1635
- className: "cursor-pointer border border-dashed border-primary/40",
1682
+ className: "border border-dashed border-primary/40",
1636
1683
  children: [
1637
1684
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1638
1685
  AvatarImage,
@@ -1641,7 +1688,7 @@ var AvatarGroupInvitations = (0, import_react2.memo)(function AvatarGroupInvitat
1641
1688
  alt: displayName
1642
1689
  }
1643
1690
  ),
1644
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarFallback, { className: "bg-muted text-xs", children: initials })
1691
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarFallback, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-[10px]", children: initials }) })
1645
1692
  ]
1646
1693
  }
1647
1694
  )
@@ -1660,7 +1707,7 @@ var AvatarGroupInvitations = (0, import_react2.memo)(function AvatarGroupInvitat
1660
1707
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1661
1708
  TooltipTrigger,
1662
1709
  {
1663
- render: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(AvatarGroupCount, { className: "cursor-pointer border border-dashed border-primary/40 font-mono", children: [
1710
+ render: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(AvatarGroupCount, { className: "border border-dashed border-primary/40 text-[10px]", children: [
1664
1711
  "+",
1665
1712
  remainingCount
1666
1713
  ] })
@@ -1696,7 +1743,7 @@ var AvatarGroupUsers = (0, import_react3.memo)(function AvatarGroupUsers2({
1696
1743
  maxDisplay = 3,
1697
1744
  fallback = null,
1698
1745
  className,
1699
- size = "default"
1746
+ size = "sm"
1700
1747
  }) {
1701
1748
  const list = users != null ? users : [];
1702
1749
  if (list.length === 0) {
@@ -1714,9 +1761,9 @@ var AvatarGroupUsers = (0, import_react3.memo)(function AvatarGroupUsers2({
1714
1761
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1715
1762
  TooltipTrigger,
1716
1763
  {
1717
- render: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Avatar, { size, className: "cursor-pointer", children: [
1764
+ render: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Avatar, { size, children: [
1718
1765
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarImage, { src: (_b = u.image) != null ? _b : void 0, alt: displayName }),
1719
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarFallback, { children: initials })
1766
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarFallback, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-[10px]", children: initials }) })
1720
1767
  ] })
1721
1768
  }
1722
1769
  ),
@@ -1727,7 +1774,7 @@ var AvatarGroupUsers = (0, import_react3.memo)(function AvatarGroupUsers2({
1727
1774
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1728
1775
  TooltipTrigger,
1729
1776
  {
1730
- render: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(AvatarGroupCount, { className: "cursor-pointer font-mono", children: [
1777
+ render: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(AvatarGroupCount, { className: "text-[10px]", children: [
1731
1778
  "+",
1732
1779
  remainingCount
1733
1780
  ] })
@@ -2042,7 +2089,7 @@ var MetadataProgress = (0, import_react10.memo)(function MetadataProgress2({
2042
2089
  fields = DEFAULT_METADATA_FIELDS,
2043
2090
  completedCount: propCompleted,
2044
2091
  totalCount: propTotal,
2045
- title = "Website Metadata",
2092
+ title = "Metadata",
2046
2093
  fallback = null,
2047
2094
  className
2048
2095
  }) {
@@ -2140,10 +2187,14 @@ var MetadataProgress = (0, import_react10.memo)(function MetadataProgress2({
2140
2187
  )
2141
2188
  }
2142
2189
  ),
2143
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TooltipContent, { className: "max-w-xs text-xs space-y-1.5 p-3", children: [
2144
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-between border-b pb-1", children: [
2145
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "font-semibold text-xs", children: title }),
2146
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "font-mono text-[11px] text-muted-foreground", children: [
2190
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TooltipContent, { className: "max-w-xs text-xs", children: completed === total ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { children: [
2191
+ "All ",
2192
+ total,
2193
+ " metadata fields completed"
2194
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-col gap-1 py-0.5", children: [
2195
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-between gap-4 font-medium text-xs", children: [
2196
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: title }),
2197
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "font-mono text-[11px] opacity-80", children: [
2147
2198
  completed,
2148
2199
  "/",
2149
2200
  total,
@@ -2152,15 +2203,12 @@ var MetadataProgress = (0, import_react10.memo)(function MetadataProgress2({
2152
2203
  "%)"
2153
2204
  ] })
2154
2205
  ] }),
2155
- missing.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "text-[11px] text-muted-foreground leading-relaxed", children: [
2156
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "text-amber-600 dark:text-amber-400 font-medium", children: [
2157
- "Missing:",
2158
- " "
2159
- ] }),
2160
- missing.slice(0, 4).join(", "),
2161
- missing.length > 4 ? ` +${missing.length - 4} more` : ""
2162
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-[11px] text-emerald-600 dark:text-emerald-400 font-medium", children: "All metadata fields completed!" })
2163
- ] })
2206
+ missing.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "text-[11px] opacity-80 leading-normal", children: [
2207
+ "Missing: ",
2208
+ missing.slice(0, 3).join(", "),
2209
+ missing.length > 3 ? ` +${missing.length - 3} more` : ""
2210
+ ] })
2211
+ ] }) })
2164
2212
  ] });
2165
2213
  });
2166
2214
  var MetadataStatus = MetadataProgress;
@@ -2492,16 +2540,18 @@ var import_jsx_runtime26 = require("react/jsx-runtime");
2492
2540
  var RunningStatus = (0, import_react14.memo)(function RunningStatus2({
2493
2541
  count = 0,
2494
2542
  isRunning,
2495
- accessTokens = 0,
2496
- refreshTokens = 0,
2497
- usersCount = 0,
2543
+ accessTokens,
2544
+ refreshTokens,
2545
+ usersCount,
2498
2546
  runningLabel = "Running",
2499
2547
  idleLabel = "Idle",
2500
- tooltipTitle = "Sessions & Active Tokens",
2548
+ tooltipTitle,
2501
2549
  className
2502
2550
  }) {
2503
2551
  const activeCount = count != null ? count : 0;
2504
2552
  const running = isRunning != null ? isRunning : activeCount > 0;
2553
+ const hasDetails = accessTokens != null && accessTokens > 0 || refreshTokens != null && refreshTokens > 0 || usersCount != null && usersCount > 0;
2554
+ const title = tooltipTitle != null ? tooltipTitle : `${activeCount} Active Token${activeCount === 1 ? "" : "s"}`;
2505
2555
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Tooltip, { children: [
2506
2556
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2507
2557
  TooltipTrigger,
@@ -2541,35 +2591,23 @@ var RunningStatus = (0, import_react14.memo)(function RunningStatus2({
2541
2591
  )
2542
2592
  }
2543
2593
  ),
2544
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TooltipContent, { className: "text-xs space-y-2 p-3 min-w-[200px]", children: [
2545
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between border-b pb-1.5", children: [
2546
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-semibold text-xs", children: tooltipTitle }),
2547
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2548
- "span",
2549
- {
2550
- className: (0, import_cn22.cn)(
2551
- "text-[10px] px-1.5 py-0.5 rounded font-medium",
2552
- running ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-muted text-muted-foreground"
2553
- ),
2554
- children: running ? "Active" : "Idle"
2555
- }
2556
- )
2557
- ] }),
2558
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-1 text-[11px]", children: [
2559
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between text-muted-foreground", children: [
2560
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Active Access Tokens:" }),
2561
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono font-medium text-foreground", children: accessTokens != null ? accessTokens : 0 })
2594
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TooltipContent, { className: "text-xs", children: running ? hasDetails ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-1 py-0.5", children: [
2595
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-medium text-xs", children: title }),
2596
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-0.5 text-[11px] opacity-80", children: [
2597
+ accessTokens != null && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
2598
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Access tokens" }),
2599
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono", children: accessTokens })
2562
2600
  ] }),
2563
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between text-muted-foreground", children: [
2564
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Active Refresh Tokens:" }),
2565
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono font-medium text-foreground", children: refreshTokens != null ? refreshTokens : 0 })
2601
+ refreshTokens != null && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
2602
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Refresh tokens" }),
2603
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono", children: refreshTokens })
2566
2604
  ] }),
2567
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between text-muted-foreground", children: [
2568
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Authorized Users:" }),
2569
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono font-medium text-foreground", children: usersCount != null ? usersCount : 0 })
2605
+ usersCount != null && usersCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
2606
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Authorized users" }),
2607
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono", children: usersCount })
2570
2608
  ] })
2571
2609
  ] })
2572
- ] })
2610
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: title }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "No active tokens" }) })
2573
2611
  ] });
2574
2612
  });
2575
2613
  var TokenActivity = RunningStatus;
package/dist/index.mjs CHANGED
@@ -35,7 +35,7 @@ var __objRest = (source, exclude) => {
35
35
  import { ChevronsUpDown, Command, LockIcon } from "lucide-react";
36
36
  import Link from "next/link";
37
37
  import { usePathname } from "next/navigation";
38
- import { memo } from "react";
38
+ import { memo, useEffect as useEffect3 } from "react";
39
39
 
40
40
  // src/components/ui/alert-dialog.tsx
41
41
  import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
@@ -1287,7 +1287,7 @@ function SidebarMenuBadge(_a) {
1287
1287
  }
1288
1288
 
1289
1289
  // src/components/composed/app-sidebar.tsx
1290
- import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1290
+ import { Fragment, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1291
1291
  function renderNavIcon(icon) {
1292
1292
  if (!icon) return null;
1293
1293
  if (typeof icon === "function" || typeof icon === "object" && icon !== null && "render" in icon) {
@@ -1312,7 +1312,7 @@ function isRouteActive(url, pathname) {
1312
1312
  if (cleanUrl === "/") return cleanPath === "/";
1313
1313
  return cleanPath === cleanUrl || cleanPath.startsWith(`${cleanUrl}/`);
1314
1314
  }
1315
- var AppSidebar = memo(function AppSidebar2({
1315
+ function AppSidebarInner({
1316
1316
  name = "",
1317
1317
  email = "",
1318
1318
  orgRole = "",
@@ -1321,7 +1321,6 @@ var AppSidebar = memo(function AppSidebar2({
1321
1321
  confirmDialog = false,
1322
1322
  headerDropdown = false,
1323
1323
  image,
1324
- defaultOpen = true,
1325
1324
  navMainItems,
1326
1325
  navSecondaryItems = [],
1327
1326
  organizations,
@@ -1329,11 +1328,19 @@ var AppSidebar = memo(function AppSidebar2({
1329
1328
  setActiveOrg,
1330
1329
  children
1331
1330
  }) {
1332
- const _isMobile = useIsMobile();
1333
1331
  const pathname = usePathname();
1332
+ const { setOpenMobile } = useSidebar();
1334
1333
  const segments = pathname ? pathname.split("/").filter(Boolean) : [];
1334
+ useEffect3(() => {
1335
+ if (pathname) {
1336
+ setOpenMobile(false);
1337
+ }
1338
+ }, [pathname, setOpenMobile]);
1339
+ const handleLinkClick = () => {
1340
+ setOpenMobile(false);
1341
+ };
1335
1342
  const initials = name ? name.trim().split(" ").map((n) => n[0]).join("").substring(0, 2).toUpperCase() : "U";
1336
- return /* @__PURE__ */ jsxs7(SidebarProvider, { defaultOpen, children: [
1343
+ return /* @__PURE__ */ jsxs7(Fragment, { children: [
1337
1344
  /* @__PURE__ */ jsxs7(Sidebar, { collapsible: "icon", children: [
1338
1345
  /* @__PURE__ */ jsx12(SidebarHeader, { children: headerDropdown ? /* @__PURE__ */ jsx12(SidebarMenu, { children: /* @__PURE__ */ jsx12(SidebarMenuItem, { children: /* @__PURE__ */ jsxs7(DropdownMenu, { children: [
1339
1346
  /* @__PURE__ */ jsx12(
@@ -1382,55 +1389,73 @@ var AppSidebar = memo(function AppSidebar2({
1382
1389
  ] })
1383
1390
  }
1384
1391
  )
1385
- ] }) }) }) : /* @__PURE__ */ jsx12(SidebarMenu, { children: /* @__PURE__ */ jsx12(SidebarMenuItem, { children: /* @__PURE__ */ jsxs7(SidebarMenuButton, { size: "lg", render: /* @__PURE__ */ jsx12(Link, { href: "/" }), children: [
1386
- /* @__PURE__ */ jsx12("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ jsx12(Command, { className: "size-4" }) }),
1387
- /* @__PURE__ */ jsxs7("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1388
- /* @__PURE__ */ jsx12("span", { className: "truncate font-medium", children: brand }),
1389
- /* @__PURE__ */ jsx12("span", { className: "truncate text-xs capitalize", children: orgRole })
1390
- ] })
1391
- ] }) }) }) }),
1392
- /* @__PURE__ */ jsxs7(SidebarContent, { children: [
1393
- /* @__PURE__ */ jsxs7(SidebarGroup, { children: [
1394
- /* @__PURE__ */ jsx12(SidebarGroupLabel, { children: "Platform" }),
1395
- /* @__PURE__ */ jsx12(SidebarMenu, { children: navMainItems.map(({ title, url, icon, locked }) => {
1396
- const isActive = isRouteActive(url, pathname);
1397
- return /* @__PURE__ */ jsxs7(SidebarMenuItem, { children: [
1398
- /* @__PURE__ */ jsxs7(
1399
- SidebarMenuButton,
1400
- {
1401
- isActive,
1402
- tooltip: title,
1403
- render: /* @__PURE__ */ jsx12(Link, { href: url }),
1404
- children: [
1405
- renderNavIcon(icon),
1406
- /* @__PURE__ */ jsx12("span", { children: title })
1407
- ]
1408
- }
1409
- ),
1410
- locked && /* @__PURE__ */ jsx12(SidebarMenuBadge, { children: /* @__PURE__ */ jsx12(LockIcon, { size: 12 }) })
1411
- ] }, title);
1412
- }) })
1413
- ] }),
1414
- /* @__PURE__ */ jsx12(SidebarGroup, { className: "mt-auto", children: /* @__PURE__ */ jsx12(SidebarGroupContent, { children: /* @__PURE__ */ jsx12(SidebarMenu, { children: navSecondaryItems.map(({ title, url, icon, locked }) => {
1415
- const isActive = isRouteActive(url, pathname);
1416
- return /* @__PURE__ */ jsxs7(SidebarMenuItem, { children: [
1417
- /* @__PURE__ */ jsxs7(
1418
- SidebarMenuButton,
1419
- {
1420
- size: "sm",
1421
- isActive,
1422
- tooltip: title,
1423
- render: /* @__PURE__ */ jsx12(Link, { href: url }),
1424
- children: [
1425
- renderNavIcon(icon),
1426
- /* @__PURE__ */ jsx12("span", { children: title })
1427
- ]
1428
- }
1429
- ),
1430
- locked && /* @__PURE__ */ jsx12(SidebarMenuBadge, { children: /* @__PURE__ */ jsx12(LockIcon, { size: 12 }) })
1431
- ] }, title);
1432
- }) }) }) })
1433
- ] }),
1392
+ ] }) }) }) : /* @__PURE__ */ jsx12(SidebarMenu, { children: /* @__PURE__ */ jsx12(SidebarMenuItem, { children: /* @__PURE__ */ jsxs7(
1393
+ SidebarMenuButton,
1394
+ {
1395
+ size: "lg",
1396
+ render: /* @__PURE__ */ jsx12(Link, { href: "/", onClick: handleLinkClick }),
1397
+ children: [
1398
+ /* @__PURE__ */ jsx12("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ jsx12(Command, { className: "size-4" }) }),
1399
+ /* @__PURE__ */ jsxs7("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1400
+ /* @__PURE__ */ jsx12("span", { className: "truncate font-medium", children: brand }),
1401
+ /* @__PURE__ */ jsx12("span", { className: "truncate text-xs capitalize", children: orgRole })
1402
+ ] })
1403
+ ]
1404
+ }
1405
+ ) }) }) }),
1406
+ /* @__PURE__ */ jsxs7(
1407
+ SidebarContent,
1408
+ {
1409
+ onClick: (e) => {
1410
+ const target = e.target;
1411
+ if (target.closest("a")) {
1412
+ setOpenMobile(false);
1413
+ }
1414
+ },
1415
+ children: [
1416
+ /* @__PURE__ */ jsxs7(SidebarGroup, { children: [
1417
+ /* @__PURE__ */ jsx12(SidebarGroupLabel, { children: "Platform" }),
1418
+ /* @__PURE__ */ jsx12(SidebarMenu, { children: navMainItems.map(({ title, url, icon, locked }) => {
1419
+ const isActive = isRouteActive(url, pathname);
1420
+ return /* @__PURE__ */ jsxs7(SidebarMenuItem, { children: [
1421
+ /* @__PURE__ */ jsxs7(
1422
+ SidebarMenuButton,
1423
+ {
1424
+ isActive,
1425
+ tooltip: title,
1426
+ render: /* @__PURE__ */ jsx12(Link, { href: url, onClick: handleLinkClick }),
1427
+ children: [
1428
+ renderNavIcon(icon),
1429
+ /* @__PURE__ */ jsx12("span", { children: title })
1430
+ ]
1431
+ }
1432
+ ),
1433
+ locked && /* @__PURE__ */ jsx12(SidebarMenuBadge, { children: /* @__PURE__ */ jsx12(LockIcon, { size: 12 }) })
1434
+ ] }, title);
1435
+ }) })
1436
+ ] }),
1437
+ /* @__PURE__ */ jsx12(SidebarGroup, { className: "mt-auto", children: /* @__PURE__ */ jsx12(SidebarGroupContent, { children: /* @__PURE__ */ jsx12(SidebarMenu, { children: navSecondaryItems.map(({ title, url, icon, locked }) => {
1438
+ const isActive = isRouteActive(url, pathname);
1439
+ return /* @__PURE__ */ jsxs7(SidebarMenuItem, { children: [
1440
+ /* @__PURE__ */ jsxs7(
1441
+ SidebarMenuButton,
1442
+ {
1443
+ size: "sm",
1444
+ isActive,
1445
+ tooltip: title,
1446
+ render: /* @__PURE__ */ jsx12(Link, { href: url, onClick: handleLinkClick }),
1447
+ children: [
1448
+ renderNavIcon(icon),
1449
+ /* @__PURE__ */ jsx12("span", { children: title })
1450
+ ]
1451
+ }
1452
+ ),
1453
+ locked && /* @__PURE__ */ jsx12(SidebarMenuBadge, { children: /* @__PURE__ */ jsx12(LockIcon, { size: 12 }) })
1454
+ ] }, title);
1455
+ }) }) }) })
1456
+ ]
1457
+ }
1458
+ ),
1434
1459
  /* @__PURE__ */ jsx12(SidebarFooter, { children: /* @__PURE__ */ jsx12(SidebarMenu, { children: /* @__PURE__ */ jsx12(SidebarMenuItem, { children: confirmDialog ? /* @__PURE__ */ jsxs7(AlertDialog, { children: [
1435
1460
  /* @__PURE__ */ jsx12(
1436
1461
  AlertDialogTrigger,
@@ -1458,22 +1483,36 @@ var AppSidebar = memo(function AppSidebar2({
1458
1483
  AlertDialogAction,
1459
1484
  {
1460
1485
  nativeButton: false,
1461
- render: /* @__PURE__ */ jsx12(Link, { href, target: "_blank" }),
1486
+ render: /* @__PURE__ */ jsx12(
1487
+ Link,
1488
+ {
1489
+ href,
1490
+ target: "_blank",
1491
+ onClick: handleLinkClick
1492
+ }
1493
+ ),
1462
1494
  children: "Continue"
1463
1495
  }
1464
1496
  )
1465
1497
  ] })
1466
1498
  ] })
1467
- ] }) : /* @__PURE__ */ jsxs7(SidebarMenuButton, { size: "lg", render: /* @__PURE__ */ jsx12(Link, { href }), children: [
1468
- /* @__PURE__ */ jsxs7(Avatar, { children: [
1469
- /* @__PURE__ */ jsx12(AvatarImage, { src: image || "", alt: name || "" }),
1470
- /* @__PURE__ */ jsx12(AvatarFallback, { children: initials })
1471
- ] }),
1472
- /* @__PURE__ */ jsxs7("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1473
- /* @__PURE__ */ jsx12("span", { className: "truncate font-medium", children: name }),
1474
- /* @__PURE__ */ jsx12("span", { className: "truncate text-xs text-muted-foreground", children: email })
1475
- ] })
1476
- ] }) }) }) }),
1499
+ ] }) : /* @__PURE__ */ jsxs7(
1500
+ SidebarMenuButton,
1501
+ {
1502
+ size: "lg",
1503
+ render: /* @__PURE__ */ jsx12(Link, { href, onClick: handleLinkClick }),
1504
+ children: [
1505
+ /* @__PURE__ */ jsxs7(Avatar, { children: [
1506
+ /* @__PURE__ */ jsx12(AvatarImage, { src: image || "", alt: name || "" }),
1507
+ /* @__PURE__ */ jsx12(AvatarFallback, { children: initials })
1508
+ ] }),
1509
+ /* @__PURE__ */ jsxs7("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1510
+ /* @__PURE__ */ jsx12("span", { className: "truncate font-medium", children: name }),
1511
+ /* @__PURE__ */ jsx12("span", { className: "truncate text-xs text-muted-foreground", children: email })
1512
+ ] })
1513
+ ]
1514
+ }
1515
+ ) }) }) }),
1477
1516
  /* @__PURE__ */ jsx12(SidebarRail, {})
1478
1517
  ] }),
1479
1518
  /* @__PURE__ */ jsxs7(SidebarInset, { children: [
@@ -1500,21 +1539,29 @@ var AppSidebar = memo(function AppSidebar2({
1500
1539
  /* @__PURE__ */ jsx12("div", { className: "p-4 pt-0", children })
1501
1540
  ] })
1502
1541
  ] });
1542
+ }
1543
+ var AppSidebar = memo(function AppSidebar2(_a) {
1544
+ var _b = _a, {
1545
+ defaultOpen = true
1546
+ } = _b, props = __objRest(_b, [
1547
+ "defaultOpen"
1548
+ ]);
1549
+ return /* @__PURE__ */ jsx12(SidebarProvider, { defaultOpen, children: /* @__PURE__ */ jsx12(AppSidebarInner, __spreadValues({}, props)) });
1503
1550
  });
1504
1551
 
1505
1552
  // src/components/composed/columns/avatar-group-invitations.tsx
1506
1553
  import { memo as memo2 } from "react";
1507
- import { Fragment, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
1554
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
1508
1555
  function getInitials(name, email) {
1509
1556
  const target = (name || email || "U").trim();
1510
- return target.split(/[\s.@]/).filter(Boolean).map((n) => n[0]).join("").slice(0, 2).toUpperCase();
1557
+ return target.split(/[\s.@]/).filter(Boolean).map((n) => n[0]).join("").slice(0, 1).toUpperCase();
1511
1558
  }
1512
1559
  var AvatarGroupInvitations = memo2(function AvatarGroupInvitations2({
1513
1560
  invitations,
1514
1561
  maxDisplay = 3,
1515
1562
  onlyPending = true,
1516
1563
  fallback = null,
1517
- size = "default",
1564
+ size = "sm",
1518
1565
  className
1519
1566
  }) {
1520
1567
  const list = invitations != null ? invitations : [];
@@ -1524,7 +1571,7 @@ var AvatarGroupInvitations = memo2(function AvatarGroupInvitations2({
1524
1571
  }) : list;
1525
1572
  if (targetInvites.length === 0) {
1526
1573
  if (!fallback) return null;
1527
- return /* @__PURE__ */ jsx13(Fragment, { children: fallback });
1574
+ return /* @__PURE__ */ jsx13(Fragment2, { children: fallback });
1528
1575
  }
1529
1576
  const visibleInvites = targetInvites.slice(0, maxDisplay);
1530
1577
  const remainingCount = targetInvites.length - visibleInvites.length;
@@ -1541,7 +1588,7 @@ var AvatarGroupInvitations = memo2(function AvatarGroupInvitations2({
1541
1588
  Avatar,
1542
1589
  {
1543
1590
  size,
1544
- className: "cursor-pointer border border-dashed border-primary/40",
1591
+ className: "border border-dashed border-primary/40",
1545
1592
  children: [
1546
1593
  /* @__PURE__ */ jsx13(
1547
1594
  AvatarImage,
@@ -1550,7 +1597,7 @@ var AvatarGroupInvitations = memo2(function AvatarGroupInvitations2({
1550
1597
  alt: displayName
1551
1598
  }
1552
1599
  ),
1553
- /* @__PURE__ */ jsx13(AvatarFallback, { className: "bg-muted text-xs", children: initials })
1600
+ /* @__PURE__ */ jsx13(AvatarFallback, { children: /* @__PURE__ */ jsx13("span", { className: "text-[10px]", children: initials }) })
1554
1601
  ]
1555
1602
  }
1556
1603
  )
@@ -1569,7 +1616,7 @@ var AvatarGroupInvitations = memo2(function AvatarGroupInvitations2({
1569
1616
  /* @__PURE__ */ jsx13(
1570
1617
  TooltipTrigger,
1571
1618
  {
1572
- render: /* @__PURE__ */ jsxs8(AvatarGroupCount, { className: "cursor-pointer border border-dashed border-primary/40 font-mono", children: [
1619
+ render: /* @__PURE__ */ jsxs8(AvatarGroupCount, { className: "border border-dashed border-primary/40 text-[10px]", children: [
1573
1620
  "+",
1574
1621
  remainingCount
1575
1622
  ] })
@@ -1595,7 +1642,7 @@ var OrganizationInvitations = AvatarGroupInvitations;
1595
1642
 
1596
1643
  // src/components/composed/columns/avatar-group-users.tsx
1597
1644
  import { memo as memo3 } from "react";
1598
- import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
1645
+ import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
1599
1646
  function getInitials2(name, email) {
1600
1647
  const target = (name || email || "U").trim();
1601
1648
  return target.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase();
@@ -1605,12 +1652,12 @@ var AvatarGroupUsers = memo3(function AvatarGroupUsers2({
1605
1652
  maxDisplay = 3,
1606
1653
  fallback = null,
1607
1654
  className,
1608
- size = "default"
1655
+ size = "sm"
1609
1656
  }) {
1610
1657
  const list = users != null ? users : [];
1611
1658
  if (list.length === 0) {
1612
1659
  if (!fallback) return null;
1613
- return /* @__PURE__ */ jsx14(Fragment2, { children: fallback });
1660
+ return /* @__PURE__ */ jsx14(Fragment3, { children: fallback });
1614
1661
  }
1615
1662
  const visibleUsers = list.slice(0, maxDisplay);
1616
1663
  const remainingCount = list.length - visibleUsers.length;
@@ -1623,9 +1670,9 @@ var AvatarGroupUsers = memo3(function AvatarGroupUsers2({
1623
1670
  /* @__PURE__ */ jsx14(
1624
1671
  TooltipTrigger,
1625
1672
  {
1626
- render: /* @__PURE__ */ jsxs9(Avatar, { size, className: "cursor-pointer", children: [
1673
+ render: /* @__PURE__ */ jsxs9(Avatar, { size, children: [
1627
1674
  /* @__PURE__ */ jsx14(AvatarImage, { src: (_b = u.image) != null ? _b : void 0, alt: displayName }),
1628
- /* @__PURE__ */ jsx14(AvatarFallback, { children: initials })
1675
+ /* @__PURE__ */ jsx14(AvatarFallback, { children: /* @__PURE__ */ jsx14("span", { className: "text-[10px]", children: initials }) })
1629
1676
  ] })
1630
1677
  }
1631
1678
  ),
@@ -1636,7 +1683,7 @@ var AvatarGroupUsers = memo3(function AvatarGroupUsers2({
1636
1683
  /* @__PURE__ */ jsx14(
1637
1684
  TooltipTrigger,
1638
1685
  {
1639
- render: /* @__PURE__ */ jsxs9(AvatarGroupCount, { className: "cursor-pointer font-mono", children: [
1686
+ render: /* @__PURE__ */ jsxs9(AvatarGroupCount, { className: "text-[10px]", children: [
1640
1687
  "+",
1641
1688
  remainingCount
1642
1689
  ] })
@@ -1698,7 +1745,7 @@ var createToastManager = ToastPrimitive.createToastManager;
1698
1745
  var useToastManager = ToastPrimitive.useToastManager;
1699
1746
 
1700
1747
  // src/components/composed/columns/copyable-code.tsx
1701
- import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1748
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1702
1749
  var CopyableCode = memo5(function CopyableCode2({
1703
1750
  value,
1704
1751
  label,
@@ -1737,7 +1784,7 @@ var CopyableCode = memo5(function CopyableCode2({
1737
1784
  );
1738
1785
  if (!value) {
1739
1786
  if (!fallback) return null;
1740
- return /* @__PURE__ */ jsx17(Fragment3, { children: fallback });
1787
+ return /* @__PURE__ */ jsx17(Fragment4, { children: fallback });
1741
1788
  }
1742
1789
  const tooltipText = copied ? "Copied!" : `Copy ${label || "value"}`;
1743
1790
  const copyButton = /* @__PURE__ */ jsx17(
@@ -1938,7 +1985,7 @@ var JoinedLabel = memo9(function JoinedLabel2({
1938
1985
  // src/components/composed/columns/metadata-progress.tsx
1939
1986
  import { cn as cn18 } from "cn";
1940
1987
  import { memo as memo10, useMemo as useMemo2 } from "react";
1941
- import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1988
+ import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1942
1989
  var DEFAULT_METADATA_FIELDS = [
1943
1990
  { key: "title", label: "Page Title" },
1944
1991
  { key: "description", label: "Meta Description" },
@@ -1958,7 +2005,7 @@ var MetadataProgress = memo10(function MetadataProgress2({
1958
2005
  fields = DEFAULT_METADATA_FIELDS,
1959
2006
  completedCount: propCompleted,
1960
2007
  totalCount: propTotal,
1961
- title = "Website Metadata",
2008
+ title = "Metadata",
1962
2009
  fallback = null,
1963
2010
  className
1964
2011
  }) {
@@ -2012,7 +2059,7 @@ var MetadataProgress = memo10(function MetadataProgress2({
2012
2059
  }, [metadata, fields, propCompleted, propTotal]);
2013
2060
  const { completed, total, percentage, missing } = stats;
2014
2061
  if (completed === 0 && fallback !== null) {
2015
- return /* @__PURE__ */ jsx22(Fragment4, { children: fallback });
2062
+ return /* @__PURE__ */ jsx22(Fragment5, { children: fallback });
2016
2063
  }
2017
2064
  return /* @__PURE__ */ jsxs15(Tooltip, { children: [
2018
2065
  /* @__PURE__ */ jsx22(
@@ -2056,10 +2103,14 @@ var MetadataProgress = memo10(function MetadataProgress2({
2056
2103
  )
2057
2104
  }
2058
2105
  ),
2059
- /* @__PURE__ */ jsxs15(TooltipContent, { className: "max-w-xs text-xs space-y-1.5 p-3", children: [
2060
- /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between border-b pb-1", children: [
2061
- /* @__PURE__ */ jsx22("p", { className: "font-semibold text-xs", children: title }),
2062
- /* @__PURE__ */ jsxs15("span", { className: "font-mono text-[11px] text-muted-foreground", children: [
2106
+ /* @__PURE__ */ jsx22(TooltipContent, { className: "max-w-xs text-xs", children: completed === total ? /* @__PURE__ */ jsxs15("span", { children: [
2107
+ "All ",
2108
+ total,
2109
+ " metadata fields completed"
2110
+ ] }) : /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-1 py-0.5", children: [
2111
+ /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between gap-4 font-medium text-xs", children: [
2112
+ /* @__PURE__ */ jsx22("span", { children: title }),
2113
+ /* @__PURE__ */ jsxs15("span", { className: "font-mono text-[11px] opacity-80", children: [
2063
2114
  completed,
2064
2115
  "/",
2065
2116
  total,
@@ -2068,15 +2119,12 @@ var MetadataProgress = memo10(function MetadataProgress2({
2068
2119
  "%)"
2069
2120
  ] })
2070
2121
  ] }),
2071
- missing.length > 0 ? /* @__PURE__ */ jsxs15("p", { className: "text-[11px] text-muted-foreground leading-relaxed", children: [
2072
- /* @__PURE__ */ jsxs15("span", { className: "text-amber-600 dark:text-amber-400 font-medium", children: [
2073
- "Missing:",
2074
- " "
2075
- ] }),
2076
- missing.slice(0, 4).join(", "),
2077
- missing.length > 4 ? ` +${missing.length - 4} more` : ""
2078
- ] }) : /* @__PURE__ */ jsx22("p", { className: "text-[11px] text-emerald-600 dark:text-emerald-400 font-medium", children: "All metadata fields completed!" })
2079
- ] })
2122
+ missing.length > 0 && /* @__PURE__ */ jsxs15("p", { className: "text-[11px] opacity-80 leading-normal", children: [
2123
+ "Missing: ",
2124
+ missing.slice(0, 3).join(", "),
2125
+ missing.length > 3 ? ` +${missing.length - 3} more` : ""
2126
+ ] })
2127
+ ] }) })
2080
2128
  ] });
2081
2129
  });
2082
2130
  var MetadataStatus = MetadataProgress;
@@ -2359,7 +2407,7 @@ var PermissionsBadges = PermissionBadges;
2359
2407
  // src/components/composed/columns/redirect-uris.tsx
2360
2408
  import { cn as cn21 } from "cn";
2361
2409
  import { memo as memo13, useMemo as useMemo3 } from "react";
2362
- import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
2410
+ import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
2363
2411
  var RedirectUris = memo13(function RedirectUris2({
2364
2412
  uris,
2365
2413
  maxDisplay = 1,
@@ -2374,7 +2422,7 @@ var RedirectUris = memo13(function RedirectUris2({
2374
2422
  }, [uris]);
2375
2423
  if (list.length === 0) {
2376
2424
  if (!fallback) return null;
2377
- return /* @__PURE__ */ jsx25(Fragment5, { children: fallback });
2425
+ return /* @__PURE__ */ jsx25(Fragment6, { children: fallback });
2378
2426
  }
2379
2427
  const primaryUri = list[0];
2380
2428
  const remainingCount = list.length - maxDisplay;
@@ -2415,16 +2463,18 @@ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
2415
2463
  var RunningStatus = memo14(function RunningStatus2({
2416
2464
  count = 0,
2417
2465
  isRunning,
2418
- accessTokens = 0,
2419
- refreshTokens = 0,
2420
- usersCount = 0,
2466
+ accessTokens,
2467
+ refreshTokens,
2468
+ usersCount,
2421
2469
  runningLabel = "Running",
2422
2470
  idleLabel = "Idle",
2423
- tooltipTitle = "Sessions & Active Tokens",
2471
+ tooltipTitle,
2424
2472
  className
2425
2473
  }) {
2426
2474
  const activeCount = count != null ? count : 0;
2427
2475
  const running = isRunning != null ? isRunning : activeCount > 0;
2476
+ const hasDetails = accessTokens != null && accessTokens > 0 || refreshTokens != null && refreshTokens > 0 || usersCount != null && usersCount > 0;
2477
+ const title = tooltipTitle != null ? tooltipTitle : `${activeCount} Active Token${activeCount === 1 ? "" : "s"}`;
2428
2478
  return /* @__PURE__ */ jsxs19(Tooltip, { children: [
2429
2479
  /* @__PURE__ */ jsx26(
2430
2480
  TooltipTrigger,
@@ -2464,35 +2514,23 @@ var RunningStatus = memo14(function RunningStatus2({
2464
2514
  )
2465
2515
  }
2466
2516
  ),
2467
- /* @__PURE__ */ jsxs19(TooltipContent, { className: "text-xs space-y-2 p-3 min-w-[200px]", children: [
2468
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between border-b pb-1.5", children: [
2469
- /* @__PURE__ */ jsx26("span", { className: "font-semibold text-xs", children: tooltipTitle }),
2470
- /* @__PURE__ */ jsx26(
2471
- "span",
2472
- {
2473
- className: cn22(
2474
- "text-[10px] px-1.5 py-0.5 rounded font-medium",
2475
- running ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-muted text-muted-foreground"
2476
- ),
2477
- children: running ? "Active" : "Idle"
2478
- }
2479
- )
2480
- ] }),
2481
- /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1 text-[11px]", children: [
2482
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between text-muted-foreground", children: [
2483
- /* @__PURE__ */ jsx26("span", { children: "Active Access Tokens:" }),
2484
- /* @__PURE__ */ jsx26("span", { className: "font-mono font-medium text-foreground", children: accessTokens != null ? accessTokens : 0 })
2517
+ /* @__PURE__ */ jsx26(TooltipContent, { className: "text-xs", children: running ? hasDetails ? /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1 py-0.5", children: [
2518
+ /* @__PURE__ */ jsx26("span", { className: "font-medium text-xs", children: title }),
2519
+ /* @__PURE__ */ jsxs19("div", { className: "space-y-0.5 text-[11px] opacity-80", children: [
2520
+ accessTokens != null && /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between gap-4", children: [
2521
+ /* @__PURE__ */ jsx26("span", { children: "Access tokens" }),
2522
+ /* @__PURE__ */ jsx26("span", { className: "font-mono", children: accessTokens })
2485
2523
  ] }),
2486
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between text-muted-foreground", children: [
2487
- /* @__PURE__ */ jsx26("span", { children: "Active Refresh Tokens:" }),
2488
- /* @__PURE__ */ jsx26("span", { className: "font-mono font-medium text-foreground", children: refreshTokens != null ? refreshTokens : 0 })
2524
+ refreshTokens != null && /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between gap-4", children: [
2525
+ /* @__PURE__ */ jsx26("span", { children: "Refresh tokens" }),
2526
+ /* @__PURE__ */ jsx26("span", { className: "font-mono", children: refreshTokens })
2489
2527
  ] }),
2490
- /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between text-muted-foreground", children: [
2491
- /* @__PURE__ */ jsx26("span", { children: "Authorized Users:" }),
2492
- /* @__PURE__ */ jsx26("span", { className: "font-mono font-medium text-foreground", children: usersCount != null ? usersCount : 0 })
2528
+ usersCount != null && usersCount > 0 && /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between gap-4", children: [
2529
+ /* @__PURE__ */ jsx26("span", { children: "Authorized users" }),
2530
+ /* @__PURE__ */ jsx26("span", { className: "font-mono", children: usersCount })
2493
2531
  ] })
2494
2532
  ] })
2495
- ] })
2533
+ ] }) : /* @__PURE__ */ jsx26("span", { children: title }) : /* @__PURE__ */ jsx26("span", { children: "No active tokens" }) })
2496
2534
  ] });
2497
2535
  });
2498
2536
  var TokenActivity = RunningStatus;
@@ -3064,12 +3102,12 @@ function DataTableFooterPagination({
3064
3102
 
3065
3103
  // src/components/composed/data-table/table-header-add.tsx
3066
3104
  import { PlusIcon } from "lucide-react";
3067
- import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
3105
+ import { Fragment as Fragment7, jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
3068
3106
  function DataTableHeaderAdd({
3069
3107
  onAdd,
3070
3108
  addLabel
3071
3109
  }) {
3072
- return /* @__PURE__ */ jsxs25(Fragment6, { children: [
3110
+ return /* @__PURE__ */ jsxs25(Fragment7, { children: [
3073
3111
  /* @__PURE__ */ jsxs25(Tooltip, { children: [
3074
3112
  /* @__PURE__ */ jsx36(
3075
3113
  TooltipTrigger,
@@ -3787,7 +3825,7 @@ function SelectScrollDownButton(_a) {
3787
3825
  }
3788
3826
 
3789
3827
  // src/components/composed/data-table/table-header-filter.tsx
3790
- import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
3828
+ import { Fragment as Fragment8, jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
3791
3829
  function smartFilterFn(row, columnId, filterValue) {
3792
3830
  var _a, _b, _c;
3793
3831
  if (filterValue === void 0 || filterValue === null || filterValue === "" || filterValue === "all") {
@@ -4129,7 +4167,7 @@ function DataTableHeaderFilter({
4129
4167
  column.id
4130
4168
  );
4131
4169
  }) }),
4132
- columnFilters.length > 0 && /* @__PURE__ */ jsxs28(Fragment7, { children: [
4170
+ columnFilters.length > 0 && /* @__PURE__ */ jsxs28(Fragment8, { children: [
4133
4171
  /* @__PURE__ */ jsx41(DropdownMenuSeparator, {}),
4134
4172
  /* @__PURE__ */ jsx41(
4135
4173
  DropdownMenuItem,
@@ -4219,7 +4257,7 @@ function DataTableHeaderSearch({
4219
4257
 
4220
4258
  // src/components/composed/data-table/table-header-sort.tsx
4221
4259
  import { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from "lucide-react";
4222
- import { Fragment as Fragment8, jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
4260
+ import { Fragment as Fragment9, jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
4223
4261
  function DataTableHeaderSort({
4224
4262
  table,
4225
4263
  sorting
@@ -4275,7 +4313,7 @@ function DataTableHeaderSort({
4275
4313
  column.id
4276
4314
  );
4277
4315
  }),
4278
- sorting.length > 0 && /* @__PURE__ */ jsxs31(Fragment8, { children: [
4316
+ sorting.length > 0 && /* @__PURE__ */ jsxs31(Fragment9, { children: [
4279
4317
  /* @__PURE__ */ jsx44(DropdownMenuSeparator, {}),
4280
4318
  /* @__PURE__ */ jsx44(
4281
4319
  DropdownMenuItem,
@@ -4335,8 +4373,8 @@ function DataTableHeaderToggle({
4335
4373
 
4336
4374
  // src/components/composed/data-table/data-row-actions.tsx
4337
4375
  import { MoreHorizontal } from "lucide-react";
4338
- import { Fragment as Fragment9 } from "react";
4339
- import { Fragment as Fragment10, jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
4376
+ import { Fragment as Fragment10 } from "react";
4377
+ import { Fragment as Fragment11, jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
4340
4378
  function RowActions({
4341
4379
  label = "Actions",
4342
4380
  items = [],
@@ -4367,7 +4405,7 @@ function RowActions({
4367
4405
  align,
4368
4406
  className: cn26("w-40", contentClassName),
4369
4407
  children: /* @__PURE__ */ jsxs33(DropdownMenuGroup, { children: [
4370
- label && /* @__PURE__ */ jsxs33(Fragment10, { children: [
4408
+ label && /* @__PURE__ */ jsxs33(Fragment11, { children: [
4371
4409
  /* @__PURE__ */ jsx46(DropdownMenuLabel, { children: label }),
4372
4410
  /* @__PURE__ */ jsx46(DropdownMenuSeparator, {})
4373
4411
  ] }),
@@ -4375,7 +4413,7 @@ function RowActions({
4375
4413
  var _a;
4376
4414
  const itemKey = (_a = item.id) != null ? _a : `${item.label}-${index}`;
4377
4415
  const isDestructive = item.variant === "destructive";
4378
- return /* @__PURE__ */ jsxs33(Fragment9, { children: [
4416
+ return /* @__PURE__ */ jsxs33(Fragment10, { children: [
4379
4417
  item.separatorBefore && /* @__PURE__ */ jsx46(DropdownMenuSeparator, {}),
4380
4418
  /* @__PURE__ */ jsxs33(
4381
4419
  DropdownMenuItem,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prediktif/ui",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",