@retinalabsllc/zairusjs 20.1.8 → 20.1.10
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 +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +234 -38
- package/dist/index.mjs +239 -38
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -606,7 +606,7 @@ var ReusableOptions = ({
|
|
|
606
606
|
const filteredOptions = options.filter(
|
|
607
607
|
(opt) => opt.toLowerCase().includes(searchQuery.toLowerCase())
|
|
608
608
|
);
|
|
609
|
-
return /* @__PURE__ */ React8.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React8.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: onClose }), /* @__PURE__ */ React8.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 max-h-[80vh]" }, /* @__PURE__ */ React8.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React8.createElement("h3", { className: "text-
|
|
609
|
+
return /* @__PURE__ */ React8.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React8.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: onClose }), /* @__PURE__ */ React8.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 max-h-[80vh]" }, /* @__PURE__ */ React8.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React8.createElement("h3", { className: "text-lg text-black tracking-tight" }, title), /* @__PURE__ */ React8.createElement("button", { onClick: onClose, className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React8.createElement(HugeiconsIcon4, { icon: CancelCircleIcon, size: 18 }))), showSearch && /* @__PURE__ */ React8.createElement("div", { className: "p-4 shrink-0 " }, /* @__PURE__ */ React8.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React8.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React8.createElement(HugeiconsIcon4, { icon: Search01Icon, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React8.createElement(
|
|
610
610
|
"input",
|
|
611
611
|
{
|
|
612
612
|
type: "text",
|
|
@@ -625,7 +625,7 @@ var ReusableOptions = ({
|
|
|
625
625
|
onSelect(opt);
|
|
626
626
|
onClose();
|
|
627
627
|
},
|
|
628
|
-
className: `w-full text-left
|
|
628
|
+
className: `w-full text-left px-4 py-2 text-xs tracking-tight rounded-full transition-colors outline-none ${isSelected ? "text-[#d97757] bg-[#d97757]/10" : "text-stone-600 hover:bg-stone-50/50"}`
|
|
629
629
|
},
|
|
630
630
|
opt.charAt(0).toUpperCase() + opt.slice(1).toLowerCase()
|
|
631
631
|
);
|
|
@@ -747,7 +747,7 @@ var CalendarPicker = ({
|
|
|
747
747
|
{
|
|
748
748
|
onClick: handlePrevMonth,
|
|
749
749
|
disabled: viewYear === today.getFullYear() && viewMonth === today.getMonth(),
|
|
750
|
-
className: "w-8 h-8 flex items-center justify-center rounded-full hover:bg-stone-100 disabled:opacity-30 disabled:cursor-not-allowed outline-none transition-colors"
|
|
750
|
+
className: "w-8 h-8 flex items-center justify-center border border-stone-200 rounded-full hover:bg-stone-100 disabled:opacity-30 disabled:cursor-not-allowed outline-none transition-colors"
|
|
751
751
|
},
|
|
752
752
|
/* @__PURE__ */ React9.createElement(HugeiconsIcon5, { icon: ArrowLeft01Icon, size: 16, className: "text-black" })
|
|
753
753
|
), /* @__PURE__ */ React9.createElement(
|
|
@@ -755,7 +755,7 @@ var CalendarPicker = ({
|
|
|
755
755
|
{
|
|
756
756
|
onClick: handleNextMonth,
|
|
757
757
|
disabled: viewYear === maxDate.getFullYear() && viewMonth === 11,
|
|
758
|
-
className: "w-8 h-8 flex items-center justify-center rounded-full hover:bg-stone-100 disabled:opacity-30 disabled:cursor-not-allowed outline-none transition-colors"
|
|
758
|
+
className: "w-8 h-8 flex items-center justify-center border border-stone-200 rounded-full hover:bg-stone-100 disabled:opacity-30 disabled:cursor-not-allowed outline-none transition-colors"
|
|
759
759
|
},
|
|
760
760
|
/* @__PURE__ */ React9.createElement(HugeiconsIcon5, { icon: ArrowRight01Icon, size: 16, className: "text-black" })
|
|
761
761
|
))), /* @__PURE__ */ React9.createElement("div", { className: "grid grid-cols-7 gap-1" }, DAYS_OF_WEEK.map((d) => /* @__PURE__ */ React9.createElement("div", { key: d, className: "text-center text-xs text-stone-400 py-2" }, d)), Array.from({ length: firstDayOffset }).map((_, i) => /* @__PURE__ */ React9.createElement("div", { key: `empty-${i}` })), Array.from({ length: daysInMonth }).map((_, i) => {
|
|
@@ -818,7 +818,7 @@ var ConfirmationDialog = ({
|
|
|
818
818
|
{
|
|
819
819
|
onClick: onConfirm,
|
|
820
820
|
disabled: isProcessing,
|
|
821
|
-
className: `flex-1 py-4 text-sm transition-colors disabled:opacity-50 flex justify-center items-center outline-none ${isDestructive ? "text-
|
|
821
|
+
className: `flex-1 py-4 text-sm transition-colors disabled:opacity-50 flex justify-center items-center outline-none ${isDestructive ? "text-[#d97757] hover:bg-stone-50" : "text-black hover:bg-stone-50"}`
|
|
822
822
|
},
|
|
823
823
|
isProcessing ? /* @__PURE__ */ React10.createElement(HugeiconsIcon6, { icon: Loading03Icon3, className: "animate-spin", size: 18 }) : confirmText
|
|
824
824
|
))));
|
|
@@ -969,10 +969,10 @@ var UniversalHuddleDetails = ({
|
|
|
969
969
|
setTitle(e.target.value.substring(0, 80));
|
|
970
970
|
setIsDirty(true);
|
|
971
971
|
},
|
|
972
|
-
className: "w-full text-sm
|
|
972
|
+
className: "w-full text-sm focus:border-[#d97757] outline-none py-2 text-black bg-transparent",
|
|
973
973
|
autoFocus: true
|
|
974
974
|
}
|
|
975
|
-
), /* @__PURE__ */ React11.createElement("button", { onClick: () => setIsEditingTitle(false), className: "text-xs text-[#d97757] outline-none " }, "Done")) : /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("span", { className: "text-sm text-black py-2" }, title), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setIsEditingTitle(true), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"))), /* @__PURE__ */ React11.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-6" }, /* @__PURE__ */ React11.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React11.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Date"), /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center relative w-full border-b border-transparent pb-3 pt-3" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Calendar01Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React11.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, huddleDate.toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" }))), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setCalendarMode("DATE"), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"))), /* @__PURE__ */ React11.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React11.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Time"), /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center relative w-full border-b border-transparent pb-3 pt-3" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Clock01Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React11.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, huddleDate.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }))), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setCalendarMode("TIME"), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"))), /* @__PURE__ */ React11.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React11.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Timezone"), /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center relative w-full border-b border-transparent pb-3 pt-3" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Globe02Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React11.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, timezone)), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setShowTimezoneModal(true), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit")))), /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between py-2 mt-2" }, /* @__PURE__ */ React11.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React11.createElement("span", { className: "text-sm text-black tracking-tight" }, "Private Huddle"), /* @__PURE__ */ React11.createElement("span", { className: "text-xs text-stone-500" }, "Only invited members can join.")), /* @__PURE__ */ React11.createElement(
|
|
975
|
+
), /* @__PURE__ */ React11.createElement("button", { onClick: () => setIsEditingTitle(false), className: "text-xs text-[#d97757] outline-none " }, "Done")) : /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("span", { className: "text-sm text-black py-2" }, title), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setIsEditingTitle(true), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"))), /* @__PURE__ */ React11.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-6" }, /* @__PURE__ */ React11.createElement("div", { className: "space-y-1.5 border-b border-stone-200 w-full" }, /* @__PURE__ */ React11.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Date"), /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center relative w-full border-b border-transparent pb-3 pt-3" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Calendar01Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React11.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, huddleDate.toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" }))), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setCalendarMode("DATE"), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"))), /* @__PURE__ */ React11.createElement("div", { className: "space-y-1.5 border-b border-stone-200 w-full" }, /* @__PURE__ */ React11.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Time"), /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center relative w-full border-b border-transparent pb-3 pt-3" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Clock01Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React11.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, huddleDate.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }))), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setCalendarMode("TIME"), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"))), /* @__PURE__ */ React11.createElement("div", { className: "space-y-1.5 border-b border-stone-200 w-full" }, /* @__PURE__ */ React11.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Timezone"), /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center relative w-full border-b border-transparent pb-3 pt-3" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Globe02Icon, size: 16, className: "text-stone-400 absolute left-0" }), /* @__PURE__ */ React11.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, timezone)), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setShowTimezoneModal(true), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit")))), /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between py-2 mt-2" }, /* @__PURE__ */ React11.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React11.createElement("span", { className: "text-sm text-black tracking-tight" }, "Private Huddle"), /* @__PURE__ */ React11.createElement("span", { className: "text-xs text-stone-500" }, "Only invited members can join.")), /* @__PURE__ */ React11.createElement(
|
|
976
976
|
"button",
|
|
977
977
|
{
|
|
978
978
|
type: "button",
|
|
@@ -986,7 +986,7 @@ var UniversalHuddleDetails = ({
|
|
|
986
986
|
className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#d97757]" : "bg-stone-200"} ${!enableEdits && "opacity-50 cursor-not-allowed"}`
|
|
987
987
|
},
|
|
988
988
|
/* @__PURE__ */ React11.createElement("div", { className: `absolute top-1 left-1 bg-white w-4 h-4 rounded-full transition-transform ${isPrivate ? "translate-x-5" : "translate-x-0"}` })
|
|
989
|
-
)), isPrivate && /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-stone-50 p-4 rounded-xl" }, /* @__PURE__ */ React11.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React11.createElement("span", { className: "text-xs text-black tracking-tight" }, "Participants"), /* @__PURE__ */ React11.createElement("span", { className: "text-xs text-[#d97757] " }, selectedParticipants.size, " added")), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setShowMembersModal(true), className: "px-4 py-2 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent" }, "Manage Access")), isDirty && /* @__PURE__ */ React11.createElement("div", { className: "pt-4 animate-in fade-in duration-300" }, /* @__PURE__ */ React11.createElement(ThreeDActionButton, { onClick: handleUpdate, isLoading: isSubmitting, className: "w-full sm:w-auto min-w-40" }, "Save Changes")), /* @__PURE__ */ React11.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 " }, (liveStatus === "SCHEDULED" || liveStatus === "ONGOING") && /* @__PURE__ */ React11.createElement("a", { href: `/app/join/${huddle.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-[#d97757] text-[#d97757] rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/5" }, "Join Huddle"), /* @__PURE__ */ React11.createElement("a", { href: `/app/assets/${huddle.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Huddle Assets"), canDelete && liveStatus === "SCHEDULED" && /* @__PURE__ */ React11.createElement("button", { onClick: () => setConfirmDialog("CANCEL"), className: "flex-1 w-full py-2.5 bg-transparent border border-
|
|
989
|
+
)), isPrivate && /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-stone-50 p-4 rounded-xl" }, /* @__PURE__ */ React11.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React11.createElement("span", { className: "text-xs text-black tracking-tight" }, "Participants"), /* @__PURE__ */ React11.createElement("span", { className: "text-xs text-[#d97757] " }, selectedParticipants.size, " added")), enableEdits && /* @__PURE__ */ React11.createElement("button", { onClick: () => setShowMembersModal(true), className: "px-4 py-2 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent" }, "Manage Access")), isDirty && /* @__PURE__ */ React11.createElement("div", { className: "pt-4 animate-in fade-in duration-300" }, /* @__PURE__ */ React11.createElement(ThreeDActionButton, { onClick: handleUpdate, isLoading: isSubmitting, className: "w-full sm:w-auto min-w-40" }, "Save Changes")), /* @__PURE__ */ React11.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 " }, (liveStatus === "SCHEDULED" || liveStatus === "ONGOING") && /* @__PURE__ */ React11.createElement("a", { href: `/app/join/${huddle.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-[#d97757] text-[#d97757] rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/5" }, "Join Huddle"), /* @__PURE__ */ React11.createElement("a", { href: `/app/assets/${huddle.id}`, className: "flex-1 w-full py-2.5 bg-transparent border border-stone-200 text-black rounded-full text-center text-xs transition-colors hover:bg-stone-50" }, "Huddle Assets"), canDelete && liveStatus === "SCHEDULED" && /* @__PURE__ */ React11.createElement("button", { onClick: () => setConfirmDialog("CANCEL"), className: "flex-1 w-full py-2.5 bg-transparent border border-[#d97757] text-[#d97757] rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/10" }, "Cancel Huddle"), canDelete && liveStatus !== "SCHEDULED" && /* @__PURE__ */ React11.createElement("button", { onClick: () => setConfirmDialog("DELETE"), className: "flex-1 w-full py-2.5 bg-transparent border border-[#d97757] text-[#d97757] rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/10" }, "Delete Huddle"))), /* @__PURE__ */ React11.createElement(
|
|
990
990
|
CalendarPicker,
|
|
991
991
|
{
|
|
992
992
|
isOpen: calendarMode !== null,
|
|
@@ -1012,7 +1012,7 @@ var UniversalHuddleDetails = ({
|
|
|
1012
1012
|
},
|
|
1013
1013
|
showSearch: true
|
|
1014
1014
|
}
|
|
1015
|
-
), showMembersModal && /* @__PURE__ */ React11.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React11.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React11.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React11.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Manage Participants"), /* @__PURE__ */ React11.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] hover:text-[#d97757] transition-colors outline-none text-sm " }, "Done")), /* @__PURE__ */ React11.createElement("div", { className: "p-4 shrink-0 " }, /* @__PURE__ */ React11.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React11.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Search01Icon2, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React11.createElement("input", { type: "text", placeholder: "Search team...", value: localSearchQuery, onChange: handleSearchInput, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full text-sm text-black placeholder-stone-400 outline-none focus:bg-stone-200 transition-colors" }))), /* @__PURE__ */ React11.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isMembersLoading || isTyping ? /* @__PURE__ */ React11.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Loading03Icon4, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React11.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
1015
|
+
), showMembersModal && /* @__PURE__ */ React11.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React11.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React11.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React11.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Manage Participants"), /* @__PURE__ */ React11.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] hover:text-[#d97757] transition-colors outline-none text-sm " }, "Done")), /* @__PURE__ */ React11.createElement("div", { className: "p-4 shrink-0 " }, /* @__PURE__ */ React11.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React11.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Search01Icon2, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React11.createElement("input", { type: "text", placeholder: "Search team...", value: localSearchQuery, onChange: handleSearchInput, className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full text-sm text-black placeholder-stone-400 outline-none focus:border-[#d97757] border border-transparent focus:bg-stone-200 transition-colors" }))), /* @__PURE__ */ React11.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isMembersLoading || isTyping ? /* @__PURE__ */ React11.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Loading03Icon4, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React11.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
1016
1016
|
const isChecked = selectedParticipants.has(member.userId);
|
|
1017
1017
|
return /* @__PURE__ */ React11.createElement("div", { key: member.id, onClick: () => toggleParticipant(member.userId), className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors select-none" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React11.createElement(MemberAvatar, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React11.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React11.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React11.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ React11.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React11.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#d97757]" : "border border-stone-300 bg-white"}` }, isChecked && /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: Tick02Icon, size: 14, className: "text-white" }))));
|
|
1018
1018
|
})), /* @__PURE__ */ React11.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React11.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React11.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React11.createElement("button", { disabled: membersCurrentPage <= 1 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage - 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: ArrowLeft01Icon2, size: 12 })), /* @__PURE__ */ React11.createElement("button", { disabled: membersCurrentPage >= membersTotalPages || membersTotalPages === 0 || isMembersLoading, onClick: () => onMembersPageChange(membersCurrentPage + 1), className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-stone-200 text-stone-600 disabled:opacity-30 outline-none hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React11.createElement(HugeiconsIcon7, { icon: ArrowRight01Icon2, size: 12 })))))));
|
|
@@ -1023,15 +1023,13 @@ import React12 from "react";
|
|
|
1023
1023
|
import Link4 from "next/link";
|
|
1024
1024
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
1025
1025
|
import { HugeiconsIcon as HugeiconsIcon8 } from "@hugeicons/react";
|
|
1026
|
-
var MobileNav = ({ items }) => {
|
|
1026
|
+
var MobileNav = ({ items, hideMobileNav = false }) => {
|
|
1027
1027
|
const pathname = usePathname2();
|
|
1028
|
-
if (!items || items.length === 0) return null;
|
|
1028
|
+
if (hideMobileNav || !items || items.length === 0) return null;
|
|
1029
1029
|
const pathMatches = items.some((item) => {
|
|
1030
1030
|
return item.href === "/" || item.href === "/app" ? pathname === "/" || pathname === "/app" : pathname === item.href || pathname?.startsWith(`${item.href}/`);
|
|
1031
1031
|
});
|
|
1032
|
-
{
|
|
1033
|
-
}
|
|
1034
|
-
return /* @__PURE__ */ React12.createElement("div", { className: "fixed bottom-6 inset-x-0 z-100 flex justify-center pointer-events-none px-3 animate-in slide-in-from-bottom-8 fade-in duration-500 md:hidden" }, /* @__PURE__ */ React12.createElement("nav", { className: "pointer-events-auto w-full max-w-sm bg-white/50 backdrop-blur-xl shadow-[0_8px_30px_rgb(0,0,0,0.08)] rounded-full px-6 py-2.5 flex items-center justify-between" }, items.map((item, index) => {
|
|
1032
|
+
return /* @__PURE__ */ React12.createElement("div", { className: "fixed bottom-0 inset-x-0 z-100 flex justify-center pointer-events-none animate-in slide-in-from-bottom-8 fade-in duration-500 md:hidden" }, /* @__PURE__ */ React12.createElement("nav", { className: "pointer-events-auto w-full max-w-sm bg-white/50 backdrop-blur-xl shadow-[0_8px_30px_rgb(0,0,0,0.08)] px-8 py-2.5 pb-[calc(env(safe-area-inset-bottom)+0.625rem)] flex items-center justify-between" }, items.map((item, index) => {
|
|
1035
1033
|
const isActive = !pathMatches && index === 0 ? true : item.href === "/" || item.href === "/app" ? pathname === "/" || pathname === "/app" : pathname === item.href || pathname?.startsWith(`${item.href}/`);
|
|
1036
1034
|
return /* @__PURE__ */ React12.createElement(
|
|
1037
1035
|
Link4,
|
|
@@ -1085,7 +1083,7 @@ var TextInput = ({
|
|
|
1085
1083
|
readOnly,
|
|
1086
1084
|
autoComplete: "off",
|
|
1087
1085
|
spellCheck: "false",
|
|
1088
|
-
className: `w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black transition-all outline-none focus:border-
|
|
1086
|
+
className: `w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black transition-all outline-none focus:border-[#d97757] disabled:opacity-50 ${readOnly ? "cursor-pointer" : ""}`
|
|
1089
1087
|
}
|
|
1090
1088
|
));
|
|
1091
1089
|
var NumberInput = ({
|
|
@@ -1311,7 +1309,7 @@ var UniversalOrganizationPage = ({
|
|
|
1311
1309
|
className: "w-full px-2 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1312
1310
|
placeholder: "sovereign-user-handle"
|
|
1313
1311
|
}
|
|
1314
|
-
), /* @__PURE__ */ React15.createElement("span", { className: "text-stone-400 text-sm py-3 pr-8 shrink-0 whitespace-nowrap" }, slugPrefixUrl), /* @__PURE__ */ React15.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React15.createElement(InputSpinner2, null), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React15.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-
|
|
1312
|
+
), /* @__PURE__ */ React15.createElement("span", { className: "text-stone-400 text-sm py-3 pr-8 shrink-0 whitespace-nowrap" }, slugPrefixUrl), /* @__PURE__ */ React15.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React15.createElement(InputSpinner2, null), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React15.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ React15.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React15.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React15.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React15.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React15.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ React15.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React15.createElement(
|
|
1315
1313
|
ThreeDActionButton,
|
|
1316
1314
|
{
|
|
1317
1315
|
type: "submit",
|
|
@@ -1668,7 +1666,7 @@ var getStatusClasses = (status) => {
|
|
|
1668
1666
|
case "COMPLETED":
|
|
1669
1667
|
return "text-emerald-700 bg-emerald-100";
|
|
1670
1668
|
case "FAILED":
|
|
1671
|
-
return "text-
|
|
1669
|
+
return "text-[#d97757] bg-[#d97757]/10";
|
|
1672
1670
|
case "REVERSED":
|
|
1673
1671
|
return "text-sky-700 bg-sky-100";
|
|
1674
1672
|
default:
|
|
@@ -1919,7 +1917,7 @@ var UniversalHomeView = ({
|
|
|
1919
1917
|
className: "relative w-10 h-10 flex items-center justify-center rounded-full bg-white outline-none hover:bg-stone-50 transition-colors"
|
|
1920
1918
|
},
|
|
1921
1919
|
/* @__PURE__ */ React20.createElement(HugeiconsIcon15, { icon: Notification01Icon, size: 20, className: "text-black" }),
|
|
1922
|
-
hasUnreadNotifs && /* @__PURE__ */ React20.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-
|
|
1920
|
+
hasUnreadNotifs && /* @__PURE__ */ React20.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
|
|
1923
1921
|
)), /* @__PURE__ */ React20.createElement("div", { className: "w-full pb-6 flex flex-col gap-4" }, /* @__PURE__ */ React20.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React20.createElement(
|
|
1924
1922
|
"div",
|
|
1925
1923
|
{
|
|
@@ -1968,7 +1966,7 @@ var UniversalHomeView = ({
|
|
|
1968
1966
|
},
|
|
1969
1967
|
className: `p-3 flex items-start gap-3 rounded-xl cursor-pointer transition-colors ${isNotifsLoading ? "opacity-50 pointer-events-none" : "hover:bg-stone-50"}`
|
|
1970
1968
|
},
|
|
1971
|
-
/* @__PURE__ */ React20.createElement("div", { className: "mt-1.5 shrink-0" }, !notif.isRead ? /* @__PURE__ */ React20.createElement("div", { className: "w-1.5 h-1.5 bg-
|
|
1969
|
+
/* @__PURE__ */ React20.createElement("div", { className: "mt-1.5 shrink-0" }, !notif.isRead ? /* @__PURE__ */ React20.createElement("div", { className: "w-1.5 h-1.5 bg-[#d97757] rounded-full" }) : /* @__PURE__ */ React20.createElement("div", { className: "w-1.5 h-1.5 bg-transparent" })),
|
|
1972
1970
|
/* @__PURE__ */ React20.createElement("div", { className: "flex-1 min-w-0 text-left" }, /* @__PURE__ */ React20.createElement("h5", { className: `text-xs truncate ${notif.isRead ? "text-stone-500" : "text-black "}` }, notif.title), /* @__PURE__ */ React20.createElement("p", { className: "text-xs text-stone-400 truncate mt-0.5" }, notif.message), /* @__PURE__ */ React20.createElement("span", { className: "text-xs text-stone-400 tracking-widest mt-2 block " }, formatNotifDate(notif.createdAt)))
|
|
1973
1971
|
)))), !selectedNotif && /* @__PURE__ */ React20.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 " }, /* @__PURE__ */ React20.createElement("span", { className: "text-xs text-stone-400 tracking-widest " }, "Page ", notificationPage, " of ", notificationTotalPages === 0 ? 1 : notificationTotalPages), /* @__PURE__ */ React20.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React20.createElement(
|
|
1974
1972
|
"button",
|
|
@@ -2158,7 +2156,7 @@ var UniversalWalletPage = ({
|
|
|
2158
2156
|
onChange: (e) => setLocalSearchQuery(e.target.value),
|
|
2159
2157
|
className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-black"
|
|
2160
2158
|
}
|
|
2161
|
-
)), !external && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React21.createElement("button", { onClick: startWalletGeneration, className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: PlusSignIcon, size: 16 })), /* @__PURE__ */ React21.createElement("button", { onClick: startWalletImport, className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: Upload01Icon, size: 16 })))), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, headerTitle), headerDescription && /* @__PURE__ */ React21.createElement("p", { className: "text-xs text-stone-500" }, headerDescription))), /* @__PURE__ */ React21.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ React21.createElement(PageSpinner3, null) : /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React21.createElement("div", null, filteredWallets.length === 0 ? /* @__PURE__ */ React21.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No wallets found") : filteredWallets.map((wallet) => /* @__PURE__ */ React21.createElement("div", { key: wallet.id, onClick: () => setSelectedWallet(wallet), className: "flex items-center justify-between py-4 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React21.createElement("div", { className: "relative shrink-0" }, /* @__PURE__ */ React21.createElement(WalletLogo, { src: wallet.logoSrc, alt: wallet.name }), wallet.networkLogoSrc && /* @__PURE__ */ React21.createElement("div", { className: "absolute -bottom-1 -right-1 w-4 h-4 rounded-full border border-white bg-white overflow-hidden shadow-sm" }, /* @__PURE__ */ React21.createElement("img", { src: wallet.networkLogoSrc, alt: "Network", className: "w-full h-full object-cover" }))), /* @__PURE__ */ React21.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-1" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement("p", { className: "text-sm text-black truncate" }, wallet.name), !external && wallet.isActive !== void 0 && /* @__PURE__ */ React21.createElement("span", { className: `text-xs px-1.5 py-0.5 rounded-sm tracking-widest ${wallet.isActive ? "bg-emerald-50 text-emerald-600" : "bg-
|
|
2159
|
+
)), !external && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React21.createElement("button", { onClick: startWalletGeneration, className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: PlusSignIcon, size: 16 })), /* @__PURE__ */ React21.createElement("button", { onClick: startWalletImport, className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: Upload01Icon, size: 16 })))), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, headerTitle), headerDescription && /* @__PURE__ */ React21.createElement("p", { className: "text-xs text-stone-500" }, headerDescription))), /* @__PURE__ */ React21.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ React21.createElement(PageSpinner3, null) : /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React21.createElement("div", null, filteredWallets.length === 0 ? /* @__PURE__ */ React21.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No wallets found") : filteredWallets.map((wallet) => /* @__PURE__ */ React21.createElement("div", { key: wallet.id, onClick: () => setSelectedWallet(wallet), className: "flex items-center justify-between py-4 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React21.createElement("div", { className: "relative shrink-0" }, /* @__PURE__ */ React21.createElement(WalletLogo, { src: wallet.logoSrc, alt: wallet.name }), wallet.networkLogoSrc && /* @__PURE__ */ React21.createElement("div", { className: "absolute -bottom-1 -right-1 w-4 h-4 rounded-full border border-white bg-white overflow-hidden shadow-sm" }, /* @__PURE__ */ React21.createElement("img", { src: wallet.networkLogoSrc, alt: "Network", className: "w-full h-full object-cover" }))), /* @__PURE__ */ React21.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-1" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement("p", { className: "text-sm text-black truncate" }, wallet.name), !external && wallet.isActive !== void 0 && /* @__PURE__ */ React21.createElement("span", { className: `text-xs px-1.5 py-0.5 rounded-sm tracking-widest ${wallet.isActive ? "bg-emerald-50 text-emerald-600" : "bg-[#d97757]/10 text-[#d97757]"}` }, wallet.isActive ? "Active" : "Inactive")), /* @__PURE__ */ React21.createElement("p", { className: `text-sm text-stone-500 truncate transition-all duration-300 ${hideBalanceAmounts && !external ? "blur-sm opacity-40 select-none" : ""}` }, external ? wallet.currency : `${wallet.balance} ${wallet.currency}`))), /* @__PURE__ */ React21.createElement("div", { className: "shrink-0 flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ React21.createElement("span", { className: "text-xs tracking-wide text-stone-600 bg-stone-100 px-2.5 py-1 rounded-full " }, wallet.network)))))))), addModalOpen && /* @__PURE__ */ React21.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React21.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isProcessing && setAddModalOpen(false) }), /* @__PURE__ */ React21.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React21.createElement("h3", { className: "text-sm text-black tracking-tight" }, flowStep === 1 ? "Important Notice" : flowStep === 2 ? "Secret Recovery Phrase" : flowStep === 3 ? "Verify Phrase" : "Secure Wallet"), /* @__PURE__ */ React21.createElement("button", { onClick: () => !isProcessing && setAddModalOpen(false), className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: CancelCircleIcon6, size: 18 }))), /* @__PURE__ */ React21.createElement("div", { className: "p-6" }, flowStep === 1 && /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in" }, /* @__PURE__ */ React21.createElement(Banner, { type: "alert", title: "Critical Warning", message: "You are about to generate a Self-Custodial Recovery Phrase. This phrase is the absolute master key to your wallet and all assets within it. Aeona DOES NOT store this phrase. If you lose it, your funds are permanently lost. Do not share this phrase with anyone.", isDismissible: false }), /* @__PURE__ */ React21.createElement(ThreeDActionButton, { onClick: handleCreationNext, className: "w-full mt-2" }, "I Understand, Generate Phrase")), flowStep === 2 && /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in slide-in-from-right-4" }, /* @__PURE__ */ React21.createElement("p", { className: "text-sm text-stone-600" }, "Please write down these words in the exact order shown. Store them in a secure, offline location."), /* @__PURE__ */ React21.createElement("div", { className: "grid grid-cols-3 gap-2 max-h-48 overflow-y-auto custom-scrollbar pr-1" }, generatedPhrase.split(" ").map((word, idx) => /* @__PURE__ */ React21.createElement("div", { key: idx, className: "flex items-center gap-1.5 bg-stone-50 rounded-lg p-2 selection:bg-stone-100" }, /* @__PURE__ */ React21.createElement("span", { className: "text-xs text-stone-400 select-none w-4 text-right shrink-0" }, idx + 1, "."), /* @__PURE__ */ React21.createElement("span", { className: "text-sm text-black " }, word)))), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between gap-2 0 pt-4" }, /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: () => handleCopy(generatedPhrase, false), className: "text-xs text-black flex items-center gap-1.5 hover:underline outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: Copy01Icon2, size: 14 }), " Copy Phrase"), /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: handleDownloadTxt, className: "text-xs text-black flex items-center gap-1.5 hover:underline outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: Download01Icon, size: 14 }), " Download .txt")), /* @__PURE__ */ React21.createElement("div", { className: "flex items-start gap-3 p-3 rounded-xl border border-stone-200 mt-2" }, /* @__PURE__ */ React21.createElement("input", { type: "checkbox", id: "backup-confirm", checked: hasBackedUp, onChange: (e) => setHasBackedUp(e.target.checked), className: "mt-0.5 w-4 h-4 bg-white border-stone-300 rounded text-black focus:ring-black cursor-pointer shrink-0" }), /* @__PURE__ */ React21.createElement("label", { htmlFor: "backup-confirm", className: "text-xs text-stone-600 cursor-pointer leading-relaxed" }, "I have securely copied and stored my recovery phrase. I understand that if I lose it, my funds are gone forever.")), /* @__PURE__ */ React21.createElement(ThreeDActionButton, { onClick: handleCreationNext, className: "w-full mt-2" }, "Continue")), flowStep === 3 && /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in slide-in-from-right-4" }, /* @__PURE__ */ React21.createElement("p", { className: "text-sm text-stone-600" }, "Please enter or paste your recovery phrase below to verify your backup."), /* @__PURE__ */ React21.createElement("div", { className: "grid grid-cols-3 gap-2 max-h-56 overflow-y-auto custom-scrollbar pr-1 pb-1" }, verifyWords.map((word, idx) => /* @__PURE__ */ React21.createElement("div", { key: idx, className: "flex items-center gap-1 bg-white border border-stone-200 focus-within:border-black rounded-lg p-1.5 transition-colors" }, /* @__PURE__ */ React21.createElement("span", { className: "text-xs text-stone-400 w-4 shrink-0 text-right select-none" }, idx + 1, "."), /* @__PURE__ */ React21.createElement(
|
|
2162
2160
|
"input",
|
|
2163
2161
|
{
|
|
2164
2162
|
type: "text",
|
|
@@ -2217,7 +2215,7 @@ var UniversalWalletPage = ({
|
|
|
2217
2215
|
message: `Ensure you only send assets using the exact network specified. Minimum deposit is 15 ${selectedWallet.currency}. Sending funds through an unsupported network or under the minimum will result in permanent loss of funds.`,
|
|
2218
2216
|
isDismissible: false
|
|
2219
2217
|
}
|
|
2220
|
-
)), /* @__PURE__ */ React21.createElement("div", { className: "grid grid-cols-1 gap-y-6 gap-x-4 mb-10" }, /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement("span", { className: "text-xs tracking-[0.2em] text-stone-400 block mb-2" }, "Wallet Address"), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ React21.createElement("span", { className: "text-sm text-black truncate min-w-0 block" }, truncateAddress2(selectedWallet.address)), /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: () => setShowCopyWarning(true), className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: Copy01Icon2, size: 14 })))), !external && /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement("span", { className: "text-xs tracking-[0.2em] text-stone-400 block mb-2" }, "Wallet Status"), selectedWallet.isActive ? /* @__PURE__ */ React21.createElement("span", { className: "text-sm px-1.5 py-0.5 bg-emerald-50 text-emerald-600 " }, "Active on this device") : /* @__PURE__ */ React21.createElement("span", { className: "text-sm px-1.5 py-0.5 bg-
|
|
2218
|
+
)), /* @__PURE__ */ React21.createElement("div", { className: "grid grid-cols-1 gap-y-6 gap-x-4 mb-10" }, /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement("span", { className: "text-xs tracking-[0.2em] text-stone-400 block mb-2" }, "Wallet Address"), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ React21.createElement("span", { className: "text-sm text-black truncate min-w-0 block" }, truncateAddress2(selectedWallet.address)), /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: () => setShowCopyWarning(true), className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React21.createElement(HugeiconsIcon16, { icon: Copy01Icon2, size: 14 })))), !external && /* @__PURE__ */ React21.createElement("div", null, /* @__PURE__ */ React21.createElement("span", { className: "text-xs tracking-[0.2em] text-stone-400 block mb-2" }, "Wallet Status"), selectedWallet.isActive ? /* @__PURE__ */ React21.createElement("span", { className: "text-sm px-1.5 py-0.5 bg-emerald-50 text-emerald-600 " }, "Active on this device") : /* @__PURE__ */ React21.createElement("span", { className: "text-sm px-1.5 py-0.5 bg-[#d97757]/10 text-[#d97757] " }, "Inactive - Requires Import"))), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React21.createElement("button", { type: "button", onClick: () => setShowCopyWarning(true), className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 outline-none text-xs tracking-wide transition-colors" }, "Copy Wallet Address"))))), selectedWallet && /* @__PURE__ */ React21.createElement(
|
|
2221
2219
|
ConfirmationDialog,
|
|
2222
2220
|
{
|
|
2223
2221
|
isOpen: showCopyWarning,
|
|
@@ -4050,7 +4048,7 @@ var VerificationRow = ({
|
|
|
4050
4048
|
statusColor = "text-stone-500";
|
|
4051
4049
|
bg = "bg-stone-50";
|
|
4052
4050
|
StatusIcon = InformationCircleIcon2;
|
|
4053
|
-
iconColor = "text-
|
|
4051
|
+
iconColor = "text-[#d97757]";
|
|
4054
4052
|
break;
|
|
4055
4053
|
case "ACTION_REQUIRED":
|
|
4056
4054
|
default:
|
|
@@ -4358,7 +4356,7 @@ var getTierGlow = (tier) => {
|
|
|
4358
4356
|
case "ONE":
|
|
4359
4357
|
return "from-emerald-200";
|
|
4360
4358
|
case "ZERO":
|
|
4361
|
-
return "from-
|
|
4359
|
+
return "from-[#d97757]";
|
|
4362
4360
|
default:
|
|
4363
4361
|
return "from-stone-100";
|
|
4364
4362
|
}
|
|
@@ -4884,7 +4882,7 @@ var HuddleAvatar = ({ src, status, sizeClass = "w-10 h-10" }) => {
|
|
|
4884
4882
|
case "COMPLETED":
|
|
4885
4883
|
return "bg-stone-400";
|
|
4886
4884
|
case "CANCELLED":
|
|
4887
|
-
return "bg-
|
|
4885
|
+
return "bg-[#d97757]";
|
|
4888
4886
|
default:
|
|
4889
4887
|
return "bg-stone-200";
|
|
4890
4888
|
}
|
|
@@ -4972,7 +4970,7 @@ var MemberAvatar2 = ({ src, status }) => {
|
|
|
4972
4970
|
case "BUSY":
|
|
4973
4971
|
return "bg-amber-500";
|
|
4974
4972
|
case "OFFLINE":
|
|
4975
|
-
return "bg-
|
|
4973
|
+
return "bg-[#d97757]";
|
|
4976
4974
|
case "AWAY":
|
|
4977
4975
|
return "bg-stone-400";
|
|
4978
4976
|
default:
|
|
@@ -5097,7 +5095,7 @@ var UniversalMembersPage = ({
|
|
|
5097
5095
|
placeholder: "Search members...",
|
|
5098
5096
|
value: localSearchQuery,
|
|
5099
5097
|
onChange: (e) => setLocalSearchQuery(e.target.value),
|
|
5100
|
-
className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-
|
|
5098
|
+
className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-[#d97757] border border-transparent"
|
|
5101
5099
|
}
|
|
5102
5100
|
)), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React50.createElement(
|
|
5103
5101
|
"button",
|
|
@@ -5156,7 +5154,7 @@ var UniversalMembersPage = ({
|
|
|
5156
5154
|
"button",
|
|
5157
5155
|
{
|
|
5158
5156
|
onClick: () => setMemberToRemove(member),
|
|
5159
|
-
className: "flex-1 py-2.5 bg-white border border-
|
|
5157
|
+
className: "flex-1 py-2.5 bg-white border border-[#d97757] text-[#d97757] hover:bg-[#d97757]/10 rounded-full text-xs tracking-wide transition-colors outline-none"
|
|
5160
5158
|
},
|
|
5161
5159
|
actionButtonText
|
|
5162
5160
|
), /* @__PURE__ */ React50.createElement(
|
|
@@ -5336,7 +5334,7 @@ var UniversalHome2 = ({
|
|
|
5336
5334
|
className: "relative w-10 h-10 flex items-center justify-center rounded-full bg-white outline-none hover:bg-stone-50 transition-colors"
|
|
5337
5335
|
},
|
|
5338
5336
|
/* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: Notification01Icon2, size: 20, className: "text-black" }),
|
|
5339
|
-
hasUnreadNotifs && /* @__PURE__ */ React51.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-
|
|
5337
|
+
hasUnreadNotifs && /* @__PURE__ */ React51.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-[#d97757] rounded-full border border-white" })
|
|
5340
5338
|
))), /* @__PURE__ */ React51.createElement("div", { className: "w-full pb-6 flex flex-col gap-4" }, /* @__PURE__ */ React51.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ React51.createElement(
|
|
5341
5339
|
"div",
|
|
5342
5340
|
{
|
|
@@ -5422,7 +5420,7 @@ var UniversalHome2 = ({
|
|
|
5422
5420
|
},
|
|
5423
5421
|
className: `p-3 flex items-start gap-3 rounded-xl cursor-pointer transition-colors ${isNotifsLoading ? "opacity-50 pointer-events-none" : "hover:bg-stone-50"}`
|
|
5424
5422
|
},
|
|
5425
|
-
/* @__PURE__ */ React51.createElement("div", { className: "mt-1.5 shrink-0" }, !notif.isRead ? /* @__PURE__ */ React51.createElement("div", { className: "w-1.5 h-1.5 bg-
|
|
5423
|
+
/* @__PURE__ */ React51.createElement("div", { className: "mt-1.5 shrink-0" }, !notif.isRead ? /* @__PURE__ */ React51.createElement("div", { className: "w-1.5 h-1.5 bg-[#d97757] rounded-full" }) : /* @__PURE__ */ React51.createElement("div", { className: "w-1.5 h-1.5 bg-transparent" })),
|
|
5426
5424
|
/* @__PURE__ */ React51.createElement("div", { className: "flex-1 min-w-0 text-left" }, /* @__PURE__ */ React51.createElement("h5", { className: `text-xs truncate ${notif.isRead ? "text-stone-500" : "text-black"}` }, notif.title), /* @__PURE__ */ React51.createElement("p", { className: "text-xs text-stone-400 truncate mt-0.5" }, notif.message), /* @__PURE__ */ React51.createElement("span", { className: "text-xs text-stone-400 tracking-widest mt-2 block" }, formatNotifDate(notif.createdAt)))
|
|
5427
5425
|
)))), !selectedNotif && /* @__PURE__ */ React51.createElement("div", { className: "p-4 flex items-center justify-between shrink-0" }, /* @__PURE__ */ React51.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", notificationPage, " of ", notificationTotalPages === 0 ? 1 : notificationTotalPages), /* @__PURE__ */ React51.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React51.createElement(
|
|
5428
5426
|
"button",
|
|
@@ -5470,7 +5468,7 @@ var MemberAvatar3 = ({ src, status, sizeClass = "w-10 h-10" }) => {
|
|
|
5470
5468
|
case "BUSY":
|
|
5471
5469
|
return "bg-amber-500";
|
|
5472
5470
|
case "OFFLINE":
|
|
5473
|
-
return "bg-
|
|
5471
|
+
return "bg-[#d97757]";
|
|
5474
5472
|
case "AWAY":
|
|
5475
5473
|
return "bg-stone-400";
|
|
5476
5474
|
default:
|
|
@@ -5573,7 +5571,7 @@ var UniversalSettings = ({
|
|
|
5573
5571
|
setExpandedId(null);
|
|
5574
5572
|
setMemberToRemove(null);
|
|
5575
5573
|
} catch (error) {
|
|
5576
|
-
toast14.error("Failed to remove member.");
|
|
5574
|
+
toast14.error(error.message || "Failed to remove member.");
|
|
5577
5575
|
} finally {
|
|
5578
5576
|
setIsRemoving(false);
|
|
5579
5577
|
}
|
|
@@ -5682,21 +5680,30 @@ var UniversalSettings = ({
|
|
|
5682
5680
|
onClose: () => setMemberToRemove(null),
|
|
5683
5681
|
onConfirm: handleConfirmRemove
|
|
5684
5682
|
}
|
|
5685
|
-
), !isInviteMode && !activeExpandedMember && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React52.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Search01Icon6, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React52.createElement("input", { type: "text", placeholder: "Search members...", value: localSearchQuery, onChange: (e) => setLocalSearchQuery(e.target.value), className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-
|
|
5683
|
+
), !isInviteMode && !activeExpandedMember && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React52.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Search01Icon6, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React52.createElement("input", { type: "text", placeholder: "Search members...", value: localSearchQuery, onChange: (e) => setLocalSearchQuery(e.target.value), className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-[#d97757] border border-transparent " })), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React52.createElement("button", { onClick: () => setIsStatusModalOpen(true), className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: SearchList02Icon3, size: 16 })), /* @__PURE__ */ React52.createElement("button", { onClick: () => setIsRoleModalOpen(true), className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ListSettingIcon3, size: 16 })))), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "mb-6 flex w-full items-center" }, /* @__PURE__ */ React52.createElement(
|
|
5684
|
+
"button",
|
|
5685
|
+
{
|
|
5686
|
+
onClick: () => setExpandedId(null),
|
|
5687
|
+
disabled: isUpdatingRole,
|
|
5688
|
+
className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none disabled:opacity-50"
|
|
5689
|
+
},
|
|
5690
|
+
/* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowLeft01Icon18, size: 16 }),
|
|
5691
|
+
" Back"
|
|
5692
|
+
)), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-4 mb-4" }, /* @__PURE__ */ React52.createElement(MemberAvatar3, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React52.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React52.createElement("span", { className: "text-xs text-stone-500 capitalize" }, activeExpandedMember.role.toLowerCase()), canManage && (isUpdatingRole ? /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Loading03Icon25, size: 12, className: "animate-spin text-stone-400 ml-1" }) : /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("span", { className: "text-stone-300 text-xs px-0.5" }, "\u2022"), /* @__PURE__ */ React52.createElement("button", { onClick: () => setRoleEditTarget(activeExpandedMember), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"), /* @__PURE__ */ React52.createElement("span", { className: "text-stone-300 text-xs px-0.5" }, "\u2022"), /* @__PURE__ */ React52.createElement(
|
|
5686
5693
|
"button",
|
|
5687
5694
|
{
|
|
5688
5695
|
onClick: () => setMemberToRemove(activeExpandedMember),
|
|
5689
5696
|
disabled: isUpdatingRole,
|
|
5690
|
-
className: "
|
|
5697
|
+
className: "text-xs text-[#d97757] hover:underline outline-none disabled:opacity-50"
|
|
5691
5698
|
},
|
|
5692
|
-
"Remove
|
|
5693
|
-
)
|
|
5699
|
+
"Remove"
|
|
5700
|
+
))))))) : /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && canManage && /* @__PURE__ */ React52.createElement("button", { onClick: () => setIsInviteMode(true), className: "shrink-0 px-4 py-1.5 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-stone-50 transition-colors outline-none" }, "Invite Team")), !isInviteMode && /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ React52.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ React52.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React52.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React52.createElement("input", { type: "email", value: inviteEmail, onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "name@company.com" })), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React52.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"), /* @__PURE__ */ React52.createElement("button", { type: "button", onClick: () => {
|
|
5694
5701
|
setIsInviteMode(false);
|
|
5695
5702
|
setInviteEmail("");
|
|
5696
|
-
}, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ React52.createElement(PageSpinner8, null) : /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React52.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React52.createElement(MemberAvatar3, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React52.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React52.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React52.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowLeft01Icon18, size: 14 })), /* @__PURE__ */ React52.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowRight01Icon13, size: 14 })))))))), /* @__PURE__ */ React52.createElement(ReusableOptions, { isOpen: isStatusModalOpen, onClose: () => setIsStatusModalOpen(false), title: "Status Filter", options: ["ALL", "ACTIVE", "BUSY", "OFFLINE", "AWAY"], selectedOption: activeStatusFilter, onSelect: (status) => onStatusFilterChange(status) }), /* @__PURE__ */ React52.createElement(ReusableOptions, { isOpen: isRoleModalOpen, onClose: () => setIsRoleModalOpen(false), title: "Role Filter", options: ["ALL", "OWNER", "ADMIN", "MANAGER", "MEMBER", "GUEST"], selectedOption: activeRoleFilter, onSelect: (role) => onRoleFilterChange(role) }), /* @__PURE__ */ React52.createElement(ReusableOptions, { isOpen: !!roleEditTarget, onClose: () => setRoleEditTarget(null), title: "Modify Access Role", options: ["ADMIN", "MANAGER", "MEMBER"], selectedOption: roleEditTarget?.role || "", onSelect: handleRoleUpdate })), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles.")), !canManage && /* @__PURE__ */ React52.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: CircleLock02Icon3, size: 18, className: "text-current" }))), /* @__PURE__ */ React52.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center relative w-full border-b border-stone-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React52.createElement("input", { type: "text", value: orgSlug, disabled: !canManage || isSavingOrg, onChange: (e) => handleOrgSlugChange(e.target.value), spellCheck: "false", autoComplete: "off", className: "w-full pr-10 pl-0 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed", placeholder: "workspace-handle" }), /* @__PURE__ */ React52.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React52.createElement(InputSpinner3, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React52.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-
|
|
5703
|
+
}, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-stone-200 text-black hover:bg-stone-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ React52.createElement(PageSpinner8, null) : /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React52.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React52.createElement(MemberAvatar3, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React52.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React52.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React52.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowLeft01Icon18, size: 14 })), /* @__PURE__ */ React52.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-stone-200 rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowRight01Icon13, size: 14 })))))))), /* @__PURE__ */ React52.createElement(ReusableOptions, { isOpen: isStatusModalOpen, onClose: () => setIsStatusModalOpen(false), title: "Status Filter", options: ["ALL", "ACTIVE", "BUSY", "OFFLINE", "AWAY"], selectedOption: activeStatusFilter, onSelect: (status) => onStatusFilterChange(status) }), /* @__PURE__ */ React52.createElement(ReusableOptions, { isOpen: isRoleModalOpen, onClose: () => setIsRoleModalOpen(false), title: "Role Filter", options: ["ALL", "OWNER", "ADMIN", "MANAGER", "MEMBER", "GUEST"], selectedOption: activeRoleFilter, onSelect: (role) => onRoleFilterChange(role) }), /* @__PURE__ */ React52.createElement(ReusableOptions, { isOpen: !!roleEditTarget, onClose: () => setRoleEditTarget(null), title: "Modify Access Role", options: ["ADMIN", "MANAGER", "MEMBER"], selectedOption: roleEditTarget?.role || "", onSelect: handleRoleUpdate })), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles.")), !canManage && /* @__PURE__ */ React52.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: CircleLock02Icon3, size: 18, className: "text-current" }))), /* @__PURE__ */ React52.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center relative w-full border-b border-stone-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React52.createElement("input", { type: "text", value: orgSlug, disabled: !canManage || isSavingOrg, onChange: (e) => handleOrgSlugChange(e.target.value), spellCheck: "false", autoComplete: "off", className: "w-full pr-10 pl-0 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed", placeholder: "workspace-handle" }), /* @__PURE__ */ React52.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React52.createElement(InputSpinner3, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React52.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ React52.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React52.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React52.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React52.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React52.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ React52.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React52.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ React52.createElement("button", { type: "button", onClick: () => {
|
|
5697
5704
|
setOrgName(initialOrgName || "");
|
|
5698
5705
|
setOrgSlug(initialOrgSlug || "");
|
|
5699
|
-
}, className: "text-xs tracking-widest text-stone-400 hover:text-black transition-colors outline-none" }, "Cancel")))), activeTab === "ACCOUNT" && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 rounded-2xl p-6 bg-white w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Personal Identity"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "Update your system display name and contact email."))), /* @__PURE__ */ React52.createElement("form", { className: "flex flex-col gap-6 w-full max-w-5xl", onSubmit: handleSaveProfile, autoComplete: "off" }, /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "First Name", value: firstName, onChange: (v) => setFirstName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "First name", maxLength: 50 }), /* @__PURE__ */ React52.createElement(TextInput, { label: "Last Name", value: lastName, onChange: (v) => setLastName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "Last name", maxLength: 50 })), /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React52.createElement("input", { type: "email", value: initialEmail, disabled: true, className: "w-full pb-3 pt-3 text-sm bg-transparent text-stone-400 border-b border-stone-200 outline-none cursor-not-allowed" })), /* @__PURE__ */ React52.createElement("div", { className: "pt-4 flex items-center gap-4" }, /* @__PURE__ */ React52.createElement(ThreeDActionButton, { type: "submit", disabled: isProfileSaveDisabled, isLoading: isSavingProfile, className: "min-w-32" }, "Update Identity")))), /* @__PURE__ */ React52.createElement("div", { className: "bg-white rounded-2xl p-6 w-full flex flex-col sm:flex-row sm:items-center justify-between gap-6 border border-stone-100" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col items-start max-w-sm" }, /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-400 tracking-[0.2em] mb-2
|
|
5706
|
+
}, className: "text-xs tracking-widest text-stone-400 hover:text-black transition-colors outline-none" }, "Cancel")))), activeTab === "ACCOUNT" && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 rounded-2xl p-6 bg-white w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Personal Identity"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "Update your system display name and contact email."))), /* @__PURE__ */ React52.createElement("form", { className: "flex flex-col gap-6 w-full max-w-5xl", onSubmit: handleSaveProfile, autoComplete: "off" }, /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "First Name", value: firstName, onChange: (v) => setFirstName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "First name", maxLength: 50 }), /* @__PURE__ */ React52.createElement(TextInput, { label: "Last Name", value: lastName, onChange: (v) => setLastName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "Last name", maxLength: 50 })), /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React52.createElement("input", { type: "email", value: initialEmail, disabled: true, className: "w-full pb-3 pt-3 text-sm bg-transparent text-stone-400 border-b border-stone-200 outline-none cursor-not-allowed" })), /* @__PURE__ */ React52.createElement("div", { className: "pt-4 flex items-center gap-4" }, /* @__PURE__ */ React52.createElement(ThreeDActionButton, { type: "submit", disabled: isProfileSaveDisabled, isLoading: isSavingProfile, className: "min-w-32" }, "Update Identity")))), /* @__PURE__ */ React52.createElement("div", { className: "bg-white rounded-2xl p-6 w-full flex flex-col sm:flex-row sm:items-center justify-between gap-6 border border-stone-100" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col items-start max-w-sm" }, /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-400 tracking-[0.2em] mb-2 " }, "AI Credits Balance"), isBillingLoading ? /* @__PURE__ */ React52.createElement("div", { className: "h-8 w-32 bg-stone-100 animate-pulse rounded mt-1" }) : /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-2 mt-1" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Coins01Icon, size: 28, className: "text-[#d97757]" }), /* @__PURE__ */ React52.createElement("span", { className: "text-3xl text-black tracking-tight" }, aiCredits)), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500 mt-4 leading-relaxed" }, "AI credits are consumed when generating intelligent summaries, transcriptions, and automated huddle insights.")), /* @__PURE__ */ React52.createElement("button", { onClick: onTopUp, className: "w-12 h-12 rounded-full border border-stone-200 flex items-center justify-center text-black hover:bg-stone-50 transition-colors outline-none shrink-0", "aria-label": "Top Up Credits" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: PlusSignIcon3, size: 20 })))));
|
|
5700
5707
|
};
|
|
5701
5708
|
|
|
5702
5709
|
// src/components/UniversalCreateHuddle.tsx
|
|
@@ -5906,7 +5913,7 @@ var UniversalCreateHuddle = ({
|
|
|
5906
5913
|
placeholder: "Search team...",
|
|
5907
5914
|
value: localSearchQuery,
|
|
5908
5915
|
onChange: handleSearchInput,
|
|
5909
|
-
className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full text-sm text-black placeholder-stone-400 outline-none focus:bg-stone-200 transition-colors"
|
|
5916
|
+
className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black placeholder-stone-400 outline-none focus:bg-stone-200 transition-colors"
|
|
5910
5917
|
}
|
|
5911
5918
|
))), /* @__PURE__ */ React53.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isMembersLoading || isTyping ? /* @__PURE__ */ React53.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React53.createElement(HugeiconsIcon39, { icon: Loading03Icon26, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React53.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
5912
5919
|
const isChecked = selectedParticipants.has(member.userId);
|
|
@@ -5938,6 +5945,199 @@ var UniversalCreateHuddle = ({
|
|
|
5938
5945
|
/* @__PURE__ */ React53.createElement(HugeiconsIcon39, { icon: ArrowRight01Icon14, size: 12 })
|
|
5939
5946
|
))))));
|
|
5940
5947
|
};
|
|
5948
|
+
|
|
5949
|
+
// src/components/HomeHuddleCalendar.tsx
|
|
5950
|
+
import React54, { useState as useState40, useRef as useRef16, useEffect as useEffect23 } from "react";
|
|
5951
|
+
import { useRouter as useRouter4 } from "next/navigation";
|
|
5952
|
+
import { HugeiconsIcon as HugeiconsIcon40 } from "@hugeicons/react";
|
|
5953
|
+
import {
|
|
5954
|
+
ArrowLeft01Icon as ArrowLeft01Icon20,
|
|
5955
|
+
ArrowRight01Icon as ArrowRight01Icon15,
|
|
5956
|
+
Loading03Icon as Loading03Icon27,
|
|
5957
|
+
Search01Icon as Search01Icon8,
|
|
5958
|
+
TimeScheduleIcon
|
|
5959
|
+
} from "@hugeicons/core-free-icons";
|
|
5960
|
+
var MONTHS2 = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
5961
|
+
var DAYS_OF_WEEK2 = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
5962
|
+
var HuddleAvatar2 = ({ src, status, sizeClass = "w-10 h-10" }) => {
|
|
5963
|
+
const [loaded, setLoaded] = useState40(false);
|
|
5964
|
+
const [error, setError] = useState40(false);
|
|
5965
|
+
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/default_a.avif";
|
|
5966
|
+
const finalSrc = error || !src ? defaultAvatar : src;
|
|
5967
|
+
const getStatusColor = () => {
|
|
5968
|
+
switch (status?.toUpperCase()) {
|
|
5969
|
+
case "SCHEDULED":
|
|
5970
|
+
return "bg-amber-500";
|
|
5971
|
+
case "ONGOING":
|
|
5972
|
+
return "bg-emerald-500";
|
|
5973
|
+
case "COMPLETED":
|
|
5974
|
+
return "bg-stone-400";
|
|
5975
|
+
case "CANCELLED":
|
|
5976
|
+
return "bg-[#d97757]";
|
|
5977
|
+
default:
|
|
5978
|
+
return "bg-stone-200";
|
|
5979
|
+
}
|
|
5980
|
+
};
|
|
5981
|
+
return /* @__PURE__ */ React54.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React54.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: Loading03Icon27, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React54.createElement(
|
|
5982
|
+
"img",
|
|
5983
|
+
{
|
|
5984
|
+
src: finalSrc,
|
|
5985
|
+
alt: "Huddle Avatar",
|
|
5986
|
+
className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`,
|
|
5987
|
+
onLoad: () => setLoaded(true),
|
|
5988
|
+
onError: () => setError(true)
|
|
5989
|
+
}
|
|
5990
|
+
)), /* @__PURE__ */ React54.createElement("div", { className: `absolute -bottom-1 -right-1 w-3.5 h-3.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
|
|
5991
|
+
};
|
|
5992
|
+
var HomeHuddleCalendar = ({
|
|
5993
|
+
huddles = [],
|
|
5994
|
+
isLoading,
|
|
5995
|
+
currentPage,
|
|
5996
|
+
totalPages,
|
|
5997
|
+
onPageChange,
|
|
5998
|
+
searchQuery = "",
|
|
5999
|
+
onSearchChange,
|
|
6000
|
+
statusFilter = "ALL",
|
|
6001
|
+
onStatusFilterChange
|
|
6002
|
+
}) => {
|
|
6003
|
+
const router = useRouter4();
|
|
6004
|
+
const [localSearch, setLocalSearch] = useState40(searchQuery);
|
|
6005
|
+
const [isStatusModalOpen, setIsStatusModalOpen] = useState40(false);
|
|
6006
|
+
const typingTimer = useRef16(null);
|
|
6007
|
+
const isSearching = localSearch.trim().length > 0;
|
|
6008
|
+
useEffect23(() => {
|
|
6009
|
+
setLocalSearch(searchQuery);
|
|
6010
|
+
}, [searchQuery]);
|
|
6011
|
+
const handleSearchInput = (e) => {
|
|
6012
|
+
const val = e.target.value;
|
|
6013
|
+
setLocalSearch(val);
|
|
6014
|
+
if (typingTimer.current) clearTimeout(typingTimer.current);
|
|
6015
|
+
typingTimer.current = setTimeout(() => {
|
|
6016
|
+
onSearchChange?.(val);
|
|
6017
|
+
}, 500);
|
|
6018
|
+
};
|
|
6019
|
+
const today = /* @__PURE__ */ new Date();
|
|
6020
|
+
const [viewMonth, setViewMonth] = useState40(today.getMonth());
|
|
6021
|
+
const [viewYear, setViewYear] = useState40(today.getFullYear());
|
|
6022
|
+
const [selectedDate, setSelectedDate] = useState40(new Date(today.getFullYear(), today.getMonth(), today.getDate()));
|
|
6023
|
+
const handlePrevMonth = () => {
|
|
6024
|
+
if (viewMonth === 0) {
|
|
6025
|
+
setViewMonth(11);
|
|
6026
|
+
setViewYear((y) => y - 1);
|
|
6027
|
+
} else {
|
|
6028
|
+
setViewMonth((m) => m - 1);
|
|
6029
|
+
}
|
|
6030
|
+
};
|
|
6031
|
+
const handleNextMonth = () => {
|
|
6032
|
+
if (viewMonth === 11) {
|
|
6033
|
+
setViewMonth(0);
|
|
6034
|
+
setViewYear((y) => y + 1);
|
|
6035
|
+
} else {
|
|
6036
|
+
setViewMonth((m) => m + 1);
|
|
6037
|
+
}
|
|
6038
|
+
};
|
|
6039
|
+
const daysInMonth = new Date(viewYear, viewMonth + 1, 0).getDate();
|
|
6040
|
+
const firstDayOffset = new Date(viewYear, viewMonth, 1).getDay();
|
|
6041
|
+
const parseHuddleDate = (ts) => {
|
|
6042
|
+
try {
|
|
6043
|
+
const rawDate = ts.split("|")[0].trim();
|
|
6044
|
+
const d = new Date(rawDate);
|
|
6045
|
+
return isNaN(d.getTime()) ? null : d;
|
|
6046
|
+
} catch {
|
|
6047
|
+
return null;
|
|
6048
|
+
}
|
|
6049
|
+
};
|
|
6050
|
+
const parsedEvents = huddles.map((h) => ({
|
|
6051
|
+
...h,
|
|
6052
|
+
dateObj: parseHuddleDate(h.timeString)
|
|
6053
|
+
}));
|
|
6054
|
+
const selectedDayEvents = parsedEvents.filter(
|
|
6055
|
+
(e) => e.dateObj && e.dateObj.toDateString() === selectedDate.toDateString()
|
|
6056
|
+
);
|
|
6057
|
+
const displayedEvents = isSearching ? parsedEvents : selectedDayEvents;
|
|
6058
|
+
return /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col animate-in fade-in duration-300 w-full" }, /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-6 mb-6 w-full" }, /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ React54.createElement("div", null, /* @__PURE__ */ React54.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Schedule"), /* @__PURE__ */ React54.createElement("p", { className: "text-xs text-stone-500 mt-0.5" }, "Manage and view your workspace sessions."))), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-row flex-nowrap items-center justify-between gap-4 w-full" }, /* @__PURE__ */ React54.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React54.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: Search01Icon8, size: 16, className: "text-stone-400" })), /* @__PURE__ */ React54.createElement(
|
|
6059
|
+
"input",
|
|
6060
|
+
{
|
|
6061
|
+
type: "text",
|
|
6062
|
+
placeholder: "Search schedule...",
|
|
6063
|
+
value: localSearch,
|
|
6064
|
+
onChange: handleSearchInput,
|
|
6065
|
+
className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-[#d97757] border border-transparent hover:border-stone-200"
|
|
6066
|
+
}
|
|
6067
|
+
)), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React54.createElement("button", { onClick: () => setIsStatusModalOpen(true), className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none " }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: TimeScheduleIcon, size: 16 }))))), !isSearching && /* @__PURE__ */ React54.createElement("div", { className: "bg-white rounded-2xl p-5 mb-6 relative overflow-hidden animate-in fade-in duration-300" }, isLoading && /* @__PURE__ */ React54.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-white/60 backdrop-blur-sm" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: Loading03Icon27, size: 28, className: "animate-spin text-black" })), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center justify-between px-2 mb-4" }, /* @__PURE__ */ React54.createElement("span", { className: "text-sm text-black tracking-wide" }, MONTHS2[viewMonth], " ", viewYear), /* @__PURE__ */ React54.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React54.createElement(
|
|
6068
|
+
"button",
|
|
6069
|
+
{
|
|
6070
|
+
onClick: handlePrevMonth,
|
|
6071
|
+
className: "w-8 h-8 flex items-center justify-center border border-stone-200 rounded-full hover:bg-stone-100 outline-none transition-colors"
|
|
6072
|
+
},
|
|
6073
|
+
/* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: ArrowLeft01Icon20, size: 16, className: "text-black" })
|
|
6074
|
+
), /* @__PURE__ */ React54.createElement(
|
|
6075
|
+
"button",
|
|
6076
|
+
{
|
|
6077
|
+
onClick: handleNextMonth,
|
|
6078
|
+
className: "w-8 h-8 flex items-center justify-center rounded-full border border-stone-200 hover:bg-stone-100 outline-none transition-colors"
|
|
6079
|
+
},
|
|
6080
|
+
/* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: ArrowRight01Icon15, size: 16, className: "text-black" })
|
|
6081
|
+
))), /* @__PURE__ */ React54.createElement("div", { className: "grid grid-cols-7 gap-y-2 gap-x-1" }, DAYS_OF_WEEK2.map((d) => /* @__PURE__ */ React54.createElement("div", { key: d, className: "text-center text-[11px] text-stone-400 py-2 uppercase tracking-widest" }, d)), Array.from({ length: firstDayOffset }).map((_, i) => /* @__PURE__ */ React54.createElement("div", { key: `empty-${i}` })), Array.from({ length: daysInMonth }).map((_, i) => {
|
|
6082
|
+
const day = i + 1;
|
|
6083
|
+
const thisDate = new Date(viewYear, viewMonth, day);
|
|
6084
|
+
const isSelected = selectedDate.getFullYear() === viewYear && selectedDate.getMonth() === viewMonth && selectedDate.getDate() === day;
|
|
6085
|
+
const dayEventsCount = parsedEvents.filter((e) => e.dateObj && e.dateObj.toDateString() === thisDate.toDateString()).length;
|
|
6086
|
+
return /* @__PURE__ */ React54.createElement("div", { key: day, className: "flex justify-center relative" }, /* @__PURE__ */ React54.createElement(
|
|
6087
|
+
"button",
|
|
6088
|
+
{
|
|
6089
|
+
onClick: () => setSelectedDate(thisDate),
|
|
6090
|
+
className: `relative h-10 w-10 rounded-full flex items-center justify-center text-xs transition-all outline-none
|
|
6091
|
+
${isSelected ? "bg-[#d97757] text-white" : "text-black hover:bg-stone-100"}`
|
|
6092
|
+
},
|
|
6093
|
+
day,
|
|
6094
|
+
dayEventsCount > 0 && /* @__PURE__ */ React54.createElement(
|
|
6095
|
+
"span",
|
|
6096
|
+
{
|
|
6097
|
+
className: `absolute -top-1 -right-1 flex h-4.5 w-4.5 items-center justify-center rounded-full text-[9px] ring-2 ring-white
|
|
6098
|
+
${isSelected ? "bg-white text-[#d97757]" : "bg-stone-100 text-stone-900"}`
|
|
6099
|
+
},
|
|
6100
|
+
dayEventsCount
|
|
6101
|
+
)
|
|
6102
|
+
));
|
|
6103
|
+
}))), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-4 bg-white rounded-2xl p-6 relative min-h-37.5" }, /* @__PURE__ */ React54.createElement("div", { className: "flex items-center justify-between pb-4" }, /* @__PURE__ */ React54.createElement("h3", { className: "text-sm text-black " }, isSearching ? "Search Results" : `Events for ${selectedDate.toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" })}`), /* @__PURE__ */ React54.createElement("span", { className: "text-[10px] uppercase tracking-widest text-stone-400 " }, displayedEvents.length, " ", displayedEvents.length === 1 ? "Session" : "Sessions")), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col min-w-0 pt-2" }, isLoading ? /* @__PURE__ */ React54.createElement("div", { className: "py-8 flex flex-col items-center justify-center text-center" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: Loading03Icon27, size: 28, className: "animate-spin text-stone-400" })) : displayedEvents.length === 0 ? /* @__PURE__ */ React54.createElement("div", { className: "py-8 flex flex-col items-center justify-center text-center" }, /* @__PURE__ */ React54.createElement("p", { className: "text-xs text-stone-400" }, isSearching ? "No sessions found for this search." : "No sessions scheduled for this date.")) : displayedEvents.map((huddle) => /* @__PURE__ */ React54.createElement(
|
|
6104
|
+
"div",
|
|
6105
|
+
{
|
|
6106
|
+
key: huddle.id,
|
|
6107
|
+
onClick: () => router.push(`/app/huddles/${huddle.id}`),
|
|
6108
|
+
className: "flex flex-row items-center gap-4 py-3 hover:bg-stone-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
|
|
6109
|
+
},
|
|
6110
|
+
/* @__PURE__ */ React54.createElement(HuddleAvatar2, { src: huddle.imageUrl, status: huddle.status }),
|
|
6111
|
+
/* @__PURE__ */ React54.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React54.createElement("p", { className: "text-sm text-black tracking-tight truncate" }, huddle.name), /* @__PURE__ */ React54.createElement("span", { className: "text-[11px] text-stone-500 truncate block mt-1 tracking-wide" }, isSearching ? huddle.timeString : huddle.timeString.split("|")[1]?.trim() || huddle.timeString)),
|
|
6112
|
+
/* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: ArrowRight01Icon15, size: 14, className: "shrink-0 text-stone-400 group-hover:text-black transition-colors" })
|
|
6113
|
+
)))), huddles.length > 0 && !isLoading && /* @__PURE__ */ React54.createElement("div", { className: "flex items-center justify-between pt-6 mt-4 mb-2" }, /* @__PURE__ */ React54.createElement("span", { className: "text-[10px] text-stone-400 tracking-widest uppercase" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React54.createElement(
|
|
6114
|
+
"button",
|
|
6115
|
+
{
|
|
6116
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
6117
|
+
disabled: currentPage <= 1,
|
|
6118
|
+
className: "p-2 bg-white rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none "
|
|
6119
|
+
},
|
|
6120
|
+
/* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: ArrowLeft01Icon20, size: 14 })
|
|
6121
|
+
), /* @__PURE__ */ React54.createElement(
|
|
6122
|
+
"button",
|
|
6123
|
+
{
|
|
6124
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
6125
|
+
disabled: currentPage >= totalPages || totalPages === 0,
|
|
6126
|
+
className: "p-2 bg-white rounded-full text-black hover:bg-stone-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none "
|
|
6127
|
+
},
|
|
6128
|
+
/* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: ArrowRight01Icon15, size: 14 })
|
|
6129
|
+
))), /* @__PURE__ */ React54.createElement(
|
|
6130
|
+
ReusableOptions,
|
|
6131
|
+
{
|
|
6132
|
+
isOpen: isStatusModalOpen,
|
|
6133
|
+
onClose: () => setIsStatusModalOpen(false),
|
|
6134
|
+
title: "Status Filter",
|
|
6135
|
+
options: ["ALL", "SCHEDULED", "ONGOING", "COMPLETED", "CANCELLED"],
|
|
6136
|
+
selectedOption: statusFilter,
|
|
6137
|
+
onSelect: (status) => onStatusFilterChange?.(status)
|
|
6138
|
+
}
|
|
6139
|
+
));
|
|
6140
|
+
};
|
|
5941
6141
|
export {
|
|
5942
6142
|
AppBento2,
|
|
5943
6143
|
CardInfoDialog,
|
|
@@ -5950,6 +6150,7 @@ export {
|
|
|
5950
6150
|
GifFeatureCard,
|
|
5951
6151
|
Header,
|
|
5952
6152
|
HeroSection,
|
|
6153
|
+
HomeHuddleCalendar,
|
|
5953
6154
|
ManagedBoardBlock,
|
|
5954
6155
|
ManagedContactBlock,
|
|
5955
6156
|
ManagedDocument,
|