@infuro/cms-core 1.0.2 → 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.js CHANGED
@@ -247,8 +247,8 @@ function AdminHeader() {
247
247
  }
248
248
  ) : /* @__PURE__ */ jsx3("span", { className: "text-xs font-medium text-gray-100", children: session?.user?.name?.charAt(0).toUpperCase() || session?.user?.email?.charAt(0).toUpperCase() || "A" }) }),
249
249
  /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-start", children: [
250
- /* @__PURE__ */ jsx3("span", { className: "text-xs font-medium text-gray-900", children: session?.user?.name || session?.user?.email || "Admin" }),
251
- /* @__PURE__ */ jsx3("span", { className: "text-[10px] text-gray-500", children: "Administrator" })
250
+ /* @__PURE__ */ jsx3("span", { className: "text-[13px] font-medium text-gray-900", children: session?.user?.name || session?.user?.email || "Admin" }),
251
+ /* @__PURE__ */ jsx3("span", { className: "text-[11px] text-gray-500", children: "Administrator" })
252
252
  ] }),
253
253
  /* @__PURE__ */ jsx3(ChevronDown, { className: "h-3.5 w-3.5 text-gray-400" })
254
254
  ]
@@ -335,9 +335,9 @@ function AdminSidebar() {
335
335
  const linkInactive = "text-gray-600 hover:bg-gray-100 hover:text-gray-900";
336
336
  const iconActive = "text-gray-700";
337
337
  const iconInactive = "text-gray-400";
338
- const linkCls = "flex items-center px-2.5 py-1.5 text-xs font-medium rounded-md transition-colors";
338
+ const linkCls = "flex items-center px-2.5 py-[7px] text-[13px] font-medium rounded-md transition-colors";
339
339
  const sectionCls = "mb-5";
340
- const headingCls = "text-[10px] font-semibold text-gray-400 uppercase tracking-wider px-2.5 mb-1.5";
340
+ const headingCls = "text-[11px] font-semibold text-gray-400 uppercase tracking-wider px-2.5 mb-1.5";
341
341
  return /* @__PURE__ */ jsx4("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__ */ jsxs3("div", { className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: [
342
342
  /* @__PURE__ */ jsxs3("nav", { className: "admin-scroll flex-1 min-h-0 px-3 py-4 pb-4 overflow-y-auto overscroll-contain", children: [
343
343
  /* @__PURE__ */ jsxs3("div", { className: sectionCls, children: [
@@ -348,7 +348,7 @@ function AdminSidebar() {
348
348
  href: "/admin/dashboard",
349
349
  className: `${linkCls} ${isActive("/admin/dashboard") ? linkActive : linkInactive}`,
350
350
  children: [
351
- /* @__PURE__ */ jsx4(LayoutDashboard, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/dashboard") ? iconActive : iconInactive}` }),
351
+ /* @__PURE__ */ jsx4(LayoutDashboard, { className: `h-4 w-4 mr-2 ${isActive("/admin/dashboard") ? iconActive : iconInactive}` }),
352
352
  "Dashboard"
353
353
  ]
354
354
  }
@@ -359,7 +359,7 @@ function AdminSidebar() {
359
359
  /* @__PURE__ */ jsx4("ul", { className: "space-y-0.5", children: section.items.map((item) => {
360
360
  const Icon2 = getIconForItem(item.icon);
361
361
  return /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: item.href, className: `${linkCls} ${isActive(item.href) ? linkActive : linkInactive}`, children: [
362
- /* @__PURE__ */ jsx4(Icon2, { className: `h-3.5 w-3.5 mr-2 ${isActive(item.href) ? iconActive : iconInactive}` }),
362
+ /* @__PURE__ */ jsx4(Icon2, { className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}` }),
363
363
  item.label
364
364
  ] }) }, item.href);
365
365
  }) })
@@ -369,7 +369,7 @@ function AdminSidebar() {
369
369
  /* @__PURE__ */ jsx4("ul", { className: "space-y-0.5", children: customNavItems.map((item) => {
370
370
  const Icon2 = getIconForItem(item.icon);
371
371
  return /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: item.href, className: `${linkCls} ${isActive(item.href) ? linkActive : linkInactive}`, children: [
372
- /* @__PURE__ */ jsx4(Icon2, { className: `h-3.5 w-3.5 mr-2 ${isActive(item.href) ? iconActive : iconInactive}` }),
372
+ /* @__PURE__ */ jsx4(Icon2, { className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}` }),
373
373
  item.label
374
374
  ] }) }, item.href);
375
375
  }) })
@@ -378,23 +378,23 @@ function AdminSidebar() {
378
378
  /* @__PURE__ */ jsx4("h3", { className: headingCls, children: "Management" }),
379
379
  /* @__PURE__ */ jsxs3("ul", { className: "space-y-0.5", children: [
380
380
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/contacts", className: `${linkCls} ${isActive("/admin/contacts") ? linkActive : linkInactive}`, children: [
381
- /* @__PURE__ */ jsx4(Inbox, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/contacts") ? iconActive : iconInactive}` }),
381
+ /* @__PURE__ */ jsx4(Inbox, { className: `h-4 w-4 mr-2 ${isActive("/admin/contacts") ? iconActive : iconInactive}` }),
382
382
  "Contacts"
383
383
  ] }) }),
384
384
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/blogs", className: `${linkCls} ${isActive("/admin/blogs") ? linkActive : linkInactive}`, children: [
385
- /* @__PURE__ */ jsx4(File, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/blogs") ? iconActive : iconInactive}` }),
385
+ /* @__PURE__ */ jsx4(File, { className: `h-4 w-4 mr-2 ${isActive("/admin/blogs") ? iconActive : iconInactive}` }),
386
386
  "Blogs"
387
387
  ] }) }),
388
388
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/pages", className: `${linkCls} ${isActive("/admin/pages") ? linkActive : linkInactive}`, children: [
389
- /* @__PURE__ */ jsx4(LinkIcon, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/pages") ? iconActive : iconInactive}` }),
389
+ /* @__PURE__ */ jsx4(LinkIcon, { className: `h-4 w-4 mr-2 ${isActive("/admin/pages") ? iconActive : iconInactive}` }),
390
390
  "Pages"
391
391
  ] }) }),
392
392
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/submissions", className: `${linkCls} ${isActive("/admin/submissions") ? linkActive : linkInactive}`, children: [
393
- /* @__PURE__ */ jsx4(MessageSquare, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/submissions") ? iconActive : iconInactive}` }),
393
+ /* @__PURE__ */ jsx4(MessageSquare, { className: `h-4 w-4 mr-2 ${isActive("/admin/submissions") ? iconActive : iconInactive}` }),
394
394
  "Submissions"
395
395
  ] }) }),
396
396
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/media", className: `${linkCls} ${isActive("/admin/media") ? linkActive : linkInactive}`, children: [
397
- /* @__PURE__ */ jsx4(ImageIcon, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/media") ? iconActive : iconInactive}` }),
397
+ /* @__PURE__ */ jsx4(ImageIcon, { className: `h-4 w-4 mr-2 ${isActive("/admin/media") ? iconActive : iconInactive}` }),
398
398
  "Media"
399
399
  ] }) })
400
400
  ] })
@@ -403,19 +403,19 @@ function AdminSidebar() {
403
403
  /* @__PURE__ */ jsx4("h3", { className: headingCls, children: "System" }),
404
404
  /* @__PURE__ */ jsxs3("ul", { className: "space-y-0.5", children: [
405
405
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/forms", className: `${linkCls} ${isActive("/admin/forms") ? linkActive : linkInactive}`, children: [
406
- /* @__PURE__ */ jsx4(ClipboardList, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/forms") ? iconActive : iconInactive}` }),
406
+ /* @__PURE__ */ jsx4(ClipboardList, { className: `h-4 w-4 mr-2 ${isActive("/admin/forms") ? iconActive : iconInactive}` }),
407
407
  "Forms"
408
408
  ] }) }),
409
409
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/users", className: `${linkCls} ${isActive("/admin/users") ? linkActive : linkInactive}`, children: [
410
- /* @__PURE__ */ jsx4(Users, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/users") ? iconActive : iconInactive}` }),
410
+ /* @__PURE__ */ jsx4(Users, { className: `h-4 w-4 mr-2 ${isActive("/admin/users") ? iconActive : iconInactive}` }),
411
411
  "Users"
412
412
  ] }) }),
413
413
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/plugins", className: `${linkCls} ${isActive("/admin/plugins") ? linkActive : linkInactive}`, children: [
414
- /* @__PURE__ */ jsx4(Puzzle, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/plugins") ? iconActive : iconInactive}` }),
414
+ /* @__PURE__ */ jsx4(Puzzle, { className: `h-4 w-4 mr-2 ${isActive("/admin/plugins") ? iconActive : iconInactive}` }),
415
415
  "Plugins"
416
416
  ] }) }),
417
417
  /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(Link2, { href: "/admin/settings", className: `${linkCls} ${isActive("/admin/settings") ? linkActive : linkInactive}`, children: [
418
- /* @__PURE__ */ jsx4(Settings2, { className: `h-3.5 w-3.5 mr-2 ${isActive("/admin/settings") ? iconActive : iconInactive}` }),
418
+ /* @__PURE__ */ jsx4(Settings2, { className: `h-4 w-4 mr-2 ${isActive("/admin/settings") ? iconActive : iconInactive}` }),
419
419
  "Settings"
420
420
  ] }) })
421
421
  ] })
@@ -430,7 +430,7 @@ function AdminSidebar() {
430
430
  className: "flex items-center gap-2 text-gray-500 hover:text-gray-700 transition-colors",
431
431
  children: [
432
432
  /* @__PURE__ */ jsx4(Image2, { src: INFURO_FAVICON_BASE64, alt: INFURO_FOOTER_LABEL, width: 32, height: 32, className: "rounded object-contain", unoptimized: true }),
433
- /* @__PURE__ */ jsx4("span", { className: "text-[10px] font-medium leading-tight", children: INFURO_FOOTER_LABEL })
433
+ /* @__PURE__ */ jsx4("span", { className: "text-[11px] font-medium leading-tight", children: INFURO_FOOTER_LABEL })
434
434
  ]
435
435
  }
436
436
  ) })
@@ -444,34 +444,35 @@ var ADMIN_THEME_CSS = `
444
444
  .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%}
445
445
  *,*::before,*::after{border-color:hsl(var(--border))}
446
446
  body{font-family:"Inter",ui-sans-serif,system-ui,sans-serif;font-size:14px}
447
- .admin-app{font-size:13px}
448
- .admin-app main{padding:0.75rem 1rem}
449
- .admin-app .rounded-lg .p-6,.admin-app [class*="p-6"]{padding:0.75rem 1rem}
450
- .admin-app .px-6{padding-left:1rem;padding-right:1rem}
451
- .admin-app .py-4{padding-top:0.5rem;padding-bottom:0.5rem}
452
- .admin-app .py-6{padding-top:0.75rem;padding-bottom:0.75rem}
453
- .admin-app .text-xl{font-size:1rem}
454
- .admin-app .text-lg{font-size:0.9375rem}
455
- .admin-app .text-sm{font-size:0.8125rem}
456
- .admin-app .text-xs{font-size:0.75rem}
457
- .admin-app table td,.admin-app table th{padding:0.25rem 0.5rem;font-size:0.8125rem}
458
- .admin-app h1{font-size:1rem;font-weight:600}
459
- .admin-app h2{font-size:0.9375rem;font-weight:600}
460
- .admin-app h3{font-size:0.8125rem;font-weight:600}
461
- .admin-app .space-y-8 > * + *{margin-top:0.5rem}
462
- .admin-app .gap-4{gap:0.5rem}
463
- .admin-app .gap-6{gap:0.75rem}
464
- .admin-app .mb-6{margin-bottom:0.75rem}
465
- .admin-app .mb-8{margin-bottom:1rem}
447
+ .admin-app{font-size:13.5px}
448
+ .admin-app main{padding:0.85rem 1.15rem}
449
+ .admin-app .rounded-lg .p-6,.admin-app [class*="p-6"]{padding:0.85rem 1.15rem}
450
+ .admin-app .px-6{padding-left:1.15rem;padding-right:1.15rem}
451
+ .admin-app .py-4{padding-top:0.6rem;padding-bottom:0.6rem}
452
+ .admin-app .py-6{padding-top:0.85rem;padding-bottom:0.85rem}
453
+ .admin-app .text-xl{font-size:1.0625rem}
454
+ .admin-app .text-lg{font-size:1rem}
455
+ .admin-app .text-sm{font-size:0.8375rem}
456
+ .admin-app .text-xs{font-size:0.775rem}
457
+ .admin-app table td,.admin-app table th{padding:0.3rem 0.6rem;font-size:0.8375rem}
458
+ .admin-app h1{font-size:1.0625rem;font-weight:600}
459
+ .admin-app h2{font-size:1rem;font-weight:600}
460
+ .admin-app h3{font-size:0.8375rem;font-weight:600}
461
+ .admin-app .space-y-8 > * + *{margin-top:0.6rem}
462
+ .admin-app .gap-4{gap:0.625rem}
463
+ .admin-app .gap-6{gap:0.875rem}
464
+ .admin-app .mb-6{margin-bottom:0.875rem}
465
+ .admin-app .mb-8{margin-bottom:1.125rem}
466
466
 
467
467
  /* Sleek scrollbar: thin, rounded; visible on hover/scroll */
468
- #admin-root .admin-scroll,.admin-scroll{scrollbar-width:thin;scrollbar-color:transparent transparent}
468
+ #admin-root .admin-scroll,.admin-scroll{scrollbar-width:thin;scrollbar-color:transparent transparent;transition:scrollbar-color 0.2s ease}
469
469
  #admin-root .admin-scroll:hover,.admin-scroll:hover{scrollbar-color:rgba(0,0,0,.18) transparent}
470
- #admin-root .admin-scroll::-webkit-scrollbar,.admin-scroll::-webkit-scrollbar{width:6px;height:6px}
470
+ #admin-root .admin-scroll::-webkit-scrollbar,.admin-scroll::-webkit-scrollbar{width:5px;height:5px}
471
471
  #admin-root .admin-scroll::-webkit-scrollbar-track,.admin-scroll::-webkit-scrollbar-track{background:transparent}
472
- #admin-root .admin-scroll::-webkit-scrollbar-thumb,.admin-scroll::-webkit-scrollbar-thumb{background:transparent;border-radius:3px}
472
+ #admin-root .admin-scroll::-webkit-scrollbar-thumb,.admin-scroll::-webkit-scrollbar-thumb{background:transparent;border-radius:2.5px;transition:background 0.2s ease}
473
473
  #admin-root .admin-scroll:hover::-webkit-scrollbar-thumb,.admin-scroll:hover::-webkit-scrollbar-thumb{background:rgba(0,0,0,.18)}
474
474
  #admin-root .admin-scroll::-webkit-scrollbar-thumb:hover,.admin-scroll::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.28)}
475
+ #admin-root .admin-scroll::-webkit-scrollbar-thumb:active,.admin-scroll::-webkit-scrollbar-thumb:active{background:rgba(0,0,0,.35)}
475
476
  `;
476
477
 
477
478
  // src/admin/pages/AdminLayout.tsx
@@ -530,10 +531,10 @@ function AdminLayoutInner({ children }) {
530
531
  if (!session) {
531
532
  return null;
532
533
  }
533
- return /* @__PURE__ */ jsxs4("div", { id: "admin-root", className: "admin-app min-h-screen bg-gray-100 flex flex-col", children: [
534
+ return /* @__PURE__ */ jsxs4("div", { id: "admin-root", className: "admin-app h-screen bg-gray-100 flex flex-col overflow-hidden", children: [
534
535
  /* @__PURE__ */ jsx5(AdminStyle, {}),
535
536
  /* @__PURE__ */ jsx5(AdminHeader, {}),
536
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-1", children: [
537
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 min-h-0", children: [
537
538
  /* @__PURE__ */ jsx5(AdminSidebar, {}),
538
539
  /* @__PURE__ */ jsx5("main", { className: "admin-scroll flex-1 p-4 bg-gray-100 overflow-auto", children })
539
540
  ] }),