@prediktif/ui 0.1.24 → 0.1.25
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.d.mts +182 -3
- package/dist/index.d.ts +182 -3
- package/dist/index.js +1459 -414
- package/dist/index.mjs +1421 -383
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -304,6 +304,36 @@ function AvatarFallback(_a) {
|
|
|
304
304
|
}, props)
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
|
+
function AvatarGroup(_a) {
|
|
308
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
309
|
+
return /* @__PURE__ */ jsx3(
|
|
310
|
+
"div",
|
|
311
|
+
__spreadValues({
|
|
312
|
+
"data-slot": "avatar-group",
|
|
313
|
+
className: cn3(
|
|
314
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
315
|
+
className
|
|
316
|
+
)
|
|
317
|
+
}, props)
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
function AvatarGroupCount(_a) {
|
|
321
|
+
var _b = _a, {
|
|
322
|
+
className
|
|
323
|
+
} = _b, props = __objRest(_b, [
|
|
324
|
+
"className"
|
|
325
|
+
]);
|
|
326
|
+
return /* @__PURE__ */ jsx3(
|
|
327
|
+
"div",
|
|
328
|
+
__spreadValues({
|
|
329
|
+
"data-slot": "avatar-group-count",
|
|
330
|
+
className: cn3(
|
|
331
|
+
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs/relaxed text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
332
|
+
className
|
|
333
|
+
)
|
|
334
|
+
}, props)
|
|
335
|
+
);
|
|
336
|
+
}
|
|
307
337
|
|
|
308
338
|
// src/components/ui/breadcrumb.tsx
|
|
309
339
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
@@ -1472,44 +1502,326 @@ var AppSidebar = memo(function AppSidebar2({
|
|
|
1472
1502
|
] });
|
|
1473
1503
|
});
|
|
1474
1504
|
|
|
1475
|
-
// src/components/composed/columns/avatar-
|
|
1505
|
+
// src/components/composed/columns/avatar-group-invitations.tsx
|
|
1476
1506
|
import { memo as memo2 } from "react";
|
|
1477
|
-
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1478
|
-
function getInitials(name) {
|
|
1507
|
+
import { Fragment, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1508
|
+
function getInitials(name, email) {
|
|
1509
|
+
const target = (name || email || "U").trim();
|
|
1510
|
+
return target.split(/[\s.@]/).filter(Boolean).map((n) => n[0]).join("").slice(0, 2).toUpperCase();
|
|
1511
|
+
}
|
|
1512
|
+
var AvatarGroupInvitations = memo2(function AvatarGroupInvitations2({
|
|
1513
|
+
invitations,
|
|
1514
|
+
maxDisplay = 3,
|
|
1515
|
+
onlyPending = true,
|
|
1516
|
+
fallback = null,
|
|
1517
|
+
size = "default",
|
|
1518
|
+
className
|
|
1519
|
+
}) {
|
|
1520
|
+
const list = invitations != null ? invitations : [];
|
|
1521
|
+
const targetInvites = onlyPending ? list.filter((i) => {
|
|
1522
|
+
var _a;
|
|
1523
|
+
return ((_a = i.status) == null ? void 0 : _a.toLowerCase()) === "pending";
|
|
1524
|
+
}) : list;
|
|
1525
|
+
if (targetInvites.length === 0) {
|
|
1526
|
+
if (!fallback) return null;
|
|
1527
|
+
return /* @__PURE__ */ jsx13(Fragment, { children: fallback });
|
|
1528
|
+
}
|
|
1529
|
+
const visibleInvites = targetInvites.slice(0, maxDisplay);
|
|
1530
|
+
const remainingCount = targetInvites.length - visibleInvites.length;
|
|
1531
|
+
return /* @__PURE__ */ jsxs8(AvatarGroup, { className, children: [
|
|
1532
|
+
visibleInvites.map((inv, index) => {
|
|
1533
|
+
var _a, _b, _c, _d, _e;
|
|
1534
|
+
const displayName = ((_a = inv.invitedUser) == null ? void 0 : _a.name) || inv.email;
|
|
1535
|
+
const initials = getInitials((_b = inv.invitedUser) == null ? void 0 : _b.name, inv.email);
|
|
1536
|
+
return /* @__PURE__ */ jsxs8(Tooltip, { children: [
|
|
1537
|
+
/* @__PURE__ */ jsx13(
|
|
1538
|
+
TooltipTrigger,
|
|
1539
|
+
{
|
|
1540
|
+
render: /* @__PURE__ */ jsxs8(
|
|
1541
|
+
Avatar,
|
|
1542
|
+
{
|
|
1543
|
+
size,
|
|
1544
|
+
className: "cursor-pointer border border-dashed border-primary/40",
|
|
1545
|
+
children: [
|
|
1546
|
+
/* @__PURE__ */ jsx13(
|
|
1547
|
+
AvatarImage,
|
|
1548
|
+
{
|
|
1549
|
+
src: (_e = (_d = inv.invitedUser) == null ? void 0 : _d.image) != null ? _e : void 0,
|
|
1550
|
+
alt: displayName
|
|
1551
|
+
}
|
|
1552
|
+
),
|
|
1553
|
+
/* @__PURE__ */ jsx13(AvatarFallback, { className: "bg-muted text-xs", children: initials })
|
|
1554
|
+
]
|
|
1555
|
+
}
|
|
1556
|
+
)
|
|
1557
|
+
}
|
|
1558
|
+
),
|
|
1559
|
+
/* @__PURE__ */ jsxs8(TooltipContent, { children: [
|
|
1560
|
+
/* @__PURE__ */ jsx13("p", { className: "font-medium text-xs", children: displayName }),
|
|
1561
|
+
/* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground", children: [
|
|
1562
|
+
"Invited as ",
|
|
1563
|
+
/* @__PURE__ */ jsx13("span", { className: "capitalize", children: inv.role })
|
|
1564
|
+
] })
|
|
1565
|
+
] })
|
|
1566
|
+
] }, (_c = inv.id) != null ? _c : `${displayName}-${index}`);
|
|
1567
|
+
}),
|
|
1568
|
+
remainingCount > 0 && /* @__PURE__ */ jsxs8(Tooltip, { children: [
|
|
1569
|
+
/* @__PURE__ */ jsx13(
|
|
1570
|
+
TooltipTrigger,
|
|
1571
|
+
{
|
|
1572
|
+
render: /* @__PURE__ */ jsxs8(AvatarGroupCount, { className: "cursor-pointer border border-dashed border-primary/40 font-mono", children: [
|
|
1573
|
+
"+",
|
|
1574
|
+
remainingCount
|
|
1575
|
+
] })
|
|
1576
|
+
}
|
|
1577
|
+
),
|
|
1578
|
+
/* @__PURE__ */ jsx13(TooltipContent, { children: /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-0.5 text-xs", children: [
|
|
1579
|
+
/* @__PURE__ */ jsx13("p", { className: "font-semibold text-xs mb-0.5", children: onlyPending ? "Other Pending Invitations:" : "Other Invitations:" }),
|
|
1580
|
+
targetInvites.slice(maxDisplay).map((rem, idx) => {
|
|
1581
|
+
var _a, _b;
|
|
1582
|
+
return /* @__PURE__ */ jsxs8("span", { className: "text-xs", children: [
|
|
1583
|
+
((_b = rem.invitedUser) == null ? void 0 : _b.name) || rem.email,
|
|
1584
|
+
" (",
|
|
1585
|
+
rem.role,
|
|
1586
|
+
")"
|
|
1587
|
+
] }, (_a = rem.id) != null ? _a : `${rem.email}-${idx}`);
|
|
1588
|
+
})
|
|
1589
|
+
] }) })
|
|
1590
|
+
] })
|
|
1591
|
+
] });
|
|
1592
|
+
});
|
|
1593
|
+
var AvatarInvitations = AvatarGroupInvitations;
|
|
1594
|
+
var OrganizationInvitations = AvatarGroupInvitations;
|
|
1595
|
+
|
|
1596
|
+
// src/components/composed/columns/avatar-group-users.tsx
|
|
1597
|
+
import { memo as memo3 } from "react";
|
|
1598
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1599
|
+
function getInitials2(name, email) {
|
|
1600
|
+
const target = (name || email || "U").trim();
|
|
1601
|
+
return target.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase();
|
|
1602
|
+
}
|
|
1603
|
+
var AvatarGroupUsers = memo3(function AvatarGroupUsers2({
|
|
1604
|
+
users,
|
|
1605
|
+
maxDisplay = 3,
|
|
1606
|
+
fallback = null,
|
|
1607
|
+
className,
|
|
1608
|
+
size = "default"
|
|
1609
|
+
}) {
|
|
1610
|
+
const list = users != null ? users : [];
|
|
1611
|
+
if (list.length === 0) {
|
|
1612
|
+
if (!fallback) return null;
|
|
1613
|
+
return /* @__PURE__ */ jsx14(Fragment2, { children: fallback });
|
|
1614
|
+
}
|
|
1615
|
+
const visibleUsers = list.slice(0, maxDisplay);
|
|
1616
|
+
const remainingCount = list.length - visibleUsers.length;
|
|
1617
|
+
return /* @__PURE__ */ jsxs9(AvatarGroup, { className, children: [
|
|
1618
|
+
visibleUsers.map((u, index) => {
|
|
1619
|
+
var _a, _b;
|
|
1620
|
+
const initials = getInitials2(u.name, u.email);
|
|
1621
|
+
const displayName = u.name || u.email || "User";
|
|
1622
|
+
return /* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
1623
|
+
/* @__PURE__ */ jsx14(
|
|
1624
|
+
TooltipTrigger,
|
|
1625
|
+
{
|
|
1626
|
+
render: /* @__PURE__ */ jsxs9(Avatar, { size, className: "cursor-pointer", children: [
|
|
1627
|
+
/* @__PURE__ */ jsx14(AvatarImage, { src: (_b = u.image) != null ? _b : void 0, alt: displayName }),
|
|
1628
|
+
/* @__PURE__ */ jsx14(AvatarFallback, { children: initials })
|
|
1629
|
+
] })
|
|
1630
|
+
}
|
|
1631
|
+
),
|
|
1632
|
+
/* @__PURE__ */ jsx14(TooltipContent, { children: displayName })
|
|
1633
|
+
] }, (_a = u.id) != null ? _a : `${displayName}-${index}`);
|
|
1634
|
+
}),
|
|
1635
|
+
remainingCount > 0 && /* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
1636
|
+
/* @__PURE__ */ jsx14(
|
|
1637
|
+
TooltipTrigger,
|
|
1638
|
+
{
|
|
1639
|
+
render: /* @__PURE__ */ jsxs9(AvatarGroupCount, { className: "cursor-pointer font-mono", children: [
|
|
1640
|
+
"+",
|
|
1641
|
+
remainingCount
|
|
1642
|
+
] })
|
|
1643
|
+
}
|
|
1644
|
+
),
|
|
1645
|
+
/* @__PURE__ */ jsx14(TooltipContent, { children: /* @__PURE__ */ jsx14("div", { className: "flex flex-col gap-0.5 text-xs", children: list.slice(maxDisplay).map((rem, idx) => {
|
|
1646
|
+
var _a, _b;
|
|
1647
|
+
return /* @__PURE__ */ jsx14("span", { children: rem.name || rem.email }, (_b = rem.id) != null ? _b : `${(_a = rem.name) != null ? _a : rem.email}-${idx}`);
|
|
1648
|
+
}) }) })
|
|
1649
|
+
] })
|
|
1650
|
+
] });
|
|
1651
|
+
});
|
|
1652
|
+
var AvatarUsers = AvatarGroupUsers;
|
|
1653
|
+
|
|
1654
|
+
// src/components/composed/columns/avatar-user.tsx
|
|
1655
|
+
import { cn as cn12 } from "cn";
|
|
1656
|
+
import { memo as memo4 } from "react";
|
|
1657
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1658
|
+
function getInitials3(name) {
|
|
1479
1659
|
if (name) {
|
|
1480
1660
|
return name.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase();
|
|
1481
1661
|
}
|
|
1482
1662
|
return "U";
|
|
1483
1663
|
}
|
|
1484
|
-
var AvatarUser =
|
|
1664
|
+
var AvatarUser = memo4(function AvatarUser2({
|
|
1485
1665
|
name,
|
|
1486
|
-
image
|
|
1666
|
+
image,
|
|
1667
|
+
className,
|
|
1668
|
+
size = "sm"
|
|
1487
1669
|
}) {
|
|
1488
|
-
return /* @__PURE__ */
|
|
1489
|
-
/* @__PURE__ */
|
|
1490
|
-
/* @__PURE__ */
|
|
1491
|
-
/* @__PURE__ */
|
|
1670
|
+
return /* @__PURE__ */ jsxs10("div", { className: cn12("flex items-center gap-2", className), children: [
|
|
1671
|
+
/* @__PURE__ */ jsxs10(Avatar, { size, children: [
|
|
1672
|
+
/* @__PURE__ */ jsx15(AvatarImage, { src: image != null ? image : void 0, alt: name != null ? name : void 0 }),
|
|
1673
|
+
/* @__PURE__ */ jsx15(AvatarFallback, { children: getInitials3(name) })
|
|
1492
1674
|
] }),
|
|
1493
|
-
/* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ jsx15("p", { className: "text-xs font-medium truncate", children: name })
|
|
1676
|
+
] });
|
|
1677
|
+
});
|
|
1678
|
+
|
|
1679
|
+
// src/components/composed/columns/copyable-code.tsx
|
|
1680
|
+
import { cn as cn14 } from "cn";
|
|
1681
|
+
import { CheckIcon as CheckIcon2, CopyIcon } from "lucide-react";
|
|
1682
|
+
import { memo as memo5, useCallback as useCallback2, useState as useState3 } from "react";
|
|
1683
|
+
|
|
1684
|
+
// src/components/ui/toast.tsx
|
|
1685
|
+
import { Toast as ToastPrimitive } from "@base-ui/react/toast";
|
|
1686
|
+
import { cn as cn13 } from "cn";
|
|
1687
|
+
import {
|
|
1688
|
+
CircleCheckIcon,
|
|
1689
|
+
InfoIcon,
|
|
1690
|
+
Loader2Icon,
|
|
1691
|
+
OctagonXIcon,
|
|
1692
|
+
TriangleAlertIcon,
|
|
1693
|
+
XIcon as XIcon2
|
|
1694
|
+
} from "lucide-react";
|
|
1695
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1696
|
+
var toast = ToastPrimitive.createToastManager();
|
|
1697
|
+
var createToastManager = ToastPrimitive.createToastManager;
|
|
1698
|
+
var useToastManager = ToastPrimitive.useToastManager;
|
|
1699
|
+
|
|
1700
|
+
// src/components/composed/columns/copyable-code.tsx
|
|
1701
|
+
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1702
|
+
var CopyableCode = memo5(function CopyableCode2({
|
|
1703
|
+
value,
|
|
1704
|
+
label,
|
|
1705
|
+
copyMessage,
|
|
1706
|
+
toastOnCopy = true,
|
|
1707
|
+
showTooltip = true,
|
|
1708
|
+
fallback = null,
|
|
1709
|
+
className,
|
|
1710
|
+
codeClassName,
|
|
1711
|
+
onCopy
|
|
1712
|
+
}) {
|
|
1713
|
+
const [copied, setCopied] = useState3(false);
|
|
1714
|
+
const handleCopy = useCallback2(
|
|
1715
|
+
async (e) => {
|
|
1716
|
+
e.stopPropagation();
|
|
1717
|
+
if (!value) return;
|
|
1718
|
+
try {
|
|
1719
|
+
await navigator.clipboard.writeText(value);
|
|
1720
|
+
setCopied(true);
|
|
1721
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
1722
|
+
} catch (err) {
|
|
1723
|
+
console.error("Failed to copy to clipboard:", err);
|
|
1724
|
+
}
|
|
1725
|
+
if (onCopy) {
|
|
1726
|
+
onCopy(value);
|
|
1727
|
+
} else if (toastOnCopy) {
|
|
1728
|
+
try {
|
|
1729
|
+
toast.add({
|
|
1730
|
+
description: copyMessage || `${label || "Value"} copied to clipboard`
|
|
1731
|
+
});
|
|
1732
|
+
} catch (e2) {
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
[value, onCopy, toastOnCopy, copyMessage, label]
|
|
1737
|
+
);
|
|
1738
|
+
if (!value) {
|
|
1739
|
+
if (!fallback) return null;
|
|
1740
|
+
return /* @__PURE__ */ jsx17(Fragment3, { children: fallback });
|
|
1741
|
+
}
|
|
1742
|
+
const tooltipText = copied ? "Copied!" : `Copy ${label || "value"}`;
|
|
1743
|
+
const copyButton = /* @__PURE__ */ jsx17(
|
|
1744
|
+
Button,
|
|
1745
|
+
{
|
|
1746
|
+
size: "icon-xs",
|
|
1747
|
+
variant: "ghost",
|
|
1748
|
+
className: "text-muted-foreground hover:text-foreground cursor-pointer",
|
|
1749
|
+
onClick: handleCopy,
|
|
1750
|
+
title: tooltipText,
|
|
1751
|
+
children: copied ? /* @__PURE__ */ jsx17(CheckIcon2, { className: "size-3 text-emerald-500" }) : /* @__PURE__ */ jsx17(CopyIcon, { className: "size-3" })
|
|
1752
|
+
}
|
|
1753
|
+
);
|
|
1754
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn14("flex items-center gap-1.5", className), children: [
|
|
1755
|
+
/* @__PURE__ */ jsx17(
|
|
1756
|
+
"code",
|
|
1757
|
+
{
|
|
1758
|
+
className: cn14(
|
|
1759
|
+
"font-mono text-xs text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded select-all",
|
|
1760
|
+
codeClassName
|
|
1761
|
+
),
|
|
1762
|
+
children: value
|
|
1763
|
+
}
|
|
1764
|
+
),
|
|
1765
|
+
showTooltip ? /* @__PURE__ */ jsxs12(Tooltip, { children: [
|
|
1766
|
+
/* @__PURE__ */ jsx17(TooltipTrigger, { render: copyButton }),
|
|
1767
|
+
/* @__PURE__ */ jsx17(TooltipContent, { children: tooltipText })
|
|
1768
|
+
] }) : copyButton
|
|
1769
|
+
] });
|
|
1770
|
+
});
|
|
1771
|
+
var CodeLabel = CopyableCode;
|
|
1772
|
+
var SlugLabel = CopyableCode;
|
|
1773
|
+
|
|
1774
|
+
// src/components/composed/columns/description-label.tsx
|
|
1775
|
+
import { cn as cn15 } from "cn";
|
|
1776
|
+
import { memo as memo6 } from "react";
|
|
1777
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1778
|
+
var DescriptionLabel = memo6(function DescriptionLabel2({
|
|
1779
|
+
description,
|
|
1780
|
+
fallback = null,
|
|
1781
|
+
className
|
|
1782
|
+
}) {
|
|
1783
|
+
const text = description == null ? void 0 : description.trim();
|
|
1784
|
+
if (!text) {
|
|
1785
|
+
if (!fallback) return null;
|
|
1786
|
+
return /* @__PURE__ */ jsx18("span", { className: cn15("text-xs text-muted-foreground", className), children: fallback });
|
|
1787
|
+
}
|
|
1788
|
+
return /* @__PURE__ */ jsxs13(Tooltip, { children: [
|
|
1789
|
+
/* @__PURE__ */ jsx18(
|
|
1790
|
+
TooltipTrigger,
|
|
1791
|
+
{
|
|
1792
|
+
render: /* @__PURE__ */ jsx18(
|
|
1793
|
+
"p",
|
|
1794
|
+
{
|
|
1795
|
+
className: cn15(
|
|
1796
|
+
"text-xs text-muted-foreground truncate max-w-xs cursor-default",
|
|
1797
|
+
className
|
|
1798
|
+
),
|
|
1799
|
+
children: text
|
|
1800
|
+
}
|
|
1801
|
+
)
|
|
1802
|
+
}
|
|
1803
|
+
),
|
|
1804
|
+
/* @__PURE__ */ jsx18(TooltipContent, { className: "max-w-xs break-words", children: text })
|
|
1494
1805
|
] });
|
|
1495
1806
|
});
|
|
1496
1807
|
|
|
1497
1808
|
// src/components/composed/columns/email-label.tsx
|
|
1498
|
-
import { memo as
|
|
1499
|
-
import { jsx as
|
|
1500
|
-
var EmailLabel =
|
|
1501
|
-
return /* @__PURE__ */
|
|
1809
|
+
import { memo as memo7 } from "react";
|
|
1810
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1811
|
+
var EmailLabel = memo7(function EmailLabel2({ email }) {
|
|
1812
|
+
return /* @__PURE__ */ jsx19("span", { className: "text-xs font-mono", children: email });
|
|
1502
1813
|
});
|
|
1503
1814
|
|
|
1504
1815
|
// src/components/composed/columns/email-verified.tsx
|
|
1505
|
-
import {
|
|
1506
|
-
import {
|
|
1816
|
+
import { cn as cn17 } from "cn";
|
|
1817
|
+
import { CheckIcon as CheckIcon3, XIcon as XIcon3 } from "lucide-react";
|
|
1818
|
+
import { memo as memo8 } from "react";
|
|
1507
1819
|
|
|
1508
1820
|
// src/components/ui/badge.tsx
|
|
1509
1821
|
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
1510
1822
|
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
1511
1823
|
import { cva as cva3 } from "class-variance-authority";
|
|
1512
|
-
import { cn as
|
|
1824
|
+
import { cn as cn16 } from "cn";
|
|
1513
1825
|
var badgeVariants = cva3(
|
|
1514
1826
|
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",
|
|
1515
1827
|
{
|
|
@@ -1542,7 +1854,7 @@ function Badge(_a) {
|
|
|
1542
1854
|
defaultTagName: "span",
|
|
1543
1855
|
props: mergeProps3(
|
|
1544
1856
|
{
|
|
1545
|
-
className:
|
|
1857
|
+
className: cn16(badgeVariants({ variant }), className)
|
|
1546
1858
|
},
|
|
1547
1859
|
props
|
|
1548
1860
|
),
|
|
@@ -1555,64 +1867,764 @@ function Badge(_a) {
|
|
|
1555
1867
|
}
|
|
1556
1868
|
|
|
1557
1869
|
// src/components/composed/columns/email-verified.tsx
|
|
1558
|
-
import { jsx as
|
|
1559
|
-
var EmailVerified =
|
|
1560
|
-
verified
|
|
1870
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1871
|
+
var EmailVerified = memo8(function EmailVerified2({
|
|
1872
|
+
verified,
|
|
1873
|
+
label,
|
|
1874
|
+
className
|
|
1561
1875
|
}) {
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1876
|
+
const isVerified = Boolean(verified);
|
|
1877
|
+
if (isVerified) {
|
|
1878
|
+
return /* @__PURE__ */ jsxs14(
|
|
1879
|
+
Badge,
|
|
1880
|
+
{
|
|
1881
|
+
variant: "outline",
|
|
1882
|
+
className: cn17(
|
|
1883
|
+
"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 font-normal",
|
|
1884
|
+
className
|
|
1885
|
+
),
|
|
1886
|
+
children: [
|
|
1887
|
+
/* @__PURE__ */ jsx20(
|
|
1888
|
+
CheckIcon3,
|
|
1889
|
+
{
|
|
1890
|
+
"data-icon": "inline-start",
|
|
1891
|
+
className: "text-emerald-600 dark:text-emerald-400"
|
|
1892
|
+
}
|
|
1893
|
+
),
|
|
1894
|
+
label != null ? label : "Verified"
|
|
1895
|
+
]
|
|
1896
|
+
}
|
|
1897
|
+
);
|
|
1898
|
+
}
|
|
1899
|
+
return /* @__PURE__ */ jsxs14(
|
|
1900
|
+
Badge,
|
|
1901
|
+
{
|
|
1902
|
+
variant: "outline",
|
|
1903
|
+
className: cn17(
|
|
1904
|
+
"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300 font-normal",
|
|
1905
|
+
className
|
|
1906
|
+
),
|
|
1907
|
+
children: [
|
|
1908
|
+
/* @__PURE__ */ jsx20(
|
|
1909
|
+
XIcon3,
|
|
1910
|
+
{
|
|
1911
|
+
"data-icon": "inline-start",
|
|
1912
|
+
className: "text-amber-600 dark:text-amber-400"
|
|
1913
|
+
}
|
|
1914
|
+
),
|
|
1915
|
+
label != null ? label : "Unverified"
|
|
1916
|
+
]
|
|
1917
|
+
}
|
|
1918
|
+
);
|
|
1569
1919
|
});
|
|
1570
1920
|
|
|
1571
1921
|
// src/components/composed/columns/joined-label.tsx
|
|
1572
|
-
import { memo as
|
|
1573
|
-
import { jsx as
|
|
1574
|
-
var JoinedLabel =
|
|
1922
|
+
import { memo as memo9 } from "react";
|
|
1923
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1924
|
+
var JoinedLabel = memo9(function JoinedLabel2({
|
|
1575
1925
|
joined,
|
|
1576
1926
|
locale = "id-ID"
|
|
1577
1927
|
}) {
|
|
1578
1928
|
if (!joined) return null;
|
|
1579
1929
|
const date = typeof joined === "string" ? new Date(joined) : joined;
|
|
1580
1930
|
if (Number.isNaN(date.getTime())) return null;
|
|
1581
|
-
return /* @__PURE__ */
|
|
1931
|
+
return /* @__PURE__ */ jsx21("span", { className: "text-xs font-mono", children: new Intl.DateTimeFormat(locale, {
|
|
1582
1932
|
day: "numeric",
|
|
1583
1933
|
month: "long",
|
|
1584
1934
|
year: "numeric"
|
|
1585
1935
|
}).format(date) });
|
|
1586
1936
|
});
|
|
1587
1937
|
|
|
1588
|
-
// src/components/composed/columns/
|
|
1589
|
-
import {
|
|
1590
|
-
import { memo as
|
|
1591
|
-
import { jsx as
|
|
1592
|
-
var
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1938
|
+
// src/components/composed/columns/metadata-progress.tsx
|
|
1939
|
+
import { cn as cn18 } from "cn";
|
|
1940
|
+
import { memo as memo10, useMemo as useMemo2 } from "react";
|
|
1941
|
+
import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1942
|
+
var DEFAULT_METADATA_FIELDS = [
|
|
1943
|
+
{ key: "title", label: "Page Title" },
|
|
1944
|
+
{ key: "description", label: "Meta Description" },
|
|
1945
|
+
{ key: "keywords", label: "Keywords" },
|
|
1946
|
+
{ key: "author", label: "Author" },
|
|
1947
|
+
{ key: "canonicalUrl", label: "Canonical URL" },
|
|
1948
|
+
{ key: "favicon", label: "Favicon URL" },
|
|
1949
|
+
{ key: "ogImage", label: "OG Image URL" },
|
|
1950
|
+
{ key: "ogType", label: "OG Type" },
|
|
1951
|
+
{ key: "twitterCard", label: "Twitter Card" },
|
|
1952
|
+
{ key: "twitterHandle", label: "Twitter Handle" },
|
|
1953
|
+
{ key: "robots", label: "Robots" },
|
|
1954
|
+
{ key: "customJsonLd", label: "Custom JSON-LD" }
|
|
1955
|
+
];
|
|
1956
|
+
var MetadataProgress = memo10(function MetadataProgress2({
|
|
1957
|
+
metadata,
|
|
1958
|
+
fields = DEFAULT_METADATA_FIELDS,
|
|
1959
|
+
completedCount: propCompleted,
|
|
1960
|
+
totalCount: propTotal,
|
|
1961
|
+
title = "Website Metadata",
|
|
1962
|
+
fallback = null,
|
|
1963
|
+
className
|
|
1964
|
+
}) {
|
|
1965
|
+
const stats = useMemo2(() => {
|
|
1966
|
+
if (propCompleted !== void 0 && propTotal !== void 0) {
|
|
1967
|
+
const total3 = Math.max(1, propTotal);
|
|
1968
|
+
const completed3 = Math.min(propCompleted, total3);
|
|
1969
|
+
const percentage3 = Math.round(completed3 / total3 * 100);
|
|
1970
|
+
return {
|
|
1971
|
+
completed: completed3,
|
|
1972
|
+
total: total3,
|
|
1973
|
+
percentage: percentage3,
|
|
1974
|
+
missing: []
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
if (!metadata) {
|
|
1978
|
+
return {
|
|
1979
|
+
completed: 0,
|
|
1980
|
+
total: fields.length,
|
|
1981
|
+
percentage: 0,
|
|
1982
|
+
missing: fields.map((f) => f.label)
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
const completedList = [];
|
|
1986
|
+
const missingList = [];
|
|
1987
|
+
for (const field of fields) {
|
|
1988
|
+
const val = metadata[field.key];
|
|
1989
|
+
let isFilled = false;
|
|
1990
|
+
if (field.key === "keywords") {
|
|
1991
|
+
isFilled = Array.isArray(val) ? val.length > 0 : Boolean(typeof val === "string" && val.trim().length > 0);
|
|
1992
|
+
} else if (typeof val === "string") {
|
|
1993
|
+
isFilled = val.trim().length > 0;
|
|
1994
|
+
} else {
|
|
1995
|
+
isFilled = Boolean(val);
|
|
1996
|
+
}
|
|
1997
|
+
if (isFilled) {
|
|
1998
|
+
completedList.push(field.label);
|
|
1999
|
+
} else {
|
|
2000
|
+
missingList.push(field.label);
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
const total2 = fields.length;
|
|
2004
|
+
const completed2 = completedList.length;
|
|
2005
|
+
const percentage2 = Math.round(completed2 / Math.max(1, total2) * 100);
|
|
2006
|
+
return {
|
|
2007
|
+
completed: completed2,
|
|
2008
|
+
total: total2,
|
|
2009
|
+
percentage: percentage2,
|
|
2010
|
+
missing: missingList
|
|
2011
|
+
};
|
|
2012
|
+
}, [metadata, fields, propCompleted, propTotal]);
|
|
2013
|
+
const { completed, total, percentage, missing } = stats;
|
|
2014
|
+
if (completed === 0 && fallback !== null) {
|
|
2015
|
+
return /* @__PURE__ */ jsx22(Fragment4, { children: fallback });
|
|
2016
|
+
}
|
|
2017
|
+
return /* @__PURE__ */ jsxs15(Tooltip, { children: [
|
|
2018
|
+
/* @__PURE__ */ jsx22(
|
|
2019
|
+
TooltipTrigger,
|
|
2020
|
+
{
|
|
2021
|
+
render: /* @__PURE__ */ jsx22(
|
|
2022
|
+
"div",
|
|
2023
|
+
{
|
|
2024
|
+
className: cn18(
|
|
2025
|
+
"inline-flex items-center gap-2 cursor-pointer select-none",
|
|
2026
|
+
className
|
|
2027
|
+
),
|
|
2028
|
+
children: percentage === 100 ? /* @__PURE__ */ jsxs15(
|
|
2029
|
+
Badge,
|
|
2030
|
+
{
|
|
2031
|
+
variant: "outline",
|
|
2032
|
+
className: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 font-mono text-[11px] gap-1.5 font-normal",
|
|
2033
|
+
children: [
|
|
2034
|
+
/* @__PURE__ */ jsx22("span", { className: "size-1.5 rounded-full bg-emerald-500" }),
|
|
2035
|
+
"100%"
|
|
2036
|
+
]
|
|
2037
|
+
}
|
|
2038
|
+
) : /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2 w-24", children: [
|
|
2039
|
+
/* @__PURE__ */ jsx22("div", { className: "flex-1 h-1.5 rounded-full bg-muted/60 overflow-hidden", children: /* @__PURE__ */ jsx22(
|
|
2040
|
+
"div",
|
|
2041
|
+
{
|
|
2042
|
+
className: cn18(
|
|
2043
|
+
"h-full rounded-full transition-all duration-300",
|
|
2044
|
+
percentage >= 50 ? "bg-primary" : "bg-amber-500"
|
|
2045
|
+
),
|
|
2046
|
+
style: { width: `${percentage}%` }
|
|
2047
|
+
}
|
|
2048
|
+
) }),
|
|
2049
|
+
/* @__PURE__ */ jsxs15("span", { className: "font-mono text-[11px] text-muted-foreground shrink-0", children: [
|
|
2050
|
+
completed,
|
|
2051
|
+
"/",
|
|
2052
|
+
total
|
|
2053
|
+
] })
|
|
2054
|
+
] })
|
|
2055
|
+
}
|
|
2056
|
+
)
|
|
2057
|
+
}
|
|
2058
|
+
),
|
|
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: [
|
|
2063
|
+
completed,
|
|
2064
|
+
"/",
|
|
2065
|
+
total,
|
|
2066
|
+
" (",
|
|
2067
|
+
percentage,
|
|
2068
|
+
"%)"
|
|
2069
|
+
] })
|
|
2070
|
+
] }),
|
|
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
|
+
] })
|
|
1597
2080
|
] });
|
|
1598
2081
|
});
|
|
2082
|
+
var MetadataStatus = MetadataProgress;
|
|
2083
|
+
var ProgressStatus = MetadataProgress;
|
|
1599
2084
|
|
|
1600
|
-
// src/components/composed/columns/
|
|
1601
|
-
import {
|
|
1602
|
-
import {
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
2085
|
+
// src/components/composed/columns/organization-roles.tsx
|
|
2086
|
+
import { cn as cn19 } from "cn";
|
|
2087
|
+
import {
|
|
2088
|
+
Building2Icon,
|
|
2089
|
+
CrownIcon,
|
|
2090
|
+
NewspaperIcon,
|
|
2091
|
+
PenLineIcon,
|
|
2092
|
+
ShieldCheckIcon,
|
|
2093
|
+
UserIcon
|
|
2094
|
+
} from "lucide-react";
|
|
2095
|
+
import { forwardRef, memo as memo11 } from "react";
|
|
2096
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2097
|
+
var OrganizationRoleBadge = forwardRef(function OrganizationRoleBadge2(_a, ref) {
|
|
2098
|
+
var _b = _a, { role, roleName, className } = _b, props = __objRest(_b, ["role", "roleName", "className"]);
|
|
2099
|
+
const roleValue = roleName != null ? roleName : role;
|
|
2100
|
+
if (!roleValue) return null;
|
|
2101
|
+
const normalized = roleValue.toLowerCase().trim();
|
|
2102
|
+
if (normalized === "owner") {
|
|
2103
|
+
return /* @__PURE__ */ jsxs16(
|
|
2104
|
+
Badge,
|
|
2105
|
+
__spreadProps(__spreadValues({
|
|
2106
|
+
ref,
|
|
2107
|
+
variant: "outline",
|
|
2108
|
+
className: cn19(
|
|
2109
|
+
"capitalize border-purple-500/30 bg-purple-500/10 text-purple-700 dark:text-purple-300 font-normal",
|
|
2110
|
+
className
|
|
2111
|
+
)
|
|
2112
|
+
}, props), {
|
|
2113
|
+
children: [
|
|
2114
|
+
/* @__PURE__ */ jsx23(
|
|
2115
|
+
CrownIcon,
|
|
2116
|
+
{
|
|
2117
|
+
"data-icon": "inline-start",
|
|
2118
|
+
className: "text-purple-600 dark:text-purple-400"
|
|
2119
|
+
}
|
|
2120
|
+
),
|
|
2121
|
+
roleValue
|
|
2122
|
+
]
|
|
2123
|
+
})
|
|
2124
|
+
);
|
|
2125
|
+
}
|
|
2126
|
+
if (normalized === "admin") {
|
|
2127
|
+
return /* @__PURE__ */ jsxs16(
|
|
2128
|
+
Badge,
|
|
2129
|
+
__spreadProps(__spreadValues({
|
|
2130
|
+
ref,
|
|
2131
|
+
variant: "outline",
|
|
2132
|
+
className: cn19(
|
|
2133
|
+
"capitalize border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300 font-normal",
|
|
2134
|
+
className
|
|
2135
|
+
)
|
|
2136
|
+
}, props), {
|
|
2137
|
+
children: [
|
|
2138
|
+
/* @__PURE__ */ jsx23(
|
|
2139
|
+
ShieldCheckIcon,
|
|
2140
|
+
{
|
|
2141
|
+
"data-icon": "inline-start",
|
|
2142
|
+
className: "text-blue-600 dark:text-blue-400"
|
|
2143
|
+
}
|
|
2144
|
+
),
|
|
2145
|
+
roleValue
|
|
2146
|
+
]
|
|
2147
|
+
})
|
|
2148
|
+
);
|
|
2149
|
+
}
|
|
2150
|
+
if (normalized === "redaktur") {
|
|
2151
|
+
return /* @__PURE__ */ jsxs16(
|
|
2152
|
+
Badge,
|
|
2153
|
+
__spreadProps(__spreadValues({
|
|
2154
|
+
ref,
|
|
2155
|
+
variant: "outline",
|
|
2156
|
+
className: cn19(
|
|
2157
|
+
"capitalize border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300 font-normal",
|
|
2158
|
+
className
|
|
2159
|
+
)
|
|
2160
|
+
}, props), {
|
|
2161
|
+
children: [
|
|
2162
|
+
/* @__PURE__ */ jsx23(
|
|
2163
|
+
NewspaperIcon,
|
|
2164
|
+
{
|
|
2165
|
+
"data-icon": "inline-start",
|
|
2166
|
+
className: "text-amber-600 dark:text-amber-400"
|
|
2167
|
+
}
|
|
2168
|
+
),
|
|
2169
|
+
roleValue
|
|
2170
|
+
]
|
|
2171
|
+
})
|
|
2172
|
+
);
|
|
2173
|
+
}
|
|
2174
|
+
if (normalized === "editor") {
|
|
2175
|
+
return /* @__PURE__ */ jsxs16(
|
|
2176
|
+
Badge,
|
|
2177
|
+
__spreadProps(__spreadValues({
|
|
2178
|
+
ref,
|
|
2179
|
+
variant: "outline",
|
|
2180
|
+
className: cn19(
|
|
2181
|
+
"capitalize border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 font-normal",
|
|
2182
|
+
className
|
|
2183
|
+
)
|
|
2184
|
+
}, props), {
|
|
2185
|
+
children: [
|
|
2186
|
+
/* @__PURE__ */ jsx23(
|
|
2187
|
+
PenLineIcon,
|
|
2188
|
+
{
|
|
2189
|
+
"data-icon": "inline-start",
|
|
2190
|
+
className: "text-emerald-600 dark:text-emerald-400"
|
|
2191
|
+
}
|
|
2192
|
+
),
|
|
2193
|
+
roleValue
|
|
2194
|
+
]
|
|
2195
|
+
})
|
|
2196
|
+
);
|
|
2197
|
+
}
|
|
2198
|
+
if (normalized === "staff") {
|
|
2199
|
+
return /* @__PURE__ */ jsxs16(
|
|
2200
|
+
Badge,
|
|
2201
|
+
__spreadProps(__spreadValues({
|
|
2202
|
+
ref,
|
|
2203
|
+
variant: "outline",
|
|
2204
|
+
className: cn19(
|
|
2205
|
+
"capitalize border-slate-500/30 bg-slate-500/10 text-slate-700 dark:text-slate-300 font-normal",
|
|
2206
|
+
className
|
|
2207
|
+
)
|
|
2208
|
+
}, props), {
|
|
2209
|
+
children: [
|
|
2210
|
+
/* @__PURE__ */ jsx23(
|
|
2211
|
+
UserIcon,
|
|
2212
|
+
{
|
|
2213
|
+
"data-icon": "inline-start",
|
|
2214
|
+
className: "text-slate-600 dark:text-slate-400"
|
|
2215
|
+
}
|
|
2216
|
+
),
|
|
2217
|
+
roleValue
|
|
2218
|
+
]
|
|
2219
|
+
})
|
|
2220
|
+
);
|
|
2221
|
+
}
|
|
2222
|
+
return /* @__PURE__ */ jsxs16(
|
|
2223
|
+
Badge,
|
|
2224
|
+
__spreadProps(__spreadValues({
|
|
2225
|
+
ref,
|
|
2226
|
+
variant: "secondary",
|
|
2227
|
+
className: cn19("capitalize font-normal", className)
|
|
2228
|
+
}, props), {
|
|
2229
|
+
children: [
|
|
2230
|
+
/* @__PURE__ */ jsx23(
|
|
2231
|
+
Building2Icon,
|
|
2232
|
+
{
|
|
2233
|
+
"data-icon": "inline-start",
|
|
2234
|
+
className: "text-muted-foreground"
|
|
2235
|
+
}
|
|
2236
|
+
),
|
|
2237
|
+
roleValue
|
|
2238
|
+
]
|
|
2239
|
+
})
|
|
2240
|
+
);
|
|
2241
|
+
});
|
|
2242
|
+
OrganizationRoleBadge.displayName = "OrganizationRoleBadge";
|
|
2243
|
+
var OrganizationRoles = memo11(function OrganizationRoles2({
|
|
2244
|
+
roles,
|
|
2245
|
+
className
|
|
1606
2246
|
}) {
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
/* @__PURE__ */
|
|
1612
|
-
|
|
2247
|
+
const orgRoles = roles != null ? roles : [];
|
|
2248
|
+
if (orgRoles.length === 0) return null;
|
|
2249
|
+
if (orgRoles.length === 1) {
|
|
2250
|
+
const item = orgRoles[0];
|
|
2251
|
+
return /* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
2252
|
+
/* @__PURE__ */ jsx23(
|
|
2253
|
+
TooltipTrigger,
|
|
2254
|
+
{
|
|
2255
|
+
render: /* @__PURE__ */ jsx23(
|
|
2256
|
+
OrganizationRoleBadge,
|
|
2257
|
+
{
|
|
2258
|
+
roleName: item.roleName,
|
|
2259
|
+
className
|
|
2260
|
+
}
|
|
2261
|
+
)
|
|
2262
|
+
}
|
|
2263
|
+
),
|
|
2264
|
+
/* @__PURE__ */ jsxs16(TooltipContent, { children: [
|
|
2265
|
+
item.roleName,
|
|
2266
|
+
" at ",
|
|
2267
|
+
item.organizationName
|
|
2268
|
+
] })
|
|
2269
|
+
] });
|
|
2270
|
+
}
|
|
2271
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn19("flex items-center gap-1.5", className), children: [
|
|
2272
|
+
/* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
2273
|
+
/* @__PURE__ */ jsx23(
|
|
2274
|
+
TooltipTrigger,
|
|
2275
|
+
{
|
|
2276
|
+
render: /* @__PURE__ */ jsx23(OrganizationRoleBadge, { roleName: orgRoles[0].roleName })
|
|
2277
|
+
}
|
|
2278
|
+
),
|
|
2279
|
+
/* @__PURE__ */ jsxs16(TooltipContent, { children: [
|
|
2280
|
+
orgRoles[0].roleName,
|
|
2281
|
+
" at ",
|
|
2282
|
+
orgRoles[0].organizationName
|
|
2283
|
+
] })
|
|
2284
|
+
] }),
|
|
2285
|
+
/* @__PURE__ */ jsxs16(Tooltip, { children: [
|
|
2286
|
+
/* @__PURE__ */ jsx23(
|
|
2287
|
+
TooltipTrigger,
|
|
2288
|
+
{
|
|
2289
|
+
render: /* @__PURE__ */ jsxs16(Badge, { variant: "secondary", className: "font-mono", children: [
|
|
2290
|
+
"+",
|
|
2291
|
+
orgRoles.length - 1
|
|
2292
|
+
] })
|
|
2293
|
+
}
|
|
2294
|
+
),
|
|
2295
|
+
/* @__PURE__ */ jsx23(TooltipContent, { children: /* @__PURE__ */ jsx23("div", { className: "flex flex-col", children: orgRoles.slice(1).map((item, index) => {
|
|
2296
|
+
var _a, _b;
|
|
2297
|
+
return /* @__PURE__ */ jsxs16(
|
|
2298
|
+
"span",
|
|
2299
|
+
{
|
|
2300
|
+
children: [
|
|
2301
|
+
item.roleName,
|
|
2302
|
+
" at ",
|
|
2303
|
+
item.organizationName
|
|
2304
|
+
]
|
|
2305
|
+
},
|
|
2306
|
+
(_b = item.membershipId) != null ? _b : `${(_a = item.organizationName) != null ? _a : ""}-${index}`
|
|
2307
|
+
);
|
|
2308
|
+
}) }) })
|
|
2309
|
+
] })
|
|
1613
2310
|
] });
|
|
1614
2311
|
});
|
|
1615
2312
|
|
|
2313
|
+
// src/components/composed/columns/permission-badges.tsx
|
|
2314
|
+
import { cn as cn20 } from "cn";
|
|
2315
|
+
import { memo as memo12 } from "react";
|
|
2316
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2317
|
+
var PermissionBadges = memo12(function PermissionBadges2({
|
|
2318
|
+
permissions,
|
|
2319
|
+
maxDisplay = 3,
|
|
2320
|
+
className
|
|
2321
|
+
}) {
|
|
2322
|
+
const perms = permissions != null ? permissions : [];
|
|
2323
|
+
if (perms.length === 0) return null;
|
|
2324
|
+
const visible = perms.slice(0, maxDisplay);
|
|
2325
|
+
const remaining = perms.slice(maxDisplay);
|
|
2326
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn20("flex flex-wrap items-center gap-1", className), children: [
|
|
2327
|
+
visible.map((p) => /* @__PURE__ */ jsx24(
|
|
2328
|
+
Badge,
|
|
2329
|
+
{
|
|
2330
|
+
variant: "outline",
|
|
2331
|
+
className: "text-[10px] font-mono py-0 font-normal",
|
|
2332
|
+
children: p
|
|
2333
|
+
},
|
|
2334
|
+
p
|
|
2335
|
+
)),
|
|
2336
|
+
remaining.length > 0 && /* @__PURE__ */ jsxs17(Tooltip, { children: [
|
|
2337
|
+
/* @__PURE__ */ jsx24(
|
|
2338
|
+
TooltipTrigger,
|
|
2339
|
+
{
|
|
2340
|
+
render: /* @__PURE__ */ jsxs17(
|
|
2341
|
+
Badge,
|
|
2342
|
+
{
|
|
2343
|
+
variant: "secondary",
|
|
2344
|
+
className: "text-[10px] font-mono py-0 cursor-default font-normal",
|
|
2345
|
+
children: [
|
|
2346
|
+
"+",
|
|
2347
|
+
remaining.length
|
|
2348
|
+
]
|
|
2349
|
+
}
|
|
2350
|
+
)
|
|
2351
|
+
}
|
|
2352
|
+
),
|
|
2353
|
+
/* @__PURE__ */ jsx24(TooltipContent, { className: "max-w-xs", children: /* @__PURE__ */ jsx24("div", { className: "flex flex-col gap-0.5 text-xs font-mono", children: remaining.map((p) => /* @__PURE__ */ jsx24("span", { children: p }, p)) }) })
|
|
2354
|
+
] })
|
|
2355
|
+
] });
|
|
2356
|
+
});
|
|
2357
|
+
var PermissionsBadges = PermissionBadges;
|
|
2358
|
+
|
|
2359
|
+
// src/components/composed/columns/redirect-uris.tsx
|
|
2360
|
+
import { cn as cn21 } from "cn";
|
|
2361
|
+
import { memo as memo13, useMemo as useMemo3 } from "react";
|
|
2362
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2363
|
+
var RedirectUris = memo13(function RedirectUris2({
|
|
2364
|
+
uris,
|
|
2365
|
+
maxDisplay = 1,
|
|
2366
|
+
fallback = null,
|
|
2367
|
+
tooltipTitle = "All Redirect URIs:",
|
|
2368
|
+
className
|
|
2369
|
+
}) {
|
|
2370
|
+
const list = useMemo3(() => {
|
|
2371
|
+
if (!uris) return [];
|
|
2372
|
+
if (Array.isArray(uris)) return uris.filter(Boolean);
|
|
2373
|
+
return [uris];
|
|
2374
|
+
}, [uris]);
|
|
2375
|
+
if (list.length === 0) {
|
|
2376
|
+
if (!fallback) return null;
|
|
2377
|
+
return /* @__PURE__ */ jsx25(Fragment5, { children: fallback });
|
|
2378
|
+
}
|
|
2379
|
+
const primaryUri = list[0];
|
|
2380
|
+
const remainingCount = list.length - maxDisplay;
|
|
2381
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn21("flex items-center gap-2", className), children: [
|
|
2382
|
+
/* @__PURE__ */ jsx25(
|
|
2383
|
+
"p",
|
|
2384
|
+
{
|
|
2385
|
+
className: "text-xs text-muted-foreground font-mono truncate",
|
|
2386
|
+
title: primaryUri,
|
|
2387
|
+
children: primaryUri
|
|
2388
|
+
}
|
|
2389
|
+
),
|
|
2390
|
+
remainingCount > 0 && /* @__PURE__ */ jsxs18(Tooltip, { children: [
|
|
2391
|
+
/* @__PURE__ */ jsx25(
|
|
2392
|
+
TooltipTrigger,
|
|
2393
|
+
{
|
|
2394
|
+
render: /* @__PURE__ */ jsxs18(Badge, { variant: "outline", className: "font-mono cursor-pointer", children: [
|
|
2395
|
+
"+",
|
|
2396
|
+
remainingCount
|
|
2397
|
+
] })
|
|
2398
|
+
}
|
|
2399
|
+
),
|
|
2400
|
+
/* @__PURE__ */ jsx25(TooltipContent, { className: "text-xs font-mono", children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-1", children: [
|
|
2401
|
+
tooltipTitle && /* @__PURE__ */ jsx25("p", { className: "font-semibold text-xs", children: tooltipTitle }),
|
|
2402
|
+
list.map((uri) => /* @__PURE__ */ jsx25("span", { children: uri }, uri))
|
|
2403
|
+
] }) })
|
|
2404
|
+
] })
|
|
2405
|
+
] });
|
|
2406
|
+
});
|
|
2407
|
+
var RedirectUriLabel = RedirectUris;
|
|
2408
|
+
var UrisList = RedirectUris;
|
|
2409
|
+
var UrisLabel = RedirectUris;
|
|
2410
|
+
|
|
2411
|
+
// src/components/composed/columns/running-status.tsx
|
|
2412
|
+
import { cn as cn22 } from "cn";
|
|
2413
|
+
import { memo as memo14 } from "react";
|
|
2414
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2415
|
+
var RunningStatus = memo14(function RunningStatus2({
|
|
2416
|
+
count = 0,
|
|
2417
|
+
isRunning,
|
|
2418
|
+
accessTokens = 0,
|
|
2419
|
+
refreshTokens = 0,
|
|
2420
|
+
usersCount = 0,
|
|
2421
|
+
runningLabel = "Running",
|
|
2422
|
+
idleLabel = "Idle",
|
|
2423
|
+
tooltipTitle = "Sessions & Active Tokens",
|
|
2424
|
+
className
|
|
2425
|
+
}) {
|
|
2426
|
+
const activeCount = count != null ? count : 0;
|
|
2427
|
+
const running = isRunning != null ? isRunning : activeCount > 0;
|
|
2428
|
+
return /* @__PURE__ */ jsxs19(Tooltip, { children: [
|
|
2429
|
+
/* @__PURE__ */ jsx26(
|
|
2430
|
+
TooltipTrigger,
|
|
2431
|
+
{
|
|
2432
|
+
render: /* @__PURE__ */ jsx26(
|
|
2433
|
+
"div",
|
|
2434
|
+
{
|
|
2435
|
+
className: cn22(
|
|
2436
|
+
"inline-flex items-center cursor-pointer select-none",
|
|
2437
|
+
className
|
|
2438
|
+
),
|
|
2439
|
+
children: running ? /* @__PURE__ */ jsxs19(
|
|
2440
|
+
Badge,
|
|
2441
|
+
{
|
|
2442
|
+
variant: "outline",
|
|
2443
|
+
className: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 gap-1.5 text-xs font-normal",
|
|
2444
|
+
children: [
|
|
2445
|
+
/* @__PURE__ */ jsx26("span", { className: "size-1.5 rounded-full bg-emerald-500 animate-pulse" }),
|
|
2446
|
+
runningLabel,
|
|
2447
|
+
" (",
|
|
2448
|
+
activeCount,
|
|
2449
|
+
")"
|
|
2450
|
+
]
|
|
2451
|
+
}
|
|
2452
|
+
) : /* @__PURE__ */ jsxs19(
|
|
2453
|
+
Badge,
|
|
2454
|
+
{
|
|
2455
|
+
variant: "outline",
|
|
2456
|
+
className: "border-border/60 bg-muted/40 text-muted-foreground gap-1.5 text-xs font-normal",
|
|
2457
|
+
children: [
|
|
2458
|
+
/* @__PURE__ */ jsx26("span", { className: "size-1.5 rounded-full bg-muted-foreground/40" }),
|
|
2459
|
+
idleLabel
|
|
2460
|
+
]
|
|
2461
|
+
}
|
|
2462
|
+
)
|
|
2463
|
+
}
|
|
2464
|
+
)
|
|
2465
|
+
}
|
|
2466
|
+
),
|
|
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 })
|
|
2485
|
+
] }),
|
|
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 })
|
|
2489
|
+
] }),
|
|
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 })
|
|
2493
|
+
] })
|
|
2494
|
+
] })
|
|
2495
|
+
] })
|
|
2496
|
+
] });
|
|
2497
|
+
});
|
|
2498
|
+
var TokenActivity = RunningStatus;
|
|
2499
|
+
var ActiveTokensStatus = RunningStatus;
|
|
2500
|
+
|
|
2501
|
+
// src/components/composed/columns/user-role.tsx
|
|
2502
|
+
import { cn as cn23 } from "cn";
|
|
2503
|
+
import {
|
|
2504
|
+
BriefcaseIcon,
|
|
2505
|
+
ShieldIcon,
|
|
2506
|
+
UserIcon as UserIcon2,
|
|
2507
|
+
UserStarIcon
|
|
2508
|
+
} from "lucide-react";
|
|
2509
|
+
import { memo as memo15 } from "react";
|
|
2510
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2511
|
+
var UserRole = memo15(function UserRole2({
|
|
2512
|
+
role,
|
|
2513
|
+
className
|
|
2514
|
+
}) {
|
|
2515
|
+
if (!role) return null;
|
|
2516
|
+
const normalized = role.toLowerCase().trim();
|
|
2517
|
+
if (normalized === "admin") {
|
|
2518
|
+
return /* @__PURE__ */ jsxs20(
|
|
2519
|
+
Badge,
|
|
2520
|
+
{
|
|
2521
|
+
variant: "outline",
|
|
2522
|
+
className: cn23(
|
|
2523
|
+
"capitalize border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",
|
|
2524
|
+
className
|
|
2525
|
+
),
|
|
2526
|
+
children: [
|
|
2527
|
+
/* @__PURE__ */ jsx27(
|
|
2528
|
+
UserStarIcon,
|
|
2529
|
+
{
|
|
2530
|
+
"data-icon": "inline-start",
|
|
2531
|
+
className: "text-amber-500 dark:text-amber-400"
|
|
2532
|
+
}
|
|
2533
|
+
),
|
|
2534
|
+
role
|
|
2535
|
+
]
|
|
2536
|
+
}
|
|
2537
|
+
);
|
|
2538
|
+
}
|
|
2539
|
+
if (normalized === "client") {
|
|
2540
|
+
return /* @__PURE__ */ jsxs20(
|
|
2541
|
+
Badge,
|
|
2542
|
+
{
|
|
2543
|
+
variant: "outline",
|
|
2544
|
+
className: cn23(
|
|
2545
|
+
"capitalize border-sky-500/30 bg-sky-500/10 text-sky-700 dark:text-sky-300",
|
|
2546
|
+
className
|
|
2547
|
+
),
|
|
2548
|
+
children: [
|
|
2549
|
+
/* @__PURE__ */ jsx27(
|
|
2550
|
+
BriefcaseIcon,
|
|
2551
|
+
{
|
|
2552
|
+
"data-icon": "inline-start",
|
|
2553
|
+
className: "text-sky-500 dark:text-sky-400"
|
|
2554
|
+
}
|
|
2555
|
+
),
|
|
2556
|
+
role
|
|
2557
|
+
]
|
|
2558
|
+
}
|
|
2559
|
+
);
|
|
2560
|
+
}
|
|
2561
|
+
if (normalized === "user") {
|
|
2562
|
+
return /* @__PURE__ */ jsxs20(Badge, { variant: "outline", className: cn23("capitalize", className), children: [
|
|
2563
|
+
/* @__PURE__ */ jsx27(UserIcon2, { "data-icon": "inline-start", className: "text-muted-foreground" }),
|
|
2564
|
+
role
|
|
2565
|
+
] });
|
|
2566
|
+
}
|
|
2567
|
+
return /* @__PURE__ */ jsxs20(
|
|
2568
|
+
Badge,
|
|
2569
|
+
{
|
|
2570
|
+
variant: "secondary",
|
|
2571
|
+
className: cn23("capitalize font-normal", className),
|
|
2572
|
+
children: [
|
|
2573
|
+
/* @__PURE__ */ jsx27(ShieldIcon, { "data-icon": "inline-start", className: "text-muted-foreground" }),
|
|
2574
|
+
role
|
|
2575
|
+
]
|
|
2576
|
+
}
|
|
2577
|
+
);
|
|
2578
|
+
});
|
|
2579
|
+
|
|
2580
|
+
// src/components/composed/columns/user-status.tsx
|
|
2581
|
+
import { cn as cn24 } from "cn";
|
|
2582
|
+
import { memo as memo16 } from "react";
|
|
2583
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2584
|
+
var UserStatus = memo16(function UserStatus2({
|
|
2585
|
+
status,
|
|
2586
|
+
label,
|
|
2587
|
+
activeLabel = "Active",
|
|
2588
|
+
inactiveLabel,
|
|
2589
|
+
className
|
|
2590
|
+
}) {
|
|
2591
|
+
var _a;
|
|
2592
|
+
const isInactive = typeof status === "string" ? status.toLowerCase() !== "active" : Boolean(status);
|
|
2593
|
+
if (isInactive) {
|
|
2594
|
+
const displayLabel = (_a = label != null ? label : inactiveLabel) != null ? _a : typeof status === "string" ? status : "Inactive";
|
|
2595
|
+
return /* @__PURE__ */ jsxs21(
|
|
2596
|
+
Badge,
|
|
2597
|
+
{
|
|
2598
|
+
variant: "outline",
|
|
2599
|
+
className: cn24(
|
|
2600
|
+
"capitalize border-destructive/30 bg-destructive/10 text-destructive dark:text-red-400 gap-1.5 font-normal",
|
|
2601
|
+
className
|
|
2602
|
+
),
|
|
2603
|
+
children: [
|
|
2604
|
+
/* @__PURE__ */ jsx28("span", { className: "size-1.5 rounded-full bg-destructive" }),
|
|
2605
|
+
displayLabel
|
|
2606
|
+
]
|
|
2607
|
+
}
|
|
2608
|
+
);
|
|
2609
|
+
}
|
|
2610
|
+
return /* @__PURE__ */ jsxs21(
|
|
2611
|
+
Badge,
|
|
2612
|
+
{
|
|
2613
|
+
variant: "outline",
|
|
2614
|
+
className: cn24(
|
|
2615
|
+
"capitalize border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 gap-1.5 font-normal",
|
|
2616
|
+
className
|
|
2617
|
+
),
|
|
2618
|
+
children: [
|
|
2619
|
+
/* @__PURE__ */ jsx28("span", { className: "size-1.5 rounded-full bg-emerald-500" }),
|
|
2620
|
+
label != null ? label : activeLabel
|
|
2621
|
+
]
|
|
2622
|
+
}
|
|
2623
|
+
);
|
|
2624
|
+
});
|
|
2625
|
+
var ItemStatus = UserStatus;
|
|
2626
|
+
var StatusBadge = UserStatus;
|
|
2627
|
+
|
|
1616
2628
|
// src/components/composed/data-table/data-table.tsx
|
|
1617
2629
|
import {
|
|
1618
2630
|
flexRender as flexRender3,
|
|
@@ -1620,22 +2632,22 @@ import {
|
|
|
1620
2632
|
} from "@tanstack/react-table";
|
|
1621
2633
|
import { FolderOpenIcon } from "lucide-react";
|
|
1622
2634
|
import { useRouter as useRouter2 } from "next/navigation";
|
|
1623
|
-
import { useMemo as
|
|
2635
|
+
import { useMemo as useMemo5, useState as useState6 } from "react";
|
|
1624
2636
|
|
|
1625
2637
|
// src/components/composed/state-empty.tsx
|
|
1626
|
-
import { memo as
|
|
2638
|
+
import { memo as memo17 } from "react";
|
|
1627
2639
|
|
|
1628
2640
|
// src/components/ui/empty.tsx
|
|
1629
2641
|
import { cva as cva4 } from "class-variance-authority";
|
|
1630
|
-
import { cn as
|
|
1631
|
-
import { jsx as
|
|
2642
|
+
import { cn as cn25 } from "cn";
|
|
2643
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1632
2644
|
function Empty(_a) {
|
|
1633
2645
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1634
|
-
return /* @__PURE__ */
|
|
2646
|
+
return /* @__PURE__ */ jsx29(
|
|
1635
2647
|
"div",
|
|
1636
2648
|
__spreadValues({
|
|
1637
2649
|
"data-slot": "empty",
|
|
1638
|
-
className:
|
|
2650
|
+
className: cn25(
|
|
1639
2651
|
"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
|
|
1640
2652
|
className
|
|
1641
2653
|
)
|
|
@@ -1644,11 +2656,11 @@ function Empty(_a) {
|
|
|
1644
2656
|
}
|
|
1645
2657
|
function EmptyHeader(_a) {
|
|
1646
2658
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1647
|
-
return /* @__PURE__ */
|
|
2659
|
+
return /* @__PURE__ */ jsx29(
|
|
1648
2660
|
"div",
|
|
1649
2661
|
__spreadValues({
|
|
1650
2662
|
"data-slot": "empty-header",
|
|
1651
|
-
className:
|
|
2663
|
+
className: cn25("flex max-w-sm flex-col items-center gap-1", className)
|
|
1652
2664
|
}, props)
|
|
1653
2665
|
);
|
|
1654
2666
|
}
|
|
@@ -1674,22 +2686,22 @@ function EmptyMedia(_a) {
|
|
|
1674
2686
|
"className",
|
|
1675
2687
|
"variant"
|
|
1676
2688
|
]);
|
|
1677
|
-
return /* @__PURE__ */
|
|
2689
|
+
return /* @__PURE__ */ jsx29(
|
|
1678
2690
|
"div",
|
|
1679
2691
|
__spreadValues({
|
|
1680
2692
|
"data-slot": "empty-icon",
|
|
1681
2693
|
"data-variant": variant,
|
|
1682
|
-
className:
|
|
2694
|
+
className: cn25(emptyMediaVariants({ variant, className }))
|
|
1683
2695
|
}, props)
|
|
1684
2696
|
);
|
|
1685
2697
|
}
|
|
1686
2698
|
function EmptyTitle(_a) {
|
|
1687
2699
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1688
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ jsx29(
|
|
1689
2701
|
"div",
|
|
1690
2702
|
__spreadValues({
|
|
1691
2703
|
"data-slot": "empty-title",
|
|
1692
|
-
className:
|
|
2704
|
+
className: cn25(
|
|
1693
2705
|
"font-heading text-sm font-medium tracking-tight",
|
|
1694
2706
|
className
|
|
1695
2707
|
)
|
|
@@ -1698,11 +2710,11 @@ function EmptyTitle(_a) {
|
|
|
1698
2710
|
}
|
|
1699
2711
|
function EmptyDescription(_a) {
|
|
1700
2712
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1701
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ jsx29(
|
|
1702
2714
|
"div",
|
|
1703
2715
|
__spreadValues({
|
|
1704
2716
|
"data-slot": "empty-description",
|
|
1705
|
-
className:
|
|
2717
|
+
className: cn25(
|
|
1706
2718
|
"text-xs/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
1707
2719
|
className
|
|
1708
2720
|
)
|
|
@@ -1711,11 +2723,11 @@ function EmptyDescription(_a) {
|
|
|
1711
2723
|
}
|
|
1712
2724
|
function EmptyContent(_a) {
|
|
1713
2725
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1714
|
-
return /* @__PURE__ */
|
|
2726
|
+
return /* @__PURE__ */ jsx29(
|
|
1715
2727
|
"div",
|
|
1716
2728
|
__spreadValues({
|
|
1717
2729
|
"data-slot": "empty-content",
|
|
1718
|
-
className:
|
|
2730
|
+
className: cn25(
|
|
1719
2731
|
"flex w-full max-w-sm min-w-0 flex-col items-center gap-2 text-xs/relaxed text-balance",
|
|
1720
2732
|
className
|
|
1721
2733
|
)
|
|
@@ -1724,18 +2736,18 @@ function EmptyContent(_a) {
|
|
|
1724
2736
|
}
|
|
1725
2737
|
|
|
1726
2738
|
// src/lib/utils.ts
|
|
1727
|
-
import { cn as
|
|
2739
|
+
import { cn as cn26 } from "cn";
|
|
1728
2740
|
|
|
1729
2741
|
// src/components/composed/state-empty.tsx
|
|
1730
|
-
import { jsx as
|
|
2742
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1731
2743
|
function renderStateIcon(icon) {
|
|
1732
2744
|
if (typeof icon === "function" || typeof icon === "object" && icon !== null && "render" in icon) {
|
|
1733
2745
|
const IconComp = icon;
|
|
1734
|
-
return /* @__PURE__ */
|
|
2746
|
+
return /* @__PURE__ */ jsx30(IconComp, {});
|
|
1735
2747
|
}
|
|
1736
2748
|
return icon;
|
|
1737
2749
|
}
|
|
1738
|
-
var StateEmpty =
|
|
2750
|
+
var StateEmpty = memo17(function StateEmpty2({
|
|
1739
2751
|
icon,
|
|
1740
2752
|
title,
|
|
1741
2753
|
description,
|
|
@@ -1748,17 +2760,17 @@ var StateEmpty = memo8(function StateEmpty2({
|
|
|
1748
2760
|
const actionHandler = isFunctionAction ? render : onClick;
|
|
1749
2761
|
const buttonRender = isFunctionAction ? void 0 : render;
|
|
1750
2762
|
const hasAction = Boolean(buttonText || render || onClick);
|
|
1751
|
-
return /* @__PURE__ */
|
|
2763
|
+
return /* @__PURE__ */ jsxs22(
|
|
1752
2764
|
Empty,
|
|
1753
2765
|
{
|
|
1754
|
-
className:
|
|
2766
|
+
className: cn26("w-full", state === "outline" && "border border-dashed"),
|
|
1755
2767
|
children: [
|
|
1756
|
-
/* @__PURE__ */
|
|
1757
|
-
/* @__PURE__ */
|
|
1758
|
-
/* @__PURE__ */
|
|
1759
|
-
/* @__PURE__ */
|
|
2768
|
+
/* @__PURE__ */ jsxs22(EmptyHeader, { children: [
|
|
2769
|
+
/* @__PURE__ */ jsx30(EmptyMedia, { variant: "icon", children: renderStateIcon(icon) }),
|
|
2770
|
+
/* @__PURE__ */ jsx30(EmptyTitle, { children: title }),
|
|
2771
|
+
/* @__PURE__ */ jsx30(EmptyDescription, { children: description })
|
|
1760
2772
|
] }),
|
|
1761
|
-
hasAction && /* @__PURE__ */
|
|
2773
|
+
hasAction && /* @__PURE__ */ jsx30(EmptyContent, { children: /* @__PURE__ */ jsx30(
|
|
1762
2774
|
Button,
|
|
1763
2775
|
{
|
|
1764
2776
|
variant: "outline",
|
|
@@ -1775,20 +2787,20 @@ var StateEmpty = memo8(function StateEmpty2({
|
|
|
1775
2787
|
});
|
|
1776
2788
|
|
|
1777
2789
|
// src/components/ui/table.tsx
|
|
1778
|
-
import { cn as
|
|
1779
|
-
import { jsx as
|
|
2790
|
+
import { cn as cn27 } from "cn";
|
|
2791
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1780
2792
|
function Table(_a) {
|
|
1781
2793
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1782
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ jsx31(
|
|
1783
2795
|
"div",
|
|
1784
2796
|
{
|
|
1785
2797
|
"data-slot": "table-container",
|
|
1786
2798
|
className: "relative w-full overflow-x-auto",
|
|
1787
|
-
children: /* @__PURE__ */
|
|
2799
|
+
children: /* @__PURE__ */ jsx31(
|
|
1788
2800
|
"table",
|
|
1789
2801
|
__spreadValues({
|
|
1790
2802
|
"data-slot": "table",
|
|
1791
|
-
className:
|
|
2803
|
+
className: cn27("w-full caption-bottom text-xs", className)
|
|
1792
2804
|
}, props)
|
|
1793
2805
|
)
|
|
1794
2806
|
}
|
|
@@ -1796,31 +2808,31 @@ function Table(_a) {
|
|
|
1796
2808
|
}
|
|
1797
2809
|
function TableHeader(_a) {
|
|
1798
2810
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1799
|
-
return /* @__PURE__ */
|
|
2811
|
+
return /* @__PURE__ */ jsx31(
|
|
1800
2812
|
"thead",
|
|
1801
2813
|
__spreadValues({
|
|
1802
2814
|
"data-slot": "table-header",
|
|
1803
|
-
className:
|
|
2815
|
+
className: cn27("[&_tr]:border-b", className)
|
|
1804
2816
|
}, props)
|
|
1805
2817
|
);
|
|
1806
2818
|
}
|
|
1807
2819
|
function TableBody(_a) {
|
|
1808
2820
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1809
|
-
return /* @__PURE__ */
|
|
2821
|
+
return /* @__PURE__ */ jsx31(
|
|
1810
2822
|
"tbody",
|
|
1811
2823
|
__spreadValues({
|
|
1812
2824
|
"data-slot": "table-body",
|
|
1813
|
-
className:
|
|
2825
|
+
className: cn27("[&_tr:last-child]:border-0", className)
|
|
1814
2826
|
}, props)
|
|
1815
2827
|
);
|
|
1816
2828
|
}
|
|
1817
2829
|
function TableRow(_a) {
|
|
1818
2830
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1819
|
-
return /* @__PURE__ */
|
|
2831
|
+
return /* @__PURE__ */ jsx31(
|
|
1820
2832
|
"tr",
|
|
1821
2833
|
__spreadValues({
|
|
1822
2834
|
"data-slot": "table-row",
|
|
1823
|
-
className:
|
|
2835
|
+
className: cn27(
|
|
1824
2836
|
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1825
2837
|
className
|
|
1826
2838
|
)
|
|
@@ -1829,11 +2841,11 @@ function TableRow(_a) {
|
|
|
1829
2841
|
}
|
|
1830
2842
|
function TableHead(_a) {
|
|
1831
2843
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1832
|
-
return /* @__PURE__ */
|
|
2844
|
+
return /* @__PURE__ */ jsx31(
|
|
1833
2845
|
"th",
|
|
1834
2846
|
__spreadValues({
|
|
1835
2847
|
"data-slot": "table-head",
|
|
1836
|
-
className:
|
|
2848
|
+
className: cn27(
|
|
1837
2849
|
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
1838
2850
|
className
|
|
1839
2851
|
)
|
|
@@ -1842,11 +2854,11 @@ function TableHead(_a) {
|
|
|
1842
2854
|
}
|
|
1843
2855
|
function TableCell(_a) {
|
|
1844
2856
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1845
|
-
return /* @__PURE__ */
|
|
2857
|
+
return /* @__PURE__ */ jsx31(
|
|
1846
2858
|
"td",
|
|
1847
2859
|
__spreadValues({
|
|
1848
2860
|
"data-slot": "table-cell",
|
|
1849
|
-
className:
|
|
2861
|
+
className: cn27(
|
|
1850
2862
|
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
1851
2863
|
className
|
|
1852
2864
|
)
|
|
@@ -1899,19 +2911,19 @@ import {
|
|
|
1899
2911
|
flexRender
|
|
1900
2912
|
} from "@tanstack/react-table";
|
|
1901
2913
|
import { SearchXIcon } from "lucide-react";
|
|
1902
|
-
import { jsx as
|
|
2914
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1903
2915
|
function DataTableContentBody({
|
|
1904
2916
|
table,
|
|
1905
2917
|
columns
|
|
1906
2918
|
}) {
|
|
1907
2919
|
const rows = table.getRowModel().rows;
|
|
1908
2920
|
if (rows == null ? void 0 : rows.length) {
|
|
1909
|
-
return /* @__PURE__ */
|
|
2921
|
+
return /* @__PURE__ */ jsx32(TableBody, { children: rows.map((row) => /* @__PURE__ */ jsx32(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx32(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) });
|
|
1910
2922
|
}
|
|
1911
|
-
return /* @__PURE__ */
|
|
2923
|
+
return /* @__PURE__ */ jsx32(TableBody, { children: /* @__PURE__ */ jsx32(TableRow, { children: /* @__PURE__ */ jsx32(TableCell, { colSpan: columns.length, className: "h-48 text-center", children: /* @__PURE__ */ jsx32(
|
|
1912
2924
|
StateEmpty,
|
|
1913
2925
|
{
|
|
1914
|
-
icon: /* @__PURE__ */
|
|
2926
|
+
icon: /* @__PURE__ */ jsx32(SearchXIcon, {}),
|
|
1915
2927
|
title: "No matching results",
|
|
1916
2928
|
description: "No records matched your search query or filter criteria.",
|
|
1917
2929
|
buttonText: "Clear search & filters",
|
|
@@ -1925,18 +2937,18 @@ function DataTableContentBody({
|
|
|
1925
2937
|
|
|
1926
2938
|
// src/components/composed/data-table/table-content-header.tsx
|
|
1927
2939
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
1928
|
-
import { jsx as
|
|
2940
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1929
2941
|
function DataTableContentHeader({
|
|
1930
2942
|
table
|
|
1931
2943
|
}) {
|
|
1932
|
-
return /* @__PURE__ */
|
|
2944
|
+
return /* @__PURE__ */ jsx33(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx33(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx33(TableHead, { children: header.isPlaceholder ? null : flexRender2(
|
|
1933
2945
|
header.column.columnDef.header,
|
|
1934
2946
|
header.getContext()
|
|
1935
2947
|
) }, header.id)) }, headerGroup.id)) });
|
|
1936
2948
|
}
|
|
1937
2949
|
|
|
1938
2950
|
// src/components/composed/data-table/table-footer-entries.tsx
|
|
1939
|
-
import { jsx as
|
|
2951
|
+
import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1940
2952
|
function DataTableFooterEntries({
|
|
1941
2953
|
table
|
|
1942
2954
|
}) {
|
|
@@ -1947,17 +2959,17 @@ function DataTableFooterEntries({
|
|
|
1947
2959
|
const totalRows = table.getFilteredRowModel().rows.length;
|
|
1948
2960
|
const startRow = totalRows === 0 ? 0 : pageIndex * pageSize + 1;
|
|
1949
2961
|
const endRow = Math.min((pageIndex + 1) * pageSize, totalRows);
|
|
1950
|
-
return /* @__PURE__ */
|
|
2962
|
+
return /* @__PURE__ */ jsxs23("div", { className: "flex-1 text-xs text-muted-foreground", children: [
|
|
1951
2963
|
"Showing",
|
|
1952
2964
|
" ",
|
|
1953
|
-
/* @__PURE__ */
|
|
2965
|
+
/* @__PURE__ */ jsxs23("span", { className: "font-medium text-foreground", children: [
|
|
1954
2966
|
startRow,
|
|
1955
2967
|
"-",
|
|
1956
2968
|
endRow
|
|
1957
2969
|
] }),
|
|
1958
2970
|
" ",
|
|
1959
2971
|
"of ",
|
|
1960
|
-
/* @__PURE__ */
|
|
2972
|
+
/* @__PURE__ */ jsx34("span", { className: "font-medium text-foreground", children: totalRows }),
|
|
1961
2973
|
" ",
|
|
1962
2974
|
"entries."
|
|
1963
2975
|
] });
|
|
@@ -1970,106 +2982,106 @@ import {
|
|
|
1970
2982
|
ChevronsLeftIcon,
|
|
1971
2983
|
ChevronsRightIcon
|
|
1972
2984
|
} from "lucide-react";
|
|
1973
|
-
import { jsx as
|
|
2985
|
+
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1974
2986
|
function DataTableFooterPagination({
|
|
1975
2987
|
table
|
|
1976
2988
|
}) {
|
|
1977
|
-
return /* @__PURE__ */
|
|
1978
|
-
/* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
2989
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1", children: [
|
|
2990
|
+
/* @__PURE__ */ jsxs24(Tooltip, { children: [
|
|
2991
|
+
/* @__PURE__ */ jsx35(
|
|
1980
2992
|
TooltipTrigger,
|
|
1981
2993
|
{
|
|
1982
|
-
render: /* @__PURE__ */
|
|
2994
|
+
render: /* @__PURE__ */ jsx35(
|
|
1983
2995
|
Button,
|
|
1984
2996
|
{
|
|
1985
2997
|
variant: "outline",
|
|
1986
2998
|
size: "icon-xs",
|
|
1987
2999
|
onClick: () => table.firstPage(),
|
|
1988
3000
|
disabled: !table.getCanPreviousPage(),
|
|
1989
|
-
children: /* @__PURE__ */
|
|
3001
|
+
children: /* @__PURE__ */ jsx35(ChevronsLeftIcon, {})
|
|
1990
3002
|
}
|
|
1991
3003
|
)
|
|
1992
3004
|
}
|
|
1993
3005
|
),
|
|
1994
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ jsx35(TooltipContent, { children: "Go to first page" })
|
|
1995
3007
|
] }),
|
|
1996
|
-
/* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
3008
|
+
/* @__PURE__ */ jsxs24(Tooltip, { children: [
|
|
3009
|
+
/* @__PURE__ */ jsx35(
|
|
1998
3010
|
TooltipTrigger,
|
|
1999
3011
|
{
|
|
2000
|
-
render: /* @__PURE__ */
|
|
3012
|
+
render: /* @__PURE__ */ jsx35(
|
|
2001
3013
|
Button,
|
|
2002
3014
|
{
|
|
2003
3015
|
variant: "outline",
|
|
2004
3016
|
size: "icon-xs",
|
|
2005
3017
|
onClick: () => table.previousPage(),
|
|
2006
3018
|
disabled: !table.getCanPreviousPage(),
|
|
2007
|
-
children: /* @__PURE__ */
|
|
3019
|
+
children: /* @__PURE__ */ jsx35(ChevronLeftIcon, {})
|
|
2008
3020
|
}
|
|
2009
3021
|
)
|
|
2010
3022
|
}
|
|
2011
3023
|
),
|
|
2012
|
-
/* @__PURE__ */
|
|
3024
|
+
/* @__PURE__ */ jsx35(TooltipContent, { children: "Go to previous page" })
|
|
2013
3025
|
] }),
|
|
2014
|
-
/* @__PURE__ */
|
|
2015
|
-
/* @__PURE__ */
|
|
3026
|
+
/* @__PURE__ */ jsxs24(Tooltip, { children: [
|
|
3027
|
+
/* @__PURE__ */ jsx35(
|
|
2016
3028
|
TooltipTrigger,
|
|
2017
3029
|
{
|
|
2018
|
-
render: /* @__PURE__ */
|
|
3030
|
+
render: /* @__PURE__ */ jsx35(
|
|
2019
3031
|
Button,
|
|
2020
3032
|
{
|
|
2021
3033
|
variant: "outline",
|
|
2022
3034
|
size: "icon-xs",
|
|
2023
3035
|
onClick: () => table.nextPage(),
|
|
2024
3036
|
disabled: !table.getCanNextPage(),
|
|
2025
|
-
children: /* @__PURE__ */
|
|
3037
|
+
children: /* @__PURE__ */ jsx35(ChevronRightIcon3, {})
|
|
2026
3038
|
}
|
|
2027
3039
|
)
|
|
2028
3040
|
}
|
|
2029
3041
|
),
|
|
2030
|
-
/* @__PURE__ */
|
|
3042
|
+
/* @__PURE__ */ jsx35(TooltipContent, { children: "Go to next page" })
|
|
2031
3043
|
] }),
|
|
2032
|
-
/* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */
|
|
3044
|
+
/* @__PURE__ */ jsxs24(Tooltip, { children: [
|
|
3045
|
+
/* @__PURE__ */ jsx35(
|
|
2034
3046
|
TooltipTrigger,
|
|
2035
3047
|
{
|
|
2036
|
-
render: /* @__PURE__ */
|
|
3048
|
+
render: /* @__PURE__ */ jsx35(
|
|
2037
3049
|
Button,
|
|
2038
3050
|
{
|
|
2039
3051
|
variant: "outline",
|
|
2040
3052
|
size: "icon-xs",
|
|
2041
3053
|
onClick: () => table.lastPage(),
|
|
2042
3054
|
disabled: !table.getCanNextPage(),
|
|
2043
|
-
children: /* @__PURE__ */
|
|
3055
|
+
children: /* @__PURE__ */ jsx35(ChevronsRightIcon, {})
|
|
2044
3056
|
}
|
|
2045
3057
|
)
|
|
2046
3058
|
}
|
|
2047
3059
|
),
|
|
2048
|
-
/* @__PURE__ */
|
|
3060
|
+
/* @__PURE__ */ jsx35(TooltipContent, { children: "Go to last page" })
|
|
2049
3061
|
] })
|
|
2050
3062
|
] });
|
|
2051
3063
|
}
|
|
2052
3064
|
|
|
2053
3065
|
// src/components/composed/data-table/table-header-add.tsx
|
|
2054
3066
|
import { PlusIcon } from "lucide-react";
|
|
2055
|
-
import { Fragment, jsx as
|
|
3067
|
+
import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2056
3068
|
function DataTableHeaderAdd({
|
|
2057
3069
|
onAdd,
|
|
2058
3070
|
addLabel
|
|
2059
3071
|
}) {
|
|
2060
|
-
return /* @__PURE__ */
|
|
2061
|
-
/* @__PURE__ */
|
|
2062
|
-
/* @__PURE__ */
|
|
3072
|
+
return /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
3073
|
+
/* @__PURE__ */ jsxs25(Tooltip, { children: [
|
|
3074
|
+
/* @__PURE__ */ jsx36(
|
|
2063
3075
|
TooltipTrigger,
|
|
2064
3076
|
{
|
|
2065
3077
|
className: "flex sm:hidden",
|
|
2066
|
-
render: /* @__PURE__ */
|
|
3078
|
+
render: /* @__PURE__ */ jsx36(Button, { variant: "default", size: "icon", onClick: onAdd, children: /* @__PURE__ */ jsx36(PlusIcon, {}) })
|
|
2067
3079
|
}
|
|
2068
3080
|
),
|
|
2069
|
-
/* @__PURE__ */
|
|
3081
|
+
/* @__PURE__ */ jsx36(TooltipContent, { children: addLabel != null ? addLabel : "Add" })
|
|
2070
3082
|
] }),
|
|
2071
|
-
/* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
3083
|
+
/* @__PURE__ */ jsxs25(Button, { variant: "default", onClick: onAdd, className: "hidden sm:flex", children: [
|
|
3084
|
+
/* @__PURE__ */ jsx36(PlusIcon, {}),
|
|
2073
3085
|
addLabel != null ? addLabel : "Add"
|
|
2074
3086
|
] })
|
|
2075
3087
|
] });
|
|
@@ -2222,7 +3234,7 @@ function printTable(headers, rows, title = "Data Export") {
|
|
|
2222
3234
|
}
|
|
2223
3235
|
|
|
2224
3236
|
// src/components/composed/data-table/table-header-download.tsx
|
|
2225
|
-
import { jsx as
|
|
3237
|
+
import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2226
3238
|
function getTableExportData(table) {
|
|
2227
3239
|
const columns = table.getAllColumns().filter(
|
|
2228
3240
|
(col) => typeof col.accessorFn !== "undefined" && col.getIsVisible()
|
|
@@ -2265,25 +3277,25 @@ function DataTableHeaderDownload({
|
|
|
2265
3277
|
exportFilename,
|
|
2266
3278
|
onDownload
|
|
2267
3279
|
}) {
|
|
2268
|
-
return /* @__PURE__ */
|
|
2269
|
-
/* @__PURE__ */
|
|
2270
|
-
/* @__PURE__ */
|
|
3280
|
+
return /* @__PURE__ */ jsxs26(DropdownMenu, { children: [
|
|
3281
|
+
/* @__PURE__ */ jsxs26(Tooltip, { children: [
|
|
3282
|
+
/* @__PURE__ */ jsx37(
|
|
2271
3283
|
DropdownMenuTrigger,
|
|
2272
3284
|
{
|
|
2273
|
-
render: /* @__PURE__ */
|
|
3285
|
+
render: /* @__PURE__ */ jsx37(
|
|
2274
3286
|
TooltipTrigger,
|
|
2275
3287
|
{
|
|
2276
|
-
render: /* @__PURE__ */
|
|
3288
|
+
render: /* @__PURE__ */ jsx37(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ jsx37(DownloadIcon, {}) })
|
|
2277
3289
|
}
|
|
2278
3290
|
)
|
|
2279
3291
|
}
|
|
2280
3292
|
),
|
|
2281
|
-
/* @__PURE__ */
|
|
3293
|
+
/* @__PURE__ */ jsx37(TooltipContent, { children: "Download options" })
|
|
2282
3294
|
] }),
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
/* @__PURE__ */
|
|
2285
|
-
/* @__PURE__ */
|
|
2286
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ jsx37(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ jsxs26(DropdownMenuGroup, { children: [
|
|
3296
|
+
/* @__PURE__ */ jsx37(DropdownMenuLabel, { children: "Download data" }),
|
|
3297
|
+
/* @__PURE__ */ jsx37(DropdownMenuSeparator, {}),
|
|
3298
|
+
/* @__PURE__ */ jsxs26(
|
|
2287
3299
|
DropdownMenuItem,
|
|
2288
3300
|
{
|
|
2289
3301
|
className: "hover:cursor-pointer",
|
|
@@ -2293,12 +3305,12 @@ function DataTableHeaderDownload({
|
|
|
2293
3305
|
onDownload == null ? void 0 : onDownload();
|
|
2294
3306
|
},
|
|
2295
3307
|
children: [
|
|
2296
|
-
/* @__PURE__ */
|
|
3308
|
+
/* @__PURE__ */ jsx37(FileTextIcon, {}),
|
|
2297
3309
|
"Download PDF"
|
|
2298
3310
|
]
|
|
2299
3311
|
}
|
|
2300
3312
|
),
|
|
2301
|
-
/* @__PURE__ */
|
|
3313
|
+
/* @__PURE__ */ jsxs26(
|
|
2302
3314
|
DropdownMenuItem,
|
|
2303
3315
|
{
|
|
2304
3316
|
className: "hover:cursor-pointer",
|
|
@@ -2308,12 +3320,12 @@ function DataTableHeaderDownload({
|
|
|
2308
3320
|
onDownload == null ? void 0 : onDownload();
|
|
2309
3321
|
},
|
|
2310
3322
|
children: [
|
|
2311
|
-
/* @__PURE__ */
|
|
3323
|
+
/* @__PURE__ */ jsx37(FileSpreadsheetIcon, {}),
|
|
2312
3324
|
"Download Excel"
|
|
2313
3325
|
]
|
|
2314
3326
|
}
|
|
2315
3327
|
),
|
|
2316
|
-
/* @__PURE__ */
|
|
3328
|
+
/* @__PURE__ */ jsxs26(
|
|
2317
3329
|
DropdownMenuItem,
|
|
2318
3330
|
{
|
|
2319
3331
|
className: "hover:cursor-pointer",
|
|
@@ -2323,13 +3335,13 @@ function DataTableHeaderDownload({
|
|
|
2323
3335
|
onDownload == null ? void 0 : onDownload();
|
|
2324
3336
|
},
|
|
2325
3337
|
children: [
|
|
2326
|
-
/* @__PURE__ */
|
|
3338
|
+
/* @__PURE__ */ jsx37(FileCodeIcon, {}),
|
|
2327
3339
|
"Download CSV"
|
|
2328
3340
|
]
|
|
2329
3341
|
}
|
|
2330
3342
|
),
|
|
2331
|
-
/* @__PURE__ */
|
|
2332
|
-
/* @__PURE__ */
|
|
3343
|
+
/* @__PURE__ */ jsx37(DropdownMenuSeparator, {}),
|
|
3344
|
+
/* @__PURE__ */ jsxs26(
|
|
2333
3345
|
DropdownMenuItem,
|
|
2334
3346
|
{
|
|
2335
3347
|
className: "hover:cursor-pointer",
|
|
@@ -2338,7 +3350,7 @@ function DataTableHeaderDownload({
|
|
|
2338
3350
|
printTable(headers, rows, exportFilename);
|
|
2339
3351
|
},
|
|
2340
3352
|
children: [
|
|
2341
|
-
/* @__PURE__ */
|
|
3353
|
+
/* @__PURE__ */ jsx37(PrinterIcon, {}),
|
|
2342
3354
|
"Print Table"
|
|
2343
3355
|
]
|
|
2344
3356
|
}
|
|
@@ -2350,10 +3362,10 @@ function DataTableHeaderDownload({
|
|
|
2350
3362
|
// src/components/composed/data-table/table-header-filter.tsx
|
|
2351
3363
|
import { format } from "date-fns";
|
|
2352
3364
|
import { CalendarIcon, ListFilterIcon } from "lucide-react";
|
|
2353
|
-
import { useMemo as
|
|
3365
|
+
import { useMemo as useMemo4, useState as useState4 } from "react";
|
|
2354
3366
|
|
|
2355
3367
|
// src/components/ui/calendar.tsx
|
|
2356
|
-
import { cn as
|
|
3368
|
+
import { cn as cn28 } from "cn";
|
|
2357
3369
|
import {
|
|
2358
3370
|
ChevronDownIcon,
|
|
2359
3371
|
ChevronLeftIcon as ChevronLeftIcon2,
|
|
@@ -2364,7 +3376,7 @@ import {
|
|
|
2364
3376
|
DayPicker,
|
|
2365
3377
|
getDefaultClassNames
|
|
2366
3378
|
} from "react-day-picker";
|
|
2367
|
-
import { jsx as
|
|
3379
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2368
3380
|
function Calendar(_a) {
|
|
2369
3381
|
var _b = _a, {
|
|
2370
3382
|
className,
|
|
@@ -2386,11 +3398,11 @@ function Calendar(_a) {
|
|
|
2386
3398
|
"components"
|
|
2387
3399
|
]);
|
|
2388
3400
|
const defaultClassNames = getDefaultClassNames();
|
|
2389
|
-
return /* @__PURE__ */
|
|
3401
|
+
return /* @__PURE__ */ jsx38(
|
|
2390
3402
|
DayPicker,
|
|
2391
3403
|
__spreadValues({
|
|
2392
3404
|
showOutsideDays,
|
|
2393
|
-
className:
|
|
3405
|
+
className: cn28(
|
|
2394
3406
|
"group/calendar bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(6)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
2395
3407
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
2396
3408
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
@@ -2402,124 +3414,124 @@ function Calendar(_a) {
|
|
|
2402
3414
|
formatMonthDropdown: (date) => date.toLocaleString(locale == null ? void 0 : locale.code, { month: "short" })
|
|
2403
3415
|
}, formatters),
|
|
2404
3416
|
classNames: __spreadValues({
|
|
2405
|
-
root:
|
|
2406
|
-
months:
|
|
3417
|
+
root: cn28("w-fit", defaultClassNames.root),
|
|
3418
|
+
months: cn28(
|
|
2407
3419
|
"relative flex flex-col gap-4 md:flex-row",
|
|
2408
3420
|
defaultClassNames.months
|
|
2409
3421
|
),
|
|
2410
|
-
month:
|
|
2411
|
-
nav:
|
|
3422
|
+
month: cn28("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
3423
|
+
nav: cn28(
|
|
2412
3424
|
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
2413
3425
|
defaultClassNames.nav
|
|
2414
3426
|
),
|
|
2415
|
-
button_previous:
|
|
3427
|
+
button_previous: cn28(
|
|
2416
3428
|
buttonVariants({ variant: buttonVariant }),
|
|
2417
3429
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
2418
3430
|
defaultClassNames.button_previous
|
|
2419
3431
|
),
|
|
2420
|
-
button_next:
|
|
3432
|
+
button_next: cn28(
|
|
2421
3433
|
buttonVariants({ variant: buttonVariant }),
|
|
2422
3434
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
2423
3435
|
defaultClassNames.button_next
|
|
2424
3436
|
),
|
|
2425
|
-
month_caption:
|
|
3437
|
+
month_caption: cn28(
|
|
2426
3438
|
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
2427
3439
|
defaultClassNames.month_caption
|
|
2428
3440
|
),
|
|
2429
|
-
dropdowns:
|
|
3441
|
+
dropdowns: cn28(
|
|
2430
3442
|
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
2431
3443
|
defaultClassNames.dropdowns
|
|
2432
3444
|
),
|
|
2433
|
-
dropdown_root:
|
|
3445
|
+
dropdown_root: cn28(
|
|
2434
3446
|
"relative rounded-(--cell-radius)",
|
|
2435
3447
|
defaultClassNames.dropdown_root
|
|
2436
3448
|
),
|
|
2437
|
-
dropdown:
|
|
3449
|
+
dropdown: cn28(
|
|
2438
3450
|
"absolute inset-0 bg-popover opacity-0",
|
|
2439
3451
|
defaultClassNames.dropdown
|
|
2440
3452
|
),
|
|
2441
|
-
caption_label:
|
|
3453
|
+
caption_label: cn28(
|
|
2442
3454
|
"font-medium select-none",
|
|
2443
3455
|
captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
2444
3456
|
defaultClassNames.caption_label
|
|
2445
3457
|
),
|
|
2446
|
-
month_grid:
|
|
2447
|
-
weekdays:
|
|
2448
|
-
weekday:
|
|
3458
|
+
month_grid: cn28("w-full border-collapse", defaultClassNames.month_grid),
|
|
3459
|
+
weekdays: cn28("flex", defaultClassNames.weekdays),
|
|
3460
|
+
weekday: cn28(
|
|
2449
3461
|
"flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
2450
3462
|
defaultClassNames.weekday
|
|
2451
3463
|
),
|
|
2452
|
-
week:
|
|
2453
|
-
week_number_header:
|
|
3464
|
+
week: cn28("mt-2 flex w-full", defaultClassNames.week),
|
|
3465
|
+
week_number_header: cn28(
|
|
2454
3466
|
"w-(--cell-size) select-none",
|
|
2455
3467
|
defaultClassNames.week_number_header
|
|
2456
3468
|
),
|
|
2457
|
-
week_number:
|
|
3469
|
+
week_number: cn28(
|
|
2458
3470
|
"text-[0.8rem] text-muted-foreground select-none",
|
|
2459
3471
|
defaultClassNames.week_number
|
|
2460
3472
|
),
|
|
2461
|
-
day:
|
|
3473
|
+
day: cn28(
|
|
2462
3474
|
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
|
|
2463
3475
|
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
|
|
2464
3476
|
defaultClassNames.day
|
|
2465
3477
|
),
|
|
2466
|
-
range_start:
|
|
3478
|
+
range_start: cn28(
|
|
2467
3479
|
"relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",
|
|
2468
3480
|
defaultClassNames.range_start
|
|
2469
3481
|
),
|
|
2470
|
-
range_middle:
|
|
2471
|
-
range_end:
|
|
3482
|
+
range_middle: cn28("rounded-none", defaultClassNames.range_middle),
|
|
3483
|
+
range_end: cn28(
|
|
2472
3484
|
"relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",
|
|
2473
3485
|
defaultClassNames.range_end
|
|
2474
3486
|
),
|
|
2475
|
-
today:
|
|
3487
|
+
today: cn28(
|
|
2476
3488
|
"rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
|
|
2477
3489
|
defaultClassNames.today
|
|
2478
3490
|
),
|
|
2479
|
-
outside:
|
|
3491
|
+
outside: cn28(
|
|
2480
3492
|
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
2481
3493
|
defaultClassNames.outside
|
|
2482
3494
|
),
|
|
2483
|
-
disabled:
|
|
3495
|
+
disabled: cn28(
|
|
2484
3496
|
"text-muted-foreground opacity-50",
|
|
2485
3497
|
defaultClassNames.disabled
|
|
2486
3498
|
),
|
|
2487
|
-
hidden:
|
|
3499
|
+
hidden: cn28("invisible", defaultClassNames.hidden)
|
|
2488
3500
|
}, classNames),
|
|
2489
3501
|
components: __spreadValues({
|
|
2490
3502
|
Root: (_a2) => {
|
|
2491
3503
|
var _b2 = _a2, { className: className2, rootRef } = _b2, props2 = __objRest(_b2, ["className", "rootRef"]);
|
|
2492
|
-
return /* @__PURE__ */
|
|
3504
|
+
return /* @__PURE__ */ jsx38(
|
|
2493
3505
|
"div",
|
|
2494
3506
|
__spreadValues({
|
|
2495
3507
|
"data-slot": "calendar",
|
|
2496
3508
|
ref: rootRef,
|
|
2497
|
-
className:
|
|
3509
|
+
className: cn28(className2)
|
|
2498
3510
|
}, props2)
|
|
2499
3511
|
);
|
|
2500
3512
|
},
|
|
2501
3513
|
Chevron: (_c) => {
|
|
2502
3514
|
var _d = _c, { className: className2, orientation } = _d, props2 = __objRest(_d, ["className", "orientation"]);
|
|
2503
3515
|
if (orientation === "left") {
|
|
2504
|
-
return /* @__PURE__ */
|
|
3516
|
+
return /* @__PURE__ */ jsx38(ChevronLeftIcon2, __spreadValues({ className: cn28("size-4", className2) }, props2));
|
|
2505
3517
|
}
|
|
2506
3518
|
if (orientation === "right") {
|
|
2507
|
-
return /* @__PURE__ */
|
|
3519
|
+
return /* @__PURE__ */ jsx38(
|
|
2508
3520
|
ChevronRightIcon4,
|
|
2509
3521
|
__spreadValues({
|
|
2510
|
-
className:
|
|
3522
|
+
className: cn28("size-4", className2)
|
|
2511
3523
|
}, props2)
|
|
2512
3524
|
);
|
|
2513
3525
|
}
|
|
2514
|
-
return /* @__PURE__ */
|
|
3526
|
+
return /* @__PURE__ */ jsx38(ChevronDownIcon, __spreadValues({ className: cn28("size-4", className2) }, props2));
|
|
2515
3527
|
},
|
|
2516
3528
|
DayButton: (_e) => {
|
|
2517
3529
|
var props2 = __objRest(_e, []);
|
|
2518
|
-
return /* @__PURE__ */
|
|
3530
|
+
return /* @__PURE__ */ jsx38(CalendarDayButton, __spreadValues({ locale }, props2));
|
|
2519
3531
|
},
|
|
2520
3532
|
WeekNumber: (_f) => {
|
|
2521
3533
|
var _g = _f, { children } = _g, props2 = __objRest(_g, ["children"]);
|
|
2522
|
-
return /* @__PURE__ */
|
|
3534
|
+
return /* @__PURE__ */ jsx38("td", __spreadProps(__spreadValues({}, props2), { children: /* @__PURE__ */ jsx38("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
|
|
2523
3535
|
}
|
|
2524
3536
|
}, components)
|
|
2525
3537
|
}, props)
|
|
@@ -2543,7 +3555,7 @@ function CalendarDayButton(_a) {
|
|
|
2543
3555
|
var _a2;
|
|
2544
3556
|
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
2545
3557
|
}, [modifiers.focused]);
|
|
2546
|
-
return /* @__PURE__ */
|
|
3558
|
+
return /* @__PURE__ */ jsx38(
|
|
2547
3559
|
Button,
|
|
2548
3560
|
__spreadValues({
|
|
2549
3561
|
variant: "ghost",
|
|
@@ -2553,7 +3565,7 @@ function CalendarDayButton(_a) {
|
|
|
2553
3565
|
"data-range-start": modifiers.range_start,
|
|
2554
3566
|
"data-range-end": modifiers.range_end,
|
|
2555
3567
|
"data-range-middle": modifiers.range_middle,
|
|
2556
|
-
className:
|
|
3568
|
+
className: cn28(
|
|
2557
3569
|
"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
2558
3570
|
defaultClassNames.day,
|
|
2559
3571
|
className
|
|
@@ -2564,15 +3576,15 @@ function CalendarDayButton(_a) {
|
|
|
2564
3576
|
|
|
2565
3577
|
// src/components/ui/popover.tsx
|
|
2566
3578
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
2567
|
-
import { cn as
|
|
2568
|
-
import { jsx as
|
|
3579
|
+
import { cn as cn29 } from "cn";
|
|
3580
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2569
3581
|
function Popover(_a) {
|
|
2570
3582
|
var props = __objRest(_a, []);
|
|
2571
|
-
return /* @__PURE__ */
|
|
3583
|
+
return /* @__PURE__ */ jsx39(PopoverPrimitive.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
2572
3584
|
}
|
|
2573
3585
|
function PopoverTrigger(_a) {
|
|
2574
3586
|
var props = __objRest(_a, []);
|
|
2575
|
-
return /* @__PURE__ */
|
|
3587
|
+
return /* @__PURE__ */ jsx39(PopoverPrimitive.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
|
|
2576
3588
|
}
|
|
2577
3589
|
function PopoverContent(_a) {
|
|
2578
3590
|
var _b = _a, {
|
|
@@ -2588,7 +3600,7 @@ function PopoverContent(_a) {
|
|
|
2588
3600
|
"side",
|
|
2589
3601
|
"sideOffset"
|
|
2590
3602
|
]);
|
|
2591
|
-
return /* @__PURE__ */
|
|
3603
|
+
return /* @__PURE__ */ jsx39(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx39(
|
|
2592
3604
|
PopoverPrimitive.Positioner,
|
|
2593
3605
|
{
|
|
2594
3606
|
align,
|
|
@@ -2596,11 +3608,11 @@ function PopoverContent(_a) {
|
|
|
2596
3608
|
side,
|
|
2597
3609
|
sideOffset,
|
|
2598
3610
|
className: "isolate z-50",
|
|
2599
|
-
children: /* @__PURE__ */
|
|
3611
|
+
children: /* @__PURE__ */ jsx39(
|
|
2600
3612
|
PopoverPrimitive.Popup,
|
|
2601
3613
|
__spreadValues({
|
|
2602
3614
|
"data-slot": "popover-content",
|
|
2603
|
-
className:
|
|
3615
|
+
className: cn29(
|
|
2604
3616
|
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-lg bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
2605
3617
|
className
|
|
2606
3618
|
)
|
|
@@ -2612,17 +3624,17 @@ function PopoverContent(_a) {
|
|
|
2612
3624
|
|
|
2613
3625
|
// src/components/ui/select.tsx
|
|
2614
3626
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
2615
|
-
import { cn as
|
|
2616
|
-
import { CheckIcon as
|
|
2617
|
-
import { jsx as
|
|
3627
|
+
import { cn as cn30 } from "cn";
|
|
3628
|
+
import { CheckIcon as CheckIcon4, ChevronDownIcon as ChevronDownIcon2, ChevronUpIcon } from "lucide-react";
|
|
3629
|
+
import { jsx as jsx40, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2618
3630
|
var Select = SelectPrimitive.Root;
|
|
2619
3631
|
function SelectValue(_a) {
|
|
2620
3632
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2621
|
-
return /* @__PURE__ */
|
|
3633
|
+
return /* @__PURE__ */ jsx40(
|
|
2622
3634
|
SelectPrimitive.Value,
|
|
2623
3635
|
__spreadValues({
|
|
2624
3636
|
"data-slot": "select-value",
|
|
2625
|
-
className:
|
|
3637
|
+
className: cn30("flex flex-1 text-left", className)
|
|
2626
3638
|
}, props)
|
|
2627
3639
|
);
|
|
2628
3640
|
}
|
|
@@ -2636,22 +3648,22 @@ function SelectTrigger(_a) {
|
|
|
2636
3648
|
"size",
|
|
2637
3649
|
"children"
|
|
2638
3650
|
]);
|
|
2639
|
-
return /* @__PURE__ */
|
|
3651
|
+
return /* @__PURE__ */ jsxs27(
|
|
2640
3652
|
SelectPrimitive.Trigger,
|
|
2641
3653
|
__spreadProps(__spreadValues({
|
|
2642
3654
|
"data-slot": "select-trigger",
|
|
2643
3655
|
"data-size": size,
|
|
2644
|
-
className:
|
|
3656
|
+
className: cn30(
|
|
2645
3657
|
"flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
|
|
2646
3658
|
className
|
|
2647
3659
|
)
|
|
2648
3660
|
}, props), {
|
|
2649
3661
|
children: [
|
|
2650
3662
|
children,
|
|
2651
|
-
/* @__PURE__ */
|
|
3663
|
+
/* @__PURE__ */ jsx40(
|
|
2652
3664
|
SelectPrimitive.Icon,
|
|
2653
3665
|
{
|
|
2654
|
-
render: /* @__PURE__ */
|
|
3666
|
+
render: /* @__PURE__ */ jsx40(ChevronDownIcon2, { className: "pointer-events-none size-3.5 text-muted-foreground" })
|
|
2655
3667
|
}
|
|
2656
3668
|
)
|
|
2657
3669
|
]
|
|
@@ -2676,7 +3688,7 @@ function SelectContent(_a) {
|
|
|
2676
3688
|
"alignOffset",
|
|
2677
3689
|
"alignItemWithTrigger"
|
|
2678
3690
|
]);
|
|
2679
|
-
return /* @__PURE__ */
|
|
3691
|
+
return /* @__PURE__ */ jsx40(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx40(
|
|
2680
3692
|
SelectPrimitive.Positioner,
|
|
2681
3693
|
{
|
|
2682
3694
|
side,
|
|
@@ -2685,20 +3697,20 @@ function SelectContent(_a) {
|
|
|
2685
3697
|
alignOffset,
|
|
2686
3698
|
alignItemWithTrigger,
|
|
2687
3699
|
className: "isolate z-50",
|
|
2688
|
-
children: /* @__PURE__ */
|
|
3700
|
+
children: /* @__PURE__ */ jsxs27(
|
|
2689
3701
|
SelectPrimitive.Popup,
|
|
2690
3702
|
__spreadProps(__spreadValues({
|
|
2691
3703
|
"data-slot": "select-content",
|
|
2692
3704
|
"data-align-trigger": alignItemWithTrigger,
|
|
2693
|
-
className:
|
|
3705
|
+
className: cn30(
|
|
2694
3706
|
"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
2695
3707
|
className
|
|
2696
3708
|
)
|
|
2697
3709
|
}, props), {
|
|
2698
3710
|
children: [
|
|
2699
|
-
/* @__PURE__ */
|
|
2700
|
-
/* @__PURE__ */
|
|
2701
|
-
/* @__PURE__ */
|
|
3711
|
+
/* @__PURE__ */ jsx40(SelectScrollUpButton, {}),
|
|
3712
|
+
/* @__PURE__ */ jsx40(SelectPrimitive.List, { children }),
|
|
3713
|
+
/* @__PURE__ */ jsx40(SelectScrollDownButton, {})
|
|
2702
3714
|
]
|
|
2703
3715
|
})
|
|
2704
3716
|
)
|
|
@@ -2713,22 +3725,22 @@ function SelectItem(_a) {
|
|
|
2713
3725
|
"className",
|
|
2714
3726
|
"children"
|
|
2715
3727
|
]);
|
|
2716
|
-
return /* @__PURE__ */
|
|
3728
|
+
return /* @__PURE__ */ jsxs27(
|
|
2717
3729
|
SelectPrimitive.Item,
|
|
2718
3730
|
__spreadProps(__spreadValues({
|
|
2719
3731
|
"data-slot": "select-item",
|
|
2720
|
-
className:
|
|
3732
|
+
className: cn30(
|
|
2721
3733
|
"relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
2722
3734
|
className
|
|
2723
3735
|
)
|
|
2724
3736
|
}, props), {
|
|
2725
3737
|
children: [
|
|
2726
|
-
/* @__PURE__ */
|
|
2727
|
-
/* @__PURE__ */
|
|
3738
|
+
/* @__PURE__ */ jsx40(SelectPrimitive.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
3739
|
+
/* @__PURE__ */ jsx40(
|
|
2728
3740
|
SelectPrimitive.ItemIndicator,
|
|
2729
3741
|
{
|
|
2730
|
-
render: /* @__PURE__ */
|
|
2731
|
-
children: /* @__PURE__ */
|
|
3742
|
+
render: /* @__PURE__ */ jsx40("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center" }),
|
|
3743
|
+
children: /* @__PURE__ */ jsx40(CheckIcon4, { className: "pointer-events-none" })
|
|
2732
3744
|
}
|
|
2733
3745
|
)
|
|
2734
3746
|
]
|
|
@@ -2741,16 +3753,16 @@ function SelectScrollUpButton(_a) {
|
|
|
2741
3753
|
} = _b, props = __objRest(_b, [
|
|
2742
3754
|
"className"
|
|
2743
3755
|
]);
|
|
2744
|
-
return /* @__PURE__ */
|
|
3756
|
+
return /* @__PURE__ */ jsx40(
|
|
2745
3757
|
SelectPrimitive.ScrollUpArrow,
|
|
2746
3758
|
__spreadProps(__spreadValues({
|
|
2747
3759
|
"data-slot": "select-scroll-up-button",
|
|
2748
|
-
className:
|
|
3760
|
+
className: cn30(
|
|
2749
3761
|
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
2750
3762
|
className
|
|
2751
3763
|
)
|
|
2752
3764
|
}, props), {
|
|
2753
|
-
children: /* @__PURE__ */
|
|
3765
|
+
children: /* @__PURE__ */ jsx40(ChevronUpIcon, {})
|
|
2754
3766
|
})
|
|
2755
3767
|
);
|
|
2756
3768
|
}
|
|
@@ -2760,22 +3772,22 @@ function SelectScrollDownButton(_a) {
|
|
|
2760
3772
|
} = _b, props = __objRest(_b, [
|
|
2761
3773
|
"className"
|
|
2762
3774
|
]);
|
|
2763
|
-
return /* @__PURE__ */
|
|
3775
|
+
return /* @__PURE__ */ jsx40(
|
|
2764
3776
|
SelectPrimitive.ScrollDownArrow,
|
|
2765
3777
|
__spreadProps(__spreadValues({
|
|
2766
3778
|
"data-slot": "select-scroll-down-button",
|
|
2767
|
-
className:
|
|
3779
|
+
className: cn30(
|
|
2768
3780
|
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
2769
3781
|
className
|
|
2770
3782
|
)
|
|
2771
3783
|
}, props), {
|
|
2772
|
-
children: /* @__PURE__ */
|
|
3784
|
+
children: /* @__PURE__ */ jsx40(ChevronDownIcon2, {})
|
|
2773
3785
|
})
|
|
2774
3786
|
);
|
|
2775
3787
|
}
|
|
2776
3788
|
|
|
2777
3789
|
// src/components/composed/data-table/table-header-filter.tsx
|
|
2778
|
-
import { Fragment as
|
|
3790
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2779
3791
|
function smartFilterFn(row, columnId, filterValue) {
|
|
2780
3792
|
var _a, _b, _c;
|
|
2781
3793
|
if (filterValue === void 0 || filterValue === null || filterValue === "" || filterValue === "all") {
|
|
@@ -2916,13 +3928,13 @@ function ColumnFilterInput({
|
|
|
2916
3928
|
table,
|
|
2917
3929
|
headerText
|
|
2918
3930
|
}) {
|
|
2919
|
-
const [calendarOpen, setCalendarOpen] =
|
|
3931
|
+
const [calendarOpen, setCalendarOpen] = useState4(false);
|
|
2920
3932
|
const filterValue = column.getFilterValue();
|
|
2921
|
-
const variant =
|
|
3933
|
+
const variant = useMemo4(
|
|
2922
3934
|
() => getFilterVariant(column, table),
|
|
2923
3935
|
[column, table]
|
|
2924
3936
|
);
|
|
2925
|
-
const options =
|
|
3937
|
+
const options = useMemo4(() => {
|
|
2926
3938
|
if (variant === "boolean") {
|
|
2927
3939
|
return [
|
|
2928
3940
|
{ label: "True / Yes", value: "true" },
|
|
@@ -2936,7 +3948,7 @@ function ColumnFilterInput({
|
|
|
2936
3948
|
}, [column, table, variant]);
|
|
2937
3949
|
if (variant === "boolean" || variant === "select") {
|
|
2938
3950
|
const currentValue = filterValue === void 0 || filterValue === null || filterValue === "" ? "all" : String(filterValue);
|
|
2939
|
-
return /* @__PURE__ */
|
|
3951
|
+
return /* @__PURE__ */ jsx41("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ jsxs28(
|
|
2940
3952
|
Select,
|
|
2941
3953
|
{
|
|
2942
3954
|
value: currentValue,
|
|
@@ -2948,13 +3960,13 @@ function ColumnFilterInput({
|
|
|
2948
3960
|
}
|
|
2949
3961
|
},
|
|
2950
3962
|
children: [
|
|
2951
|
-
/* @__PURE__ */
|
|
3963
|
+
/* @__PURE__ */ jsx41(
|
|
2952
3964
|
SelectTrigger,
|
|
2953
3965
|
{
|
|
2954
3966
|
className: "w-full",
|
|
2955
3967
|
onKeyDown: (e) => e.stopPropagation(),
|
|
2956
3968
|
onPointerDown: (e) => e.stopPropagation(),
|
|
2957
|
-
children: /* @__PURE__ */
|
|
3969
|
+
children: /* @__PURE__ */ jsx41(
|
|
2958
3970
|
SelectValue,
|
|
2959
3971
|
{
|
|
2960
3972
|
placeholder: `Select ${headerText.toLowerCase()}...`,
|
|
@@ -2963,9 +3975,9 @@ function ColumnFilterInput({
|
|
|
2963
3975
|
)
|
|
2964
3976
|
}
|
|
2965
3977
|
),
|
|
2966
|
-
/* @__PURE__ */
|
|
2967
|
-
/* @__PURE__ */
|
|
2968
|
-
options.map((opt) => /* @__PURE__ */
|
|
3978
|
+
/* @__PURE__ */ jsxs28(SelectContent, { align: "start", children: [
|
|
3979
|
+
/* @__PURE__ */ jsx41(SelectItem, { value: "all", children: "All" }),
|
|
3980
|
+
options.map((opt) => /* @__PURE__ */ jsx41(
|
|
2969
3981
|
SelectItem,
|
|
2970
3982
|
{
|
|
2971
3983
|
value: opt.value,
|
|
@@ -2992,36 +4004,36 @@ function ColumnFilterInput({
|
|
|
2992
4004
|
}
|
|
2993
4005
|
}
|
|
2994
4006
|
const formattedDateLabel = dateObj ? format(dateObj, "yyyy-MM-dd") : "";
|
|
2995
|
-
return /* @__PURE__ */
|
|
2996
|
-
/* @__PURE__ */
|
|
4007
|
+
return /* @__PURE__ */ jsx41("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ jsxs28(Popover, { open: calendarOpen, onOpenChange: setCalendarOpen, children: [
|
|
4008
|
+
/* @__PURE__ */ jsx41(
|
|
2997
4009
|
PopoverTrigger,
|
|
2998
4010
|
{
|
|
2999
|
-
render: /* @__PURE__ */
|
|
4011
|
+
render: /* @__PURE__ */ jsxs28(
|
|
3000
4012
|
Button,
|
|
3001
4013
|
{
|
|
3002
4014
|
variant: "outline",
|
|
3003
|
-
className:
|
|
4015
|
+
className: cn26(
|
|
3004
4016
|
"w-full justify-start",
|
|
3005
4017
|
!formattedDateLabel && "text-muted-foreground"
|
|
3006
4018
|
),
|
|
3007
4019
|
onKeyDown: (e) => e.stopPropagation(),
|
|
3008
4020
|
onPointerDown: (e) => e.stopPropagation(),
|
|
3009
4021
|
children: [
|
|
3010
|
-
/* @__PURE__ */
|
|
3011
|
-
/* @__PURE__ */
|
|
4022
|
+
/* @__PURE__ */ jsx41(CalendarIcon, { className: "mr-1 size-3 shrink-0" }),
|
|
4023
|
+
/* @__PURE__ */ jsx41("span", { className: "truncate", children: formattedDateLabel || `Pick ${headerText.toLowerCase()}...` })
|
|
3012
4024
|
]
|
|
3013
4025
|
}
|
|
3014
4026
|
)
|
|
3015
4027
|
}
|
|
3016
4028
|
),
|
|
3017
|
-
/* @__PURE__ */
|
|
4029
|
+
/* @__PURE__ */ jsx41(
|
|
3018
4030
|
PopoverContent,
|
|
3019
4031
|
{
|
|
3020
4032
|
className: "w-auto p-0",
|
|
3021
4033
|
align: "start",
|
|
3022
4034
|
onPointerDown: (e) => e.stopPropagation(),
|
|
3023
4035
|
onKeyDown: (e) => e.stopPropagation(),
|
|
3024
|
-
children: /* @__PURE__ */
|
|
4036
|
+
children: /* @__PURE__ */ jsx41(
|
|
3025
4037
|
Calendar,
|
|
3026
4038
|
{
|
|
3027
4039
|
mode: "single",
|
|
@@ -3040,7 +4052,7 @@ function ColumnFilterInput({
|
|
|
3040
4052
|
)
|
|
3041
4053
|
] }) });
|
|
3042
4054
|
}
|
|
3043
|
-
return /* @__PURE__ */
|
|
4055
|
+
return /* @__PURE__ */ jsx41("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ jsx41(
|
|
3044
4056
|
Input,
|
|
3045
4057
|
{
|
|
3046
4058
|
id: `filter-${column.id}`,
|
|
@@ -3057,46 +4069,46 @@ function DataTableHeaderFilter({
|
|
|
3057
4069
|
table,
|
|
3058
4070
|
columnFilters
|
|
3059
4071
|
}) {
|
|
3060
|
-
const filterableColumns =
|
|
4072
|
+
const filterableColumns = useMemo4(
|
|
3061
4073
|
() => table.getAllColumns().filter(
|
|
3062
4074
|
(column) => typeof column.accessorFn !== "undefined" && column.getCanFilter()
|
|
3063
4075
|
),
|
|
3064
4076
|
[table]
|
|
3065
4077
|
);
|
|
3066
4078
|
if (filterableColumns.length === 0) return null;
|
|
3067
|
-
return /* @__PURE__ */
|
|
3068
|
-
/* @__PURE__ */
|
|
3069
|
-
/* @__PURE__ */
|
|
4079
|
+
return /* @__PURE__ */ jsxs28(DropdownMenu, { children: [
|
|
4080
|
+
/* @__PURE__ */ jsxs28(Tooltip, { children: [
|
|
4081
|
+
/* @__PURE__ */ jsx41(
|
|
3070
4082
|
DropdownMenuTrigger,
|
|
3071
4083
|
{
|
|
3072
|
-
render: /* @__PURE__ */
|
|
4084
|
+
render: /* @__PURE__ */ jsx41(
|
|
3073
4085
|
TooltipTrigger,
|
|
3074
4086
|
{
|
|
3075
|
-
render: /* @__PURE__ */
|
|
4087
|
+
render: /* @__PURE__ */ jsx41(
|
|
3076
4088
|
Button,
|
|
3077
4089
|
{
|
|
3078
4090
|
variant: columnFilters.length > 0 ? "secondary" : "outline",
|
|
3079
4091
|
size: "icon",
|
|
3080
|
-
children: /* @__PURE__ */
|
|
4092
|
+
children: /* @__PURE__ */ jsx41(ListFilterIcon, {})
|
|
3081
4093
|
}
|
|
3082
4094
|
)
|
|
3083
4095
|
}
|
|
3084
4096
|
)
|
|
3085
4097
|
}
|
|
3086
4098
|
),
|
|
3087
|
-
/* @__PURE__ */
|
|
4099
|
+
/* @__PURE__ */ jsx41(TooltipContent, { children: "Filter options" })
|
|
3088
4100
|
] }),
|
|
3089
|
-
/* @__PURE__ */
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
4101
|
+
/* @__PURE__ */ jsx41(DropdownMenuContent, { align: "end", className: "w-80", children: /* @__PURE__ */ jsxs28(DropdownMenuGroup, { children: [
|
|
4102
|
+
/* @__PURE__ */ jsx41(DropdownMenuLabel, { children: "Filter by column" }),
|
|
4103
|
+
/* @__PURE__ */ jsx41(DropdownMenuSeparator, {}),
|
|
4104
|
+
/* @__PURE__ */ jsx41("div", { className: "max-h-64 overflow-y-auto space-y-2.5 p-1", children: filterableColumns.map((column) => {
|
|
3093
4105
|
const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
|
|
3094
|
-
return /* @__PURE__ */
|
|
4106
|
+
return /* @__PURE__ */ jsxs28(
|
|
3095
4107
|
"div",
|
|
3096
4108
|
{
|
|
3097
4109
|
className: "flex items-center justify-between px-1",
|
|
3098
4110
|
children: [
|
|
3099
|
-
/* @__PURE__ */
|
|
4111
|
+
/* @__PURE__ */ jsx41(
|
|
3100
4112
|
"label",
|
|
3101
4113
|
{
|
|
3102
4114
|
htmlFor: `filter-${column.id}`,
|
|
@@ -3104,7 +4116,7 @@ function DataTableHeaderFilter({
|
|
|
3104
4116
|
children: headerText
|
|
3105
4117
|
}
|
|
3106
4118
|
),
|
|
3107
|
-
/* @__PURE__ */
|
|
4119
|
+
/* @__PURE__ */ jsx41("div", { className: "flex-1", children: /* @__PURE__ */ jsx41(
|
|
3108
4120
|
ColumnFilterInput,
|
|
3109
4121
|
{
|
|
3110
4122
|
column,
|
|
@@ -3117,9 +4129,9 @@ function DataTableHeaderFilter({
|
|
|
3117
4129
|
column.id
|
|
3118
4130
|
);
|
|
3119
4131
|
}) }),
|
|
3120
|
-
columnFilters.length > 0 && /* @__PURE__ */
|
|
3121
|
-
/* @__PURE__ */
|
|
3122
|
-
/* @__PURE__ */
|
|
4132
|
+
columnFilters.length > 0 && /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
4133
|
+
/* @__PURE__ */ jsx41(DropdownMenuSeparator, {}),
|
|
4134
|
+
/* @__PURE__ */ jsx41(
|
|
3123
4135
|
DropdownMenuItem,
|
|
3124
4136
|
{
|
|
3125
4137
|
className: "hover:cursor-pointer text-destructive focus:text-destructive",
|
|
@@ -3135,11 +4147,11 @@ function DataTableHeaderFilter({
|
|
|
3135
4147
|
// src/components/composed/data-table/table-header-refresh.tsx
|
|
3136
4148
|
import { RotateCwIcon } from "lucide-react";
|
|
3137
4149
|
import { useRouter } from "next/navigation";
|
|
3138
|
-
import { useState as
|
|
3139
|
-
import { jsx as
|
|
4150
|
+
import { useState as useState5 } from "react";
|
|
4151
|
+
import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3140
4152
|
function DataTableHeaderRefresh() {
|
|
3141
4153
|
const router = useRouter();
|
|
3142
|
-
const [isRefreshing, setIsRefreshing] =
|
|
4154
|
+
const [isRefreshing, setIsRefreshing] = useState5(false);
|
|
3143
4155
|
const handleRefresh = () => {
|
|
3144
4156
|
setIsRefreshing(true);
|
|
3145
4157
|
router.refresh();
|
|
@@ -3147,21 +4159,21 @@ function DataTableHeaderRefresh() {
|
|
|
3147
4159
|
setIsRefreshing(false);
|
|
3148
4160
|
}, 750);
|
|
3149
4161
|
};
|
|
3150
|
-
return /* @__PURE__ */
|
|
3151
|
-
/* @__PURE__ */
|
|
4162
|
+
return /* @__PURE__ */ jsxs29(Tooltip, { children: [
|
|
4163
|
+
/* @__PURE__ */ jsx42(
|
|
3152
4164
|
TooltipTrigger,
|
|
3153
4165
|
{
|
|
3154
|
-
render: /* @__PURE__ */
|
|
4166
|
+
render: /* @__PURE__ */ jsx42(
|
|
3155
4167
|
Button,
|
|
3156
4168
|
{
|
|
3157
4169
|
variant: "outline",
|
|
3158
4170
|
size: "icon",
|
|
3159
4171
|
onClick: handleRefresh,
|
|
3160
4172
|
disabled: isRefreshing,
|
|
3161
|
-
children: /* @__PURE__ */
|
|
4173
|
+
children: /* @__PURE__ */ jsx42(
|
|
3162
4174
|
RotateCwIcon,
|
|
3163
4175
|
{
|
|
3164
|
-
className:
|
|
4176
|
+
className: cn26(
|
|
3165
4177
|
"transition-transform duration-750",
|
|
3166
4178
|
isRefreshing && "animate-spin"
|
|
3167
4179
|
)
|
|
@@ -3171,19 +4183,19 @@ function DataTableHeaderRefresh() {
|
|
|
3171
4183
|
)
|
|
3172
4184
|
}
|
|
3173
4185
|
),
|
|
3174
|
-
/* @__PURE__ */
|
|
4186
|
+
/* @__PURE__ */ jsx42(TooltipContent, { children: "Refresh data" })
|
|
3175
4187
|
] });
|
|
3176
4188
|
}
|
|
3177
4189
|
|
|
3178
4190
|
// src/components/composed/data-table/table-header-search.tsx
|
|
3179
|
-
import { XIcon as
|
|
3180
|
-
import { jsx as
|
|
4191
|
+
import { XIcon as XIcon4 } from "lucide-react";
|
|
4192
|
+
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3181
4193
|
function DataTableHeaderSearch({
|
|
3182
4194
|
value = "",
|
|
3183
4195
|
onChange
|
|
3184
4196
|
}) {
|
|
3185
|
-
return /* @__PURE__ */
|
|
3186
|
-
/* @__PURE__ */
|
|
4197
|
+
return /* @__PURE__ */ jsxs30("div", { className: "relative flex items-center max-w-sm w-full", children: [
|
|
4198
|
+
/* @__PURE__ */ jsx43(
|
|
3187
4199
|
Input,
|
|
3188
4200
|
{
|
|
3189
4201
|
placeholder: "Search...",
|
|
@@ -3192,14 +4204,14 @@ function DataTableHeaderSearch({
|
|
|
3192
4204
|
className: "pr-7"
|
|
3193
4205
|
}
|
|
3194
4206
|
),
|
|
3195
|
-
Boolean(value) && /* @__PURE__ */
|
|
4207
|
+
Boolean(value) && /* @__PURE__ */ jsx43(
|
|
3196
4208
|
"button",
|
|
3197
4209
|
{
|
|
3198
4210
|
type: "button",
|
|
3199
4211
|
onClick: () => onChange(""),
|
|
3200
4212
|
className: "absolute right-2 text-muted-foreground hover:text-foreground p-0.5 rounded cursor-pointer",
|
|
3201
4213
|
"aria-label": "Clear search text",
|
|
3202
|
-
children: /* @__PURE__ */
|
|
4214
|
+
children: /* @__PURE__ */ jsx43(XIcon4, { className: "size-3.5" })
|
|
3203
4215
|
}
|
|
3204
4216
|
)
|
|
3205
4217
|
] });
|
|
@@ -3207,41 +4219,41 @@ function DataTableHeaderSearch({
|
|
|
3207
4219
|
|
|
3208
4220
|
// src/components/composed/data-table/table-header-sort.tsx
|
|
3209
4221
|
import { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from "lucide-react";
|
|
3210
|
-
import { Fragment as
|
|
4222
|
+
import { Fragment as Fragment8, jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3211
4223
|
function DataTableHeaderSort({
|
|
3212
4224
|
table,
|
|
3213
4225
|
sorting
|
|
3214
4226
|
}) {
|
|
3215
4227
|
const sortableColumns = table.getAllColumns().filter((column) => column.getCanSort());
|
|
3216
|
-
return /* @__PURE__ */
|
|
3217
|
-
/* @__PURE__ */
|
|
3218
|
-
/* @__PURE__ */
|
|
4228
|
+
return /* @__PURE__ */ jsxs31(DropdownMenu, { children: [
|
|
4229
|
+
/* @__PURE__ */ jsxs31(Tooltip, { children: [
|
|
4230
|
+
/* @__PURE__ */ jsx44(
|
|
3219
4231
|
DropdownMenuTrigger,
|
|
3220
4232
|
{
|
|
3221
|
-
render: /* @__PURE__ */
|
|
4233
|
+
render: /* @__PURE__ */ jsx44(
|
|
3222
4234
|
TooltipTrigger,
|
|
3223
4235
|
{
|
|
3224
|
-
render: /* @__PURE__ */
|
|
4236
|
+
render: /* @__PURE__ */ jsx44(
|
|
3225
4237
|
Button,
|
|
3226
4238
|
{
|
|
3227
4239
|
variant: sorting.length > 0 ? "secondary" : "outline",
|
|
3228
4240
|
size: "icon",
|
|
3229
|
-
children: /* @__PURE__ */
|
|
4241
|
+
children: /* @__PURE__ */ jsx44(ArrowUpDownIcon, {})
|
|
3230
4242
|
}
|
|
3231
4243
|
)
|
|
3232
4244
|
}
|
|
3233
4245
|
)
|
|
3234
4246
|
}
|
|
3235
4247
|
),
|
|
3236
|
-
/* @__PURE__ */
|
|
4248
|
+
/* @__PURE__ */ jsx44(TooltipContent, { children: "Sort options" })
|
|
3237
4249
|
] }),
|
|
3238
|
-
/* @__PURE__ */
|
|
3239
|
-
/* @__PURE__ */
|
|
3240
|
-
/* @__PURE__ */
|
|
4250
|
+
/* @__PURE__ */ jsx44(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ jsxs31(DropdownMenuGroup, { children: [
|
|
4251
|
+
/* @__PURE__ */ jsx44(DropdownMenuLabel, { children: "Sort by column" }),
|
|
4252
|
+
/* @__PURE__ */ jsx44(DropdownMenuSeparator, {}),
|
|
3241
4253
|
sortableColumns.map((column) => {
|
|
3242
4254
|
const isSorted = column.getIsSorted();
|
|
3243
4255
|
const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
|
|
3244
|
-
return /* @__PURE__ */
|
|
4256
|
+
return /* @__PURE__ */ jsxs31(
|
|
3245
4257
|
DropdownMenuItem,
|
|
3246
4258
|
{
|
|
3247
4259
|
className: "flex items-center justify-between hover:cursor-pointer capitalize",
|
|
@@ -3256,16 +4268,16 @@ function DataTableHeaderSort({
|
|
|
3256
4268
|
},
|
|
3257
4269
|
children: [
|
|
3258
4270
|
headerText,
|
|
3259
|
-
isSorted === "asc" && /* @__PURE__ */
|
|
3260
|
-
isSorted === "desc" && /* @__PURE__ */
|
|
4271
|
+
isSorted === "asc" && /* @__PURE__ */ jsx44(ArrowUpIcon, { className: "size-3.5" }),
|
|
4272
|
+
isSorted === "desc" && /* @__PURE__ */ jsx44(ArrowDownIcon, { className: "size-3.5" })
|
|
3261
4273
|
]
|
|
3262
4274
|
},
|
|
3263
4275
|
column.id
|
|
3264
4276
|
);
|
|
3265
4277
|
}),
|
|
3266
|
-
sorting.length > 0 && /* @__PURE__ */
|
|
3267
|
-
/* @__PURE__ */
|
|
3268
|
-
/* @__PURE__ */
|
|
4278
|
+
sorting.length > 0 && /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
4279
|
+
/* @__PURE__ */ jsx44(DropdownMenuSeparator, {}),
|
|
4280
|
+
/* @__PURE__ */ jsx44(
|
|
3269
4281
|
DropdownMenuItem,
|
|
3270
4282
|
{
|
|
3271
4283
|
className: "hover:cursor-pointer text-destructive focus:text-destructive",
|
|
@@ -3280,33 +4292,33 @@ function DataTableHeaderSort({
|
|
|
3280
4292
|
|
|
3281
4293
|
// src/components/composed/data-table/table-header-toggle.tsx
|
|
3282
4294
|
import { Columns3CogIcon } from "lucide-react";
|
|
3283
|
-
import { jsx as
|
|
4295
|
+
import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3284
4296
|
function DataTableHeaderToggle({
|
|
3285
4297
|
table
|
|
3286
4298
|
}) {
|
|
3287
|
-
return /* @__PURE__ */
|
|
3288
|
-
/* @__PURE__ */
|
|
3289
|
-
/* @__PURE__ */
|
|
4299
|
+
return /* @__PURE__ */ jsxs32(DropdownMenu, { children: [
|
|
4300
|
+
/* @__PURE__ */ jsxs32(Tooltip, { children: [
|
|
4301
|
+
/* @__PURE__ */ jsx45(
|
|
3290
4302
|
DropdownMenuTrigger,
|
|
3291
4303
|
{
|
|
3292
|
-
render: /* @__PURE__ */
|
|
4304
|
+
render: /* @__PURE__ */ jsx45(
|
|
3293
4305
|
TooltipTrigger,
|
|
3294
4306
|
{
|
|
3295
|
-
render: /* @__PURE__ */
|
|
4307
|
+
render: /* @__PURE__ */ jsx45(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ jsx45(Columns3CogIcon, {}) })
|
|
3296
4308
|
}
|
|
3297
4309
|
)
|
|
3298
4310
|
}
|
|
3299
4311
|
),
|
|
3300
|
-
/* @__PURE__ */
|
|
4312
|
+
/* @__PURE__ */ jsx45(TooltipContent, { children: "Toggle columns" })
|
|
3301
4313
|
] }),
|
|
3302
|
-
/* @__PURE__ */
|
|
3303
|
-
/* @__PURE__ */
|
|
3304
|
-
/* @__PURE__ */
|
|
4314
|
+
/* @__PURE__ */ jsx45(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ jsxs32(DropdownMenuGroup, { children: [
|
|
4315
|
+
/* @__PURE__ */ jsx45(DropdownMenuLabel, { children: "Toggle columns" }),
|
|
4316
|
+
/* @__PURE__ */ jsx45(DropdownMenuSeparator, {}),
|
|
3305
4317
|
table.getAllColumns().filter(
|
|
3306
4318
|
(column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
|
|
3307
4319
|
).map((column) => {
|
|
3308
4320
|
const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
|
|
3309
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ jsx45(
|
|
3310
4322
|
DropdownMenuCheckboxItem,
|
|
3311
4323
|
{
|
|
3312
4324
|
className: "capitalize hover:cursor-pointer",
|
|
@@ -3323,8 +4335,8 @@ function DataTableHeaderToggle({
|
|
|
3323
4335
|
|
|
3324
4336
|
// src/components/composed/data-table/data-row-actions.tsx
|
|
3325
4337
|
import { MoreHorizontal } from "lucide-react";
|
|
3326
|
-
import { Fragment as
|
|
3327
|
-
import { Fragment as
|
|
4338
|
+
import { Fragment as Fragment9 } from "react";
|
|
4339
|
+
import { Fragment as Fragment10, jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3328
4340
|
function RowActions({
|
|
3329
4341
|
label = "Actions",
|
|
3330
4342
|
items = [],
|
|
@@ -3338,50 +4350,50 @@ function RowActions({
|
|
|
3338
4350
|
if (visibleItems.length === 0) {
|
|
3339
4351
|
return null;
|
|
3340
4352
|
}
|
|
3341
|
-
return /* @__PURE__ */
|
|
4353
|
+
return /* @__PURE__ */ jsx46(
|
|
3342
4354
|
"div",
|
|
3343
4355
|
{
|
|
3344
|
-
className:
|
|
3345
|
-
children: /* @__PURE__ */
|
|
3346
|
-
/* @__PURE__ */
|
|
4356
|
+
className: cn26("flex items-center justify-end w-full", containerClassName),
|
|
4357
|
+
children: /* @__PURE__ */ jsxs33(DropdownMenu, { children: [
|
|
4358
|
+
/* @__PURE__ */ jsx46(
|
|
3347
4359
|
DropdownMenuTrigger,
|
|
3348
4360
|
{
|
|
3349
|
-
render: /* @__PURE__ */
|
|
4361
|
+
render: /* @__PURE__ */ jsx46(Button, { variant: "ghost", size: "icon-xs", "aria-label": triggerLabel, children: triggerIcon != null ? triggerIcon : /* @__PURE__ */ jsx46(MoreHorizontal, { className: "size-4" }) })
|
|
3350
4362
|
}
|
|
3351
4363
|
),
|
|
3352
|
-
/* @__PURE__ */
|
|
4364
|
+
/* @__PURE__ */ jsx46(
|
|
3353
4365
|
DropdownMenuContent,
|
|
3354
4366
|
{
|
|
3355
4367
|
align,
|
|
3356
|
-
className:
|
|
3357
|
-
children: /* @__PURE__ */
|
|
3358
|
-
label && /* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
4368
|
+
className: cn26("w-40", contentClassName),
|
|
4369
|
+
children: /* @__PURE__ */ jsxs33(DropdownMenuGroup, { children: [
|
|
4370
|
+
label && /* @__PURE__ */ jsxs33(Fragment10, { children: [
|
|
4371
|
+
/* @__PURE__ */ jsx46(DropdownMenuLabel, { children: label }),
|
|
4372
|
+
/* @__PURE__ */ jsx46(DropdownMenuSeparator, {})
|
|
3361
4373
|
] }),
|
|
3362
4374
|
visibleItems.map((item, index) => {
|
|
3363
4375
|
var _a;
|
|
3364
4376
|
const itemKey = (_a = item.id) != null ? _a : `${item.label}-${index}`;
|
|
3365
4377
|
const isDestructive = item.variant === "destructive";
|
|
3366
|
-
return /* @__PURE__ */
|
|
3367
|
-
item.separatorBefore && /* @__PURE__ */
|
|
3368
|
-
/* @__PURE__ */
|
|
4378
|
+
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
4379
|
+
item.separatorBefore && /* @__PURE__ */ jsx46(DropdownMenuSeparator, {}),
|
|
4380
|
+
/* @__PURE__ */ jsxs33(
|
|
3369
4381
|
DropdownMenuItem,
|
|
3370
4382
|
{
|
|
3371
4383
|
onClick: item.onClick,
|
|
3372
4384
|
disabled: item.disabled,
|
|
3373
|
-
className:
|
|
4385
|
+
className: cn26(
|
|
3374
4386
|
"hover:cursor-pointer flex items-center gap-2",
|
|
3375
4387
|
isDestructive && "text-destructive focus:text-destructive",
|
|
3376
4388
|
item.className
|
|
3377
4389
|
),
|
|
3378
4390
|
children: [
|
|
3379
|
-
item.icon && /* @__PURE__ */
|
|
3380
|
-
/* @__PURE__ */
|
|
4391
|
+
item.icon && /* @__PURE__ */ jsx46("span", { className: "size-4 shrink-0 flex items-center justify-center", children: item.icon }),
|
|
4392
|
+
/* @__PURE__ */ jsx46("span", { children: item.label })
|
|
3381
4393
|
]
|
|
3382
4394
|
}
|
|
3383
4395
|
),
|
|
3384
|
-
item.separatorAfter && /* @__PURE__ */
|
|
4396
|
+
item.separatorAfter && /* @__PURE__ */ jsx46(DropdownMenuSeparator, {})
|
|
3385
4397
|
] }, itemKey);
|
|
3386
4398
|
})
|
|
3387
4399
|
] })
|
|
@@ -3393,7 +4405,7 @@ function RowActions({
|
|
|
3393
4405
|
}
|
|
3394
4406
|
|
|
3395
4407
|
// src/components/composed/data-table/data-table.tsx
|
|
3396
|
-
import { jsx as
|
|
4408
|
+
import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3397
4409
|
function DataTable({
|
|
3398
4410
|
columns,
|
|
3399
4411
|
data,
|
|
@@ -3411,12 +4423,12 @@ function DataTable({
|
|
|
3411
4423
|
showAddButton = true
|
|
3412
4424
|
}) {
|
|
3413
4425
|
const router = useRouter2();
|
|
3414
|
-
const [createOpen, setCreateOpen] =
|
|
3415
|
-
const [sorting, setSorting] =
|
|
3416
|
-
const [columnFilters, setColumnFilters] =
|
|
3417
|
-
const [columnVisibility, setColumnVisibility] =
|
|
3418
|
-
const [globalFilter, setGlobalFilter] =
|
|
3419
|
-
const columnsWithSmartFilters =
|
|
4426
|
+
const [createOpen, setCreateOpen] = useState6(false);
|
|
4427
|
+
const [sorting, setSorting] = useState6([]);
|
|
4428
|
+
const [columnFilters, setColumnFilters] = useState6([]);
|
|
4429
|
+
const [columnVisibility, setColumnVisibility] = useState6(initialColumnVisibility != null ? initialColumnVisibility : {});
|
|
4430
|
+
const [globalFilter, setGlobalFilter] = useState6("");
|
|
4431
|
+
const columnsWithSmartFilters = useMemo5(() => {
|
|
3420
4432
|
return columns.map((col) => __spreadValues({
|
|
3421
4433
|
filterFn: smartFilterFn
|
|
3422
4434
|
}, col));
|
|
@@ -3446,12 +4458,12 @@ function DataTable({
|
|
|
3446
4458
|
});
|
|
3447
4459
|
if (data.length === 0) {
|
|
3448
4460
|
const hasCreateAction = Boolean(renderCreateDialog);
|
|
3449
|
-
return /* @__PURE__ */
|
|
3450
|
-
/* @__PURE__ */
|
|
4461
|
+
return /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
|
|
4462
|
+
/* @__PURE__ */ jsx47(
|
|
3451
4463
|
StateEmpty,
|
|
3452
4464
|
{
|
|
3453
4465
|
state: "outline",
|
|
3454
|
-
icon: /* @__PURE__ */
|
|
4466
|
+
icon: /* @__PURE__ */ jsx47(FolderOpenIcon, { className: "size-6 text-muted-foreground" }),
|
|
3455
4467
|
title: "No Data Available",
|
|
3456
4468
|
description: "There are currently no records to display. Create a new record to get started.",
|
|
3457
4469
|
buttonText: hasCreateAction ? addLabel != null ? addLabel : "Add Record" : "Refresh",
|
|
@@ -3461,26 +4473,26 @@ function DataTable({
|
|
|
3461
4473
|
renderCreateDialog == null ? void 0 : renderCreateDialog(createOpen, setCreateOpen)
|
|
3462
4474
|
] });
|
|
3463
4475
|
}
|
|
3464
|
-
return /* @__PURE__ */
|
|
3465
|
-
/* @__PURE__ */
|
|
3466
|
-
showSearchInput ? /* @__PURE__ */
|
|
4476
|
+
return /* @__PURE__ */ jsxs34("div", { className: "space-y-2", children: [
|
|
4477
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-row items-center justify-between gap-1", children: [
|
|
4478
|
+
showSearchInput ? /* @__PURE__ */ jsx47(
|
|
3467
4479
|
DataTableHeaderSearch,
|
|
3468
4480
|
{
|
|
3469
4481
|
value: globalFilter,
|
|
3470
4482
|
onChange: setGlobalFilter
|
|
3471
4483
|
}
|
|
3472
|
-
) : /* @__PURE__ */
|
|
3473
|
-
/* @__PURE__ */
|
|
3474
|
-
showRefreshButton && /* @__PURE__ */
|
|
3475
|
-
showSortButton && /* @__PURE__ */
|
|
3476
|
-
showFilterButton && /* @__PURE__ */
|
|
4484
|
+
) : /* @__PURE__ */ jsx47("div", {}),
|
|
4485
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-row items-center gap-1", children: [
|
|
4486
|
+
showRefreshButton && /* @__PURE__ */ jsx47(DataTableHeaderRefresh, {}),
|
|
4487
|
+
showSortButton && /* @__PURE__ */ jsx47(DataTableHeaderSort, { table, sorting }),
|
|
4488
|
+
showFilterButton && /* @__PURE__ */ jsx47(
|
|
3477
4489
|
DataTableHeaderFilter,
|
|
3478
4490
|
{
|
|
3479
4491
|
table,
|
|
3480
4492
|
columnFilters
|
|
3481
4493
|
}
|
|
3482
4494
|
),
|
|
3483
|
-
showDownloadButton && /* @__PURE__ */
|
|
4495
|
+
showDownloadButton && /* @__PURE__ */ jsx47(
|
|
3484
4496
|
DataTableHeaderDownload,
|
|
3485
4497
|
{
|
|
3486
4498
|
table,
|
|
@@ -3488,8 +4500,8 @@ function DataTable({
|
|
|
3488
4500
|
onDownload
|
|
3489
4501
|
}
|
|
3490
4502
|
),
|
|
3491
|
-
showColumnToggleButton && /* @__PURE__ */
|
|
3492
|
-
showAddButton && renderCreateDialog && /* @__PURE__ */
|
|
4503
|
+
showColumnToggleButton && /* @__PURE__ */ jsx47(DataTableHeaderToggle, { table }),
|
|
4504
|
+
showAddButton && renderCreateDialog && /* @__PURE__ */ jsx47(
|
|
3493
4505
|
DataTableHeaderAdd,
|
|
3494
4506
|
{
|
|
3495
4507
|
onAdd: () => setCreateOpen(true),
|
|
@@ -3499,13 +4511,13 @@ function DataTable({
|
|
|
3499
4511
|
] })
|
|
3500
4512
|
] }),
|
|
3501
4513
|
renderCreateDialog == null ? void 0 : renderCreateDialog(createOpen, setCreateOpen),
|
|
3502
|
-
/* @__PURE__ */
|
|
3503
|
-
/* @__PURE__ */
|
|
3504
|
-
/* @__PURE__ */
|
|
4514
|
+
/* @__PURE__ */ jsx47("div", { className: "overflow-hidden rounded-md border [&_[data-slot=table-container]]:no-scrollbar", children: /* @__PURE__ */ jsxs34(Table, { children: [
|
|
4515
|
+
/* @__PURE__ */ jsx47(DataTableContentHeader, { table }),
|
|
4516
|
+
/* @__PURE__ */ jsx47(DataTableContentBody, { table, columns })
|
|
3505
4517
|
] }) }),
|
|
3506
|
-
/* @__PURE__ */
|
|
3507
|
-
/* @__PURE__ */
|
|
3508
|
-
/* @__PURE__ */
|
|
4518
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between px-2", children: [
|
|
4519
|
+
/* @__PURE__ */ jsx47(DataTableFooterEntries, { table }),
|
|
4520
|
+
/* @__PURE__ */ jsx47(DataTableFooterPagination, { table })
|
|
3509
4521
|
] })
|
|
3510
4522
|
] });
|
|
3511
4523
|
}
|
|
@@ -3513,13 +4525,13 @@ function DataTable({
|
|
|
3513
4525
|
// src/components/composed/header-tabs.tsx
|
|
3514
4526
|
import Link2 from "next/link";
|
|
3515
4527
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
3516
|
-
import { memo as
|
|
4528
|
+
import { memo as memo18 } from "react";
|
|
3517
4529
|
|
|
3518
4530
|
// src/components/ui/tabs.tsx
|
|
3519
4531
|
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
3520
4532
|
import { cva as cva5 } from "class-variance-authority";
|
|
3521
|
-
import { cn as
|
|
3522
|
-
import { jsx as
|
|
4533
|
+
import { cn as cn31 } from "cn";
|
|
4534
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3523
4535
|
function Tabs(_a) {
|
|
3524
4536
|
var _b = _a, {
|
|
3525
4537
|
className,
|
|
@@ -3528,12 +4540,12 @@ function Tabs(_a) {
|
|
|
3528
4540
|
"className",
|
|
3529
4541
|
"orientation"
|
|
3530
4542
|
]);
|
|
3531
|
-
return /* @__PURE__ */
|
|
4543
|
+
return /* @__PURE__ */ jsx48(
|
|
3532
4544
|
TabsPrimitive.Root,
|
|
3533
4545
|
__spreadValues({
|
|
3534
4546
|
"data-slot": "tabs",
|
|
3535
4547
|
"data-orientation": orientation,
|
|
3536
|
-
className:
|
|
4548
|
+
className: cn31(
|
|
3537
4549
|
"group/tabs flex gap-2 data-horizontal:flex-col",
|
|
3538
4550
|
className
|
|
3539
4551
|
)
|
|
@@ -3562,22 +4574,22 @@ function TabsList(_a) {
|
|
|
3562
4574
|
"className",
|
|
3563
4575
|
"variant"
|
|
3564
4576
|
]);
|
|
3565
|
-
return /* @__PURE__ */
|
|
4577
|
+
return /* @__PURE__ */ jsx48(
|
|
3566
4578
|
TabsPrimitive.List,
|
|
3567
4579
|
__spreadValues({
|
|
3568
4580
|
"data-slot": "tabs-list",
|
|
3569
4581
|
"data-variant": variant,
|
|
3570
|
-
className:
|
|
4582
|
+
className: cn31(tabsListVariants({ variant }), className)
|
|
3571
4583
|
}, props)
|
|
3572
4584
|
);
|
|
3573
4585
|
}
|
|
3574
4586
|
function TabsTrigger(_a) {
|
|
3575
4587
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3576
|
-
return /* @__PURE__ */
|
|
4588
|
+
return /* @__PURE__ */ jsx48(
|
|
3577
4589
|
TabsPrimitive.Tab,
|
|
3578
4590
|
__spreadValues({
|
|
3579
4591
|
"data-slot": "tabs-trigger",
|
|
3580
|
-
className:
|
|
4592
|
+
className: cn31(
|
|
3581
4593
|
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
|
|
3582
4594
|
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
3583
4595
|
"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
|
|
@@ -3589,16 +4601,16 @@ function TabsTrigger(_a) {
|
|
|
3589
4601
|
}
|
|
3590
4602
|
|
|
3591
4603
|
// src/components/composed/header-tabs.tsx
|
|
3592
|
-
import { jsx as
|
|
4604
|
+
import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3593
4605
|
function renderTabIcon(icon) {
|
|
3594
4606
|
if (!icon) return null;
|
|
3595
4607
|
if (typeof icon === "function" || typeof icon === "object" && icon !== null && "render" in icon) {
|
|
3596
4608
|
const IconComp = icon;
|
|
3597
|
-
return /* @__PURE__ */
|
|
4609
|
+
return /* @__PURE__ */ jsx49(IconComp, {});
|
|
3598
4610
|
}
|
|
3599
4611
|
return icon;
|
|
3600
4612
|
}
|
|
3601
|
-
var HeaderTabs =
|
|
4613
|
+
var HeaderTabs = memo18(function HeaderTabs2({
|
|
3602
4614
|
items,
|
|
3603
4615
|
value,
|
|
3604
4616
|
onValueChange,
|
|
@@ -3610,12 +4622,12 @@ var HeaderTabs = memo9(function HeaderTabs2({
|
|
|
3610
4622
|
(item) => item.url === pathname || pathname.endsWith(item.url) || pathname.split("/").includes(item.value)
|
|
3611
4623
|
) : void 0;
|
|
3612
4624
|
const activeTab = (_b = value != null ? value : matchedItem == null ? void 0 : matchedItem.value) != null ? _b : (_a = items[0]) == null ? void 0 : _a.value;
|
|
3613
|
-
return /* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
4625
|
+
return /* @__PURE__ */ jsxs35(Tabs, { value: activeTab, onValueChange, className: "space-y-4", children: [
|
|
4626
|
+
/* @__PURE__ */ jsx49("div", { className: "w-full overflow-x-auto overflow-y-hidden border-b no-scrollbar", children: /* @__PURE__ */ jsx49(TabsList, { variant: "line", className: "inline-flex w-max justify-start", children: items.map(({ title, value: tabValue, url, icon }) => /* @__PURE__ */ jsxs35(
|
|
3615
4627
|
TabsTrigger,
|
|
3616
4628
|
{
|
|
3617
4629
|
nativeButton: false,
|
|
3618
|
-
render: /* @__PURE__ */
|
|
4630
|
+
render: /* @__PURE__ */ jsx49(Link2, { href: url }),
|
|
3619
4631
|
value: tabValue,
|
|
3620
4632
|
children: [
|
|
3621
4633
|
renderTabIcon(icon),
|
|
@@ -3629,27 +4641,27 @@ var HeaderTabs = memo9(function HeaderTabs2({
|
|
|
3629
4641
|
});
|
|
3630
4642
|
|
|
3631
4643
|
// src/components/composed/header-title.tsx
|
|
3632
|
-
import { memo as
|
|
3633
|
-
import { jsx as
|
|
3634
|
-
var HeaderTitle =
|
|
4644
|
+
import { memo as memo19 } from "react";
|
|
4645
|
+
import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4646
|
+
var HeaderTitle = memo19(function HeaderTitle2({
|
|
3635
4647
|
title,
|
|
3636
4648
|
subtitle,
|
|
3637
4649
|
children
|
|
3638
4650
|
}) {
|
|
3639
|
-
return /* @__PURE__ */
|
|
3640
|
-
/* @__PURE__ */
|
|
3641
|
-
/* @__PURE__ */
|
|
3642
|
-
/* @__PURE__ */
|
|
4651
|
+
return /* @__PURE__ */ jsxs36("div", { className: "w-full space-y-4", children: [
|
|
4652
|
+
/* @__PURE__ */ jsxs36("div", { children: [
|
|
4653
|
+
/* @__PURE__ */ jsx50("h1", { className: "font-semibold", children: title }),
|
|
4654
|
+
/* @__PURE__ */ jsx50("p", { className: "text-xs text-muted-foreground", children: subtitle })
|
|
3643
4655
|
] }),
|
|
3644
4656
|
children
|
|
3645
4657
|
] });
|
|
3646
4658
|
});
|
|
3647
4659
|
|
|
3648
4660
|
// src/components/composed/icons/google.tsx
|
|
3649
|
-
import { jsx as
|
|
4661
|
+
import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3650
4662
|
function GoogleIcon(_a) {
|
|
3651
4663
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3652
|
-
return /* @__PURE__ */
|
|
4664
|
+
return /* @__PURE__ */ jsxs37(
|
|
3653
4665
|
"svg",
|
|
3654
4666
|
__spreadProps(__spreadValues({
|
|
3655
4667
|
role: "img",
|
|
@@ -3659,28 +4671,28 @@ function GoogleIcon(_a) {
|
|
|
3659
4671
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3660
4672
|
}, props), {
|
|
3661
4673
|
children: [
|
|
3662
|
-
/* @__PURE__ */
|
|
4674
|
+
/* @__PURE__ */ jsx51(
|
|
3663
4675
|
"path",
|
|
3664
4676
|
{
|
|
3665
4677
|
fill: "#4285F4",
|
|
3666
4678
|
d: "M23.745 12.27c0-.7-.06-1.4-.19-2.07H12v4.51h6.6c-.29 1.52-1.14 2.82-2.4 3.68v3.05h3.88c2.27-2.09 3.665-5.17 3.665-9.17z"
|
|
3667
4679
|
}
|
|
3668
4680
|
),
|
|
3669
|
-
/* @__PURE__ */
|
|
4681
|
+
/* @__PURE__ */ jsx51(
|
|
3670
4682
|
"path",
|
|
3671
4683
|
{
|
|
3672
4684
|
fill: "#34A853",
|
|
3673
4685
|
d: "M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.88-3.05c-1.08.72-2.45 1.16-4.05 1.16-3.12 0-5.77-2.1-6.72-4.93H1.24v3.15C3.26 21.36 7.33 24 12 24z"
|
|
3674
4686
|
}
|
|
3675
4687
|
),
|
|
3676
|
-
/* @__PURE__ */
|
|
4688
|
+
/* @__PURE__ */ jsx51(
|
|
3677
4689
|
"path",
|
|
3678
4690
|
{
|
|
3679
4691
|
fill: "#FBBC05",
|
|
3680
4692
|
d: "M5.28 14.27c-.25-.72-.38-1.49-.38-2.27s.13-1.55.38-2.27V6.58H1.24C.45 8.16 0 9.97 0 12s.45 3.84 1.24 5.42l4.04-3.15z"
|
|
3681
4693
|
}
|
|
3682
4694
|
),
|
|
3683
|
-
/* @__PURE__ */
|
|
4695
|
+
/* @__PURE__ */ jsx51(
|
|
3684
4696
|
"path",
|
|
3685
4697
|
{
|
|
3686
4698
|
fill: "#EA4335",
|
|
@@ -3692,8 +4704,16 @@ function GoogleIcon(_a) {
|
|
|
3692
4704
|
);
|
|
3693
4705
|
}
|
|
3694
4706
|
export {
|
|
4707
|
+
ActiveTokensStatus,
|
|
3695
4708
|
AppSidebar,
|
|
4709
|
+
AvatarGroupInvitations,
|
|
4710
|
+
AvatarGroupUsers,
|
|
4711
|
+
AvatarInvitations,
|
|
3696
4712
|
AvatarUser,
|
|
4713
|
+
AvatarUsers,
|
|
4714
|
+
CodeLabel,
|
|
4715
|
+
CopyableCode,
|
|
4716
|
+
DEFAULT_METADATA_FIELDS,
|
|
3697
4717
|
DataTable,
|
|
3698
4718
|
DataTableContentBody,
|
|
3699
4719
|
DataTableContentHeader,
|
|
@@ -3706,14 +4726,32 @@ export {
|
|
|
3706
4726
|
DataTableHeaderSearch,
|
|
3707
4727
|
DataTableHeaderSort,
|
|
3708
4728
|
DataTableHeaderToggle,
|
|
4729
|
+
DescriptionLabel,
|
|
3709
4730
|
EmailLabel,
|
|
3710
4731
|
EmailVerified,
|
|
3711
4732
|
GoogleIcon,
|
|
3712
4733
|
HeaderTabs,
|
|
3713
4734
|
HeaderTitle,
|
|
4735
|
+
ItemStatus,
|
|
3714
4736
|
JoinedLabel,
|
|
4737
|
+
MetadataProgress,
|
|
4738
|
+
MetadataStatus,
|
|
4739
|
+
OrganizationInvitations,
|
|
4740
|
+
OrganizationRoleBadge,
|
|
4741
|
+
OrganizationRoles,
|
|
4742
|
+
PermissionBadges,
|
|
4743
|
+
PermissionsBadges,
|
|
4744
|
+
ProgressStatus,
|
|
4745
|
+
RedirectUriLabel,
|
|
4746
|
+
RedirectUris,
|
|
3715
4747
|
RowActions,
|
|
4748
|
+
RunningStatus,
|
|
4749
|
+
SlugLabel,
|
|
3716
4750
|
StateEmpty,
|
|
4751
|
+
StatusBadge,
|
|
4752
|
+
TokenActivity,
|
|
4753
|
+
UrisLabel,
|
|
4754
|
+
UrisList,
|
|
3717
4755
|
UserRole,
|
|
3718
4756
|
UserStatus,
|
|
3719
4757
|
exportToCSV,
|