@amogads/ui 1.1.5 → 1.1.6
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.js +1154 -1469
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1071 -1397
- package/dist/index.mjs.map +1 -1
- package/dist/pages.js +2070 -2205
- package/dist/pages.js.map +1 -1
- package/dist/pages.mjs +1378 -1512
- package/dist/pages.mjs.map +1 -1
- package/dist/server.js +6 -3
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +6 -3
- package/dist/server.mjs.map +1 -1
- package/dist/services.js +6 -1
- package/dist/services.js.map +1 -1
- package/dist/services.mjs +6 -1
- package/dist/services.mjs.map +1 -1
- package/dist/stores.js +1 -0
- package/dist/stores.js.map +1 -1
- package/dist/stores.mjs +1 -0
- package/dist/stores.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -390,6 +390,7 @@ __export(design_system_exports, {
|
|
|
390
390
|
buttonVariants: () => buttonVariants,
|
|
391
391
|
downloadQrCode: () => downloadQrCode,
|
|
392
392
|
formatBytes: () => formatBytes,
|
|
393
|
+
formatTimeAgo: () => formatTimeAgo,
|
|
393
394
|
getFileCategoryTheme: () => getFileCategoryTheme,
|
|
394
395
|
navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
|
|
395
396
|
sidebarData: () => sidebarData2,
|
|
@@ -11390,245 +11391,198 @@ function AiChatHeader({
|
|
|
11390
11391
|
}
|
|
11391
11392
|
|
|
11392
11393
|
// src/design-system/components/files/file-card-item.tsx
|
|
11393
|
-
var import_react17 = __toESM(require("react"));
|
|
11394
11394
|
var import_lucide_react48 = require("lucide-react");
|
|
11395
|
-
var import_date_fns3 = require("date-fns");
|
|
11396
11395
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
11397
|
-
function
|
|
11398
|
-
switch (category) {
|
|
11399
|
-
case "Pdf":
|
|
11400
|
-
return {
|
|
11401
|
-
bg: "bg-red-500/10 dark:bg-red-950/40",
|
|
11402
|
-
text: "text-red-600 dark:text-red-400",
|
|
11403
|
-
border: "border-red-200/40 dark:border-red-900/40",
|
|
11404
|
-
gradient: "from-red-500/20 to-orange-500/10"
|
|
11405
|
-
};
|
|
11406
|
-
case "Doc":
|
|
11407
|
-
return {
|
|
11408
|
-
bg: "bg-blue-500/10 dark:bg-blue-950/40",
|
|
11409
|
-
text: "text-blue-600 dark:text-blue-400",
|
|
11410
|
-
border: "border-blue-200/40 dark:border-blue-900/40",
|
|
11411
|
-
gradient: "from-blue-500/20 to-indigo-500/10"
|
|
11412
|
-
};
|
|
11413
|
-
case "Xls":
|
|
11414
|
-
case "Csv":
|
|
11415
|
-
return {
|
|
11416
|
-
bg: "bg-emerald-500/10 dark:bg-emerald-950/40",
|
|
11417
|
-
text: "text-emerald-600 dark:text-emerald-400",
|
|
11418
|
-
border: "border-emerald-200/40 dark:border-emerald-900/40",
|
|
11419
|
-
gradient: "from-emerald-500/20 to-teal-500/10"
|
|
11420
|
-
};
|
|
11421
|
-
case "Images":
|
|
11422
|
-
return {
|
|
11423
|
-
bg: "bg-amber-500/10 dark:bg-amber-950/40",
|
|
11424
|
-
text: "text-amber-600 dark:text-amber-400",
|
|
11425
|
-
border: "border-amber-200/40 dark:border-amber-900/40",
|
|
11426
|
-
gradient: "from-amber-500/20 to-yellow-500/10"
|
|
11427
|
-
};
|
|
11428
|
-
case "Videos":
|
|
11429
|
-
return {
|
|
11430
|
-
bg: "bg-purple-500/10 dark:bg-purple-950/40",
|
|
11431
|
-
text: "text-purple-600 dark:text-purple-400",
|
|
11432
|
-
border: "border-purple-200/40 dark:border-purple-900/40",
|
|
11433
|
-
gradient: "from-purple-500/20 to-pink-500/10"
|
|
11434
|
-
};
|
|
11435
|
-
case "Zip":
|
|
11436
|
-
return {
|
|
11437
|
-
bg: "bg-orange-500/10 dark:bg-orange-950/40",
|
|
11438
|
-
text: "text-orange-600 dark:text-orange-400",
|
|
11439
|
-
border: "border-orange-200/40 dark:border-orange-900/40",
|
|
11440
|
-
gradient: "from-orange-500/20 to-amber-500/10"
|
|
11441
|
-
};
|
|
11442
|
-
default:
|
|
11443
|
-
return {
|
|
11444
|
-
bg: "bg-indigo-500/10 dark:bg-indigo-950/40",
|
|
11445
|
-
text: "text-indigo-600 dark:text-indigo-400",
|
|
11446
|
-
border: "border-indigo-200/40 dark:border-indigo-900/40",
|
|
11447
|
-
gradient: "from-indigo-500/20 to-purple-500/10"
|
|
11448
|
-
};
|
|
11449
|
-
}
|
|
11450
|
-
}
|
|
11451
|
-
function formatBytes(bytes) {
|
|
11396
|
+
function formatBytes(bytes, decimals = 1) {
|
|
11452
11397
|
if (!bytes || bytes === 0) return "0 B";
|
|
11453
11398
|
const k = 1024;
|
|
11399
|
+
const dm = decimals < 0 ? 0 : decimals;
|
|
11454
11400
|
const sizes = ["B", "KB", "MB", "GB", "TB"];
|
|
11455
11401
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
11456
|
-
return
|
|
11402
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
11403
|
+
}
|
|
11404
|
+
function getFileCategoryTheme(category) {
|
|
11405
|
+
const cat = (category || "").toLowerCase();
|
|
11406
|
+
if (cat.includes("pdf")) {
|
|
11407
|
+
return {
|
|
11408
|
+
name: "Pdf",
|
|
11409
|
+
icon: import_lucide_react48.FileText,
|
|
11410
|
+
badgeColor: "bg-red-500/10 text-red-600 dark:text-red-400 border-red-200/50",
|
|
11411
|
+
iconColor: "text-red-500",
|
|
11412
|
+
bgColor: "bg-red-50 dark:bg-red-950/30"
|
|
11413
|
+
};
|
|
11414
|
+
}
|
|
11415
|
+
if (cat.includes("doc") || cat.includes("word") || cat.includes("txt")) {
|
|
11416
|
+
return {
|
|
11417
|
+
name: "Doc",
|
|
11418
|
+
icon: import_lucide_react48.FileText,
|
|
11419
|
+
badgeColor: "bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-200/50",
|
|
11420
|
+
iconColor: "text-blue-500",
|
|
11421
|
+
bgColor: "bg-blue-50 dark:bg-blue-950/30"
|
|
11422
|
+
};
|
|
11423
|
+
}
|
|
11424
|
+
if (cat.includes("xls") || cat.includes("csv") || cat.includes("sheet")) {
|
|
11425
|
+
return {
|
|
11426
|
+
name: "Spreadsheet",
|
|
11427
|
+
icon: import_lucide_react48.FileSpreadsheet,
|
|
11428
|
+
badgeColor: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-200/50",
|
|
11429
|
+
iconColor: "text-emerald-500",
|
|
11430
|
+
bgColor: "bg-emerald-50 dark:bg-emerald-950/30"
|
|
11431
|
+
};
|
|
11432
|
+
}
|
|
11433
|
+
if (cat.includes("image") || cat.includes("img") || cat.includes("png") || cat.includes("jpg")) {
|
|
11434
|
+
return {
|
|
11435
|
+
name: "Images",
|
|
11436
|
+
icon: import_lucide_react48.Image,
|
|
11437
|
+
badgeColor: "bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-200/50",
|
|
11438
|
+
iconColor: "text-amber-500",
|
|
11439
|
+
bgColor: "bg-amber-50 dark:bg-amber-950/30"
|
|
11440
|
+
};
|
|
11441
|
+
}
|
|
11442
|
+
if (cat.includes("video") || cat.includes("mp4") || cat.includes("mov")) {
|
|
11443
|
+
return {
|
|
11444
|
+
name: "Videos",
|
|
11445
|
+
icon: import_lucide_react48.Film,
|
|
11446
|
+
badgeColor: "bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-200/50",
|
|
11447
|
+
iconColor: "text-purple-500",
|
|
11448
|
+
bgColor: "bg-purple-50 dark:bg-purple-950/30"
|
|
11449
|
+
};
|
|
11450
|
+
}
|
|
11451
|
+
if (cat.includes("zip") || cat.includes("rar") || cat.includes("tar")) {
|
|
11452
|
+
return {
|
|
11453
|
+
name: "Archives",
|
|
11454
|
+
icon: import_lucide_react48.Archive,
|
|
11455
|
+
badgeColor: "bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-200/50",
|
|
11456
|
+
iconColor: "text-orange-500",
|
|
11457
|
+
bgColor: "bg-orange-50 dark:bg-orange-950/30"
|
|
11458
|
+
};
|
|
11459
|
+
}
|
|
11460
|
+
return {
|
|
11461
|
+
name: "Other",
|
|
11462
|
+
icon: import_lucide_react48.File,
|
|
11463
|
+
badgeColor: "bg-muted text-muted-foreground border-border/80",
|
|
11464
|
+
iconColor: "text-muted-foreground",
|
|
11465
|
+
bgColor: "bg-muted/40"
|
|
11466
|
+
};
|
|
11467
|
+
}
|
|
11468
|
+
function formatTimeAgo(dateString) {
|
|
11469
|
+
if (!dateString) return "recently";
|
|
11470
|
+
try {
|
|
11471
|
+
const d = new Date(dateString);
|
|
11472
|
+
const diff = (Date.now() - d.getTime()) / 1e3;
|
|
11473
|
+
if (diff < 60) return "just now";
|
|
11474
|
+
if (diff < 3600) return `${Math.floor(diff / 60)} mins ago`;
|
|
11475
|
+
if (diff < 86400) {
|
|
11476
|
+
const hours = Math.floor(diff / 3600);
|
|
11477
|
+
return `${hours} hour${hours > 1 ? "s" : ""} ago`;
|
|
11478
|
+
}
|
|
11479
|
+
const days = Math.floor(diff / 86400);
|
|
11480
|
+
return `${days} day${days > 1 ? "s" : ""} ago`;
|
|
11481
|
+
} catch {
|
|
11482
|
+
return "recently";
|
|
11483
|
+
}
|
|
11457
11484
|
}
|
|
11458
11485
|
function FileCardItem({
|
|
11459
11486
|
file,
|
|
11460
|
-
isSelected = false,
|
|
11461
11487
|
viewMode = "grid",
|
|
11488
|
+
isSelected = false,
|
|
11462
11489
|
onSelect,
|
|
11463
11490
|
onPreview,
|
|
11464
11491
|
onDownload,
|
|
11492
|
+
onDelete,
|
|
11465
11493
|
onCopyLink,
|
|
11466
11494
|
onRename,
|
|
11467
|
-
onDelete,
|
|
11468
11495
|
onShare,
|
|
11469
11496
|
className
|
|
11470
11497
|
}) {
|
|
11471
11498
|
const theme = getFileCategoryTheme(file.category);
|
|
11472
|
-
const isImage =
|
|
11473
|
-
const isVideo = file.category === "Videos" || /\.(mp4|webm|mov|mkv)$/i.test(file.fileName);
|
|
11474
|
-
const isPdf = file.category === "Pdf" || /\.pdf$/i.test(file.fileName);
|
|
11475
|
-
const isSheet = file.category === "Xls" || file.category === "Csv" || /\.(xls|xlsx|csv)$/i.test(file.fileName);
|
|
11476
|
-
const isZip = file.category === "Zip" || /\.(zip|rar|7z|tar|gz)$/i.test(file.fileName);
|
|
11477
|
-
const updatedTimeDisplay = import_react17.default.useMemo(() => {
|
|
11478
|
-
if (!file.updatedAt) return "Recently";
|
|
11479
|
-
try {
|
|
11480
|
-
const d = new Date(file.updatedAt);
|
|
11481
|
-
return (0, import_date_fns3.formatDistanceToNow)(d, { addSuffix: true });
|
|
11482
|
-
} catch {
|
|
11483
|
-
return "Recently";
|
|
11484
|
-
}
|
|
11485
|
-
}, [file.updatedAt]);
|
|
11499
|
+
const isImage = theme.name === "Images" || file.fileName.match(/\.(jpg|jpeg|png|webp|gif|svg)$/i) || file.fileUrl && file.fileUrl.startsWith("http") && !file.fileUrl.endsWith(".pdf");
|
|
11486
11500
|
if (viewMode === "table") {
|
|
11487
11501
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11488
11502
|
"tr",
|
|
11489
11503
|
{
|
|
11490
|
-
onClick: () => onSelect?.(file),
|
|
11491
11504
|
className: cn(
|
|
11492
|
-
"group border-b border-border/
|
|
11505
|
+
"group border-b border-border/60 transition-colors hover:bg-muted/40 text-xs",
|
|
11493
11506
|
isSelected && "bg-primary/5",
|
|
11494
11507
|
className
|
|
11495
11508
|
),
|
|
11496
11509
|
children: [
|
|
11497
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-
|
|
11510
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-2.5 px-3", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-2.5 min-w-0", children: [
|
|
11498
11511
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11499
11512
|
"div",
|
|
11500
11513
|
{
|
|
11501
11514
|
className: cn(
|
|
11502
|
-
"flex h-
|
|
11503
|
-
theme.
|
|
11504
|
-
theme.
|
|
11515
|
+
"flex h-7 w-7 items-center justify-center rounded-lg shrink-0",
|
|
11516
|
+
theme.bgColor,
|
|
11517
|
+
theme.iconColor
|
|
11505
11518
|
),
|
|
11506
|
-
children:
|
|
11519
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(theme.icon, { className: "h-3.5 w-3.5" })
|
|
11507
11520
|
}
|
|
11508
11521
|
),
|
|
11509
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.
|
|
11510
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "font-semibold text-xs text-foreground truncate max-w-[240px] sm:max-w-xs", children: file.fileName }),
|
|
11511
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-[11px] text-muted-foreground", children: file.folderPath || file.section || "General" })
|
|
11512
|
-
] })
|
|
11522
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "font-semibold text-foreground truncate max-w-[200px]", children: file.fileName })
|
|
11513
11523
|
] }) }),
|
|
11514
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
}
|
|
11521
|
-
) }),
|
|
11522
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-3 px-4 text-xs text-muted-foreground font-mono", children: formatBytes(file.fileSize) }),
|
|
11523
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-3 px-4 text-xs text-muted-foreground hidden sm:table-cell", children: updatedTimeDisplay }),
|
|
11524
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-3 px-4 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-end gap-1", children: [
|
|
11525
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11526
|
-
"button",
|
|
11524
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-2.5 px-3 text-muted-foreground truncate max-w-[140px]", children: file.folderPath || file.section || "General" }),
|
|
11525
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-2.5 px-3 text-muted-foreground font-mono", children: formatBytes(file.fileSize) }),
|
|
11526
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-2.5 px-3 text-muted-foreground", children: formatTimeAgo(file.updatedAt) }),
|
|
11527
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "py-2.5 px-3 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-end gap-1", children: [
|
|
11528
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11529
|
+
Button,
|
|
11527
11530
|
{
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11531
|
+
size: "sm",
|
|
11532
|
+
variant: "ghost",
|
|
11533
|
+
onClick: () => onPreview?.(file),
|
|
11534
|
+
className: "h-7 px-2.5 rounded-lg bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 hover:bg-indigo-500/20 text-xs font-semibold gap-1.5",
|
|
11535
|
+
children: [
|
|
11536
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Eye, { className: "h-3.5 w-3.5" }),
|
|
11537
|
+
" Preview"
|
|
11538
|
+
]
|
|
11536
11539
|
}
|
|
11537
11540
|
),
|
|
11538
11541
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11539
|
-
|
|
11542
|
+
Button,
|
|
11540
11543
|
{
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
}
|
|
11546
|
-
className: "p-1.5 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
11547
|
-
title: "Download",
|
|
11548
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Download, { className: "h-4 w-4" })
|
|
11544
|
+
size: "icon",
|
|
11545
|
+
variant: "ghost",
|
|
11546
|
+
onClick: () => onDownload?.(file),
|
|
11547
|
+
className: "h-7 w-7 rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
11548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Download, { className: "h-3.5 w-3.5" })
|
|
11549
11549
|
}
|
|
11550
11550
|
),
|
|
11551
11551
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenu, { children: [
|
|
11552
11552
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11553
|
-
|
|
11553
|
+
Button,
|
|
11554
11554
|
{
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
className: "
|
|
11558
|
-
|
|
11559
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.MoreHorizontal, { className: "h-4 w-4" })
|
|
11555
|
+
size: "icon",
|
|
11556
|
+
variant: "ghost",
|
|
11557
|
+
className: "h-7 w-7 rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
11558
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.MoreHorizontal, { className: "h-3.5 w-3.5" })
|
|
11560
11559
|
}
|
|
11561
11560
|
) }),
|
|
11562
11561
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuContent, { align: "end", className: "w-40 rounded-xl p-1 shadow-lg", children: [
|
|
11562
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuItem, { onClick: () => onPreview?.(file), className: "gap-2 text-xs", children: [
|
|
11563
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Eye, { className: "h-3.5 w-3.5" }),
|
|
11564
|
+
" Preview"
|
|
11565
|
+
] }),
|
|
11566
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuItem, { onClick: () => onDownload?.(file), className: "gap-2 text-xs", children: [
|
|
11567
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Download, { className: "h-3.5 w-3.5" }),
|
|
11568
|
+
" Download"
|
|
11569
|
+
] }),
|
|
11570
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuItem, { onClick: () => onCopyLink?.(file), className: "gap-2 text-xs", children: [
|
|
11571
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Copy, { className: "h-3.5 w-3.5" }),
|
|
11572
|
+
" Copy Link"
|
|
11573
|
+
] }),
|
|
11574
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DropdownMenuSeparator, {}),
|
|
11563
11575
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11564
11576
|
DropdownMenuItem,
|
|
11565
11577
|
{
|
|
11566
|
-
onClick: () =>
|
|
11567
|
-
className: "
|
|
11568
|
-
children: [
|
|
11569
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Eye, { className: "h-3.5 w-3.5 text-blue-500" }),
|
|
11570
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Preview" })
|
|
11571
|
-
]
|
|
11572
|
-
}
|
|
11573
|
-
),
|
|
11574
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11575
|
-
DropdownMenuItem,
|
|
11576
|
-
{
|
|
11577
|
-
onClick: () => onDownload?.(file),
|
|
11578
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5",
|
|
11579
|
-
children: [
|
|
11580
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Download, { className: "h-3.5 w-3.5 text-emerald-500" }),
|
|
11581
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Download" })
|
|
11582
|
-
]
|
|
11583
|
-
}
|
|
11584
|
-
),
|
|
11585
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11586
|
-
DropdownMenuItem,
|
|
11587
|
-
{
|
|
11588
|
-
onClick: () => onCopyLink?.(file),
|
|
11589
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5",
|
|
11590
|
-
children: [
|
|
11591
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Copy, { className: "h-3.5 w-3.5 text-amber-500" }),
|
|
11592
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Copy Link" })
|
|
11593
|
-
]
|
|
11594
|
-
}
|
|
11595
|
-
),
|
|
11596
|
-
onShare && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11597
|
-
DropdownMenuItem,
|
|
11598
|
-
{
|
|
11599
|
-
onClick: () => onShare(file),
|
|
11600
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5",
|
|
11601
|
-
children: [
|
|
11602
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Share2, { className: "h-3.5 w-3.5 text-indigo-500" }),
|
|
11603
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Share" })
|
|
11604
|
-
]
|
|
11605
|
-
}
|
|
11606
|
-
),
|
|
11607
|
-
onRename && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11608
|
-
DropdownMenuItem,
|
|
11609
|
-
{
|
|
11610
|
-
onClick: () => onRename(file),
|
|
11611
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5",
|
|
11578
|
+
onClick: () => onDelete?.(file),
|
|
11579
|
+
className: "gap-2 text-xs text-destructive focus:text-destructive",
|
|
11612
11580
|
children: [
|
|
11613
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.
|
|
11614
|
-
|
|
11581
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Trash2, { className: "h-3.5 w-3.5" }),
|
|
11582
|
+
" Delete"
|
|
11615
11583
|
]
|
|
11616
11584
|
}
|
|
11617
|
-
)
|
|
11618
|
-
onDelete && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
|
|
11619
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DropdownMenuSeparator, {}),
|
|
11620
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11621
|
-
DropdownMenuItem,
|
|
11622
|
-
{
|
|
11623
|
-
onClick: () => onDelete(file),
|
|
11624
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5 text-rose-500 hover:text-rose-600 hover:bg-rose-50 dark:hover:bg-rose-950/30 rounded-md",
|
|
11625
|
-
children: [
|
|
11626
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Trash2, { className: "h-3.5 w-3.5 text-rose-500" }),
|
|
11627
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Delete" })
|
|
11628
|
-
]
|
|
11629
|
-
}
|
|
11630
|
-
)
|
|
11631
|
-
] })
|
|
11585
|
+
)
|
|
11632
11586
|
] })
|
|
11633
11587
|
] })
|
|
11634
11588
|
] }) })
|
|
@@ -11639,143 +11593,119 @@ function FileCardItem({
|
|
|
11639
11593
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11640
11594
|
"div",
|
|
11641
11595
|
{
|
|
11642
|
-
onClick: () => onSelect?.(file),
|
|
11643
11596
|
className: cn(
|
|
11644
|
-
"group relative flex flex-col justify-between
|
|
11645
|
-
isSelected && "
|
|
11597
|
+
"group relative flex flex-col justify-between rounded-2xl border border-border/80 bg-card p-2.5 shadow-2xs hover:shadow-md transition-all hover:border-indigo-300 dark:hover:border-indigo-700 select-none",
|
|
11598
|
+
isSelected && "ring-2 ring-indigo-500 bg-indigo-500/5",
|
|
11646
11599
|
className
|
|
11647
11600
|
),
|
|
11648
11601
|
children: [
|
|
11649
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", {
|
|
11650
|
-
isImage && file.fileUrl ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11602
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
11603
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "relative w-full aspect-[16/10] rounded-xl overflow-hidden bg-muted/60 mb-2.5 flex items-center justify-center", children: isImage && file.fileUrl ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11651
11604
|
"img",
|
|
11652
11605
|
{
|
|
11653
11606
|
src: file.fileUrl,
|
|
11654
11607
|
alt: file.fileName,
|
|
11655
|
-
className: "
|
|
11608
|
+
className: "w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",
|
|
11656
11609
|
loading: "lazy"
|
|
11657
11610
|
}
|
|
11658
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime94.
|
|
11611
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11659
11612
|
"div",
|
|
11660
11613
|
{
|
|
11661
11614
|
className: cn(
|
|
11662
|
-
"flex
|
|
11663
|
-
theme.
|
|
11664
|
-
theme.border
|
|
11665
|
-
),
|
|
11666
|
-
children: isPdf ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.FileText, { className: cn("h-8 w-8", theme.text) }) : isVideo ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Film, { className: cn("h-8 w-8", theme.text) }) : isSheet ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.FileSpreadsheet, { className: cn("h-8 w-8", theme.text) }) : isZip ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.FileArchive, { className: cn("h-8 w-8", theme.text) }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.FileCode, { className: cn("h-8 w-8", theme.text) })
|
|
11667
|
-
}
|
|
11668
|
-
),
|
|
11669
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11670
|
-
Badge,
|
|
11671
|
-
{
|
|
11672
|
-
variant: "outline",
|
|
11673
|
-
className: cn(
|
|
11674
|
-
"absolute top-2 right-2 backdrop-blur-md text-[10px] font-bold px-1.5 py-0.5 shadow-2xs",
|
|
11675
|
-
theme.bg,
|
|
11676
|
-
theme.text,
|
|
11677
|
-
theme.border
|
|
11615
|
+
"flex flex-col items-center justify-center gap-1.5 w-full h-full p-4",
|
|
11616
|
+
theme.bgColor
|
|
11678
11617
|
),
|
|
11679
|
-
children:
|
|
11618
|
+
children: [
|
|
11619
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(theme.icon, { className: cn("h-10 w-10", theme.iconColor) }),
|
|
11620
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-[11px] font-bold uppercase tracking-wider text-muted-foreground", children: theme.name })
|
|
11621
|
+
]
|
|
11680
11622
|
}
|
|
11681
|
-
)
|
|
11682
|
-
|
|
11683
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
11684
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h4", { className: "font-bold text-xs text-foreground truncate tracking-tight", title: file.fileName, children: file.fileName }),
|
|
11685
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center justify-between text-[11px] text-muted-foreground", children: [
|
|
11686
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "font-mono", children: formatBytes(file.fileSize) }),
|
|
11687
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "truncate", children: updatedTimeDisplay })
|
|
11688
|
-
] })
|
|
11689
|
-
] }),
|
|
11690
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "mt-3 pt-2.5 flex items-center justify-between border-t border-border/50 text-muted-foreground", children: [
|
|
11691
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-[10px] text-muted-foreground/70 font-medium truncate max-w-[120px]", children: file.folderPath || file.section || "General" }),
|
|
11692
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
11623
|
+
) }),
|
|
11624
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "px-1 min-w-0", children: [
|
|
11693
11625
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11694
|
-
"
|
|
11626
|
+
"h3",
|
|
11695
11627
|
{
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
|
|
11699
|
-
onPreview?.(file);
|
|
11700
|
-
},
|
|
11701
|
-
className: "p-1 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
11702
|
-
title: "Preview file",
|
|
11703
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Eye, { className: "h-3.5 w-3.5" })
|
|
11628
|
+
className: "text-sm font-bold text-foreground truncate tracking-tight",
|
|
11629
|
+
title: file.fileName,
|
|
11630
|
+
children: file.fileName
|
|
11704
11631
|
}
|
|
11705
11632
|
),
|
|
11706
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.
|
|
11707
|
-
"
|
|
11633
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "text-xs text-muted-foreground truncate mt-0.5 flex items-center gap-1", children: [
|
|
11634
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: file.folderPath || `Chat/${file.senderEmail || "amanmicropay@gmail.com"}` }),
|
|
11635
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "\xB7" }),
|
|
11636
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: formatTimeAgo(file.updatedAt) })
|
|
11637
|
+
] })
|
|
11638
|
+
] })
|
|
11639
|
+
] }),
|
|
11640
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-1.5 mt-2.5 pt-2 border-t border-border/40 px-1", children: [
|
|
11641
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11642
|
+
Button,
|
|
11643
|
+
{
|
|
11644
|
+
size: "sm",
|
|
11645
|
+
variant: "ghost",
|
|
11646
|
+
onClick: () => onPreview?.(file),
|
|
11647
|
+
className: "h-7 px-2.5 rounded-lg bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 hover:bg-indigo-500/20 text-xs font-semibold gap-1.5 flex-1 justify-center cursor-pointer",
|
|
11648
|
+
children: [
|
|
11649
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Eye, { className: "h-3.5 w-3.5" }),
|
|
11650
|
+
" Preview"
|
|
11651
|
+
]
|
|
11652
|
+
}
|
|
11653
|
+
),
|
|
11654
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11655
|
+
Button,
|
|
11656
|
+
{
|
|
11657
|
+
size: "icon",
|
|
11658
|
+
variant: "ghost",
|
|
11659
|
+
onClick: () => onDownload?.(file),
|
|
11660
|
+
className: "h-7 w-7 rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground cursor-pointer",
|
|
11661
|
+
title: "Download",
|
|
11662
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Download, { className: "h-3.5 w-3.5" })
|
|
11663
|
+
}
|
|
11664
|
+
),
|
|
11665
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenu, { children: [
|
|
11666
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11667
|
+
Button,
|
|
11708
11668
|
{
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
}
|
|
11714
|
-
className: "p-1 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
11715
|
-
title: "Download file",
|
|
11716
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Download, { className: "h-3.5 w-3.5" })
|
|
11669
|
+
size: "icon",
|
|
11670
|
+
variant: "ghost",
|
|
11671
|
+
className: "h-7 w-7 rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground cursor-pointer",
|
|
11672
|
+
title: "More actions",
|
|
11673
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.MoreHorizontal, { className: "h-3.5 w-3.5" })
|
|
11717
11674
|
}
|
|
11718
|
-
),
|
|
11719
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11720
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.
|
|
11721
|
-
"
|
|
11675
|
+
) }),
|
|
11676
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuContent, { align: "end", className: "w-40 rounded-xl p-1 shadow-lg", children: [
|
|
11677
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuItem, { onClick: () => onPreview?.(file), className: "gap-2 text-xs", children: [
|
|
11678
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Eye, { className: "h-3.5 w-3.5" }),
|
|
11679
|
+
" Preview"
|
|
11680
|
+
] }),
|
|
11681
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuItem, { onClick: () => onDownload?.(file), className: "gap-2 text-xs", children: [
|
|
11682
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Download, { className: "h-3.5 w-3.5" }),
|
|
11683
|
+
" Download"
|
|
11684
|
+
] }),
|
|
11685
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuItem, { onClick: () => onCopyLink?.(file), className: "gap-2 text-xs", children: [
|
|
11686
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Copy, { className: "h-3.5 w-3.5" }),
|
|
11687
|
+
" Copy Link"
|
|
11688
|
+
] }),
|
|
11689
|
+
onShare && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuItem, { onClick: () => onShare?.(file), className: "gap-2 text-xs", children: [
|
|
11690
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Share2, { className: "h-3.5 w-3.5" }),
|
|
11691
|
+
" Share"
|
|
11692
|
+
] }),
|
|
11693
|
+
onRename && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuItem, { onClick: () => onRename?.(file), className: "gap-2 text-xs", children: [
|
|
11694
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Edit2, { className: "h-3.5 w-3.5" }),
|
|
11695
|
+
" Rename"
|
|
11696
|
+
] }),
|
|
11697
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DropdownMenuSeparator, {}),
|
|
11698
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11699
|
+
DropdownMenuItem,
|
|
11722
11700
|
{
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11701
|
+
onClick: () => onDelete?.(file),
|
|
11702
|
+
className: "gap-2 text-xs text-destructive focus:text-destructive",
|
|
11703
|
+
children: [
|
|
11704
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Trash2, { className: "h-3.5 w-3.5" }),
|
|
11705
|
+
" Delete"
|
|
11706
|
+
]
|
|
11728
11707
|
}
|
|
11729
|
-
)
|
|
11730
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DropdownMenuContent, { align: "end", className: "w-38 rounded-xl p-1 shadow-lg", children: [
|
|
11731
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11732
|
-
DropdownMenuItem,
|
|
11733
|
-
{
|
|
11734
|
-
onClick: () => onPreview?.(file),
|
|
11735
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5",
|
|
11736
|
-
children: [
|
|
11737
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Eye, { className: "h-3.5 w-3.5 text-blue-500" }),
|
|
11738
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Preview" })
|
|
11739
|
-
]
|
|
11740
|
-
}
|
|
11741
|
-
),
|
|
11742
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11743
|
-
DropdownMenuItem,
|
|
11744
|
-
{
|
|
11745
|
-
onClick: () => onDownload?.(file),
|
|
11746
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5",
|
|
11747
|
-
children: [
|
|
11748
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Download, { className: "h-3.5 w-3.5 text-emerald-500" }),
|
|
11749
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Download" })
|
|
11750
|
-
]
|
|
11751
|
-
}
|
|
11752
|
-
),
|
|
11753
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11754
|
-
DropdownMenuItem,
|
|
11755
|
-
{
|
|
11756
|
-
onClick: () => onCopyLink?.(file),
|
|
11757
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5",
|
|
11758
|
-
children: [
|
|
11759
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Copy, { className: "h-3.5 w-3.5 text-amber-500" }),
|
|
11760
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Copy Link" })
|
|
11761
|
-
]
|
|
11762
|
-
}
|
|
11763
|
-
),
|
|
11764
|
-
onDelete && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
|
|
11765
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DropdownMenuSeparator, {}),
|
|
11766
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
11767
|
-
DropdownMenuItem,
|
|
11768
|
-
{
|
|
11769
|
-
onClick: () => onDelete(file),
|
|
11770
|
-
className: "cursor-pointer text-xs flex items-center gap-2 py-1.5 text-rose-500 hover:text-rose-600 hover:bg-rose-50 dark:hover:bg-rose-950/30 rounded-md",
|
|
11771
|
-
children: [
|
|
11772
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react48.Trash2, { className: "h-3.5 w-3.5 text-rose-500" }),
|
|
11773
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Delete" })
|
|
11774
|
-
]
|
|
11775
|
-
}
|
|
11776
|
-
)
|
|
11777
|
-
] })
|
|
11778
|
-
] })
|
|
11708
|
+
)
|
|
11779
11709
|
] })
|
|
11780
11710
|
] })
|
|
11781
11711
|
] })
|
|
@@ -12020,286 +11950,62 @@ function StorageStatCard({
|
|
|
12020
11950
|
}
|
|
12021
11951
|
|
|
12022
11952
|
// src/design-system/components/files/user-file-cards-view.tsx
|
|
12023
|
-
var
|
|
12024
|
-
var import_lucide_react52 = require("lucide-react");
|
|
12025
|
-
|
|
12026
|
-
// src/features/Message/components/chat/header-actions.tsx
|
|
11953
|
+
var import_react17 = require("react");
|
|
12027
11954
|
var import_lucide_react51 = require("lucide-react");
|
|
12028
|
-
var import_sonner3 = require("sonner");
|
|
12029
11955
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
12030
|
-
function
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
onClose
|
|
11956
|
+
function UserFileCardsView({
|
|
11957
|
+
folder,
|
|
11958
|
+
files,
|
|
11959
|
+
selectedFileId,
|
|
11960
|
+
onSelectFileForPreview,
|
|
11961
|
+
onDownloadFile,
|
|
11962
|
+
onDeleteFile,
|
|
11963
|
+
onCopyLink,
|
|
11964
|
+
onRenameFile,
|
|
11965
|
+
onShareFile,
|
|
11966
|
+
onUploadClick,
|
|
11967
|
+
onBack,
|
|
11968
|
+
onClose,
|
|
11969
|
+
className
|
|
12043
11970
|
}) {
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
)
|
|
12058
|
-
|
|
12059
|
-
|
|
12060
|
-
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
}
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
"button",
|
|
12071
|
-
{
|
|
12072
|
-
type: "button",
|
|
12073
|
-
className: "p-1.5 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
12074
|
-
title: "More options",
|
|
12075
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.MoreVertical, { className: "h-4.5 w-4.5" })
|
|
12076
|
-
}
|
|
12077
|
-
) }),
|
|
12078
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
12079
|
-
DropdownMenuContent,
|
|
12080
|
-
{
|
|
12081
|
-
align: "end",
|
|
12082
|
-
className: "w-48 border border-border/80 bg-background shadow-lg p-1 space-y-0.5",
|
|
12083
|
-
children: [
|
|
12084
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12085
|
-
DropdownMenuItem,
|
|
12086
|
-
{
|
|
12087
|
-
onClick: () => {
|
|
12088
|
-
if (onReply) onReply();
|
|
12089
|
-
else import_sonner3.toast.info("Reply option selected");
|
|
12090
|
-
},
|
|
12091
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-muted/80 rounded-md",
|
|
12092
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12093
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Reply, { className: "h-4 w-4 text-blue-500" }),
|
|
12094
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-foreground", children: "Reply" })
|
|
12095
|
-
] })
|
|
12096
|
-
}
|
|
12097
|
-
),
|
|
12098
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12099
|
-
DropdownMenuItem,
|
|
12100
|
-
{
|
|
12101
|
-
onClick: () => {
|
|
12102
|
-
if (onForward) onForward();
|
|
12103
|
-
else import_sonner3.toast.info("Forward option selected");
|
|
12104
|
-
},
|
|
12105
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-muted/80 rounded-md",
|
|
12106
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12107
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Forward, { className: "h-4 w-4 text-sky-400" }),
|
|
12108
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-foreground", children: "Forward" })
|
|
12109
|
-
] })
|
|
12110
|
-
}
|
|
12111
|
-
),
|
|
12112
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12113
|
-
DropdownMenuItem,
|
|
12114
|
-
{
|
|
12115
|
-
onClick: () => {
|
|
12116
|
-
if (onPin) onPin();
|
|
12117
|
-
else import_sonner3.toast.success("Message pinned");
|
|
12118
|
-
},
|
|
12119
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-muted/80 rounded-md",
|
|
12120
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12121
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Pin, { className: "h-4 w-4 text-purple-500" }),
|
|
12122
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-foreground", children: "Pin Message" })
|
|
12123
|
-
] })
|
|
12124
|
-
}
|
|
12125
|
-
),
|
|
12126
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12127
|
-
DropdownMenuItem,
|
|
12128
|
-
{
|
|
12129
|
-
onClick: () => {
|
|
12130
|
-
if (onStar) onStar();
|
|
12131
|
-
else import_sonner3.toast.success("Starred successfully");
|
|
12132
|
-
},
|
|
12133
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-muted/80 rounded-md",
|
|
12134
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12135
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Star, { className: "h-4 w-4 text-amber-500" }),
|
|
12136
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-foreground", children: "Star" })
|
|
12137
|
-
] })
|
|
12138
|
-
}
|
|
12139
|
-
),
|
|
12140
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12141
|
-
DropdownMenuItem,
|
|
12142
|
-
{
|
|
12143
|
-
onClick: () => {
|
|
12144
|
-
if (onFavorite) onFavorite();
|
|
12145
|
-
else import_sonner3.toast.success("Added to favorites");
|
|
12146
|
-
},
|
|
12147
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-muted/80 rounded-md",
|
|
12148
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12149
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Heart, { className: "h-4 w-4 text-rose-500" }),
|
|
12150
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-foreground", children: "Favorite" })
|
|
12151
|
-
] })
|
|
12152
|
-
}
|
|
12153
|
-
),
|
|
12154
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12155
|
-
DropdownMenuItem,
|
|
12156
|
-
{
|
|
12157
|
-
onClick: () => import_sonner3.toast.success("Flagged message"),
|
|
12158
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-muted/80 rounded-md",
|
|
12159
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12160
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Flag, { className: "h-4 w-4 text-red-500" }),
|
|
12161
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-foreground", children: "Flag" })
|
|
12162
|
-
] })
|
|
12163
|
-
}
|
|
12164
|
-
),
|
|
12165
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12166
|
-
DropdownMenuItem,
|
|
12167
|
-
{
|
|
12168
|
-
onClick: () => {
|
|
12169
|
-
if (onArchive) onArchive();
|
|
12170
|
-
else import_sonner3.toast.success("Archived successfully");
|
|
12171
|
-
},
|
|
12172
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-muted/80 rounded-md",
|
|
12173
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12174
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Archive, { className: "h-4 w-4 text-indigo-500" }),
|
|
12175
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-foreground", children: "Archive" })
|
|
12176
|
-
] })
|
|
12177
|
-
}
|
|
12178
|
-
),
|
|
12179
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12180
|
-
DropdownMenuItem,
|
|
12181
|
-
{
|
|
12182
|
-
onClick: () => {
|
|
12183
|
-
if (onActionThis) onActionThis();
|
|
12184
|
-
else import_sonner3.toast.info("Action This selected");
|
|
12185
|
-
},
|
|
12186
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-muted/80 rounded-md",
|
|
12187
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12188
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Bell, { className: "h-4 w-4 text-amber-500" }),
|
|
12189
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-foreground", children: "Action This" })
|
|
12190
|
-
] })
|
|
12191
|
-
}
|
|
12192
|
-
),
|
|
12193
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12194
|
-
DropdownMenuItem,
|
|
12195
|
-
{
|
|
12196
|
-
onClick: () => {
|
|
12197
|
-
if (onDelete) onDelete();
|
|
12198
|
-
else import_sonner3.toast.success("Item deleted");
|
|
12199
|
-
},
|
|
12200
|
-
className: "cursor-pointer text-xs flex items-center justify-between py-2 px-2.5 font-medium hover:bg-red-500/10 rounded-md text-red-500 focus:text-red-500",
|
|
12201
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
12202
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Trash2, { className: "h-4 w-4 text-red-500" }),
|
|
12203
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "font-semibold text-red-500", children: "Delete" })
|
|
12204
|
-
] })
|
|
12205
|
-
}
|
|
12206
|
-
)
|
|
12207
|
-
]
|
|
12208
|
-
}
|
|
12209
|
-
)
|
|
12210
|
-
] }),
|
|
12211
|
-
onClose && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12212
|
-
"button",
|
|
12213
|
-
{
|
|
12214
|
-
type: "button",
|
|
12215
|
-
onClick: onClose,
|
|
12216
|
-
className: "p-1.5 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer ml-0.5",
|
|
12217
|
-
title: "Close",
|
|
12218
|
-
"aria-label": "Close",
|
|
12219
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.X, { className: "h-4.5 w-4.5" })
|
|
12220
|
-
}
|
|
12221
|
-
)
|
|
12222
|
-
] });
|
|
12223
|
-
}
|
|
12224
|
-
|
|
12225
|
-
// src/design-system/components/files/user-file-cards-view.tsx
|
|
12226
|
-
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
12227
|
-
var CATEGORY_TABS = [
|
|
12228
|
-
{ label: "All Files", value: "all" },
|
|
12229
|
-
{ label: "PDFs", value: "Pdf" },
|
|
12230
|
-
{ label: "Documents", value: "Doc" },
|
|
12231
|
-
{ label: "Spreadsheets", value: "Xls" },
|
|
12232
|
-
{ label: "Images", value: "Images" },
|
|
12233
|
-
{ label: "Videos", value: "Videos" },
|
|
12234
|
-
{ label: "Archives", value: "Zip" }
|
|
12235
|
-
];
|
|
12236
|
-
function UserFileCardsView({
|
|
12237
|
-
folder,
|
|
12238
|
-
files,
|
|
12239
|
-
selectedFileId,
|
|
12240
|
-
onSelectFileForPreview,
|
|
12241
|
-
onDownloadFile,
|
|
12242
|
-
onDeleteFile,
|
|
12243
|
-
onCopyLink,
|
|
12244
|
-
onRenameFile,
|
|
12245
|
-
onShareFile,
|
|
12246
|
-
onUploadClick,
|
|
12247
|
-
onBack,
|
|
12248
|
-
className
|
|
12249
|
-
}) {
|
|
12250
|
-
const [searchQuery, setSearchQuery] = (0, import_react18.useState)("");
|
|
12251
|
-
const [selectedCategory, setSelectedCategory] = (0, import_react18.useState)("all");
|
|
12252
|
-
const [sortBy, setSortBy] = (0, import_react18.useState)("date");
|
|
12253
|
-
const [sortOrder, setSortOrder] = (0, import_react18.useState)("desc");
|
|
12254
|
-
const [viewMode, setViewMode] = (0, import_react18.useState)("grid");
|
|
12255
|
-
const [currentPage, setCurrentPage] = (0, import_react18.useState)(1);
|
|
12256
|
-
const itemsPerPage = viewMode === "grid" ? 12 : 20;
|
|
12257
|
-
const [selectedIds, setSelectedIds] = (0, import_react18.useState)(/* @__PURE__ */ new Set());
|
|
12258
|
-
const filteredFiles = (0, import_react18.useMemo)(() => {
|
|
12259
|
-
return files.filter((f) => {
|
|
12260
|
-
const matchCategory = selectedCategory === "all" || f.category.toLowerCase() === selectedCategory.toLowerCase() || selectedCategory === "Xls" && (f.category === "Csv" || f.category === "Xls");
|
|
12261
|
-
const matchSearch = !searchQuery.trim() || f.fileName.toLowerCase().includes(searchQuery.toLowerCase()) || f.folderPath && f.folderPath.toLowerCase().includes(searchQuery.toLowerCase());
|
|
12262
|
-
return matchCategory && matchSearch;
|
|
12263
|
-
});
|
|
12264
|
-
}, [files, selectedCategory, searchQuery]);
|
|
12265
|
-
const sortedFiles = (0, import_react18.useMemo)(() => {
|
|
12266
|
-
return [...filteredFiles].sort((a, b) => {
|
|
12267
|
-
let compare = 0;
|
|
12268
|
-
if (sortBy === "date") {
|
|
12269
|
-
const timeA = a.updatedAt ? new Date(a.updatedAt).getTime() : 0;
|
|
12270
|
-
const timeB = b.updatedAt ? new Date(b.updatedAt).getTime() : 0;
|
|
12271
|
-
compare = timeB - timeA;
|
|
12272
|
-
} else if (sortBy === "name") {
|
|
12273
|
-
compare = a.fileName.localeCompare(b.fileName);
|
|
12274
|
-
} else if (sortBy === "size") {
|
|
12275
|
-
compare = (b.fileSize || 0) - (a.fileSize || 0);
|
|
11971
|
+
const [searchQuery, setSearchQuery] = (0, import_react17.useState)("");
|
|
11972
|
+
const [selectedCategory, setSelectedCategory] = (0, import_react17.useState)("all");
|
|
11973
|
+
const [sortBy, setSortBy] = (0, import_react17.useState)("date");
|
|
11974
|
+
const [sortOrder, setSortOrder] = (0, import_react17.useState)("desc");
|
|
11975
|
+
const [viewMode, setViewMode] = (0, import_react17.useState)("grid");
|
|
11976
|
+
const [currentPage, setCurrentPage] = (0, import_react17.useState)(1);
|
|
11977
|
+
const itemsPerPage = viewMode === "grid" ? 12 : 20;
|
|
11978
|
+
const [selectedIds, setSelectedIds] = (0, import_react17.useState)(/* @__PURE__ */ new Set());
|
|
11979
|
+
const filteredFiles = (0, import_react17.useMemo)(() => {
|
|
11980
|
+
return files.filter((f) => {
|
|
11981
|
+
const matchCategory = selectedCategory === "all" || f.category.toLowerCase() === selectedCategory.toLowerCase() || selectedCategory === "Xls" && (f.category === "Csv" || f.category === "Xls");
|
|
11982
|
+
const matchSearch = !searchQuery.trim() || f.fileName.toLowerCase().includes(searchQuery.toLowerCase()) || f.folderPath && f.folderPath.toLowerCase().includes(searchQuery.toLowerCase());
|
|
11983
|
+
return matchCategory && matchSearch;
|
|
11984
|
+
});
|
|
11985
|
+
}, [files, selectedCategory, searchQuery]);
|
|
11986
|
+
const sortedFiles = (0, import_react17.useMemo)(() => {
|
|
11987
|
+
return [...filteredFiles].sort((a, b) => {
|
|
11988
|
+
let compare = 0;
|
|
11989
|
+
if (sortBy === "date") {
|
|
11990
|
+
const timeA = a.updatedAt ? new Date(a.updatedAt).getTime() : 0;
|
|
11991
|
+
const timeB = b.updatedAt ? new Date(b.updatedAt).getTime() : 0;
|
|
11992
|
+
compare = timeB - timeA;
|
|
11993
|
+
} else if (sortBy === "name") {
|
|
11994
|
+
compare = a.fileName.localeCompare(b.fileName);
|
|
11995
|
+
} else if (sortBy === "size") {
|
|
11996
|
+
compare = (b.fileSize || 0) - (a.fileSize || 0);
|
|
12276
11997
|
}
|
|
12277
11998
|
return sortOrder === "asc" ? -compare : compare;
|
|
12278
11999
|
});
|
|
12279
12000
|
}, [filteredFiles, sortBy, sortOrder]);
|
|
12280
12001
|
const totalPages = Math.ceil(sortedFiles.length / itemsPerPage) || 1;
|
|
12281
|
-
const paginatedFiles = (0,
|
|
12002
|
+
const paginatedFiles = (0, import_react17.useMemo)(() => {
|
|
12282
12003
|
const start = (currentPage - 1) * itemsPerPage;
|
|
12283
12004
|
return sortedFiles.slice(start, start + itemsPerPage);
|
|
12284
12005
|
}, [sortedFiles, currentPage, itemsPerPage]);
|
|
12285
|
-
const totalBytes = (0,
|
|
12006
|
+
const totalBytes = (0, import_react17.useMemo)(() => {
|
|
12286
12007
|
return files.reduce((acc, curr) => acc + (curr.fileSize || 0), 0);
|
|
12287
12008
|
}, [files]);
|
|
12288
|
-
const toggleSelectAll = () => {
|
|
12289
|
-
if (selectedIds.size === paginatedFiles.length) {
|
|
12290
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
12291
|
-
} else {
|
|
12292
|
-
setSelectedIds(new Set(paginatedFiles.map((f) => f.id)));
|
|
12293
|
-
}
|
|
12294
|
-
};
|
|
12295
|
-
const toggleSelectOne = (id) => {
|
|
12296
|
-
setSelectedIds((prev) => {
|
|
12297
|
-
const next = new Set(prev);
|
|
12298
|
-
if (next.has(id)) next.delete(id);
|
|
12299
|
-
else next.add(id);
|
|
12300
|
-
return next;
|
|
12301
|
-
});
|
|
12302
|
-
};
|
|
12303
12009
|
const handleBulkDownload = () => {
|
|
12304
12010
|
const toDownload = files.filter((f) => selectedIds.has(f.id));
|
|
12305
12011
|
toDownload.forEach((f) => onDownloadFile?.(f));
|
|
@@ -12309,7 +12015,9 @@ function UserFileCardsView({
|
|
|
12309
12015
|
toDelete.forEach((f) => onDeleteFile?.(f));
|
|
12310
12016
|
setSelectedIds(/* @__PURE__ */ new Set());
|
|
12311
12017
|
};
|
|
12312
|
-
|
|
12018
|
+
const folderDisplayName = folder?.name || "Images";
|
|
12019
|
+
const folderDisplayPath = folder?.path || "Chat/amanmicropay@gmail.com/Images";
|
|
12020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
12313
12021
|
"div",
|
|
12314
12022
|
{
|
|
12315
12023
|
className: cn(
|
|
@@ -12317,320 +12025,297 @@ function UserFileCardsView({
|
|
|
12317
12025
|
className
|
|
12318
12026
|
),
|
|
12319
12027
|
children: [
|
|
12320
|
-
/* @__PURE__ */ (0,
|
|
12321
|
-
/* @__PURE__ */ (0,
|
|
12322
|
-
onBack && /* @__PURE__ */ (0,
|
|
12028
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center justify-between border-b border-border bg-background px-4 py-3 shrink-0", children: [
|
|
12029
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
12030
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12323
12031
|
"button",
|
|
12324
12032
|
{
|
|
12325
12033
|
type: "button",
|
|
12326
12034
|
onClick: onBack,
|
|
12327
12035
|
className: "flex h-8 w-8 items-center justify-center rounded-xl text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer",
|
|
12328
12036
|
title: "Back",
|
|
12329
|
-
children: /* @__PURE__ */ (0,
|
|
12037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.ArrowLeft, { className: "h-4 w-4" })
|
|
12330
12038
|
}
|
|
12331
12039
|
),
|
|
12332
|
-
/* @__PURE__ */ (0,
|
|
12333
|
-
/* @__PURE__ */ (0,
|
|
12334
|
-
/* @__PURE__ */ (0,
|
|
12335
|
-
/* @__PURE__ */ (0,
|
|
12336
|
-
/* @__PURE__ */ (0,
|
|
12040
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex h-10 w-10 items-center justify-center rounded-xl bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 border border-indigo-200/50 dark:border-indigo-900/40 shrink-0 shadow-2xs", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.FolderOpen, { className: "h-5 w-5" }) }),
|
|
12041
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "min-w-0", children: [
|
|
12042
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12043
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("h2", { className: "truncate text-base font-bold text-foreground tracking-tight", children: folderDisplayName }),
|
|
12044
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "px-2 py-0.5 rounded-full bg-muted text-xs font-normal text-muted-foreground shrink-0", children: [
|
|
12337
12045
|
filteredFiles.length,
|
|
12338
12046
|
" files"
|
|
12339
12047
|
] })
|
|
12340
12048
|
] }),
|
|
12341
|
-
/* @__PURE__ */ (0,
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
formatBytes(totalBytes)
|
|
12049
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("p", { className: "truncate text-xs text-muted-foreground mt-0.5", children: [
|
|
12050
|
+
"Storage folder: ",
|
|
12051
|
+
folderDisplayPath
|
|
12345
12052
|
] })
|
|
12346
12053
|
] })
|
|
12347
12054
|
] }),
|
|
12348
|
-
/* @__PURE__ */ (0,
|
|
12349
|
-
|
|
12350
|
-
|
|
12055
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
12056
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12057
|
+
"button",
|
|
12351
12058
|
{
|
|
12352
|
-
|
|
12353
|
-
|
|
12354
|
-
|
|
12355
|
-
children:
|
|
12356
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Upload, { className: "h-3.5 w-3.5" }),
|
|
12357
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "hidden sm:inline", children: "Upload Files" })
|
|
12358
|
-
]
|
|
12059
|
+
type: "button",
|
|
12060
|
+
className: "p-2 rounded-lg text-amber-500 hover:bg-muted transition-colors cursor-pointer",
|
|
12061
|
+
title: "Notifications",
|
|
12062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Bell, { className: "h-4 w-4" })
|
|
12359
12063
|
}
|
|
12360
12064
|
),
|
|
12361
|
-
/* @__PURE__ */ (0,
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
onChange: (e) => {
|
|
12373
|
-
setSearchQuery(e.target.value);
|
|
12374
|
-
setCurrentPage(1);
|
|
12375
|
-
},
|
|
12376
|
-
placeholder: "Search files by name, type, or path...",
|
|
12377
|
-
className: "h-8.5 pl-8 pr-8 text-xs rounded-xl bg-background border-border/80"
|
|
12378
|
-
}
|
|
12379
|
-
),
|
|
12380
|
-
searchQuery && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12065
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12066
|
+
"button",
|
|
12067
|
+
{
|
|
12068
|
+
type: "button",
|
|
12069
|
+
className: "p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
|
|
12070
|
+
title: "Flag / Report",
|
|
12071
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Flag, { className: "h-4 w-4" })
|
|
12072
|
+
}
|
|
12073
|
+
),
|
|
12074
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(DropdownMenu, { children: [
|
|
12075
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12381
12076
|
"button",
|
|
12382
12077
|
{
|
|
12383
12078
|
type: "button",
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
children: /* @__PURE__ */ (0,
|
|
12079
|
+
className: "p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
|
|
12080
|
+
title: "Options",
|
|
12081
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.MoreVertical, { className: "h-4 w-4" })
|
|
12387
12082
|
}
|
|
12388
|
-
)
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
|
|
12399
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(DropdownMenuContent, { align: "end", className: "w-44 rounded-xl p-1 shadow-lg", children: [
|
|
12400
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DropdownMenuLabel, { className: "text-[10px] text-muted-foreground uppercase font-bold tracking-wider", children: "Sort By" }),
|
|
12401
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12402
|
-
DropdownMenuItem,
|
|
12403
|
-
{
|
|
12404
|
-
onClick: () => setSortBy("date"),
|
|
12405
|
-
className: cn("text-xs cursor-pointer", sortBy === "date" && "font-bold text-primary"),
|
|
12406
|
-
children: "Last Updated"
|
|
12407
|
-
}
|
|
12408
|
-
),
|
|
12409
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12410
|
-
DropdownMenuItem,
|
|
12411
|
-
{
|
|
12412
|
-
onClick: () => setSortBy("name"),
|
|
12413
|
-
className: cn("text-xs cursor-pointer", sortBy === "name" && "font-bold text-primary"),
|
|
12414
|
-
children: "File Name (A-Z)"
|
|
12415
|
-
}
|
|
12416
|
-
),
|
|
12417
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12418
|
-
DropdownMenuItem,
|
|
12419
|
-
{
|
|
12420
|
-
onClick: () => setSortBy("size"),
|
|
12421
|
-
className: cn("text-xs cursor-pointer", sortBy === "size" && "font-bold text-primary"),
|
|
12422
|
-
children: "File Size"
|
|
12423
|
-
}
|
|
12424
|
-
),
|
|
12425
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DropdownMenuSeparator, {}),
|
|
12426
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
12427
|
-
DropdownMenuItem,
|
|
12428
|
-
{
|
|
12429
|
-
onClick: () => setSortOrder((prev) => prev === "asc" ? "desc" : "asc"),
|
|
12430
|
-
className: "text-xs cursor-pointer",
|
|
12431
|
-
children: [
|
|
12432
|
-
"Order: ",
|
|
12433
|
-
sortOrder === "asc" ? "Ascending \u2191" : "Descending \u2193"
|
|
12434
|
-
]
|
|
12435
|
-
}
|
|
12436
|
-
)
|
|
12083
|
+
) }),
|
|
12084
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(DropdownMenuContent, { align: "end", className: "w-44 rounded-xl p-1 shadow-lg", children: [
|
|
12085
|
+
onUploadClick && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(DropdownMenuItem, { onClick: onUploadClick, className: "gap-2 text-xs", children: [
|
|
12086
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Upload, { className: "h-3.5 w-3.5" }),
|
|
12087
|
+
" Upload Files"
|
|
12088
|
+
] }),
|
|
12089
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(DropdownMenuItem, { onClick: () => setViewMode(viewMode === "grid" ? "table" : "grid"), className: "gap-2 text-xs", children: [
|
|
12090
|
+
viewMode === "grid" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.List, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.LayoutGrid, { className: "h-3.5 w-3.5" }),
|
|
12091
|
+
"Switch to ",
|
|
12092
|
+
viewMode === "grid" ? "Table" : "Card",
|
|
12093
|
+
" View"
|
|
12437
12094
|
] })
|
|
12438
|
-
] }),
|
|
12439
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center rounded-xl bg-muted/50 p-0.5 border border-border/60", children: [
|
|
12440
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12441
|
-
"button",
|
|
12442
|
-
{
|
|
12443
|
-
type: "button",
|
|
12444
|
-
onClick: () => setViewMode("grid"),
|
|
12445
|
-
className: cn(
|
|
12446
|
-
"flex h-7 w-7 items-center justify-center rounded-lg transition-all cursor-pointer",
|
|
12447
|
-
viewMode === "grid" ? "bg-background text-foreground shadow-2xs font-bold" : "text-muted-foreground hover:text-foreground"
|
|
12448
|
-
),
|
|
12449
|
-
title: "Grid View",
|
|
12450
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.LayoutGrid, { className: "h-3.5 w-3.5" })
|
|
12451
|
-
}
|
|
12452
|
-
),
|
|
12453
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12454
|
-
"button",
|
|
12455
|
-
{
|
|
12456
|
-
type: "button",
|
|
12457
|
-
onClick: () => setViewMode("table"),
|
|
12458
|
-
className: cn(
|
|
12459
|
-
"flex h-7 w-7 items-center justify-center rounded-lg transition-all cursor-pointer",
|
|
12460
|
-
viewMode === "table" ? "bg-background text-foreground shadow-2xs font-bold" : "text-muted-foreground hover:text-foreground"
|
|
12461
|
-
),
|
|
12462
|
-
title: "Table View",
|
|
12463
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Table, { className: "h-3.5 w-3.5" })
|
|
12464
|
-
}
|
|
12465
|
-
)
|
|
12466
12095
|
] })
|
|
12467
|
-
] })
|
|
12468
|
-
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
}
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
selectedCategory === tab.value ? "bg-indigo-600 text-white border-indigo-600 shadow-2xs" : "bg-background border-border/80 text-muted-foreground hover:text-foreground hover:bg-muted/40"
|
|
12480
|
-
),
|
|
12481
|
-
children: tab.label
|
|
12482
|
-
},
|
|
12483
|
-
tab.value
|
|
12484
|
-
)) })
|
|
12096
|
+
] }),
|
|
12097
|
+
(onClose || onBack) && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12098
|
+
"button",
|
|
12099
|
+
{
|
|
12100
|
+
type: "button",
|
|
12101
|
+
onClick: onClose || onBack,
|
|
12102
|
+
className: "p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
|
|
12103
|
+
title: "Close",
|
|
12104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.X, { className: "h-4 w-4" })
|
|
12105
|
+
}
|
|
12106
|
+
)
|
|
12107
|
+
] })
|
|
12485
12108
|
] }),
|
|
12486
|
-
|
|
12487
|
-
/* @__PURE__ */ (0,
|
|
12488
|
-
|
|
12489
|
-
" files selected"
|
|
12490
|
-
] }),
|
|
12491
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12492
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
12109
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-2 px-4 pt-3 pb-2 shrink-0", children: [
|
|
12110
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2 overflow-x-auto py-0.5", children: [
|
|
12111
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
12493
12112
|
Button,
|
|
12494
12113
|
{
|
|
12495
|
-
size: "sm",
|
|
12496
12114
|
variant: "outline",
|
|
12497
|
-
|
|
12498
|
-
className: "h-
|
|
12115
|
+
size: "sm",
|
|
12116
|
+
className: "h-8 gap-1.5 text-xs font-bold text-muted-foreground rounded-xl border-border px-3 shrink-0",
|
|
12499
12117
|
children: [
|
|
12500
|
-
/* @__PURE__ */ (0,
|
|
12501
|
-
|
|
12118
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.ArrowLeftRight, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
12119
|
+
"LTR"
|
|
12502
12120
|
]
|
|
12503
12121
|
}
|
|
12504
12122
|
),
|
|
12505
|
-
|
|
12123
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
12506
12124
|
Button,
|
|
12507
12125
|
{
|
|
12126
|
+
variant: "outline",
|
|
12508
12127
|
size: "sm",
|
|
12509
|
-
|
|
12510
|
-
onClick: handleBulkDelete,
|
|
12511
|
-
className: "h-7 text-xs gap-1",
|
|
12128
|
+
className: "h-8 gap-1.5 text-xs font-bold text-muted-foreground rounded-xl border-border px-3 shrink-0",
|
|
12512
12129
|
children: [
|
|
12513
|
-
/* @__PURE__ */ (0,
|
|
12514
|
-
|
|
12130
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Filter, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
12131
|
+
"FILTER"
|
|
12515
12132
|
]
|
|
12516
12133
|
}
|
|
12517
12134
|
),
|
|
12518
|
-
/* @__PURE__ */ (0,
|
|
12135
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(DropdownMenu, { children: [
|
|
12136
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
12137
|
+
Button,
|
|
12138
|
+
{
|
|
12139
|
+
variant: "outline",
|
|
12140
|
+
size: "sm",
|
|
12141
|
+
className: "h-8 gap-1.5 text-xs font-bold text-muted-foreground rounded-xl border-border px-3 shrink-0",
|
|
12142
|
+
children: [
|
|
12143
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.ArrowUpDown, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
12144
|
+
"SORT"
|
|
12145
|
+
]
|
|
12146
|
+
}
|
|
12147
|
+
) }),
|
|
12148
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(DropdownMenuContent, { align: "start", className: "w-40 rounded-xl p-1 shadow-lg", children: [
|
|
12149
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(DropdownMenuItem, { onClick: () => setSortBy("date"), className: "text-xs", children: "Date Modified" }),
|
|
12150
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(DropdownMenuItem, { onClick: () => setSortBy("name"), className: "text-xs", children: "File Name" }),
|
|
12151
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(DropdownMenuItem, { onClick: () => setSortBy("size"), className: "text-xs", children: "File Size" })
|
|
12152
|
+
] })
|
|
12153
|
+
] }),
|
|
12154
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
12519
12155
|
Button,
|
|
12520
12156
|
{
|
|
12157
|
+
variant: "outline",
|
|
12521
12158
|
size: "sm",
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12159
|
+
className: "h-8 gap-1.5 text-xs font-bold text-muted-foreground rounded-xl border-border px-3 shrink-0",
|
|
12160
|
+
children: [
|
|
12161
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.SlidersHorizontal, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
12162
|
+
"SHORT"
|
|
12163
|
+
]
|
|
12526
12164
|
}
|
|
12527
12165
|
)
|
|
12528
|
-
] })
|
|
12166
|
+
] }),
|
|
12167
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12168
|
+
Button,
|
|
12169
|
+
{
|
|
12170
|
+
onClick: () => setViewMode(viewMode === "grid" ? "table" : "grid"),
|
|
12171
|
+
size: "sm",
|
|
12172
|
+
className: "h-8 gap-1.5 text-xs font-bold rounded-xl bg-indigo-600 hover:bg-indigo-700 text-white shadow-xs px-3.5 shrink-0 cursor-pointer",
|
|
12173
|
+
children: viewMode === "grid" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
12174
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.LayoutGrid, { className: "h-3.5 w-3.5" }),
|
|
12175
|
+
"VIEW: CARD"
|
|
12176
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
12177
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.List, { className: "h-3.5 w-3.5" }),
|
|
12178
|
+
"VIEW: TABLE"
|
|
12179
|
+
] })
|
|
12180
|
+
}
|
|
12181
|
+
)
|
|
12529
12182
|
] }),
|
|
12530
|
-
/* @__PURE__ */ (0,
|
|
12531
|
-
/* @__PURE__ */ (0,
|
|
12532
|
-
/* @__PURE__ */ (0,
|
|
12533
|
-
|
|
12534
|
-
|
|
12183
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "px-4 pb-2 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "relative w-full", children: [
|
|
12184
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Search, { className: "absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
12185
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12186
|
+
Input,
|
|
12187
|
+
{
|
|
12188
|
+
value: searchQuery,
|
|
12189
|
+
onChange: (e) => {
|
|
12190
|
+
setSearchQuery(e.target.value);
|
|
12191
|
+
setCurrentPage(1);
|
|
12192
|
+
},
|
|
12193
|
+
placeholder: "Search files by name, format, or sender...",
|
|
12194
|
+
className: "h-10 pl-10 pr-9 text-sm rounded-xl bg-background border-border/80 focus-visible:ring-1 focus-visible:ring-indigo-500"
|
|
12195
|
+
}
|
|
12196
|
+
),
|
|
12197
|
+
searchQuery && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12198
|
+
"button",
|
|
12199
|
+
{
|
|
12200
|
+
type: "button",
|
|
12201
|
+
onClick: () => setSearchQuery(""),
|
|
12202
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
|
|
12203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.X, { className: "h-4 w-4" })
|
|
12204
|
+
}
|
|
12205
|
+
)
|
|
12206
|
+
] }) }),
|
|
12207
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center justify-between px-4 py-2 text-xs text-muted-foreground font-medium shrink-0", children: [
|
|
12208
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { children: [
|
|
12209
|
+
filteredFiles.length,
|
|
12210
|
+
" files"
|
|
12535
12211
|
] }),
|
|
12536
|
-
|
|
12537
|
-
/* @__PURE__ */ (0,
|
|
12538
|
-
|
|
12212
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12213
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: sortedFiles.length === 0 ? "0 of 0" : `${(currentPage - 1) * itemsPerPage + 1}\u2013${Math.min(
|
|
12214
|
+
currentPage * itemsPerPage,
|
|
12215
|
+
sortedFiles.length
|
|
12216
|
+
)} of ${sortedFiles.length}` }),
|
|
12217
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-0.5", children: [
|
|
12218
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12219
|
+
Button,
|
|
12220
|
+
{
|
|
12221
|
+
variant: "ghost",
|
|
12222
|
+
size: "icon",
|
|
12223
|
+
disabled: currentPage <= 1,
|
|
12224
|
+
onClick: () => setCurrentPage((p) => Math.max(1, p - 1)),
|
|
12225
|
+
className: "h-6 w-6 rounded-md text-muted-foreground hover:text-foreground",
|
|
12226
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.ChevronLeft, { className: "h-3.5 w-3.5" })
|
|
12227
|
+
}
|
|
12228
|
+
),
|
|
12229
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12230
|
+
Button,
|
|
12231
|
+
{
|
|
12232
|
+
variant: "ghost",
|
|
12233
|
+
size: "icon",
|
|
12234
|
+
disabled: currentPage >= totalPages,
|
|
12235
|
+
onClick: () => setCurrentPage((p) => Math.min(totalPages, p + 1)),
|
|
12236
|
+
className: "h-6 w-6 rounded-md text-muted-foreground hover:text-foreground",
|
|
12237
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.ChevronRight, { className: "h-3.5 w-3.5" })
|
|
12238
|
+
}
|
|
12239
|
+
)
|
|
12240
|
+
] })
|
|
12539
12241
|
] })
|
|
12540
|
-
] })
|
|
12541
|
-
|
|
12542
|
-
{
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
/* @__PURE__ */ (0,
|
|
12560
|
-
/* @__PURE__ */ (0,
|
|
12561
|
-
/* @__PURE__ */ (0,
|
|
12242
|
+
] }),
|
|
12243
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto p-4", children: paginatedFiles.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col items-center justify-center h-64 text-center p-6 rounded-2xl border border-dashed border-border/80 bg-muted/5", children: [
|
|
12244
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex h-12 w-12 items-center justify-center rounded-2xl bg-indigo-500/10 text-indigo-600 mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.FolderOpen, { className: "h-6 w-6" }) }),
|
|
12245
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("h3", { className: "text-sm font-bold text-foreground", children: "No files found" }),
|
|
12246
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "text-xs text-muted-foreground max-w-xs mt-1", children: searchQuery ? `No files match your query "${searchQuery}" in this folder.` : "This folder is currently empty. Upload documents or media to get started." }),
|
|
12247
|
+
onUploadClick && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
12248
|
+
Button,
|
|
12249
|
+
{
|
|
12250
|
+
size: "sm",
|
|
12251
|
+
onClick: onUploadClick,
|
|
12252
|
+
className: "mt-4 gap-1.5 text-xs font-semibold bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl shadow-xs",
|
|
12253
|
+
children: [
|
|
12254
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react51.Upload, { className: "h-3.5 w-3.5" }),
|
|
12255
|
+
"Upload First File"
|
|
12256
|
+
]
|
|
12257
|
+
}
|
|
12258
|
+
)
|
|
12259
|
+
] }) : viewMode === "table" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "overflow-x-auto rounded-2xl border border-border/80 bg-card shadow-2xs", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("table", { className: "w-full text-left text-xs border-collapse", children: [
|
|
12260
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("tr", { className: "border-b border-border/60 bg-muted/20 text-muted-foreground font-semibold", children: [
|
|
12261
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("th", { className: "py-2.5 px-3", children: "File Name" }),
|
|
12262
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("th", { className: "py-2.5 px-3", children: "Storage Space" }),
|
|
12263
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("th", { className: "py-2.5 px-3", children: "Size" }),
|
|
12264
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("th", { className: "py-2.5 px-3", children: "Updated" }),
|
|
12265
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("th", { className: "py-2.5 px-3 text-right", children: "Actions" })
|
|
12562
12266
|
] }) }),
|
|
12563
|
-
/* @__PURE__ */ (0,
|
|
12267
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tbody", { children: paginatedFiles.map((file) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12564
12268
|
FileCardItem,
|
|
12565
12269
|
{
|
|
12566
12270
|
file,
|
|
12567
|
-
isSelected: file.id === selectedFileId || selectedIds.has(file.id),
|
|
12568
12271
|
viewMode: "table",
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12272
|
+
isSelected: selectedIds.has(file.id),
|
|
12273
|
+
onSelect: () => {
|
|
12274
|
+
setSelectedIds((prev) => {
|
|
12275
|
+
const next = new Set(prev);
|
|
12276
|
+
if (next.has(file.id)) next.delete(file.id);
|
|
12277
|
+
else next.add(file.id);
|
|
12278
|
+
return next;
|
|
12279
|
+
});
|
|
12280
|
+
},
|
|
12281
|
+
onPreview: onSelectFileForPreview,
|
|
12282
|
+
onDownload: onDownloadFile,
|
|
12283
|
+
onDelete: onDeleteFile,
|
|
12284
|
+
onCopyLink,
|
|
12285
|
+
onRename: onRenameFile,
|
|
12286
|
+
onShare: onShareFile
|
|
12576
12287
|
},
|
|
12577
12288
|
file.id
|
|
12578
12289
|
)) })
|
|
12579
|
-
] }) })
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
variant: "outline",
|
|
12595
|
-
size: "sm",
|
|
12596
|
-
onClick: () => setCurrentPage((p) => Math.max(1, p - 1)),
|
|
12597
|
-
disabled: currentPage === 1,
|
|
12598
|
-
className: "h-7 w-7 p-0 rounded-lg",
|
|
12599
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.ChevronLeft, { className: "h-3.5 w-3.5" })
|
|
12600
|
-
}
|
|
12601
|
-
),
|
|
12602
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "px-2 font-mono font-bold text-foreground", children: [
|
|
12603
|
-
currentPage,
|
|
12604
|
-
" / ",
|
|
12605
|
-
totalPages
|
|
12606
|
-
] }),
|
|
12607
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12608
|
-
Button,
|
|
12609
|
-
{
|
|
12610
|
-
variant: "outline",
|
|
12611
|
-
size: "sm",
|
|
12612
|
-
onClick: () => setCurrentPage((p) => Math.min(totalPages, p + 1)),
|
|
12613
|
-
disabled: currentPage === totalPages,
|
|
12614
|
-
className: "h-7 w-7 p-0 rounded-lg",
|
|
12615
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.ChevronRight, { className: "h-3.5 w-3.5" })
|
|
12616
|
-
}
|
|
12617
|
-
)
|
|
12618
|
-
] })
|
|
12619
|
-
] })
|
|
12290
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", children: paginatedFiles.map((file) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
12291
|
+
FileCardItem,
|
|
12292
|
+
{
|
|
12293
|
+
file,
|
|
12294
|
+
viewMode: "grid",
|
|
12295
|
+
isSelected: selectedIds.has(file.id),
|
|
12296
|
+
onPreview: onSelectFileForPreview,
|
|
12297
|
+
onDownload: onDownloadFile,
|
|
12298
|
+
onDelete: onDeleteFile,
|
|
12299
|
+
onCopyLink,
|
|
12300
|
+
onRename: onRenameFile,
|
|
12301
|
+
onShare: onShareFile
|
|
12302
|
+
},
|
|
12303
|
+
file.id
|
|
12304
|
+
)) }) })
|
|
12620
12305
|
]
|
|
12621
12306
|
}
|
|
12622
12307
|
);
|
|
12623
12308
|
}
|
|
12624
12309
|
|
|
12625
12310
|
// src/design-system/components/files/file-upload-form.tsx
|
|
12626
|
-
var
|
|
12627
|
-
var
|
|
12628
|
-
var
|
|
12311
|
+
var import_react18 = require("react");
|
|
12312
|
+
var import_lucide_react52 = require("lucide-react");
|
|
12313
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
12629
12314
|
var TEMPLATE_OPTIONS = [
|
|
12630
|
-
{ id: "
|
|
12631
|
-
{ id: "
|
|
12632
|
-
{ id: "
|
|
12633
|
-
{ id: "
|
|
12315
|
+
{ id: "standard", name: "Standard Document" },
|
|
12316
|
+
{ id: "invoice", name: "Financial Invoice" },
|
|
12317
|
+
{ id: "report", name: "Report & Spreadsheet" },
|
|
12318
|
+
{ id: "contract", name: "Contract & Legal" }
|
|
12634
12319
|
];
|
|
12635
12320
|
var FOLDER_OPTIONS = ["Finance", "Chat", "Files", "Email", "AI Chat", "Order"];
|
|
12636
12321
|
var SUB_FOLDER_OPTIONS = [
|
|
@@ -12653,19 +12338,20 @@ function FileUploadForm({
|
|
|
12653
12338
|
initialSubFolder = "Pdf",
|
|
12654
12339
|
onClose,
|
|
12655
12340
|
onSave,
|
|
12341
|
+
onSaveDraft,
|
|
12656
12342
|
onUploadSuccess,
|
|
12657
12343
|
onPreviewAttachment,
|
|
12658
12344
|
className
|
|
12659
12345
|
}) {
|
|
12660
|
-
const [template, setTemplate] = (0,
|
|
12661
|
-
const [subject, setSubject] = (0,
|
|
12662
|
-
const [folder, setFolder] = (0,
|
|
12663
|
-
const [subFolder, setSubFolder] = (0,
|
|
12664
|
-
const [remarks, setRemarks] = (0,
|
|
12665
|
-
const [body, setBody] = (0,
|
|
12666
|
-
const [attachments, setAttachments] = (0,
|
|
12667
|
-
const [isSaving, setIsSaving] = (0,
|
|
12668
|
-
const fileInputRef = (0,
|
|
12346
|
+
const [template, setTemplate] = (0, import_react18.useState)("standard");
|
|
12347
|
+
const [subject, setSubject] = (0, import_react18.useState)(initialSubject);
|
|
12348
|
+
const [folder, setFolder] = (0, import_react18.useState)(initialFolder);
|
|
12349
|
+
const [subFolder, setSubFolder] = (0, import_react18.useState)(initialSubFolder);
|
|
12350
|
+
const [remarks, setRemarks] = (0, import_react18.useState)("");
|
|
12351
|
+
const [body, setBody] = (0, import_react18.useState)("");
|
|
12352
|
+
const [attachments, setAttachments] = (0, import_react18.useState)([]);
|
|
12353
|
+
const [isSaving, setIsSaving] = (0, import_react18.useState)(false);
|
|
12354
|
+
const fileInputRef = (0, import_react18.useRef)(null);
|
|
12669
12355
|
const handleFileChange = (e) => {
|
|
12670
12356
|
const files = e.target.files;
|
|
12671
12357
|
if (!files || files.length === 0) return;
|
|
@@ -12685,7 +12371,7 @@ function FileUploadForm({
|
|
|
12685
12371
|
setAttachments((prev) => prev.filter((a) => a.id !== id));
|
|
12686
12372
|
};
|
|
12687
12373
|
const handleFormSubmit = async (e) => {
|
|
12688
|
-
e.preventDefault();
|
|
12374
|
+
if (e) e.preventDefault();
|
|
12689
12375
|
setIsSaving(true);
|
|
12690
12376
|
try {
|
|
12691
12377
|
if (onSave) {
|
|
@@ -12703,7 +12389,21 @@ function FileUploadForm({
|
|
|
12703
12389
|
setIsSaving(false);
|
|
12704
12390
|
}
|
|
12705
12391
|
};
|
|
12706
|
-
|
|
12392
|
+
const handleDraftSubmit = async () => {
|
|
12393
|
+
if (onSaveDraft) {
|
|
12394
|
+
await onSaveDraft({
|
|
12395
|
+
subject,
|
|
12396
|
+
folder,
|
|
12397
|
+
subFolder,
|
|
12398
|
+
remarks,
|
|
12399
|
+
body,
|
|
12400
|
+
attachments
|
|
12401
|
+
});
|
|
12402
|
+
} else {
|
|
12403
|
+
await handleFormSubmit();
|
|
12404
|
+
}
|
|
12405
|
+
};
|
|
12406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
12707
12407
|
"div",
|
|
12708
12408
|
{
|
|
12709
12409
|
className: cn(
|
|
@@ -12711,247 +12411,230 @@ function FileUploadForm({
|
|
|
12711
12411
|
className
|
|
12712
12412
|
),
|
|
12713
12413
|
children: [
|
|
12714
|
-
/* @__PURE__ */ (0,
|
|
12715
|
-
/* @__PURE__ */ (0,
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12414
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center justify-between border-b border-border bg-background px-6 py-4 shrink-0", children: [
|
|
12415
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("h2", { className: "text-xl font-bold text-foreground tracking-tight", children: "New File Upload" }),
|
|
12416
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
12417
|
+
"button",
|
|
12418
|
+
{
|
|
12419
|
+
type: "button",
|
|
12420
|
+
onClick: onClose,
|
|
12421
|
+
className: "flex items-center gap-1.5 text-sm font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
12422
|
+
children: [
|
|
12423
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.ArrowLeft, { className: "h-4 w-4" }),
|
|
12424
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "Back to Storage" })
|
|
12425
|
+
]
|
|
12426
|
+
}
|
|
12427
|
+
)
|
|
12428
|
+
] }),
|
|
12429
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "min-h-0 flex-1 overflow-y-auto p-6 space-y-5", children: [
|
|
12430
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12431
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Select Template" }),
|
|
12432
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "w-full max-w-sm", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Select, { value: template, onValueChange: setTemplate, children: [
|
|
12433
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectTrigger, { className: "h-10 text-sm rounded-xl bg-background border-border/80", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectValue, { placeholder: "Select template" }) }),
|
|
12434
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectContent, { className: "rounded-xl shadow-lg", children: TEMPLATE_OPTIONS.map((t) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectItem, { value: t.id, className: "text-sm", children: t.name }, t.id)) })
|
|
12435
|
+
] }) })
|
|
12731
12436
|
] }),
|
|
12732
|
-
/* @__PURE__ */ (0,
|
|
12733
|
-
|
|
12734
|
-
/* @__PURE__ */ (0,
|
|
12735
|
-
|
|
12437
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12438
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Document Title / Subject" }),
|
|
12439
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12440
|
+
Input,
|
|
12736
12441
|
{
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
className: "h-
|
|
12741
|
-
children: [
|
|
12742
|
-
isSaving ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react53.Loader2, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react53.Save, { className: "h-3.5 w-3.5" }),
|
|
12743
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Save & Upload" })
|
|
12744
|
-
]
|
|
12442
|
+
value: subject,
|
|
12443
|
+
onChange: (e) => setSubject(e.target.value),
|
|
12444
|
+
placeholder: "Enter document title or reference name",
|
|
12445
|
+
className: "h-10 text-sm rounded-xl bg-background border-border/80"
|
|
12745
12446
|
}
|
|
12746
12447
|
)
|
|
12747
|
-
] })
|
|
12748
|
-
] }),
|
|
12749
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "min-h-0 flex-1 overflow-y-auto p-4 space-y-4", children: [
|
|
12750
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 p-3.5 rounded-2xl border border-border/80 bg-muted/10", children: [
|
|
12751
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12752
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Document Template" }),
|
|
12753
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Select, { value: template, onValueChange: setTemplate, children: [
|
|
12754
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectTrigger, { className: "h-8.5 text-xs rounded-xl bg-background border-border/80", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectValue, { placeholder: "Select template" }) }),
|
|
12755
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectContent, { className: "rounded-xl shadow-lg", children: TEMPLATE_OPTIONS.map((t) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectItem, { value: t.id, className: "text-xs", children: t.name }, t.id)) })
|
|
12756
|
-
] })
|
|
12757
|
-
] }),
|
|
12758
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12759
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Target Space" }),
|
|
12760
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Select, { value: folder, onValueChange: setFolder, children: [
|
|
12761
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectTrigger, { className: "h-8.5 text-xs rounded-xl bg-background border-border/80", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectValue, { placeholder: "Select space" }) }),
|
|
12762
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectContent, { className: "rounded-xl shadow-lg", children: (folders || FOLDER_OPTIONS.map((f) => ({ id: f, name: f }))).map((f) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectItem, { value: f.name, className: "text-xs", children: f.name }, f.id)) })
|
|
12763
|
-
] })
|
|
12764
|
-
] }),
|
|
12765
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12766
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Category Subfolder" }),
|
|
12767
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Select, { value: subFolder, onValueChange: setSubFolder, children: [
|
|
12768
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectTrigger, { className: "h-8.5 text-xs rounded-xl bg-background border-border/80", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectValue, { placeholder: "Select category" }) }),
|
|
12769
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectContent, { className: "rounded-xl shadow-lg", children: SUB_FOLDER_OPTIONS.map((cat) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(SelectItem, { value: cat, className: "text-xs", children: cat }, cat)) })
|
|
12770
|
-
] })
|
|
12771
|
-
] })
|
|
12772
12448
|
] }),
|
|
12773
|
-
/* @__PURE__ */ (0,
|
|
12774
|
-
/* @__PURE__ */ (0,
|
|
12775
|
-
/* @__PURE__ */ (0,
|
|
12776
|
-
|
|
12449
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12450
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Folder" }),
|
|
12451
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Select, { value: folder, onValueChange: setFolder, children: [
|
|
12452
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectTrigger, { className: "h-10 text-sm rounded-xl bg-background border-border/80", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12453
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Folder, { className: "h-4 w-4 text-amber-500 fill-amber-500" }),
|
|
12454
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectValue, { placeholder: "Select folder" })
|
|
12455
|
+
] }) }),
|
|
12456
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectContent, { className: "rounded-xl shadow-lg", children: (folders || FOLDER_OPTIONS.map((f) => ({ id: f, name: f }))).map((f) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectItem, { value: f.name, className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12457
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Folder, { className: "h-3.5 w-3.5 text-amber-500 fill-amber-500" }),
|
|
12458
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: f.name })
|
|
12459
|
+
] }) }, f.id)) })
|
|
12460
|
+
] }) })
|
|
12461
|
+
] }),
|
|
12462
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12463
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Sub folder" }),
|
|
12464
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Select, { value: subFolder, onValueChange: setSubFolder, children: [
|
|
12465
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectTrigger, { className: "h-10 text-sm rounded-xl bg-background border-border/80", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12466
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Folder, { className: "h-4 w-4 text-amber-500 fill-amber-500" }),
|
|
12467
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectValue, { placeholder: "Select subfolder" })
|
|
12468
|
+
] }) }),
|
|
12469
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectContent, { className: "rounded-xl shadow-lg", children: SUB_FOLDER_OPTIONS.map((sf) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(SelectItem, { value: sf, className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12470
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Folder, { className: "h-3.5 w-3.5 text-amber-500 fill-amber-500" }),
|
|
12471
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: sf })
|
|
12472
|
+
] }) }, sf)) })
|
|
12473
|
+
] }) })
|
|
12474
|
+
] }),
|
|
12475
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12476
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Remarks" }),
|
|
12477
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12478
|
+
Textarea,
|
|
12777
12479
|
{
|
|
12778
|
-
value:
|
|
12779
|
-
onChange: (e) =>
|
|
12780
|
-
placeholder: "
|
|
12781
|
-
className: "h-
|
|
12480
|
+
value: remarks,
|
|
12481
|
+
onChange: (e) => setRemarks(e.target.value),
|
|
12482
|
+
placeholder: "Add a note about these attachments...",
|
|
12483
|
+
className: "min-h-[80px] text-sm rounded-xl bg-background border-border/80 resize-y"
|
|
12782
12484
|
}
|
|
12783
12485
|
)
|
|
12784
12486
|
] }),
|
|
12785
|
-
/* @__PURE__ */ (0,
|
|
12786
|
-
/* @__PURE__ */ (0,
|
|
12787
|
-
/* @__PURE__ */ (0,
|
|
12788
|
-
/* @__PURE__ */ (0,
|
|
12789
|
-
/* @__PURE__ */ (0,
|
|
12487
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-1.5", children: [
|
|
12488
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Label, { className: "text-xs font-semibold text-foreground", children: "Description / Notes" }),
|
|
12489
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "overflow-hidden rounded-xl border border-border/80 bg-background focus-within:ring-1 focus-within:ring-indigo-500", children: [
|
|
12490
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-1 p-2 border-b border-border/60 bg-muted/20", children: [
|
|
12491
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12790
12492
|
"button",
|
|
12791
12493
|
{
|
|
12792
12494
|
type: "button",
|
|
12793
|
-
className: "
|
|
12495
|
+
className: "flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground text-xs font-bold transition-colors",
|
|
12794
12496
|
title: "Bold",
|
|
12795
|
-
children: /* @__PURE__ */ (0,
|
|
12497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Bold, { className: "h-3.5 w-3.5" })
|
|
12796
12498
|
}
|
|
12797
12499
|
),
|
|
12798
|
-
/* @__PURE__ */ (0,
|
|
12500
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12799
12501
|
"button",
|
|
12800
12502
|
{
|
|
12801
12503
|
type: "button",
|
|
12802
|
-
className: "
|
|
12504
|
+
className: "flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground text-xs font-bold transition-colors",
|
|
12803
12505
|
title: "Italic",
|
|
12804
|
-
children: /* @__PURE__ */ (0,
|
|
12506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Italic, { className: "h-3.5 w-3.5" })
|
|
12805
12507
|
}
|
|
12806
12508
|
),
|
|
12807
|
-
/* @__PURE__ */ (0,
|
|
12509
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12808
12510
|
"button",
|
|
12809
12511
|
{
|
|
12810
12512
|
type: "button",
|
|
12811
|
-
className: "
|
|
12513
|
+
className: "flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground text-xs font-bold transition-colors",
|
|
12812
12514
|
title: "Underline",
|
|
12813
|
-
children: /* @__PURE__ */ (0,
|
|
12515
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Underline, { className: "h-3.5 w-3.5" })
|
|
12814
12516
|
}
|
|
12815
12517
|
),
|
|
12816
|
-
/* @__PURE__ */ (0,
|
|
12817
|
-
/* @__PURE__ */ (0,
|
|
12518
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "h-4 w-[1px] bg-border mx-1" }),
|
|
12519
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12818
12520
|
"button",
|
|
12819
12521
|
{
|
|
12820
12522
|
type: "button",
|
|
12821
|
-
className: "
|
|
12523
|
+
className: "flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground text-xs font-bold transition-colors",
|
|
12822
12524
|
title: "Bullet List",
|
|
12823
|
-
children: /* @__PURE__ */ (0,
|
|
12525
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.List, { className: "h-3.5 w-3.5" })
|
|
12824
12526
|
}
|
|
12825
12527
|
),
|
|
12826
|
-
/* @__PURE__ */ (0,
|
|
12528
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12827
12529
|
"button",
|
|
12828
12530
|
{
|
|
12829
12531
|
type: "button",
|
|
12830
|
-
className: "
|
|
12532
|
+
className: "flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground text-xs font-bold transition-colors",
|
|
12831
12533
|
title: "Numbered List",
|
|
12832
|
-
children: /* @__PURE__ */ (0,
|
|
12534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.ListOrdered, { className: "h-3.5 w-3.5" })
|
|
12833
12535
|
}
|
|
12834
12536
|
),
|
|
12835
|
-
/* @__PURE__ */ (0,
|
|
12836
|
-
/* @__PURE__ */ (0,
|
|
12537
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "h-4 w-[1px] bg-border mx-1" }),
|
|
12538
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12837
12539
|
"button",
|
|
12838
12540
|
{
|
|
12839
12541
|
type: "button",
|
|
12840
12542
|
onClick: () => fileInputRef.current?.click(),
|
|
12841
|
-
className: "
|
|
12543
|
+
className: "flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground text-xs font-bold transition-colors cursor-pointer",
|
|
12842
12544
|
title: "Attach Files",
|
|
12843
|
-
children:
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Paperclip, { className: "h-3.5 w-3.5" })
|
|
12546
|
+
}
|
|
12547
|
+
),
|
|
12548
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12549
|
+
"input",
|
|
12550
|
+
{
|
|
12551
|
+
ref: fileInputRef,
|
|
12552
|
+
type: "file",
|
|
12553
|
+
multiple: true,
|
|
12554
|
+
className: "hidden",
|
|
12555
|
+
onChange: handleFileChange
|
|
12847
12556
|
}
|
|
12848
12557
|
)
|
|
12849
12558
|
] }),
|
|
12850
|
-
/* @__PURE__ */ (0,
|
|
12559
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12851
12560
|
"textarea",
|
|
12852
12561
|
{
|
|
12853
12562
|
value: body,
|
|
12854
12563
|
onChange: (e) => setBody(e.target.value),
|
|
12855
|
-
placeholder: "
|
|
12564
|
+
placeholder: "Type description, remarks, or notes here...",
|
|
12856
12565
|
rows: 4,
|
|
12857
|
-
className: "w-full p-3 text-
|
|
12566
|
+
className: "w-full bg-transparent p-3 text-sm outline-none resize-y border-0 focus:ring-0"
|
|
12858
12567
|
}
|
|
12859
12568
|
)
|
|
12860
12569
|
] })
|
|
12861
12570
|
] }),
|
|
12862
|
-
/* @__PURE__ */ (0,
|
|
12863
|
-
/* @__PURE__ */ (0,
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
")"
|
|
12868
|
-
] }),
|
|
12869
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
12870
|
-
"input",
|
|
12871
|
-
{
|
|
12872
|
-
type: "file",
|
|
12873
|
-
multiple: true,
|
|
12874
|
-
ref: fileInputRef,
|
|
12875
|
-
onChange: handleFileChange,
|
|
12876
|
-
className: "hidden"
|
|
12877
|
-
}
|
|
12878
|
-
),
|
|
12879
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
12880
|
-
Button,
|
|
12881
|
-
{
|
|
12882
|
-
type: "button",
|
|
12883
|
-
variant: "outline",
|
|
12884
|
-
size: "sm",
|
|
12885
|
-
onClick: () => fileInputRef.current?.click(),
|
|
12886
|
-
className: "h-7 text-xs gap-1.5 rounded-xl border-dashed",
|
|
12887
|
-
children: [
|
|
12888
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react53.Paperclip, { className: "h-3 w-3" }),
|
|
12889
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: "Browse Files" })
|
|
12890
|
-
]
|
|
12891
|
-
}
|
|
12892
|
-
)
|
|
12571
|
+
attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-2 pt-1", children: [
|
|
12572
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Label, { className: "text-xs font-semibold text-foreground", children: [
|
|
12573
|
+
"Attached Files (",
|
|
12574
|
+
attachments.length,
|
|
12575
|
+
")"
|
|
12893
12576
|
] }),
|
|
12894
|
-
|
|
12895
|
-
"div",
|
|
12896
|
-
{
|
|
12897
|
-
onClick: () => fileInputRef.current?.click(),
|
|
12898
|
-
className: "flex flex-col items-center justify-center gap-2 p-6 border-2 border-dashed border-border/80 rounded-2xl bg-muted/10 text-muted-foreground hover:border-indigo-400 hover:bg-indigo-50/20 dark:hover:bg-indigo-950/20 transition-all cursor-pointer text-center",
|
|
12899
|
-
children: [
|
|
12900
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react53.UploadCloud, { className: "h-8 w-8 text-indigo-500" }),
|
|
12901
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { children: [
|
|
12902
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { className: "text-xs font-bold text-foreground", children: "Click to upload or drag and drop" }),
|
|
12903
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { className: "text-[11px] text-muted-foreground mt-0.5", children: "PDF, DOCX, XLSX, PNG, JPG, MP4 or ZIP up to 50MB" })
|
|
12904
|
-
] })
|
|
12905
|
-
]
|
|
12906
|
-
}
|
|
12907
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-2", children: attachments.map((att) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
12577
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "flex flex-wrap gap-2", children: attachments.map((att) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
12908
12578
|
"div",
|
|
12909
12579
|
{
|
|
12910
|
-
className: "flex items-center
|
|
12580
|
+
className: "flex items-center gap-2 px-3 py-1.5 rounded-xl border border-border/80 bg-muted/30 text-xs text-foreground font-medium",
|
|
12911
12581
|
children: [
|
|
12912
|
-
/* @__PURE__ */ (0,
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12582
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Paperclip, { className: "h-3.5 w-3.5 text-indigo-500" }),
|
|
12583
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "max-w-[200px] truncate", children: att.name }),
|
|
12584
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
12585
|
+
"(",
|
|
12586
|
+
att.size,
|
|
12587
|
+
")"
|
|
12918
12588
|
] }),
|
|
12919
|
-
/* @__PURE__ */ (0,
|
|
12920
|
-
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
}
|
|
12929
|
-
),
|
|
12930
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
12931
|
-
"button",
|
|
12932
|
-
{
|
|
12933
|
-
type: "button",
|
|
12934
|
-
onClick: () => handleRemoveAttachment(att.id),
|
|
12935
|
-
className: "p-1 rounded-lg hover:bg-rose-50 dark:hover:bg-rose-950/30 text-rose-500 hover:text-rose-600",
|
|
12936
|
-
title: "Remove",
|
|
12937
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react53.X, { className: "h-3.5 w-3.5" })
|
|
12938
|
-
}
|
|
12939
|
-
)
|
|
12940
|
-
] })
|
|
12589
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12590
|
+
"button",
|
|
12591
|
+
{
|
|
12592
|
+
type: "button",
|
|
12593
|
+
onClick: () => handleRemoveAttachment(att.id),
|
|
12594
|
+
className: "text-muted-foreground hover:text-destructive cursor-pointer ml-1",
|
|
12595
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.X, { className: "h-3.5 w-3.5" })
|
|
12596
|
+
}
|
|
12597
|
+
)
|
|
12941
12598
|
]
|
|
12942
12599
|
},
|
|
12943
12600
|
att.id
|
|
12944
12601
|
)) })
|
|
12945
|
-
] })
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12602
|
+
] })
|
|
12603
|
+
] }),
|
|
12604
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center justify-between border-t border-border bg-background px-6 py-4 shrink-0", children: [
|
|
12605
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
12606
|
+
Button,
|
|
12607
|
+
{
|
|
12608
|
+
variant: "outline",
|
|
12609
|
+
onClick: onClose,
|
|
12610
|
+
className: "h-9 px-4 rounded-xl text-sm font-semibold border-border/80 cursor-pointer",
|
|
12611
|
+
children: "Cancel"
|
|
12612
|
+
}
|
|
12613
|
+
),
|
|
12614
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12615
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
12616
|
+
Button,
|
|
12950
12617
|
{
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
className: "h-
|
|
12618
|
+
variant: "outline",
|
|
12619
|
+
onClick: handleDraftSubmit,
|
|
12620
|
+
disabled: isSaving,
|
|
12621
|
+
className: "h-9 px-4 rounded-xl text-sm font-semibold border-border/80 gap-2 cursor-pointer",
|
|
12622
|
+
children: [
|
|
12623
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Save, { className: "h-4 w-4 text-muted-foreground" }),
|
|
12624
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "Save as Draft" })
|
|
12625
|
+
]
|
|
12626
|
+
}
|
|
12627
|
+
),
|
|
12628
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
12629
|
+
Button,
|
|
12630
|
+
{
|
|
12631
|
+
onClick: () => handleFormSubmit(),
|
|
12632
|
+
disabled: isSaving,
|
|
12633
|
+
className: "h-9 px-5 rounded-xl text-sm font-semibold gap-2 bg-indigo-600 hover:bg-indigo-700 text-white shadow-xs cursor-pointer",
|
|
12634
|
+
children: [
|
|
12635
|
+
isSaving ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react52.Save, { className: "h-4 w-4" }),
|
|
12636
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { children: "Save" })
|
|
12637
|
+
]
|
|
12955
12638
|
}
|
|
12956
12639
|
)
|
|
12957
12640
|
] })
|
|
@@ -12962,7 +12645,7 @@ function FileUploadForm({
|
|
|
12962
12645
|
}
|
|
12963
12646
|
|
|
12964
12647
|
// src/design-system/templates/list-template.tsx
|
|
12965
|
-
var
|
|
12648
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
12966
12649
|
function ListTemplate({
|
|
12967
12650
|
title,
|
|
12968
12651
|
description,
|
|
@@ -12982,8 +12665,8 @@ function ListTemplate({
|
|
|
12982
12665
|
...props
|
|
12983
12666
|
}) {
|
|
12984
12667
|
const hasFilterBar = Boolean(onSearchChange) || Boolean(filters) || activeFilters && activeFilters.length > 0 || Boolean(filterActions);
|
|
12985
|
-
return /* @__PURE__ */ (0,
|
|
12986
|
-
/* @__PURE__ */ (0,
|
|
12668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: cn("flex flex-col gap-6 p-4 sm:p-6 md:p-8", className), ...props, children: [
|
|
12669
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
12987
12670
|
PageHeader,
|
|
12988
12671
|
{
|
|
12989
12672
|
title,
|
|
@@ -12993,7 +12676,7 @@ function ListTemplate({
|
|
|
12993
12676
|
actions
|
|
12994
12677
|
}
|
|
12995
12678
|
),
|
|
12996
|
-
hasFilterBar && /* @__PURE__ */ (0,
|
|
12679
|
+
hasFilterBar && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
12997
12680
|
FilterBar,
|
|
12998
12681
|
{
|
|
12999
12682
|
searchPlaceholder,
|
|
@@ -13005,14 +12688,14 @@ function ListTemplate({
|
|
|
13005
12688
|
actions: filterActions
|
|
13006
12689
|
}
|
|
13007
12690
|
),
|
|
13008
|
-
/* @__PURE__ */ (0,
|
|
13009
|
-
footer && /* @__PURE__ */ (0,
|
|
12691
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "flex-1", children }),
|
|
12692
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "pt-2", children: footer })
|
|
13010
12693
|
] });
|
|
13011
12694
|
}
|
|
13012
12695
|
|
|
13013
12696
|
// src/design-system/templates/detail-template.tsx
|
|
13014
|
-
var
|
|
13015
|
-
var
|
|
12697
|
+
var import_lucide_react53 = require("lucide-react");
|
|
12698
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
13016
12699
|
function DetailTemplate({
|
|
13017
12700
|
title,
|
|
13018
12701
|
description,
|
|
@@ -13027,9 +12710,9 @@ function DetailTemplate({
|
|
|
13027
12710
|
className,
|
|
13028
12711
|
...props
|
|
13029
12712
|
}) {
|
|
13030
|
-
return /* @__PURE__ */ (0,
|
|
13031
|
-
/* @__PURE__ */ (0,
|
|
13032
|
-
onBack && /* @__PURE__ */ (0,
|
|
12713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: cn("flex flex-col gap-6 p-4 sm:p-6 md:p-8", className), ...props, children: [
|
|
12714
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
12715
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
13033
12716
|
Button,
|
|
13034
12717
|
{
|
|
13035
12718
|
variant: "ghost",
|
|
@@ -13037,12 +12720,12 @@ function DetailTemplate({
|
|
|
13037
12720
|
onClick: onBack,
|
|
13038
12721
|
className: "w-fit gap-1.5 px-0 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground",
|
|
13039
12722
|
children: [
|
|
13040
|
-
/* @__PURE__ */ (0,
|
|
12723
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_lucide_react53.ArrowLeft, { className: "h-3.5 w-3.5" }),
|
|
13041
12724
|
backLabel
|
|
13042
12725
|
]
|
|
13043
12726
|
}
|
|
13044
12727
|
),
|
|
13045
|
-
/* @__PURE__ */ (0,
|
|
12728
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
13046
12729
|
PageHeader,
|
|
13047
12730
|
{
|
|
13048
12731
|
title,
|
|
@@ -13053,8 +12736,8 @@ function DetailTemplate({
|
|
|
13053
12736
|
}
|
|
13054
12737
|
)
|
|
13055
12738
|
] }),
|
|
13056
|
-
highlights && /* @__PURE__ */ (0,
|
|
13057
|
-
/* @__PURE__ */ (0,
|
|
12739
|
+
highlights && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: highlights }),
|
|
12740
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
13058
12741
|
"div",
|
|
13059
12742
|
{
|
|
13060
12743
|
className: cn(
|
|
@@ -13062,8 +12745,8 @@ function DetailTemplate({
|
|
|
13062
12745
|
sidebar ? "grid-cols-1 lg:grid-cols-3" : "grid-cols-1"
|
|
13063
12746
|
),
|
|
13064
12747
|
children: [
|
|
13065
|
-
/* @__PURE__ */ (0,
|
|
13066
|
-
sidebar && /* @__PURE__ */ (0,
|
|
12748
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: cn(sidebar ? "lg:col-span-2 space-y-6" : "space-y-6"), children }),
|
|
12749
|
+
sidebar && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("aside", { className: "space-y-6 lg:col-span-1", children: sidebar })
|
|
13067
12750
|
]
|
|
13068
12751
|
}
|
|
13069
12752
|
)
|
|
@@ -13071,8 +12754,8 @@ function DetailTemplate({
|
|
|
13071
12754
|
}
|
|
13072
12755
|
|
|
13073
12756
|
// src/design-system/templates/form-template.tsx
|
|
13074
|
-
var
|
|
13075
|
-
var
|
|
12757
|
+
var import_lucide_react54 = require("lucide-react");
|
|
12758
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
13076
12759
|
function FormTemplate({
|
|
13077
12760
|
title,
|
|
13078
12761
|
description,
|
|
@@ -13091,9 +12774,9 @@ function FormTemplate({
|
|
|
13091
12774
|
onSubmit,
|
|
13092
12775
|
...props
|
|
13093
12776
|
}) {
|
|
13094
|
-
return /* @__PURE__ */ (0,
|
|
13095
|
-
/* @__PURE__ */ (0,
|
|
13096
|
-
onBack && /* @__PURE__ */ (0,
|
|
12777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col gap-6 p-4 sm:p-6 md:p-8", children: [
|
|
12778
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
12779
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
13097
12780
|
Button,
|
|
13098
12781
|
{
|
|
13099
12782
|
type: "button",
|
|
@@ -13102,12 +12785,12 @@ function FormTemplate({
|
|
|
13102
12785
|
onClick: onBack,
|
|
13103
12786
|
className: "w-fit gap-1.5 px-0 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground",
|
|
13104
12787
|
children: [
|
|
13105
|
-
/* @__PURE__ */ (0,
|
|
12788
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react54.ArrowLeft, { className: "h-3.5 w-3.5" }),
|
|
13106
12789
|
backLabel
|
|
13107
12790
|
]
|
|
13108
12791
|
}
|
|
13109
12792
|
),
|
|
13110
|
-
/* @__PURE__ */ (0,
|
|
12793
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
13111
12794
|
PageHeader,
|
|
13112
12795
|
{
|
|
13113
12796
|
title,
|
|
@@ -13117,9 +12800,9 @@ function FormTemplate({
|
|
|
13117
12800
|
}
|
|
13118
12801
|
)
|
|
13119
12802
|
] }),
|
|
13120
|
-
/* @__PURE__ */ (0,
|
|
13121
|
-
/* @__PURE__ */ (0,
|
|
13122
|
-
/* @__PURE__ */ (0,
|
|
12803
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("form", { onSubmit, className: cn("space-y-8", className), ...props, children: [
|
|
12804
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "space-y-6", children }),
|
|
12805
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
13123
12806
|
"div",
|
|
13124
12807
|
{
|
|
13125
12808
|
className: cn(
|
|
@@ -13127,9 +12810,9 @@ function FormTemplate({
|
|
|
13127
12810
|
stickyFooter && "sticky bottom-0 -mx-4 -mb-4 bg-background/95 p-4 backdrop-blur border-t sm:-mx-6 sm:-mb-6 sm:p-6 md:-mx-8 md:-mb-8 md:p-8"
|
|
13128
12811
|
),
|
|
13129
12812
|
children: [
|
|
13130
|
-
/* @__PURE__ */ (0,
|
|
13131
|
-
/* @__PURE__ */ (0,
|
|
13132
|
-
onCancel && /* @__PURE__ */ (0,
|
|
12813
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { children: secondaryActions }),
|
|
12814
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
12815
|
+
onCancel && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
13133
12816
|
Button,
|
|
13134
12817
|
{
|
|
13135
12818
|
type: "button",
|
|
@@ -13139,7 +12822,7 @@ function FormTemplate({
|
|
|
13139
12822
|
children: cancelLabel
|
|
13140
12823
|
}
|
|
13141
12824
|
),
|
|
13142
|
-
/* @__PURE__ */ (0,
|
|
12825
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Button, { type: "submit", disabled: isSubmitting, children: isSubmitting ? "Saving..." : submitLabel })
|
|
13143
12826
|
] })
|
|
13144
12827
|
]
|
|
13145
12828
|
}
|
|
@@ -13149,8 +12832,8 @@ function FormTemplate({
|
|
|
13149
12832
|
}
|
|
13150
12833
|
|
|
13151
12834
|
// src/design-system/templates/wizard-template.tsx
|
|
13152
|
-
var
|
|
13153
|
-
var
|
|
12835
|
+
var import_lucide_react55 = require("lucide-react");
|
|
12836
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
13154
12837
|
function WizardTemplate({
|
|
13155
12838
|
title,
|
|
13156
12839
|
description,
|
|
@@ -13171,18 +12854,18 @@ function WizardTemplate({
|
|
|
13171
12854
|
}) {
|
|
13172
12855
|
const isLastStep = currentStepIndex === steps.length - 1;
|
|
13173
12856
|
const isFirstStep = currentStepIndex === 0;
|
|
13174
|
-
return /* @__PURE__ */ (0,
|
|
13175
|
-
/* @__PURE__ */ (0,
|
|
13176
|
-
/* @__PURE__ */ (0,
|
|
12857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: cn("flex flex-col gap-6 p-4 sm:p-6 md:p-8", className), ...props, children: [
|
|
12858
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(PageHeader, { title, description }),
|
|
12859
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("nav", { "aria-label": "Wizard Progress", className: "py-2", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("ol", { className: "flex items-center justify-between gap-2 overflow-x-auto pb-2", children: steps.map((step, idx) => {
|
|
13177
12860
|
const isCompleted = idx < currentStepIndex;
|
|
13178
12861
|
const isCurrent = idx === currentStepIndex;
|
|
13179
12862
|
const isClickable = onStepChange && idx < currentStepIndex;
|
|
13180
|
-
return /* @__PURE__ */ (0,
|
|
12863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
13181
12864
|
"li",
|
|
13182
12865
|
{
|
|
13183
12866
|
className: "flex flex-1 items-center gap-2.5 min-w-[120px]",
|
|
13184
12867
|
children: [
|
|
13185
|
-
/* @__PURE__ */ (0,
|
|
12868
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
13186
12869
|
"button",
|
|
13187
12870
|
{
|
|
13188
12871
|
type: "button",
|
|
@@ -13193,7 +12876,7 @@ function WizardTemplate({
|
|
|
13193
12876
|
isClickable && "cursor-pointer hover:opacity-80"
|
|
13194
12877
|
),
|
|
13195
12878
|
children: [
|
|
13196
|
-
/* @__PURE__ */ (0,
|
|
12879
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
13197
12880
|
"span",
|
|
13198
12881
|
{
|
|
13199
12882
|
className: cn(
|
|
@@ -13202,10 +12885,10 @@ function WizardTemplate({
|
|
|
13202
12885
|
isCurrent && "border-2 border-primary bg-primary/10 text-primary font-bold",
|
|
13203
12886
|
!isCompleted && !isCurrent && "border border-border bg-muted text-muted-foreground"
|
|
13204
12887
|
),
|
|
13205
|
-
children: isCompleted ? /* @__PURE__ */ (0,
|
|
12888
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react55.Check, { className: "h-4 w-4" }) : idx + 1
|
|
13206
12889
|
}
|
|
13207
12890
|
),
|
|
13208
|
-
/* @__PURE__ */ (0,
|
|
12891
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "hidden sm:block", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
13209
12892
|
"div",
|
|
13210
12893
|
{
|
|
13211
12894
|
className: cn(
|
|
@@ -13218,7 +12901,7 @@ function WizardTemplate({
|
|
|
13218
12901
|
]
|
|
13219
12902
|
}
|
|
13220
12903
|
),
|
|
13221
|
-
idx < steps.length - 1 && /* @__PURE__ */ (0,
|
|
12904
|
+
idx < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
13222
12905
|
"div",
|
|
13223
12906
|
{
|
|
13224
12907
|
className: cn(
|
|
@@ -13232,9 +12915,9 @@ function WizardTemplate({
|
|
|
13232
12915
|
step.id
|
|
13233
12916
|
);
|
|
13234
12917
|
}) }) }),
|
|
13235
|
-
/* @__PURE__ */ (0,
|
|
13236
|
-
/* @__PURE__ */ (0,
|
|
13237
|
-
/* @__PURE__ */ (0,
|
|
12918
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex-1 rounded-lg border bg-card p-4 sm:p-6", children }),
|
|
12919
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center justify-between pt-2", children: [
|
|
12920
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
13238
12921
|
Button,
|
|
13239
12922
|
{
|
|
13240
12923
|
type: "button",
|
|
@@ -13242,12 +12925,12 @@ function WizardTemplate({
|
|
|
13242
12925
|
disabled: isFirstStep || isSubmitting,
|
|
13243
12926
|
onClick: onPrevious,
|
|
13244
12927
|
children: [
|
|
13245
|
-
/* @__PURE__ */ (0,
|
|
12928
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react55.ChevronLeft, { className: "mr-1 h-4 w-4" }),
|
|
13246
12929
|
previousLabel
|
|
13247
12930
|
]
|
|
13248
12931
|
}
|
|
13249
12932
|
),
|
|
13250
|
-
isLastStep ? /* @__PURE__ */ (0,
|
|
12933
|
+
isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
13251
12934
|
Button,
|
|
13252
12935
|
{
|
|
13253
12936
|
type: "button",
|
|
@@ -13255,7 +12938,7 @@ function WizardTemplate({
|
|
|
13255
12938
|
onClick: onSubmit,
|
|
13256
12939
|
children: isSubmitting ? "Submitting..." : submitLabel
|
|
13257
12940
|
}
|
|
13258
|
-
) : /* @__PURE__ */ (0,
|
|
12941
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
13259
12942
|
Button,
|
|
13260
12943
|
{
|
|
13261
12944
|
type: "button",
|
|
@@ -13263,7 +12946,7 @@ function WizardTemplate({
|
|
|
13263
12946
|
onClick: onNext,
|
|
13264
12947
|
children: [
|
|
13265
12948
|
nextLabel,
|
|
13266
|
-
/* @__PURE__ */ (0,
|
|
12949
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react55.ChevronRight, { className: "ml-1 h-4 w-4" })
|
|
13267
12950
|
]
|
|
13268
12951
|
}
|
|
13269
12952
|
)
|
|
@@ -13272,7 +12955,7 @@ function WizardTemplate({
|
|
|
13272
12955
|
}
|
|
13273
12956
|
|
|
13274
12957
|
// src/design-system/templates/dashboard-template.tsx
|
|
13275
|
-
var
|
|
12958
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
13276
12959
|
function DashboardTemplate({
|
|
13277
12960
|
title,
|
|
13278
12961
|
description,
|
|
@@ -13286,8 +12969,8 @@ function DashboardTemplate({
|
|
|
13286
12969
|
className,
|
|
13287
12970
|
...props
|
|
13288
12971
|
}) {
|
|
13289
|
-
return /* @__PURE__ */ (0,
|
|
13290
|
-
/* @__PURE__ */ (0,
|
|
12972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: cn("flex flex-col gap-6 p-4 sm:p-6 md:p-8", className), ...props, children: [
|
|
12973
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
13291
12974
|
PageHeader,
|
|
13292
12975
|
{
|
|
13293
12976
|
title,
|
|
@@ -13297,15 +12980,15 @@ function DashboardTemplate({
|
|
|
13297
12980
|
actions
|
|
13298
12981
|
}
|
|
13299
12982
|
),
|
|
13300
|
-
metrics && /* @__PURE__ */ (0,
|
|
13301
|
-
charts && /* @__PURE__ */ (0,
|
|
13302
|
-
activity && /* @__PURE__ */ (0,
|
|
13303
|
-
children && /* @__PURE__ */ (0,
|
|
12983
|
+
metrics && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("section", { "aria-label": "Key Metrics", className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: metrics }),
|
|
12984
|
+
charts && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("section", { "aria-label": "Charts and Visualizations", className: "grid gap-4 md:grid-cols-2 lg:grid-cols-7", children: charts }),
|
|
12985
|
+
activity && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("section", { "aria-label": "Recent Activity", className: "space-y-4", children: activity }),
|
|
12986
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "space-y-6", children })
|
|
13304
12987
|
] });
|
|
13305
12988
|
}
|
|
13306
12989
|
|
|
13307
12990
|
// src/design-system/templates/workspace-template.tsx
|
|
13308
|
-
var
|
|
12991
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
13309
12992
|
function WorkspaceTemplate({
|
|
13310
12993
|
header,
|
|
13311
12994
|
leftSidebar,
|
|
@@ -13315,7 +12998,7 @@ function WorkspaceTemplate({
|
|
|
13315
12998
|
className,
|
|
13316
12999
|
...props
|
|
13317
13000
|
}) {
|
|
13318
|
-
return /* @__PURE__ */ (0,
|
|
13001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
13319
13002
|
"div",
|
|
13320
13003
|
{
|
|
13321
13004
|
className: cn(
|
|
@@ -13324,29 +13007,29 @@ function WorkspaceTemplate({
|
|
|
13324
13007
|
),
|
|
13325
13008
|
...props,
|
|
13326
13009
|
children: [
|
|
13327
|
-
header && /* @__PURE__ */ (0,
|
|
13328
|
-
/* @__PURE__ */ (0,
|
|
13329
|
-
leftSidebar && /* @__PURE__ */ (0,
|
|
13330
|
-
/* @__PURE__ */ (0,
|
|
13331
|
-
rightSidebar && /* @__PURE__ */ (0,
|
|
13010
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("header", { className: "flex h-14 shrink-0 items-center border-b px-4 bg-background z-10", children: header }),
|
|
13011
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
13012
|
+
leftSidebar && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("aside", { className: "hidden md:flex w-64 shrink-0 flex-col border-r bg-sidebar p-3 overflow-y-auto", children: leftSidebar }),
|
|
13013
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("main", { className: "flex flex-1 flex-col overflow-y-auto p-4 sm:p-6 bg-muted/20", children }),
|
|
13014
|
+
rightSidebar && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("aside", { className: "hidden lg:flex w-80 shrink-0 flex-col border-l bg-background p-4 overflow-y-auto", children: rightSidebar })
|
|
13332
13015
|
] }),
|
|
13333
|
-
footer && /* @__PURE__ */ (0,
|
|
13016
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("footer", { className: "flex h-10 shrink-0 items-center border-t px-4 text-xs text-muted-foreground bg-background", children: footer })
|
|
13334
13017
|
]
|
|
13335
13018
|
}
|
|
13336
13019
|
);
|
|
13337
13020
|
}
|
|
13338
13021
|
|
|
13339
13022
|
// src/design-system/templates/app-header.tsx
|
|
13340
|
-
var
|
|
13341
|
-
var
|
|
13023
|
+
var import_react20 = require("react");
|
|
13024
|
+
var import_lucide_react57 = require("lucide-react");
|
|
13342
13025
|
var import_navigation2 = require("next/navigation");
|
|
13343
13026
|
|
|
13344
13027
|
// src/components/layout/header.tsx
|
|
13345
|
-
var
|
|
13346
|
-
var
|
|
13028
|
+
var import_react19 = require("react");
|
|
13029
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
13347
13030
|
function Header({ className, fixed, children, ...props }) {
|
|
13348
|
-
const [offset, setOffset] = (0,
|
|
13349
|
-
(0,
|
|
13031
|
+
const [offset, setOffset] = (0, import_react19.useState)(0);
|
|
13032
|
+
(0, import_react19.useEffect)(() => {
|
|
13350
13033
|
const onScroll = () => {
|
|
13351
13034
|
setOffset(document.body.scrollTop || document.documentElement.scrollTop);
|
|
13352
13035
|
};
|
|
@@ -13355,7 +13038,7 @@ function Header({ className, fixed, children, ...props }) {
|
|
|
13355
13038
|
}, []);
|
|
13356
13039
|
return (
|
|
13357
13040
|
// Page header container: fixed mode me top par sticky behavior deta hai.
|
|
13358
|
-
/* @__PURE__ */ (0,
|
|
13041
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
13359
13042
|
"header",
|
|
13360
13043
|
{
|
|
13361
13044
|
className: cn(
|
|
@@ -13365,7 +13048,7 @@ function Header({ className, fixed, children, ...props }) {
|
|
|
13365
13048
|
className
|
|
13366
13049
|
),
|
|
13367
13050
|
...props,
|
|
13368
|
-
children: /* @__PURE__ */ (0,
|
|
13051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
13369
13052
|
"div",
|
|
13370
13053
|
{
|
|
13371
13054
|
className: cn(
|
|
@@ -13374,7 +13057,7 @@ function Header({ className, fixed, children, ...props }) {
|
|
|
13374
13057
|
offset > 10 && fixed && "after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg"
|
|
13375
13058
|
),
|
|
13376
13059
|
children: [
|
|
13377
|
-
/* @__PURE__ */ (0,
|
|
13060
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(AppLogo, { className: "shrink-0 md:hidden" }),
|
|
13378
13061
|
children
|
|
13379
13062
|
]
|
|
13380
13063
|
}
|
|
@@ -13385,8 +13068,8 @@ function Header({ className, fixed, children, ...props }) {
|
|
|
13385
13068
|
}
|
|
13386
13069
|
|
|
13387
13070
|
// src/components/search.tsx
|
|
13388
|
-
var
|
|
13389
|
-
var
|
|
13071
|
+
var import_lucide_react56 = require("lucide-react");
|
|
13072
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
13390
13073
|
function Search7({
|
|
13391
13074
|
className = "",
|
|
13392
13075
|
placeholder = "Search",
|
|
@@ -13399,7 +13082,7 @@ function Search7({
|
|
|
13399
13082
|
search.setOpen(true);
|
|
13400
13083
|
}
|
|
13401
13084
|
};
|
|
13402
|
-
return /* @__PURE__ */ (0,
|
|
13085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
13403
13086
|
Button,
|
|
13404
13087
|
{
|
|
13405
13088
|
...props,
|
|
@@ -13409,7 +13092,7 @@ function Search7({
|
|
|
13409
13092
|
"aria-label": "Search",
|
|
13410
13093
|
"aria-keyshortcuts": "Meta+K Control+K",
|
|
13411
13094
|
onClick: openSearch,
|
|
13412
|
-
children: /* @__PURE__ */ (0,
|
|
13095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react56.SearchIcon, { className: "size-5", "aria-hidden": "true" })
|
|
13413
13096
|
}
|
|
13414
13097
|
);
|
|
13415
13098
|
}
|
|
@@ -13438,6 +13121,7 @@ function createClient2() {
|
|
|
13438
13121
|
|
|
13439
13122
|
// src/stores/notification-store.ts
|
|
13440
13123
|
var activeChannel = null;
|
|
13124
|
+
var activeUserId = null;
|
|
13441
13125
|
var useNotificationStore = (0, import_zustand2.create)((set, get) => ({
|
|
13442
13126
|
notifications: [],
|
|
13443
13127
|
unreadCount: 0,
|
|
@@ -13578,7 +13262,7 @@ var useNotificationStore = (0, import_zustand2.create)((set, get) => ({
|
|
|
13578
13262
|
}));
|
|
13579
13263
|
|
|
13580
13264
|
// src/design-system/templates/app-header.tsx
|
|
13581
|
-
var
|
|
13265
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
13582
13266
|
function AppHeader({
|
|
13583
13267
|
title,
|
|
13584
13268
|
fixed = true,
|
|
@@ -13588,7 +13272,7 @@ function AppHeader({
|
|
|
13588
13272
|
const router = (0, import_navigation2.useRouter)();
|
|
13589
13273
|
const currentUser = useAuthStore((state) => state.auth.user);
|
|
13590
13274
|
const { unreadCount, fetchNotifications, subscribeToNotifications, unsubscribe } = useNotificationStore();
|
|
13591
|
-
(0,
|
|
13275
|
+
(0, import_react20.useEffect)(() => {
|
|
13592
13276
|
if (currentUser) {
|
|
13593
13277
|
fetchNotifications(currentUser.accountNo);
|
|
13594
13278
|
subscribeToNotifications(currentUser.accountNo);
|
|
@@ -13597,12 +13281,12 @@ function AppHeader({
|
|
|
13597
13281
|
unsubscribe();
|
|
13598
13282
|
};
|
|
13599
13283
|
}, [currentUser, fetchNotifications, subscribeToNotifications, unsubscribe]);
|
|
13600
|
-
return /* @__PURE__ */ (0,
|
|
13601
|
-
/* @__PURE__ */ (0,
|
|
13602
|
-
/* @__PURE__ */ (0,
|
|
13603
|
-
/* @__PURE__ */ (0,
|
|
13284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Header, { fixed, className: "border-b bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex flex-1 items-center justify-between w-full", children: iconsPosition === "left" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
|
|
13285
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("h1", { className: "min-w-0 truncate text-base font-semibold sm:text-lg", children: title }),
|
|
13286
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex items-center gap-1 sm:gap-2 shrink-0 ml-1", children: [
|
|
13287
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Search7, { iconOnly: true }),
|
|
13604
13288
|
children,
|
|
13605
|
-
/* @__PURE__ */ (0,
|
|
13289
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
13606
13290
|
Button,
|
|
13607
13291
|
{
|
|
13608
13292
|
variant: "ghost",
|
|
@@ -13611,18 +13295,18 @@ function AppHeader({
|
|
|
13611
13295
|
"aria-label": "Notifications",
|
|
13612
13296
|
onClick: () => router.push("/notification"),
|
|
13613
13297
|
children: [
|
|
13614
|
-
/* @__PURE__ */ (0,
|
|
13615
|
-
unreadCount > 0 && /* @__PURE__ */ (0,
|
|
13298
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react57.Bell, { className: "size-5" }),
|
|
13299
|
+
unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white shadow-xs", children: unreadCount > 5 ? "5+" : unreadCount })
|
|
13616
13300
|
]
|
|
13617
13301
|
}
|
|
13618
13302
|
)
|
|
13619
13303
|
] })
|
|
13620
|
-
] }) : /* @__PURE__ */ (0,
|
|
13621
|
-
/* @__PURE__ */ (0,
|
|
13622
|
-
/* @__PURE__ */ (0,
|
|
13623
|
-
/* @__PURE__ */ (0,
|
|
13304
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
13305
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("h1", { className: "min-w-0 truncate text-base font-semibold sm:text-lg", children: title }),
|
|
13306
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "ml-auto flex items-center gap-2 sm:gap-3", children: [
|
|
13307
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Search7, { iconOnly: true }),
|
|
13624
13308
|
children,
|
|
13625
|
-
/* @__PURE__ */ (0,
|
|
13309
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
13626
13310
|
Button,
|
|
13627
13311
|
{
|
|
13628
13312
|
variant: "ghost",
|
|
@@ -13631,8 +13315,8 @@ function AppHeader({
|
|
|
13631
13315
|
"aria-label": "Notifications",
|
|
13632
13316
|
onClick: () => router.push("/notification"),
|
|
13633
13317
|
children: [
|
|
13634
|
-
/* @__PURE__ */ (0,
|
|
13635
|
-
unreadCount > 0 && /* @__PURE__ */ (0,
|
|
13318
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react57.Bell, { className: "size-5" }),
|
|
13319
|
+
unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white shadow-xs", children: unreadCount > 5 ? "5+" : unreadCount })
|
|
13636
13320
|
]
|
|
13637
13321
|
}
|
|
13638
13322
|
)
|
|
@@ -13641,7 +13325,7 @@ function AppHeader({
|
|
|
13641
13325
|
}
|
|
13642
13326
|
|
|
13643
13327
|
// src/design-system/templates/data/sidebar-data.ts
|
|
13644
|
-
var
|
|
13328
|
+
var import_lucide_react58 = require("lucide-react");
|
|
13645
13329
|
var sidebarData2 = {
|
|
13646
13330
|
user: {
|
|
13647
13331
|
name: "satnaing",
|
|
@@ -13651,7 +13335,7 @@ var sidebarData2 = {
|
|
|
13651
13335
|
teams: [
|
|
13652
13336
|
{
|
|
13653
13337
|
name: "Amoga App",
|
|
13654
|
-
logo:
|
|
13338
|
+
logo: import_lucide_react58.Command,
|
|
13655
13339
|
plan: "Demo Company"
|
|
13656
13340
|
}
|
|
13657
13341
|
],
|
|
@@ -13662,52 +13346,52 @@ var sidebarData2 = {
|
|
|
13662
13346
|
{
|
|
13663
13347
|
title: "Message",
|
|
13664
13348
|
url: "/message",
|
|
13665
|
-
icon:
|
|
13349
|
+
icon: import_lucide_react58.Mail
|
|
13666
13350
|
},
|
|
13667
13351
|
{
|
|
13668
13352
|
title: "Email Settings",
|
|
13669
13353
|
url: "/email-settings",
|
|
13670
|
-
icon:
|
|
13354
|
+
icon: import_lucide_react58.Settings
|
|
13671
13355
|
},
|
|
13672
13356
|
{
|
|
13673
13357
|
title: "Design System",
|
|
13674
13358
|
url: "/",
|
|
13675
|
-
icon:
|
|
13359
|
+
icon: import_lucide_react58.Settings
|
|
13676
13360
|
},
|
|
13677
13361
|
{
|
|
13678
13362
|
title: "Vouchers",
|
|
13679
13363
|
url: "/vouchers",
|
|
13680
|
-
icon:
|
|
13364
|
+
icon: import_lucide_react58.Ticket
|
|
13681
13365
|
},
|
|
13682
13366
|
{
|
|
13683
13367
|
title: "AI Chat",
|
|
13684
13368
|
url: "/ai_chat",
|
|
13685
|
-
icon:
|
|
13369
|
+
icon: import_lucide_react58.Bot
|
|
13686
13370
|
},
|
|
13687
13371
|
{
|
|
13688
13372
|
title: "AI Search",
|
|
13689
13373
|
url: "/ai_search",
|
|
13690
|
-
icon:
|
|
13374
|
+
icon: import_lucide_react58.SearchIcon
|
|
13691
13375
|
},
|
|
13692
13376
|
{
|
|
13693
13377
|
title: "Chart Template",
|
|
13694
13378
|
url: "/charttemplate",
|
|
13695
|
-
icon:
|
|
13379
|
+
icon: import_lucide_react58.ChartArea
|
|
13696
13380
|
},
|
|
13697
13381
|
{
|
|
13698
13382
|
title: "Map Template",
|
|
13699
13383
|
url: "/map",
|
|
13700
|
-
icon:
|
|
13384
|
+
icon: import_lucide_react58.Map
|
|
13701
13385
|
},
|
|
13702
13386
|
{
|
|
13703
13387
|
title: "Route Doc",
|
|
13704
13388
|
url: "/routedoc",
|
|
13705
|
-
icon:
|
|
13389
|
+
icon: import_lucide_react58.Route
|
|
13706
13390
|
},
|
|
13707
13391
|
{
|
|
13708
13392
|
title: "Link Maker",
|
|
13709
13393
|
url: "/link-maker",
|
|
13710
|
-
icon:
|
|
13394
|
+
icon: import_lucide_react58.Link
|
|
13711
13395
|
}
|
|
13712
13396
|
]
|
|
13713
13397
|
},
|
|
@@ -13716,7 +13400,7 @@ var sidebarData2 = {
|
|
|
13716
13400
|
items: [
|
|
13717
13401
|
{
|
|
13718
13402
|
title: "Settings",
|
|
13719
|
-
icon:
|
|
13403
|
+
icon: import_lucide_react58.Settings,
|
|
13720
13404
|
items: [
|
|
13721
13405
|
// Add settings pages here
|
|
13722
13406
|
]
|
|
@@ -13724,7 +13408,7 @@ var sidebarData2 = {
|
|
|
13724
13408
|
{
|
|
13725
13409
|
title: "Help Center",
|
|
13726
13410
|
url: "/help-center",
|
|
13727
|
-
icon:
|
|
13411
|
+
icon: import_lucide_react58.HelpCircle
|
|
13728
13412
|
}
|
|
13729
13413
|
]
|
|
13730
13414
|
}
|
|
@@ -13732,7 +13416,7 @@ var sidebarData2 = {
|
|
|
13732
13416
|
};
|
|
13733
13417
|
|
|
13734
13418
|
// src/design-system/templates/app-logo.tsx
|
|
13735
|
-
var
|
|
13419
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
13736
13420
|
function AppLogo({ className, onClick }) {
|
|
13737
13421
|
const { toggleSidebar, setOpenMobile, isMobile } = useSidebar();
|
|
13738
13422
|
const team = sidebarData2.teams[0];
|
|
@@ -13749,7 +13433,7 @@ function AppLogo({ className, onClick }) {
|
|
|
13749
13433
|
toggleSidebar();
|
|
13750
13434
|
}
|
|
13751
13435
|
};
|
|
13752
|
-
return /* @__PURE__ */ (0,
|
|
13436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
13753
13437
|
Button,
|
|
13754
13438
|
{
|
|
13755
13439
|
type: "button",
|
|
@@ -13760,30 +13444,30 @@ function AppLogo({ className, onClick }) {
|
|
|
13760
13444
|
className
|
|
13761
13445
|
),
|
|
13762
13446
|
"aria-label": "Open sidebar menu",
|
|
13763
|
-
children: /* @__PURE__ */ (0,
|
|
13447
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "flex size-full items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Logo, { className: "size-4" }) })
|
|
13764
13448
|
}
|
|
13765
13449
|
);
|
|
13766
13450
|
}
|
|
13767
13451
|
|
|
13768
13452
|
// src/context/layout-provider.tsx
|
|
13769
|
-
var
|
|
13770
|
-
var
|
|
13453
|
+
var import_react21 = require("react");
|
|
13454
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
13771
13455
|
var LAYOUT_COLLAPSIBLE_COOKIE_NAME = "layout_collapsible";
|
|
13772
13456
|
var LAYOUT_VARIANT_COOKIE_NAME = "layout_variant";
|
|
13773
13457
|
var LAYOUT_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
13774
13458
|
var DEFAULT_VARIANT = "inset";
|
|
13775
13459
|
var DEFAULT_COLLAPSIBLE = "icon";
|
|
13776
|
-
var LayoutContext = (0,
|
|
13460
|
+
var LayoutContext = (0, import_react21.createContext)(null);
|
|
13777
13461
|
function LayoutProvider({ children }) {
|
|
13778
|
-
const [collapsible, _setCollapsible] = (0,
|
|
13462
|
+
const [collapsible, _setCollapsible] = (0, import_react21.useState)(() => {
|
|
13779
13463
|
const saved = getCookie(LAYOUT_COLLAPSIBLE_COOKIE_NAME);
|
|
13780
13464
|
return saved || DEFAULT_COLLAPSIBLE;
|
|
13781
13465
|
});
|
|
13782
|
-
const [variant, _setVariant] = (0,
|
|
13466
|
+
const [variant, _setVariant] = (0, import_react21.useState)(() => {
|
|
13783
13467
|
const saved = getCookie(LAYOUT_VARIANT_COOKIE_NAME);
|
|
13784
13468
|
return saved || DEFAULT_VARIANT;
|
|
13785
13469
|
});
|
|
13786
|
-
const [showInlineNotFound, setShowInlineNotFound] = (0,
|
|
13470
|
+
const [showInlineNotFound, setShowInlineNotFound] = (0, import_react21.useState)(false);
|
|
13787
13471
|
const setCollapsible = (newCollapsible) => {
|
|
13788
13472
|
_setCollapsible(newCollapsible);
|
|
13789
13473
|
setCookie(
|
|
@@ -13811,10 +13495,10 @@ function LayoutProvider({ children }) {
|
|
|
13811
13495
|
showInlineNotFound,
|
|
13812
13496
|
setShowInlineNotFound
|
|
13813
13497
|
};
|
|
13814
|
-
return /* @__PURE__ */ (0,
|
|
13498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(LayoutContext, { value: contextValue, children });
|
|
13815
13499
|
}
|
|
13816
13500
|
function useLayout() {
|
|
13817
|
-
const context = (0,
|
|
13501
|
+
const context = (0, import_react21.useContext)(LayoutContext);
|
|
13818
13502
|
if (!context) {
|
|
13819
13503
|
return {
|
|
13820
13504
|
resetLayout: () => {
|
|
@@ -13838,13 +13522,13 @@ function useLayout() {
|
|
|
13838
13522
|
// src/design-system/templates/nav-group.tsx
|
|
13839
13523
|
var import_link = __toESM(require("next/link"));
|
|
13840
13524
|
var import_navigation3 = require("next/navigation");
|
|
13841
|
-
var
|
|
13842
|
-
var
|
|
13525
|
+
var import_lucide_react59 = require("lucide-react");
|
|
13526
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
13843
13527
|
function NavGroup({ title, items }) {
|
|
13844
13528
|
const { state, isMobile, openMobile, setOpenMobile } = useSidebar();
|
|
13845
13529
|
const href = (0, import_navigation3.usePathname)();
|
|
13846
|
-
return /* @__PURE__ */ (0,
|
|
13847
|
-
/* @__PURE__ */ (0,
|
|
13530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(SidebarGroup, { className: cn(title === "Menu" && "pt-0"), children: [
|
|
13531
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
13848
13532
|
SidebarGroupLabel,
|
|
13849
13533
|
{
|
|
13850
13534
|
className: cn(
|
|
@@ -13852,8 +13536,8 @@ function NavGroup({ title, items }) {
|
|
|
13852
13536
|
title === "Menu" && state !== "collapsed" && "sticky top-0 z-20 bg-sidebar py-1.5"
|
|
13853
13537
|
),
|
|
13854
13538
|
children: [
|
|
13855
|
-
/* @__PURE__ */ (0,
|
|
13856
|
-
title === "Menu" && !isMobile && /* @__PURE__ */ (0,
|
|
13539
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: title }),
|
|
13540
|
+
title === "Menu" && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
13857
13541
|
SidebarTrigger,
|
|
13858
13542
|
{
|
|
13859
13543
|
variant: "ghost",
|
|
@@ -13861,7 +13545,7 @@ function NavGroup({ title, items }) {
|
|
|
13861
13545
|
"aria-label": "Toggle sidebar"
|
|
13862
13546
|
}
|
|
13863
13547
|
),
|
|
13864
|
-
title === "Menu" && isMobile && openMobile && /* @__PURE__ */ (0,
|
|
13548
|
+
title === "Menu" && isMobile && openMobile && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
13865
13549
|
Button,
|
|
13866
13550
|
{
|
|
13867
13551
|
type: "button",
|
|
@@ -13870,37 +13554,37 @@ function NavGroup({ title, items }) {
|
|
|
13870
13554
|
className: "size-6 shrink-0",
|
|
13871
13555
|
"aria-label": "Close sidebar",
|
|
13872
13556
|
onClick: () => setOpenMobile(false),
|
|
13873
|
-
children: /* @__PURE__ */ (0,
|
|
13557
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react59.X, { className: "size-4", "aria-hidden": "true" })
|
|
13874
13558
|
}
|
|
13875
13559
|
)
|
|
13876
13560
|
]
|
|
13877
13561
|
}
|
|
13878
13562
|
),
|
|
13879
|
-
/* @__PURE__ */ (0,
|
|
13563
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenu, { children: items.map((item) => {
|
|
13880
13564
|
const key = `${item.title}-${item.url}`;
|
|
13881
13565
|
if (!item.items)
|
|
13882
|
-
return /* @__PURE__ */ (0,
|
|
13566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuLink, { item, href }, key);
|
|
13883
13567
|
if (item.title === "Settings" && item.items.length === 0)
|
|
13884
|
-
return /* @__PURE__ */ (0,
|
|
13568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuSettings, { item }, key);
|
|
13885
13569
|
if (state === "collapsed" && !isMobile)
|
|
13886
|
-
return /* @__PURE__ */ (0,
|
|
13887
|
-
return /* @__PURE__ */ (0,
|
|
13570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuCollapsedDropdown, { item, href }, key);
|
|
13571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuCollapsible, { item, href }, key);
|
|
13888
13572
|
}) })
|
|
13889
13573
|
] });
|
|
13890
13574
|
}
|
|
13891
13575
|
function NavBadge({ children }) {
|
|
13892
|
-
return /* @__PURE__ */ (0,
|
|
13576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Badge, { className: "rounded-full px-1 py-0 text-xs", children });
|
|
13893
13577
|
}
|
|
13894
13578
|
function SidebarMenuLink({ item, href }) {
|
|
13895
13579
|
const { setOpenMobile } = useSidebar();
|
|
13896
13580
|
const { setShowInlineNotFound } = useLayout();
|
|
13897
|
-
return /* @__PURE__ */ (0,
|
|
13581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
13898
13582
|
SidebarMenuButton,
|
|
13899
13583
|
{
|
|
13900
13584
|
asChild: true,
|
|
13901
13585
|
isActive: checkIsActive(href, item),
|
|
13902
13586
|
tooltip: item.title,
|
|
13903
|
-
children: /* @__PURE__ */ (0,
|
|
13587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
13904
13588
|
import_link.default,
|
|
13905
13589
|
{
|
|
13906
13590
|
href: item.url,
|
|
@@ -13909,9 +13593,9 @@ function SidebarMenuLink({ item, href }) {
|
|
|
13909
13593
|
setOpenMobile(false);
|
|
13910
13594
|
},
|
|
13911
13595
|
children: [
|
|
13912
|
-
item.icon && /* @__PURE__ */ (0,
|
|
13913
|
-
/* @__PURE__ */ (0,
|
|
13914
|
-
item.badge && /* @__PURE__ */ (0,
|
|
13596
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(item.icon, {}),
|
|
13597
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: item.title }),
|
|
13598
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(NavBadge, { children: item.badge })
|
|
13915
13599
|
]
|
|
13916
13600
|
}
|
|
13917
13601
|
)
|
|
@@ -13921,7 +13605,7 @@ function SidebarMenuLink({ item, href }) {
|
|
|
13921
13605
|
function SidebarMenuSettings({ item }) {
|
|
13922
13606
|
const { setOpenMobile } = useSidebar();
|
|
13923
13607
|
const { showInlineNotFound, setShowInlineNotFound } = useLayout();
|
|
13924
|
-
return /* @__PURE__ */ (0,
|
|
13608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
13925
13609
|
SidebarMenuButton,
|
|
13926
13610
|
{
|
|
13927
13611
|
tooltip: item.title,
|
|
@@ -13931,8 +13615,8 @@ function SidebarMenuSettings({ item }) {
|
|
|
13931
13615
|
setOpenMobile(false);
|
|
13932
13616
|
},
|
|
13933
13617
|
children: [
|
|
13934
|
-
item.icon && /* @__PURE__ */ (0,
|
|
13935
|
-
/* @__PURE__ */ (0,
|
|
13618
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(item.icon, {}),
|
|
13619
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: item.title })
|
|
13936
13620
|
]
|
|
13937
13621
|
}
|
|
13938
13622
|
) });
|
|
@@ -13943,25 +13627,25 @@ function SidebarMenuCollapsible({
|
|
|
13943
13627
|
}) {
|
|
13944
13628
|
const { setOpenMobile } = useSidebar();
|
|
13945
13629
|
const { setShowInlineNotFound } = useLayout();
|
|
13946
|
-
return /* @__PURE__ */ (0,
|
|
13630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
13947
13631
|
Collapsible,
|
|
13948
13632
|
{
|
|
13949
13633
|
asChild: true,
|
|
13950
13634
|
defaultOpen: checkIsActive(href, item, true),
|
|
13951
13635
|
className: "group/collapsible",
|
|
13952
|
-
children: /* @__PURE__ */ (0,
|
|
13953
|
-
/* @__PURE__ */ (0,
|
|
13954
|
-
item.icon && /* @__PURE__ */ (0,
|
|
13955
|
-
/* @__PURE__ */ (0,
|
|
13956
|
-
item.badge && /* @__PURE__ */ (0,
|
|
13957
|
-
/* @__PURE__ */ (0,
|
|
13636
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(SidebarMenuItem, { children: [
|
|
13637
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(SidebarMenuButton, { tooltip: item.title, children: [
|
|
13638
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(item.icon, {}),
|
|
13639
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: item.title }),
|
|
13640
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(NavBadge, { children: item.badge }),
|
|
13641
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react59.ChevronRight, { className: "ms-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180" })
|
|
13958
13642
|
] }) }),
|
|
13959
|
-
/* @__PURE__ */ (0,
|
|
13643
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(CollapsibleContent, { className: "CollapsibleContent", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuSub, { children: item.items.map((subItem) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuSubItem, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
13960
13644
|
SidebarMenuSubButton,
|
|
13961
13645
|
{
|
|
13962
13646
|
asChild: true,
|
|
13963
13647
|
isActive: checkIsActive(href, subItem),
|
|
13964
|
-
children: /* @__PURE__ */ (0,
|
|
13648
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
13965
13649
|
import_link.default,
|
|
13966
13650
|
{
|
|
13967
13651
|
href: subItem.url,
|
|
@@ -13970,9 +13654,9 @@ function SidebarMenuCollapsible({
|
|
|
13970
13654
|
setOpenMobile(false);
|
|
13971
13655
|
},
|
|
13972
13656
|
children: [
|
|
13973
|
-
subItem.icon && /* @__PURE__ */ (0,
|
|
13974
|
-
/* @__PURE__ */ (0,
|
|
13975
|
-
subItem.badge && /* @__PURE__ */ (0,
|
|
13657
|
+
subItem.icon && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(subItem.icon, {}),
|
|
13658
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: subItem.title }),
|
|
13659
|
+
subItem.badge && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(NavBadge, { children: subItem.badge })
|
|
13976
13660
|
]
|
|
13977
13661
|
}
|
|
13978
13662
|
)
|
|
@@ -13986,36 +13670,36 @@ function SidebarMenuCollapsedDropdown({
|
|
|
13986
13670
|
item,
|
|
13987
13671
|
href
|
|
13988
13672
|
}) {
|
|
13989
|
-
return /* @__PURE__ */ (0,
|
|
13990
|
-
/* @__PURE__ */ (0,
|
|
13673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(DropdownMenu, { children: [
|
|
13674
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
13991
13675
|
SidebarMenuButton,
|
|
13992
13676
|
{
|
|
13993
13677
|
tooltip: item.title,
|
|
13994
13678
|
isActive: checkIsActive(href, item),
|
|
13995
13679
|
children: [
|
|
13996
|
-
item.icon && /* @__PURE__ */ (0,
|
|
13997
|
-
/* @__PURE__ */ (0,
|
|
13998
|
-
item.badge && /* @__PURE__ */ (0,
|
|
13999
|
-
/* @__PURE__ */ (0,
|
|
13680
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(item.icon, {}),
|
|
13681
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: item.title }),
|
|
13682
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(NavBadge, { children: item.badge }),
|
|
13683
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react59.ChevronRight, { className: "ms-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
14000
13684
|
]
|
|
14001
13685
|
}
|
|
14002
13686
|
) }),
|
|
14003
|
-
/* @__PURE__ */ (0,
|
|
14004
|
-
/* @__PURE__ */ (0,
|
|
13687
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(DropdownMenuContent, { side: "right", align: "start", sideOffset: 4, children: [
|
|
13688
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(DropdownMenuLabel, { children: [
|
|
14005
13689
|
item.title,
|
|
14006
13690
|
" ",
|
|
14007
13691
|
item.badge ? `(${item.badge})` : ""
|
|
14008
13692
|
] }),
|
|
14009
|
-
/* @__PURE__ */ (0,
|
|
14010
|
-
item.items.map((sub) => /* @__PURE__ */ (0,
|
|
13693
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(DropdownMenuSeparator, {}),
|
|
13694
|
+
item.items.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
14011
13695
|
import_link.default,
|
|
14012
13696
|
{
|
|
14013
13697
|
href: sub.url,
|
|
14014
13698
|
className: `${checkIsActive(href, sub) ? "bg-secondary" : ""}`,
|
|
14015
13699
|
children: [
|
|
14016
|
-
sub.icon && /* @__PURE__ */ (0,
|
|
14017
|
-
/* @__PURE__ */ (0,
|
|
14018
|
-
sub.badge && /* @__PURE__ */ (0,
|
|
13700
|
+
sub.icon && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(sub.icon, {}),
|
|
13701
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "max-w-52 text-wrap", children: sub.title }),
|
|
13702
|
+
sub.badge && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "ms-auto text-xs", children: sub.badge })
|
|
14019
13703
|
]
|
|
14020
13704
|
}
|
|
14021
13705
|
) }, `${sub.title}-${sub.url}`))
|
|
@@ -14030,20 +13714,20 @@ function checkIsActive(href, item, mainNav = false) {
|
|
|
14030
13714
|
}
|
|
14031
13715
|
|
|
14032
13716
|
// src/design-system/templates/team-switcher.tsx
|
|
14033
|
-
var
|
|
13717
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
14034
13718
|
function TeamSwitcher({ teams }) {
|
|
14035
13719
|
useSidebar();
|
|
14036
13720
|
const activeTeam = teams[0];
|
|
14037
|
-
return /* @__PURE__ */ (0,
|
|
13721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
14038
13722
|
SidebarMenuButton,
|
|
14039
13723
|
{
|
|
14040
13724
|
size: "lg",
|
|
14041
13725
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
14042
13726
|
children: [
|
|
14043
|
-
/* @__PURE__ */ (0,
|
|
14044
|
-
/* @__PURE__ */ (0,
|
|
14045
|
-
/* @__PURE__ */ (0,
|
|
14046
|
-
/* @__PURE__ */ (0,
|
|
13727
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(activeTeam.logo, { className: "size-4" }) }),
|
|
13728
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
13729
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "truncate font-semibold", children: activeTeam.name }),
|
|
13730
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "truncate text-xs", children: activeTeam.plan })
|
|
14047
13731
|
] })
|
|
14048
13732
|
]
|
|
14049
13733
|
}
|
|
@@ -14051,25 +13735,25 @@ function TeamSwitcher({ teams }) {
|
|
|
14051
13735
|
}
|
|
14052
13736
|
|
|
14053
13737
|
// src/design-system/templates/nav-user.tsx
|
|
14054
|
-
var
|
|
13738
|
+
var import_lucide_react61 = require("lucide-react");
|
|
14055
13739
|
|
|
14056
13740
|
// src/hooks/use-dialog-state.tsx
|
|
14057
|
-
var
|
|
13741
|
+
var import_react22 = require("react");
|
|
14058
13742
|
function useDialogState(initialState2 = null) {
|
|
14059
|
-
const [open, _setOpen] = (0,
|
|
13743
|
+
const [open, _setOpen] = (0, import_react22.useState)(initialState2);
|
|
14060
13744
|
const setOpen = (str) => _setOpen((prev) => prev === str ? null : str);
|
|
14061
13745
|
return [open, setOpen];
|
|
14062
13746
|
}
|
|
14063
13747
|
|
|
14064
13748
|
// src/components/config-drawer.tsx
|
|
14065
|
-
var
|
|
13749
|
+
var import_react23 = require("react");
|
|
14066
13750
|
var import_react_radio_group = require("@radix-ui/react-radio-group");
|
|
14067
|
-
var
|
|
13751
|
+
var import_lucide_react60 = require("lucide-react");
|
|
14068
13752
|
|
|
14069
13753
|
// src/assets/custom/icon-theme-dark.tsx
|
|
14070
|
-
var
|
|
13754
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
14071
13755
|
function IconThemeDark(props) {
|
|
14072
|
-
return /* @__PURE__ */ (0,
|
|
13756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
14073
13757
|
"svg",
|
|
14074
13758
|
{
|
|
14075
13759
|
"data-name": "icon-theme-dark",
|
|
@@ -14077,27 +13761,27 @@ function IconThemeDark(props) {
|
|
|
14077
13761
|
viewBox: "0 0 79.86 51.14",
|
|
14078
13762
|
...props,
|
|
14079
13763
|
children: [
|
|
14080
|
-
/* @__PURE__ */ (0,
|
|
14081
|
-
/* @__PURE__ */ (0,
|
|
14082
|
-
/* @__PURE__ */ (0,
|
|
13764
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("g", { fill: "#1d2b3f", children: [
|
|
13765
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("rect", { x: 0.53, y: 0.5, width: 78.83, height: 50.14, rx: 3.5, ry: 3.5 }),
|
|
13766
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("path", { d: "M75.86 1c1.65 0 3 1.35 3 3v43.14c0 1.65-1.35 3-3 3H4.03c-1.65 0-3-1.35-3-3V4c0-1.65 1.35-3 3-3h71.83m0-1H4.03c-2.21 0-4 1.79-4 4v43.14c0 2.21 1.79 4 4 4h71.83c2.21 0 4-1.79 4-4V4c0-2.21-1.79-4-4-4z" })
|
|
14083
13767
|
] }),
|
|
14084
|
-
/* @__PURE__ */ (0,
|
|
13768
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14085
13769
|
"path",
|
|
14086
13770
|
{
|
|
14087
13771
|
d: "M22.88 0h52.97c2.21 0 4 1.79 4 4v43.14c0 2.21-1.79 4-4 4H22.88V0z",
|
|
14088
13772
|
fill: "#0d1628"
|
|
14089
13773
|
}
|
|
14090
13774
|
),
|
|
14091
|
-
/* @__PURE__ */ (0,
|
|
14092
|
-
/* @__PURE__ */ (0,
|
|
13775
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("circle", { cx: 6.7, cy: 7.04, r: 3.54, fill: "#426187" }),
|
|
13776
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14093
13777
|
"path",
|
|
14094
13778
|
{
|
|
14095
13779
|
d: "M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1zM18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05zM15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.91h11c.55 0 1 .41 1 .91s-.45.91-1 .91zM16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",
|
|
14096
13780
|
fill: "#426187"
|
|
14097
13781
|
}
|
|
14098
13782
|
),
|
|
14099
|
-
/* @__PURE__ */ (0,
|
|
14100
|
-
/* @__PURE__ */ (0,
|
|
13783
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("g", { fill: "#2a62bc", children: [
|
|
13784
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14101
13785
|
"rect",
|
|
14102
13786
|
{
|
|
14103
13787
|
x: 33.36,
|
|
@@ -14109,7 +13793,7 @@ function IconThemeDark(props) {
|
|
|
14109
13793
|
opacity: 0.32
|
|
14110
13794
|
}
|
|
14111
13795
|
),
|
|
14112
|
-
/* @__PURE__ */ (0,
|
|
13796
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14113
13797
|
"rect",
|
|
14114
13798
|
{
|
|
14115
13799
|
x: 29.64,
|
|
@@ -14121,7 +13805,7 @@ function IconThemeDark(props) {
|
|
|
14121
13805
|
opacity: 0.44
|
|
14122
13806
|
}
|
|
14123
13807
|
),
|
|
14124
|
-
/* @__PURE__ */ (0,
|
|
13808
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14125
13809
|
"rect",
|
|
14126
13810
|
{
|
|
14127
13811
|
x: 37.16,
|
|
@@ -14133,7 +13817,7 @@ function IconThemeDark(props) {
|
|
|
14133
13817
|
opacity: 0.53
|
|
14134
13818
|
}
|
|
14135
13819
|
),
|
|
14136
|
-
/* @__PURE__ */ (0,
|
|
13820
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14137
13821
|
"rect",
|
|
14138
13822
|
{
|
|
14139
13823
|
x: 41.19,
|
|
@@ -14146,8 +13830,8 @@ function IconThemeDark(props) {
|
|
|
14146
13830
|
}
|
|
14147
13831
|
)
|
|
14148
13832
|
] }),
|
|
14149
|
-
/* @__PURE__ */ (0,
|
|
14150
|
-
/* @__PURE__ */ (0,
|
|
13833
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("circle", { cx: 62.74, cy: 16.32, r: 8, fill: "#2f5491", opacity: 0.5 }),
|
|
13834
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14151
13835
|
"path",
|
|
14152
13836
|
{
|
|
14153
13837
|
d: "M62.74 16.32l4.1-6.87c1.19.71 2.18 1.72 2.86 2.92s1.04 2.57 1.04 3.95h-8z",
|
|
@@ -14155,7 +13839,7 @@ function IconThemeDark(props) {
|
|
|
14155
13839
|
opacity: 0.74
|
|
14156
13840
|
}
|
|
14157
13841
|
),
|
|
14158
|
-
/* @__PURE__ */ (0,
|
|
13842
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14159
13843
|
"rect",
|
|
14160
13844
|
{
|
|
14161
13845
|
x: 29.64,
|
|
@@ -14173,9 +13857,9 @@ function IconThemeDark(props) {
|
|
|
14173
13857
|
}
|
|
14174
13858
|
|
|
14175
13859
|
// src/assets/custom/icon-theme-light.tsx
|
|
14176
|
-
var
|
|
13860
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
14177
13861
|
function IconThemeLight(props) {
|
|
14178
|
-
return /* @__PURE__ */ (0,
|
|
13862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
14179
13863
|
"svg",
|
|
14180
13864
|
{
|
|
14181
13865
|
"data-name": "icon-theme-light",
|
|
@@ -14183,27 +13867,27 @@ function IconThemeLight(props) {
|
|
|
14183
13867
|
viewBox: "0 0 79.86 51.14",
|
|
14184
13868
|
...props,
|
|
14185
13869
|
children: [
|
|
14186
|
-
/* @__PURE__ */ (0,
|
|
14187
|
-
/* @__PURE__ */ (0,
|
|
14188
|
-
/* @__PURE__ */ (0,
|
|
13870
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("g", { fill: "#d9d9d9", children: [
|
|
13871
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("rect", { x: 0.53, y: 0.5, width: 78.83, height: 50.14, rx: 3.5, ry: 3.5 }),
|
|
13872
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("path", { d: "M75.86 1c1.65 0 3 1.35 3 3v43.14c0 1.65-1.35 3-3 3H4.03c-1.65 0-3-1.35-3-3V4c0-1.65 1.35-3 3-3h71.83m0-1H4.03c-2.21 0-4 1.79-4 4v43.14c0 2.21 1.79 4 4 4h71.83c2.21 0 4-1.79 4-4V4c0-2.21-1.79-4-4-4z" })
|
|
14189
13873
|
] }),
|
|
14190
|
-
/* @__PURE__ */ (0,
|
|
13874
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14191
13875
|
"path",
|
|
14192
13876
|
{
|
|
14193
13877
|
d: "M22.88 0h52.97c2.21 0 4 1.79 4 4v43.14c0 2.21-1.79 4-4 4H22.88V0z",
|
|
14194
13878
|
fill: "#ecedef"
|
|
14195
13879
|
}
|
|
14196
13880
|
),
|
|
14197
|
-
/* @__PURE__ */ (0,
|
|
14198
|
-
/* @__PURE__ */ (0,
|
|
13881
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("circle", { cx: 6.7, cy: 7.04, r: 3.54, fill: "#fff" }),
|
|
13882
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14199
13883
|
"path",
|
|
14200
13884
|
{
|
|
14201
13885
|
d: "M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1zM18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05zM15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.91h11c.55 0 1 .41 1 .91s-.45.91-1 .91zM16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",
|
|
14202
13886
|
fill: "#fff"
|
|
14203
13887
|
}
|
|
14204
13888
|
),
|
|
14205
|
-
/* @__PURE__ */ (0,
|
|
14206
|
-
/* @__PURE__ */ (0,
|
|
13889
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("g", { fill: "#c0c4c4", children: [
|
|
13890
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14207
13891
|
"rect",
|
|
14208
13892
|
{
|
|
14209
13893
|
x: 33.36,
|
|
@@ -14215,7 +13899,7 @@ function IconThemeLight(props) {
|
|
|
14215
13899
|
opacity: 0.32
|
|
14216
13900
|
}
|
|
14217
13901
|
),
|
|
14218
|
-
/* @__PURE__ */ (0,
|
|
13902
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14219
13903
|
"rect",
|
|
14220
13904
|
{
|
|
14221
13905
|
x: 29.64,
|
|
@@ -14227,7 +13911,7 @@ function IconThemeLight(props) {
|
|
|
14227
13911
|
opacity: 0.44
|
|
14228
13912
|
}
|
|
14229
13913
|
),
|
|
14230
|
-
/* @__PURE__ */ (0,
|
|
13914
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14231
13915
|
"rect",
|
|
14232
13916
|
{
|
|
14233
13917
|
x: 37.16,
|
|
@@ -14239,7 +13923,7 @@ function IconThemeLight(props) {
|
|
|
14239
13923
|
opacity: 0.53
|
|
14240
13924
|
}
|
|
14241
13925
|
),
|
|
14242
|
-
/* @__PURE__ */ (0,
|
|
13926
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14243
13927
|
"rect",
|
|
14244
13928
|
{
|
|
14245
13929
|
x: 41.19,
|
|
@@ -14252,12 +13936,12 @@ function IconThemeLight(props) {
|
|
|
14252
13936
|
}
|
|
14253
13937
|
)
|
|
14254
13938
|
] }),
|
|
14255
|
-
/* @__PURE__ */ (0,
|
|
14256
|
-
/* @__PURE__ */ (0,
|
|
14257
|
-
/* @__PURE__ */ (0,
|
|
14258
|
-
/* @__PURE__ */ (0,
|
|
13939
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("circle", { cx: 62.74, cy: 16.32, r: 8, fill: "#fff" }),
|
|
13940
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("g", { fill: "#d9d9d9", children: [
|
|
13941
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("path", { d: "M63.62 15.82L67 10.15c.93.64 1.7 1.48 2.26 2.47.56.98.89 2.08.96 3.21h-6.6z" }),
|
|
13942
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("path", { d: "M67.14 10.88a6.977 6.977 0 012.52 4.44h-5.17l2.65-4.44m-.31-1.43l-4.1 6.87h8c0-1.39-.36-2.75-1.04-3.95s-1.67-2.21-2.86-2.92z" })
|
|
14259
13943
|
] }),
|
|
14260
|
-
/* @__PURE__ */ (0,
|
|
13944
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14261
13945
|
"rect",
|
|
14262
13946
|
{
|
|
14263
13947
|
x: 29.64,
|
|
@@ -14275,12 +13959,12 @@ function IconThemeLight(props) {
|
|
|
14275
13959
|
}
|
|
14276
13960
|
|
|
14277
13961
|
// src/assets/custom/icon-theme-system.tsx
|
|
14278
|
-
var
|
|
13962
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
14279
13963
|
function IconThemeSystem({
|
|
14280
13964
|
className,
|
|
14281
13965
|
...props
|
|
14282
13966
|
}) {
|
|
14283
|
-
return /* @__PURE__ */ (0,
|
|
13967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
14284
13968
|
"svg",
|
|
14285
13969
|
{
|
|
14286
13970
|
"data-name": "icon-theme-system",
|
|
@@ -14293,8 +13977,8 @@ function IconThemeSystem({
|
|
|
14293
13977
|
),
|
|
14294
13978
|
...props,
|
|
14295
13979
|
children: [
|
|
14296
|
-
/* @__PURE__ */ (0,
|
|
14297
|
-
/* @__PURE__ */ (0,
|
|
13980
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("path", { opacity: 0.2, d: "M0 0.03H22.88V51.17H0z" }),
|
|
13981
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14298
13982
|
"circle",
|
|
14299
13983
|
{
|
|
14300
13984
|
cx: 6.7,
|
|
@@ -14307,7 +13991,7 @@ function IconThemeSystem({
|
|
|
14307
13991
|
strokeMiterlimit: 10
|
|
14308
13992
|
}
|
|
14309
13993
|
),
|
|
14310
|
-
/* @__PURE__ */ (0,
|
|
13994
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14311
13995
|
"path",
|
|
14312
13996
|
{
|
|
14313
13997
|
d: "M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1z",
|
|
@@ -14316,7 +14000,7 @@ function IconThemeSystem({
|
|
|
14316
14000
|
opacity: 0.75
|
|
14317
14001
|
}
|
|
14318
14002
|
),
|
|
14319
|
-
/* @__PURE__ */ (0,
|
|
14003
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14320
14004
|
"path",
|
|
14321
14005
|
{
|
|
14322
14006
|
d: "M18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05z",
|
|
@@ -14325,7 +14009,7 @@ function IconThemeSystem({
|
|
|
14325
14009
|
opacity: 0.72
|
|
14326
14010
|
}
|
|
14327
14011
|
),
|
|
14328
|
-
/* @__PURE__ */ (0,
|
|
14012
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14329
14013
|
"path",
|
|
14330
14014
|
{
|
|
14331
14015
|
d: "M15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.91h11c.55 0 1 .41 1 .91s-.45.91-1 .91z",
|
|
@@ -14334,7 +14018,7 @@ function IconThemeSystem({
|
|
|
14334
14018
|
opacity: 0.55
|
|
14335
14019
|
}
|
|
14336
14020
|
),
|
|
14337
|
-
/* @__PURE__ */ (0,
|
|
14021
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14338
14022
|
"path",
|
|
14339
14023
|
{
|
|
14340
14024
|
d: "M16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",
|
|
@@ -14343,7 +14027,7 @@ function IconThemeSystem({
|
|
|
14343
14027
|
opacity: 0.67
|
|
14344
14028
|
}
|
|
14345
14029
|
),
|
|
14346
|
-
/* @__PURE__ */ (0,
|
|
14030
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14347
14031
|
"rect",
|
|
14348
14032
|
{
|
|
14349
14033
|
x: 33.36,
|
|
@@ -14356,7 +14040,7 @@ function IconThemeSystem({
|
|
|
14356
14040
|
stroke: "none"
|
|
14357
14041
|
}
|
|
14358
14042
|
),
|
|
14359
|
-
/* @__PURE__ */ (0,
|
|
14043
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14360
14044
|
"rect",
|
|
14361
14045
|
{
|
|
14362
14046
|
x: 29.64,
|
|
@@ -14369,7 +14053,7 @@ function IconThemeSystem({
|
|
|
14369
14053
|
stroke: "none"
|
|
14370
14054
|
}
|
|
14371
14055
|
),
|
|
14372
|
-
/* @__PURE__ */ (0,
|
|
14056
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14373
14057
|
"rect",
|
|
14374
14058
|
{
|
|
14375
14059
|
x: 37.16,
|
|
@@ -14382,7 +14066,7 @@ function IconThemeSystem({
|
|
|
14382
14066
|
stroke: "none"
|
|
14383
14067
|
}
|
|
14384
14068
|
),
|
|
14385
|
-
/* @__PURE__ */ (0,
|
|
14069
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14386
14070
|
"rect",
|
|
14387
14071
|
{
|
|
14388
14072
|
x: 41.19,
|
|
@@ -14395,9 +14079,9 @@ function IconThemeSystem({
|
|
|
14395
14079
|
stroke: "none"
|
|
14396
14080
|
}
|
|
14397
14081
|
),
|
|
14398
|
-
/* @__PURE__ */ (0,
|
|
14399
|
-
/* @__PURE__ */ (0,
|
|
14400
|
-
/* @__PURE__ */ (0,
|
|
14082
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("g", { children: [
|
|
14083
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("circle", { cx: 62.74, cy: 16.32, r: 8, opacity: 0.25 }),
|
|
14084
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14401
14085
|
"path",
|
|
14402
14086
|
{
|
|
14403
14087
|
d: "M62.74 16.32l4.1-6.87c1.19.71 2.18 1.72 2.86 2.92s1.04 2.57 1.04 3.95h-8z",
|
|
@@ -14405,7 +14089,7 @@ function IconThemeSystem({
|
|
|
14405
14089
|
}
|
|
14406
14090
|
)
|
|
14407
14091
|
] }),
|
|
14408
|
-
/* @__PURE__ */ (0,
|
|
14092
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14409
14093
|
"rect",
|
|
14410
14094
|
{
|
|
14411
14095
|
x: 29.64,
|
|
@@ -14426,7 +14110,7 @@ function IconThemeSystem({
|
|
|
14426
14110
|
}
|
|
14427
14111
|
|
|
14428
14112
|
// src/components/config-drawer.tsx
|
|
14429
|
-
var
|
|
14113
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
14430
14114
|
function ConfigDrawer({
|
|
14431
14115
|
trigger
|
|
14432
14116
|
}) {
|
|
@@ -14436,27 +14120,27 @@ function ConfigDrawer({
|
|
|
14436
14120
|
resetTheme();
|
|
14437
14121
|
resetColorTheme();
|
|
14438
14122
|
};
|
|
14439
|
-
return /* @__PURE__ */ (0,
|
|
14440
|
-
/* @__PURE__ */ (0,
|
|
14123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Sheet, { children: [
|
|
14124
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SheetTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14441
14125
|
Button,
|
|
14442
14126
|
{
|
|
14443
14127
|
size: "icon",
|
|
14444
14128
|
variant: "ghost",
|
|
14445
14129
|
"aria-label": "Open theme settings",
|
|
14446
14130
|
className: "rounded-full",
|
|
14447
|
-
children: /* @__PURE__ */ (0,
|
|
14131
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react60.Settings, { "aria-hidden": "true" })
|
|
14448
14132
|
}
|
|
14449
14133
|
) }),
|
|
14450
|
-
/* @__PURE__ */ (0,
|
|
14451
|
-
/* @__PURE__ */ (0,
|
|
14452
|
-
/* @__PURE__ */ (0,
|
|
14453
|
-
/* @__PURE__ */ (0,
|
|
14134
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(SheetContent, { className: "flex flex-col", children: [
|
|
14135
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(SheetHeader, { className: "pb-0 text-start", children: [
|
|
14136
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SheetTitle, { children: "Theme Settings" }),
|
|
14137
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SheetDescription, { children: "Customize the look and feel of your dashboard." })
|
|
14454
14138
|
] }),
|
|
14455
|
-
/* @__PURE__ */ (0,
|
|
14456
|
-
/* @__PURE__ */ (0,
|
|
14457
|
-
/* @__PURE__ */ (0,
|
|
14139
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "flex flex-1 flex-col gap-6 overflow-hidden px-4", children: [
|
|
14140
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ThemeConfig, {}),
|
|
14141
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ThemeListSelector, {})
|
|
14458
14142
|
] }),
|
|
14459
|
-
/* @__PURE__ */ (0,
|
|
14143
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SheetFooter, { className: "gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14460
14144
|
Button,
|
|
14461
14145
|
{
|
|
14462
14146
|
variant: "destructive",
|
|
@@ -14474,7 +14158,7 @@ function SectionTitle({
|
|
|
14474
14158
|
resetAriaLabel,
|
|
14475
14159
|
className
|
|
14476
14160
|
}) {
|
|
14477
|
-
return /* @__PURE__ */ (0,
|
|
14161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
14478
14162
|
"div",
|
|
14479
14163
|
{
|
|
14480
14164
|
className: cn(
|
|
@@ -14483,7 +14167,7 @@ function SectionTitle({
|
|
|
14483
14167
|
),
|
|
14484
14168
|
children: [
|
|
14485
14169
|
title,
|
|
14486
|
-
showReset && onReset && /* @__PURE__ */ (0,
|
|
14170
|
+
showReset && onReset && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14487
14171
|
Button,
|
|
14488
14172
|
{
|
|
14489
14173
|
type: "button",
|
|
@@ -14492,7 +14176,7 @@ function SectionTitle({
|
|
|
14492
14176
|
className: "size-4 rounded-full",
|
|
14493
14177
|
onClick: onReset,
|
|
14494
14178
|
"aria-label": resetAriaLabel,
|
|
14495
|
-
children: /* @__PURE__ */ (0,
|
|
14179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react60.RotateCcw, { className: "size-3" })
|
|
14496
14180
|
}
|
|
14497
14181
|
)
|
|
14498
14182
|
]
|
|
@@ -14503,7 +14187,7 @@ function RadioGroupItem2({
|
|
|
14503
14187
|
item,
|
|
14504
14188
|
isTheme = false
|
|
14505
14189
|
}) {
|
|
14506
|
-
return /* @__PURE__ */ (0,
|
|
14190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
14507
14191
|
import_react_radio_group.Item,
|
|
14508
14192
|
{
|
|
14509
14193
|
value: item.value,
|
|
@@ -14511,7 +14195,7 @@ function RadioGroupItem2({
|
|
|
14511
14195
|
"aria-label": `Select ${item.label.toLowerCase()}`,
|
|
14512
14196
|
"aria-describedby": `${item.value}-description`,
|
|
14513
14197
|
children: [
|
|
14514
|
-
/* @__PURE__ */ (0,
|
|
14198
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
14515
14199
|
"div",
|
|
14516
14200
|
{
|
|
14517
14201
|
className: cn(
|
|
@@ -14523,8 +14207,8 @@ function RadioGroupItem2({
|
|
|
14523
14207
|
"aria-hidden": "false",
|
|
14524
14208
|
"aria-label": `${item.label} option preview`,
|
|
14525
14209
|
children: [
|
|
14526
|
-
/* @__PURE__ */ (0,
|
|
14527
|
-
|
|
14210
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14211
|
+
import_lucide_react60.CircleCheck,
|
|
14528
14212
|
{
|
|
14529
14213
|
className: cn(
|
|
14530
14214
|
"size-6 fill-primary stroke-white",
|
|
@@ -14534,7 +14218,7 @@ function RadioGroupItem2({
|
|
|
14534
14218
|
"aria-hidden": "true"
|
|
14535
14219
|
}
|
|
14536
14220
|
),
|
|
14537
|
-
/* @__PURE__ */ (0,
|
|
14221
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14538
14222
|
item.icon,
|
|
14539
14223
|
{
|
|
14540
14224
|
className: cn(
|
|
@@ -14546,7 +14230,7 @@ function RadioGroupItem2({
|
|
|
14546
14230
|
]
|
|
14547
14231
|
}
|
|
14548
14232
|
),
|
|
14549
|
-
/* @__PURE__ */ (0,
|
|
14233
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14550
14234
|
"div",
|
|
14551
14235
|
{
|
|
14552
14236
|
className: "mt-1 text-xs",
|
|
@@ -14561,8 +14245,8 @@ function RadioGroupItem2({
|
|
|
14561
14245
|
}
|
|
14562
14246
|
function ThemeConfig() {
|
|
14563
14247
|
const { defaultTheme, theme, setTheme } = useTheme2();
|
|
14564
|
-
return /* @__PURE__ */ (0,
|
|
14565
|
-
/* @__PURE__ */ (0,
|
|
14248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { children: [
|
|
14249
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14566
14250
|
SectionTitle,
|
|
14567
14251
|
{
|
|
14568
14252
|
title: "Theme",
|
|
@@ -14571,7 +14255,7 @@ function ThemeConfig() {
|
|
|
14571
14255
|
resetAriaLabel: "Reset theme preference to default"
|
|
14572
14256
|
}
|
|
14573
14257
|
),
|
|
14574
|
-
/* @__PURE__ */ (0,
|
|
14258
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14575
14259
|
import_react_radio_group.Root,
|
|
14576
14260
|
{
|
|
14577
14261
|
value: theme,
|
|
@@ -14595,20 +14279,20 @@ function ThemeConfig() {
|
|
|
14595
14279
|
label: "Dark",
|
|
14596
14280
|
icon: IconThemeDark
|
|
14597
14281
|
}
|
|
14598
|
-
].map((item) => /* @__PURE__ */ (0,
|
|
14282
|
+
].map((item) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RadioGroupItem2, { item, isTheme: true }, item.value))
|
|
14599
14283
|
}
|
|
14600
14284
|
),
|
|
14601
|
-
/* @__PURE__ */ (0,
|
|
14285
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { id: "theme-description", className: "sr-only", children: "Choose between system preference, light mode, or dark mode" })
|
|
14602
14286
|
] });
|
|
14603
14287
|
}
|
|
14604
14288
|
function ThemeListSelector() {
|
|
14605
|
-
const [search, setSearch] = (0,
|
|
14289
|
+
const [search, setSearch] = (0, import_react23.useState)("");
|
|
14606
14290
|
const { colorTheme, setColorTheme } = useColorTheme();
|
|
14607
14291
|
const filtered = colorThemes.filter(
|
|
14608
14292
|
(t) => t.label.toLowerCase().includes(search.toLowerCase())
|
|
14609
14293
|
);
|
|
14610
|
-
return /* @__PURE__ */ (0,
|
|
14611
|
-
/* @__PURE__ */ (0,
|
|
14294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
14295
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14612
14296
|
SectionTitle,
|
|
14613
14297
|
{
|
|
14614
14298
|
title: "Color Theme",
|
|
@@ -14617,9 +14301,9 @@ function ThemeListSelector() {
|
|
|
14617
14301
|
resetAriaLabel: "Reset color theme to default"
|
|
14618
14302
|
}
|
|
14619
14303
|
),
|
|
14620
|
-
/* @__PURE__ */ (0,
|
|
14621
|
-
/* @__PURE__ */ (0,
|
|
14622
|
-
/* @__PURE__ */ (0,
|
|
14304
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "relative mb-2.5", children: [
|
|
14305
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react60.Search, { className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
14306
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14623
14307
|
"input",
|
|
14624
14308
|
{
|
|
14625
14309
|
type: "text",
|
|
@@ -14635,21 +14319,21 @@ function ThemeListSelector() {
|
|
|
14635
14319
|
}
|
|
14636
14320
|
)
|
|
14637
14321
|
] }),
|
|
14638
|
-
/* @__PURE__ */ (0,
|
|
14322
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("p", { className: "mb-2 text-xs text-muted-foreground font-medium", children: [
|
|
14639
14323
|
filtered.length,
|
|
14640
14324
|
" theme",
|
|
14641
14325
|
filtered.length !== 1 ? "s" : "",
|
|
14642
14326
|
" available"
|
|
14643
14327
|
] }),
|
|
14644
|
-
/* @__PURE__ */ (0,
|
|
14328
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
14645
14329
|
"div",
|
|
14646
14330
|
{
|
|
14647
14331
|
className: "flex-1 space-y-1 overflow-y-auto rounded-lg pr-1",
|
|
14648
14332
|
role: "radiogroup",
|
|
14649
14333
|
"aria-label": "Select color theme",
|
|
14650
14334
|
children: [
|
|
14651
|
-
filtered.length === 0 && /* @__PURE__ */ (0,
|
|
14652
|
-
filtered.map((ct) => /* @__PURE__ */ (0,
|
|
14335
|
+
filtered.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No themes found" }),
|
|
14336
|
+
filtered.map((ct) => /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
14653
14337
|
"button",
|
|
14654
14338
|
{
|
|
14655
14339
|
onClick: () => setColorTheme(ct.name),
|
|
@@ -14661,7 +14345,7 @@ function ThemeListSelector() {
|
|
|
14661
14345
|
colorTheme === ct.name ? "bg-primary text-primary-foreground shadow-md" : "hover:bg-accent/80 hover:text-foreground border border-transparent hover:border-border/40"
|
|
14662
14346
|
),
|
|
14663
14347
|
children: [
|
|
14664
|
-
/* @__PURE__ */ (0,
|
|
14348
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "flex gap-1.5 shrink-0", children: ct.colors.map((color, i) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14665
14349
|
"span",
|
|
14666
14350
|
{
|
|
14667
14351
|
className: cn(
|
|
@@ -14672,9 +14356,9 @@ function ThemeListSelector() {
|
|
|
14672
14356
|
},
|
|
14673
14357
|
i
|
|
14674
14358
|
)) }),
|
|
14675
|
-
/* @__PURE__ */ (0,
|
|
14676
|
-
/* @__PURE__ */ (0,
|
|
14677
|
-
ct.category === "tweakcn" && /* @__PURE__ */ (0,
|
|
14359
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "flex items-center gap-1.5 truncate", children: [
|
|
14360
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "text-sm font-medium truncate", children: ct.label }),
|
|
14361
|
+
ct.category === "tweakcn" && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14678
14362
|
"span",
|
|
14679
14363
|
{
|
|
14680
14364
|
className: cn(
|
|
@@ -14684,7 +14368,7 @@ function ThemeListSelector() {
|
|
|
14684
14368
|
}
|
|
14685
14369
|
)
|
|
14686
14370
|
] }),
|
|
14687
|
-
colorTheme === ct.name && /* @__PURE__ */ (0,
|
|
14371
|
+
colorTheme === ct.name && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react60.Check, { className: "ml-auto size-4 shrink-0", strokeWidth: 3 })
|
|
14688
14372
|
]
|
|
14689
14373
|
},
|
|
14690
14374
|
ct.name
|
|
@@ -14696,7 +14380,7 @@ function ThemeListSelector() {
|
|
|
14696
14380
|
}
|
|
14697
14381
|
|
|
14698
14382
|
// src/design-system/templates/nav-user.tsx
|
|
14699
|
-
var
|
|
14383
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
14700
14384
|
function NavUser({ user: fallbackUser }) {
|
|
14701
14385
|
const { isMobile } = useSidebar();
|
|
14702
14386
|
const [open, setOpen] = useDialogState();
|
|
@@ -14705,28 +14389,28 @@ function NavUser({ user: fallbackUser }) {
|
|
|
14705
14389
|
const userEmail = auth.user?.email || fallbackUser.email;
|
|
14706
14390
|
const userAvatar = auth.user?.picture || fallbackUser.avatar;
|
|
14707
14391
|
const userInitials = userName.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
|
|
14708
|
-
return /* @__PURE__ */ (0,
|
|
14709
|
-
/* @__PURE__ */ (0,
|
|
14710
|
-
/* @__PURE__ */ (0,
|
|
14392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_jsx_runtime116.Fragment, { children: [
|
|
14393
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(DropdownMenu, { modal: false, children: [
|
|
14394
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
14711
14395
|
SidebarMenuButton,
|
|
14712
14396
|
{
|
|
14713
14397
|
size: "lg",
|
|
14714
14398
|
tooltip: userName,
|
|
14715
14399
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
14716
14400
|
children: [
|
|
14717
|
-
/* @__PURE__ */ (0,
|
|
14718
|
-
/* @__PURE__ */ (0,
|
|
14719
|
-
/* @__PURE__ */ (0,
|
|
14401
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Avatar, { className: "h-8 w-8 rounded-lg", children: [
|
|
14402
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(AvatarImage, { src: userAvatar, alt: userName }),
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(AvatarFallback, { className: "rounded-lg", children: userInitials })
|
|
14720
14404
|
] }),
|
|
14721
|
-
/* @__PURE__ */ (0,
|
|
14722
|
-
/* @__PURE__ */ (0,
|
|
14723
|
-
/* @__PURE__ */ (0,
|
|
14405
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
14406
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "truncate font-semibold", children: userName }),
|
|
14407
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: userEmail })
|
|
14724
14408
|
] }),
|
|
14725
|
-
/* @__PURE__ */ (0,
|
|
14409
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react61.ChevronsUpDown, { className: "ml-auto size-4 shrink-0" })
|
|
14726
14410
|
]
|
|
14727
14411
|
}
|
|
14728
14412
|
) }),
|
|
14729
|
-
/* @__PURE__ */ (0,
|
|
14413
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
14730
14414
|
DropdownMenuContent,
|
|
14731
14415
|
{
|
|
14732
14416
|
className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
|
|
@@ -14734,43 +14418,43 @@ function NavUser({ user: fallbackUser }) {
|
|
|
14734
14418
|
align: "end",
|
|
14735
14419
|
sideOffset: 4,
|
|
14736
14420
|
children: [
|
|
14737
|
-
/* @__PURE__ */ (0,
|
|
14738
|
-
/* @__PURE__ */ (0,
|
|
14739
|
-
/* @__PURE__ */ (0,
|
|
14740
|
-
/* @__PURE__ */ (0,
|
|
14421
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(DropdownMenuLabel, { className: "p-0 font-normal", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex items-center gap-2 px-1 py-1.5 text-start text-sm", children: [
|
|
14422
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Avatar, { className: "h-8 w-8 rounded-lg", children: [
|
|
14423
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(AvatarImage, { src: userAvatar, alt: userName }),
|
|
14424
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(AvatarFallback, { className: "rounded-lg", children: userInitials })
|
|
14741
14425
|
] }),
|
|
14742
|
-
/* @__PURE__ */ (0,
|
|
14743
|
-
/* @__PURE__ */ (0,
|
|
14744
|
-
/* @__PURE__ */ (0,
|
|
14426
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
14427
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "truncate font-semibold", children: userName }),
|
|
14428
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: userEmail })
|
|
14745
14429
|
] })
|
|
14746
14430
|
] }) }),
|
|
14747
|
-
/* @__PURE__ */ (0,
|
|
14748
|
-
/* @__PURE__ */ (0,
|
|
14431
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(DropdownMenuSeparator, {}),
|
|
14432
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
14749
14433
|
ConfigDrawer,
|
|
14750
14434
|
{
|
|
14751
|
-
trigger: /* @__PURE__ */ (0,
|
|
14752
|
-
/* @__PURE__ */ (0,
|
|
14435
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(DropdownMenuItem, { onSelect: (e) => e.preventDefault(), children: [
|
|
14436
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react61.Palette, { className: "mr-2 h-4 w-4" }),
|
|
14753
14437
|
"Theme"
|
|
14754
14438
|
] })
|
|
14755
14439
|
}
|
|
14756
14440
|
),
|
|
14757
|
-
/* @__PURE__ */ (0,
|
|
14441
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
14758
14442
|
ConfigDrawer,
|
|
14759
14443
|
{
|
|
14760
|
-
trigger: /* @__PURE__ */ (0,
|
|
14761
|
-
/* @__PURE__ */ (0,
|
|
14444
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(DropdownMenuItem, { onSelect: (e) => e.preventDefault(), children: [
|
|
14445
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react61.Settings, { className: "mr-2 h-4 w-4" }),
|
|
14762
14446
|
"Setting"
|
|
14763
14447
|
] })
|
|
14764
14448
|
}
|
|
14765
14449
|
),
|
|
14766
|
-
/* @__PURE__ */ (0,
|
|
14767
|
-
/* @__PURE__ */ (0,
|
|
14450
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(DropdownMenuSeparator, {}),
|
|
14451
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
14768
14452
|
DropdownMenuItem,
|
|
14769
14453
|
{
|
|
14770
14454
|
variant: "destructive",
|
|
14771
14455
|
onClick: () => setOpen(true),
|
|
14772
14456
|
children: [
|
|
14773
|
-
/* @__PURE__ */ (0,
|
|
14457
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react61.LogOut, { className: "mr-2 h-4 w-4" }),
|
|
14774
14458
|
"Sign out"
|
|
14775
14459
|
]
|
|
14776
14460
|
}
|
|
@@ -14779,19 +14463,19 @@ function NavUser({ user: fallbackUser }) {
|
|
|
14779
14463
|
}
|
|
14780
14464
|
)
|
|
14781
14465
|
] }) }) }),
|
|
14782
|
-
/* @__PURE__ */ (0,
|
|
14466
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(SignOutDialog, { open: !!open, onOpenChange: setOpen })
|
|
14783
14467
|
] });
|
|
14784
14468
|
}
|
|
14785
14469
|
|
|
14786
14470
|
// src/design-system/templates/app-sidebar.tsx
|
|
14787
|
-
var
|
|
14471
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
14788
14472
|
function AppSidebar() {
|
|
14789
14473
|
const { collapsible } = useLayout();
|
|
14790
|
-
return /* @__PURE__ */ (0,
|
|
14791
|
-
/* @__PURE__ */ (0,
|
|
14792
|
-
/* @__PURE__ */ (0,
|
|
14793
|
-
/* @__PURE__ */ (0,
|
|
14794
|
-
/* @__PURE__ */ (0,
|
|
14474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(Sidebar, { collapsible, variant: "sidebar", children: [
|
|
14475
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(SidebarHeader, { className: "p-2 pb-1", children: [
|
|
14476
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "flex items-center justify-between gap-1", children: [
|
|
14477
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TeamSwitcher, { teams: sidebarData2.teams }) }),
|
|
14478
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "group-data-[collapsible=icon]:hidden shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14795
14479
|
SidebarTrigger,
|
|
14796
14480
|
{
|
|
14797
14481
|
variant: "ghost",
|
|
@@ -14800,7 +14484,7 @@ function AppSidebar() {
|
|
|
14800
14484
|
}
|
|
14801
14485
|
) })
|
|
14802
14486
|
] }),
|
|
14803
|
-
/* @__PURE__ */ (0,
|
|
14487
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "hidden group-data-[collapsible=icon]:flex justify-center pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14804
14488
|
SidebarTrigger,
|
|
14805
14489
|
{
|
|
14806
14490
|
variant: "ghost",
|
|
@@ -14809,37 +14493,37 @@ function AppSidebar() {
|
|
|
14809
14493
|
}
|
|
14810
14494
|
) })
|
|
14811
14495
|
] }),
|
|
14812
|
-
/* @__PURE__ */ (0,
|
|
14813
|
-
/* @__PURE__ */ (0,
|
|
14496
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(SidebarContent, { children: sidebarData2.navGroups.map((props) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(NavGroup, { ...props }, props.title)) }),
|
|
14497
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(SidebarFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(NavUser, { user: sidebarData2.user }) })
|
|
14814
14498
|
] });
|
|
14815
14499
|
}
|
|
14816
14500
|
|
|
14817
14501
|
// src/design-system/templates/app-title.tsx
|
|
14818
14502
|
var import_link2 = __toESM(require("next/link"));
|
|
14819
|
-
var
|
|
14820
|
-
var
|
|
14503
|
+
var import_lucide_react62 = require("lucide-react");
|
|
14504
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
14821
14505
|
function AppTitle() {
|
|
14822
14506
|
const { setOpenMobile } = useSidebar();
|
|
14823
|
-
return /* @__PURE__ */ (0,
|
|
14507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
14824
14508
|
SidebarMenuButton,
|
|
14825
14509
|
{
|
|
14826
14510
|
size: "lg",
|
|
14827
14511
|
className: "gap-0 py-0 hover:bg-transparent active:bg-transparent",
|
|
14828
14512
|
asChild: true,
|
|
14829
|
-
children: /* @__PURE__ */ (0,
|
|
14830
|
-
/* @__PURE__ */ (0,
|
|
14513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { children: [
|
|
14514
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
14831
14515
|
import_link2.default,
|
|
14832
14516
|
{
|
|
14833
14517
|
href: "/",
|
|
14834
14518
|
onClick: () => setOpenMobile(false),
|
|
14835
14519
|
className: "grid flex-1 text-start text-sm leading-tight",
|
|
14836
14520
|
children: [
|
|
14837
|
-
/* @__PURE__ */ (0,
|
|
14838
|
-
/* @__PURE__ */ (0,
|
|
14521
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "truncate font-bold", children: "Shadcn-Admin" }),
|
|
14522
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "truncate text-xs", children: "Vite + ShadcnUI" })
|
|
14839
14523
|
]
|
|
14840
14524
|
}
|
|
14841
14525
|
),
|
|
14842
|
-
/* @__PURE__ */ (0,
|
|
14526
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(ToggleSidebar, {})
|
|
14843
14527
|
] })
|
|
14844
14528
|
}
|
|
14845
14529
|
) }) });
|
|
@@ -14850,7 +14534,7 @@ function ToggleSidebar({
|
|
|
14850
14534
|
...props
|
|
14851
14535
|
}) {
|
|
14852
14536
|
const { toggleSidebar } = useSidebar();
|
|
14853
|
-
return /* @__PURE__ */ (0,
|
|
14537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
14854
14538
|
Button,
|
|
14855
14539
|
{
|
|
14856
14540
|
"data-sidebar": "trigger",
|
|
@@ -14864,31 +14548,31 @@ function ToggleSidebar({
|
|
|
14864
14548
|
},
|
|
14865
14549
|
...props,
|
|
14866
14550
|
children: [
|
|
14867
|
-
/* @__PURE__ */ (0,
|
|
14868
|
-
/* @__PURE__ */ (0,
|
|
14869
|
-
/* @__PURE__ */ (0,
|
|
14551
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react62.X, { className: "md:hidden" }),
|
|
14552
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react62.Menu, { className: "max-md:hidden" }),
|
|
14553
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
14870
14554
|
]
|
|
14871
14555
|
}
|
|
14872
14556
|
);
|
|
14873
14557
|
}
|
|
14874
14558
|
|
|
14875
14559
|
// src/design-system/templates/authenticated-layout.tsx
|
|
14876
|
-
var
|
|
14560
|
+
var import_react25 = require("react");
|
|
14877
14561
|
var import_navigation6 = require("next/navigation");
|
|
14878
14562
|
|
|
14879
14563
|
// src/components/layout/app-sidebar.tsx
|
|
14880
|
-
var
|
|
14564
|
+
var import_react24 = require("react");
|
|
14881
14565
|
|
|
14882
14566
|
// src/components/layout/nav-group.tsx
|
|
14883
14567
|
var import_link3 = __toESM(require("next/link"));
|
|
14884
14568
|
var import_navigation4 = require("next/navigation");
|
|
14885
|
-
var
|
|
14886
|
-
var
|
|
14569
|
+
var import_lucide_react63 = require("lucide-react");
|
|
14570
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
14887
14571
|
function NavGroup2({ title, items }) {
|
|
14888
14572
|
const { state, isMobile, openMobile, setOpenMobile } = useSidebar();
|
|
14889
14573
|
const href = (0, import_navigation4.usePathname)();
|
|
14890
|
-
return /* @__PURE__ */ (0,
|
|
14891
|
-
/* @__PURE__ */ (0,
|
|
14574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(SidebarGroup, { className: cn(title === "Menu" && "pt-0"), children: [
|
|
14575
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
14892
14576
|
SidebarGroupLabel,
|
|
14893
14577
|
{
|
|
14894
14578
|
className: cn(
|
|
@@ -14896,8 +14580,8 @@ function NavGroup2({ title, items }) {
|
|
|
14896
14580
|
title === "Menu" && state !== "collapsed" && "sticky top-0 z-20 bg-sidebar py-1.5"
|
|
14897
14581
|
),
|
|
14898
14582
|
children: [
|
|
14899
|
-
/* @__PURE__ */ (0,
|
|
14900
|
-
title === "Menu" && !isMobile && /* @__PURE__ */ (0,
|
|
14583
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { children: title }),
|
|
14584
|
+
title === "Menu" && !isMobile && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
14901
14585
|
SidebarTrigger,
|
|
14902
14586
|
{
|
|
14903
14587
|
variant: "ghost",
|
|
@@ -14905,7 +14589,7 @@ function NavGroup2({ title, items }) {
|
|
|
14905
14589
|
"aria-label": "Toggle sidebar"
|
|
14906
14590
|
}
|
|
14907
14591
|
),
|
|
14908
|
-
title === "Menu" && isMobile && openMobile && /* @__PURE__ */ (0,
|
|
14592
|
+
title === "Menu" && isMobile && openMobile && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
14909
14593
|
Button,
|
|
14910
14594
|
{
|
|
14911
14595
|
type: "button",
|
|
@@ -14914,37 +14598,37 @@ function NavGroup2({ title, items }) {
|
|
|
14914
14598
|
className: "size-6 shrink-0",
|
|
14915
14599
|
"aria-label": "Close sidebar",
|
|
14916
14600
|
onClick: () => setOpenMobile(false),
|
|
14917
|
-
children: /* @__PURE__ */ (0,
|
|
14601
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react63.X, { className: "size-4", "aria-hidden": "true" })
|
|
14918
14602
|
}
|
|
14919
14603
|
)
|
|
14920
14604
|
]
|
|
14921
14605
|
}
|
|
14922
14606
|
),
|
|
14923
|
-
/* @__PURE__ */ (0,
|
|
14607
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenu, { children: items.map((item) => {
|
|
14924
14608
|
const key = `${item.title}-${item.url}`;
|
|
14925
14609
|
if (!item.items)
|
|
14926
|
-
return /* @__PURE__ */ (0,
|
|
14610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuLink2, { item, href }, key);
|
|
14927
14611
|
if (item.title === "Settings" && item.items.length === 0)
|
|
14928
|
-
return /* @__PURE__ */ (0,
|
|
14612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuSettings2, { item }, key);
|
|
14929
14613
|
if (state === "collapsed" && !isMobile)
|
|
14930
|
-
return /* @__PURE__ */ (0,
|
|
14931
|
-
return /* @__PURE__ */ (0,
|
|
14614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuCollapsedDropdown2, { item, href }, key);
|
|
14615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuCollapsible2, { item, href }, key);
|
|
14932
14616
|
}) })
|
|
14933
14617
|
] });
|
|
14934
14618
|
}
|
|
14935
14619
|
function NavBadge2({ children }) {
|
|
14936
|
-
return /* @__PURE__ */ (0,
|
|
14620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Badge, { className: "rounded-full px-1 py-0 text-xs", children });
|
|
14937
14621
|
}
|
|
14938
14622
|
function SidebarMenuLink2({ item, href }) {
|
|
14939
14623
|
const { setOpenMobile } = useSidebar();
|
|
14940
14624
|
const { setShowInlineNotFound } = useLayout();
|
|
14941
|
-
return /* @__PURE__ */ (0,
|
|
14625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
14942
14626
|
SidebarMenuButton,
|
|
14943
14627
|
{
|
|
14944
14628
|
asChild: true,
|
|
14945
14629
|
isActive: checkIsActive2(href, item),
|
|
14946
14630
|
tooltip: item.title,
|
|
14947
|
-
children: /* @__PURE__ */ (0,
|
|
14631
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
14948
14632
|
import_link3.default,
|
|
14949
14633
|
{
|
|
14950
14634
|
href: item.url,
|
|
@@ -14953,9 +14637,9 @@ function SidebarMenuLink2({ item, href }) {
|
|
|
14953
14637
|
setOpenMobile(false);
|
|
14954
14638
|
},
|
|
14955
14639
|
children: [
|
|
14956
|
-
item.icon && /* @__PURE__ */ (0,
|
|
14957
|
-
/* @__PURE__ */ (0,
|
|
14958
|
-
item.badge && /* @__PURE__ */ (0,
|
|
14640
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(item.icon, {}),
|
|
14641
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { children: item.title }),
|
|
14642
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(NavBadge2, { children: item.badge })
|
|
14959
14643
|
]
|
|
14960
14644
|
}
|
|
14961
14645
|
)
|
|
@@ -14965,7 +14649,7 @@ function SidebarMenuLink2({ item, href }) {
|
|
|
14965
14649
|
function SidebarMenuSettings2({ item }) {
|
|
14966
14650
|
const { setOpenMobile } = useSidebar();
|
|
14967
14651
|
const { showInlineNotFound, setShowInlineNotFound } = useLayout();
|
|
14968
|
-
return /* @__PURE__ */ (0,
|
|
14652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
14969
14653
|
SidebarMenuButton,
|
|
14970
14654
|
{
|
|
14971
14655
|
tooltip: item.title,
|
|
@@ -14975,8 +14659,8 @@ function SidebarMenuSettings2({ item }) {
|
|
|
14975
14659
|
setOpenMobile(false);
|
|
14976
14660
|
},
|
|
14977
14661
|
children: [
|
|
14978
|
-
item.icon && /* @__PURE__ */ (0,
|
|
14979
|
-
/* @__PURE__ */ (0,
|
|
14662
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(item.icon, {}),
|
|
14663
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { children: item.title })
|
|
14980
14664
|
]
|
|
14981
14665
|
}
|
|
14982
14666
|
) });
|
|
@@ -14987,25 +14671,25 @@ function SidebarMenuCollapsible2({
|
|
|
14987
14671
|
}) {
|
|
14988
14672
|
const { setOpenMobile } = useSidebar();
|
|
14989
14673
|
const { setShowInlineNotFound } = useLayout();
|
|
14990
|
-
return /* @__PURE__ */ (0,
|
|
14674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
14991
14675
|
Collapsible,
|
|
14992
14676
|
{
|
|
14993
14677
|
asChild: true,
|
|
14994
14678
|
defaultOpen: checkIsActive2(href, item, true),
|
|
14995
14679
|
className: "group/collapsible",
|
|
14996
|
-
children: /* @__PURE__ */ (0,
|
|
14997
|
-
/* @__PURE__ */ (0,
|
|
14998
|
-
item.icon && /* @__PURE__ */ (0,
|
|
14999
|
-
/* @__PURE__ */ (0,
|
|
15000
|
-
item.badge && /* @__PURE__ */ (0,
|
|
15001
|
-
/* @__PURE__ */ (0,
|
|
14680
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(SidebarMenuItem, { children: [
|
|
14681
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(SidebarMenuButton, { tooltip: item.title, children: [
|
|
14682
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(item.icon, {}),
|
|
14683
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { children: item.title }),
|
|
14684
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(NavBadge2, { children: item.badge }),
|
|
14685
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react63.ChevronRight, { className: "ms-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180" })
|
|
15002
14686
|
] }) }),
|
|
15003
|
-
/* @__PURE__ */ (0,
|
|
14687
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(CollapsibleContent, { className: "CollapsibleContent", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuSub, { children: item.items.map((subItem) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuSubItem, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
15004
14688
|
SidebarMenuSubButton,
|
|
15005
14689
|
{
|
|
15006
14690
|
asChild: true,
|
|
15007
14691
|
isActive: checkIsActive2(href, subItem),
|
|
15008
|
-
children: /* @__PURE__ */ (0,
|
|
14692
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
15009
14693
|
import_link3.default,
|
|
15010
14694
|
{
|
|
15011
14695
|
href: subItem.url,
|
|
@@ -15014,9 +14698,9 @@ function SidebarMenuCollapsible2({
|
|
|
15014
14698
|
setOpenMobile(false);
|
|
15015
14699
|
},
|
|
15016
14700
|
children: [
|
|
15017
|
-
subItem.icon && /* @__PURE__ */ (0,
|
|
15018
|
-
/* @__PURE__ */ (0,
|
|
15019
|
-
subItem.badge && /* @__PURE__ */ (0,
|
|
14701
|
+
subItem.icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(subItem.icon, {}),
|
|
14702
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { children: subItem.title }),
|
|
14703
|
+
subItem.badge && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(NavBadge2, { children: subItem.badge })
|
|
15020
14704
|
]
|
|
15021
14705
|
}
|
|
15022
14706
|
)
|
|
@@ -15030,36 +14714,36 @@ function SidebarMenuCollapsedDropdown2({
|
|
|
15030
14714
|
item,
|
|
15031
14715
|
href
|
|
15032
14716
|
}) {
|
|
15033
|
-
return /* @__PURE__ */ (0,
|
|
15034
|
-
/* @__PURE__ */ (0,
|
|
14717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(DropdownMenu, { children: [
|
|
14718
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
15035
14719
|
SidebarMenuButton,
|
|
15036
14720
|
{
|
|
15037
14721
|
tooltip: item.title,
|
|
15038
14722
|
isActive: checkIsActive2(href, item),
|
|
15039
14723
|
children: [
|
|
15040
|
-
item.icon && /* @__PURE__ */ (0,
|
|
15041
|
-
/* @__PURE__ */ (0,
|
|
15042
|
-
item.badge && /* @__PURE__ */ (0,
|
|
15043
|
-
/* @__PURE__ */ (0,
|
|
14724
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(item.icon, {}),
|
|
14725
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { children: item.title }),
|
|
14726
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(NavBadge2, { children: item.badge }),
|
|
14727
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react63.ChevronRight, { className: "ms-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
15044
14728
|
]
|
|
15045
14729
|
}
|
|
15046
14730
|
) }),
|
|
15047
|
-
/* @__PURE__ */ (0,
|
|
15048
|
-
/* @__PURE__ */ (0,
|
|
14731
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(DropdownMenuContent, { side: "right", align: "start", sideOffset: 4, children: [
|
|
14732
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(DropdownMenuLabel, { children: [
|
|
15049
14733
|
item.title,
|
|
15050
14734
|
" ",
|
|
15051
14735
|
item.badge ? `(${item.badge})` : ""
|
|
15052
14736
|
] }),
|
|
15053
|
-
/* @__PURE__ */ (0,
|
|
15054
|
-
item.items.map((sub) => /* @__PURE__ */ (0,
|
|
14737
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(DropdownMenuSeparator, {}),
|
|
14738
|
+
item.items.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
15055
14739
|
import_link3.default,
|
|
15056
14740
|
{
|
|
15057
14741
|
href: sub.url,
|
|
15058
14742
|
className: `${checkIsActive2(href, sub) ? "bg-secondary" : ""}`,
|
|
15059
14743
|
children: [
|
|
15060
|
-
sub.icon && /* @__PURE__ */ (0,
|
|
15061
|
-
/* @__PURE__ */ (0,
|
|
15062
|
-
sub.badge && /* @__PURE__ */ (0,
|
|
14744
|
+
sub.icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(sub.icon, {}),
|
|
14745
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "max-w-52 text-wrap", children: sub.title }),
|
|
14746
|
+
sub.badge && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "ms-auto text-xs", children: sub.badge })
|
|
15063
14747
|
]
|
|
15064
14748
|
}
|
|
15065
14749
|
) }, `${sub.title}-${sub.url}`))
|
|
@@ -15074,9 +14758,9 @@ function checkIsActive2(href, item, mainNav = false) {
|
|
|
15074
14758
|
}
|
|
15075
14759
|
|
|
15076
14760
|
// src/components/layout/nav-user.tsx
|
|
15077
|
-
var
|
|
14761
|
+
var import_lucide_react64 = require("lucide-react");
|
|
15078
14762
|
var import_link4 = __toESM(require("next/link"));
|
|
15079
|
-
var
|
|
14763
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
15080
14764
|
function NavUser2({ user: fallbackUser }) {
|
|
15081
14765
|
const { isMobile } = useSidebar();
|
|
15082
14766
|
const [open, setOpen] = useDialogState();
|
|
@@ -15086,28 +14770,28 @@ function NavUser2({ user: fallbackUser }) {
|
|
|
15086
14770
|
const userEmail = auth.user?.email || fallbackUser.email;
|
|
15087
14771
|
const userAvatar = auth.user?.picture || fallbackUser.avatar;
|
|
15088
14772
|
const userInitials = userName.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
|
|
15089
|
-
return /* @__PURE__ */ (0,
|
|
15090
|
-
/* @__PURE__ */ (0,
|
|
15091
|
-
/* @__PURE__ */ (0,
|
|
14773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
|
|
14774
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(DropdownMenu, { modal: false, children: [
|
|
14775
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
15092
14776
|
SidebarMenuButton,
|
|
15093
14777
|
{
|
|
15094
14778
|
size: "lg",
|
|
15095
14779
|
tooltip: userName,
|
|
15096
14780
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
15097
14781
|
children: [
|
|
15098
|
-
/* @__PURE__ */ (0,
|
|
15099
|
-
/* @__PURE__ */ (0,
|
|
15100
|
-
/* @__PURE__ */ (0,
|
|
14782
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(Avatar, { className: "h-8 w-8 rounded-lg", children: [
|
|
14783
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(AvatarImage, { src: userAvatar, alt: userName }),
|
|
14784
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(AvatarFallback, { className: "rounded-lg", children: userInitials })
|
|
15101
14785
|
] }),
|
|
15102
|
-
/* @__PURE__ */ (0,
|
|
15103
|
-
/* @__PURE__ */ (0,
|
|
15104
|
-
/* @__PURE__ */ (0,
|
|
14786
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
14787
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "truncate font-semibold", children: userName }),
|
|
14788
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: userEmail })
|
|
15105
14789
|
] }),
|
|
15106
|
-
/* @__PURE__ */ (0,
|
|
14790
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.ChevronsUpDown, { className: "ml-auto size-4 shrink-0" })
|
|
15107
14791
|
]
|
|
15108
14792
|
}
|
|
15109
14793
|
) }),
|
|
15110
|
-
/* @__PURE__ */ (0,
|
|
14794
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
15111
14795
|
DropdownMenuContent,
|
|
15112
14796
|
{
|
|
15113
14797
|
className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
|
|
@@ -15115,59 +14799,59 @@ function NavUser2({ user: fallbackUser }) {
|
|
|
15115
14799
|
align: "end",
|
|
15116
14800
|
sideOffset: 4,
|
|
15117
14801
|
children: [
|
|
15118
|
-
/* @__PURE__ */ (0,
|
|
15119
|
-
/* @__PURE__ */ (0,
|
|
15120
|
-
/* @__PURE__ */ (0,
|
|
15121
|
-
/* @__PURE__ */ (0,
|
|
14802
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DropdownMenuLabel, { className: "p-0 font-normal", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-center gap-2 px-1 py-1.5 text-start text-sm", children: [
|
|
14803
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(Avatar, { className: "h-8 w-8 rounded-lg", children: [
|
|
14804
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(AvatarImage, { src: userAvatar, alt: userName }),
|
|
14805
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(AvatarFallback, { className: "rounded-lg", children: userInitials })
|
|
15122
14806
|
] }),
|
|
15123
|
-
/* @__PURE__ */ (0,
|
|
15124
|
-
/* @__PURE__ */ (0,
|
|
15125
|
-
/* @__PURE__ */ (0,
|
|
14807
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
14808
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "truncate font-semibold", children: userName }),
|
|
14809
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: userEmail })
|
|
15126
14810
|
] })
|
|
15127
14811
|
] }) }),
|
|
15128
|
-
/* @__PURE__ */ (0,
|
|
15129
|
-
/* @__PURE__ */ (0,
|
|
15130
|
-
/* @__PURE__ */ (0,
|
|
14812
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DropdownMenuSeparator, {}),
|
|
14813
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
14814
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.User, { className: "mr-2 h-4 w-4" }),
|
|
15131
14815
|
"My Profile"
|
|
15132
14816
|
] }),
|
|
15133
|
-
/* @__PURE__ */ (0,
|
|
15134
|
-
/* @__PURE__ */ (0,
|
|
14817
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
14818
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.Bell, { className: "mr-2 h-4 w-4" }),
|
|
15135
14819
|
"Notifications"
|
|
15136
14820
|
] }),
|
|
15137
|
-
/* @__PURE__ */ (0,
|
|
15138
|
-
/* @__PURE__ */ (0,
|
|
14821
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
14822
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.MessageCircle, { className: "mr-2 h-4 w-4" }),
|
|
15139
14823
|
"Help & Support"
|
|
15140
14824
|
] }),
|
|
15141
|
-
/* @__PURE__ */ (0,
|
|
15142
|
-
/* @__PURE__ */ (0,
|
|
15143
|
-
/* @__PURE__ */ (0,
|
|
14825
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DropdownMenuSeparator, {}),
|
|
14826
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
14827
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.CreditCard, { className: "mr-2 h-4 w-4" }),
|
|
15144
14828
|
"Subscriptions"
|
|
15145
14829
|
] }),
|
|
15146
|
-
/* @__PURE__ */ (0,
|
|
15147
|
-
/* @__PURE__ */ (0,
|
|
14830
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_link4.default, { href: "/apps", children: [
|
|
14831
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.ShoppingBag, { className: "mr-2 h-4 w-4" }),
|
|
15148
14832
|
"Buy Apps"
|
|
15149
14833
|
] }) }),
|
|
15150
|
-
/* @__PURE__ */ (0,
|
|
14834
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
15151
14835
|
ConfigDrawer,
|
|
15152
14836
|
{
|
|
15153
|
-
trigger: /* @__PURE__ */ (0,
|
|
15154
|
-
/* @__PURE__ */ (0,
|
|
14837
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(DropdownMenuItem, { onSelect: (e) => e.preventDefault(), children: [
|
|
14838
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.Palette, { className: "mr-2 h-4 w-4" }),
|
|
15155
14839
|
"Theme Settings"
|
|
15156
14840
|
] })
|
|
15157
14841
|
}
|
|
15158
14842
|
),
|
|
15159
|
-
/* @__PURE__ */ (0,
|
|
15160
|
-
/* @__PURE__ */ (0,
|
|
14843
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
14844
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.Settings, { className: "mr-2 h-4 w-4" }),
|
|
15161
14845
|
"Settings"
|
|
15162
14846
|
] }),
|
|
15163
|
-
/* @__PURE__ */ (0,
|
|
15164
|
-
/* @__PURE__ */ (0,
|
|
14847
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DropdownMenuSeparator, {}),
|
|
14848
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
15165
14849
|
DropdownMenuItem,
|
|
15166
14850
|
{
|
|
15167
14851
|
variant: "destructive",
|
|
15168
14852
|
onClick: () => setOpen(true),
|
|
15169
14853
|
children: [
|
|
15170
|
-
/* @__PURE__ */ (0,
|
|
14854
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react64.LogOut, { className: "mr-2 h-4 w-4" }),
|
|
15171
14855
|
"Sign out"
|
|
15172
14856
|
]
|
|
15173
14857
|
}
|
|
@@ -15176,12 +14860,12 @@ function NavUser2({ user: fallbackUser }) {
|
|
|
15176
14860
|
}
|
|
15177
14861
|
)
|
|
15178
14862
|
] }) }) }),
|
|
15179
|
-
/* @__PURE__ */ (0,
|
|
14863
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SignOutDialog, { open: !!open, onOpenChange: setOpen })
|
|
15180
14864
|
] });
|
|
15181
14865
|
}
|
|
15182
14866
|
|
|
15183
14867
|
// src/components/layout/app-sidebar.tsx
|
|
15184
|
-
var
|
|
14868
|
+
var import_jsx_runtime121 = (
|
|
15185
14869
|
// Sidebar ko fixed "sidebar" variant par lock kiya gaya hai (floating remove).
|
|
15186
14870
|
require("react/jsx-runtime")
|
|
15187
14871
|
);
|
|
@@ -15189,7 +14873,7 @@ function AppSidebar2() {
|
|
|
15189
14873
|
const { collapsible } = useLayout();
|
|
15190
14874
|
const currentUser = useAuthStore((state) => state.auth.user);
|
|
15191
14875
|
const { unreadCount, fetchNotifications, subscribeToNotifications, unsubscribe } = useNotificationStore();
|
|
15192
|
-
(0,
|
|
14876
|
+
(0, import_react24.useEffect)(() => {
|
|
15193
14877
|
if (currentUser) {
|
|
15194
14878
|
fetchNotifications(currentUser.accountNo);
|
|
15195
14879
|
subscribeToNotifications(currentUser.accountNo);
|
|
@@ -15213,9 +14897,9 @@ function AppSidebar2() {
|
|
|
15213
14897
|
})
|
|
15214
14898
|
}))
|
|
15215
14899
|
};
|
|
15216
|
-
return /* @__PURE__ */ (0,
|
|
15217
|
-
/* @__PURE__ */ (0,
|
|
15218
|
-
/* @__PURE__ */ (0,
|
|
14900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(Sidebar, { collapsible, variant: "sidebar", children: [
|
|
14901
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(SidebarHeader, { className: "pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TeamSwitcher, { teams: dynamicSidebarData.teams }) }),
|
|
14902
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "hidden group-data-[state=collapsed]:flex justify-center py-2", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
15219
14903
|
SidebarTrigger,
|
|
15220
14904
|
{
|
|
15221
14905
|
variant: "ghost",
|
|
@@ -15223,15 +14907,15 @@ function AppSidebar2() {
|
|
|
15223
14907
|
"aria-label": "Toggle sidebar"
|
|
15224
14908
|
}
|
|
15225
14909
|
) }),
|
|
15226
|
-
/* @__PURE__ */ (0,
|
|
15227
|
-
/* @__PURE__ */ (0,
|
|
14910
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(SidebarContent, { children: dynamicSidebarData.navGroups.map((props) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(NavGroup2, { ...props }, props.title)) }),
|
|
14911
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(SidebarFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(NavUser2, { user: dynamicSidebarData.user }) })
|
|
15228
14912
|
] });
|
|
15229
14913
|
}
|
|
15230
14914
|
|
|
15231
14915
|
// src/components/skip-to-main.tsx
|
|
15232
|
-
var
|
|
14916
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
15233
14917
|
function SkipToMain() {
|
|
15234
|
-
return /* @__PURE__ */ (0,
|
|
14918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
15235
14919
|
"a",
|
|
15236
14920
|
{
|
|
15237
14921
|
className: `fixed inset-s-44 z-999 -translate-y-52 bg-primary px-4 py-2 text-sm font-medium whitespace-nowrap text-primary-foreground opacity-95 shadow-sm transition hover:bg-primary/90 focus:translate-y-3 focus:transform focus-visible:ring-1 focus-visible:ring-ring`,
|
|
@@ -15243,7 +14927,7 @@ function SkipToMain() {
|
|
|
15243
14927
|
|
|
15244
14928
|
// src/features/errors/not-found-error.tsx
|
|
15245
14929
|
var import_navigation5 = require("next/navigation");
|
|
15246
|
-
var
|
|
14930
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
15247
14931
|
function NotFoundError({
|
|
15248
14932
|
className,
|
|
15249
14933
|
embedded = false,
|
|
@@ -15261,8 +14945,8 @@ function NotFoundError({
|
|
|
15261
14945
|
if (onDismiss) onDismiss();
|
|
15262
14946
|
router.push("/");
|
|
15263
14947
|
};
|
|
15264
|
-
return /* @__PURE__ */ (0,
|
|
15265
|
-
/* @__PURE__ */ (0,
|
|
14948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: cn(embedded ? "min-h-96 w-full py-8" : "h-svh", className), children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "m-auto flex h-full w-full flex-col items-center justify-center gap-2", children: [
|
|
14949
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
15266
14950
|
"h1",
|
|
15267
14951
|
{
|
|
15268
14952
|
className: cn(
|
|
@@ -15272,31 +14956,31 @@ function NotFoundError({
|
|
|
15272
14956
|
children: "404"
|
|
15273
14957
|
}
|
|
15274
14958
|
),
|
|
15275
|
-
/* @__PURE__ */ (0,
|
|
15276
|
-
/* @__PURE__ */ (0,
|
|
14959
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { className: "font-medium", children: "Oops! Page Not Found :-(!" }),
|
|
14960
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("p", { className: "text-center text-muted-foreground", children: [
|
|
15277
14961
|
"It seems like the page you're looking for ",
|
|
15278
|
-
/* @__PURE__ */ (0,
|
|
14962
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("br", {}),
|
|
15279
14963
|
"does not exist or might have been removed."
|
|
15280
14964
|
] }),
|
|
15281
|
-
/* @__PURE__ */ (0,
|
|
15282
|
-
/* @__PURE__ */ (0,
|
|
15283
|
-
/* @__PURE__ */ (0,
|
|
14965
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "mt-6 flex gap-4", children: [
|
|
14966
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Button, { variant: "outline", onClick: handleGoBack, children: "Go Back" }),
|
|
14967
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Button, { onClick: handleGoHome, children: "Back to Home" })
|
|
15284
14968
|
] })
|
|
15285
14969
|
] }) });
|
|
15286
14970
|
}
|
|
15287
14971
|
|
|
15288
14972
|
// src/design-system/templates/authenticated-layout.tsx
|
|
15289
|
-
var
|
|
14973
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
15290
14974
|
function AuthenticatedLayoutContent({ children }) {
|
|
15291
14975
|
const { showInlineNotFound, setShowInlineNotFound } = useLayout();
|
|
15292
14976
|
const pathname = (0, import_navigation6.usePathname)();
|
|
15293
|
-
(0,
|
|
14977
|
+
(0, import_react25.useEffect)(() => {
|
|
15294
14978
|
setShowInlineNotFound(false);
|
|
15295
14979
|
}, [pathname, setShowInlineNotFound]);
|
|
15296
|
-
return /* @__PURE__ */ (0,
|
|
15297
|
-
/* @__PURE__ */ (0,
|
|
15298
|
-
/* @__PURE__ */ (0,
|
|
15299
|
-
/* @__PURE__ */ (0,
|
|
14980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
14981
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(SkipToMain, {}),
|
|
14982
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(AppSidebar2, {}),
|
|
14983
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
15300
14984
|
SidebarInset,
|
|
15301
14985
|
{
|
|
15302
14986
|
className: cn(
|
|
@@ -15304,7 +14988,7 @@ function AuthenticatedLayoutContent({ children }) {
|
|
|
15304
14988
|
"has-[[data-layout=fixed]]:h-svh has-data-[layout=fixed]:h-svh",
|
|
15305
14989
|
"peer-data-[variant=inset]:has-data-[layout=fixed]:h-[calc(100svh-(var(--spacing)*4))]"
|
|
15306
14990
|
),
|
|
15307
|
-
children: showInlineNotFound ? /* @__PURE__ */ (0,
|
|
14991
|
+
children: showInlineNotFound ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
15308
14992
|
NotFoundError,
|
|
15309
14993
|
{
|
|
15310
14994
|
embedded: true,
|
|
@@ -15316,24 +15000,24 @@ function AuthenticatedLayoutContent({ children }) {
|
|
|
15316
15000
|
] });
|
|
15317
15001
|
}
|
|
15318
15002
|
function AuthenticatedLayout({ children }) {
|
|
15319
|
-
const [defaultOpen, setDefaultOpen] = (0,
|
|
15320
|
-
const [isMounted, setIsMounted] = (0,
|
|
15321
|
-
(0,
|
|
15003
|
+
const [defaultOpen, setDefaultOpen] = (0, import_react25.useState)(true);
|
|
15004
|
+
const [isMounted, setIsMounted] = (0, import_react25.useState)(false);
|
|
15005
|
+
(0, import_react25.useEffect)(() => {
|
|
15322
15006
|
setDefaultOpen(getCookie("sidebar_state") !== "false");
|
|
15323
15007
|
setIsMounted(true);
|
|
15324
15008
|
}, []);
|
|
15325
15009
|
if (!isMounted) {
|
|
15326
15010
|
return null;
|
|
15327
15011
|
}
|
|
15328
|
-
return /* @__PURE__ */ (0,
|
|
15012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(SearchProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(LayoutProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(SidebarProvider, { defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(AuthenticatedLayoutContent, { children }) }) }) });
|
|
15329
15013
|
}
|
|
15330
15014
|
|
|
15331
15015
|
// src/design-system/templates/header.tsx
|
|
15332
|
-
var
|
|
15333
|
-
var
|
|
15016
|
+
var import_react26 = require("react");
|
|
15017
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
15334
15018
|
function Header2({ className, fixed, children, ...props }) {
|
|
15335
|
-
const [offset, setOffset] = (0,
|
|
15336
|
-
(0,
|
|
15019
|
+
const [offset, setOffset] = (0, import_react26.useState)(0);
|
|
15020
|
+
(0, import_react26.useEffect)(() => {
|
|
15337
15021
|
const onScroll = () => {
|
|
15338
15022
|
setOffset(document.body.scrollTop || document.documentElement.scrollTop);
|
|
15339
15023
|
};
|
|
@@ -15342,7 +15026,7 @@ function Header2({ className, fixed, children, ...props }) {
|
|
|
15342
15026
|
}, []);
|
|
15343
15027
|
return (
|
|
15344
15028
|
// Page header container: fixed mode me top par sticky behavior deta hai.
|
|
15345
|
-
/* @__PURE__ */ (0,
|
|
15029
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
15346
15030
|
"header",
|
|
15347
15031
|
{
|
|
15348
15032
|
className: cn(
|
|
@@ -15352,7 +15036,7 @@ function Header2({ className, fixed, children, ...props }) {
|
|
|
15352
15036
|
className
|
|
15353
15037
|
),
|
|
15354
15038
|
...props,
|
|
15355
|
-
children: /* @__PURE__ */ (0,
|
|
15039
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
15356
15040
|
"div",
|
|
15357
15041
|
{
|
|
15358
15042
|
className: cn(
|
|
@@ -15361,7 +15045,7 @@ function Header2({ className, fixed, children, ...props }) {
|
|
|
15361
15045
|
offset > 10 && fixed && "after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg"
|
|
15362
15046
|
),
|
|
15363
15047
|
children: [
|
|
15364
|
-
/* @__PURE__ */ (0,
|
|
15048
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(AppLogo, { className: "shrink-0 md:hidden" }),
|
|
15365
15049
|
children
|
|
15366
15050
|
]
|
|
15367
15051
|
}
|
|
@@ -15372,9 +15056,9 @@ function Header2({ className, fixed, children, ...props }) {
|
|
|
15372
15056
|
}
|
|
15373
15057
|
|
|
15374
15058
|
// src/design-system/templates/main.tsx
|
|
15375
|
-
var
|
|
15059
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
15376
15060
|
function Main({ fixed, className, fluid, ...props }) {
|
|
15377
|
-
return /* @__PURE__ */ (0,
|
|
15061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
15378
15062
|
"main",
|
|
15379
15063
|
{
|
|
15380
15064
|
"data-layout": fixed ? "fixed" : "auto",
|
|
@@ -15392,21 +15076,21 @@ function Main({ fixed, className, fluid, ...props }) {
|
|
|
15392
15076
|
}
|
|
15393
15077
|
|
|
15394
15078
|
// src/design-system/templates/sidebar-search.tsx
|
|
15395
|
-
var
|
|
15396
|
-
var
|
|
15079
|
+
var import_lucide_react65 = require("lucide-react");
|
|
15080
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
15397
15081
|
function SidebarSearch() {
|
|
15398
15082
|
const { setOpen } = useSearch();
|
|
15399
|
-
return /* @__PURE__ */ (0,
|
|
15083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
15400
15084
|
SidebarMenuButton,
|
|
15401
15085
|
{
|
|
15402
15086
|
onClick: () => setOpen(true),
|
|
15403
15087
|
tooltip: "Search (\u2318K)",
|
|
15404
15088
|
className: "bg-sidebar-accent/50 hover:bg-sidebar-accent border border-sidebar-border/60 text-muted-foreground hover:text-foreground",
|
|
15405
15089
|
children: [
|
|
15406
|
-
/* @__PURE__ */ (0,
|
|
15407
|
-
/* @__PURE__ */ (0,
|
|
15408
|
-
/* @__PURE__ */ (0,
|
|
15409
|
-
/* @__PURE__ */ (0,
|
|
15090
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react65.SearchIcon, { className: "size-4 shrink-0" }),
|
|
15091
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "flex-1 text-left text-xs font-normal group-data-[collapsible=icon]:hidden", children: "Search..." }),
|
|
15092
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("kbd", { className: "pointer-events-none hidden h-4 select-none items-center gap-0.5 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 group-data-[collapsible=icon]:hidden sm:flex", children: [
|
|
15093
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "text-[10px]", children: "\u2318" }),
|
|
15410
15094
|
"K"
|
|
15411
15095
|
] })
|
|
15412
15096
|
]
|
|
@@ -15416,8 +15100,8 @@ function SidebarSearch() {
|
|
|
15416
15100
|
|
|
15417
15101
|
// src/design-system/templates/top-nav.tsx
|
|
15418
15102
|
var import_link5 = __toESM(require("next/link"));
|
|
15419
|
-
var
|
|
15420
|
-
var
|
|
15103
|
+
var import_lucide_react66 = require("lucide-react");
|
|
15104
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
15421
15105
|
function TopNav({ className, links, ...props }) {
|
|
15422
15106
|
const renderLink = ({
|
|
15423
15107
|
title,
|
|
@@ -15428,7 +15112,7 @@ function TopNav({ className, links, ...props }) {
|
|
|
15428
15112
|
}) => {
|
|
15429
15113
|
const className2 = `text-sm font-medium transition-colors hover:text-primary ${isActive ? "" : "text-muted-foreground"}`;
|
|
15430
15114
|
if (onClick) {
|
|
15431
|
-
return /* @__PURE__ */ (0,
|
|
15115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15432
15116
|
"button",
|
|
15433
15117
|
{
|
|
15434
15118
|
type: "button",
|
|
@@ -15440,7 +15124,7 @@ function TopNav({ className, links, ...props }) {
|
|
|
15440
15124
|
title
|
|
15441
15125
|
);
|
|
15442
15126
|
}
|
|
15443
|
-
return /* @__PURE__ */ (0,
|
|
15127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15444
15128
|
import_link5.default,
|
|
15445
15129
|
{
|
|
15446
15130
|
href,
|
|
@@ -15451,9 +15135,9 @@ function TopNav({ className, links, ...props }) {
|
|
|
15451
15135
|
title
|
|
15452
15136
|
);
|
|
15453
15137
|
};
|
|
15454
|
-
return /* @__PURE__ */ (0,
|
|
15455
|
-
/* @__PURE__ */ (0,
|
|
15456
|
-
/* @__PURE__ */ (0,
|
|
15138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
15139
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(DropdownMenu, { modal: false, children: [
|
|
15140
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
15457
15141
|
Button,
|
|
15458
15142
|
{
|
|
15459
15143
|
size: "icon",
|
|
@@ -15463,18 +15147,18 @@ function TopNav({ className, links, ...props }) {
|
|
|
15463
15147
|
className
|
|
15464
15148
|
),
|
|
15465
15149
|
children: [
|
|
15466
|
-
/* @__PURE__ */ (0,
|
|
15467
|
-
/* @__PURE__ */ (0,
|
|
15150
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_lucide_react66.Menu, {}),
|
|
15151
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "sr-only", children: "Toggle navigation menu" })
|
|
15468
15152
|
]
|
|
15469
15153
|
}
|
|
15470
15154
|
) }),
|
|
15471
|
-
/* @__PURE__ */ (0,
|
|
15155
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DropdownMenuContent, { side: "bottom", align: "start", children: links.map((link) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15472
15156
|
DropdownMenuItem,
|
|
15473
15157
|
{
|
|
15474
15158
|
disabled: link.disabled,
|
|
15475
15159
|
onClick: link.onClick,
|
|
15476
15160
|
asChild: !link.onClick,
|
|
15477
|
-
children: link.onClick ? /* @__PURE__ */ (0,
|
|
15161
|
+
children: link.onClick ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: !link.isActive ? "text-muted-foreground" : "", children: link.title }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15478
15162
|
import_link5.default,
|
|
15479
15163
|
{
|
|
15480
15164
|
href: link.href,
|
|
@@ -15487,7 +15171,7 @@ function TopNav({ className, links, ...props }) {
|
|
|
15487
15171
|
link.title
|
|
15488
15172
|
)) })
|
|
15489
15173
|
] }),
|
|
15490
|
-
/* @__PURE__ */ (0,
|
|
15174
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
15491
15175
|
"nav",
|
|
15492
15176
|
{
|
|
15493
15177
|
className: cn(
|
|
@@ -15862,6 +15546,7 @@ function TopNav({ className, links, ...props }) {
|
|
|
15862
15546
|
buttonVariants,
|
|
15863
15547
|
downloadQrCode,
|
|
15864
15548
|
formatBytes,
|
|
15549
|
+
formatTimeAgo,
|
|
15865
15550
|
getFileCategoryTheme,
|
|
15866
15551
|
navigationMenuTriggerStyle,
|
|
15867
15552
|
sidebarData,
|