@retinalabsllc/zairusjs 16.1.30 → 16.1.50
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +97 -51
- package/dist/index.mjs +107 -54
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1060,6 +1060,7 @@ interface UniversalHome2Props {
|
|
|
1060
1060
|
formatNotifDate: (date: string | Date) => string;
|
|
1061
1061
|
customContent?: React.ReactNode;
|
|
1062
1062
|
departmentsProps: UniversalDepartmentsPageProps;
|
|
1063
|
+
onLogout?: () => Promise<void>;
|
|
1063
1064
|
}
|
|
1064
1065
|
declare const UniversalHome2: React.FC<UniversalHome2Props>;
|
|
1065
1066
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1060,6 +1060,7 @@ interface UniversalHome2Props {
|
|
|
1060
1060
|
formatNotifDate: (date: string | Date) => string;
|
|
1061
1061
|
customContent?: React.ReactNode;
|
|
1062
1062
|
departmentsProps: UniversalDepartmentsPageProps;
|
|
1063
|
+
onLogout?: () => Promise<void>;
|
|
1063
1064
|
}
|
|
1064
1065
|
declare const UniversalHome2: React.FC<UniversalHome2Props>;
|
|
1065
1066
|
|
package/dist/index.js
CHANGED
|
@@ -4517,7 +4517,7 @@ var UniversalDepartmentsPage = ({
|
|
|
4517
4517
|
onDepartmentClick,
|
|
4518
4518
|
onCreateDepartment
|
|
4519
4519
|
}) => {
|
|
4520
|
-
const [
|
|
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
|
-
|
|
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" },
|
|
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: () =>
|
|
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
|
-
)),
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
|
@@ -4892,13 +4901,16 @@ var UniversalHome2 = ({
|
|
|
4892
4901
|
onResolveInvite,
|
|
4893
4902
|
formatNotifDate,
|
|
4894
4903
|
customContent,
|
|
4895
|
-
departmentsProps
|
|
4904
|
+
departmentsProps,
|
|
4905
|
+
onLogout
|
|
4896
4906
|
}) => {
|
|
4897
4907
|
const [isAvatarLoaded, setIsAvatarLoaded] = (0, import_react81.useState)(false);
|
|
4898
4908
|
const [showNotifDialog, setShowNotifDialog] = (0, import_react81.useState)(false);
|
|
4899
4909
|
const [showOrgSwitcher, setShowOrgSwitcher] = (0, import_react81.useState)(false);
|
|
4900
4910
|
const [selectedNotif, setSelectedNotif] = (0, import_react81.useState)(null);
|
|
4901
4911
|
const [isResolving, setIsResolving] = (0, import_react81.useState)(false);
|
|
4912
|
+
const [showLogoutConfirm, setShowLogoutConfirm] = (0, import_react81.useState)(false);
|
|
4913
|
+
const [isLoggingOut, setIsLoggingOut] = (0, import_react81.useState)(false);
|
|
4902
4914
|
const router = (0, import_navigation6.useRouter)();
|
|
4903
4915
|
const fallbackAvatarUrl = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
4904
4916
|
const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
|
|
@@ -4930,7 +4942,31 @@ var UniversalHome2 = ({
|
|
|
4930
4942
|
setIsResolving(false);
|
|
4931
4943
|
}
|
|
4932
4944
|
};
|
|
4933
|
-
|
|
4945
|
+
const confirmLogout = async () => {
|
|
4946
|
+
setIsLoggingOut(true);
|
|
4947
|
+
try {
|
|
4948
|
+
if (onLogout) await onLogout();
|
|
4949
|
+
} catch (e) {
|
|
4950
|
+
import_react_hot_toast15.default.error("Failed to log out cleanly.");
|
|
4951
|
+
} finally {
|
|
4952
|
+
setIsLoggingOut(false);
|
|
4953
|
+
setShowLogoutConfirm(false);
|
|
4954
|
+
}
|
|
4955
|
+
};
|
|
4956
|
+
return /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
4957
|
+
ConfirmationDialog,
|
|
4958
|
+
{
|
|
4959
|
+
isOpen: showLogoutConfirm,
|
|
4960
|
+
title: "Log Out",
|
|
4961
|
+
message: "Are you sure you want to log out of TruHuddle?",
|
|
4962
|
+
confirmText: "Log Out",
|
|
4963
|
+
cancelText: "Cancel",
|
|
4964
|
+
isProcessing: isLoggingOut,
|
|
4965
|
+
isDestructive: true,
|
|
4966
|
+
onClose: () => setShowLogoutConfirm(false),
|
|
4967
|
+
onConfirm: confirmLogout
|
|
4968
|
+
}
|
|
4969
|
+
), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-10 h-10 shrink-0 cursor-pointer", onClick: () => setShowOrgSwitcher(true) }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "relative w-full h-full rounded-lg overflow-hidden bg-white flex items-center justify-center" }, !isAvatarLoaded && /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-white" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 16, className: "animate-spin text-black" })), /* @__PURE__ */ import_react81.default.createElement(
|
|
4934
4970
|
"img",
|
|
4935
4971
|
{
|
|
4936
4972
|
src: finalAvatarSrc,
|
|
@@ -4938,7 +4974,7 @@ var UniversalHome2 = ({
|
|
|
4938
4974
|
onLoad: () => setIsAvatarLoaded(true),
|
|
4939
4975
|
className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
|
|
4940
4976
|
}
|
|
4941
|
-
))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
4977
|
+
))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex-1 h-10 bg-black rounded-full mx-3 flex items-center justify-between px-4" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-3" }, barIcons.map((item, idx) => /* @__PURE__ */ import_react81.default.createElement("button", { key: idx, onClick: item.onClick, className: "outline-none hover:opacity-70 transition-opacity flex items-center justify-center" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: item.icon, size: 16, color: item.color || "white" })))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-white text-[11px] tracking-widest" }, getDisplayStatus()), /* @__PURE__ */ import_react81.default.createElement("div", { className: `w-2 h-2 rounded-full ${getStatusColor()}` }))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
4942
4978
|
"button",
|
|
4943
4979
|
{
|
|
4944
4980
|
onClick: () => router.push("/app/settings"),
|
|
@@ -4991,7 +5027,7 @@ var UniversalHome2 = ({
|
|
|
4991
5027
|
{
|
|
4992
5028
|
...departmentsProps
|
|
4993
5029
|
}
|
|
4994
|
-
)), showOrgSwitcher && /* @__PURE__ */ import_react81.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowOrgSwitcher(false) }), /* @__PURE__ */ import_react81.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 h-auto max-h-[80vh]" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0
|
|
5030
|
+
)), showOrgSwitcher && /* @__PURE__ */ import_react81.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowOrgSwitcher(false) }), /* @__PURE__ */ import_react81.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 h-auto max-h-[80vh]" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Switch Workspace"), /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setShowOrgSwitcher(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col" }, organizations?.length === 0 ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "No organizations found.") : organizations?.map((org) => /* @__PURE__ */ import_react81.default.createElement(
|
|
4995
5031
|
"button",
|
|
4996
5032
|
{
|
|
4997
5033
|
key: org.id,
|
|
@@ -4999,16 +5035,27 @@ var UniversalHome2 = ({
|
|
|
4999
5035
|
onOrganizationSelect?.(org.id);
|
|
5000
5036
|
setShowOrgSwitcher(false);
|
|
5001
5037
|
},
|
|
5002
|
-
className: `p-4 flex items-center justify-between gap-3 cursor-pointer outline-none transition-colors last:border-0 ${activeOrgId === org.id ? "bg-neutral-50" : "hover:bg-neutral-50/50"}`
|
|
5038
|
+
className: `p-4 flex items-center justify-between gap-3 cursor-pointer outline-none transition-colors border-b border-neutral-50 last:border-0 ${activeOrgId === org.id ? "bg-neutral-50" : "hover:bg-neutral-50/50"}`
|
|
5003
5039
|
},
|
|
5004
|
-
/* @__PURE__ */ import_react81.default.createElement("span", { className: `text-[13px] tracking-tight ${activeOrgId === org.id ? "text-black
|
|
5040
|
+
/* @__PURE__ */ import_react81.default.createElement("span", { className: `text-[13px] tracking-tight ${activeOrgId === org.id ? "text-black" : "text-neutral-600"}` }, org.name),
|
|
5005
5041
|
activeOrgId === org.id && /* @__PURE__ */ import_react81.default.createElement("div", { className: "w-2 h-2 rounded-full bg-emerald-500" })
|
|
5006
|
-
))))
|
|
5042
|
+
)))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-4 0 shrink-0" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
5043
|
+
"button",
|
|
5044
|
+
{
|
|
5045
|
+
onClick: () => {
|
|
5046
|
+
setShowOrgSwitcher(false);
|
|
5047
|
+
setShowLogoutConfirm(true);
|
|
5048
|
+
},
|
|
5049
|
+
className: "w-full py-3 flex items-center justify-center gap-2 rounded-full bg-rose-50 text-rose-600 hover:bg-rose-100 transition-colors outline-none text-[13px] tracking-wide"
|
|
5050
|
+
},
|
|
5051
|
+
/* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Logout01Icon, size: 16 }),
|
|
5052
|
+
"Log Out"
|
|
5053
|
+
)))), showNotifDialog && /* @__PURE__ */ import_react81.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ import_react81.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 h-[80vh]" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ import_react81.default.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__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.ArrowLeft01Icon, size: 14 }), " Back") : /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ import_react81.default.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ import_react81.default.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__ */ import_react81.default.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ import_react81.default.createElement(
|
|
5007
5054
|
"button",
|
|
5008
5055
|
{
|
|
5009
5056
|
onClick: () => handleResolve("ACCEPTED"),
|
|
5010
5057
|
disabled: isResolving,
|
|
5011
|
-
className: "flex-1 py-
|
|
5058
|
+
className: "flex-1 py-2.5 rounded-full bg-black text-white text-[12px] tracking-wide transition-all outline-none hover:bg-neutral-800 flex justify-center items-center disabled:opacity-50"
|
|
5012
5059
|
},
|
|
5013
5060
|
isResolving ? /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, className: "animate-spin", size: 16 }) : "Accept"
|
|
5014
5061
|
), /* @__PURE__ */ import_react81.default.createElement(
|
|
@@ -5016,7 +5063,7 @@ var UniversalHome2 = ({
|
|
|
5016
5063
|
{
|
|
5017
5064
|
onClick: () => handleResolve("REJECTED"),
|
|
5018
5065
|
disabled: isResolving,
|
|
5019
|
-
className: "flex-1 py-
|
|
5066
|
+
className: "flex-1 py-2.5 rounded-full bg-white border border-neutral-200 text-black text-[12px] tracking-wide transition-all outline-none hover:bg-neutral-50 flex justify-center items-center disabled:opacity-50"
|
|
5020
5067
|
},
|
|
5021
5068
|
"Reject"
|
|
5022
5069
|
))) : /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex flex-col divide-y divide-neutral-50/50" }, notifications?.length === 0 && !isNotifsLoading ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "You have no notifications.") : notifications?.map((notif) => /* @__PURE__ */ import_react81.default.createElement(
|
|
@@ -5109,7 +5156,6 @@ var UniversalSettings = ({
|
|
|
5109
5156
|
onInviteMember,
|
|
5110
5157
|
initialDisplayName,
|
|
5111
5158
|
initialSlug,
|
|
5112
|
-
slugPrefixUrl = "https://truhuddle.com/company/",
|
|
5113
5159
|
onSaveAccount,
|
|
5114
5160
|
onCheckSlugAvailability,
|
|
5115
5161
|
aiCredits,
|
|
@@ -5312,7 +5358,7 @@ var UniversalSettings = ({
|
|
|
5312
5358
|
className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none"
|
|
5313
5359
|
},
|
|
5314
5360
|
/* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.ListSettingIcon, size: 16 })
|
|
5315
|
-
))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ import_react83.default.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.name), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ import_react83.default.createElement("div", { className: "mb-8" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6
|
|
5361
|
+
))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ import_react83.default.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.name), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ import_react83.default.createElement("div", { className: "mb-8" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6" }, !isAccountReadOnly && /* @__PURE__ */ import_react83.default.createElement(
|
|
5316
5362
|
"button",
|
|
5317
5363
|
{
|
|
5318
5364
|
onClick: () => setMemberToRemove(activeExpandedMember),
|
|
@@ -5424,7 +5470,7 @@ var UniversalSettings = ({
|
|
|
5424
5470
|
placeholder: "Sovereign User",
|
|
5425
5471
|
maxLength: 50
|
|
5426
5472
|
}
|
|
5427
|
-
), /* @__PURE__ */ import_react83.default.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ import_react83.default.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ import_react83.default.createElement(
|
|
5473
|
+
), accountType === "ORGANIZATION" && /* @__PURE__ */ import_react83.default.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ import_react83.default.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ import_react83.default.createElement(
|
|
5428
5474
|
"input",
|
|
5429
5475
|
{
|
|
5430
5476
|
type: "text",
|
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 {
|
|
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 [
|
|
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
|
-
|
|
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" },
|
|
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: () =>
|
|
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
|
-
)),
|
|
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
|
-
|
|
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
|
-
|
|
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,9 +4912,10 @@ import {
|
|
|
4897
4912
|
Notification01Icon as Notification01Icon2,
|
|
4898
4913
|
ArrowLeft01Icon as ArrowLeft01Icon15,
|
|
4899
4914
|
ArrowRight01Icon as ArrowRight01Icon11,
|
|
4900
|
-
CancelCircleIcon as
|
|
4915
|
+
CancelCircleIcon as CancelCircleIcon10,
|
|
4901
4916
|
ArrowUpRight01Icon as ArrowUpRight01Icon3,
|
|
4902
|
-
Settings03Icon
|
|
4917
|
+
Settings03Icon,
|
|
4918
|
+
Logout01Icon
|
|
4903
4919
|
} from "@hugeicons/core-free-icons";
|
|
4904
4920
|
var UniversalHome2 = ({
|
|
4905
4921
|
avatarSrc,
|
|
@@ -4919,13 +4935,16 @@ var UniversalHome2 = ({
|
|
|
4919
4935
|
onResolveInvite,
|
|
4920
4936
|
formatNotifDate,
|
|
4921
4937
|
customContent,
|
|
4922
|
-
departmentsProps
|
|
4938
|
+
departmentsProps,
|
|
4939
|
+
onLogout
|
|
4923
4940
|
}) => {
|
|
4924
4941
|
const [isAvatarLoaded, setIsAvatarLoaded] = useState34(false);
|
|
4925
4942
|
const [showNotifDialog, setShowNotifDialog] = useState34(false);
|
|
4926
4943
|
const [showOrgSwitcher, setShowOrgSwitcher] = useState34(false);
|
|
4927
4944
|
const [selectedNotif, setSelectedNotif] = useState34(null);
|
|
4928
4945
|
const [isResolving, setIsResolving] = useState34(false);
|
|
4946
|
+
const [showLogoutConfirm, setShowLogoutConfirm] = useState34(false);
|
|
4947
|
+
const [isLoggingOut, setIsLoggingOut] = useState34(false);
|
|
4929
4948
|
const router = useRouter3();
|
|
4930
4949
|
const fallbackAvatarUrl = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
4931
4950
|
const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
|
|
@@ -4957,7 +4976,31 @@ var UniversalHome2 = ({
|
|
|
4957
4976
|
setIsResolving(false);
|
|
4958
4977
|
}
|
|
4959
4978
|
};
|
|
4960
|
-
|
|
4979
|
+
const confirmLogout = async () => {
|
|
4980
|
+
setIsLoggingOut(true);
|
|
4981
|
+
try {
|
|
4982
|
+
if (onLogout) await onLogout();
|
|
4983
|
+
} catch (e) {
|
|
4984
|
+
toast14.error("Failed to log out cleanly.");
|
|
4985
|
+
} finally {
|
|
4986
|
+
setIsLoggingOut(false);
|
|
4987
|
+
setShowLogoutConfirm(false);
|
|
4988
|
+
}
|
|
4989
|
+
};
|
|
4990
|
+
return /* @__PURE__ */ React48.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React48.createElement(
|
|
4991
|
+
ConfirmationDialog,
|
|
4992
|
+
{
|
|
4993
|
+
isOpen: showLogoutConfirm,
|
|
4994
|
+
title: "Log Out",
|
|
4995
|
+
message: "Are you sure you want to log out of TruHuddle?",
|
|
4996
|
+
confirmText: "Log Out",
|
|
4997
|
+
cancelText: "Cancel",
|
|
4998
|
+
isProcessing: isLoggingOut,
|
|
4999
|
+
isDestructive: true,
|
|
5000
|
+
onClose: () => setShowLogoutConfirm(false),
|
|
5001
|
+
onConfirm: confirmLogout
|
|
5002
|
+
}
|
|
5003
|
+
), /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ React48.createElement("div", { className: "w-10 h-10 shrink-0 cursor-pointer", onClick: () => setShowOrgSwitcher(true) }, /* @__PURE__ */ React48.createElement("div", { className: "relative w-full h-full rounded-lg overflow-hidden bg-white flex items-center justify-center" }, !isAvatarLoaded && /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-white" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 16, className: "animate-spin text-black" })), /* @__PURE__ */ React48.createElement(
|
|
4961
5004
|
"img",
|
|
4962
5005
|
{
|
|
4963
5006
|
src: finalAvatarSrc,
|
|
@@ -4965,7 +5008,7 @@ var UniversalHome2 = ({
|
|
|
4965
5008
|
onLoad: () => setIsAvatarLoaded(true),
|
|
4966
5009
|
className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
|
|
4967
5010
|
}
|
|
4968
|
-
))), /* @__PURE__ */ React48.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ React48.createElement(
|
|
5011
|
+
))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 h-10 bg-black rounded-full mx-3 flex items-center justify-between px-4" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center gap-3" }, barIcons.map((item, idx) => /* @__PURE__ */ React48.createElement("button", { key: idx, onClick: item.onClick, className: "outline-none hover:opacity-70 transition-opacity flex items-center justify-center" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: item.icon, size: 16, color: item.color || "white" })))), /* @__PURE__ */ React48.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React48.createElement("span", { className: "text-white text-[11px] tracking-widest" }, getDisplayStatus()), /* @__PURE__ */ React48.createElement("div", { className: `w-2 h-2 rounded-full ${getStatusColor()}` }))), /* @__PURE__ */ React48.createElement("div", { className: "flex items-center gap-2 shrink-0" }, /* @__PURE__ */ React48.createElement(
|
|
4969
5012
|
"button",
|
|
4970
5013
|
{
|
|
4971
5014
|
onClick: () => router.push("/app/settings"),
|
|
@@ -5018,7 +5061,7 @@ var UniversalHome2 = ({
|
|
|
5018
5061
|
{
|
|
5019
5062
|
...departmentsProps
|
|
5020
5063
|
}
|
|
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
|
|
5064
|
+
)), 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" }, /* @__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
5065
|
"button",
|
|
5023
5066
|
{
|
|
5024
5067
|
key: org.id,
|
|
@@ -5026,16 +5069,27 @@ var UniversalHome2 = ({
|
|
|
5026
5069
|
onOrganizationSelect?.(org.id);
|
|
5027
5070
|
setShowOrgSwitcher(false);
|
|
5028
5071
|
},
|
|
5029
|
-
className: `p-4 flex items-center justify-between gap-3 cursor-pointer outline-none transition-colors last:border-0 ${activeOrgId === org.id ? "bg-neutral-50" : "hover:bg-neutral-50/50"}`
|
|
5072
|
+
className: `p-4 flex items-center justify-between gap-3 cursor-pointer outline-none transition-colors border-b border-neutral-50 last:border-0 ${activeOrgId === org.id ? "bg-neutral-50" : "hover:bg-neutral-50/50"}`
|
|
5030
5073
|
},
|
|
5031
|
-
/* @__PURE__ */ React48.createElement("span", { className: `text-[13px] tracking-tight ${activeOrgId === org.id ? "text-black
|
|
5074
|
+
/* @__PURE__ */ React48.createElement("span", { className: `text-[13px] tracking-tight ${activeOrgId === org.id ? "text-black" : "text-neutral-600"}` }, org.name),
|
|
5032
5075
|
activeOrgId === org.id && /* @__PURE__ */ React48.createElement("div", { className: "w-2 h-2 rounded-full bg-emerald-500" })
|
|
5033
|
-
))))
|
|
5076
|
+
)))), /* @__PURE__ */ React48.createElement("div", { className: "p-4 0 shrink-0" }, /* @__PURE__ */ React48.createElement(
|
|
5077
|
+
"button",
|
|
5078
|
+
{
|
|
5079
|
+
onClick: () => {
|
|
5080
|
+
setShowOrgSwitcher(false);
|
|
5081
|
+
setShowLogoutConfirm(true);
|
|
5082
|
+
},
|
|
5083
|
+
className: "w-full py-3 flex items-center justify-center gap-2 rounded-full bg-rose-50 text-rose-600 hover:bg-rose-100 transition-colors outline-none text-[13px] tracking-wide"
|
|
5084
|
+
},
|
|
5085
|
+
/* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Logout01Icon, size: 16 }),
|
|
5086
|
+
"Log Out"
|
|
5087
|
+
)))), 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
5088
|
"button",
|
|
5035
5089
|
{
|
|
5036
5090
|
onClick: () => handleResolve("ACCEPTED"),
|
|
5037
5091
|
disabled: isResolving,
|
|
5038
|
-
className: "flex-1 py-
|
|
5092
|
+
className: "flex-1 py-2.5 rounded-full bg-black text-white text-[12px] tracking-wide transition-all outline-none hover:bg-neutral-800 flex justify-center items-center disabled:opacity-50"
|
|
5039
5093
|
},
|
|
5040
5094
|
isResolving ? /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, className: "animate-spin", size: 16 }) : "Accept"
|
|
5041
5095
|
), /* @__PURE__ */ React48.createElement(
|
|
@@ -5043,7 +5097,7 @@ var UniversalHome2 = ({
|
|
|
5043
5097
|
{
|
|
5044
5098
|
onClick: () => handleResolve("REJECTED"),
|
|
5045
5099
|
disabled: isResolving,
|
|
5046
|
-
className: "flex-1 py-
|
|
5100
|
+
className: "flex-1 py-2.5 rounded-full bg-white border border-neutral-200 text-black text-[12px] tracking-wide transition-all outline-none hover:bg-neutral-50 flex justify-center items-center disabled:opacity-50"
|
|
5047
5101
|
},
|
|
5048
5102
|
"Reject"
|
|
5049
5103
|
))) : /* @__PURE__ */ React48.createElement("div", { className: "flex flex-col divide-y divide-neutral-50/50" }, notifications?.length === 0 && !isNotifsLoading ? /* @__PURE__ */ React48.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "You have no notifications.") : notifications?.map((notif) => /* @__PURE__ */ React48.createElement(
|
|
@@ -5145,7 +5199,6 @@ var UniversalSettings = ({
|
|
|
5145
5199
|
onInviteMember,
|
|
5146
5200
|
initialDisplayName,
|
|
5147
5201
|
initialSlug,
|
|
5148
|
-
slugPrefixUrl = "https://truhuddle.com/company/",
|
|
5149
5202
|
onSaveAccount,
|
|
5150
5203
|
onCheckSlugAvailability,
|
|
5151
5204
|
aiCredits,
|
|
@@ -5348,7 +5401,7 @@ var UniversalSettings = ({
|
|
|
5348
5401
|
className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none"
|
|
5349
5402
|
},
|
|
5350
5403
|
/* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ListSettingIcon3, size: 16 })
|
|
5351
|
-
))), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React49.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React49.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ React49.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React49.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.name), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ React49.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6
|
|
5404
|
+
))), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React49.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React49.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ React49.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React49.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.name), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ React49.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6" }, !isAccountReadOnly && /* @__PURE__ */ React49.createElement(
|
|
5352
5405
|
"button",
|
|
5353
5406
|
{
|
|
5354
5407
|
onClick: () => setMemberToRemove(activeExpandedMember),
|
|
@@ -5460,7 +5513,7 @@ var UniversalSettings = ({
|
|
|
5460
5513
|
placeholder: "Sovereign User",
|
|
5461
5514
|
maxLength: 50
|
|
5462
5515
|
}
|
|
5463
|
-
), /* @__PURE__ */ React49.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React49.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React49.createElement(
|
|
5516
|
+
), accountType === "ORGANIZATION" && /* @__PURE__ */ React49.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React49.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React49.createElement(
|
|
5464
5517
|
"input",
|
|
5465
5518
|
{
|
|
5466
5519
|
type: "text",
|