@retinalabsllc/zairusjs 16.1.30 → 16.1.45

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 CHANGED
@@ -4517,7 +4517,7 @@ var UniversalDepartmentsPage = ({
4517
4517
  onDepartmentClick,
4518
4518
  onCreateDepartment
4519
4519
  }) => {
4520
- const [isCreateMode, setIsCreateMode] = (0, import_react77.useState)(false);
4520
+ const [isCreateModalOpen, setIsCreateModalOpen] = (0, import_react77.useState)(false);
4521
4521
  const [deptName, setDeptName] = (0, import_react77.useState)("");
4522
4522
  const [isCreating, setIsCreating] = (0, import_react77.useState)(false);
4523
4523
  const handleCreateSubmit = async (e) => {
@@ -4527,21 +4527,61 @@ var UniversalDepartmentsPage = ({
4527
4527
  try {
4528
4528
  await onCreateDepartment(deptName);
4529
4529
  setDeptName("");
4530
- setIsCreateMode(false);
4530
+ setIsCreateModalOpen(false);
4531
4531
  } catch (error) {
4532
4532
  import_react_hot_toast13.default.error(error.message || "Failed to create department.");
4533
4533
  } finally {
4534
4534
  setIsCreating(false);
4535
4535
  }
4536
4536
  };
4537
- return /* @__PURE__ */ import_react77.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ import_react77.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, isCreateMode ? "Create Department" : headerTitle), !isCreateMode && onCreateDepartment && /* @__PURE__ */ import_react77.default.createElement(
4537
+ return /* @__PURE__ */ import_react77.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ import_react77.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, headerTitle), onCreateDepartment && /* @__PURE__ */ import_react77.default.createElement(
4538
4538
  "button",
4539
4539
  {
4540
- onClick: () => setIsCreateMode(true),
4540
+ onClick: () => setIsCreateModalOpen(true),
4541
4541
  className: "shrink-0 px-4 py-1.5 border border-neutral-200 text-black text-[12px] tracking-wide rounded-full hover:bg-neutral-50 transition-colors outline-none"
4542
4542
  },
4543
4543
  "Create new"
4544
- )), !isCreateMode && headerDescription && /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[12px] text-neutral-500" }, headerDescription)), /* @__PURE__ */ import_react77.default.createElement("div", { className: "w-full overflow-hidden" }, isCreateMode ? /* @__PURE__ */ import_react77.default.createElement("form", { onSubmit: handleCreateSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300 mt-2" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react77.default.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Department Name"), /* @__PURE__ */ import_react77.default.createElement(
4544
+ )), headerDescription && /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[12px] text-neutral-500" }, headerDescription)), /* @__PURE__ */ import_react77.default.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ import_react77.default.createElement(PageSpinner6, null) : /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react77.default.createElement("div", null, departments.length === 0 ? /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No departments available") : departments.map((dept) => /* @__PURE__ */ import_react77.default.createElement(
4545
+ "div",
4546
+ {
4547
+ key: dept.id,
4548
+ onClick: () => onDepartmentClick(dept.id),
4549
+ className: "flex flex-row items-center gap-4 py-4 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4550
+ },
4551
+ /* @__PURE__ */ import_react77.default.createElement("div", { className: "w-10 h-10 rounded-xl border border-neutral-200 flex items-center justify-center shrink-0" }, /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.Folder01Icon, size: 18, className: "text-neutral-500" })),
4552
+ /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col min-w-0 gap-1 flex-1" }, /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[14px] text-black tracking-tight truncate" }, dept.name), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ import_react77.default.createElement("div", { key: idx, className: "w-6 h-6 rounded-md border-2 border-white bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ import_react77.default.createElement(
4553
+ "img",
4554
+ {
4555
+ src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4556
+ alt: "Member",
4557
+ className: "w-full h-full object-cover"
4558
+ }
4559
+ )))), dept.totalMembers > 0 ? /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "Empty")))
4560
+ ))), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react77.default.createElement(
4561
+ "button",
4562
+ {
4563
+ onClick: () => onPageChange(currentPage - 1),
4564
+ disabled: currentPage <= 1 || isLoading,
4565
+ className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4566
+ },
4567
+ /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.ArrowLeft01Icon, size: 14 })
4568
+ ), /* @__PURE__ */ import_react77.default.createElement(
4569
+ "button",
4570
+ {
4571
+ onClick: () => onPageChange(currentPage + 1),
4572
+ disabled: currentPage >= totalPages || isLoading || totalPages === 0,
4573
+ className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4574
+ },
4575
+ /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.ArrowRight01Icon, size: 14 })
4576
+ )))))), isCreateModalOpen && /* @__PURE__ */ import_react77.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isCreating && setIsCreateModalOpen(false) }), /* @__PURE__ */ import_react77.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 border-b border-neutral-100" }, /* @__PURE__ */ import_react77.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ import_react77.default.createElement(
4577
+ "button",
4578
+ {
4579
+ onClick: () => setIsCreateModalOpen(false),
4580
+ disabled: isCreating,
4581
+ className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50"
4582
+ },
4583
+ /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.CancelCircleIcon, size: 18 })
4584
+ )), /* @__PURE__ */ import_react77.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ import_react77.default.createElement("form", { onSubmit: handleCreateSubmit, className: "flex flex-col gap-8" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react77.default.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Department Name"), /* @__PURE__ */ import_react77.default.createElement(
4545
4585
  "input",
4546
4586
  {
4547
4587
  type: "text",
@@ -4550,7 +4590,8 @@ var UniversalDepartmentsPage = ({
4550
4590
  required: true,
4551
4591
  autoFocus: true,
4552
4592
  maxLength: 50,
4553
- className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300",
4593
+ disabled: isCreating,
4594
+ className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300 disabled:opacity-50",
4554
4595
  placeholder: "e.g. Engineering, Marketing..."
4555
4596
  }
4556
4597
  )), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ import_react77.default.createElement(
@@ -4567,45 +4608,13 @@ var UniversalDepartmentsPage = ({
4567
4608
  {
4568
4609
  type: "button",
4569
4610
  onClick: () => {
4570
- setIsCreateMode(false);
4611
+ setIsCreateModalOpen(false);
4571
4612
  setDeptName("");
4572
4613
  },
4573
4614
  disabled: isCreating,
4574
4615
  className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-xs tracking-wide"
4575
4616
  },
4576
4617
  "Cancel"
4577
- ))) : isLoading ? /* @__PURE__ */ import_react77.default.createElement(PageSpinner6, null) : /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react77.default.createElement("div", null, departments.length === 0 ? /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No departments available") : departments.map((dept) => /* @__PURE__ */ import_react77.default.createElement(
4578
- "div",
4579
- {
4580
- key: dept.id,
4581
- onClick: () => onDepartmentClick(dept.id),
4582
- className: "flex flex-col py-4 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl gap-2"
4583
- },
4584
- /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[12px] text-black tracking-tight truncate" }, dept.name),
4585
- /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ import_react77.default.createElement("div", { key: idx, className: "w-7 h-7 rounded-lg border-2 border-white bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ import_react77.default.createElement(
4586
- "img",
4587
- {
4588
- src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4589
- alt: "Member",
4590
- className: "w-full h-full object-cover"
4591
- }
4592
- )))), dept.totalMembers > 0 ? /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "Empty"))
4593
- ))), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react77.default.createElement(
4594
- "button",
4595
- {
4596
- onClick: () => onPageChange(currentPage - 1),
4597
- disabled: currentPage <= 1 || isLoading,
4598
- className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4599
- },
4600
- /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.ArrowLeft01Icon, size: 14 })
4601
- ), /* @__PURE__ */ import_react77.default.createElement(
4602
- "button",
4603
- {
4604
- onClick: () => onPageChange(currentPage + 1),
4605
- disabled: currentPage >= totalPages || isLoading || totalPages === 0,
4606
- className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4607
- },
4608
- /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.ArrowRight01Icon, size: 14 })
4609
4618
  )))))));
4610
4619
  };
4611
4620
 
package/dist/index.mjs CHANGED
@@ -4511,7 +4511,13 @@ var UniversalBuyCryptoPage = ({
4511
4511
  import React46, { useState as useState32 } from "react";
4512
4512
  import toast12 from "react-hot-toast";
4513
4513
  import { HugeiconsIcon as HugeiconsIcon32 } from "@hugeicons/react";
4514
- import { ArrowLeft01Icon as ArrowLeft01Icon13, ArrowRight01Icon as ArrowRight01Icon9, Loading03Icon as Loading03Icon20 } from "@hugeicons/core-free-icons";
4514
+ import {
4515
+ ArrowLeft01Icon as ArrowLeft01Icon13,
4516
+ ArrowRight01Icon as ArrowRight01Icon9,
4517
+ Loading03Icon as Loading03Icon20,
4518
+ Folder01Icon,
4519
+ CancelCircleIcon as CancelCircleIcon9
4520
+ } from "@hugeicons/core-free-icons";
4515
4521
  var formatMembersCount = (num) => {
4516
4522
  if (num >= 1e6) return (num / 1e6).toFixed(1) + "m";
4517
4523
  if (num >= 1e3) return (num / 1e3).toFixed(1) + "k";
@@ -4529,7 +4535,7 @@ var UniversalDepartmentsPage = ({
4529
4535
  onDepartmentClick,
4530
4536
  onCreateDepartment
4531
4537
  }) => {
4532
- const [isCreateMode, setIsCreateMode] = useState32(false);
4538
+ const [isCreateModalOpen, setIsCreateModalOpen] = useState32(false);
4533
4539
  const [deptName, setDeptName] = useState32("");
4534
4540
  const [isCreating, setIsCreating] = useState32(false);
4535
4541
  const handleCreateSubmit = async (e) => {
@@ -4539,21 +4545,61 @@ var UniversalDepartmentsPage = ({
4539
4545
  try {
4540
4546
  await onCreateDepartment(deptName);
4541
4547
  setDeptName("");
4542
- setIsCreateMode(false);
4548
+ setIsCreateModalOpen(false);
4543
4549
  } catch (error) {
4544
4550
  toast12.error(error.message || "Failed to create department.");
4545
4551
  } finally {
4546
4552
  setIsCreating(false);
4547
4553
  }
4548
4554
  };
4549
- return /* @__PURE__ */ React46.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React46.createElement("h2", { className: "text-black text-xl tracking-tight" }, isCreateMode ? "Create Department" : headerTitle), !isCreateMode && onCreateDepartment && /* @__PURE__ */ React46.createElement(
4555
+ return /* @__PURE__ */ React46.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React46.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React46.createElement("h2", { className: "text-black text-xl tracking-tight" }, headerTitle), onCreateDepartment && /* @__PURE__ */ React46.createElement(
4550
4556
  "button",
4551
4557
  {
4552
- onClick: () => setIsCreateMode(true),
4558
+ onClick: () => setIsCreateModalOpen(true),
4553
4559
  className: "shrink-0 px-4 py-1.5 border border-neutral-200 text-black text-[12px] tracking-wide rounded-full hover:bg-neutral-50 transition-colors outline-none"
4554
4560
  },
4555
4561
  "Create new"
4556
- )), !isCreateMode && headerDescription && /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-neutral-500" }, headerDescription)), /* @__PURE__ */ React46.createElement("div", { className: "w-full overflow-hidden" }, isCreateMode ? /* @__PURE__ */ React46.createElement("form", { onSubmit: handleCreateSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300 mt-2" }, /* @__PURE__ */ React46.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React46.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Department Name"), /* @__PURE__ */ React46.createElement(
4562
+ )), headerDescription && /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-neutral-500" }, headerDescription)), /* @__PURE__ */ React46.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ React46.createElement(PageSpinner6, null) : /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React46.createElement("div", null, departments.length === 0 ? /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No departments available") : departments.map((dept) => /* @__PURE__ */ React46.createElement(
4563
+ "div",
4564
+ {
4565
+ key: dept.id,
4566
+ onClick: () => onDepartmentClick(dept.id),
4567
+ className: "flex flex-row items-center gap-4 py-4 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4568
+ },
4569
+ /* @__PURE__ */ React46.createElement("div", { className: "w-10 h-10 rounded-xl border border-neutral-200 flex items-center justify-center shrink-0" }, /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: Folder01Icon, size: 18, className: "text-neutral-500" })),
4570
+ /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0 gap-1 flex-1" }, /* @__PURE__ */ React46.createElement("p", { className: "text-[14px] text-black tracking-tight truncate" }, dept.name), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ React46.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ React46.createElement("div", { key: idx, className: "w-6 h-6 rounded-md border-2 border-white bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ React46.createElement(
4571
+ "img",
4572
+ {
4573
+ src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4574
+ alt: "Member",
4575
+ className: "w-full h-full object-cover"
4576
+ }
4577
+ )))), dept.totalMembers > 0 ? /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "Empty")))
4578
+ ))), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React46.createElement(
4579
+ "button",
4580
+ {
4581
+ onClick: () => onPageChange(currentPage - 1),
4582
+ disabled: currentPage <= 1 || isLoading,
4583
+ className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4584
+ },
4585
+ /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowLeft01Icon13, size: 14 })
4586
+ ), /* @__PURE__ */ React46.createElement(
4587
+ "button",
4588
+ {
4589
+ onClick: () => onPageChange(currentPage + 1),
4590
+ disabled: currentPage >= totalPages || isLoading || totalPages === 0,
4591
+ className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4592
+ },
4593
+ /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowRight01Icon9, size: 14 })
4594
+ )))))), isCreateModalOpen && /* @__PURE__ */ React46.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React46.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isCreating && setIsCreateModalOpen(false) }), /* @__PURE__ */ React46.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React46.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 border-b border-neutral-100" }, /* @__PURE__ */ React46.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ React46.createElement(
4595
+ "button",
4596
+ {
4597
+ onClick: () => setIsCreateModalOpen(false),
4598
+ disabled: isCreating,
4599
+ className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50"
4600
+ },
4601
+ /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: CancelCircleIcon9, size: 18 })
4602
+ )), /* @__PURE__ */ React46.createElement("div", { className: "p-6" }, /* @__PURE__ */ React46.createElement("form", { onSubmit: handleCreateSubmit, className: "flex flex-col gap-8" }, /* @__PURE__ */ React46.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React46.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Department Name"), /* @__PURE__ */ React46.createElement(
4557
4603
  "input",
4558
4604
  {
4559
4605
  type: "text",
@@ -4562,7 +4608,8 @@ var UniversalDepartmentsPage = ({
4562
4608
  required: true,
4563
4609
  autoFocus: true,
4564
4610
  maxLength: 50,
4565
- className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300",
4611
+ disabled: isCreating,
4612
+ className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300 disabled:opacity-50",
4566
4613
  placeholder: "e.g. Engineering, Marketing..."
4567
4614
  }
4568
4615
  )), /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React46.createElement(
@@ -4579,45 +4626,13 @@ var UniversalDepartmentsPage = ({
4579
4626
  {
4580
4627
  type: "button",
4581
4628
  onClick: () => {
4582
- setIsCreateMode(false);
4629
+ setIsCreateModalOpen(false);
4583
4630
  setDeptName("");
4584
4631
  },
4585
4632
  disabled: isCreating,
4586
4633
  className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-xs tracking-wide"
4587
4634
  },
4588
4635
  "Cancel"
4589
- ))) : isLoading ? /* @__PURE__ */ React46.createElement(PageSpinner6, null) : /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React46.createElement("div", null, departments.length === 0 ? /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No departments available") : departments.map((dept) => /* @__PURE__ */ React46.createElement(
4590
- "div",
4591
- {
4592
- key: dept.id,
4593
- onClick: () => onDepartmentClick(dept.id),
4594
- className: "flex flex-col py-4 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl gap-2"
4595
- },
4596
- /* @__PURE__ */ React46.createElement("p", { className: "text-[12px] text-black tracking-tight truncate" }, dept.name),
4597
- /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ React46.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ React46.createElement("div", { key: idx, className: "w-7 h-7 rounded-lg border-2 border-white bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ React46.createElement(
4598
- "img",
4599
- {
4600
- src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4601
- alt: "Member",
4602
- className: "w-full h-full object-cover"
4603
- }
4604
- )))), dept.totalMembers > 0 ? /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "Empty"))
4605
- ))), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React46.createElement(
4606
- "button",
4607
- {
4608
- onClick: () => onPageChange(currentPage - 1),
4609
- disabled: currentPage <= 1 || isLoading,
4610
- className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4611
- },
4612
- /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowLeft01Icon13, size: 14 })
4613
- ), /* @__PURE__ */ React46.createElement(
4614
- "button",
4615
- {
4616
- onClick: () => onPageChange(currentPage + 1),
4617
- disabled: currentPage >= totalPages || isLoading || totalPages === 0,
4618
- className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4619
- },
4620
- /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowRight01Icon9, size: 14 })
4621
4636
  )))))));
4622
4637
  };
4623
4638
 
@@ -4897,7 +4912,7 @@ import {
4897
4912
  Notification01Icon as Notification01Icon2,
4898
4913
  ArrowLeft01Icon as ArrowLeft01Icon15,
4899
4914
  ArrowRight01Icon as ArrowRight01Icon11,
4900
- CancelCircleIcon as CancelCircleIcon9,
4915
+ CancelCircleIcon as CancelCircleIcon10,
4901
4916
  ArrowUpRight01Icon as ArrowUpRight01Icon3,
4902
4917
  Settings03Icon
4903
4918
  } from "@hugeicons/core-free-icons";
@@ -5018,7 +5033,7 @@ var UniversalHome2 = ({
5018
5033
  {
5019
5034
  ...departmentsProps
5020
5035
  }
5021
- )), showOrgSwitcher && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowOrgSwitcher(false) }), /* @__PURE__ */ React48.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-auto max-h-[80vh]" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 border-b border-neutral-100" }, /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Switch Workspace"), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowOrgSwitcher(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon9, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, /* @__PURE__ */ React48.createElement("div", { className: "flex flex-col" }, organizations?.length === 0 ? /* @__PURE__ */ React48.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "No organizations found.") : organizations?.map((org) => /* @__PURE__ */ React48.createElement(
5036
+ )), showOrgSwitcher && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowOrgSwitcher(false) }), /* @__PURE__ */ React48.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-auto max-h-[80vh]" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 border-b border-neutral-100" }, /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Switch Workspace"), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowOrgSwitcher(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon10, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, /* @__PURE__ */ React48.createElement("div", { className: "flex flex-col" }, organizations?.length === 0 ? /* @__PURE__ */ React48.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "No organizations found.") : organizations?.map((org) => /* @__PURE__ */ React48.createElement(
5022
5037
  "button",
5023
5038
  {
5024
5039
  key: org.id,
@@ -5030,7 +5045,7 @@ var UniversalHome2 = ({
5030
5045
  },
5031
5046
  /* @__PURE__ */ React48.createElement("span", { className: `text-[13px] tracking-tight ${activeOrgId === org.id ? "text-black " : "text-neutral-600"}` }, org.name),
5032
5047
  activeOrgId === org.id && /* @__PURE__ */ React48.createElement("div", { className: "w-2 h-2 rounded-full bg-emerald-500" })
5033
- )))))), showNotifDialog && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React48.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React48.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon15, size: 14 }), " Back") : /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon9, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ React48.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React48.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React48.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React48.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React48.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ React48.createElement(
5048
+ )))))), showNotifDialog && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React48.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React48.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon15, size: 14 }), " Back") : /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon10, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ React48.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React48.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React48.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React48.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React48.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ React48.createElement(
5034
5049
  "button",
5035
5050
  {
5036
5051
  onClick: () => handleResolve("ACCEPTED"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retinalabsllc/zairusjs",
3
- "version": "16.1.30",
3
+ "version": "16.1.45",
4
4
  "description": "A perceptive, Ai data driven Next.js UI component library.",
5
5
  "author": "Retina Labs Company",
6
6
  "license": "MIT",