@prediktif/ui 0.1.23 → 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 -19
- package/dist/index.d.ts +182 -19
- package/dist/index.js +1506 -925
- package/dist/index.mjs +1421 -856
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60,8 +60,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
60
60
|
// src/index.ts
|
|
61
61
|
var index_exports = {};
|
|
62
62
|
__export(index_exports, {
|
|
63
|
+
ActiveTokensStatus: () => ActiveTokensStatus,
|
|
63
64
|
AppSidebar: () => AppSidebar,
|
|
65
|
+
AvatarGroupInvitations: () => AvatarGroupInvitations,
|
|
66
|
+
AvatarGroupUsers: () => AvatarGroupUsers,
|
|
67
|
+
AvatarInvitations: () => AvatarInvitations,
|
|
64
68
|
AvatarUser: () => AvatarUser,
|
|
69
|
+
AvatarUsers: () => AvatarUsers,
|
|
70
|
+
CodeLabel: () => CodeLabel,
|
|
71
|
+
CopyableCode: () => CopyableCode,
|
|
72
|
+
DEFAULT_METADATA_FIELDS: () => DEFAULT_METADATA_FIELDS,
|
|
65
73
|
DataTable: () => DataTable,
|
|
66
74
|
DataTableContentBody: () => DataTableContentBody,
|
|
67
75
|
DataTableContentHeader: () => DataTableContentHeader,
|
|
@@ -74,15 +82,32 @@ __export(index_exports, {
|
|
|
74
82
|
DataTableHeaderSearch: () => DataTableHeaderSearch,
|
|
75
83
|
DataTableHeaderSort: () => DataTableHeaderSort,
|
|
76
84
|
DataTableHeaderToggle: () => DataTableHeaderToggle,
|
|
85
|
+
DescriptionLabel: () => DescriptionLabel,
|
|
77
86
|
EmailLabel: () => EmailLabel,
|
|
78
87
|
EmailVerified: () => EmailVerified,
|
|
79
88
|
GoogleIcon: () => GoogleIcon,
|
|
80
89
|
HeaderTabs: () => HeaderTabs,
|
|
81
90
|
HeaderTitle: () => HeaderTitle,
|
|
91
|
+
ItemStatus: () => ItemStatus,
|
|
82
92
|
JoinedLabel: () => JoinedLabel,
|
|
83
|
-
|
|
93
|
+
MetadataProgress: () => MetadataProgress,
|
|
94
|
+
MetadataStatus: () => MetadataStatus,
|
|
95
|
+
OrganizationInvitations: () => OrganizationInvitations,
|
|
96
|
+
OrganizationRoleBadge: () => OrganizationRoleBadge,
|
|
97
|
+
OrganizationRoles: () => OrganizationRoles,
|
|
98
|
+
PermissionBadges: () => PermissionBadges,
|
|
99
|
+
PermissionsBadges: () => PermissionsBadges,
|
|
100
|
+
ProgressStatus: () => ProgressStatus,
|
|
101
|
+
RedirectUriLabel: () => RedirectUriLabel,
|
|
102
|
+
RedirectUris: () => RedirectUris,
|
|
84
103
|
RowActions: () => RowActions,
|
|
104
|
+
RunningStatus: () => RunningStatus,
|
|
105
|
+
SlugLabel: () => SlugLabel,
|
|
85
106
|
StateEmpty: () => StateEmpty,
|
|
107
|
+
StatusBadge: () => StatusBadge,
|
|
108
|
+
TokenActivity: () => TokenActivity,
|
|
109
|
+
UrisLabel: () => UrisLabel,
|
|
110
|
+
UrisList: () => UrisList,
|
|
86
111
|
UserRole: () => UserRole,
|
|
87
112
|
UserStatus: () => UserStatus,
|
|
88
113
|
exportToCSV: () => exportToCSV,
|
|
@@ -91,7 +116,6 @@ __export(index_exports, {
|
|
|
91
116
|
features: () => features,
|
|
92
117
|
flexRender: () => import_react_table4.flexRender,
|
|
93
118
|
getTableExportData: () => getTableExportData,
|
|
94
|
-
loginSchema: () => loginSchema,
|
|
95
119
|
printTable: () => printTable,
|
|
96
120
|
smartFilterFn: () => smartFilterFn,
|
|
97
121
|
useTable: () => import_react_table4.useTable
|
|
@@ -371,6 +395,36 @@ function AvatarFallback(_a) {
|
|
|
371
395
|
}, props)
|
|
372
396
|
);
|
|
373
397
|
}
|
|
398
|
+
function AvatarGroup(_a) {
|
|
399
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
401
|
+
"div",
|
|
402
|
+
__spreadValues({
|
|
403
|
+
"data-slot": "avatar-group",
|
|
404
|
+
className: (0, import_cn3.cn)(
|
|
405
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
406
|
+
className
|
|
407
|
+
)
|
|
408
|
+
}, props)
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
function AvatarGroupCount(_a) {
|
|
412
|
+
var _b = _a, {
|
|
413
|
+
className
|
|
414
|
+
} = _b, props = __objRest(_b, [
|
|
415
|
+
"className"
|
|
416
|
+
]);
|
|
417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
418
|
+
"div",
|
|
419
|
+
__spreadValues({
|
|
420
|
+
"data-slot": "avatar-group-count",
|
|
421
|
+
className: (0, import_cn3.cn)(
|
|
422
|
+
"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",
|
|
423
|
+
className
|
|
424
|
+
)
|
|
425
|
+
}, props)
|
|
426
|
+
);
|
|
427
|
+
}
|
|
374
428
|
|
|
375
429
|
// src/components/ui/breadcrumb.tsx
|
|
376
430
|
var import_merge_props = require("@base-ui/react/merge-props");
|
|
@@ -1539,44 +1593,319 @@ var AppSidebar = (0, import_react.memo)(function AppSidebar2({
|
|
|
1539
1593
|
] });
|
|
1540
1594
|
});
|
|
1541
1595
|
|
|
1542
|
-
// src/components/composed/columns/avatar-
|
|
1596
|
+
// src/components/composed/columns/avatar-group-invitations.tsx
|
|
1543
1597
|
var import_react2 = require("react");
|
|
1544
1598
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1545
|
-
function getInitials(name) {
|
|
1599
|
+
function getInitials(name, email) {
|
|
1600
|
+
const target = (name || email || "U").trim();
|
|
1601
|
+
return target.split(/[\s.@]/).filter(Boolean).map((n) => n[0]).join("").slice(0, 2).toUpperCase();
|
|
1602
|
+
}
|
|
1603
|
+
var AvatarGroupInvitations = (0, import_react2.memo)(function AvatarGroupInvitations2({
|
|
1604
|
+
invitations,
|
|
1605
|
+
maxDisplay = 3,
|
|
1606
|
+
onlyPending = true,
|
|
1607
|
+
fallback = null,
|
|
1608
|
+
size = "default",
|
|
1609
|
+
className
|
|
1610
|
+
}) {
|
|
1611
|
+
const list = invitations != null ? invitations : [];
|
|
1612
|
+
const targetInvites = onlyPending ? list.filter((i) => {
|
|
1613
|
+
var _a;
|
|
1614
|
+
return ((_a = i.status) == null ? void 0 : _a.toLowerCase()) === "pending";
|
|
1615
|
+
}) : list;
|
|
1616
|
+
if (targetInvites.length === 0) {
|
|
1617
|
+
if (!fallback) return null;
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: fallback });
|
|
1619
|
+
}
|
|
1620
|
+
const visibleInvites = targetInvites.slice(0, maxDisplay);
|
|
1621
|
+
const remainingCount = targetInvites.length - visibleInvites.length;
|
|
1622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(AvatarGroup, { className, children: [
|
|
1623
|
+
visibleInvites.map((inv, index) => {
|
|
1624
|
+
var _a, _b, _c, _d, _e;
|
|
1625
|
+
const displayName = ((_a = inv.invitedUser) == null ? void 0 : _a.name) || inv.email;
|
|
1626
|
+
const initials = getInitials((_b = inv.invitedUser) == null ? void 0 : _b.name, inv.email);
|
|
1627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Tooltip, { children: [
|
|
1628
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1629
|
+
TooltipTrigger,
|
|
1630
|
+
{
|
|
1631
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1632
|
+
Avatar,
|
|
1633
|
+
{
|
|
1634
|
+
size,
|
|
1635
|
+
className: "cursor-pointer border border-dashed border-primary/40",
|
|
1636
|
+
children: [
|
|
1637
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1638
|
+
AvatarImage,
|
|
1639
|
+
{
|
|
1640
|
+
src: (_e = (_d = inv.invitedUser) == null ? void 0 : _d.image) != null ? _e : void 0,
|
|
1641
|
+
alt: displayName
|
|
1642
|
+
}
|
|
1643
|
+
),
|
|
1644
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarFallback, { className: "bg-muted text-xs", children: initials })
|
|
1645
|
+
]
|
|
1646
|
+
}
|
|
1647
|
+
)
|
|
1648
|
+
}
|
|
1649
|
+
),
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(TooltipContent, { children: [
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "font-medium text-xs", children: displayName }),
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
1653
|
+
"Invited as ",
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "capitalize", children: inv.role })
|
|
1655
|
+
] })
|
|
1656
|
+
] })
|
|
1657
|
+
] }, (_c = inv.id) != null ? _c : `${displayName}-${index}`);
|
|
1658
|
+
}),
|
|
1659
|
+
remainingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Tooltip, { children: [
|
|
1660
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1661
|
+
TooltipTrigger,
|
|
1662
|
+
{
|
|
1663
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(AvatarGroupCount, { className: "cursor-pointer border border-dashed border-primary/40 font-mono", children: [
|
|
1664
|
+
"+",
|
|
1665
|
+
remainingCount
|
|
1666
|
+
] })
|
|
1667
|
+
}
|
|
1668
|
+
),
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-0.5 text-xs", children: [
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "font-semibold text-xs mb-0.5", children: onlyPending ? "Other Pending Invitations:" : "Other Invitations:" }),
|
|
1671
|
+
targetInvites.slice(maxDisplay).map((rem, idx) => {
|
|
1672
|
+
var _a, _b;
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "text-xs", children: [
|
|
1674
|
+
((_b = rem.invitedUser) == null ? void 0 : _b.name) || rem.email,
|
|
1675
|
+
" (",
|
|
1676
|
+
rem.role,
|
|
1677
|
+
")"
|
|
1678
|
+
] }, (_a = rem.id) != null ? _a : `${rem.email}-${idx}`);
|
|
1679
|
+
})
|
|
1680
|
+
] }) })
|
|
1681
|
+
] })
|
|
1682
|
+
] });
|
|
1683
|
+
});
|
|
1684
|
+
var AvatarInvitations = AvatarGroupInvitations;
|
|
1685
|
+
var OrganizationInvitations = AvatarGroupInvitations;
|
|
1686
|
+
|
|
1687
|
+
// src/components/composed/columns/avatar-group-users.tsx
|
|
1688
|
+
var import_react3 = require("react");
|
|
1689
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1690
|
+
function getInitials2(name, email) {
|
|
1691
|
+
const target = (name || email || "U").trim();
|
|
1692
|
+
return target.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase();
|
|
1693
|
+
}
|
|
1694
|
+
var AvatarGroupUsers = (0, import_react3.memo)(function AvatarGroupUsers2({
|
|
1695
|
+
users,
|
|
1696
|
+
maxDisplay = 3,
|
|
1697
|
+
fallback = null,
|
|
1698
|
+
className,
|
|
1699
|
+
size = "default"
|
|
1700
|
+
}) {
|
|
1701
|
+
const list = users != null ? users : [];
|
|
1702
|
+
if (list.length === 0) {
|
|
1703
|
+
if (!fallback) return null;
|
|
1704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: fallback });
|
|
1705
|
+
}
|
|
1706
|
+
const visibleUsers = list.slice(0, maxDisplay);
|
|
1707
|
+
const remainingCount = list.length - visibleUsers.length;
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(AvatarGroup, { className, children: [
|
|
1709
|
+
visibleUsers.map((u, index) => {
|
|
1710
|
+
var _a, _b;
|
|
1711
|
+
const initials = getInitials2(u.name, u.email);
|
|
1712
|
+
const displayName = u.name || u.email || "User";
|
|
1713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Tooltip, { children: [
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1715
|
+
TooltipTrigger,
|
|
1716
|
+
{
|
|
1717
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Avatar, { size, className: "cursor-pointer", children: [
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarImage, { src: (_b = u.image) != null ? _b : void 0, alt: displayName }),
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarFallback, { children: initials })
|
|
1720
|
+
] })
|
|
1721
|
+
}
|
|
1722
|
+
),
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipContent, { children: displayName })
|
|
1724
|
+
] }, (_a = u.id) != null ? _a : `${displayName}-${index}`);
|
|
1725
|
+
}),
|
|
1726
|
+
remainingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Tooltip, { children: [
|
|
1727
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1728
|
+
TooltipTrigger,
|
|
1729
|
+
{
|
|
1730
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(AvatarGroupCount, { className: "cursor-pointer font-mono", children: [
|
|
1731
|
+
"+",
|
|
1732
|
+
remainingCount
|
|
1733
|
+
] })
|
|
1734
|
+
}
|
|
1735
|
+
),
|
|
1736
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col gap-0.5 text-xs", children: list.slice(maxDisplay).map((rem, idx) => {
|
|
1737
|
+
var _a, _b;
|
|
1738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: rem.name || rem.email }, (_b = rem.id) != null ? _b : `${(_a = rem.name) != null ? _a : rem.email}-${idx}`);
|
|
1739
|
+
}) }) })
|
|
1740
|
+
] })
|
|
1741
|
+
] });
|
|
1742
|
+
});
|
|
1743
|
+
var AvatarUsers = AvatarGroupUsers;
|
|
1744
|
+
|
|
1745
|
+
// src/components/composed/columns/avatar-user.tsx
|
|
1746
|
+
var import_cn12 = require("cn");
|
|
1747
|
+
var import_react4 = require("react");
|
|
1748
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1749
|
+
function getInitials3(name) {
|
|
1546
1750
|
if (name) {
|
|
1547
1751
|
return name.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase();
|
|
1548
1752
|
}
|
|
1549
1753
|
return "U";
|
|
1550
1754
|
}
|
|
1551
|
-
var AvatarUser = (0,
|
|
1755
|
+
var AvatarUser = (0, import_react4.memo)(function AvatarUser2({
|
|
1552
1756
|
name,
|
|
1553
|
-
image
|
|
1757
|
+
image,
|
|
1758
|
+
className,
|
|
1759
|
+
size = "sm"
|
|
1554
1760
|
}) {
|
|
1555
|
-
return /* @__PURE__ */ (0,
|
|
1556
|
-
/* @__PURE__ */ (0,
|
|
1557
|
-
/* @__PURE__ */ (0,
|
|
1558
|
-
/* @__PURE__ */ (0,
|
|
1761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_cn12.cn)("flex items-center gap-2", className), children: [
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Avatar, { size, children: [
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarImage, { src: image != null ? image : void 0, alt: name != null ? name : void 0 }),
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AvatarFallback, { children: getInitials3(name) })
|
|
1559
1765
|
] }),
|
|
1560
|
-
/* @__PURE__ */ (0,
|
|
1766
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-xs font-medium truncate", children: name })
|
|
1767
|
+
] });
|
|
1768
|
+
});
|
|
1769
|
+
|
|
1770
|
+
// src/components/composed/columns/copyable-code.tsx
|
|
1771
|
+
var import_cn14 = require("cn");
|
|
1772
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1773
|
+
var import_react5 = require("react");
|
|
1774
|
+
|
|
1775
|
+
// src/components/ui/toast.tsx
|
|
1776
|
+
var import_toast = require("@base-ui/react/toast");
|
|
1777
|
+
var import_cn13 = require("cn");
|
|
1778
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1779
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1780
|
+
var toast = import_toast.Toast.createToastManager();
|
|
1781
|
+
var createToastManager = import_toast.Toast.createToastManager;
|
|
1782
|
+
var useToastManager = import_toast.Toast.useToastManager;
|
|
1783
|
+
|
|
1784
|
+
// src/components/composed/columns/copyable-code.tsx
|
|
1785
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1786
|
+
var CopyableCode = (0, import_react5.memo)(function CopyableCode2({
|
|
1787
|
+
value,
|
|
1788
|
+
label,
|
|
1789
|
+
copyMessage,
|
|
1790
|
+
toastOnCopy = true,
|
|
1791
|
+
showTooltip = true,
|
|
1792
|
+
fallback = null,
|
|
1793
|
+
className,
|
|
1794
|
+
codeClassName,
|
|
1795
|
+
onCopy
|
|
1796
|
+
}) {
|
|
1797
|
+
const [copied, setCopied] = (0, import_react5.useState)(false);
|
|
1798
|
+
const handleCopy = (0, import_react5.useCallback)(
|
|
1799
|
+
async (e) => {
|
|
1800
|
+
e.stopPropagation();
|
|
1801
|
+
if (!value) return;
|
|
1802
|
+
try {
|
|
1803
|
+
await navigator.clipboard.writeText(value);
|
|
1804
|
+
setCopied(true);
|
|
1805
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
1806
|
+
} catch (err) {
|
|
1807
|
+
console.error("Failed to copy to clipboard:", err);
|
|
1808
|
+
}
|
|
1809
|
+
if (onCopy) {
|
|
1810
|
+
onCopy(value);
|
|
1811
|
+
} else if (toastOnCopy) {
|
|
1812
|
+
try {
|
|
1813
|
+
toast.add({
|
|
1814
|
+
description: copyMessage || `${label || "Value"} copied to clipboard`
|
|
1815
|
+
});
|
|
1816
|
+
} catch (e2) {
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
},
|
|
1820
|
+
[value, onCopy, toastOnCopy, copyMessage, label]
|
|
1821
|
+
);
|
|
1822
|
+
if (!value) {
|
|
1823
|
+
if (!fallback) return null;
|
|
1824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: fallback });
|
|
1825
|
+
}
|
|
1826
|
+
const tooltipText = copied ? "Copied!" : `Copy ${label || "value"}`;
|
|
1827
|
+
const copyButton = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1828
|
+
Button,
|
|
1829
|
+
{
|
|
1830
|
+
size: "icon-xs",
|
|
1831
|
+
variant: "ghost",
|
|
1832
|
+
className: "text-muted-foreground hover:text-foreground cursor-pointer",
|
|
1833
|
+
onClick: handleCopy,
|
|
1834
|
+
title: tooltipText,
|
|
1835
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react7.CheckIcon, { className: "size-3 text-emerald-500" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react7.CopyIcon, { className: "size-3" })
|
|
1836
|
+
}
|
|
1837
|
+
);
|
|
1838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_cn14.cn)("flex items-center gap-1.5", className), children: [
|
|
1839
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1840
|
+
"code",
|
|
1841
|
+
{
|
|
1842
|
+
className: (0, import_cn14.cn)(
|
|
1843
|
+
"font-mono text-xs text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded select-all",
|
|
1844
|
+
codeClassName
|
|
1845
|
+
),
|
|
1846
|
+
children: value
|
|
1847
|
+
}
|
|
1848
|
+
),
|
|
1849
|
+
showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Tooltip, { children: [
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipTrigger, { render: copyButton }),
|
|
1851
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipContent, { children: tooltipText })
|
|
1852
|
+
] }) : copyButton
|
|
1853
|
+
] });
|
|
1854
|
+
});
|
|
1855
|
+
var CodeLabel = CopyableCode;
|
|
1856
|
+
var SlugLabel = CopyableCode;
|
|
1857
|
+
|
|
1858
|
+
// src/components/composed/columns/description-label.tsx
|
|
1859
|
+
var import_cn15 = require("cn");
|
|
1860
|
+
var import_react6 = require("react");
|
|
1861
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1862
|
+
var DescriptionLabel = (0, import_react6.memo)(function DescriptionLabel2({
|
|
1863
|
+
description,
|
|
1864
|
+
fallback = null,
|
|
1865
|
+
className
|
|
1866
|
+
}) {
|
|
1867
|
+
const text = description == null ? void 0 : description.trim();
|
|
1868
|
+
if (!text) {
|
|
1869
|
+
if (!fallback) return null;
|
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: (0, import_cn15.cn)("text-xs text-muted-foreground", className), children: fallback });
|
|
1871
|
+
}
|
|
1872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Tooltip, { children: [
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1874
|
+
TooltipTrigger,
|
|
1875
|
+
{
|
|
1876
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1877
|
+
"p",
|
|
1878
|
+
{
|
|
1879
|
+
className: (0, import_cn15.cn)(
|
|
1880
|
+
"text-xs text-muted-foreground truncate max-w-xs cursor-default",
|
|
1881
|
+
className
|
|
1882
|
+
),
|
|
1883
|
+
children: text
|
|
1884
|
+
}
|
|
1885
|
+
)
|
|
1886
|
+
}
|
|
1887
|
+
),
|
|
1888
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipContent, { className: "max-w-xs break-words", children: text })
|
|
1561
1889
|
] });
|
|
1562
1890
|
});
|
|
1563
1891
|
|
|
1564
1892
|
// src/components/composed/columns/email-label.tsx
|
|
1565
|
-
var
|
|
1566
|
-
var
|
|
1567
|
-
var EmailLabel = (0,
|
|
1568
|
-
return /* @__PURE__ */ (0,
|
|
1893
|
+
var import_react7 = require("react");
|
|
1894
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1895
|
+
var EmailLabel = (0, import_react7.memo)(function EmailLabel2({ email }) {
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-xs font-mono", children: email });
|
|
1569
1897
|
});
|
|
1570
1898
|
|
|
1571
1899
|
// src/components/composed/columns/email-verified.tsx
|
|
1572
|
-
var
|
|
1573
|
-
var
|
|
1900
|
+
var import_cn17 = require("cn");
|
|
1901
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1902
|
+
var import_react8 = require("react");
|
|
1574
1903
|
|
|
1575
1904
|
// src/components/ui/badge.tsx
|
|
1576
1905
|
var import_merge_props3 = require("@base-ui/react/merge-props");
|
|
1577
1906
|
var import_use_render3 = require("@base-ui/react/use-render");
|
|
1578
1907
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
1579
|
-
var
|
|
1908
|
+
var import_cn16 = require("cn");
|
|
1580
1909
|
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
1581
1910
|
"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!",
|
|
1582
1911
|
{
|
|
@@ -1609,7 +1938,7 @@ function Badge(_a) {
|
|
|
1609
1938
|
defaultTagName: "span",
|
|
1610
1939
|
props: (0, import_merge_props3.mergeProps)(
|
|
1611
1940
|
{
|
|
1612
|
-
className: (0,
|
|
1941
|
+
className: (0, import_cn16.cn)(badgeVariants({ variant }), className)
|
|
1613
1942
|
},
|
|
1614
1943
|
props
|
|
1615
1944
|
),
|
|
@@ -1622,151 +1951,839 @@ function Badge(_a) {
|
|
|
1622
1951
|
}
|
|
1623
1952
|
|
|
1624
1953
|
// src/components/composed/columns/email-verified.tsx
|
|
1625
|
-
var
|
|
1626
|
-
var EmailVerified = (0,
|
|
1627
|
-
verified
|
|
1954
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1955
|
+
var EmailVerified = (0, import_react8.memo)(function EmailVerified2({
|
|
1956
|
+
verified,
|
|
1957
|
+
label,
|
|
1958
|
+
className
|
|
1628
1959
|
}) {
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1960
|
+
const isVerified = Boolean(verified);
|
|
1961
|
+
if (isVerified) {
|
|
1962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1963
|
+
Badge,
|
|
1964
|
+
{
|
|
1965
|
+
variant: "outline",
|
|
1966
|
+
className: (0, import_cn17.cn)(
|
|
1967
|
+
"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 font-normal",
|
|
1968
|
+
className
|
|
1969
|
+
),
|
|
1970
|
+
children: [
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1972
|
+
import_lucide_react8.CheckIcon,
|
|
1973
|
+
{
|
|
1974
|
+
"data-icon": "inline-start",
|
|
1975
|
+
className: "text-emerald-600 dark:text-emerald-400"
|
|
1976
|
+
}
|
|
1977
|
+
),
|
|
1978
|
+
label != null ? label : "Verified"
|
|
1979
|
+
]
|
|
1980
|
+
}
|
|
1981
|
+
);
|
|
1982
|
+
}
|
|
1983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1984
|
+
Badge,
|
|
1985
|
+
{
|
|
1986
|
+
variant: "outline",
|
|
1987
|
+
className: (0, import_cn17.cn)(
|
|
1988
|
+
"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300 font-normal",
|
|
1989
|
+
className
|
|
1990
|
+
),
|
|
1991
|
+
children: [
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1993
|
+
import_lucide_react8.XIcon,
|
|
1994
|
+
{
|
|
1995
|
+
"data-icon": "inline-start",
|
|
1996
|
+
className: "text-amber-600 dark:text-amber-400"
|
|
1997
|
+
}
|
|
1998
|
+
),
|
|
1999
|
+
label != null ? label : "Unverified"
|
|
2000
|
+
]
|
|
2001
|
+
}
|
|
2002
|
+
);
|
|
1636
2003
|
});
|
|
1637
2004
|
|
|
1638
2005
|
// src/components/composed/columns/joined-label.tsx
|
|
1639
|
-
var
|
|
1640
|
-
var
|
|
1641
|
-
var JoinedLabel = (0,
|
|
2006
|
+
var import_react9 = require("react");
|
|
2007
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2008
|
+
var JoinedLabel = (0, import_react9.memo)(function JoinedLabel2({
|
|
1642
2009
|
joined,
|
|
1643
2010
|
locale = "id-ID"
|
|
1644
2011
|
}) {
|
|
1645
2012
|
if (!joined) return null;
|
|
1646
2013
|
const date = typeof joined === "string" ? new Date(joined) : joined;
|
|
1647
2014
|
if (Number.isNaN(date.getTime())) return null;
|
|
1648
|
-
return /* @__PURE__ */ (0,
|
|
2015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xs font-mono", children: new Intl.DateTimeFormat(locale, {
|
|
1649
2016
|
day: "numeric",
|
|
1650
2017
|
month: "long",
|
|
1651
2018
|
year: "numeric"
|
|
1652
2019
|
}).format(date) });
|
|
1653
2020
|
});
|
|
1654
2021
|
|
|
1655
|
-
// src/components/composed/columns/
|
|
1656
|
-
var
|
|
1657
|
-
var
|
|
1658
|
-
var
|
|
1659
|
-
var
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
2022
|
+
// src/components/composed/columns/metadata-progress.tsx
|
|
2023
|
+
var import_cn18 = require("cn");
|
|
2024
|
+
var import_react10 = require("react");
|
|
2025
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2026
|
+
var DEFAULT_METADATA_FIELDS = [
|
|
2027
|
+
{ key: "title", label: "Page Title" },
|
|
2028
|
+
{ key: "description", label: "Meta Description" },
|
|
2029
|
+
{ key: "keywords", label: "Keywords" },
|
|
2030
|
+
{ key: "author", label: "Author" },
|
|
2031
|
+
{ key: "canonicalUrl", label: "Canonical URL" },
|
|
2032
|
+
{ key: "favicon", label: "Favicon URL" },
|
|
2033
|
+
{ key: "ogImage", label: "OG Image URL" },
|
|
2034
|
+
{ key: "ogType", label: "OG Type" },
|
|
2035
|
+
{ key: "twitterCard", label: "Twitter Card" },
|
|
2036
|
+
{ key: "twitterHandle", label: "Twitter Handle" },
|
|
2037
|
+
{ key: "robots", label: "Robots" },
|
|
2038
|
+
{ key: "customJsonLd", label: "Custom JSON-LD" }
|
|
2039
|
+
];
|
|
2040
|
+
var MetadataProgress = (0, import_react10.memo)(function MetadataProgress2({
|
|
2041
|
+
metadata,
|
|
2042
|
+
fields = DEFAULT_METADATA_FIELDS,
|
|
2043
|
+
completedCount: propCompleted,
|
|
2044
|
+
totalCount: propTotal,
|
|
2045
|
+
title = "Website Metadata",
|
|
2046
|
+
fallback = null,
|
|
2047
|
+
className
|
|
1673
2048
|
}) {
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
"
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1711
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1712
|
-
"div",
|
|
1713
|
-
__spreadValues({
|
|
1714
|
-
"data-slot": "empty-header",
|
|
1715
|
-
className: (0, import_cn13.cn)("flex max-w-sm flex-col items-center gap-1", className)
|
|
1716
|
-
}, props)
|
|
1717
|
-
);
|
|
1718
|
-
}
|
|
1719
|
-
var emptyMediaVariants = (0, import_class_variance_authority4.cva)(
|
|
1720
|
-
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1721
|
-
{
|
|
1722
|
-
variants: {
|
|
1723
|
-
variant: {
|
|
1724
|
-
default: "bg-transparent",
|
|
1725
|
-
icon: "flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
|
|
2049
|
+
const stats = (0, import_react10.useMemo)(() => {
|
|
2050
|
+
if (propCompleted !== void 0 && propTotal !== void 0) {
|
|
2051
|
+
const total3 = Math.max(1, propTotal);
|
|
2052
|
+
const completed3 = Math.min(propCompleted, total3);
|
|
2053
|
+
const percentage3 = Math.round(completed3 / total3 * 100);
|
|
2054
|
+
return {
|
|
2055
|
+
completed: completed3,
|
|
2056
|
+
total: total3,
|
|
2057
|
+
percentage: percentage3,
|
|
2058
|
+
missing: []
|
|
2059
|
+
};
|
|
2060
|
+
}
|
|
2061
|
+
if (!metadata) {
|
|
2062
|
+
return {
|
|
2063
|
+
completed: 0,
|
|
2064
|
+
total: fields.length,
|
|
2065
|
+
percentage: 0,
|
|
2066
|
+
missing: fields.map((f) => f.label)
|
|
2067
|
+
};
|
|
2068
|
+
}
|
|
2069
|
+
const completedList = [];
|
|
2070
|
+
const missingList = [];
|
|
2071
|
+
for (const field of fields) {
|
|
2072
|
+
const val = metadata[field.key];
|
|
2073
|
+
let isFilled = false;
|
|
2074
|
+
if (field.key === "keywords") {
|
|
2075
|
+
isFilled = Array.isArray(val) ? val.length > 0 : Boolean(typeof val === "string" && val.trim().length > 0);
|
|
2076
|
+
} else if (typeof val === "string") {
|
|
2077
|
+
isFilled = val.trim().length > 0;
|
|
2078
|
+
} else {
|
|
2079
|
+
isFilled = Boolean(val);
|
|
2080
|
+
}
|
|
2081
|
+
if (isFilled) {
|
|
2082
|
+
completedList.push(field.label);
|
|
2083
|
+
} else {
|
|
2084
|
+
missingList.push(field.label);
|
|
1726
2085
|
}
|
|
1727
|
-
},
|
|
1728
|
-
defaultVariants: {
|
|
1729
|
-
variant: "default"
|
|
1730
2086
|
}
|
|
2087
|
+
const total2 = fields.length;
|
|
2088
|
+
const completed2 = completedList.length;
|
|
2089
|
+
const percentage2 = Math.round(completed2 / Math.max(1, total2) * 100);
|
|
2090
|
+
return {
|
|
2091
|
+
completed: completed2,
|
|
2092
|
+
total: total2,
|
|
2093
|
+
percentage: percentage2,
|
|
2094
|
+
missing: missingList
|
|
2095
|
+
};
|
|
2096
|
+
}, [metadata, fields, propCompleted, propTotal]);
|
|
2097
|
+
const { completed, total, percentage, missing } = stats;
|
|
2098
|
+
if (completed === 0 && fallback !== null) {
|
|
2099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: fallback });
|
|
1731
2100
|
}
|
|
1732
|
-
)
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
2101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Tooltip, { children: [
|
|
2102
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2103
|
+
TooltipTrigger,
|
|
2104
|
+
{
|
|
2105
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2106
|
+
"div",
|
|
2107
|
+
{
|
|
2108
|
+
className: (0, import_cn18.cn)(
|
|
2109
|
+
"inline-flex items-center gap-2 cursor-pointer select-none",
|
|
2110
|
+
className
|
|
2111
|
+
),
|
|
2112
|
+
children: percentage === 100 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2113
|
+
Badge,
|
|
2114
|
+
{
|
|
2115
|
+
variant: "outline",
|
|
2116
|
+
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",
|
|
2117
|
+
children: [
|
|
2118
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "size-1.5 rounded-full bg-emerald-500" }),
|
|
2119
|
+
"100%"
|
|
2120
|
+
]
|
|
2121
|
+
}
|
|
2122
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2 w-24", children: [
|
|
2123
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-1 h-1.5 rounded-full bg-muted/60 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2124
|
+
"div",
|
|
2125
|
+
{
|
|
2126
|
+
className: (0, import_cn18.cn)(
|
|
2127
|
+
"h-full rounded-full transition-all duration-300",
|
|
2128
|
+
percentage >= 50 ? "bg-primary" : "bg-amber-500"
|
|
2129
|
+
),
|
|
2130
|
+
style: { width: `${percentage}%` }
|
|
2131
|
+
}
|
|
2132
|
+
) }),
|
|
2133
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "font-mono text-[11px] text-muted-foreground shrink-0", children: [
|
|
2134
|
+
completed,
|
|
2135
|
+
"/",
|
|
2136
|
+
total
|
|
2137
|
+
] })
|
|
2138
|
+
] })
|
|
2139
|
+
}
|
|
2140
|
+
)
|
|
2141
|
+
}
|
|
2142
|
+
),
|
|
2143
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TooltipContent, { className: "max-w-xs text-xs space-y-1.5 p-3", children: [
|
|
2144
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-between border-b pb-1", children: [
|
|
2145
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "font-semibold text-xs", children: title }),
|
|
2146
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "font-mono text-[11px] text-muted-foreground", children: [
|
|
2147
|
+
completed,
|
|
2148
|
+
"/",
|
|
2149
|
+
total,
|
|
2150
|
+
" (",
|
|
2151
|
+
percentage,
|
|
2152
|
+
"%)"
|
|
2153
|
+
] })
|
|
2154
|
+
] }),
|
|
2155
|
+
missing.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "text-[11px] text-muted-foreground leading-relaxed", children: [
|
|
2156
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "text-amber-600 dark:text-amber-400 font-medium", children: [
|
|
2157
|
+
"Missing:",
|
|
2158
|
+
" "
|
|
2159
|
+
] }),
|
|
2160
|
+
missing.slice(0, 4).join(", "),
|
|
2161
|
+
missing.length > 4 ? ` +${missing.length - 4} more` : ""
|
|
2162
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-[11px] text-emerald-600 dark:text-emerald-400 font-medium", children: "All metadata fields completed!" })
|
|
2163
|
+
] })
|
|
2164
|
+
] });
|
|
2165
|
+
});
|
|
2166
|
+
var MetadataStatus = MetadataProgress;
|
|
2167
|
+
var ProgressStatus = MetadataProgress;
|
|
2168
|
+
|
|
2169
|
+
// src/components/composed/columns/organization-roles.tsx
|
|
2170
|
+
var import_cn19 = require("cn");
|
|
2171
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2172
|
+
var import_react11 = require("react");
|
|
2173
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2174
|
+
var OrganizationRoleBadge = (0, import_react11.forwardRef)(function OrganizationRoleBadge2(_a, ref) {
|
|
2175
|
+
var _b = _a, { role, roleName, className } = _b, props = __objRest(_b, ["role", "roleName", "className"]);
|
|
2176
|
+
const roleValue = roleName != null ? roleName : role;
|
|
2177
|
+
if (!roleValue) return null;
|
|
2178
|
+
const normalized = roleValue.toLowerCase().trim();
|
|
2179
|
+
if (normalized === "owner") {
|
|
2180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2181
|
+
Badge,
|
|
2182
|
+
__spreadProps(__spreadValues({
|
|
2183
|
+
ref,
|
|
2184
|
+
variant: "outline",
|
|
2185
|
+
className: (0, import_cn19.cn)(
|
|
2186
|
+
"capitalize border-purple-500/30 bg-purple-500/10 text-purple-700 dark:text-purple-300 font-normal",
|
|
2187
|
+
className
|
|
2188
|
+
)
|
|
2189
|
+
}, props), {
|
|
2190
|
+
children: [
|
|
2191
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2192
|
+
import_lucide_react9.CrownIcon,
|
|
2193
|
+
{
|
|
2194
|
+
"data-icon": "inline-start",
|
|
2195
|
+
className: "text-purple-600 dark:text-purple-400"
|
|
2196
|
+
}
|
|
2197
|
+
),
|
|
2198
|
+
roleValue
|
|
2199
|
+
]
|
|
2200
|
+
})
|
|
2201
|
+
);
|
|
2202
|
+
}
|
|
2203
|
+
if (normalized === "admin") {
|
|
2204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2205
|
+
Badge,
|
|
2206
|
+
__spreadProps(__spreadValues({
|
|
2207
|
+
ref,
|
|
2208
|
+
variant: "outline",
|
|
2209
|
+
className: (0, import_cn19.cn)(
|
|
2210
|
+
"capitalize border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300 font-normal",
|
|
2211
|
+
className
|
|
2212
|
+
)
|
|
2213
|
+
}, props), {
|
|
2214
|
+
children: [
|
|
2215
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2216
|
+
import_lucide_react9.ShieldCheckIcon,
|
|
2217
|
+
{
|
|
2218
|
+
"data-icon": "inline-start",
|
|
2219
|
+
className: "text-blue-600 dark:text-blue-400"
|
|
2220
|
+
}
|
|
2221
|
+
),
|
|
2222
|
+
roleValue
|
|
2223
|
+
]
|
|
2224
|
+
})
|
|
2225
|
+
);
|
|
2226
|
+
}
|
|
2227
|
+
if (normalized === "redaktur") {
|
|
2228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2229
|
+
Badge,
|
|
2230
|
+
__spreadProps(__spreadValues({
|
|
2231
|
+
ref,
|
|
2232
|
+
variant: "outline",
|
|
2233
|
+
className: (0, import_cn19.cn)(
|
|
2234
|
+
"capitalize border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300 font-normal",
|
|
2235
|
+
className
|
|
2236
|
+
)
|
|
2237
|
+
}, props), {
|
|
2238
|
+
children: [
|
|
2239
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2240
|
+
import_lucide_react9.NewspaperIcon,
|
|
2241
|
+
{
|
|
2242
|
+
"data-icon": "inline-start",
|
|
2243
|
+
className: "text-amber-600 dark:text-amber-400"
|
|
2244
|
+
}
|
|
2245
|
+
),
|
|
2246
|
+
roleValue
|
|
2247
|
+
]
|
|
2248
|
+
})
|
|
2249
|
+
);
|
|
2250
|
+
}
|
|
2251
|
+
if (normalized === "editor") {
|
|
2252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2253
|
+
Badge,
|
|
2254
|
+
__spreadProps(__spreadValues({
|
|
2255
|
+
ref,
|
|
2256
|
+
variant: "outline",
|
|
2257
|
+
className: (0, import_cn19.cn)(
|
|
2258
|
+
"capitalize border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 font-normal",
|
|
2259
|
+
className
|
|
2260
|
+
)
|
|
2261
|
+
}, props), {
|
|
2262
|
+
children: [
|
|
2263
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2264
|
+
import_lucide_react9.PenLineIcon,
|
|
2265
|
+
{
|
|
2266
|
+
"data-icon": "inline-start",
|
|
2267
|
+
className: "text-emerald-600 dark:text-emerald-400"
|
|
2268
|
+
}
|
|
2269
|
+
),
|
|
2270
|
+
roleValue
|
|
2271
|
+
]
|
|
2272
|
+
})
|
|
2273
|
+
);
|
|
2274
|
+
}
|
|
2275
|
+
if (normalized === "staff") {
|
|
2276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2277
|
+
Badge,
|
|
2278
|
+
__spreadProps(__spreadValues({
|
|
2279
|
+
ref,
|
|
2280
|
+
variant: "outline",
|
|
2281
|
+
className: (0, import_cn19.cn)(
|
|
2282
|
+
"capitalize border-slate-500/30 bg-slate-500/10 text-slate-700 dark:text-slate-300 font-normal",
|
|
2283
|
+
className
|
|
2284
|
+
)
|
|
2285
|
+
}, props), {
|
|
2286
|
+
children: [
|
|
2287
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2288
|
+
import_lucide_react9.UserIcon,
|
|
2289
|
+
{
|
|
2290
|
+
"data-icon": "inline-start",
|
|
2291
|
+
className: "text-slate-600 dark:text-slate-400"
|
|
2292
|
+
}
|
|
2293
|
+
),
|
|
2294
|
+
roleValue
|
|
2295
|
+
]
|
|
2296
|
+
})
|
|
2297
|
+
);
|
|
2298
|
+
}
|
|
2299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2300
|
+
Badge,
|
|
2301
|
+
__spreadProps(__spreadValues({
|
|
2302
|
+
ref,
|
|
2303
|
+
variant: "secondary",
|
|
2304
|
+
className: (0, import_cn19.cn)("capitalize font-normal", className)
|
|
2305
|
+
}, props), {
|
|
2306
|
+
children: [
|
|
2307
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2308
|
+
import_lucide_react9.Building2Icon,
|
|
2309
|
+
{
|
|
2310
|
+
"data-icon": "inline-start",
|
|
2311
|
+
className: "text-muted-foreground"
|
|
2312
|
+
}
|
|
2313
|
+
),
|
|
2314
|
+
roleValue
|
|
2315
|
+
]
|
|
2316
|
+
})
|
|
2317
|
+
);
|
|
2318
|
+
});
|
|
2319
|
+
OrganizationRoleBadge.displayName = "OrganizationRoleBadge";
|
|
2320
|
+
var OrganizationRoles = (0, import_react11.memo)(function OrganizationRoles2({
|
|
2321
|
+
roles,
|
|
2322
|
+
className
|
|
2323
|
+
}) {
|
|
2324
|
+
const orgRoles = roles != null ? roles : [];
|
|
2325
|
+
if (orgRoles.length === 0) return null;
|
|
2326
|
+
if (orgRoles.length === 1) {
|
|
2327
|
+
const item = orgRoles[0];
|
|
2328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Tooltip, { children: [
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2330
|
+
TooltipTrigger,
|
|
2331
|
+
{
|
|
2332
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2333
|
+
OrganizationRoleBadge,
|
|
2334
|
+
{
|
|
2335
|
+
roleName: item.roleName,
|
|
2336
|
+
className
|
|
2337
|
+
}
|
|
2338
|
+
)
|
|
2339
|
+
}
|
|
2340
|
+
),
|
|
2341
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(TooltipContent, { children: [
|
|
2342
|
+
item.roleName,
|
|
2343
|
+
" at ",
|
|
2344
|
+
item.organizationName
|
|
2345
|
+
] })
|
|
2346
|
+
] });
|
|
2347
|
+
}
|
|
2348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: (0, import_cn19.cn)("flex items-center gap-1.5", className), children: [
|
|
2349
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Tooltip, { children: [
|
|
2350
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2351
|
+
TooltipTrigger,
|
|
2352
|
+
{
|
|
2353
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(OrganizationRoleBadge, { roleName: orgRoles[0].roleName })
|
|
2354
|
+
}
|
|
2355
|
+
),
|
|
2356
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(TooltipContent, { children: [
|
|
2357
|
+
orgRoles[0].roleName,
|
|
2358
|
+
" at ",
|
|
2359
|
+
orgRoles[0].organizationName
|
|
2360
|
+
] })
|
|
2361
|
+
] }),
|
|
2362
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Tooltip, { children: [
|
|
2363
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2364
|
+
TooltipTrigger,
|
|
2365
|
+
{
|
|
2366
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Badge, { variant: "secondary", className: "font-mono", children: [
|
|
2367
|
+
"+",
|
|
2368
|
+
orgRoles.length - 1
|
|
2369
|
+
] })
|
|
2370
|
+
}
|
|
2371
|
+
),
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex flex-col", children: orgRoles.slice(1).map((item, index) => {
|
|
2373
|
+
var _a, _b;
|
|
2374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2375
|
+
"span",
|
|
2376
|
+
{
|
|
2377
|
+
children: [
|
|
2378
|
+
item.roleName,
|
|
2379
|
+
" at ",
|
|
2380
|
+
item.organizationName
|
|
2381
|
+
]
|
|
2382
|
+
},
|
|
2383
|
+
(_b = item.membershipId) != null ? _b : `${(_a = item.organizationName) != null ? _a : ""}-${index}`
|
|
2384
|
+
);
|
|
2385
|
+
}) }) })
|
|
2386
|
+
] })
|
|
2387
|
+
] });
|
|
2388
|
+
});
|
|
2389
|
+
|
|
2390
|
+
// src/components/composed/columns/permission-badges.tsx
|
|
2391
|
+
var import_cn20 = require("cn");
|
|
2392
|
+
var import_react12 = require("react");
|
|
2393
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2394
|
+
var PermissionBadges = (0, import_react12.memo)(function PermissionBadges2({
|
|
2395
|
+
permissions,
|
|
2396
|
+
maxDisplay = 3,
|
|
2397
|
+
className
|
|
2398
|
+
}) {
|
|
2399
|
+
const perms = permissions != null ? permissions : [];
|
|
2400
|
+
if (perms.length === 0) return null;
|
|
2401
|
+
const visible = perms.slice(0, maxDisplay);
|
|
2402
|
+
const remaining = perms.slice(maxDisplay);
|
|
2403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: (0, import_cn20.cn)("flex flex-wrap items-center gap-1", className), children: [
|
|
2404
|
+
visible.map((p) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2405
|
+
Badge,
|
|
2406
|
+
{
|
|
2407
|
+
variant: "outline",
|
|
2408
|
+
className: "text-[10px] font-mono py-0 font-normal",
|
|
2409
|
+
children: p
|
|
2410
|
+
},
|
|
2411
|
+
p
|
|
2412
|
+
)),
|
|
2413
|
+
remaining.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Tooltip, { children: [
|
|
2414
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2415
|
+
TooltipTrigger,
|
|
2416
|
+
{
|
|
2417
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2418
|
+
Badge,
|
|
2419
|
+
{
|
|
2420
|
+
variant: "secondary",
|
|
2421
|
+
className: "text-[10px] font-mono py-0 cursor-default font-normal",
|
|
2422
|
+
children: [
|
|
2423
|
+
"+",
|
|
2424
|
+
remaining.length
|
|
2425
|
+
]
|
|
2426
|
+
}
|
|
2427
|
+
)
|
|
2428
|
+
}
|
|
2429
|
+
),
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipContent, { className: "max-w-xs", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex flex-col gap-0.5 text-xs font-mono", children: remaining.map((p) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: p }, p)) }) })
|
|
2431
|
+
] })
|
|
2432
|
+
] });
|
|
2433
|
+
});
|
|
2434
|
+
var PermissionsBadges = PermissionBadges;
|
|
2435
|
+
|
|
2436
|
+
// src/components/composed/columns/redirect-uris.tsx
|
|
2437
|
+
var import_cn21 = require("cn");
|
|
2438
|
+
var import_react13 = require("react");
|
|
2439
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2440
|
+
var RedirectUris = (0, import_react13.memo)(function RedirectUris2({
|
|
2441
|
+
uris,
|
|
2442
|
+
maxDisplay = 1,
|
|
2443
|
+
fallback = null,
|
|
2444
|
+
tooltipTitle = "All Redirect URIs:",
|
|
2445
|
+
className
|
|
2446
|
+
}) {
|
|
2447
|
+
const list = (0, import_react13.useMemo)(() => {
|
|
2448
|
+
if (!uris) return [];
|
|
2449
|
+
if (Array.isArray(uris)) return uris.filter(Boolean);
|
|
2450
|
+
return [uris];
|
|
2451
|
+
}, [uris]);
|
|
2452
|
+
if (list.length === 0) {
|
|
2453
|
+
if (!fallback) return null;
|
|
2454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: fallback });
|
|
2455
|
+
}
|
|
2456
|
+
const primaryUri = list[0];
|
|
2457
|
+
const remainingCount = list.length - maxDisplay;
|
|
2458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: (0, import_cn21.cn)("flex items-center gap-2", className), children: [
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2460
|
+
"p",
|
|
2461
|
+
{
|
|
2462
|
+
className: "text-xs text-muted-foreground font-mono truncate",
|
|
2463
|
+
title: primaryUri,
|
|
2464
|
+
children: primaryUri
|
|
2465
|
+
}
|
|
2466
|
+
),
|
|
2467
|
+
remainingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Tooltip, { children: [
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2469
|
+
TooltipTrigger,
|
|
2470
|
+
{
|
|
2471
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Badge, { variant: "outline", className: "font-mono cursor-pointer", children: [
|
|
2472
|
+
"+",
|
|
2473
|
+
remainingCount
|
|
2474
|
+
] })
|
|
2475
|
+
}
|
|
2476
|
+
),
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipContent, { className: "text-xs font-mono", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
2478
|
+
tooltipTitle && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "font-semibold text-xs", children: tooltipTitle }),
|
|
2479
|
+
list.map((uri) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: uri }, uri))
|
|
2480
|
+
] }) })
|
|
2481
|
+
] })
|
|
2482
|
+
] });
|
|
2483
|
+
});
|
|
2484
|
+
var RedirectUriLabel = RedirectUris;
|
|
2485
|
+
var UrisList = RedirectUris;
|
|
2486
|
+
var UrisLabel = RedirectUris;
|
|
2487
|
+
|
|
2488
|
+
// src/components/composed/columns/running-status.tsx
|
|
2489
|
+
var import_cn22 = require("cn");
|
|
2490
|
+
var import_react14 = require("react");
|
|
2491
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2492
|
+
var RunningStatus = (0, import_react14.memo)(function RunningStatus2({
|
|
2493
|
+
count = 0,
|
|
2494
|
+
isRunning,
|
|
2495
|
+
accessTokens = 0,
|
|
2496
|
+
refreshTokens = 0,
|
|
2497
|
+
usersCount = 0,
|
|
2498
|
+
runningLabel = "Running",
|
|
2499
|
+
idleLabel = "Idle",
|
|
2500
|
+
tooltipTitle = "Sessions & Active Tokens",
|
|
2501
|
+
className
|
|
2502
|
+
}) {
|
|
2503
|
+
const activeCount = count != null ? count : 0;
|
|
2504
|
+
const running = isRunning != null ? isRunning : activeCount > 0;
|
|
2505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Tooltip, { children: [
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2507
|
+
TooltipTrigger,
|
|
2508
|
+
{
|
|
2509
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2510
|
+
"div",
|
|
2511
|
+
{
|
|
2512
|
+
className: (0, import_cn22.cn)(
|
|
2513
|
+
"inline-flex items-center cursor-pointer select-none",
|
|
2514
|
+
className
|
|
2515
|
+
),
|
|
2516
|
+
children: running ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2517
|
+
Badge,
|
|
2518
|
+
{
|
|
2519
|
+
variant: "outline",
|
|
2520
|
+
className: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 gap-1.5 text-xs font-normal",
|
|
2521
|
+
children: [
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "size-1.5 rounded-full bg-emerald-500 animate-pulse" }),
|
|
2523
|
+
runningLabel,
|
|
2524
|
+
" (",
|
|
2525
|
+
activeCount,
|
|
2526
|
+
")"
|
|
2527
|
+
]
|
|
2528
|
+
}
|
|
2529
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2530
|
+
Badge,
|
|
2531
|
+
{
|
|
2532
|
+
variant: "outline",
|
|
2533
|
+
className: "border-border/60 bg-muted/40 text-muted-foreground gap-1.5 text-xs font-normal",
|
|
2534
|
+
children: [
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "size-1.5 rounded-full bg-muted-foreground/40" }),
|
|
2536
|
+
idleLabel
|
|
2537
|
+
]
|
|
2538
|
+
}
|
|
2539
|
+
)
|
|
2540
|
+
}
|
|
2541
|
+
)
|
|
2542
|
+
}
|
|
2543
|
+
),
|
|
2544
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TooltipContent, { className: "text-xs space-y-2 p-3 min-w-[200px]", children: [
|
|
2545
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between border-b pb-1.5", children: [
|
|
2546
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-semibold text-xs", children: tooltipTitle }),
|
|
2547
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2548
|
+
"span",
|
|
2549
|
+
{
|
|
2550
|
+
className: (0, import_cn22.cn)(
|
|
2551
|
+
"text-[10px] px-1.5 py-0.5 rounded font-medium",
|
|
2552
|
+
running ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "bg-muted text-muted-foreground"
|
|
2553
|
+
),
|
|
2554
|
+
children: running ? "Active" : "Idle"
|
|
2555
|
+
}
|
|
2556
|
+
)
|
|
2557
|
+
] }),
|
|
2558
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-1 text-[11px]", children: [
|
|
2559
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between text-muted-foreground", children: [
|
|
2560
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Active Access Tokens:" }),
|
|
2561
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono font-medium text-foreground", children: accessTokens != null ? accessTokens : 0 })
|
|
2562
|
+
] }),
|
|
2563
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between text-muted-foreground", children: [
|
|
2564
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Active Refresh Tokens:" }),
|
|
2565
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono font-medium text-foreground", children: refreshTokens != null ? refreshTokens : 0 })
|
|
2566
|
+
] }),
|
|
2567
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between text-muted-foreground", children: [
|
|
2568
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Authorized Users:" }),
|
|
2569
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-mono font-medium text-foreground", children: usersCount != null ? usersCount : 0 })
|
|
2570
|
+
] })
|
|
2571
|
+
] })
|
|
2572
|
+
] })
|
|
2573
|
+
] });
|
|
2574
|
+
});
|
|
2575
|
+
var TokenActivity = RunningStatus;
|
|
2576
|
+
var ActiveTokensStatus = RunningStatus;
|
|
2577
|
+
|
|
2578
|
+
// src/components/composed/columns/user-role.tsx
|
|
2579
|
+
var import_cn23 = require("cn");
|
|
2580
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2581
|
+
var import_react15 = require("react");
|
|
2582
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2583
|
+
var UserRole = (0, import_react15.memo)(function UserRole2({
|
|
2584
|
+
role,
|
|
2585
|
+
className
|
|
2586
|
+
}) {
|
|
2587
|
+
if (!role) return null;
|
|
2588
|
+
const normalized = role.toLowerCase().trim();
|
|
2589
|
+
if (normalized === "admin") {
|
|
2590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2591
|
+
Badge,
|
|
2592
|
+
{
|
|
2593
|
+
variant: "outline",
|
|
2594
|
+
className: (0, import_cn23.cn)(
|
|
2595
|
+
"capitalize border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",
|
|
2596
|
+
className
|
|
2597
|
+
),
|
|
2598
|
+
children: [
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2600
|
+
import_lucide_react10.UserStarIcon,
|
|
2601
|
+
{
|
|
2602
|
+
"data-icon": "inline-start",
|
|
2603
|
+
className: "text-amber-500 dark:text-amber-400"
|
|
2604
|
+
}
|
|
2605
|
+
),
|
|
2606
|
+
role
|
|
2607
|
+
]
|
|
2608
|
+
}
|
|
2609
|
+
);
|
|
2610
|
+
}
|
|
2611
|
+
if (normalized === "client") {
|
|
2612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2613
|
+
Badge,
|
|
2614
|
+
{
|
|
2615
|
+
variant: "outline",
|
|
2616
|
+
className: (0, import_cn23.cn)(
|
|
2617
|
+
"capitalize border-sky-500/30 bg-sky-500/10 text-sky-700 dark:text-sky-300",
|
|
2618
|
+
className
|
|
2619
|
+
),
|
|
2620
|
+
children: [
|
|
2621
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2622
|
+
import_lucide_react10.BriefcaseIcon,
|
|
2623
|
+
{
|
|
2624
|
+
"data-icon": "inline-start",
|
|
2625
|
+
className: "text-sky-500 dark:text-sky-400"
|
|
2626
|
+
}
|
|
2627
|
+
),
|
|
2628
|
+
role
|
|
2629
|
+
]
|
|
2630
|
+
}
|
|
2631
|
+
);
|
|
2632
|
+
}
|
|
2633
|
+
if (normalized === "user") {
|
|
2634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Badge, { variant: "outline", className: (0, import_cn23.cn)("capitalize", className), children: [
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react10.UserIcon, { "data-icon": "inline-start", className: "text-muted-foreground" }),
|
|
2636
|
+
role
|
|
2637
|
+
] });
|
|
2638
|
+
}
|
|
2639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2640
|
+
Badge,
|
|
2641
|
+
{
|
|
2642
|
+
variant: "secondary",
|
|
2643
|
+
className: (0, import_cn23.cn)("capitalize font-normal", className),
|
|
2644
|
+
children: [
|
|
2645
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react10.ShieldIcon, { "data-icon": "inline-start", className: "text-muted-foreground" }),
|
|
2646
|
+
role
|
|
2647
|
+
]
|
|
2648
|
+
}
|
|
2649
|
+
);
|
|
2650
|
+
});
|
|
2651
|
+
|
|
2652
|
+
// src/components/composed/columns/user-status.tsx
|
|
2653
|
+
var import_cn24 = require("cn");
|
|
2654
|
+
var import_react16 = require("react");
|
|
2655
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2656
|
+
var UserStatus = (0, import_react16.memo)(function UserStatus2({
|
|
2657
|
+
status,
|
|
2658
|
+
label,
|
|
2659
|
+
activeLabel = "Active",
|
|
2660
|
+
inactiveLabel,
|
|
2661
|
+
className
|
|
2662
|
+
}) {
|
|
2663
|
+
var _a;
|
|
2664
|
+
const isInactive = typeof status === "string" ? status.toLowerCase() !== "active" : Boolean(status);
|
|
2665
|
+
if (isInactive) {
|
|
2666
|
+
const displayLabel = (_a = label != null ? label : inactiveLabel) != null ? _a : typeof status === "string" ? status : "Inactive";
|
|
2667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2668
|
+
Badge,
|
|
2669
|
+
{
|
|
2670
|
+
variant: "outline",
|
|
2671
|
+
className: (0, import_cn24.cn)(
|
|
2672
|
+
"capitalize border-destructive/30 bg-destructive/10 text-destructive dark:text-red-400 gap-1.5 font-normal",
|
|
2673
|
+
className
|
|
2674
|
+
),
|
|
2675
|
+
children: [
|
|
2676
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "size-1.5 rounded-full bg-destructive" }),
|
|
2677
|
+
displayLabel
|
|
2678
|
+
]
|
|
2679
|
+
}
|
|
2680
|
+
);
|
|
2681
|
+
}
|
|
2682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2683
|
+
Badge,
|
|
2684
|
+
{
|
|
2685
|
+
variant: "outline",
|
|
2686
|
+
className: (0, import_cn24.cn)(
|
|
2687
|
+
"capitalize border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 gap-1.5 font-normal",
|
|
2688
|
+
className
|
|
2689
|
+
),
|
|
2690
|
+
children: [
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "size-1.5 rounded-full bg-emerald-500" }),
|
|
2692
|
+
label != null ? label : activeLabel
|
|
2693
|
+
]
|
|
2694
|
+
}
|
|
2695
|
+
);
|
|
2696
|
+
});
|
|
2697
|
+
var ItemStatus = UserStatus;
|
|
2698
|
+
var StatusBadge = UserStatus;
|
|
2699
|
+
|
|
2700
|
+
// src/components/composed/data-table/data-table.tsx
|
|
2701
|
+
var import_react_table4 = require("@tanstack/react-table");
|
|
2702
|
+
var import_lucide_react23 = require("lucide-react");
|
|
2703
|
+
var import_navigation3 = require("next/navigation");
|
|
2704
|
+
var import_react21 = require("react");
|
|
2705
|
+
|
|
2706
|
+
// src/components/composed/state-empty.tsx
|
|
2707
|
+
var import_react17 = require("react");
|
|
2708
|
+
|
|
2709
|
+
// src/components/ui/empty.tsx
|
|
2710
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
2711
|
+
var import_cn25 = require("cn");
|
|
2712
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2713
|
+
function Empty(_a) {
|
|
2714
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2716
|
+
"div",
|
|
2717
|
+
__spreadValues({
|
|
2718
|
+
"data-slot": "empty",
|
|
2719
|
+
className: (0, import_cn25.cn)(
|
|
2720
|
+
"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",
|
|
2721
|
+
className
|
|
2722
|
+
)
|
|
2723
|
+
}, props)
|
|
2724
|
+
);
|
|
2725
|
+
}
|
|
2726
|
+
function EmptyHeader(_a) {
|
|
2727
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2729
|
+
"div",
|
|
2730
|
+
__spreadValues({
|
|
2731
|
+
"data-slot": "empty-header",
|
|
2732
|
+
className: (0, import_cn25.cn)("flex max-w-sm flex-col items-center gap-1", className)
|
|
2733
|
+
}, props)
|
|
2734
|
+
);
|
|
2735
|
+
}
|
|
2736
|
+
var emptyMediaVariants = (0, import_class_variance_authority4.cva)(
|
|
2737
|
+
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
2738
|
+
{
|
|
2739
|
+
variants: {
|
|
2740
|
+
variant: {
|
|
2741
|
+
default: "bg-transparent",
|
|
2742
|
+
icon: "flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
|
|
2743
|
+
}
|
|
2744
|
+
},
|
|
2745
|
+
defaultVariants: {
|
|
2746
|
+
variant: "default"
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
);
|
|
2750
|
+
function EmptyMedia(_a) {
|
|
2751
|
+
var _b = _a, {
|
|
2752
|
+
className,
|
|
2753
|
+
variant = "default"
|
|
2754
|
+
} = _b, props = __objRest(_b, [
|
|
2755
|
+
"className",
|
|
2756
|
+
"variant"
|
|
2757
|
+
]);
|
|
2758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2759
|
+
"div",
|
|
2760
|
+
__spreadValues({
|
|
2761
|
+
"data-slot": "empty-icon",
|
|
2762
|
+
"data-variant": variant,
|
|
2763
|
+
className: (0, import_cn25.cn)(emptyMediaVariants({ variant, className }))
|
|
2764
|
+
}, props)
|
|
2765
|
+
);
|
|
2766
|
+
}
|
|
2767
|
+
function EmptyTitle(_a) {
|
|
2768
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2770
|
+
"div",
|
|
2771
|
+
__spreadValues({
|
|
2772
|
+
"data-slot": "empty-title",
|
|
2773
|
+
className: (0, import_cn25.cn)(
|
|
2774
|
+
"font-heading text-sm font-medium tracking-tight",
|
|
2775
|
+
className
|
|
1759
2776
|
)
|
|
1760
2777
|
}, props)
|
|
1761
2778
|
);
|
|
1762
2779
|
}
|
|
1763
2780
|
function EmptyDescription(_a) {
|
|
1764
2781
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1765
|
-
return /* @__PURE__ */ (0,
|
|
2782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1766
2783
|
"div",
|
|
1767
2784
|
__spreadValues({
|
|
1768
2785
|
"data-slot": "empty-description",
|
|
1769
|
-
className: (0,
|
|
2786
|
+
className: (0, import_cn25.cn)(
|
|
1770
2787
|
"text-xs/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
1771
2788
|
className
|
|
1772
2789
|
)
|
|
@@ -1775,11 +2792,11 @@ function EmptyDescription(_a) {
|
|
|
1775
2792
|
}
|
|
1776
2793
|
function EmptyContent(_a) {
|
|
1777
2794
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1778
|
-
return /* @__PURE__ */ (0,
|
|
2795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1779
2796
|
"div",
|
|
1780
2797
|
__spreadValues({
|
|
1781
2798
|
"data-slot": "empty-content",
|
|
1782
|
-
className: (0,
|
|
2799
|
+
className: (0, import_cn25.cn)(
|
|
1783
2800
|
"flex w-full max-w-sm min-w-0 flex-col items-center gap-2 text-xs/relaxed text-balance",
|
|
1784
2801
|
className
|
|
1785
2802
|
)
|
|
@@ -1788,18 +2805,18 @@ function EmptyContent(_a) {
|
|
|
1788
2805
|
}
|
|
1789
2806
|
|
|
1790
2807
|
// src/lib/utils.ts
|
|
1791
|
-
var
|
|
2808
|
+
var import_cn26 = require("cn");
|
|
1792
2809
|
|
|
1793
2810
|
// src/components/composed/state-empty.tsx
|
|
1794
|
-
var
|
|
2811
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1795
2812
|
function renderStateIcon(icon) {
|
|
1796
2813
|
if (typeof icon === "function" || typeof icon === "object" && icon !== null && "render" in icon) {
|
|
1797
2814
|
const IconComp = icon;
|
|
1798
|
-
return /* @__PURE__ */ (0,
|
|
2815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconComp, {});
|
|
1799
2816
|
}
|
|
1800
2817
|
return icon;
|
|
1801
2818
|
}
|
|
1802
|
-
var StateEmpty = (0,
|
|
2819
|
+
var StateEmpty = (0, import_react17.memo)(function StateEmpty2({
|
|
1803
2820
|
icon,
|
|
1804
2821
|
title,
|
|
1805
2822
|
description,
|
|
@@ -1812,17 +2829,17 @@ var StateEmpty = (0, import_react8.memo)(function StateEmpty2({
|
|
|
1812
2829
|
const actionHandler = isFunctionAction ? render : onClick;
|
|
1813
2830
|
const buttonRender = isFunctionAction ? void 0 : render;
|
|
1814
2831
|
const hasAction = Boolean(buttonText || render || onClick);
|
|
1815
|
-
return /* @__PURE__ */ (0,
|
|
2832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1816
2833
|
Empty,
|
|
1817
2834
|
{
|
|
1818
|
-
className: (0,
|
|
2835
|
+
className: (0, import_cn26.cn)("w-full", state === "outline" && "border border-dashed"),
|
|
1819
2836
|
children: [
|
|
1820
|
-
/* @__PURE__ */ (0,
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
1822
|
-
/* @__PURE__ */ (0,
|
|
1823
|
-
/* @__PURE__ */ (0,
|
|
2837
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(EmptyHeader, { children: [
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EmptyMedia, { variant: "icon", children: renderStateIcon(icon) }),
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EmptyTitle, { children: title }),
|
|
2840
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EmptyDescription, { children: description })
|
|
1824
2841
|
] }),
|
|
1825
|
-
hasAction && /* @__PURE__ */ (0,
|
|
2842
|
+
hasAction && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EmptyContent, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1826
2843
|
Button,
|
|
1827
2844
|
{
|
|
1828
2845
|
variant: "outline",
|
|
@@ -1839,20 +2856,20 @@ var StateEmpty = (0, import_react8.memo)(function StateEmpty2({
|
|
|
1839
2856
|
});
|
|
1840
2857
|
|
|
1841
2858
|
// src/components/ui/table.tsx
|
|
1842
|
-
var
|
|
1843
|
-
var
|
|
2859
|
+
var import_cn27 = require("cn");
|
|
2860
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1844
2861
|
function Table(_a) {
|
|
1845
2862
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1846
|
-
return /* @__PURE__ */ (0,
|
|
2863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1847
2864
|
"div",
|
|
1848
2865
|
{
|
|
1849
2866
|
"data-slot": "table-container",
|
|
1850
2867
|
className: "relative w-full overflow-x-auto",
|
|
1851
|
-
children: /* @__PURE__ */ (0,
|
|
2868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1852
2869
|
"table",
|
|
1853
2870
|
__spreadValues({
|
|
1854
2871
|
"data-slot": "table",
|
|
1855
|
-
className: (0,
|
|
2872
|
+
className: (0, import_cn27.cn)("w-full caption-bottom text-xs", className)
|
|
1856
2873
|
}, props)
|
|
1857
2874
|
)
|
|
1858
2875
|
}
|
|
@@ -1860,31 +2877,31 @@ function Table(_a) {
|
|
|
1860
2877
|
}
|
|
1861
2878
|
function TableHeader(_a) {
|
|
1862
2879
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1863
|
-
return /* @__PURE__ */ (0,
|
|
2880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1864
2881
|
"thead",
|
|
1865
2882
|
__spreadValues({
|
|
1866
2883
|
"data-slot": "table-header",
|
|
1867
|
-
className: (0,
|
|
2884
|
+
className: (0, import_cn27.cn)("[&_tr]:border-b", className)
|
|
1868
2885
|
}, props)
|
|
1869
2886
|
);
|
|
1870
2887
|
}
|
|
1871
2888
|
function TableBody(_a) {
|
|
1872
2889
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1873
|
-
return /* @__PURE__ */ (0,
|
|
2890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1874
2891
|
"tbody",
|
|
1875
2892
|
__spreadValues({
|
|
1876
2893
|
"data-slot": "table-body",
|
|
1877
|
-
className: (0,
|
|
2894
|
+
className: (0, import_cn27.cn)("[&_tr:last-child]:border-0", className)
|
|
1878
2895
|
}, props)
|
|
1879
2896
|
);
|
|
1880
2897
|
}
|
|
1881
2898
|
function TableRow(_a) {
|
|
1882
2899
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1883
|
-
return /* @__PURE__ */ (0,
|
|
2900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1884
2901
|
"tr",
|
|
1885
2902
|
__spreadValues({
|
|
1886
2903
|
"data-slot": "table-row",
|
|
1887
|
-
className: (0,
|
|
2904
|
+
className: (0, import_cn27.cn)(
|
|
1888
2905
|
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1889
2906
|
className
|
|
1890
2907
|
)
|
|
@@ -1893,11 +2910,11 @@ function TableRow(_a) {
|
|
|
1893
2910
|
}
|
|
1894
2911
|
function TableHead(_a) {
|
|
1895
2912
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1896
|
-
return /* @__PURE__ */ (0,
|
|
2913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1897
2914
|
"th",
|
|
1898
2915
|
__spreadValues({
|
|
1899
2916
|
"data-slot": "table-head",
|
|
1900
|
-
className: (0,
|
|
2917
|
+
className: (0, import_cn27.cn)(
|
|
1901
2918
|
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
1902
2919
|
className
|
|
1903
2920
|
)
|
|
@@ -1906,11 +2923,11 @@ function TableHead(_a) {
|
|
|
1906
2923
|
}
|
|
1907
2924
|
function TableCell(_a) {
|
|
1908
2925
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1909
|
-
return /* @__PURE__ */ (0,
|
|
2926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1910
2927
|
"td",
|
|
1911
2928
|
__spreadValues({
|
|
1912
2929
|
"data-slot": "table-cell",
|
|
1913
|
-
className: (0,
|
|
2930
|
+
className: (0, import_cn27.cn)(
|
|
1914
2931
|
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
1915
2932
|
className
|
|
1916
2933
|
)
|
|
@@ -1946,20 +2963,20 @@ var features = (0, import_react_table.tableFeatures)({
|
|
|
1946
2963
|
|
|
1947
2964
|
// src/components/composed/data-table/table-content-body.tsx
|
|
1948
2965
|
var import_react_table2 = require("@tanstack/react-table");
|
|
1949
|
-
var
|
|
1950
|
-
var
|
|
2966
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2967
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1951
2968
|
function DataTableContentBody({
|
|
1952
2969
|
table,
|
|
1953
2970
|
columns
|
|
1954
2971
|
}) {
|
|
1955
2972
|
const rows = table.getRowModel().rows;
|
|
1956
2973
|
if (rows == null ? void 0 : rows.length) {
|
|
1957
|
-
return /* @__PURE__ */ (0,
|
|
2974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableBody, { children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { children: (0, import_react_table2.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) });
|
|
1958
2975
|
}
|
|
1959
|
-
return /* @__PURE__ */ (0,
|
|
2976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableBody, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { colSpan: columns.length, className: "h-48 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1960
2977
|
StateEmpty,
|
|
1961
2978
|
{
|
|
1962
|
-
icon: /* @__PURE__ */ (0,
|
|
2979
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react11.SearchXIcon, {}),
|
|
1963
2980
|
title: "No matching results",
|
|
1964
2981
|
description: "No records matched your search query or filter criteria.",
|
|
1965
2982
|
buttonText: "Clear search & filters",
|
|
@@ -1973,18 +2990,18 @@ function DataTableContentBody({
|
|
|
1973
2990
|
|
|
1974
2991
|
// src/components/composed/data-table/table-content-header.tsx
|
|
1975
2992
|
var import_react_table3 = require("@tanstack/react-table");
|
|
1976
|
-
var
|
|
2993
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1977
2994
|
function DataTableContentHeader({
|
|
1978
2995
|
table
|
|
1979
2996
|
}) {
|
|
1980
|
-
return /* @__PURE__ */ (0,
|
|
2997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table3.flexRender)(
|
|
1981
2998
|
header.column.columnDef.header,
|
|
1982
2999
|
header.getContext()
|
|
1983
3000
|
) }, header.id)) }, headerGroup.id)) });
|
|
1984
3001
|
}
|
|
1985
3002
|
|
|
1986
3003
|
// src/components/composed/data-table/table-footer-entries.tsx
|
|
1987
|
-
var
|
|
3004
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1988
3005
|
function DataTableFooterEntries({
|
|
1989
3006
|
table
|
|
1990
3007
|
}) {
|
|
@@ -1995,131 +3012,131 @@ function DataTableFooterEntries({
|
|
|
1995
3012
|
const totalRows = table.getFilteredRowModel().rows.length;
|
|
1996
3013
|
const startRow = totalRows === 0 ? 0 : pageIndex * pageSize + 1;
|
|
1997
3014
|
const endRow = Math.min((pageIndex + 1) * pageSize, totalRows);
|
|
1998
|
-
return /* @__PURE__ */ (0,
|
|
3015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-1 text-xs text-muted-foreground", children: [
|
|
1999
3016
|
"Showing",
|
|
2000
3017
|
" ",
|
|
2001
|
-
/* @__PURE__ */ (0,
|
|
3018
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "font-medium text-foreground", children: [
|
|
2002
3019
|
startRow,
|
|
2003
3020
|
"-",
|
|
2004
3021
|
endRow
|
|
2005
3022
|
] }),
|
|
2006
3023
|
" ",
|
|
2007
3024
|
"of ",
|
|
2008
|
-
/* @__PURE__ */ (0,
|
|
3025
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "font-medium text-foreground", children: totalRows }),
|
|
2009
3026
|
" ",
|
|
2010
3027
|
"entries."
|
|
2011
3028
|
] });
|
|
2012
3029
|
}
|
|
2013
3030
|
|
|
2014
3031
|
// src/components/composed/data-table/table-footer-pagination.tsx
|
|
2015
|
-
var
|
|
2016
|
-
var
|
|
3032
|
+
var import_lucide_react12 = require("lucide-react");
|
|
3033
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2017
3034
|
function DataTableFooterPagination({
|
|
2018
3035
|
table
|
|
2019
3036
|
}) {
|
|
2020
|
-
return /* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
3037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
3038
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { children: [
|
|
3039
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2023
3040
|
TooltipTrigger,
|
|
2024
3041
|
{
|
|
2025
|
-
render: /* @__PURE__ */ (0,
|
|
3042
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2026
3043
|
Button,
|
|
2027
3044
|
{
|
|
2028
3045
|
variant: "outline",
|
|
2029
3046
|
size: "icon-xs",
|
|
2030
3047
|
onClick: () => table.firstPage(),
|
|
2031
3048
|
disabled: !table.getCanPreviousPage(),
|
|
2032
|
-
children: /* @__PURE__ */ (0,
|
|
3049
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react12.ChevronsLeftIcon, {})
|
|
2033
3050
|
}
|
|
2034
3051
|
)
|
|
2035
3052
|
}
|
|
2036
3053
|
),
|
|
2037
|
-
/* @__PURE__ */ (0,
|
|
3054
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { children: "Go to first page" })
|
|
2038
3055
|
] }),
|
|
2039
|
-
/* @__PURE__ */ (0,
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
3056
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { children: [
|
|
3057
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2041
3058
|
TooltipTrigger,
|
|
2042
3059
|
{
|
|
2043
|
-
render: /* @__PURE__ */ (0,
|
|
3060
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2044
3061
|
Button,
|
|
2045
3062
|
{
|
|
2046
3063
|
variant: "outline",
|
|
2047
3064
|
size: "icon-xs",
|
|
2048
3065
|
onClick: () => table.previousPage(),
|
|
2049
3066
|
disabled: !table.getCanPreviousPage(),
|
|
2050
|
-
children: /* @__PURE__ */ (0,
|
|
3067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react12.ChevronLeftIcon, {})
|
|
2051
3068
|
}
|
|
2052
3069
|
)
|
|
2053
3070
|
}
|
|
2054
3071
|
),
|
|
2055
|
-
/* @__PURE__ */ (0,
|
|
3072
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { children: "Go to previous page" })
|
|
2056
3073
|
] }),
|
|
2057
|
-
/* @__PURE__ */ (0,
|
|
2058
|
-
/* @__PURE__ */ (0,
|
|
3074
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { children: [
|
|
3075
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2059
3076
|
TooltipTrigger,
|
|
2060
3077
|
{
|
|
2061
|
-
render: /* @__PURE__ */ (0,
|
|
3078
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2062
3079
|
Button,
|
|
2063
3080
|
{
|
|
2064
3081
|
variant: "outline",
|
|
2065
3082
|
size: "icon-xs",
|
|
2066
3083
|
onClick: () => table.nextPage(),
|
|
2067
3084
|
disabled: !table.getCanNextPage(),
|
|
2068
|
-
children: /* @__PURE__ */ (0,
|
|
3085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react12.ChevronRightIcon, {})
|
|
2069
3086
|
}
|
|
2070
3087
|
)
|
|
2071
3088
|
}
|
|
2072
3089
|
),
|
|
2073
|
-
/* @__PURE__ */ (0,
|
|
3090
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { children: "Go to next page" })
|
|
2074
3091
|
] }),
|
|
2075
|
-
/* @__PURE__ */ (0,
|
|
2076
|
-
/* @__PURE__ */ (0,
|
|
3092
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { children: [
|
|
3093
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2077
3094
|
TooltipTrigger,
|
|
2078
3095
|
{
|
|
2079
|
-
render: /* @__PURE__ */ (0,
|
|
3096
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2080
3097
|
Button,
|
|
2081
3098
|
{
|
|
2082
3099
|
variant: "outline",
|
|
2083
3100
|
size: "icon-xs",
|
|
2084
3101
|
onClick: () => table.lastPage(),
|
|
2085
3102
|
disabled: !table.getCanNextPage(),
|
|
2086
|
-
children: /* @__PURE__ */ (0,
|
|
3103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react12.ChevronsRightIcon, {})
|
|
2087
3104
|
}
|
|
2088
3105
|
)
|
|
2089
3106
|
}
|
|
2090
3107
|
),
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
3108
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { children: "Go to last page" })
|
|
2092
3109
|
] })
|
|
2093
3110
|
] });
|
|
2094
3111
|
}
|
|
2095
3112
|
|
|
2096
3113
|
// src/components/composed/data-table/table-header-add.tsx
|
|
2097
|
-
var
|
|
2098
|
-
var
|
|
3114
|
+
var import_lucide_react13 = require("lucide-react");
|
|
3115
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2099
3116
|
function DataTableHeaderAdd({
|
|
2100
3117
|
onAdd,
|
|
2101
3118
|
addLabel
|
|
2102
3119
|
}) {
|
|
2103
|
-
return /* @__PURE__ */ (0,
|
|
2104
|
-
/* @__PURE__ */ (0,
|
|
2105
|
-
/* @__PURE__ */ (0,
|
|
3120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3121
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Tooltip, { children: [
|
|
3122
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2106
3123
|
TooltipTrigger,
|
|
2107
3124
|
{
|
|
2108
3125
|
className: "flex sm:hidden",
|
|
2109
|
-
render: /* @__PURE__ */ (0,
|
|
3126
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { variant: "default", size: "icon", onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react13.PlusIcon, {}) })
|
|
2110
3127
|
}
|
|
2111
3128
|
),
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
3129
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipContent, { children: addLabel != null ? addLabel : "Add" })
|
|
2113
3130
|
] }),
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2115
|
-
/* @__PURE__ */ (0,
|
|
3131
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Button, { variant: "default", onClick: onAdd, className: "hidden sm:flex", children: [
|
|
3132
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react13.PlusIcon, {}),
|
|
2116
3133
|
addLabel != null ? addLabel : "Add"
|
|
2117
3134
|
] })
|
|
2118
3135
|
] });
|
|
2119
3136
|
}
|
|
2120
3137
|
|
|
2121
3138
|
// src/components/composed/data-table/table-header-download.tsx
|
|
2122
|
-
var
|
|
3139
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2123
3140
|
|
|
2124
3141
|
// src/components/composed/data-table/export.ts
|
|
2125
3142
|
var XLSX = __toESM(require("xlsx"));
|
|
@@ -2259,7 +3276,7 @@ function printTable(headers, rows, title = "Data Export") {
|
|
|
2259
3276
|
}
|
|
2260
3277
|
|
|
2261
3278
|
// src/components/composed/data-table/table-header-download.tsx
|
|
2262
|
-
var
|
|
3279
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2263
3280
|
function getTableExportData(table) {
|
|
2264
3281
|
const columns = table.getAllColumns().filter(
|
|
2265
3282
|
(col) => typeof col.accessorFn !== "undefined" && col.getIsVisible()
|
|
@@ -2302,25 +3319,25 @@ function DataTableHeaderDownload({
|
|
|
2302
3319
|
exportFilename,
|
|
2303
3320
|
onDownload
|
|
2304
3321
|
}) {
|
|
2305
|
-
return /* @__PURE__ */ (0,
|
|
2306
|
-
/* @__PURE__ */ (0,
|
|
2307
|
-
/* @__PURE__ */ (0,
|
|
3322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(DropdownMenu, { children: [
|
|
3323
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Tooltip, { children: [
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2308
3325
|
DropdownMenuTrigger,
|
|
2309
3326
|
{
|
|
2310
|
-
render: /* @__PURE__ */ (0,
|
|
3327
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2311
3328
|
TooltipTrigger,
|
|
2312
3329
|
{
|
|
2313
|
-
render: /* @__PURE__ */ (0,
|
|
3330
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react14.DownloadIcon, {}) })
|
|
2314
3331
|
}
|
|
2315
3332
|
)
|
|
2316
3333
|
}
|
|
2317
3334
|
),
|
|
2318
|
-
/* @__PURE__ */ (0,
|
|
3335
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TooltipContent, { children: "Download options" })
|
|
2319
3336
|
] }),
|
|
2320
|
-
/* @__PURE__ */ (0,
|
|
2321
|
-
/* @__PURE__ */ (0,
|
|
2322
|
-
/* @__PURE__ */ (0,
|
|
2323
|
-
/* @__PURE__ */ (0,
|
|
3337
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(DropdownMenuGroup, { children: [
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuLabel, { children: "Download data" }),
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuSeparator, {}),
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2324
3341
|
DropdownMenuItem,
|
|
2325
3342
|
{
|
|
2326
3343
|
className: "hover:cursor-pointer",
|
|
@@ -2330,12 +3347,12 @@ function DataTableHeaderDownload({
|
|
|
2330
3347
|
onDownload == null ? void 0 : onDownload();
|
|
2331
3348
|
},
|
|
2332
3349
|
children: [
|
|
2333
|
-
/* @__PURE__ */ (0,
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react14.FileTextIcon, {}),
|
|
2334
3351
|
"Download PDF"
|
|
2335
3352
|
]
|
|
2336
3353
|
}
|
|
2337
3354
|
),
|
|
2338
|
-
/* @__PURE__ */ (0,
|
|
3355
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2339
3356
|
DropdownMenuItem,
|
|
2340
3357
|
{
|
|
2341
3358
|
className: "hover:cursor-pointer",
|
|
@@ -2345,12 +3362,12 @@ function DataTableHeaderDownload({
|
|
|
2345
3362
|
onDownload == null ? void 0 : onDownload();
|
|
2346
3363
|
},
|
|
2347
3364
|
children: [
|
|
2348
|
-
/* @__PURE__ */ (0,
|
|
3365
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react14.FileSpreadsheetIcon, {}),
|
|
2349
3366
|
"Download Excel"
|
|
2350
3367
|
]
|
|
2351
3368
|
}
|
|
2352
3369
|
),
|
|
2353
|
-
/* @__PURE__ */ (0,
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2354
3371
|
DropdownMenuItem,
|
|
2355
3372
|
{
|
|
2356
3373
|
className: "hover:cursor-pointer",
|
|
@@ -2360,13 +3377,13 @@ function DataTableHeaderDownload({
|
|
|
2360
3377
|
onDownload == null ? void 0 : onDownload();
|
|
2361
3378
|
},
|
|
2362
3379
|
children: [
|
|
2363
|
-
/* @__PURE__ */ (0,
|
|
3380
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react14.FileCodeIcon, {}),
|
|
2364
3381
|
"Download CSV"
|
|
2365
3382
|
]
|
|
2366
3383
|
}
|
|
2367
3384
|
),
|
|
2368
|
-
/* @__PURE__ */ (0,
|
|
2369
|
-
/* @__PURE__ */ (0,
|
|
3385
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuSeparator, {}),
|
|
3386
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2370
3387
|
DropdownMenuItem,
|
|
2371
3388
|
{
|
|
2372
3389
|
className: "hover:cursor-pointer",
|
|
@@ -2375,7 +3392,7 @@ function DataTableHeaderDownload({
|
|
|
2375
3392
|
printTable(headers, rows, exportFilename);
|
|
2376
3393
|
},
|
|
2377
3394
|
children: [
|
|
2378
|
-
/* @__PURE__ */ (0,
|
|
3395
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react14.PrinterIcon, {}),
|
|
2379
3396
|
"Print Table"
|
|
2380
3397
|
]
|
|
2381
3398
|
}
|
|
@@ -2386,15 +3403,15 @@ function DataTableHeaderDownload({
|
|
|
2386
3403
|
|
|
2387
3404
|
// src/components/composed/data-table/table-header-filter.tsx
|
|
2388
3405
|
var import_date_fns = require("date-fns");
|
|
2389
|
-
var
|
|
2390
|
-
var
|
|
3406
|
+
var import_lucide_react17 = require("lucide-react");
|
|
3407
|
+
var import_react18 = require("react");
|
|
2391
3408
|
|
|
2392
3409
|
// src/components/ui/calendar.tsx
|
|
2393
|
-
var
|
|
2394
|
-
var
|
|
3410
|
+
var import_cn28 = require("cn");
|
|
3411
|
+
var import_lucide_react15 = require("lucide-react");
|
|
2395
3412
|
var React3 = __toESM(require("react"));
|
|
2396
3413
|
var import_react_day_picker = require("react-day-picker");
|
|
2397
|
-
var
|
|
3414
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2398
3415
|
function Calendar(_a) {
|
|
2399
3416
|
var _b = _a, {
|
|
2400
3417
|
className,
|
|
@@ -2416,11 +3433,11 @@ function Calendar(_a) {
|
|
|
2416
3433
|
"components"
|
|
2417
3434
|
]);
|
|
2418
3435
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
2419
|
-
return /* @__PURE__ */ (0,
|
|
3436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2420
3437
|
import_react_day_picker.DayPicker,
|
|
2421
3438
|
__spreadValues({
|
|
2422
3439
|
showOutsideDays,
|
|
2423
|
-
className: (0,
|
|
3440
|
+
className: (0, import_cn28.cn)(
|
|
2424
3441
|
"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",
|
|
2425
3442
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
2426
3443
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
@@ -2432,124 +3449,124 @@ function Calendar(_a) {
|
|
|
2432
3449
|
formatMonthDropdown: (date) => date.toLocaleString(locale == null ? void 0 : locale.code, { month: "short" })
|
|
2433
3450
|
}, formatters),
|
|
2434
3451
|
classNames: __spreadValues({
|
|
2435
|
-
root: (0,
|
|
2436
|
-
months: (0,
|
|
3452
|
+
root: (0, import_cn28.cn)("w-fit", defaultClassNames.root),
|
|
3453
|
+
months: (0, import_cn28.cn)(
|
|
2437
3454
|
"relative flex flex-col gap-4 md:flex-row",
|
|
2438
3455
|
defaultClassNames.months
|
|
2439
3456
|
),
|
|
2440
|
-
month: (0,
|
|
2441
|
-
nav: (0,
|
|
3457
|
+
month: (0, import_cn28.cn)("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
3458
|
+
nav: (0, import_cn28.cn)(
|
|
2442
3459
|
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
2443
3460
|
defaultClassNames.nav
|
|
2444
3461
|
),
|
|
2445
|
-
button_previous: (0,
|
|
3462
|
+
button_previous: (0, import_cn28.cn)(
|
|
2446
3463
|
buttonVariants({ variant: buttonVariant }),
|
|
2447
3464
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
2448
3465
|
defaultClassNames.button_previous
|
|
2449
3466
|
),
|
|
2450
|
-
button_next: (0,
|
|
3467
|
+
button_next: (0, import_cn28.cn)(
|
|
2451
3468
|
buttonVariants({ variant: buttonVariant }),
|
|
2452
3469
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
2453
3470
|
defaultClassNames.button_next
|
|
2454
3471
|
),
|
|
2455
|
-
month_caption: (0,
|
|
3472
|
+
month_caption: (0, import_cn28.cn)(
|
|
2456
3473
|
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
2457
3474
|
defaultClassNames.month_caption
|
|
2458
3475
|
),
|
|
2459
|
-
dropdowns: (0,
|
|
3476
|
+
dropdowns: (0, import_cn28.cn)(
|
|
2460
3477
|
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
2461
3478
|
defaultClassNames.dropdowns
|
|
2462
3479
|
),
|
|
2463
|
-
dropdown_root: (0,
|
|
3480
|
+
dropdown_root: (0, import_cn28.cn)(
|
|
2464
3481
|
"relative rounded-(--cell-radius)",
|
|
2465
3482
|
defaultClassNames.dropdown_root
|
|
2466
3483
|
),
|
|
2467
|
-
dropdown: (0,
|
|
3484
|
+
dropdown: (0, import_cn28.cn)(
|
|
2468
3485
|
"absolute inset-0 bg-popover opacity-0",
|
|
2469
3486
|
defaultClassNames.dropdown
|
|
2470
3487
|
),
|
|
2471
|
-
caption_label: (0,
|
|
3488
|
+
caption_label: (0, import_cn28.cn)(
|
|
2472
3489
|
"font-medium select-none",
|
|
2473
3490
|
captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
2474
3491
|
defaultClassNames.caption_label
|
|
2475
3492
|
),
|
|
2476
|
-
month_grid: (0,
|
|
2477
|
-
weekdays: (0,
|
|
2478
|
-
weekday: (0,
|
|
3493
|
+
month_grid: (0, import_cn28.cn)("w-full border-collapse", defaultClassNames.month_grid),
|
|
3494
|
+
weekdays: (0, import_cn28.cn)("flex", defaultClassNames.weekdays),
|
|
3495
|
+
weekday: (0, import_cn28.cn)(
|
|
2479
3496
|
"flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
2480
3497
|
defaultClassNames.weekday
|
|
2481
3498
|
),
|
|
2482
|
-
week: (0,
|
|
2483
|
-
week_number_header: (0,
|
|
3499
|
+
week: (0, import_cn28.cn)("mt-2 flex w-full", defaultClassNames.week),
|
|
3500
|
+
week_number_header: (0, import_cn28.cn)(
|
|
2484
3501
|
"w-(--cell-size) select-none",
|
|
2485
3502
|
defaultClassNames.week_number_header
|
|
2486
3503
|
),
|
|
2487
|
-
week_number: (0,
|
|
3504
|
+
week_number: (0, import_cn28.cn)(
|
|
2488
3505
|
"text-[0.8rem] text-muted-foreground select-none",
|
|
2489
3506
|
defaultClassNames.week_number
|
|
2490
3507
|
),
|
|
2491
|
-
day: (0,
|
|
3508
|
+
day: (0, import_cn28.cn)(
|
|
2492
3509
|
"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)",
|
|
2493
3510
|
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
|
|
2494
3511
|
defaultClassNames.day
|
|
2495
3512
|
),
|
|
2496
|
-
range_start: (0,
|
|
3513
|
+
range_start: (0, import_cn28.cn)(
|
|
2497
3514
|
"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",
|
|
2498
3515
|
defaultClassNames.range_start
|
|
2499
3516
|
),
|
|
2500
|
-
range_middle: (0,
|
|
2501
|
-
range_end: (0,
|
|
3517
|
+
range_middle: (0, import_cn28.cn)("rounded-none", defaultClassNames.range_middle),
|
|
3518
|
+
range_end: (0, import_cn28.cn)(
|
|
2502
3519
|
"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",
|
|
2503
3520
|
defaultClassNames.range_end
|
|
2504
3521
|
),
|
|
2505
|
-
today: (0,
|
|
3522
|
+
today: (0, import_cn28.cn)(
|
|
2506
3523
|
"rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
|
|
2507
3524
|
defaultClassNames.today
|
|
2508
3525
|
),
|
|
2509
|
-
outside: (0,
|
|
3526
|
+
outside: (0, import_cn28.cn)(
|
|
2510
3527
|
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
2511
3528
|
defaultClassNames.outside
|
|
2512
3529
|
),
|
|
2513
|
-
disabled: (0,
|
|
3530
|
+
disabled: (0, import_cn28.cn)(
|
|
2514
3531
|
"text-muted-foreground opacity-50",
|
|
2515
3532
|
defaultClassNames.disabled
|
|
2516
3533
|
),
|
|
2517
|
-
hidden: (0,
|
|
3534
|
+
hidden: (0, import_cn28.cn)("invisible", defaultClassNames.hidden)
|
|
2518
3535
|
}, classNames),
|
|
2519
3536
|
components: __spreadValues({
|
|
2520
3537
|
Root: (_a2) => {
|
|
2521
3538
|
var _b2 = _a2, { className: className2, rootRef } = _b2, props2 = __objRest(_b2, ["className", "rootRef"]);
|
|
2522
|
-
return /* @__PURE__ */ (0,
|
|
3539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2523
3540
|
"div",
|
|
2524
3541
|
__spreadValues({
|
|
2525
3542
|
"data-slot": "calendar",
|
|
2526
3543
|
ref: rootRef,
|
|
2527
|
-
className: (0,
|
|
3544
|
+
className: (0, import_cn28.cn)(className2)
|
|
2528
3545
|
}, props2)
|
|
2529
3546
|
);
|
|
2530
3547
|
},
|
|
2531
3548
|
Chevron: (_c) => {
|
|
2532
3549
|
var _d = _c, { className: className2, orientation } = _d, props2 = __objRest(_d, ["className", "orientation"]);
|
|
2533
3550
|
if (orientation === "left") {
|
|
2534
|
-
return /* @__PURE__ */ (0,
|
|
3551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react15.ChevronLeftIcon, __spreadValues({ className: (0, import_cn28.cn)("size-4", className2) }, props2));
|
|
2535
3552
|
}
|
|
2536
3553
|
if (orientation === "right") {
|
|
2537
|
-
return /* @__PURE__ */ (0,
|
|
2538
|
-
|
|
3554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3555
|
+
import_lucide_react15.ChevronRightIcon,
|
|
2539
3556
|
__spreadValues({
|
|
2540
|
-
className: (0,
|
|
3557
|
+
className: (0, import_cn28.cn)("size-4", className2)
|
|
2541
3558
|
}, props2)
|
|
2542
3559
|
);
|
|
2543
3560
|
}
|
|
2544
|
-
return /* @__PURE__ */ (0,
|
|
3561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react15.ChevronDownIcon, __spreadValues({ className: (0, import_cn28.cn)("size-4", className2) }, props2));
|
|
2545
3562
|
},
|
|
2546
3563
|
DayButton: (_e) => {
|
|
2547
3564
|
var props2 = __objRest(_e, []);
|
|
2548
|
-
return /* @__PURE__ */ (0,
|
|
3565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CalendarDayButton, __spreadValues({ locale }, props2));
|
|
2549
3566
|
},
|
|
2550
3567
|
WeekNumber: (_f) => {
|
|
2551
3568
|
var _g = _f, { children } = _g, props2 = __objRest(_g, ["children"]);
|
|
2552
|
-
return /* @__PURE__ */ (0,
|
|
3569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("td", __spreadProps(__spreadValues({}, props2), { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
|
|
2553
3570
|
}
|
|
2554
3571
|
}, components)
|
|
2555
3572
|
}, props)
|
|
@@ -2573,7 +3590,7 @@ function CalendarDayButton(_a) {
|
|
|
2573
3590
|
var _a2;
|
|
2574
3591
|
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
2575
3592
|
}, [modifiers.focused]);
|
|
2576
|
-
return /* @__PURE__ */ (0,
|
|
3593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2577
3594
|
Button,
|
|
2578
3595
|
__spreadValues({
|
|
2579
3596
|
variant: "ghost",
|
|
@@ -2583,7 +3600,7 @@ function CalendarDayButton(_a) {
|
|
|
2583
3600
|
"data-range-start": modifiers.range_start,
|
|
2584
3601
|
"data-range-end": modifiers.range_end,
|
|
2585
3602
|
"data-range-middle": modifiers.range_middle,
|
|
2586
|
-
className: (0,
|
|
3603
|
+
className: (0, import_cn28.cn)(
|
|
2587
3604
|
"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",
|
|
2588
3605
|
defaultClassNames.day,
|
|
2589
3606
|
className
|
|
@@ -2594,15 +3611,15 @@ function CalendarDayButton(_a) {
|
|
|
2594
3611
|
|
|
2595
3612
|
// src/components/ui/popover.tsx
|
|
2596
3613
|
var import_popover = require("@base-ui/react/popover");
|
|
2597
|
-
var
|
|
2598
|
-
var
|
|
3614
|
+
var import_cn29 = require("cn");
|
|
3615
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2599
3616
|
function Popover(_a) {
|
|
2600
3617
|
var props = __objRest(_a, []);
|
|
2601
|
-
return /* @__PURE__ */ (0,
|
|
3618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
2602
3619
|
}
|
|
2603
3620
|
function PopoverTrigger(_a) {
|
|
2604
3621
|
var props = __objRest(_a, []);
|
|
2605
|
-
return /* @__PURE__ */ (0,
|
|
3622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
|
|
2606
3623
|
}
|
|
2607
3624
|
function PopoverContent(_a) {
|
|
2608
3625
|
var _b = _a, {
|
|
@@ -2618,7 +3635,7 @@ function PopoverContent(_a) {
|
|
|
2618
3635
|
"side",
|
|
2619
3636
|
"sideOffset"
|
|
2620
3637
|
]);
|
|
2621
|
-
return /* @__PURE__ */ (0,
|
|
3638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2622
3639
|
import_popover.Popover.Positioner,
|
|
2623
3640
|
{
|
|
2624
3641
|
align,
|
|
@@ -2626,11 +3643,11 @@ function PopoverContent(_a) {
|
|
|
2626
3643
|
side,
|
|
2627
3644
|
sideOffset,
|
|
2628
3645
|
className: "isolate z-50",
|
|
2629
|
-
children: /* @__PURE__ */ (0,
|
|
3646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2630
3647
|
import_popover.Popover.Popup,
|
|
2631
3648
|
__spreadValues({
|
|
2632
3649
|
"data-slot": "popover-content",
|
|
2633
|
-
className: (0,
|
|
3650
|
+
className: (0, import_cn29.cn)(
|
|
2634
3651
|
"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",
|
|
2635
3652
|
className
|
|
2636
3653
|
)
|
|
@@ -2642,17 +3659,17 @@ function PopoverContent(_a) {
|
|
|
2642
3659
|
|
|
2643
3660
|
// src/components/ui/select.tsx
|
|
2644
3661
|
var import_select = require("@base-ui/react/select");
|
|
2645
|
-
var
|
|
2646
|
-
var
|
|
2647
|
-
var
|
|
3662
|
+
var import_cn30 = require("cn");
|
|
3663
|
+
var import_lucide_react16 = require("lucide-react");
|
|
3664
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2648
3665
|
var Select = import_select.Select.Root;
|
|
2649
3666
|
function SelectValue(_a) {
|
|
2650
3667
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2651
|
-
return /* @__PURE__ */ (0,
|
|
3668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2652
3669
|
import_select.Select.Value,
|
|
2653
3670
|
__spreadValues({
|
|
2654
3671
|
"data-slot": "select-value",
|
|
2655
|
-
className: (0,
|
|
3672
|
+
className: (0, import_cn30.cn)("flex flex-1 text-left", className)
|
|
2656
3673
|
}, props)
|
|
2657
3674
|
);
|
|
2658
3675
|
}
|
|
@@ -2666,22 +3683,22 @@ function SelectTrigger(_a) {
|
|
|
2666
3683
|
"size",
|
|
2667
3684
|
"children"
|
|
2668
3685
|
]);
|
|
2669
|
-
return /* @__PURE__ */ (0,
|
|
3686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2670
3687
|
import_select.Select.Trigger,
|
|
2671
3688
|
__spreadProps(__spreadValues({
|
|
2672
3689
|
"data-slot": "select-trigger",
|
|
2673
3690
|
"data-size": size,
|
|
2674
|
-
className: (0,
|
|
3691
|
+
className: (0, import_cn30.cn)(
|
|
2675
3692
|
"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",
|
|
2676
3693
|
className
|
|
2677
3694
|
)
|
|
2678
3695
|
}, props), {
|
|
2679
3696
|
children: [
|
|
2680
3697
|
children,
|
|
2681
|
-
/* @__PURE__ */ (0,
|
|
3698
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2682
3699
|
import_select.Select.Icon,
|
|
2683
3700
|
{
|
|
2684
|
-
render: /* @__PURE__ */ (0,
|
|
3701
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react16.ChevronDownIcon, { className: "pointer-events-none size-3.5 text-muted-foreground" })
|
|
2685
3702
|
}
|
|
2686
3703
|
)
|
|
2687
3704
|
]
|
|
@@ -2706,7 +3723,7 @@ function SelectContent(_a) {
|
|
|
2706
3723
|
"alignOffset",
|
|
2707
3724
|
"alignItemWithTrigger"
|
|
2708
3725
|
]);
|
|
2709
|
-
return /* @__PURE__ */ (0,
|
|
3726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2710
3727
|
import_select.Select.Positioner,
|
|
2711
3728
|
{
|
|
2712
3729
|
side,
|
|
@@ -2715,20 +3732,20 @@ function SelectContent(_a) {
|
|
|
2715
3732
|
alignOffset,
|
|
2716
3733
|
alignItemWithTrigger,
|
|
2717
3734
|
className: "isolate z-50",
|
|
2718
|
-
children: /* @__PURE__ */ (0,
|
|
3735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2719
3736
|
import_select.Select.Popup,
|
|
2720
3737
|
__spreadProps(__spreadValues({
|
|
2721
3738
|
"data-slot": "select-content",
|
|
2722
3739
|
"data-align-trigger": alignItemWithTrigger,
|
|
2723
|
-
className: (0,
|
|
3740
|
+
className: (0, import_cn30.cn)(
|
|
2724
3741
|
"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",
|
|
2725
3742
|
className
|
|
2726
3743
|
)
|
|
2727
3744
|
}, props), {
|
|
2728
3745
|
children: [
|
|
2729
|
-
/* @__PURE__ */ (0,
|
|
2730
|
-
/* @__PURE__ */ (0,
|
|
2731
|
-
/* @__PURE__ */ (0,
|
|
3746
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SelectScrollUpButton, {}),
|
|
3747
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_select.Select.List, { children }),
|
|
3748
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SelectScrollDownButton, {})
|
|
2732
3749
|
]
|
|
2733
3750
|
})
|
|
2734
3751
|
)
|
|
@@ -2743,22 +3760,22 @@ function SelectItem(_a) {
|
|
|
2743
3760
|
"className",
|
|
2744
3761
|
"children"
|
|
2745
3762
|
]);
|
|
2746
|
-
return /* @__PURE__ */ (0,
|
|
3763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2747
3764
|
import_select.Select.Item,
|
|
2748
3765
|
__spreadProps(__spreadValues({
|
|
2749
3766
|
"data-slot": "select-item",
|
|
2750
|
-
className: (0,
|
|
3767
|
+
className: (0, import_cn30.cn)(
|
|
2751
3768
|
"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",
|
|
2752
3769
|
className
|
|
2753
3770
|
)
|
|
2754
3771
|
}, props), {
|
|
2755
3772
|
children: [
|
|
2756
|
-
/* @__PURE__ */ (0,
|
|
2757
|
-
/* @__PURE__ */ (0,
|
|
3773
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_select.Select.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
3774
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2758
3775
|
import_select.Select.ItemIndicator,
|
|
2759
3776
|
{
|
|
2760
|
-
render: /* @__PURE__ */ (0,
|
|
2761
|
-
children: /* @__PURE__ */ (0,
|
|
3777
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center" }),
|
|
3778
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react16.CheckIcon, { className: "pointer-events-none" })
|
|
2762
3779
|
}
|
|
2763
3780
|
)
|
|
2764
3781
|
]
|
|
@@ -2771,16 +3788,16 @@ function SelectScrollUpButton(_a) {
|
|
|
2771
3788
|
} = _b, props = __objRest(_b, [
|
|
2772
3789
|
"className"
|
|
2773
3790
|
]);
|
|
2774
|
-
return /* @__PURE__ */ (0,
|
|
3791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2775
3792
|
import_select.Select.ScrollUpArrow,
|
|
2776
3793
|
__spreadProps(__spreadValues({
|
|
2777
3794
|
"data-slot": "select-scroll-up-button",
|
|
2778
|
-
className: (0,
|
|
3795
|
+
className: (0, import_cn30.cn)(
|
|
2779
3796
|
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
2780
3797
|
className
|
|
2781
3798
|
)
|
|
2782
3799
|
}, props), {
|
|
2783
|
-
children: /* @__PURE__ */ (0,
|
|
3800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react16.ChevronUpIcon, {})
|
|
2784
3801
|
})
|
|
2785
3802
|
);
|
|
2786
3803
|
}
|
|
@@ -2790,22 +3807,22 @@ function SelectScrollDownButton(_a) {
|
|
|
2790
3807
|
} = _b, props = __objRest(_b, [
|
|
2791
3808
|
"className"
|
|
2792
3809
|
]);
|
|
2793
|
-
return /* @__PURE__ */ (0,
|
|
3810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2794
3811
|
import_select.Select.ScrollDownArrow,
|
|
2795
3812
|
__spreadProps(__spreadValues({
|
|
2796
3813
|
"data-slot": "select-scroll-down-button",
|
|
2797
|
-
className: (0,
|
|
3814
|
+
className: (0, import_cn30.cn)(
|
|
2798
3815
|
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
2799
3816
|
className
|
|
2800
3817
|
)
|
|
2801
3818
|
}, props), {
|
|
2802
|
-
children: /* @__PURE__ */ (0,
|
|
3819
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react16.ChevronDownIcon, {})
|
|
2803
3820
|
})
|
|
2804
3821
|
);
|
|
2805
3822
|
}
|
|
2806
3823
|
|
|
2807
3824
|
// src/components/composed/data-table/table-header-filter.tsx
|
|
2808
|
-
var
|
|
3825
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2809
3826
|
function smartFilterFn(row, columnId, filterValue) {
|
|
2810
3827
|
var _a, _b, _c;
|
|
2811
3828
|
if (filterValue === void 0 || filterValue === null || filterValue === "" || filterValue === "all") {
|
|
@@ -2946,13 +3963,13 @@ function ColumnFilterInput({
|
|
|
2946
3963
|
table,
|
|
2947
3964
|
headerText
|
|
2948
3965
|
}) {
|
|
2949
|
-
const [calendarOpen, setCalendarOpen] = (0,
|
|
3966
|
+
const [calendarOpen, setCalendarOpen] = (0, import_react18.useState)(false);
|
|
2950
3967
|
const filterValue = column.getFilterValue();
|
|
2951
|
-
const variant = (0,
|
|
3968
|
+
const variant = (0, import_react18.useMemo)(
|
|
2952
3969
|
() => getFilterVariant(column, table),
|
|
2953
3970
|
[column, table]
|
|
2954
3971
|
);
|
|
2955
|
-
const options = (0,
|
|
3972
|
+
const options = (0, import_react18.useMemo)(() => {
|
|
2956
3973
|
if (variant === "boolean") {
|
|
2957
3974
|
return [
|
|
2958
3975
|
{ label: "True / Yes", value: "true" },
|
|
@@ -2966,7 +3983,7 @@ function ColumnFilterInput({
|
|
|
2966
3983
|
}, [column, table, variant]);
|
|
2967
3984
|
if (variant === "boolean" || variant === "select") {
|
|
2968
3985
|
const currentValue = filterValue === void 0 || filterValue === null || filterValue === "" ? "all" : String(filterValue);
|
|
2969
|
-
return /* @__PURE__ */ (0,
|
|
3986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2970
3987
|
Select,
|
|
2971
3988
|
{
|
|
2972
3989
|
value: currentValue,
|
|
@@ -2978,13 +3995,13 @@ function ColumnFilterInput({
|
|
|
2978
3995
|
}
|
|
2979
3996
|
},
|
|
2980
3997
|
children: [
|
|
2981
|
-
/* @__PURE__ */ (0,
|
|
3998
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2982
3999
|
SelectTrigger,
|
|
2983
4000
|
{
|
|
2984
4001
|
className: "w-full",
|
|
2985
4002
|
onKeyDown: (e) => e.stopPropagation(),
|
|
2986
4003
|
onPointerDown: (e) => e.stopPropagation(),
|
|
2987
|
-
children: /* @__PURE__ */ (0,
|
|
4004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2988
4005
|
SelectValue,
|
|
2989
4006
|
{
|
|
2990
4007
|
placeholder: `Select ${headerText.toLowerCase()}...`,
|
|
@@ -2993,9 +4010,9 @@ function ColumnFilterInput({
|
|
|
2993
4010
|
)
|
|
2994
4011
|
}
|
|
2995
4012
|
),
|
|
2996
|
-
/* @__PURE__ */ (0,
|
|
2997
|
-
/* @__PURE__ */ (0,
|
|
2998
|
-
options.map((opt) => /* @__PURE__ */ (0,
|
|
4013
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(SelectContent, { align: "start", children: [
|
|
4014
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectItem, { value: "all", children: "All" }),
|
|
4015
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2999
4016
|
SelectItem,
|
|
3000
4017
|
{
|
|
3001
4018
|
value: opt.value,
|
|
@@ -3022,36 +4039,36 @@ function ColumnFilterInput({
|
|
|
3022
4039
|
}
|
|
3023
4040
|
}
|
|
3024
4041
|
const formattedDateLabel = dateObj ? (0, import_date_fns.format)(dateObj, "yyyy-MM-dd") : "";
|
|
3025
|
-
return /* @__PURE__ */ (0,
|
|
3026
|
-
/* @__PURE__ */ (0,
|
|
4042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Popover, { open: calendarOpen, onOpenChange: setCalendarOpen, children: [
|
|
4043
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3027
4044
|
PopoverTrigger,
|
|
3028
4045
|
{
|
|
3029
|
-
render: /* @__PURE__ */ (0,
|
|
4046
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3030
4047
|
Button,
|
|
3031
4048
|
{
|
|
3032
4049
|
variant: "outline",
|
|
3033
|
-
className: (0,
|
|
4050
|
+
className: (0, import_cn26.cn)(
|
|
3034
4051
|
"w-full justify-start",
|
|
3035
4052
|
!formattedDateLabel && "text-muted-foreground"
|
|
3036
4053
|
),
|
|
3037
4054
|
onKeyDown: (e) => e.stopPropagation(),
|
|
3038
4055
|
onPointerDown: (e) => e.stopPropagation(),
|
|
3039
4056
|
children: [
|
|
3040
|
-
/* @__PURE__ */ (0,
|
|
3041
|
-
/* @__PURE__ */ (0,
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react17.CalendarIcon, { className: "mr-1 size-3 shrink-0" }),
|
|
4058
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate", children: formattedDateLabel || `Pick ${headerText.toLowerCase()}...` })
|
|
3042
4059
|
]
|
|
3043
4060
|
}
|
|
3044
4061
|
)
|
|
3045
4062
|
}
|
|
3046
4063
|
),
|
|
3047
|
-
/* @__PURE__ */ (0,
|
|
4064
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3048
4065
|
PopoverContent,
|
|
3049
4066
|
{
|
|
3050
4067
|
className: "w-auto p-0",
|
|
3051
4068
|
align: "start",
|
|
3052
4069
|
onPointerDown: (e) => e.stopPropagation(),
|
|
3053
4070
|
onKeyDown: (e) => e.stopPropagation(),
|
|
3054
|
-
children: /* @__PURE__ */ (0,
|
|
4071
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3055
4072
|
Calendar,
|
|
3056
4073
|
{
|
|
3057
4074
|
mode: "single",
|
|
@@ -3070,7 +4087,7 @@ function ColumnFilterInput({
|
|
|
3070
4087
|
)
|
|
3071
4088
|
] }) });
|
|
3072
4089
|
}
|
|
3073
|
-
return /* @__PURE__ */ (0,
|
|
4090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3074
4091
|
Input,
|
|
3075
4092
|
{
|
|
3076
4093
|
id: `filter-${column.id}`,
|
|
@@ -3087,46 +4104,46 @@ function DataTableHeaderFilter({
|
|
|
3087
4104
|
table,
|
|
3088
4105
|
columnFilters
|
|
3089
4106
|
}) {
|
|
3090
|
-
const filterableColumns = (0,
|
|
4107
|
+
const filterableColumns = (0, import_react18.useMemo)(
|
|
3091
4108
|
() => table.getAllColumns().filter(
|
|
3092
4109
|
(column) => typeof column.accessorFn !== "undefined" && column.getCanFilter()
|
|
3093
4110
|
),
|
|
3094
4111
|
[table]
|
|
3095
4112
|
);
|
|
3096
4113
|
if (filterableColumns.length === 0) return null;
|
|
3097
|
-
return /* @__PURE__ */ (0,
|
|
3098
|
-
/* @__PURE__ */ (0,
|
|
3099
|
-
/* @__PURE__ */ (0,
|
|
4114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(DropdownMenu, { children: [
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3100
4117
|
DropdownMenuTrigger,
|
|
3101
4118
|
{
|
|
3102
|
-
render: /* @__PURE__ */ (0,
|
|
4119
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3103
4120
|
TooltipTrigger,
|
|
3104
4121
|
{
|
|
3105
|
-
render: /* @__PURE__ */ (0,
|
|
4122
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3106
4123
|
Button,
|
|
3107
4124
|
{
|
|
3108
4125
|
variant: columnFilters.length > 0 ? "secondary" : "outline",
|
|
3109
4126
|
size: "icon",
|
|
3110
|
-
children: /* @__PURE__ */ (0,
|
|
4127
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react17.ListFilterIcon, {})
|
|
3111
4128
|
}
|
|
3112
4129
|
)
|
|
3113
4130
|
}
|
|
3114
4131
|
)
|
|
3115
4132
|
}
|
|
3116
4133
|
),
|
|
3117
|
-
/* @__PURE__ */ (0,
|
|
4134
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: "Filter options" })
|
|
3118
4135
|
] }),
|
|
3119
|
-
/* @__PURE__ */ (0,
|
|
3120
|
-
/* @__PURE__ */ (0,
|
|
3121
|
-
/* @__PURE__ */ (0,
|
|
3122
|
-
/* @__PURE__ */ (0,
|
|
4136
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuContent, { align: "end", className: "w-80", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(DropdownMenuGroup, { children: [
|
|
4137
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuLabel, { children: "Filter by column" }),
|
|
4138
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuSeparator, {}),
|
|
4139
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "max-h-64 overflow-y-auto space-y-2.5 p-1", children: filterableColumns.map((column) => {
|
|
3123
4140
|
const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
|
|
3124
|
-
return /* @__PURE__ */ (0,
|
|
4141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3125
4142
|
"div",
|
|
3126
4143
|
{
|
|
3127
4144
|
className: "flex items-center justify-between px-1",
|
|
3128
4145
|
children: [
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3130
4147
|
"label",
|
|
3131
4148
|
{
|
|
3132
4149
|
htmlFor: `filter-${column.id}`,
|
|
@@ -3134,7 +4151,7 @@ function DataTableHeaderFilter({
|
|
|
3134
4151
|
children: headerText
|
|
3135
4152
|
}
|
|
3136
4153
|
),
|
|
3137
|
-
/* @__PURE__ */ (0,
|
|
4154
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3138
4155
|
ColumnFilterInput,
|
|
3139
4156
|
{
|
|
3140
4157
|
column,
|
|
@@ -3147,9 +4164,9 @@ function DataTableHeaderFilter({
|
|
|
3147
4164
|
column.id
|
|
3148
4165
|
);
|
|
3149
4166
|
}) }),
|
|
3150
|
-
columnFilters.length > 0 && /* @__PURE__ */ (0,
|
|
3151
|
-
/* @__PURE__ */ (0,
|
|
3152
|
-
/* @__PURE__ */ (0,
|
|
4167
|
+
columnFilters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
4168
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuSeparator, {}),
|
|
4169
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3153
4170
|
DropdownMenuItem,
|
|
3154
4171
|
{
|
|
3155
4172
|
className: "hover:cursor-pointer text-destructive focus:text-destructive",
|
|
@@ -3163,13 +4180,13 @@ function DataTableHeaderFilter({
|
|
|
3163
4180
|
}
|
|
3164
4181
|
|
|
3165
4182
|
// src/components/composed/data-table/table-header-refresh.tsx
|
|
3166
|
-
var
|
|
4183
|
+
var import_lucide_react18 = require("lucide-react");
|
|
3167
4184
|
var import_navigation2 = require("next/navigation");
|
|
3168
|
-
var
|
|
3169
|
-
var
|
|
4185
|
+
var import_react19 = require("react");
|
|
4186
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3170
4187
|
function DataTableHeaderRefresh() {
|
|
3171
4188
|
const router = (0, import_navigation2.useRouter)();
|
|
3172
|
-
const [isRefreshing, setIsRefreshing] = (0,
|
|
4189
|
+
const [isRefreshing, setIsRefreshing] = (0, import_react19.useState)(false);
|
|
3173
4190
|
const handleRefresh = () => {
|
|
3174
4191
|
setIsRefreshing(true);
|
|
3175
4192
|
router.refresh();
|
|
@@ -3177,21 +4194,21 @@ function DataTableHeaderRefresh() {
|
|
|
3177
4194
|
setIsRefreshing(false);
|
|
3178
4195
|
}, 750);
|
|
3179
4196
|
};
|
|
3180
|
-
return /* @__PURE__ */ (0,
|
|
3181
|
-
/* @__PURE__ */ (0,
|
|
4197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3182
4199
|
TooltipTrigger,
|
|
3183
4200
|
{
|
|
3184
|
-
render: /* @__PURE__ */ (0,
|
|
4201
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3185
4202
|
Button,
|
|
3186
4203
|
{
|
|
3187
4204
|
variant: "outline",
|
|
3188
4205
|
size: "icon",
|
|
3189
4206
|
onClick: handleRefresh,
|
|
3190
4207
|
disabled: isRefreshing,
|
|
3191
|
-
children: /* @__PURE__ */ (0,
|
|
3192
|
-
|
|
4208
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4209
|
+
import_lucide_react18.RotateCwIcon,
|
|
3193
4210
|
{
|
|
3194
|
-
className: (0,
|
|
4211
|
+
className: (0, import_cn26.cn)(
|
|
3195
4212
|
"transition-transform duration-750",
|
|
3196
4213
|
isRefreshing && "animate-spin"
|
|
3197
4214
|
)
|
|
@@ -3201,19 +4218,19 @@ function DataTableHeaderRefresh() {
|
|
|
3201
4218
|
)
|
|
3202
4219
|
}
|
|
3203
4220
|
),
|
|
3204
|
-
/* @__PURE__ */ (0,
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContent, { children: "Refresh data" })
|
|
3205
4222
|
] });
|
|
3206
4223
|
}
|
|
3207
4224
|
|
|
3208
4225
|
// src/components/composed/data-table/table-header-search.tsx
|
|
3209
|
-
var
|
|
3210
|
-
var
|
|
4226
|
+
var import_lucide_react19 = require("lucide-react");
|
|
4227
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3211
4228
|
function DataTableHeaderSearch({
|
|
3212
4229
|
value = "",
|
|
3213
4230
|
onChange
|
|
3214
4231
|
}) {
|
|
3215
|
-
return /* @__PURE__ */ (0,
|
|
3216
|
-
/* @__PURE__ */ (0,
|
|
4232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative flex items-center max-w-sm w-full", children: [
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3217
4234
|
Input,
|
|
3218
4235
|
{
|
|
3219
4236
|
placeholder: "Search...",
|
|
@@ -3222,56 +4239,56 @@ function DataTableHeaderSearch({
|
|
|
3222
4239
|
className: "pr-7"
|
|
3223
4240
|
}
|
|
3224
4241
|
),
|
|
3225
|
-
Boolean(value) && /* @__PURE__ */ (0,
|
|
4242
|
+
Boolean(value) && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3226
4243
|
"button",
|
|
3227
4244
|
{
|
|
3228
4245
|
type: "button",
|
|
3229
4246
|
onClick: () => onChange(""),
|
|
3230
4247
|
className: "absolute right-2 text-muted-foreground hover:text-foreground p-0.5 rounded cursor-pointer",
|
|
3231
4248
|
"aria-label": "Clear search text",
|
|
3232
|
-
children: /* @__PURE__ */ (0,
|
|
4249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react19.XIcon, { className: "size-3.5" })
|
|
3233
4250
|
}
|
|
3234
4251
|
)
|
|
3235
4252
|
] });
|
|
3236
4253
|
}
|
|
3237
4254
|
|
|
3238
4255
|
// src/components/composed/data-table/table-header-sort.tsx
|
|
3239
|
-
var
|
|
3240
|
-
var
|
|
4256
|
+
var import_lucide_react20 = require("lucide-react");
|
|
4257
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3241
4258
|
function DataTableHeaderSort({
|
|
3242
4259
|
table,
|
|
3243
4260
|
sorting
|
|
3244
4261
|
}) {
|
|
3245
4262
|
const sortableColumns = table.getAllColumns().filter((column) => column.getCanSort());
|
|
3246
|
-
return /* @__PURE__ */ (0,
|
|
3247
|
-
/* @__PURE__ */ (0,
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
4263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DropdownMenu, { children: [
|
|
4264
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Tooltip, { children: [
|
|
4265
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3249
4266
|
DropdownMenuTrigger,
|
|
3250
4267
|
{
|
|
3251
|
-
render: /* @__PURE__ */ (0,
|
|
4268
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3252
4269
|
TooltipTrigger,
|
|
3253
4270
|
{
|
|
3254
|
-
render: /* @__PURE__ */ (0,
|
|
4271
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3255
4272
|
Button,
|
|
3256
4273
|
{
|
|
3257
4274
|
variant: sorting.length > 0 ? "secondary" : "outline",
|
|
3258
4275
|
size: "icon",
|
|
3259
|
-
children: /* @__PURE__ */ (0,
|
|
4276
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react20.ArrowUpDownIcon, {})
|
|
3260
4277
|
}
|
|
3261
4278
|
)
|
|
3262
4279
|
}
|
|
3263
4280
|
)
|
|
3264
4281
|
}
|
|
3265
4282
|
),
|
|
3266
|
-
/* @__PURE__ */ (0,
|
|
4283
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipContent, { children: "Sort options" })
|
|
3267
4284
|
] }),
|
|
3268
|
-
/* @__PURE__ */ (0,
|
|
3269
|
-
/* @__PURE__ */ (0,
|
|
3270
|
-
/* @__PURE__ */ (0,
|
|
4285
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(DropdownMenuGroup, { children: [
|
|
4286
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DropdownMenuLabel, { children: "Sort by column" }),
|
|
4287
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DropdownMenuSeparator, {}),
|
|
3271
4288
|
sortableColumns.map((column) => {
|
|
3272
4289
|
const isSorted = column.getIsSorted();
|
|
3273
4290
|
const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
|
|
3274
|
-
return /* @__PURE__ */ (0,
|
|
4291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3275
4292
|
DropdownMenuItem,
|
|
3276
4293
|
{
|
|
3277
4294
|
className: "flex items-center justify-between hover:cursor-pointer capitalize",
|
|
@@ -3286,16 +4303,16 @@ function DataTableHeaderSort({
|
|
|
3286
4303
|
},
|
|
3287
4304
|
children: [
|
|
3288
4305
|
headerText,
|
|
3289
|
-
isSorted === "asc" && /* @__PURE__ */ (0,
|
|
3290
|
-
isSorted === "desc" && /* @__PURE__ */ (0,
|
|
4306
|
+
isSorted === "asc" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react20.ArrowUpIcon, { className: "size-3.5" }),
|
|
4307
|
+
isSorted === "desc" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react20.ArrowDownIcon, { className: "size-3.5" })
|
|
3291
4308
|
]
|
|
3292
4309
|
},
|
|
3293
4310
|
column.id
|
|
3294
4311
|
);
|
|
3295
4312
|
}),
|
|
3296
|
-
sorting.length > 0 && /* @__PURE__ */ (0,
|
|
3297
|
-
/* @__PURE__ */ (0,
|
|
3298
|
-
/* @__PURE__ */ (0,
|
|
4313
|
+
sorting.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
4314
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DropdownMenuSeparator, {}),
|
|
4315
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3299
4316
|
DropdownMenuItem,
|
|
3300
4317
|
{
|
|
3301
4318
|
className: "hover:cursor-pointer text-destructive focus:text-destructive",
|
|
@@ -3309,34 +4326,34 @@ function DataTableHeaderSort({
|
|
|
3309
4326
|
}
|
|
3310
4327
|
|
|
3311
4328
|
// src/components/composed/data-table/table-header-toggle.tsx
|
|
3312
|
-
var
|
|
3313
|
-
var
|
|
4329
|
+
var import_lucide_react21 = require("lucide-react");
|
|
4330
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3314
4331
|
function DataTableHeaderToggle({
|
|
3315
4332
|
table
|
|
3316
4333
|
}) {
|
|
3317
|
-
return /* @__PURE__ */ (0,
|
|
3318
|
-
/* @__PURE__ */ (0,
|
|
3319
|
-
/* @__PURE__ */ (0,
|
|
4334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenu, { children: [
|
|
4335
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Tooltip, { children: [
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3320
4337
|
DropdownMenuTrigger,
|
|
3321
4338
|
{
|
|
3322
|
-
render: /* @__PURE__ */ (0,
|
|
4339
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3323
4340
|
TooltipTrigger,
|
|
3324
4341
|
{
|
|
3325
|
-
render: /* @__PURE__ */ (0,
|
|
4342
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react21.Columns3CogIcon, {}) })
|
|
3326
4343
|
}
|
|
3327
4344
|
)
|
|
3328
4345
|
}
|
|
3329
4346
|
),
|
|
3330
|
-
/* @__PURE__ */ (0,
|
|
4347
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipContent, { children: "Toggle columns" })
|
|
3331
4348
|
] }),
|
|
3332
|
-
/* @__PURE__ */ (0,
|
|
3333
|
-
/* @__PURE__ */ (0,
|
|
3334
|
-
/* @__PURE__ */ (0,
|
|
4349
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenuGroup, { children: [
|
|
4350
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuLabel, { children: "Toggle columns" }),
|
|
4351
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuSeparator, {}),
|
|
3335
4352
|
table.getAllColumns().filter(
|
|
3336
4353
|
(column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
|
|
3337
4354
|
).map((column) => {
|
|
3338
4355
|
const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
|
|
3339
|
-
return /* @__PURE__ */ (0,
|
|
4356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3340
4357
|
DropdownMenuCheckboxItem,
|
|
3341
4358
|
{
|
|
3342
4359
|
className: "capitalize hover:cursor-pointer",
|
|
@@ -3352,9 +4369,9 @@ function DataTableHeaderToggle({
|
|
|
3352
4369
|
}
|
|
3353
4370
|
|
|
3354
4371
|
// src/components/composed/data-table/data-row-actions.tsx
|
|
3355
|
-
var
|
|
3356
|
-
var
|
|
3357
|
-
var
|
|
4372
|
+
var import_lucide_react22 = require("lucide-react");
|
|
4373
|
+
var import_react20 = require("react");
|
|
4374
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3358
4375
|
function RowActions({
|
|
3359
4376
|
label = "Actions",
|
|
3360
4377
|
items = [],
|
|
@@ -3368,50 +4385,50 @@ function RowActions({
|
|
|
3368
4385
|
if (visibleItems.length === 0) {
|
|
3369
4386
|
return null;
|
|
3370
4387
|
}
|
|
3371
|
-
return /* @__PURE__ */ (0,
|
|
4388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3372
4389
|
"div",
|
|
3373
4390
|
{
|
|
3374
|
-
className: (0,
|
|
3375
|
-
children: /* @__PURE__ */ (0,
|
|
3376
|
-
/* @__PURE__ */ (0,
|
|
4391
|
+
className: (0, import_cn26.cn)("flex items-center justify-end w-full", containerClassName),
|
|
4392
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(DropdownMenu, { children: [
|
|
4393
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3377
4394
|
DropdownMenuTrigger,
|
|
3378
4395
|
{
|
|
3379
|
-
render: /* @__PURE__ */ (0,
|
|
4396
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { variant: "ghost", size: "icon-xs", "aria-label": triggerLabel, children: triggerIcon != null ? triggerIcon : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react22.MoreHorizontal, { className: "size-4" }) })
|
|
3380
4397
|
}
|
|
3381
4398
|
),
|
|
3382
|
-
/* @__PURE__ */ (0,
|
|
4399
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3383
4400
|
DropdownMenuContent,
|
|
3384
4401
|
{
|
|
3385
4402
|
align,
|
|
3386
|
-
className: (0,
|
|
3387
|
-
children: /* @__PURE__ */ (0,
|
|
3388
|
-
label && /* @__PURE__ */ (0,
|
|
3389
|
-
/* @__PURE__ */ (0,
|
|
3390
|
-
/* @__PURE__ */ (0,
|
|
4403
|
+
className: (0, import_cn26.cn)("w-40", contentClassName),
|
|
4404
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(DropdownMenuGroup, { children: [
|
|
4405
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
4406
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DropdownMenuLabel, { children: label }),
|
|
4407
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DropdownMenuSeparator, {})
|
|
3391
4408
|
] }),
|
|
3392
4409
|
visibleItems.map((item, index) => {
|
|
3393
4410
|
var _a;
|
|
3394
4411
|
const itemKey = (_a = item.id) != null ? _a : `${item.label}-${index}`;
|
|
3395
4412
|
const isDestructive = item.variant === "destructive";
|
|
3396
|
-
return /* @__PURE__ */ (0,
|
|
3397
|
-
item.separatorBefore && /* @__PURE__ */ (0,
|
|
3398
|
-
/* @__PURE__ */ (0,
|
|
4413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react20.Fragment, { children: [
|
|
4414
|
+
item.separatorBefore && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DropdownMenuSeparator, {}),
|
|
4415
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3399
4416
|
DropdownMenuItem,
|
|
3400
4417
|
{
|
|
3401
4418
|
onClick: item.onClick,
|
|
3402
4419
|
disabled: item.disabled,
|
|
3403
|
-
className: (0,
|
|
4420
|
+
className: (0, import_cn26.cn)(
|
|
3404
4421
|
"hover:cursor-pointer flex items-center gap-2",
|
|
3405
4422
|
isDestructive && "text-destructive focus:text-destructive",
|
|
3406
4423
|
item.className
|
|
3407
4424
|
),
|
|
3408
4425
|
children: [
|
|
3409
|
-
item.icon && /* @__PURE__ */ (0,
|
|
3410
|
-
/* @__PURE__ */ (0,
|
|
4426
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "size-4 shrink-0 flex items-center justify-center", children: item.icon }),
|
|
4427
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: item.label })
|
|
3411
4428
|
]
|
|
3412
4429
|
}
|
|
3413
4430
|
),
|
|
3414
|
-
item.separatorAfter && /* @__PURE__ */ (0,
|
|
4431
|
+
item.separatorAfter && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DropdownMenuSeparator, {})
|
|
3415
4432
|
] }, itemKey);
|
|
3416
4433
|
})
|
|
3417
4434
|
] })
|
|
@@ -3423,7 +4440,7 @@ function RowActions({
|
|
|
3423
4440
|
}
|
|
3424
4441
|
|
|
3425
4442
|
// src/components/composed/data-table/data-table.tsx
|
|
3426
|
-
var
|
|
4443
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3427
4444
|
function DataTable({
|
|
3428
4445
|
columns,
|
|
3429
4446
|
data,
|
|
@@ -3441,12 +4458,12 @@ function DataTable({
|
|
|
3441
4458
|
showAddButton = true
|
|
3442
4459
|
}) {
|
|
3443
4460
|
const router = (0, import_navigation3.useRouter)();
|
|
3444
|
-
const [createOpen, setCreateOpen] = (0,
|
|
3445
|
-
const [sorting, setSorting] = (0,
|
|
3446
|
-
const [columnFilters, setColumnFilters] = (0,
|
|
3447
|
-
const [columnVisibility, setColumnVisibility] = (0,
|
|
3448
|
-
const [globalFilter, setGlobalFilter] = (0,
|
|
3449
|
-
const columnsWithSmartFilters = (0,
|
|
4461
|
+
const [createOpen, setCreateOpen] = (0, import_react21.useState)(false);
|
|
4462
|
+
const [sorting, setSorting] = (0, import_react21.useState)([]);
|
|
4463
|
+
const [columnFilters, setColumnFilters] = (0, import_react21.useState)([]);
|
|
4464
|
+
const [columnVisibility, setColumnVisibility] = (0, import_react21.useState)(initialColumnVisibility != null ? initialColumnVisibility : {});
|
|
4465
|
+
const [globalFilter, setGlobalFilter] = (0, import_react21.useState)("");
|
|
4466
|
+
const columnsWithSmartFilters = (0, import_react21.useMemo)(() => {
|
|
3450
4467
|
return columns.map((col) => __spreadValues({
|
|
3451
4468
|
filterFn: smartFilterFn
|
|
3452
4469
|
}, col));
|
|
@@ -3476,12 +4493,12 @@ function DataTable({
|
|
|
3476
4493
|
});
|
|
3477
4494
|
if (data.length === 0) {
|
|
3478
4495
|
const hasCreateAction = Boolean(renderCreateDialog);
|
|
3479
|
-
return /* @__PURE__ */ (0,
|
|
3480
|
-
/* @__PURE__ */ (0,
|
|
4496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "space-y-2", children: [
|
|
4497
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3481
4498
|
StateEmpty,
|
|
3482
4499
|
{
|
|
3483
4500
|
state: "outline",
|
|
3484
|
-
icon: /* @__PURE__ */ (0,
|
|
4501
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react23.FolderOpenIcon, { className: "size-6 text-muted-foreground" }),
|
|
3485
4502
|
title: "No Data Available",
|
|
3486
4503
|
description: "There are currently no records to display. Create a new record to get started.",
|
|
3487
4504
|
buttonText: hasCreateAction ? addLabel != null ? addLabel : "Add Record" : "Refresh",
|
|
@@ -3491,26 +4508,26 @@ function DataTable({
|
|
|
3491
4508
|
renderCreateDialog == null ? void 0 : renderCreateDialog(createOpen, setCreateOpen)
|
|
3492
4509
|
] });
|
|
3493
4510
|
}
|
|
3494
|
-
return /* @__PURE__ */ (0,
|
|
3495
|
-
/* @__PURE__ */ (0,
|
|
3496
|
-
showSearchInput ? /* @__PURE__ */ (0,
|
|
4511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "space-y-2", children: [
|
|
4512
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-row items-center justify-between gap-1", children: [
|
|
4513
|
+
showSearchInput ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3497
4514
|
DataTableHeaderSearch,
|
|
3498
4515
|
{
|
|
3499
4516
|
value: globalFilter,
|
|
3500
4517
|
onChange: setGlobalFilter
|
|
3501
4518
|
}
|
|
3502
|
-
) : /* @__PURE__ */ (0,
|
|
3503
|
-
/* @__PURE__ */ (0,
|
|
3504
|
-
showRefreshButton && /* @__PURE__ */ (0,
|
|
3505
|
-
showSortButton && /* @__PURE__ */ (0,
|
|
3506
|
-
showFilterButton && /* @__PURE__ */ (0,
|
|
4519
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", {}),
|
|
4520
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
4521
|
+
showRefreshButton && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DataTableHeaderRefresh, {}),
|
|
4522
|
+
showSortButton && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DataTableHeaderSort, { table, sorting }),
|
|
4523
|
+
showFilterButton && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3507
4524
|
DataTableHeaderFilter,
|
|
3508
4525
|
{
|
|
3509
4526
|
table,
|
|
3510
4527
|
columnFilters
|
|
3511
4528
|
}
|
|
3512
4529
|
),
|
|
3513
|
-
showDownloadButton && /* @__PURE__ */ (0,
|
|
4530
|
+
showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3514
4531
|
DataTableHeaderDownload,
|
|
3515
4532
|
{
|
|
3516
4533
|
table,
|
|
@@ -3518,8 +4535,8 @@ function DataTable({
|
|
|
3518
4535
|
onDownload
|
|
3519
4536
|
}
|
|
3520
4537
|
),
|
|
3521
|
-
showColumnToggleButton && /* @__PURE__ */ (0,
|
|
3522
|
-
showAddButton && renderCreateDialog && /* @__PURE__ */ (0,
|
|
4538
|
+
showColumnToggleButton && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DataTableHeaderToggle, { table }),
|
|
4539
|
+
showAddButton && renderCreateDialog && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3523
4540
|
DataTableHeaderAdd,
|
|
3524
4541
|
{
|
|
3525
4542
|
onAdd: () => setCreateOpen(true),
|
|
@@ -3529,13 +4546,13 @@ function DataTable({
|
|
|
3529
4546
|
] })
|
|
3530
4547
|
] }),
|
|
3531
4548
|
renderCreateDialog == null ? void 0 : renderCreateDialog(createOpen, setCreateOpen),
|
|
3532
|
-
/* @__PURE__ */ (0,
|
|
3533
|
-
/* @__PURE__ */ (0,
|
|
3534
|
-
/* @__PURE__ */ (0,
|
|
4549
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "overflow-hidden rounded-md border [&_[data-slot=table-container]]:no-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Table, { children: [
|
|
4550
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DataTableContentHeader, { table }),
|
|
4551
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DataTableContentBody, { table, columns })
|
|
3535
4552
|
] }) }),
|
|
3536
|
-
/* @__PURE__ */ (0,
|
|
3537
|
-
/* @__PURE__ */ (0,
|
|
3538
|
-
/* @__PURE__ */ (0,
|
|
4553
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between px-2", children: [
|
|
4554
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DataTableFooterEntries, { table }),
|
|
4555
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DataTableFooterPagination, { table })
|
|
3539
4556
|
] })
|
|
3540
4557
|
] });
|
|
3541
4558
|
}
|
|
@@ -3543,13 +4560,13 @@ function DataTable({
|
|
|
3543
4560
|
// src/components/composed/header-tabs.tsx
|
|
3544
4561
|
var import_link2 = __toESM(require("next/link"));
|
|
3545
4562
|
var import_navigation4 = require("next/navigation");
|
|
3546
|
-
var
|
|
4563
|
+
var import_react22 = require("react");
|
|
3547
4564
|
|
|
3548
4565
|
// src/components/ui/tabs.tsx
|
|
3549
4566
|
var import_tabs = require("@base-ui/react/tabs");
|
|
3550
4567
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3551
|
-
var
|
|
3552
|
-
var
|
|
4568
|
+
var import_cn31 = require("cn");
|
|
4569
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3553
4570
|
function Tabs(_a) {
|
|
3554
4571
|
var _b = _a, {
|
|
3555
4572
|
className,
|
|
@@ -3558,12 +4575,12 @@ function Tabs(_a) {
|
|
|
3558
4575
|
"className",
|
|
3559
4576
|
"orientation"
|
|
3560
4577
|
]);
|
|
3561
|
-
return /* @__PURE__ */ (0,
|
|
4578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3562
4579
|
import_tabs.Tabs.Root,
|
|
3563
4580
|
__spreadValues({
|
|
3564
4581
|
"data-slot": "tabs",
|
|
3565
4582
|
"data-orientation": orientation,
|
|
3566
|
-
className: (0,
|
|
4583
|
+
className: (0, import_cn31.cn)(
|
|
3567
4584
|
"group/tabs flex gap-2 data-horizontal:flex-col",
|
|
3568
4585
|
className
|
|
3569
4586
|
)
|
|
@@ -3592,22 +4609,22 @@ function TabsList(_a) {
|
|
|
3592
4609
|
"className",
|
|
3593
4610
|
"variant"
|
|
3594
4611
|
]);
|
|
3595
|
-
return /* @__PURE__ */ (0,
|
|
4612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3596
4613
|
import_tabs.Tabs.List,
|
|
3597
4614
|
__spreadValues({
|
|
3598
4615
|
"data-slot": "tabs-list",
|
|
3599
4616
|
"data-variant": variant,
|
|
3600
|
-
className: (0,
|
|
4617
|
+
className: (0, import_cn31.cn)(tabsListVariants({ variant }), className)
|
|
3601
4618
|
}, props)
|
|
3602
4619
|
);
|
|
3603
4620
|
}
|
|
3604
4621
|
function TabsTrigger(_a) {
|
|
3605
4622
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3606
|
-
return /* @__PURE__ */ (0,
|
|
4623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3607
4624
|
import_tabs.Tabs.Tab,
|
|
3608
4625
|
__spreadValues({
|
|
3609
4626
|
"data-slot": "tabs-trigger",
|
|
3610
|
-
className: (0,
|
|
4627
|
+
className: (0, import_cn31.cn)(
|
|
3611
4628
|
"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",
|
|
3612
4629
|
"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",
|
|
3613
4630
|
"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
|
|
@@ -3619,16 +4636,16 @@ function TabsTrigger(_a) {
|
|
|
3619
4636
|
}
|
|
3620
4637
|
|
|
3621
4638
|
// src/components/composed/header-tabs.tsx
|
|
3622
|
-
var
|
|
4639
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3623
4640
|
function renderTabIcon(icon) {
|
|
3624
4641
|
if (!icon) return null;
|
|
3625
4642
|
if (typeof icon === "function" || typeof icon === "object" && icon !== null && "render" in icon) {
|
|
3626
4643
|
const IconComp = icon;
|
|
3627
|
-
return /* @__PURE__ */ (0,
|
|
4644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(IconComp, {});
|
|
3628
4645
|
}
|
|
3629
4646
|
return icon;
|
|
3630
4647
|
}
|
|
3631
|
-
var HeaderTabs = (0,
|
|
4648
|
+
var HeaderTabs = (0, import_react22.memo)(function HeaderTabs2({
|
|
3632
4649
|
items,
|
|
3633
4650
|
value,
|
|
3634
4651
|
onValueChange,
|
|
@@ -3640,12 +4657,12 @@ var HeaderTabs = (0, import_react13.memo)(function HeaderTabs2({
|
|
|
3640
4657
|
(item) => item.url === pathname || pathname.endsWith(item.url) || pathname.split("/").includes(item.value)
|
|
3641
4658
|
) : void 0;
|
|
3642
4659
|
const activeTab = (_b = value != null ? value : matchedItem == null ? void 0 : matchedItem.value) != null ? _b : (_a = items[0]) == null ? void 0 : _a.value;
|
|
3643
|
-
return /* @__PURE__ */ (0,
|
|
3644
|
-
/* @__PURE__ */ (0,
|
|
4660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Tabs, { value: activeTab, onValueChange, className: "space-y-4", children: [
|
|
4661
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-full overflow-x-auto overflow-y-hidden border-b no-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TabsList, { variant: "line", className: "inline-flex w-max justify-start", children: items.map(({ title, value: tabValue, url, icon }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3645
4662
|
TabsTrigger,
|
|
3646
4663
|
{
|
|
3647
4664
|
nativeButton: false,
|
|
3648
|
-
render: /* @__PURE__ */ (0,
|
|
4665
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_link2.default, { href: url }),
|
|
3649
4666
|
value: tabValue,
|
|
3650
4667
|
children: [
|
|
3651
4668
|
renderTabIcon(icon),
|
|
@@ -3659,27 +4676,27 @@ var HeaderTabs = (0, import_react13.memo)(function HeaderTabs2({
|
|
|
3659
4676
|
});
|
|
3660
4677
|
|
|
3661
4678
|
// src/components/composed/header-title.tsx
|
|
3662
|
-
var
|
|
3663
|
-
var
|
|
3664
|
-
var HeaderTitle = (0,
|
|
4679
|
+
var import_react23 = require("react");
|
|
4680
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4681
|
+
var HeaderTitle = (0, import_react23.memo)(function HeaderTitle2({
|
|
3665
4682
|
title,
|
|
3666
4683
|
subtitle,
|
|
3667
4684
|
children
|
|
3668
4685
|
}) {
|
|
3669
|
-
return /* @__PURE__ */ (0,
|
|
3670
|
-
/* @__PURE__ */ (0,
|
|
3671
|
-
/* @__PURE__ */ (0,
|
|
3672
|
-
/* @__PURE__ */ (0,
|
|
4686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "w-full space-y-4", children: [
|
|
4687
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
|
|
4688
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h1", { className: "font-semibold", children: title }),
|
|
4689
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-xs text-muted-foreground", children: subtitle })
|
|
3673
4690
|
] }),
|
|
3674
4691
|
children
|
|
3675
4692
|
] });
|
|
3676
4693
|
});
|
|
3677
4694
|
|
|
3678
4695
|
// src/components/composed/icons/google.tsx
|
|
3679
|
-
var
|
|
4696
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3680
4697
|
function GoogleIcon(_a) {
|
|
3681
4698
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3682
|
-
return /* @__PURE__ */ (0,
|
|
4699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
3683
4700
|
"svg",
|
|
3684
4701
|
__spreadProps(__spreadValues({
|
|
3685
4702
|
role: "img",
|
|
@@ -3689,28 +4706,28 @@ function GoogleIcon(_a) {
|
|
|
3689
4706
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3690
4707
|
}, props), {
|
|
3691
4708
|
children: [
|
|
3692
|
-
/* @__PURE__ */ (0,
|
|
4709
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3693
4710
|
"path",
|
|
3694
4711
|
{
|
|
3695
4712
|
fill: "#4285F4",
|
|
3696
4713
|
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"
|
|
3697
4714
|
}
|
|
3698
4715
|
),
|
|
3699
|
-
/* @__PURE__ */ (0,
|
|
4716
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3700
4717
|
"path",
|
|
3701
4718
|
{
|
|
3702
4719
|
fill: "#34A853",
|
|
3703
4720
|
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"
|
|
3704
4721
|
}
|
|
3705
4722
|
),
|
|
3706
|
-
/* @__PURE__ */ (0,
|
|
4723
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3707
4724
|
"path",
|
|
3708
4725
|
{
|
|
3709
4726
|
fill: "#FBBC05",
|
|
3710
4727
|
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"
|
|
3711
4728
|
}
|
|
3712
4729
|
),
|
|
3713
|
-
/* @__PURE__ */ (0,
|
|
4730
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3714
4731
|
"path",
|
|
3715
4732
|
{
|
|
3716
4733
|
fill: "#EA4335",
|
|
@@ -3721,470 +4738,18 @@ function GoogleIcon(_a) {
|
|
|
3721
4738
|
})
|
|
3722
4739
|
);
|
|
3723
4740
|
}
|
|
3724
|
-
|
|
3725
|
-
// src/components/composed/login-server.tsx
|
|
3726
|
-
var import_zod = require("@hookform/resolvers/zod");
|
|
3727
|
-
var import_cn24 = require("cn");
|
|
3728
|
-
var import_lucide_react23 = require("lucide-react");
|
|
3729
|
-
var import_link3 = __toESM(require("next/link"));
|
|
3730
|
-
var import_react16 = require("react");
|
|
3731
|
-
var import_react_hook_form = require("react-hook-form");
|
|
3732
|
-
var import_zod2 = require("zod");
|
|
3733
|
-
|
|
3734
|
-
// src/components/ui/card.tsx
|
|
3735
|
-
var import_cn20 = require("cn");
|
|
3736
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3737
|
-
function Card(_a) {
|
|
3738
|
-
var _b = _a, {
|
|
3739
|
-
className,
|
|
3740
|
-
size = "default"
|
|
3741
|
-
} = _b, props = __objRest(_b, [
|
|
3742
|
-
"className",
|
|
3743
|
-
"size"
|
|
3744
|
-
]);
|
|
3745
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3746
|
-
"div",
|
|
3747
|
-
__spreadValues({
|
|
3748
|
-
"data-slot": "card",
|
|
3749
|
-
"data-size": size,
|
|
3750
|
-
className: (0, import_cn20.cn)(
|
|
3751
|
-
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",
|
|
3752
|
-
className
|
|
3753
|
-
)
|
|
3754
|
-
}, props)
|
|
3755
|
-
);
|
|
3756
|
-
}
|
|
3757
|
-
function CardHeader(_a) {
|
|
3758
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3759
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3760
|
-
"div",
|
|
3761
|
-
__spreadValues({
|
|
3762
|
-
"data-slot": "card-header",
|
|
3763
|
-
className: (0, import_cn20.cn)(
|
|
3764
|
-
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
|
|
3765
|
-
className
|
|
3766
|
-
)
|
|
3767
|
-
}, props)
|
|
3768
|
-
);
|
|
3769
|
-
}
|
|
3770
|
-
function CardTitle(_a) {
|
|
3771
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3772
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3773
|
-
"div",
|
|
3774
|
-
__spreadValues({
|
|
3775
|
-
"data-slot": "card-title",
|
|
3776
|
-
className: (0, import_cn20.cn)("font-heading text-sm font-medium", className)
|
|
3777
|
-
}, props)
|
|
3778
|
-
);
|
|
3779
|
-
}
|
|
3780
|
-
function CardDescription(_a) {
|
|
3781
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3782
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3783
|
-
"div",
|
|
3784
|
-
__spreadValues({
|
|
3785
|
-
"data-slot": "card-description",
|
|
3786
|
-
className: (0, import_cn20.cn)("text-xs/relaxed text-muted-foreground", className)
|
|
3787
|
-
}, props)
|
|
3788
|
-
);
|
|
3789
|
-
}
|
|
3790
|
-
function CardContent(_a) {
|
|
3791
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3792
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3793
|
-
"div",
|
|
3794
|
-
__spreadValues({
|
|
3795
|
-
"data-slot": "card-content",
|
|
3796
|
-
className: (0, import_cn20.cn)("px-(--card-spacing)", className)
|
|
3797
|
-
}, props)
|
|
3798
|
-
);
|
|
3799
|
-
}
|
|
3800
|
-
|
|
3801
|
-
// src/components/ui/field.tsx
|
|
3802
|
-
var import_class_variance_authority6 = require("class-variance-authority");
|
|
3803
|
-
var import_cn22 = require("cn");
|
|
3804
|
-
var import_react15 = require("react");
|
|
3805
|
-
|
|
3806
|
-
// src/components/ui/label.tsx
|
|
3807
|
-
var import_cn21 = require("cn");
|
|
3808
|
-
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3809
|
-
function Label(_a) {
|
|
3810
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3811
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3812
|
-
"label",
|
|
3813
|
-
__spreadValues({
|
|
3814
|
-
"data-slot": "label",
|
|
3815
|
-
className: (0, import_cn21.cn)(
|
|
3816
|
-
"flex items-center gap-2 text-xs/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
3817
|
-
className
|
|
3818
|
-
)
|
|
3819
|
-
}, props)
|
|
3820
|
-
);
|
|
3821
|
-
}
|
|
3822
|
-
|
|
3823
|
-
// src/components/ui/field.tsx
|
|
3824
|
-
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3825
|
-
function FieldGroup(_a) {
|
|
3826
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3827
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3828
|
-
"div",
|
|
3829
|
-
__spreadValues({
|
|
3830
|
-
"data-slot": "field-group",
|
|
3831
|
-
className: (0, import_cn22.cn)(
|
|
3832
|
-
"group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
|
|
3833
|
-
className
|
|
3834
|
-
)
|
|
3835
|
-
}, props)
|
|
3836
|
-
);
|
|
3837
|
-
}
|
|
3838
|
-
var fieldVariants = (0, import_class_variance_authority6.cva)(
|
|
3839
|
-
"group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
|
|
3840
|
-
{
|
|
3841
|
-
variants: {
|
|
3842
|
-
orientation: {
|
|
3843
|
-
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
3844
|
-
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
3845
|
-
responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
3846
|
-
}
|
|
3847
|
-
},
|
|
3848
|
-
defaultVariants: {
|
|
3849
|
-
orientation: "vertical"
|
|
3850
|
-
}
|
|
3851
|
-
}
|
|
3852
|
-
);
|
|
3853
|
-
function Field(_a) {
|
|
3854
|
-
var _b = _a, {
|
|
3855
|
-
className,
|
|
3856
|
-
orientation = "vertical"
|
|
3857
|
-
} = _b, props = __objRest(_b, [
|
|
3858
|
-
"className",
|
|
3859
|
-
"orientation"
|
|
3860
|
-
]);
|
|
3861
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3862
|
-
"div",
|
|
3863
|
-
__spreadValues({
|
|
3864
|
-
role: "group",
|
|
3865
|
-
"data-slot": "field",
|
|
3866
|
-
"data-orientation": orientation,
|
|
3867
|
-
className: (0, import_cn22.cn)(fieldVariants({ orientation }), className)
|
|
3868
|
-
}, props)
|
|
3869
|
-
);
|
|
3870
|
-
}
|
|
3871
|
-
function FieldLabel(_a) {
|
|
3872
|
-
var _b = _a, {
|
|
3873
|
-
className
|
|
3874
|
-
} = _b, props = __objRest(_b, [
|
|
3875
|
-
"className"
|
|
3876
|
-
]);
|
|
3877
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3878
|
-
Label,
|
|
3879
|
-
__spreadValues({
|
|
3880
|
-
"data-slot": "field-label",
|
|
3881
|
-
className: (0, import_cn22.cn)(
|
|
3882
|
-
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-2 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/30 *:data-[slot=field]:p-2 dark:has-data-checked:bg-primary/10",
|
|
3883
|
-
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
3884
|
-
className
|
|
3885
|
-
)
|
|
3886
|
-
}, props)
|
|
3887
|
-
);
|
|
3888
|
-
}
|
|
3889
|
-
function FieldDescription(_a) {
|
|
3890
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3891
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3892
|
-
"p",
|
|
3893
|
-
__spreadValues({
|
|
3894
|
-
"data-slot": "field-description",
|
|
3895
|
-
className: (0, import_cn22.cn)(
|
|
3896
|
-
"text-left text-xs/relaxed leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
3897
|
-
"last:mt-0 nth-last-2:-mt-1",
|
|
3898
|
-
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
3899
|
-
className
|
|
3900
|
-
)
|
|
3901
|
-
}, props)
|
|
3902
|
-
);
|
|
3903
|
-
}
|
|
3904
|
-
function FieldSeparator(_a) {
|
|
3905
|
-
var _b = _a, {
|
|
3906
|
-
children,
|
|
3907
|
-
className
|
|
3908
|
-
} = _b, props = __objRest(_b, [
|
|
3909
|
-
"children",
|
|
3910
|
-
"className"
|
|
3911
|
-
]);
|
|
3912
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3913
|
-
"div",
|
|
3914
|
-
__spreadProps(__spreadValues({
|
|
3915
|
-
"data-slot": "field-separator",
|
|
3916
|
-
"data-content": !!children,
|
|
3917
|
-
className: (0, import_cn22.cn)(
|
|
3918
|
-
"relative -my-2 h-5 text-xs/relaxed group-data-[variant=outline]/field-group:-mb-2",
|
|
3919
|
-
className
|
|
3920
|
-
)
|
|
3921
|
-
}, props), {
|
|
3922
|
-
children: [
|
|
3923
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
3924
|
-
children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3925
|
-
"span",
|
|
3926
|
-
{
|
|
3927
|
-
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
3928
|
-
"data-slot": "field-separator-content",
|
|
3929
|
-
children
|
|
3930
|
-
}
|
|
3931
|
-
)
|
|
3932
|
-
]
|
|
3933
|
-
})
|
|
3934
|
-
);
|
|
3935
|
-
}
|
|
3936
|
-
function FieldError(_a) {
|
|
3937
|
-
var _b = _a, {
|
|
3938
|
-
className,
|
|
3939
|
-
children,
|
|
3940
|
-
errors
|
|
3941
|
-
} = _b, props = __objRest(_b, [
|
|
3942
|
-
"className",
|
|
3943
|
-
"children",
|
|
3944
|
-
"errors"
|
|
3945
|
-
]);
|
|
3946
|
-
const content = (0, import_react15.useMemo)(() => {
|
|
3947
|
-
var _a2;
|
|
3948
|
-
if (children) {
|
|
3949
|
-
return children;
|
|
3950
|
-
}
|
|
3951
|
-
if (!(errors == null ? void 0 : errors.length)) {
|
|
3952
|
-
return null;
|
|
3953
|
-
}
|
|
3954
|
-
const uniqueErrors = [
|
|
3955
|
-
...new Map(errors.map((error) => [error == null ? void 0 : error.message, error])).values()
|
|
3956
|
-
];
|
|
3957
|
-
if ((uniqueErrors == null ? void 0 : uniqueErrors.length) === 1) {
|
|
3958
|
-
return (_a2 = uniqueErrors[0]) == null ? void 0 : _a2.message;
|
|
3959
|
-
}
|
|
3960
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
3961
|
-
(error, index) => (error == null ? void 0 : error.message) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("li", { children: error.message }, index)
|
|
3962
|
-
) });
|
|
3963
|
-
}, [children, errors]);
|
|
3964
|
-
if (!content) {
|
|
3965
|
-
return null;
|
|
3966
|
-
}
|
|
3967
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3968
|
-
"div",
|
|
3969
|
-
__spreadProps(__spreadValues({
|
|
3970
|
-
role: "alert",
|
|
3971
|
-
"data-slot": "field-error",
|
|
3972
|
-
className: (0, import_cn22.cn)("text-xs/relaxed font-normal text-destructive", className)
|
|
3973
|
-
}, props), {
|
|
3974
|
-
children: content
|
|
3975
|
-
})
|
|
3976
|
-
);
|
|
3977
|
-
}
|
|
3978
|
-
|
|
3979
|
-
// src/components/ui/toast.tsx
|
|
3980
|
-
var import_toast = require("@base-ui/react/toast");
|
|
3981
|
-
var import_cn23 = require("cn");
|
|
3982
|
-
var import_lucide_react22 = require("lucide-react");
|
|
3983
|
-
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3984
|
-
var toast = import_toast.Toast.createToastManager();
|
|
3985
|
-
var createToastManager = import_toast.Toast.createToastManager;
|
|
3986
|
-
var useToastManager = import_toast.Toast.useToastManager;
|
|
3987
|
-
|
|
3988
|
-
// src/components/composed/login-server.tsx
|
|
3989
|
-
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3990
|
-
var loginSchema = import_zod2.z.object({
|
|
3991
|
-
email: import_zod2.z.string().trim().toLowerCase().min(1, "Email is required").max(254, "Email is too long").pipe(import_zod2.z.email("Invalid email format")),
|
|
3992
|
-
password: import_zod2.z.string().min(1, "Password is required").min(8, "Password must be at least 8 characters").max(128, "Password must not exceed 128 characters")
|
|
3993
|
-
});
|
|
3994
|
-
function LoginServer({
|
|
3995
|
-
onSubmit,
|
|
3996
|
-
onGoogleSignIn,
|
|
3997
|
-
isSubmitting: externalIsSubmitting
|
|
3998
|
-
}) {
|
|
3999
|
-
const [isRedirecting, setIsRedirecting] = (0, import_react16.useState)(false);
|
|
4000
|
-
const [isGoogleLoading, setIsGoogleLoading] = (0, import_react16.useState)(false);
|
|
4001
|
-
const form = (0, import_react_hook_form.useForm)({
|
|
4002
|
-
resolver: (0, import_zod.zodResolver)(loginSchema),
|
|
4003
|
-
defaultValues: {
|
|
4004
|
-
email: "",
|
|
4005
|
-
password: ""
|
|
4006
|
-
}
|
|
4007
|
-
});
|
|
4008
|
-
const isPending = externalIsSubmitting != null ? externalIsSubmitting : form.formState.isSubmitting || isRedirecting || isGoogleLoading;
|
|
4009
|
-
const handleFormSubmit = async (values) => {
|
|
4010
|
-
try {
|
|
4011
|
-
if (!onSubmit) {
|
|
4012
|
-
toast.add({
|
|
4013
|
-
description: "Login action handler is not configured."
|
|
4014
|
-
});
|
|
4015
|
-
return;
|
|
4016
|
-
}
|
|
4017
|
-
const res = await onSubmit(values);
|
|
4018
|
-
if (res && typeof res === "object" && "error" in res && typeof res.error === "string" && res.error) {
|
|
4019
|
-
setIsRedirecting(false);
|
|
4020
|
-
toast.add({ description: res.error });
|
|
4021
|
-
return;
|
|
4022
|
-
}
|
|
4023
|
-
setIsRedirecting(true);
|
|
4024
|
-
} catch (e) {
|
|
4025
|
-
setIsRedirecting(false);
|
|
4026
|
-
toast.add({ description: "Unable to process your login request." });
|
|
4027
|
-
}
|
|
4028
|
-
};
|
|
4029
|
-
const handleGoogleSignIn = async () => {
|
|
4030
|
-
if (isPending) return;
|
|
4031
|
-
if (!onGoogleSignIn) {
|
|
4032
|
-
toast.add({
|
|
4033
|
-
description: "Google Sign-In is not currently available."
|
|
4034
|
-
});
|
|
4035
|
-
return;
|
|
4036
|
-
}
|
|
4037
|
-
try {
|
|
4038
|
-
setIsGoogleLoading(true);
|
|
4039
|
-
await onGoogleSignIn();
|
|
4040
|
-
} catch (e) {
|
|
4041
|
-
setIsGoogleLoading(false);
|
|
4042
|
-
toast.add({ description: "Google Sign-In failed to initialize." });
|
|
4043
|
-
}
|
|
4044
|
-
};
|
|
4045
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex w-full max-w-sm flex-col gap-6", children: [
|
|
4046
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2 self-center font-medium", children: [
|
|
4047
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex size-6 items-center justify-center rounded-md bg-primary text-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react23.GalleryVerticalEndIcon, { className: "size-4" }) }),
|
|
4048
|
-
"Prediktif"
|
|
4049
|
-
] }),
|
|
4050
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
4051
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Card, { children: [
|
|
4052
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(CardHeader, { className: "text-center", children: [
|
|
4053
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CardTitle, { children: "Welcome back" }),
|
|
4054
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CardDescription, { children: "Login with your Google account" })
|
|
4055
|
-
] }),
|
|
4056
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("form", { onSubmit: form.handleSubmit(handleFormSubmit), noValidate: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(FieldGroup, { children: [
|
|
4057
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Field, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4058
|
-
Button,
|
|
4059
|
-
{
|
|
4060
|
-
type: "button",
|
|
4061
|
-
variant: "outline",
|
|
4062
|
-
disabled: isPending,
|
|
4063
|
-
onClick: handleGoogleSignIn,
|
|
4064
|
-
children: [
|
|
4065
|
-
isGoogleLoading ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4066
|
-
import_lucide_react23.LoaderCircleIcon,
|
|
4067
|
-
{
|
|
4068
|
-
className: "animate-spin",
|
|
4069
|
-
"data-icon": "inline-start"
|
|
4070
|
-
}
|
|
4071
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(GoogleIcon, { className: "size-4 shrink-0" }),
|
|
4072
|
-
"Login with Google"
|
|
4073
|
-
]
|
|
4074
|
-
}
|
|
4075
|
-
) }),
|
|
4076
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldSeparator, { className: "*:data-[slot=field-separator-content]:bg-card", children: "Or continue with" }),
|
|
4077
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4078
|
-
import_react_hook_form.Controller,
|
|
4079
|
-
{
|
|
4080
|
-
name: "email",
|
|
4081
|
-
control: form.control,
|
|
4082
|
-
render: ({ field, fieldState }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Field, { "data-invalid": fieldState.invalid, children: [
|
|
4083
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldLabel, { htmlFor: field.name, children: "Email" }),
|
|
4084
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4085
|
-
Input,
|
|
4086
|
-
__spreadProps(__spreadValues({}, field), {
|
|
4087
|
-
id: field.name,
|
|
4088
|
-
"aria-invalid": fieldState.invalid,
|
|
4089
|
-
disabled: isPending,
|
|
4090
|
-
placeholder: "m@example.com",
|
|
4091
|
-
type: "email",
|
|
4092
|
-
autoComplete: "email"
|
|
4093
|
-
})
|
|
4094
|
-
),
|
|
4095
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldDescription, { children: "Enter the email address associated with your account." }),
|
|
4096
|
-
fieldState.invalid && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldError, { errors: [fieldState.error] })
|
|
4097
|
-
] })
|
|
4098
|
-
}
|
|
4099
|
-
),
|
|
4100
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4101
|
-
import_react_hook_form.Controller,
|
|
4102
|
-
{
|
|
4103
|
-
name: "password",
|
|
4104
|
-
control: form.control,
|
|
4105
|
-
render: ({ field, fieldState }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Field, { "data-invalid": fieldState.invalid, children: [
|
|
4106
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center", children: [
|
|
4107
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldLabel, { htmlFor: field.name, children: "Password" }),
|
|
4108
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4109
|
-
import_link3.default,
|
|
4110
|
-
{
|
|
4111
|
-
href: "/forgot-password",
|
|
4112
|
-
className: "ml-auto inline-block underline-offset-4 hover:underline",
|
|
4113
|
-
children: "Forgot your password?"
|
|
4114
|
-
}
|
|
4115
|
-
)
|
|
4116
|
-
] }),
|
|
4117
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4118
|
-
Input,
|
|
4119
|
-
__spreadProps(__spreadValues({}, field), {
|
|
4120
|
-
id: field.name,
|
|
4121
|
-
"aria-invalid": fieldState.invalid,
|
|
4122
|
-
disabled: isPending,
|
|
4123
|
-
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
4124
|
-
type: "password",
|
|
4125
|
-
autoComplete: "current-password"
|
|
4126
|
-
})
|
|
4127
|
-
),
|
|
4128
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldDescription, { children: "Enter your account password." }),
|
|
4129
|
-
fieldState.invalid && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldError, { errors: [fieldState.error] })
|
|
4130
|
-
] })
|
|
4131
|
-
}
|
|
4132
|
-
),
|
|
4133
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Field, { children: [
|
|
4134
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4135
|
-
Button,
|
|
4136
|
-
{
|
|
4137
|
-
type: "submit",
|
|
4138
|
-
disabled: isPending,
|
|
4139
|
-
className: "w-full",
|
|
4140
|
-
children: [
|
|
4141
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4142
|
-
import_lucide_react23.LoaderCircleIcon,
|
|
4143
|
-
{
|
|
4144
|
-
className: (0, import_cn24.cn)(
|
|
4145
|
-
"animate-spin",
|
|
4146
|
-
isPending && !isGoogleLoading ? "block" : "hidden"
|
|
4147
|
-
),
|
|
4148
|
-
"data-icon": "inline-start"
|
|
4149
|
-
}
|
|
4150
|
-
),
|
|
4151
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4152
|
-
import_lucide_react23.LogInIcon,
|
|
4153
|
-
{
|
|
4154
|
-
className: (0, import_cn24.cn)(
|
|
4155
|
-
!isPending || isGoogleLoading ? "block" : "hidden"
|
|
4156
|
-
),
|
|
4157
|
-
"data-icon": "inline-start"
|
|
4158
|
-
}
|
|
4159
|
-
),
|
|
4160
|
-
isRedirecting ? "Redirecting to application..." : form.formState.isSubmitting ? "Signing in..." : "Login"
|
|
4161
|
-
]
|
|
4162
|
-
}
|
|
4163
|
-
),
|
|
4164
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(FieldDescription, { className: "text-center", children: [
|
|
4165
|
-
"Don't have an account?",
|
|
4166
|
-
" ",
|
|
4167
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_link3.default, { href: "/register", children: "Sign up" })
|
|
4168
|
-
] })
|
|
4169
|
-
] })
|
|
4170
|
-
] }) }) })
|
|
4171
|
-
] }),
|
|
4172
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(FieldDescription, { className: "px-6 text-center", children: [
|
|
4173
|
-
"By clicking continue, you agree to our",
|
|
4174
|
-
" ",
|
|
4175
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_link3.default, { href: "/terms", children: "Terms of Service" }),
|
|
4176
|
-
" and",
|
|
4177
|
-
" ",
|
|
4178
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_link3.default, { href: "/privacy", children: "Privacy Policy" }),
|
|
4179
|
-
"."
|
|
4180
|
-
] })
|
|
4181
|
-
] })
|
|
4182
|
-
] }) });
|
|
4183
|
-
}
|
|
4184
4741
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4185
4742
|
0 && (module.exports = {
|
|
4743
|
+
ActiveTokensStatus,
|
|
4186
4744
|
AppSidebar,
|
|
4745
|
+
AvatarGroupInvitations,
|
|
4746
|
+
AvatarGroupUsers,
|
|
4747
|
+
AvatarInvitations,
|
|
4187
4748
|
AvatarUser,
|
|
4749
|
+
AvatarUsers,
|
|
4750
|
+
CodeLabel,
|
|
4751
|
+
CopyableCode,
|
|
4752
|
+
DEFAULT_METADATA_FIELDS,
|
|
4188
4753
|
DataTable,
|
|
4189
4754
|
DataTableContentBody,
|
|
4190
4755
|
DataTableContentHeader,
|
|
@@ -4197,15 +4762,32 @@ function LoginServer({
|
|
|
4197
4762
|
DataTableHeaderSearch,
|
|
4198
4763
|
DataTableHeaderSort,
|
|
4199
4764
|
DataTableHeaderToggle,
|
|
4765
|
+
DescriptionLabel,
|
|
4200
4766
|
EmailLabel,
|
|
4201
4767
|
EmailVerified,
|
|
4202
4768
|
GoogleIcon,
|
|
4203
4769
|
HeaderTabs,
|
|
4204
4770
|
HeaderTitle,
|
|
4771
|
+
ItemStatus,
|
|
4205
4772
|
JoinedLabel,
|
|
4206
|
-
|
|
4773
|
+
MetadataProgress,
|
|
4774
|
+
MetadataStatus,
|
|
4775
|
+
OrganizationInvitations,
|
|
4776
|
+
OrganizationRoleBadge,
|
|
4777
|
+
OrganizationRoles,
|
|
4778
|
+
PermissionBadges,
|
|
4779
|
+
PermissionsBadges,
|
|
4780
|
+
ProgressStatus,
|
|
4781
|
+
RedirectUriLabel,
|
|
4782
|
+
RedirectUris,
|
|
4207
4783
|
RowActions,
|
|
4784
|
+
RunningStatus,
|
|
4785
|
+
SlugLabel,
|
|
4208
4786
|
StateEmpty,
|
|
4787
|
+
StatusBadge,
|
|
4788
|
+
TokenActivity,
|
|
4789
|
+
UrisLabel,
|
|
4790
|
+
UrisList,
|
|
4209
4791
|
UserRole,
|
|
4210
4792
|
UserStatus,
|
|
4211
4793
|
exportToCSV,
|
|
@@ -4214,7 +4796,6 @@ function LoginServer({
|
|
|
4214
4796
|
features,
|
|
4215
4797
|
flexRender,
|
|
4216
4798
|
getTableExportData,
|
|
4217
|
-
loginSchema,
|
|
4218
4799
|
printTable,
|
|
4219
4800
|
smartFilterFn,
|
|
4220
4801
|
useTable
|