@retinalabsllc/zairusjs 16.1.60 → 16.1.65

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
@@ -4546,17 +4546,17 @@ var UniversalDepartmentsPage = ({
4546
4546
  {
4547
4547
  key: dept.id,
4548
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"
4549
+ className: "flex flex-row items-center gap-4 py-2 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4550
4550
  },
4551
- /* @__PURE__ */ import_react77.default.createElement("div", { className: "w-9 h-9 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.UserMultipleIcon, 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-[13px] 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-4 h-4 rounded-md bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ import_react77.default.createElement(
4551
+ /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[13px] 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-4 h-4 rounded-md bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ import_react77.default.createElement(
4553
4552
  "img",
4554
4553
  {
4555
4554
  src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4556
4555
  alt: "Member",
4557
4556
  className: "w-full h-full object-cover"
4558
4557
  }
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" }, "No Members")))
4558
+ )))), 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" }, "No Members"))),
4559
+ /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.ArrowRight01Icon, size: 14, className: "shrink-0 text-neutral-400" })
4560
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
4561
  "button",
4562
4562
  {
@@ -4573,7 +4573,7 @@ var UniversalDepartmentsPage = ({
4573
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
4574
  },
4575
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(
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 " }, /* @__PURE__ */ import_react77.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ import_react77.default.createElement(
4577
4577
  "button",
4578
4578
  {
4579
4579
  onClick: () => setIsCreateModalOpen(false),
@@ -5181,6 +5181,7 @@ var UniversalSettings = ({
5181
5181
  const [isInviting, setIsInviting] = (0, import_react83.useState)(false);
5182
5182
  const [localSearchQuery, setLocalSearchQuery] = (0, import_react83.useState)(membersSearchQuery);
5183
5183
  const [isTyping, setIsTyping] = (0, import_react83.useState)(false);
5184
+ const isFirstSearchMount = (0, import_react83.useRef)(true);
5184
5185
  const [isStatusModalOpen, setIsStatusModalOpen] = (0, import_react83.useState)(false);
5185
5186
  const [isRoleModalOpen, setIsRoleModalOpen] = (0, import_react83.useState)(false);
5186
5187
  const statusDropdownRef = (0, import_react83.useRef)(null);
@@ -5202,18 +5203,22 @@ var UniversalSettings = ({
5202
5203
  }, []);
5203
5204
  (0, import_react83.useEffect)(() => {
5204
5205
  if (activeTab !== "MEMBERS") return;
5206
+ if (isFirstSearchMount.current) {
5207
+ isFirstSearchMount.current = false;
5208
+ return;
5209
+ }
5205
5210
  setIsTyping(true);
5206
5211
  const handler = setTimeout(() => {
5207
5212
  onMembersSearchChange(localSearchQuery);
5208
5213
  setIsTyping(false);
5209
5214
  }, 600);
5210
5215
  return () => clearTimeout(handler);
5211
- }, [localSearchQuery, onMembersSearchChange, activeTab]);
5216
+ }, [localSearchQuery, activeTab]);
5212
5217
  const handleConfirmRemove = async () => {
5213
5218
  if (!memberToRemove || !onRemoveMember) return;
5214
5219
  setIsRemoving(true);
5215
5220
  try {
5216
- await onRemoveMember(memberToRemove.id);
5221
+ await onRemoveMember(memberToRemove.userId);
5217
5222
  import_react_hot_toast16.default.success("Member removed successfully.");
5218
5223
  setExpandedId(null);
5219
5224
  setMemberToRemove(null);
package/dist/index.mjs CHANGED
@@ -4515,7 +4515,6 @@ import {
4515
4515
  ArrowLeft01Icon as ArrowLeft01Icon13,
4516
4516
  ArrowRight01Icon as ArrowRight01Icon9,
4517
4517
  Loading03Icon as Loading03Icon20,
4518
- UserMultipleIcon,
4519
4518
  CancelCircleIcon as CancelCircleIcon9
4520
4519
  } from "@hugeicons/core-free-icons";
4521
4520
  var formatMembersCount = (num) => {
@@ -4564,17 +4563,17 @@ var UniversalDepartmentsPage = ({
4564
4563
  {
4565
4564
  key: dept.id,
4566
4565
  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"
4566
+ className: "flex flex-row items-center gap-4 py-2 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4568
4567
  },
4569
- /* @__PURE__ */ React46.createElement("div", { className: "w-9 h-9 rounded-xl border border-neutral-200 flex items-center justify-center shrink-0" }, /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: UserMultipleIcon, 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-[13px] 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-4 h-4 rounded-md bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ React46.createElement(
4568
+ /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React46.createElement("p", { className: "text-[13px] 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-4 h-4 rounded-md bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ React46.createElement(
4571
4569
  "img",
4572
4570
  {
4573
4571
  src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4574
4572
  alt: "Member",
4575
4573
  className: "w-full h-full object-cover"
4576
4574
  }
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" }, "No Members")))
4575
+ )))), 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" }, "No Members"))),
4576
+ /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowRight01Icon9, size: 14, className: "shrink-0 text-neutral-400" })
4578
4577
  ))), /* @__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
4578
  "button",
4580
4579
  {
@@ -4591,7 +4590,7 @@ var UniversalDepartmentsPage = ({
4591
4590
  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
4591
  },
4593
4592
  /* @__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(
4593
+ )))))), 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 " }, /* @__PURE__ */ React46.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ React46.createElement(
4595
4594
  "button",
4596
4595
  {
4597
4596
  onClick: () => setIsCreateModalOpen(false),
@@ -5224,6 +5223,7 @@ var UniversalSettings = ({
5224
5223
  const [isInviting, setIsInviting] = useState35(false);
5225
5224
  const [localSearchQuery, setLocalSearchQuery] = useState35(membersSearchQuery);
5226
5225
  const [isTyping, setIsTyping] = useState35(false);
5226
+ const isFirstSearchMount = useRef13(true);
5227
5227
  const [isStatusModalOpen, setIsStatusModalOpen] = useState35(false);
5228
5228
  const [isRoleModalOpen, setIsRoleModalOpen] = useState35(false);
5229
5229
  const statusDropdownRef = useRef13(null);
@@ -5245,18 +5245,22 @@ var UniversalSettings = ({
5245
5245
  }, []);
5246
5246
  useEffect19(() => {
5247
5247
  if (activeTab !== "MEMBERS") return;
5248
+ if (isFirstSearchMount.current) {
5249
+ isFirstSearchMount.current = false;
5250
+ return;
5251
+ }
5248
5252
  setIsTyping(true);
5249
5253
  const handler = setTimeout(() => {
5250
5254
  onMembersSearchChange(localSearchQuery);
5251
5255
  setIsTyping(false);
5252
5256
  }, 600);
5253
5257
  return () => clearTimeout(handler);
5254
- }, [localSearchQuery, onMembersSearchChange, activeTab]);
5258
+ }, [localSearchQuery, activeTab]);
5255
5259
  const handleConfirmRemove = async () => {
5256
5260
  if (!memberToRemove || !onRemoveMember) return;
5257
5261
  setIsRemoving(true);
5258
5262
  try {
5259
- await onRemoveMember(memberToRemove.id);
5263
+ await onRemoveMember(memberToRemove.userId);
5260
5264
  toast15.success("Member removed successfully.");
5261
5265
  setExpandedId(null);
5262
5266
  setMemberToRemove(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retinalabsllc/zairusjs",
3
- "version": "16.1.60",
3
+ "version": "16.1.65",
4
4
  "description": "A perceptive, Ai data driven Next.js UI component library.",
5
5
  "author": "Retina Labs Company",
6
6
  "license": "MIT",