@infuro/cms-core 1.0.3 → 1.0.4
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/admin.cjs +42 -41
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +42 -41
- package/dist/admin.js.map +1 -1
- package/package.json +1 -1
package/dist/admin.cjs
CHANGED
|
@@ -312,8 +312,8 @@ function AdminHeader() {
|
|
|
312
312
|
}
|
|
313
313
|
) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs font-medium text-gray-100", children: session?.user?.name?.charAt(0).toUpperCase() || session?.user?.email?.charAt(0).toUpperCase() || "A" }) }),
|
|
314
314
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col items-start", children: [
|
|
315
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-
|
|
316
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[
|
|
315
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[13px] font-medium text-gray-900", children: session?.user?.name || session?.user?.email || "Admin" }),
|
|
316
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[11px] text-gray-500", children: "Administrator" })
|
|
317
317
|
] }),
|
|
318
318
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.ChevronDown, { className: "h-3.5 w-3.5 text-gray-400" })
|
|
319
319
|
]
|
|
@@ -385,9 +385,9 @@ function AdminSidebar() {
|
|
|
385
385
|
const linkInactive = "text-gray-600 hover:bg-gray-100 hover:text-gray-900";
|
|
386
386
|
const iconActive = "text-gray-700";
|
|
387
387
|
const iconInactive = "text-gray-400";
|
|
388
|
-
const linkCls = "flex items-center px-2.5 py-
|
|
388
|
+
const linkCls = "flex items-center px-2.5 py-[7px] text-[13px] font-medium rounded-md transition-colors";
|
|
389
389
|
const sectionCls = "mb-5";
|
|
390
|
-
const headingCls = "text-[
|
|
390
|
+
const headingCls = "text-[11px] font-semibold text-gray-400 uppercase tracking-wider px-2.5 mb-1.5";
|
|
391
391
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("aside", { className: "w-52 h-full min-h-0 bg-white border-r border-gray-200 flex-shrink-0 flex flex-col overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: [
|
|
392
392
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("nav", { className: "admin-scroll flex-1 min-h-0 px-3 py-4 pb-4 overflow-y-auto overscroll-contain", children: [
|
|
393
393
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: sectionCls, children: [
|
|
@@ -398,7 +398,7 @@ function AdminSidebar() {
|
|
|
398
398
|
href: "/admin/dashboard",
|
|
399
399
|
className: `${linkCls} ${isActive("/admin/dashboard") ? linkActive : linkInactive}`,
|
|
400
400
|
children: [
|
|
401
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.LayoutDashboard, { className: `h-
|
|
401
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.LayoutDashboard, { className: `h-4 w-4 mr-2 ${isActive("/admin/dashboard") ? iconActive : iconInactive}` }),
|
|
402
402
|
"Dashboard"
|
|
403
403
|
]
|
|
404
404
|
}
|
|
@@ -409,7 +409,7 @@ function AdminSidebar() {
|
|
|
409
409
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "space-y-0.5", children: section.items.map((item) => {
|
|
410
410
|
const Icon2 = getIconForItem(item.icon);
|
|
411
411
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: item.href, className: `${linkCls} ${isActive(item.href) ? linkActive : linkInactive}`, children: [
|
|
412
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon2, { className: `h-
|
|
412
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon2, { className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}` }),
|
|
413
413
|
item.label
|
|
414
414
|
] }) }, item.href);
|
|
415
415
|
}) })
|
|
@@ -419,7 +419,7 @@ function AdminSidebar() {
|
|
|
419
419
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "space-y-0.5", children: customNavItems.map((item) => {
|
|
420
420
|
const Icon2 = getIconForItem(item.icon);
|
|
421
421
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: item.href, className: `${linkCls} ${isActive(item.href) ? linkActive : linkInactive}`, children: [
|
|
422
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon2, { className: `h-
|
|
422
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon2, { className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}` }),
|
|
423
423
|
item.label
|
|
424
424
|
] }) }, item.href);
|
|
425
425
|
}) })
|
|
@@ -428,23 +428,23 @@ function AdminSidebar() {
|
|
|
428
428
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: headingCls, children: "Management" }),
|
|
429
429
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("ul", { className: "space-y-0.5", children: [
|
|
430
430
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/contacts", className: `${linkCls} ${isActive("/admin/contacts") ? linkActive : linkInactive}`, children: [
|
|
431
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Inbox, { className: `h-
|
|
431
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Inbox, { className: `h-4 w-4 mr-2 ${isActive("/admin/contacts") ? iconActive : iconInactive}` }),
|
|
432
432
|
"Contacts"
|
|
433
433
|
] }) }),
|
|
434
434
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/blogs", className: `${linkCls} ${isActive("/admin/blogs") ? linkActive : linkInactive}`, children: [
|
|
435
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.File, { className: `h-
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.File, { className: `h-4 w-4 mr-2 ${isActive("/admin/blogs") ? iconActive : iconInactive}` }),
|
|
436
436
|
"Blogs"
|
|
437
437
|
] }) }),
|
|
438
438
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/pages", className: `${linkCls} ${isActive("/admin/pages") ? linkActive : linkInactive}`, children: [
|
|
439
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.LinkIcon, { className: `h-
|
|
439
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.LinkIcon, { className: `h-4 w-4 mr-2 ${isActive("/admin/pages") ? iconActive : iconInactive}` }),
|
|
440
440
|
"Pages"
|
|
441
441
|
] }) }),
|
|
442
442
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/submissions", className: `${linkCls} ${isActive("/admin/submissions") ? linkActive : linkInactive}`, children: [
|
|
443
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.MessageSquare, { className: `h-
|
|
443
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.MessageSquare, { className: `h-4 w-4 mr-2 ${isActive("/admin/submissions") ? iconActive : iconInactive}` }),
|
|
444
444
|
"Submissions"
|
|
445
445
|
] }) }),
|
|
446
446
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/media", className: `${linkCls} ${isActive("/admin/media") ? linkActive : linkInactive}`, children: [
|
|
447
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Image, { className: `h-
|
|
447
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Image, { className: `h-4 w-4 mr-2 ${isActive("/admin/media") ? iconActive : iconInactive}` }),
|
|
448
448
|
"Media"
|
|
449
449
|
] }) })
|
|
450
450
|
] })
|
|
@@ -453,19 +453,19 @@ function AdminSidebar() {
|
|
|
453
453
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: headingCls, children: "System" }),
|
|
454
454
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("ul", { className: "space-y-0.5", children: [
|
|
455
455
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/forms", className: `${linkCls} ${isActive("/admin/forms") ? linkActive : linkInactive}`, children: [
|
|
456
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ClipboardList, { className: `h-
|
|
456
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ClipboardList, { className: `h-4 w-4 mr-2 ${isActive("/admin/forms") ? iconActive : iconInactive}` }),
|
|
457
457
|
"Forms"
|
|
458
458
|
] }) }),
|
|
459
459
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/users", className: `${linkCls} ${isActive("/admin/users") ? linkActive : linkInactive}`, children: [
|
|
460
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Users, { className: `h-
|
|
460
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Users, { className: `h-4 w-4 mr-2 ${isActive("/admin/users") ? iconActive : iconInactive}` }),
|
|
461
461
|
"Users"
|
|
462
462
|
] }) }),
|
|
463
463
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/plugins", className: `${linkCls} ${isActive("/admin/plugins") ? linkActive : linkInactive}`, children: [
|
|
464
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Puzzle, { className: `h-
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Puzzle, { className: `h-4 w-4 mr-2 ${isActive("/admin/plugins") ? iconActive : iconInactive}` }),
|
|
465
465
|
"Plugins"
|
|
466
466
|
] }) }),
|
|
467
467
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_link2.default, { href: "/admin/settings", className: `${linkCls} ${isActive("/admin/settings") ? linkActive : linkInactive}`, children: [
|
|
468
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Settings, { className: `h-
|
|
468
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Settings, { className: `h-4 w-4 mr-2 ${isActive("/admin/settings") ? iconActive : iconInactive}` }),
|
|
469
469
|
"Settings"
|
|
470
470
|
] }) })
|
|
471
471
|
] })
|
|
@@ -480,7 +480,7 @@ function AdminSidebar() {
|
|
|
480
480
|
className: "flex items-center gap-2 text-gray-500 hover:text-gray-700 transition-colors",
|
|
481
481
|
children: [
|
|
482
482
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_image2.default, { src: INFURO_FAVICON_BASE64, alt: INFURO_FOOTER_LABEL, width: 32, height: 32, className: "rounded object-contain", unoptimized: true }),
|
|
483
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-[
|
|
483
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-[11px] font-medium leading-tight", children: INFURO_FOOTER_LABEL })
|
|
484
484
|
]
|
|
485
485
|
}
|
|
486
486
|
) })
|
|
@@ -494,34 +494,35 @@ var ADMIN_THEME_CSS = `
|
|
|
494
494
|
.dark{--background:0 0% 3.9%;--foreground:0 0% 98%;--card:0 0% 3.9%;--card-foreground:0 0% 98%;--primary:0 0% 98%;--primary-foreground:0 0% 9%;--secondary:0 0% 14.9%;--secondary-foreground:0 0% 98%;--muted:0 0% 14.9%;--muted-foreground:0 0% 63.9%;--border:0 0% 14.9%;--input:0 0% 14.9%;--ring:0 0% 83.1%;--sidebar-background:0 0% 9%;--sidebar-foreground:0 0% 98%;--sidebar-primary:0 0% 98%;--sidebar-primary-foreground:0 0% 9%;--sidebar-accent:0 0% 14.9%;--sidebar-accent-foreground:0 0% 98%;--sidebar-border:0 0% 14.9%;--sidebar-ring:0 0% 83.1%}
|
|
495
495
|
*,*::before,*::after{border-color:hsl(var(--border))}
|
|
496
496
|
body{font-family:"Inter",ui-sans-serif,system-ui,sans-serif;font-size:14px}
|
|
497
|
-
.admin-app{font-size:
|
|
498
|
-
.admin-app main{padding:0.
|
|
499
|
-
.admin-app .rounded-lg .p-6,.admin-app [class*="p-6"]{padding:0.
|
|
500
|
-
.admin-app .px-6{padding-left:
|
|
501
|
-
.admin-app .py-4{padding-top:0.
|
|
502
|
-
.admin-app .py-6{padding-top:0.
|
|
503
|
-
.admin-app .text-xl{font-size:
|
|
504
|
-
.admin-app .text-lg{font-size:
|
|
505
|
-
.admin-app .text-sm{font-size:0.
|
|
506
|
-
.admin-app .text-xs{font-size:0.
|
|
507
|
-
.admin-app table td,.admin-app table th{padding:0.
|
|
508
|
-
.admin-app h1{font-size:
|
|
509
|
-
.admin-app h2{font-size:
|
|
510
|
-
.admin-app h3{font-size:0.
|
|
511
|
-
.admin-app .space-y-8 > * + *{margin-top:0.
|
|
512
|
-
.admin-app .gap-4{gap:0.
|
|
513
|
-
.admin-app .gap-6{gap:0.
|
|
514
|
-
.admin-app .mb-6{margin-bottom:0.
|
|
515
|
-
.admin-app .mb-8{margin-bottom:
|
|
497
|
+
.admin-app{font-size:13.5px}
|
|
498
|
+
.admin-app main{padding:0.85rem 1.15rem}
|
|
499
|
+
.admin-app .rounded-lg .p-6,.admin-app [class*="p-6"]{padding:0.85rem 1.15rem}
|
|
500
|
+
.admin-app .px-6{padding-left:1.15rem;padding-right:1.15rem}
|
|
501
|
+
.admin-app .py-4{padding-top:0.6rem;padding-bottom:0.6rem}
|
|
502
|
+
.admin-app .py-6{padding-top:0.85rem;padding-bottom:0.85rem}
|
|
503
|
+
.admin-app .text-xl{font-size:1.0625rem}
|
|
504
|
+
.admin-app .text-lg{font-size:1rem}
|
|
505
|
+
.admin-app .text-sm{font-size:0.8375rem}
|
|
506
|
+
.admin-app .text-xs{font-size:0.775rem}
|
|
507
|
+
.admin-app table td,.admin-app table th{padding:0.3rem 0.6rem;font-size:0.8375rem}
|
|
508
|
+
.admin-app h1{font-size:1.0625rem;font-weight:600}
|
|
509
|
+
.admin-app h2{font-size:1rem;font-weight:600}
|
|
510
|
+
.admin-app h3{font-size:0.8375rem;font-weight:600}
|
|
511
|
+
.admin-app .space-y-8 > * + *{margin-top:0.6rem}
|
|
512
|
+
.admin-app .gap-4{gap:0.625rem}
|
|
513
|
+
.admin-app .gap-6{gap:0.875rem}
|
|
514
|
+
.admin-app .mb-6{margin-bottom:0.875rem}
|
|
515
|
+
.admin-app .mb-8{margin-bottom:1.125rem}
|
|
516
516
|
|
|
517
517
|
/* Sleek scrollbar: thin, rounded; visible on hover/scroll */
|
|
518
|
-
#admin-root .admin-scroll,.admin-scroll{scrollbar-width:thin;scrollbar-color:transparent transparent}
|
|
518
|
+
#admin-root .admin-scroll,.admin-scroll{scrollbar-width:thin;scrollbar-color:transparent transparent;transition:scrollbar-color 0.2s ease}
|
|
519
519
|
#admin-root .admin-scroll:hover,.admin-scroll:hover{scrollbar-color:rgba(0,0,0,.18) transparent}
|
|
520
|
-
#admin-root .admin-scroll::-webkit-scrollbar,.admin-scroll::-webkit-scrollbar{width:
|
|
520
|
+
#admin-root .admin-scroll::-webkit-scrollbar,.admin-scroll::-webkit-scrollbar{width:5px;height:5px}
|
|
521
521
|
#admin-root .admin-scroll::-webkit-scrollbar-track,.admin-scroll::-webkit-scrollbar-track{background:transparent}
|
|
522
|
-
#admin-root .admin-scroll::-webkit-scrollbar-thumb,.admin-scroll::-webkit-scrollbar-thumb{background:transparent;border-radius:
|
|
522
|
+
#admin-root .admin-scroll::-webkit-scrollbar-thumb,.admin-scroll::-webkit-scrollbar-thumb{background:transparent;border-radius:2.5px;transition:background 0.2s ease}
|
|
523
523
|
#admin-root .admin-scroll:hover::-webkit-scrollbar-thumb,.admin-scroll:hover::-webkit-scrollbar-thumb{background:rgba(0,0,0,.18)}
|
|
524
524
|
#admin-root .admin-scroll::-webkit-scrollbar-thumb:hover,.admin-scroll::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.28)}
|
|
525
|
+
#admin-root .admin-scroll::-webkit-scrollbar-thumb:active,.admin-scroll::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.35)}
|
|
525
526
|
`;
|
|
526
527
|
|
|
527
528
|
// src/admin/pages/AdminLayout.tsx
|
|
@@ -580,10 +581,10 @@ function AdminLayoutInner({ children }) {
|
|
|
580
581
|
if (!session) {
|
|
581
582
|
return null;
|
|
582
583
|
}
|
|
583
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { id: "admin-root", className: "admin-app
|
|
584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { id: "admin-root", className: "admin-app h-screen bg-gray-100 flex flex-col overflow-hidden", children: [
|
|
584
585
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AdminStyle, {}),
|
|
585
586
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AdminHeader, {}),
|
|
586
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-1", children: [
|
|
587
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-1 min-h-0", children: [
|
|
587
588
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AdminSidebar, {}),
|
|
588
589
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("main", { className: "admin-scroll flex-1 p-4 bg-gray-100 overflow-auto", children })
|
|
589
590
|
] }),
|