@retinalabsllc/zairusjs 21.2.9 → 21.3.1
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 +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +68 -15
- package/dist/index.mjs +128 -75
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1406,9 +1406,17 @@ interface UniversalApplicationDetailsProps {
|
|
|
1406
1406
|
name: string;
|
|
1407
1407
|
type: string;
|
|
1408
1408
|
status: string;
|
|
1409
|
+
data?: any;
|
|
1409
1410
|
};
|
|
1410
1411
|
canDelete: boolean;
|
|
1411
1412
|
onDeleteSubmit: () => Promise<void>;
|
|
1413
|
+
supportedCountries: {
|
|
1414
|
+
code: string;
|
|
1415
|
+
name: string;
|
|
1416
|
+
flag: string;
|
|
1417
|
+
available: boolean;
|
|
1418
|
+
}[];
|
|
1419
|
+
onUpdateCountry: (countryCode: string) => Promise<void>;
|
|
1412
1420
|
}
|
|
1413
1421
|
declare const UniversalApplicationDetails: React.FC<UniversalApplicationDetailsProps>;
|
|
1414
1422
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1406,9 +1406,17 @@ interface UniversalApplicationDetailsProps {
|
|
|
1406
1406
|
name: string;
|
|
1407
1407
|
type: string;
|
|
1408
1408
|
status: string;
|
|
1409
|
+
data?: any;
|
|
1409
1410
|
};
|
|
1410
1411
|
canDelete: boolean;
|
|
1411
1412
|
onDeleteSubmit: () => Promise<void>;
|
|
1413
|
+
supportedCountries: {
|
|
1414
|
+
code: string;
|
|
1415
|
+
name: string;
|
|
1416
|
+
flag: string;
|
|
1417
|
+
available: boolean;
|
|
1418
|
+
}[];
|
|
1419
|
+
onUpdateCountry: (countryCode: string) => Promise<void>;
|
|
1412
1420
|
}
|
|
1413
1421
|
declare const UniversalApplicationDetails: React.FC<UniversalApplicationDetailsProps>;
|
|
1414
1422
|
|
package/dist/index.js
CHANGED
|
@@ -530,7 +530,7 @@ function AuthFormInner({
|
|
|
530
530
|
if (mode === "SIGNUP" && signupStep === "NAME") handleNextSignupStep();
|
|
531
531
|
else if (mode === "SIGNUP" && signupStep === "ORGANIZATION") handleNextSignupStep();
|
|
532
532
|
else handleAuthRequestSubmit();
|
|
533
|
-
} }, mode === "SIGNUP" && signupStep === "NAME" && requireNames && /* @__PURE__ */ import_react6.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react6.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react6.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "First Name"), /* @__PURE__ */ import_react6.default.createElement("input", { type: "text", value: firstName, onChange: (e) => setFirstName(cleanAlpha(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black outline-none focus:border-
|
|
533
|
+
} }, mode === "SIGNUP" && signupStep === "NAME" && requireNames && /* @__PURE__ */ import_react6.default.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react6.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react6.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "First Name"), /* @__PURE__ */ import_react6.default.createElement("input", { type: "text", value: firstName, onChange: (e) => setFirstName(cleanAlpha(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300", placeholder: "First name" })), /* @__PURE__ */ import_react6.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react6.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "Last Name"), /* @__PURE__ */ import_react6.default.createElement("input", { type: "text", value: lastName, onChange: (e) => setLastName(cleanAlpha(e.target.value)), required: true, className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300", placeholder: "Last name" }))), mode === "SIGNUP" && signupStep === "ORGANIZATION" && requireOrganization && /* @__PURE__ */ import_react6.default.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react6.default.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ import_react6.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "Workspace Name"), /* @__PURE__ */ import_react6.default.createElement("input", { type: "text", value: orgName, onChange: (e) => setOrgName(cleanOrgName(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300", placeholder: "Acme Corporation" }))), (mode === "LOGIN" || mode === "SIGNUP" && signupStep === "EMAIL_ID") && /* @__PURE__ */ import_react6.default.createElement("div", { className: "space-y-6 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react6.default.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ import_react6.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "Email ID"), /* @__PURE__ */ import_react6.default.createElement("input", { type: "email", value: emailId, onChange: (e) => setEmailId(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-[#d97757] transition-all duration-300", placeholder: "name@company.com" })), mode === "SIGNUP" && /* @__PURE__ */ import_react6.default.createElement("div", { className: "flex items-start gap-3 mt-4" }, /* @__PURE__ */ import_react6.default.createElement(
|
|
534
534
|
"input",
|
|
535
535
|
{
|
|
536
536
|
type: "checkbox",
|
|
@@ -558,7 +558,7 @@ function AuthFormInner({
|
|
|
558
558
|
onKeyDown: (e) => {
|
|
559
559
|
if (e.key === "Backspace" && !otp[index] && index > 0) inputRefs.current[index - 1]?.focus();
|
|
560
560
|
},
|
|
561
|
-
className: "w-10 h-10 text-center text-sm bg-transparent border-b-2 border-stone-200 text-black outline-none focus:border-
|
|
561
|
+
className: "w-10 h-10 text-center text-sm bg-transparent border-b-2 border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300"
|
|
562
562
|
}
|
|
563
563
|
))), /* @__PURE__ */ import_react6.default.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ import_react6.default.createElement(ThreeDActionButton, { type: "submit", disabled: otp.join("").length < 6, isLoading: isSubmitting, className: "w-full shadow-md shadow-stone-200/50" }, "Verify Code"), !userHas2FA && /* @__PURE__ */ import_react6.default.createElement("div", { className: "text-center pt-2" }, /* @__PURE__ */ import_react6.default.createElement(
|
|
564
564
|
"button",
|
|
@@ -688,6 +688,10 @@ var ReusableOptions = ({
|
|
|
688
688
|
showSearch = false
|
|
689
689
|
}) => {
|
|
690
690
|
const [searchQuery, setSearchQuery] = (0, import_react11.useState)("");
|
|
691
|
+
const [pendingOption, setPendingOption] = (0, import_react11.useState)(selectedOption);
|
|
692
|
+
(0, import_react11.useEffect)(() => {
|
|
693
|
+
if (isOpen) setPendingOption(selectedOption);
|
|
694
|
+
}, [isOpen, selectedOption]);
|
|
691
695
|
if (!isOpen) return null;
|
|
692
696
|
const filteredOptions = options.filter(
|
|
693
697
|
(opt) => opt.toLowerCase().includes(searchQuery.toLowerCase())
|
|
@@ -702,20 +706,23 @@ var ReusableOptions = ({
|
|
|
702
706
|
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-50 transition-colors"
|
|
703
707
|
}
|
|
704
708
|
))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, filteredOptions.length === 0 ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "p-6 text-center text-xs text-stone-400" }, "No options found.") : filteredOptions.map((opt) => {
|
|
705
|
-
const isSelected =
|
|
709
|
+
const isSelected = pendingOption === opt;
|
|
706
710
|
return /* @__PURE__ */ import_react11.default.createElement(
|
|
707
711
|
"button",
|
|
708
712
|
{
|
|
709
713
|
key: opt,
|
|
710
|
-
onClick: () =>
|
|
714
|
+
onClick: () => setPendingOption(opt),
|
|
711
715
|
className: `w-full text-left p-4 text-xs tracking-tight rounded-full transition-colors outline-none ${isSelected ? "text-[#d97757] bg-[#d97757]/10" : "text-stone-600 hover:bg-stone-50/50"}`
|
|
712
716
|
},
|
|
713
717
|
opt.charAt(0).toUpperCase() + opt.slice(1).toLowerCase()
|
|
714
718
|
);
|
|
715
|
-
})), /* @__PURE__ */ import_react11.default.createElement("div", { className: "p-4 flex items-center justify-
|
|
719
|
+
})), /* @__PURE__ */ import_react11.default.createElement("div", { className: "p-4 flex items-center justify-center shrink-0 bg-white" }, /* @__PURE__ */ import_react11.default.createElement(
|
|
716
720
|
"button",
|
|
717
721
|
{
|
|
718
|
-
onClick:
|
|
722
|
+
onClick: () => {
|
|
723
|
+
onSelect(pendingOption);
|
|
724
|
+
onClose();
|
|
725
|
+
},
|
|
719
726
|
className: "text-[#d97757] outline-none text-sm tracking-wide hover:opacity-80 transition-opacity"
|
|
720
727
|
},
|
|
721
728
|
"Done"
|
|
@@ -1190,7 +1197,7 @@ var NumberInput = ({
|
|
|
1190
1197
|
disabled,
|
|
1191
1198
|
autoComplete: "off",
|
|
1192
1199
|
spellCheck: "false",
|
|
1193
|
-
className: "w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black transition-all outline-none focus:border-
|
|
1200
|
+
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"
|
|
1194
1201
|
}
|
|
1195
1202
|
));
|
|
1196
1203
|
|
|
@@ -2880,7 +2887,7 @@ var HeroSection = ({
|
|
|
2880
2887
|
className: "leading-[0.85] tracking-[-0.07em] text-[18.2vw] sm:text-[16.8vw] md:text-[15.4vw] lg:text-[14vw] xl:text-[13.3vw] 2xl:text-[14vw] text-[#ffffff]"
|
|
2881
2888
|
},
|
|
2882
2889
|
/* @__PURE__ */ import_react45.default.createElement("div", { className: "inline-flex flex-wrap" }, /* @__PURE__ */ import_react45.default.createElement("span", { className: `inline-block relative transition-all duration-1000 ${isAnimating ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"}` }, titlePrefix, titlePrefix && /* @__PURE__ */ import_react45.default.createElement("br", null), highlightText, /* @__PURE__ */ import_react45.default.createElement("span", { className: "absolute top-[0.65em] right-[-0.3em] text-[0.31em] text-[#ffffff]/70" }, "*")))
|
|
2883
|
-
)), /* @__PURE__ */ import_react45.default.createElement("div", { className: "col-span-12 flex flex-col gap-5 pb-6 lg:col-span-4 lg:pb-10" }, subtitle && /* @__PURE__ */ import_react45.default.createElement("p", { className: "text-
|
|
2890
|
+
)), /* @__PURE__ */ import_react45.default.createElement("div", { className: "col-span-12 flex flex-col gap-5 pb-6 lg:col-span-4 lg:pb-10" }, subtitle && /* @__PURE__ */ import_react45.default.createElement("p", { className: "text-sm text-[#ffffff]/70 sm:text-sm md:text-xs leading-[1.2] max-w-md transition-opacity duration-1000 delay-300" }, subtitle), /* @__PURE__ */ import_react45.default.createElement("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-4" }, ctaText && /* @__PURE__ */ import_react45.default.createElement(
|
|
2884
2891
|
import_link6.default,
|
|
2885
2892
|
{
|
|
2886
2893
|
href: isWaitlist ? "#" : ctaHref || "#",
|
|
@@ -5256,7 +5263,7 @@ var UniversalMembersPage = ({
|
|
|
5256
5263
|
onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)),
|
|
5257
5264
|
required: true,
|
|
5258
5265
|
autoFocus: true,
|
|
5259
|
-
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-
|
|
5266
|
+
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300",
|
|
5260
5267
|
placeholder: "name@company.com"
|
|
5261
5268
|
}
|
|
5262
5269
|
)), /* @__PURE__ */ import_react85.default.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ import_react85.default.createElement(
|
|
@@ -5905,7 +5912,7 @@ var UniversalSettings = ({
|
|
|
5905
5912
|
className: "text-xs text-[#d97757] hover:underline outline-none disabled:opacity-50"
|
|
5906
5913
|
},
|
|
5907
5914
|
"Remove"
|
|
5908
|
-
))))))) : /* @__PURE__ */ import_react89.default.createElement(import_react89.default.Fragment, null, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ import_react89.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && canManage && /* @__PURE__ */ import_react89.default.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__ */ import_react89.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ import_react89.default.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ import_react89.default.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ import_react89.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ import_react89.default.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-
|
|
5915
|
+
))))))) : /* @__PURE__ */ import_react89.default.createElement(import_react89.default.Fragment, null, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ import_react89.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && canManage && /* @__PURE__ */ import_react89.default.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__ */ import_react89.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ import_react89.default.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ import_react89.default.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ import_react89.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ import_react89.default.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-[#d97757] transition-all duration-300", placeholder: "name@company.com" })), /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ import_react89.default.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"), /* @__PURE__ */ import_react89.default.createElement("button", { type: "button", onClick: () => {
|
|
5909
5916
|
setIsInviteMode(false);
|
|
5910
5917
|
setInviteEmail("");
|
|
5911
5918
|
}, 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__ */ import_react89.default.createElement(PageSpinner8, null) : /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react89.default.createElement("div", null, members.length === 0 ? /* @__PURE__ */ import_react89.default.createElement("p", { className: "text-xs text-stone-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ import_react89.default.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__ */ import_react89.default.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react89.default.createElement(MemberAvatar3, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ import_react89.default.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ import_react89.default.createElement("p", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ import_react89.default.createElement("p", { className: "text-xs text-stone-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ import_react89.default.createElement("span", { className: "text-xs text-stone-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react89.default.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__ */ import_react89.default.createElement(import_react90.HugeiconsIcon, { icon: import_core_free_icons34.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react89.default.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__ */ import_react89.default.createElement(import_react90.HugeiconsIcon, { icon: import_core_free_icons34.ArrowRight01Icon, size: 14 })))))))), /* @__PURE__ */ import_react89.default.createElement(ReusableOptions, { isOpen: isStatusModalOpen, onClose: () => setIsStatusModalOpen(false), title: "Status Filter", options: ["ALL", "ACTIVE", "BUSY", "OFFLINE", "AWAY"], selectedOption: activeStatusFilter, onSelect: (status) => onStatusFilterChange(status) }), /* @__PURE__ */ import_react89.default.createElement(ReusableOptions, { isOpen: isRoleModalOpen, onClose: () => setIsRoleModalOpen(false), title: "Role Filter", options: ["ALL", "OWNER", "ADMIN", "MANAGER", "MEMBER", "GUEST"], selectedOption: activeRoleFilter, onSelect: (role) => onRoleFilterChange(role) }), /* @__PURE__ */ import_react89.default.createElement(ReusableOptions, { isOpen: !!roleEditTarget, onClose: () => setRoleEditTarget(null), title: "Modify Access Role", options: ["ADMIN", "MANAGER", "MEMBER"], selectedOption: roleEditTarget?.role || "", onSelect: handleRoleUpdate })), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react89.default.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => canManage && !isSavingOrg ? orgFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ import_react89.default.createElement(OrgAvatar2, { src: orgAvatarUrl, sizeClass: "w-14 h-14" }), canManage && /* @__PURE__ */ import_react89.default.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-10" }, isUploadingOrgAvatar ? /* @__PURE__ */ import_react89.default.createElement(import_react90.HugeiconsIcon, { icon: import_core_free_icons34.Loading03Icon, size: 12, className: "animate-spin" }) : /* @__PURE__ */ import_react89.default.createElement(import_react90.HugeiconsIcon, { icon: import_core_free_icons34.CloudUploadIcon, size: 14 })), /* @__PURE__ */ import_react89.default.createElement("input", { type: "file", ref: orgFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "ORGANIZATION") })), /* @__PURE__ */ import_react89.default.createElement("div", null, /* @__PURE__ */ import_react89.default.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ import_react89.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles."))), !canManage && /* @__PURE__ */ import_react89.default.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ import_react89.default.createElement(import_react90.HugeiconsIcon, { icon: import_core_free_icons34.CircleLock02Icon, size: 18, className: "text-current" }))), /* @__PURE__ */ import_react89.default.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ import_react89.default.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ import_react89.default.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ import_react89.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ import_react89.default.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__ */ import_react89.default.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__ */ import_react89.default.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ import_react89.default.createElement(InputSpinner3, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ import_react89.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ import_react89.default.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react89.default.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__ */ import_react89.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ import_react89.default.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react89.default.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__ */ import_react89.default.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ import_react89.default.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ import_react89.default.createElement("button", { type: "button", onClick: () => {
|
|
@@ -6348,7 +6355,7 @@ var formatType = (type) => {
|
|
|
6348
6355
|
return type.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
6349
6356
|
};
|
|
6350
6357
|
var ApplicationIcon = ({ icon, sizeClass = "w-10 h-10" }) => {
|
|
6351
|
-
return /* @__PURE__ */ import_react95.default.createElement("div", { className: `relative shrink-0 aspect-square ${sizeClass}` }, /* @__PURE__ */ import_react95.default.createElement("div", { className: "w-full h-full aspect-square rounded-
|
|
6358
|
+
return /* @__PURE__ */ import_react95.default.createElement("div", { className: `relative shrink-0 aspect-square ${sizeClass}` }, /* @__PURE__ */ import_react95.default.createElement("div", { className: "w-full h-full aspect-square rounded-full bg-neutral-50 flex items-center justify-center overflow-hidden" }, icon ? /* @__PURE__ */ import_react95.default.createElement(import_react96.HugeiconsIcon, { icon, size: 18, className: "text-stone-500" }) : /* @__PURE__ */ import_react95.default.createElement("div", { className: "w-4 h-4 rounded-sm bg-stone-300" })));
|
|
6352
6359
|
};
|
|
6353
6360
|
var PageSpinner9 = () => /* @__PURE__ */ import_react95.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react95.default.createElement(import_react96.HugeiconsIcon, { icon: import_core_free_icons37.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
6354
6361
|
var UniversalApplicationsPage = ({
|
|
@@ -6570,7 +6577,7 @@ var UniversalHome3 = ({
|
|
|
6570
6577
|
},
|
|
6571
6578
|
/* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.Logout01Icon, size: 15 }),
|
|
6572
6579
|
"Log Out"
|
|
6573
|
-
)))), showNotifDialog && /* @__PURE__ */ import_react97.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react97.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ import_react97.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 max-h-[80vh] h-auto" }, /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ import_react97.default.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-[#d97757] hover:text-[#d97757] transition-colors outline-none flex items-center gap-2 text-xs tracking-widest disabled:opacity-50" }, /* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.ArrowLeft01Icon, size: 14 }), " Back") : /* @__PURE__ */ import_react97.default.createElement("h3", { className: "text-sm text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ import_react97.default.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-stone-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ import_react97.default.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.Loading03Icon, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ import_react97.default.createElement("div", { className: "p-4 text-left" }, selectedNotif.type === "
|
|
6580
|
+
)))), showNotifDialog && /* @__PURE__ */ import_react97.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react97.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ import_react97.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 max-h-[80vh] h-auto" }, /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ import_react97.default.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-[#d97757] hover:text-[#d97757] transition-colors outline-none flex items-center gap-2 text-xs tracking-widest disabled:opacity-50" }, /* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.ArrowLeft01Icon, size: 14 }), " Back") : /* @__PURE__ */ import_react97.default.createElement("h3", { className: "text-sm text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ import_react97.default.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-stone-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react97.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ import_react97.default.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ import_react97.default.createElement(import_react98.HugeiconsIcon, { icon: import_core_free_icons38.Loading03Icon, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ import_react97.default.createElement("div", { className: "p-4 text-left" }, selectedNotif.type === "ORG_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && selectedNotif.meta_json?.completed ? /* @__PURE__ */ import_react97.default.createElement("div", { className: "" }) : /* @__PURE__ */ import_react97.default.createElement("h4", { className: "text-sm text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ import_react97.default.createElement("span", { className: "text-xs text-stone-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ import_react97.default.createElement("p", { className: "text-xs text-stone-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "ORG_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ import_react97.default.createElement("div", { className: `mt-8 flex gap-3 pt-6 ${selectedNotif.meta_json?.completed ? "opacity-40 pointer-events-none cursor-not-allowed" : ""}` }, /* @__PURE__ */ import_react97.default.createElement(
|
|
6574
6581
|
"button",
|
|
6575
6582
|
{
|
|
6576
6583
|
onClick: () => handleResolve("ACCEPTED"),
|
|
@@ -7103,7 +7110,7 @@ var UniversalSettings2 = ({
|
|
|
7103
7110
|
required: true,
|
|
7104
7111
|
autoFocus: true,
|
|
7105
7112
|
disabled: isInviting,
|
|
7106
|
-
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-
|
|
7113
|
+
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300 disabled:opacity-50",
|
|
7107
7114
|
placeholder: "name@company.com"
|
|
7108
7115
|
}
|
|
7109
7116
|
)), /* @__PURE__ */ import_react101.default.createElement("div", { className: "pt-2" }, /* @__PURE__ */ import_react101.default.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"))))))), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ import_react101.default.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => canManage && !isSavingOrg ? orgFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ import_react101.default.createElement(OrgAvatar4, { src: orgAvatarUrl, sizeClass: "w-14 h-14" }), canManage && /* @__PURE__ */ import_react101.default.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-10" }, isUploadingOrgAvatar ? /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.Loading03Icon, size: 12, className: "animate-spin" }) : /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.CloudUploadIcon, size: 14 })), /* @__PURE__ */ import_react101.default.createElement("input", { type: "file", ref: orgFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "ORGANIZATION") })), /* @__PURE__ */ import_react101.default.createElement("div", null, /* @__PURE__ */ import_react101.default.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ import_react101.default.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles."))), !canManage && /* @__PURE__ */ import_react101.default.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ import_react101.default.createElement(import_react102.HugeiconsIcon, { icon: import_core_free_icons40.CircleLock02Icon, size: 18, className: "text-current" }))), /* @__PURE__ */ import_react101.default.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ import_react101.default.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ import_react101.default.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ import_react101.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ import_react101.default.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__ */ import_react101.default.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__ */ import_react101.default.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ import_react101.default.createElement(InputSpinner4, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ import_react101.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ import_react101.default.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react101.default.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__ */ import_react101.default.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ import_react101.default.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ import_react101.default.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__ */ import_react101.default.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ import_react101.default.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ import_react101.default.createElement("button", { type: "button", onClick: () => {
|
|
@@ -7361,10 +7368,15 @@ var UniversalApplicationDetails = ({
|
|
|
7361
7368
|
onBackHref = "/app",
|
|
7362
7369
|
application,
|
|
7363
7370
|
canDelete,
|
|
7364
|
-
onDeleteSubmit
|
|
7371
|
+
onDeleteSubmit,
|
|
7372
|
+
supportedCountries,
|
|
7373
|
+
onUpdateCountry
|
|
7365
7374
|
}) => {
|
|
7366
7375
|
const [isDeleting, setIsDeleting] = (0, import_react107.useState)(false);
|
|
7367
7376
|
const [confirmDialog, setConfirmDialog] = (0, import_react107.useState)(false);
|
|
7377
|
+
const [isCountryModalOpen, setIsCountryModalOpen] = (0, import_react107.useState)(false);
|
|
7378
|
+
const [selectedCountryCode, setSelectedCountryCode] = (0, import_react107.useState)(null);
|
|
7379
|
+
const [isUpdatingCountry, setIsUpdatingCountry] = (0, import_react107.useState)(false);
|
|
7368
7380
|
const isLockedStatus = ["COMPLETED", "PENDING", "REJECTED", "QUERIED"].includes(application.status);
|
|
7369
7381
|
const deletePermitted = canDelete && !isLockedStatus;
|
|
7370
7382
|
const handleDelete = async () => {
|
|
@@ -7376,6 +7388,24 @@ var UniversalApplicationDetails = ({
|
|
|
7376
7388
|
}
|
|
7377
7389
|
setIsDeleting(false);
|
|
7378
7390
|
};
|
|
7391
|
+
const handleOpenApplication = () => {
|
|
7392
|
+
if (application.data?.country) {
|
|
7393
|
+
window.location.href = `/app/applications/app/${application.id}/${application.data.country}`;
|
|
7394
|
+
} else {
|
|
7395
|
+
setIsCountryModalOpen(true);
|
|
7396
|
+
}
|
|
7397
|
+
};
|
|
7398
|
+
const handleConfirmCountry = async () => {
|
|
7399
|
+
if (!selectedCountryCode) return;
|
|
7400
|
+
setIsUpdatingCountry(true);
|
|
7401
|
+
try {
|
|
7402
|
+
await onUpdateCountry(selectedCountryCode);
|
|
7403
|
+
setIsCountryModalOpen(false);
|
|
7404
|
+
} catch (error) {
|
|
7405
|
+
}
|
|
7406
|
+
setIsUpdatingCountry(false);
|
|
7407
|
+
};
|
|
7408
|
+
const activeCountryObj = application.data?.country ? supportedCountries.find((c) => c.code === application.data.country) : null;
|
|
7379
7409
|
return /* @__PURE__ */ import_react107.default.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react107.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react107.default.createElement(
|
|
7380
7410
|
ConfirmationDialog,
|
|
7381
7411
|
{
|
|
@@ -7389,7 +7419,30 @@ var UniversalApplicationDetails = ({
|
|
|
7389
7419
|
onClose: () => setConfirmDialog(false),
|
|
7390
7420
|
onConfirm: handleDelete
|
|
7391
7421
|
}
|
|
7392
|
-
), /* @__PURE__ */ import_react107.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react107.default.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ import_react107.default.createElement(import_react108.HugeiconsIcon, { icon: import_core_free_icons43.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react107.default.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ import_react107.default.createElement("div", null, /* @__PURE__ */ import_react107.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ import_react107.default.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ import_react107.default.createElement("div", { className: "px-4 py-1.5 bg-stone-200 text-stone-600 rounded-full text-xs self-start sm:self-auto
|
|
7422
|
+
), /* @__PURE__ */ import_react107.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react107.default.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ import_react107.default.createElement(import_react108.HugeiconsIcon, { icon: import_core_free_icons43.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react107.default.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ import_react107.default.createElement("div", null, /* @__PURE__ */ import_react107.default.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ import_react107.default.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ import_react107.default.createElement("div", { className: "px-4 py-1.5 bg-stone-200 text-stone-600 rounded-full text-xs self-start sm:self-auto tracking-widest uppercase" }, application.status)), /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col gap-1 w-full" }, /* @__PURE__ */ import_react107.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block uppercase" }, "Target Company"), /* @__PURE__ */ import_react107.default.createElement("span", { className: "text-sm text-black py-2 " }, application.name)), /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ import_react107.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block uppercase" }, "Filing Type"), /* @__PURE__ */ import_react107.default.createElement("span", { className: "text-sm text-black py-2" }, formatType2(application.type))), activeCountryObj && /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ import_react107.default.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block uppercase" }, "Jurisdiction"), /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex items-center gap-2 py-2" }, /* @__PURE__ */ import_react107.default.createElement("img", { src: activeCountryObj.flag, alt: "flag", className: "w-5 h-5 rounded-full object-cover" }), /* @__PURE__ */ import_react107.default.createElement("span", { className: "text-sm text-black" }, activeCountryObj.name))), /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 border-t border-stone-100" }, /* @__PURE__ */ import_react107.default.createElement("button", { onClick: handleOpenApplication, className: "flex-1 w-full py-2.5 bg-[#d97757] text-white rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/90 outline-none" }, "Open Application"), /* @__PURE__ */ import_react107.default.createElement("a", { href: `/app/applications/assets/${application.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" }, "Application Assets"), deletePermitted && /* @__PURE__ */ import_react107.default.createElement("button", { onClick: () => setConfirmDialog(true), 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" }, "Delete Application"))), isCountryModalOpen && /* @__PURE__ */ import_react107.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react107.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isUpdatingCountry && setIsCountryModalOpen(false) }), /* @__PURE__ */ import_react107.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 max-h-[85vh]" }, /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react107.default.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Jurisdiction"), /* @__PURE__ */ import_react107.default.createElement("button", { onClick: () => !isUpdatingCountry && setIsCountryModalOpen(false), className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react107.default.createElement(import_react108.HugeiconsIcon, { icon: import_core_free_icons43.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react107.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-1.5" }, supportedCountries.map((country) => {
|
|
7423
|
+
const isSelected = selectedCountryCode === country.code;
|
|
7424
|
+
const isAvailable = country.available;
|
|
7425
|
+
return /* @__PURE__ */ import_react107.default.createElement(
|
|
7426
|
+
"button",
|
|
7427
|
+
{
|
|
7428
|
+
key: country.code,
|
|
7429
|
+
disabled: !isAvailable || isUpdatingCountry,
|
|
7430
|
+
onClick: () => setSelectedCountryCode(country.code),
|
|
7431
|
+
className: `w-full flex items-center justify-between p-3 rounded-xl transition-all outline-none border ${!isAvailable ? "opacity-40 cursor-not-allowed border-transparent bg-stone-50" : isSelected ? "bg-white border-[#d97757]" : "bg-stone-50 border-transparent hover:bg-stone-100/60 cursor-pointer"}`
|
|
7432
|
+
},
|
|
7433
|
+
/* @__PURE__ */ import_react107.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react107.default.createElement("img", { src: country.flag, alt: country.name, className: "w-6 h-6 rounded-full object-cover shrink-0" }), /* @__PURE__ */ import_react107.default.createElement("span", { className: `text-sm tracking-tight ${isSelected ? "text-black" : "text-stone-700"}` }, country.name)),
|
|
7434
|
+
isSelected && /* @__PURE__ */ import_react107.default.createElement(import_react108.HugeiconsIcon, { icon: import_core_free_icons43.CheckmarkCircle02Icon, size: 16, className: "text-[#d97757] shrink-0" })
|
|
7435
|
+
);
|
|
7436
|
+
})), /* @__PURE__ */ import_react107.default.createElement("div", { className: "p-4 shrink-0 bg-white" }, /* @__PURE__ */ import_react107.default.createElement(
|
|
7437
|
+
ThreeDActionButton,
|
|
7438
|
+
{
|
|
7439
|
+
onClick: handleConfirmCountry,
|
|
7440
|
+
disabled: !selectedCountryCode || isUpdatingCountry,
|
|
7441
|
+
isLoading: isUpdatingCountry,
|
|
7442
|
+
className: "w-full"
|
|
7443
|
+
},
|
|
7444
|
+
"Confirm Jurisdiction"
|
|
7445
|
+
)))));
|
|
7393
7446
|
};
|
|
7394
7447
|
|
|
7395
7448
|
// src/components/UniversalCreateApplication.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -435,7 +435,7 @@ function AuthFormInner({
|
|
|
435
435
|
if (mode === "SIGNUP" && signupStep === "NAME") handleNextSignupStep();
|
|
436
436
|
else if (mode === "SIGNUP" && signupStep === "ORGANIZATION") handleNextSignupStep();
|
|
437
437
|
else handleAuthRequestSubmit();
|
|
438
|
-
} }, mode === "SIGNUP" && signupStep === "NAME" && requireNames && /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React5.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React5.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "First Name"), /* @__PURE__ */ React5.createElement("input", { type: "text", value: firstName, onChange: (e) => setFirstName(cleanAlpha(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black outline-none focus:border-
|
|
438
|
+
} }, mode === "SIGNUP" && signupStep === "NAME" && requireNames && /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React5.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React5.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "First Name"), /* @__PURE__ */ React5.createElement("input", { type: "text", value: firstName, onChange: (e) => setFirstName(cleanAlpha(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300", placeholder: "First name" })), /* @__PURE__ */ React5.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React5.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "Last Name"), /* @__PURE__ */ React5.createElement("input", { type: "text", value: lastName, onChange: (e) => setLastName(cleanAlpha(e.target.value)), required: true, className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300", placeholder: "Last name" }))), mode === "SIGNUP" && signupStep === "ORGANIZATION" && requireOrganization && /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ React5.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React5.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "Workspace Name"), /* @__PURE__ */ React5.createElement("input", { type: "text", value: orgName, onChange: (e) => setOrgName(cleanOrgName(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300", placeholder: "Acme Corporation" }))), (mode === "LOGIN" || mode === "SIGNUP" && signupStep === "EMAIL_ID") && /* @__PURE__ */ React5.createElement("div", { className: "space-y-6 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ React5.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React5.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block " }, "Email ID"), /* @__PURE__ */ React5.createElement("input", { type: "email", value: emailId, onChange: (e) => setEmailId(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-[#d97757] transition-all duration-300", placeholder: "name@company.com" })), mode === "SIGNUP" && /* @__PURE__ */ React5.createElement("div", { className: "flex items-start gap-3 mt-4" }, /* @__PURE__ */ React5.createElement(
|
|
439
439
|
"input",
|
|
440
440
|
{
|
|
441
441
|
type: "checkbox",
|
|
@@ -463,7 +463,7 @@ function AuthFormInner({
|
|
|
463
463
|
onKeyDown: (e) => {
|
|
464
464
|
if (e.key === "Backspace" && !otp[index] && index > 0) inputRefs.current[index - 1]?.focus();
|
|
465
465
|
},
|
|
466
|
-
className: "w-10 h-10 text-center text-sm bg-transparent border-b-2 border-stone-200 text-black outline-none focus:border-
|
|
466
|
+
className: "w-10 h-10 text-center text-sm bg-transparent border-b-2 border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300"
|
|
467
467
|
}
|
|
468
468
|
))), /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React5.createElement(ThreeDActionButton, { type: "submit", disabled: otp.join("").length < 6, isLoading: isSubmitting, className: "w-full shadow-md shadow-stone-200/50" }, "Verify Code"), !userHas2FA && /* @__PURE__ */ React5.createElement("div", { className: "text-center pt-2" }, /* @__PURE__ */ React5.createElement(
|
|
469
469
|
"button",
|
|
@@ -540,7 +540,7 @@ var Footer = ({
|
|
|
540
540
|
};
|
|
541
541
|
|
|
542
542
|
// src/components/UniversalHuddleDetails.tsx
|
|
543
|
-
import React11, { useState as useState7, useEffect as
|
|
543
|
+
import React11, { useState as useState7, useEffect as useEffect6, useRef as useRef3 } from "react";
|
|
544
544
|
import { HugeiconsIcon as HugeiconsIcon7 } from "@hugeicons/react";
|
|
545
545
|
import {
|
|
546
546
|
ArrowLeft01Icon as ArrowLeft01Icon2,
|
|
@@ -589,7 +589,7 @@ var ManagedToaster = () => {
|
|
|
589
589
|
};
|
|
590
590
|
|
|
591
591
|
// src/components/ReusableOptions.tsx
|
|
592
|
-
import React8, { useState as useState5 } from "react";
|
|
592
|
+
import React8, { useEffect as useEffect4, useState as useState5 } from "react";
|
|
593
593
|
import { HugeiconsIcon as HugeiconsIcon4 } from "@hugeicons/react";
|
|
594
594
|
import { CancelCircleIcon, Search01Icon } from "@hugeicons/core-free-icons";
|
|
595
595
|
var ReusableOptions = ({
|
|
@@ -602,6 +602,10 @@ var ReusableOptions = ({
|
|
|
602
602
|
showSearch = false
|
|
603
603
|
}) => {
|
|
604
604
|
const [searchQuery, setSearchQuery] = useState5("");
|
|
605
|
+
const [pendingOption, setPendingOption] = useState5(selectedOption);
|
|
606
|
+
useEffect4(() => {
|
|
607
|
+
if (isOpen) setPendingOption(selectedOption);
|
|
608
|
+
}, [isOpen, selectedOption]);
|
|
605
609
|
if (!isOpen) return null;
|
|
606
610
|
const filteredOptions = options.filter(
|
|
607
611
|
(opt) => opt.toLowerCase().includes(searchQuery.toLowerCase())
|
|
@@ -616,20 +620,23 @@ var ReusableOptions = ({
|
|
|
616
620
|
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-50 transition-colors"
|
|
617
621
|
}
|
|
618
622
|
))), /* @__PURE__ */ React8.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, filteredOptions.length === 0 ? /* @__PURE__ */ React8.createElement("div", { className: "p-6 text-center text-xs text-stone-400" }, "No options found.") : filteredOptions.map((opt) => {
|
|
619
|
-
const isSelected =
|
|
623
|
+
const isSelected = pendingOption === opt;
|
|
620
624
|
return /* @__PURE__ */ React8.createElement(
|
|
621
625
|
"button",
|
|
622
626
|
{
|
|
623
627
|
key: opt,
|
|
624
|
-
onClick: () =>
|
|
628
|
+
onClick: () => setPendingOption(opt),
|
|
625
629
|
className: `w-full text-left p-4 text-xs tracking-tight rounded-full transition-colors outline-none ${isSelected ? "text-[#d97757] bg-[#d97757]/10" : "text-stone-600 hover:bg-stone-50/50"}`
|
|
626
630
|
},
|
|
627
631
|
opt.charAt(0).toUpperCase() + opt.slice(1).toLowerCase()
|
|
628
632
|
);
|
|
629
|
-
})), /* @__PURE__ */ React8.createElement("div", { className: "p-4 flex items-center justify-
|
|
633
|
+
})), /* @__PURE__ */ React8.createElement("div", { className: "p-4 flex items-center justify-center shrink-0 bg-white" }, /* @__PURE__ */ React8.createElement(
|
|
630
634
|
"button",
|
|
631
635
|
{
|
|
632
|
-
onClick:
|
|
636
|
+
onClick: () => {
|
|
637
|
+
onSelect(pendingOption);
|
|
638
|
+
onClose();
|
|
639
|
+
},
|
|
633
640
|
className: "text-[#d97757] outline-none text-sm tracking-wide hover:opacity-80 transition-opacity"
|
|
634
641
|
},
|
|
635
642
|
"Done"
|
|
@@ -637,7 +644,7 @@ var ReusableOptions = ({
|
|
|
637
644
|
};
|
|
638
645
|
|
|
639
646
|
// src/components/CalendarPicker.tsx
|
|
640
|
-
import React9, { useState as useState6, useEffect as
|
|
647
|
+
import React9, { useState as useState6, useEffect as useEffect5 } from "react";
|
|
641
648
|
import { HugeiconsIcon as HugeiconsIcon5 } from "@hugeicons/react";
|
|
642
649
|
import {
|
|
643
650
|
CancelCircleIcon as CancelCircleIcon2,
|
|
@@ -666,7 +673,7 @@ var CalendarPicker = ({
|
|
|
666
673
|
const [hour, setHour] = useState6(initialDate.getHours() % 12 || 12);
|
|
667
674
|
const [minute, setMinute] = useState6(initialDate.getMinutes());
|
|
668
675
|
const [ampm, setAmpm] = useState6(initialDate.getHours() >= 12 ? "PM" : "AM");
|
|
669
|
-
|
|
676
|
+
useEffect5(() => {
|
|
670
677
|
if (isOpen) {
|
|
671
678
|
setMode(defaultMode);
|
|
672
679
|
setViewMonth(initialDate.getMonth());
|
|
@@ -884,7 +891,7 @@ var UniversalHuddleDetails = ({
|
|
|
884
891
|
const [showMembersModal, setShowMembersModal] = useState7(false);
|
|
885
892
|
const [liveStatus, setLiveStatus] = useState7(huddle.status);
|
|
886
893
|
const [timeRemaining, setTimeRemaining] = useState7("");
|
|
887
|
-
|
|
894
|
+
useEffect6(() => {
|
|
888
895
|
if (liveStatus !== "SCHEDULED") return;
|
|
889
896
|
const interval = setInterval(() => {
|
|
890
897
|
const now = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -1061,7 +1068,7 @@ var MobileNav = ({ items, hideMobileNav = false }) => {
|
|
|
1061
1068
|
};
|
|
1062
1069
|
|
|
1063
1070
|
// src/components/UniversalOrganizationPage.tsx
|
|
1064
|
-
import React15, { useState as useState10, useEffect as
|
|
1071
|
+
import React15, { useState as useState10, useEffect as useEffect7 } from "react";
|
|
1065
1072
|
import toast2 from "react-hot-toast";
|
|
1066
1073
|
|
|
1067
1074
|
// src/components/TextInput.tsx
|
|
@@ -1110,7 +1117,7 @@ var NumberInput = ({
|
|
|
1110
1117
|
disabled,
|
|
1111
1118
|
autoComplete: "off",
|
|
1112
1119
|
spellCheck: "false",
|
|
1113
|
-
className: "w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black transition-all outline-none focus:border-
|
|
1120
|
+
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"
|
|
1114
1121
|
}
|
|
1115
1122
|
));
|
|
1116
1123
|
|
|
@@ -1204,7 +1211,7 @@ var UniversalOrganizationPage = ({
|
|
|
1204
1211
|
const [isCheckingSlug, setIsCheckingSlug] = useState10(false);
|
|
1205
1212
|
const [slugAvailable, setSlugAvailable] = useState10(null);
|
|
1206
1213
|
const [isSubmitting, setIsSubmitting] = useState10(false);
|
|
1207
|
-
|
|
1214
|
+
useEffect7(() => {
|
|
1208
1215
|
setWeb3Name(initialOrgName || "");
|
|
1209
1216
|
setSlug(initialSlug || "");
|
|
1210
1217
|
setUsername(initialUsername || initialSlug || "");
|
|
@@ -1218,7 +1225,7 @@ var UniversalOrganizationPage = ({
|
|
|
1218
1225
|
const handleSlugChange = (val) => {
|
|
1219
1226
|
setSlug(val.toLowerCase().replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").substring(0, 50));
|
|
1220
1227
|
};
|
|
1221
|
-
|
|
1228
|
+
useEffect7(() => {
|
|
1222
1229
|
if (!slug || slug === initialSlug) {
|
|
1223
1230
|
setSlugAvailable(null);
|
|
1224
1231
|
setIsCheckingSlug(false);
|
|
@@ -1338,7 +1345,7 @@ var UniversalOrganizationPage = ({
|
|
|
1338
1345
|
};
|
|
1339
1346
|
|
|
1340
1347
|
// src/components/UniversalProfileSettings.tsx
|
|
1341
|
-
import React16, { useState as useState11, useEffect as
|
|
1348
|
+
import React16, { useState as useState11, useEffect as useEffect8 } from "react";
|
|
1342
1349
|
import toast3 from "react-hot-toast";
|
|
1343
1350
|
import { HugeiconsIcon as HugeiconsIcon11 } from "@hugeicons/react";
|
|
1344
1351
|
import {
|
|
@@ -1373,7 +1380,7 @@ var UniversalProfileSettings = ({
|
|
|
1373
1380
|
const [newPasscode, setNewPasscode] = useState11("");
|
|
1374
1381
|
const [confirmPasscode, setConfirmPasscode] = useState11("");
|
|
1375
1382
|
const [isPasscodeSubmitting, setIsPasscodeSubmitting] = useState11(false);
|
|
1376
|
-
|
|
1383
|
+
useEffect8(() => {
|
|
1377
1384
|
setFirstName(initialFirstName || "");
|
|
1378
1385
|
setLastName(initialLastName || "");
|
|
1379
1386
|
}, [initialFirstName, initialLastName]);
|
|
@@ -1636,7 +1643,7 @@ var UniversalErrorView = ({
|
|
|
1636
1643
|
};
|
|
1637
1644
|
|
|
1638
1645
|
// src/components/UniversalTransactionPage.tsx
|
|
1639
|
-
import React19, { useState as useState12, useEffect as
|
|
1646
|
+
import React19, { useState as useState12, useEffect as useEffect9, useRef as useRef4 } from "react";
|
|
1640
1647
|
import { HugeiconsIcon as HugeiconsIcon14 } from "@hugeicons/react";
|
|
1641
1648
|
import toast4 from "react-hot-toast";
|
|
1642
1649
|
import {
|
|
@@ -1706,7 +1713,7 @@ var UniversalTransactionPage = ({
|
|
|
1706
1713
|
const [isTypeModalOpen, setIsTypeModalOpen] = useState12(false);
|
|
1707
1714
|
const directionDropdownRef = useRef4(null);
|
|
1708
1715
|
const typeDropdownRef = useRef4(null);
|
|
1709
|
-
|
|
1716
|
+
useEffect9(() => {
|
|
1710
1717
|
function handleClickOutside(event) {
|
|
1711
1718
|
if (directionDropdownRef.current && !directionDropdownRef.current.contains(event.target)) {
|
|
1712
1719
|
setIsDirectionModalOpen(false);
|
|
@@ -1718,7 +1725,7 @@ var UniversalTransactionPage = ({
|
|
|
1718
1725
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1719
1726
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1720
1727
|
}, []);
|
|
1721
|
-
|
|
1728
|
+
useEffect9(() => {
|
|
1722
1729
|
setIsTyping(true);
|
|
1723
1730
|
const handler = setTimeout(() => {
|
|
1724
1731
|
onSearchChange(localSearchQuery);
|
|
@@ -1726,7 +1733,7 @@ var UniversalTransactionPage = ({
|
|
|
1726
1733
|
}, 600);
|
|
1727
1734
|
return () => clearTimeout(handler);
|
|
1728
1735
|
}, [localSearchQuery, onSearchChange]);
|
|
1729
|
-
|
|
1736
|
+
useEffect9(() => {
|
|
1730
1737
|
if (searchQuery === "" && localSearchQuery !== "") {
|
|
1731
1738
|
setLocalSearchQuery("");
|
|
1732
1739
|
}
|
|
@@ -2235,7 +2242,7 @@ var UniversalWalletPage = ({
|
|
|
2235
2242
|
};
|
|
2236
2243
|
|
|
2237
2244
|
// src/components/UniversalCardPage.tsx
|
|
2238
|
-
import React22, { useState as useState15, useEffect as
|
|
2245
|
+
import React22, { useState as useState15, useEffect as useEffect10 } from "react";
|
|
2239
2246
|
import { useRouter as useRouter2 } from "next/navigation";
|
|
2240
2247
|
import toast6 from "react-hot-toast";
|
|
2241
2248
|
import { HugeiconsIcon as HugeiconsIcon17 } from "@hugeicons/react";
|
|
@@ -2271,7 +2278,7 @@ var UniversalCardPage = ({
|
|
|
2271
2278
|
const [isFreezing, setIsFreezing] = useState15(false);
|
|
2272
2279
|
const [showDeleteDialog, setShowDeleteDialog] = useState15(false);
|
|
2273
2280
|
const [isDeleting, setIsDeleting] = useState15(false);
|
|
2274
|
-
|
|
2281
|
+
useEffect10(() => {
|
|
2275
2282
|
setIsBgLoaded(false);
|
|
2276
2283
|
if (!activeCard?.cardBgSrc) return;
|
|
2277
2284
|
const img = new Image();
|
|
@@ -2412,7 +2419,7 @@ var CardInfoDialog = ({ isOpen, onClose, cardDetails }) => {
|
|
|
2412
2419
|
var FundCardDialog = ({ isOpen, onClose, onSubmit }) => {
|
|
2413
2420
|
const [amount, setAmount] = useState15("");
|
|
2414
2421
|
const [isProcessing, setIsProcessing] = useState15(false);
|
|
2415
|
-
|
|
2422
|
+
useEffect10(() => {
|
|
2416
2423
|
if (isOpen) {
|
|
2417
2424
|
setAmount("");
|
|
2418
2425
|
}
|
|
@@ -2692,7 +2699,7 @@ var UniversalSidebar = ({
|
|
|
2692
2699
|
};
|
|
2693
2700
|
|
|
2694
2701
|
// src/components/HeroSection.tsx
|
|
2695
|
-
import React26, { useState as useState19, useEffect as
|
|
2702
|
+
import React26, { useState as useState19, useEffect as useEffect11, useRef as useRef5 } from "react";
|
|
2696
2703
|
import Link6 from "next/link";
|
|
2697
2704
|
import Image3 from "next/image";
|
|
2698
2705
|
|
|
@@ -2807,7 +2814,7 @@ var HeroSection = ({
|
|
|
2807
2814
|
const [isAnimating, setIsAnimating] = useState19(false);
|
|
2808
2815
|
const [isWaitlistOpen, setIsWaitlistOpen] = useState19(false);
|
|
2809
2816
|
const titleRef = useRef5(null);
|
|
2810
|
-
|
|
2817
|
+
useEffect11(() => {
|
|
2811
2818
|
const observer = new IntersectionObserver(
|
|
2812
2819
|
([entry]) => {
|
|
2813
2820
|
if (entry.isIntersecting) {
|
|
@@ -2864,7 +2871,7 @@ var HeroSection = ({
|
|
|
2864
2871
|
className: "leading-[0.85] tracking-[-0.07em] text-[18.2vw] sm:text-[16.8vw] md:text-[15.4vw] lg:text-[14vw] xl:text-[13.3vw] 2xl:text-[14vw] text-[#ffffff]"
|
|
2865
2872
|
},
|
|
2866
2873
|
/* @__PURE__ */ React26.createElement("div", { className: "inline-flex flex-wrap" }, /* @__PURE__ */ React26.createElement("span", { className: `inline-block relative transition-all duration-1000 ${isAnimating ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"}` }, titlePrefix, titlePrefix && /* @__PURE__ */ React26.createElement("br", null), highlightText, /* @__PURE__ */ React26.createElement("span", { className: "absolute top-[0.65em] right-[-0.3em] text-[0.31em] text-[#ffffff]/70" }, "*")))
|
|
2867
|
-
)), /* @__PURE__ */ React26.createElement("div", { className: "col-span-12 flex flex-col gap-5 pb-6 lg:col-span-4 lg:pb-10" }, subtitle && /* @__PURE__ */ React26.createElement("p", { className: "text-
|
|
2874
|
+
)), /* @__PURE__ */ React26.createElement("div", { className: "col-span-12 flex flex-col gap-5 pb-6 lg:col-span-4 lg:pb-10" }, subtitle && /* @__PURE__ */ React26.createElement("p", { className: "text-sm text-[#ffffff]/70 sm:text-sm md:text-xs leading-[1.2] max-w-md transition-opacity duration-1000 delay-300" }, subtitle), /* @__PURE__ */ React26.createElement("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-4" }, ctaText && /* @__PURE__ */ React26.createElement(
|
|
2868
2875
|
Link6,
|
|
2869
2876
|
{
|
|
2870
2877
|
href: isWaitlist ? "#" : ctaHref || "#",
|
|
@@ -2900,12 +2907,12 @@ var HeroSection = ({
|
|
|
2900
2907
|
};
|
|
2901
2908
|
|
|
2902
2909
|
// src/components/AppBento2.tsx
|
|
2903
|
-
import React27, { useState as useState20, useEffect as
|
|
2910
|
+
import React27, { useState as useState20, useEffect as useEffect12, useRef as useRef6 } from "react";
|
|
2904
2911
|
import { HugeiconsIcon as HugeiconsIcon20 } from "@hugeicons/react";
|
|
2905
2912
|
var AppBento2 = ({ tagline, headline, features }) => {
|
|
2906
2913
|
const [isAnimating, setIsAnimating] = useState20(false);
|
|
2907
2914
|
const titleRef = useRef6(null);
|
|
2908
|
-
|
|
2915
|
+
useEffect12(() => {
|
|
2909
2916
|
const observer = new IntersectionObserver(
|
|
2910
2917
|
([entry]) => {
|
|
2911
2918
|
if (entry.isIntersecting) {
|
|
@@ -3181,7 +3188,7 @@ var MenuRow3 = ({
|
|
|
3181
3188
|
);
|
|
3182
3189
|
|
|
3183
3190
|
// src/components/FeatureScroll.tsx
|
|
3184
|
-
import React29, { useRef as useRef7, useState as useState22, useEffect as
|
|
3191
|
+
import React29, { useRef as useRef7, useState as useState22, useEffect as useEffect13 } from "react";
|
|
3185
3192
|
import Image4 from "next/image";
|
|
3186
3193
|
import { HugeiconsIcon as HugeiconsIcon22 } from "@hugeicons/react";
|
|
3187
3194
|
import { ArrowLeft01Icon as ArrowLeft01Icon9, ArrowRight01Icon as ArrowRight01Icon8, Loading03Icon as Loading03Icon13 } from "@hugeicons/core-free-icons";
|
|
@@ -3246,7 +3253,7 @@ var FeatureScroll = ({ tagline, headline, features, expand = false }) => {
|
|
|
3246
3253
|
setCanScrollRight(scrollLeft < scrollWidth - clientWidth - 2);
|
|
3247
3254
|
}
|
|
3248
3255
|
};
|
|
3249
|
-
|
|
3256
|
+
useEffect13(() => {
|
|
3250
3257
|
checkScroll();
|
|
3251
3258
|
window.addEventListener("resize", checkScroll);
|
|
3252
3259
|
return () => window.removeEventListener("resize", checkScroll);
|
|
@@ -3338,7 +3345,7 @@ var PlatformFeatures = ({
|
|
|
3338
3345
|
};
|
|
3339
3346
|
|
|
3340
3347
|
// src/components/ManagedDocument.tsx
|
|
3341
|
-
import React31, { useState as useState23, useEffect as
|
|
3348
|
+
import React31, { useState as useState23, useEffect as useEffect14, useRef as useRef8 } from "react";
|
|
3342
3349
|
var ManagedDocument = ({
|
|
3343
3350
|
tagline,
|
|
3344
3351
|
title,
|
|
@@ -3348,7 +3355,7 @@ var ManagedDocument = ({
|
|
|
3348
3355
|
}) => {
|
|
3349
3356
|
const [isAnimating, setIsAnimating] = useState23(false);
|
|
3350
3357
|
const titleRef = useRef8(null);
|
|
3351
|
-
|
|
3358
|
+
useEffect14(() => {
|
|
3352
3359
|
const observer = new IntersectionObserver(
|
|
3353
3360
|
([entry]) => {
|
|
3354
3361
|
if (entry.isIntersecting) {
|
|
@@ -3584,7 +3591,7 @@ var ManagedContactBlock = ({
|
|
|
3584
3591
|
};
|
|
3585
3592
|
|
|
3586
3593
|
// src/components/ManagedPricingBlock.tsx
|
|
3587
|
-
import React33, { useState as useState25, useEffect as
|
|
3594
|
+
import React33, { useState as useState25, useEffect as useEffect15, useRef as useRef9 } from "react";
|
|
3588
3595
|
import Link7 from "next/link";
|
|
3589
3596
|
import Image5 from "next/image";
|
|
3590
3597
|
var CheckIcon = ({ className = "" }) => /* @__PURE__ */ React33.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: `w-4 h-4 shrink-0 ${className}`, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React33.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "black" }), /* @__PURE__ */ React33.createElement("path", { d: "M8 12L11 15L16 9", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
@@ -3598,7 +3605,7 @@ var ManagedPricingBlock = ({
|
|
|
3598
3605
|
const [isAnimating, setIsAnimating] = useState25(false);
|
|
3599
3606
|
const [activeTabIndex, setActiveTabIndex] = useState25(0);
|
|
3600
3607
|
const titleRef = useRef9(null);
|
|
3601
|
-
|
|
3608
|
+
useEffect15(() => {
|
|
3602
3609
|
const observer = new IntersectionObserver(
|
|
3603
3610
|
([entry]) => {
|
|
3604
3611
|
if (entry.isIntersecting) {
|
|
@@ -3813,12 +3820,12 @@ var ManagedNewsletterSplitBlock = ({
|
|
|
3813
3820
|
};
|
|
3814
3821
|
|
|
3815
3822
|
// src/components/PortfolioHero.tsx
|
|
3816
|
-
import React37, { useEffect as
|
|
3823
|
+
import React37, { useEffect as useEffect16, useRef as useRef10 } from "react";
|
|
3817
3824
|
import Link8 from "next/link";
|
|
3818
3825
|
import Image8 from "next/image";
|
|
3819
3826
|
var useScrollAnimation = () => {
|
|
3820
3827
|
const elementRef = useRef10(null);
|
|
3821
|
-
|
|
3828
|
+
useEffect16(() => {
|
|
3822
3829
|
const el = elementRef.current;
|
|
3823
3830
|
if (!el) return;
|
|
3824
3831
|
const observer = new IntersectionObserver(
|
|
@@ -3945,7 +3952,7 @@ var GifFeatureCard = ({
|
|
|
3945
3952
|
};
|
|
3946
3953
|
|
|
3947
3954
|
// src/components/MedicalFeatureStatsBlock.tsx
|
|
3948
|
-
import React39, { useState as useState27, useEffect as
|
|
3955
|
+
import React39, { useState as useState27, useEffect as useEffect17, useRef as useRef11 } from "react";
|
|
3949
3956
|
import Image10 from "next/image";
|
|
3950
3957
|
var MedicalFeatureStatsBlock = ({
|
|
3951
3958
|
bottomHeadline,
|
|
@@ -3956,7 +3963,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
3956
3963
|
}) => {
|
|
3957
3964
|
const [isAnimating, setIsAnimating] = useState27(false);
|
|
3958
3965
|
const titleRef = useRef11(null);
|
|
3959
|
-
|
|
3966
|
+
useEffect17(() => {
|
|
3960
3967
|
const observer = new IntersectionObserver(
|
|
3961
3968
|
([entry]) => {
|
|
3962
3969
|
if (entry.isIntersecting) {
|
|
@@ -4679,7 +4686,7 @@ var UniversalCardActionPage = ({
|
|
|
4679
4686
|
};
|
|
4680
4687
|
|
|
4681
4688
|
// src/components/PinDialerBottomSheet.tsx
|
|
4682
|
-
import React47, { useState as useState33, useEffect as
|
|
4689
|
+
import React47, { useState as useState33, useEffect as useEffect18 } from "react";
|
|
4683
4690
|
import { HugeiconsIcon as HugeiconsIcon33 } from "@hugeicons/react";
|
|
4684
4691
|
import { CancelCircleIcon as CancelCircleIcon12 } from "@hugeicons/core-free-icons";
|
|
4685
4692
|
var PinDialerBottomSheet = ({
|
|
@@ -4690,7 +4697,7 @@ var PinDialerBottomSheet = ({
|
|
|
4690
4697
|
onComplete
|
|
4691
4698
|
}) => {
|
|
4692
4699
|
const [pin, setPin] = useState33("");
|
|
4693
|
-
|
|
4700
|
+
useEffect18(() => {
|
|
4694
4701
|
setPin("");
|
|
4695
4702
|
}, [isOpen]);
|
|
4696
4703
|
const handleSubmit = (e) => {
|
|
@@ -4741,7 +4748,7 @@ var PinDialerBottomSheet = ({
|
|
|
4741
4748
|
};
|
|
4742
4749
|
|
|
4743
4750
|
// src/components/UniversalBuyCryptoPage.tsx
|
|
4744
|
-
import React48, { useState as useState34, useEffect as
|
|
4751
|
+
import React48, { useState as useState34, useEffect as useEffect19, useRef as useRef12, useCallback } from "react";
|
|
4745
4752
|
import toast12 from "react-hot-toast";
|
|
4746
4753
|
import { HugeiconsIcon as HugeiconsIcon34 } from "@hugeicons/react";
|
|
4747
4754
|
import {
|
|
@@ -4826,7 +4833,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4826
4833
|
const [isNetworkDialogOpen, setIsNetworkDialogOpen] = useState34(false);
|
|
4827
4834
|
const [isSubmitting, setIsSubmitting] = useState34(false);
|
|
4828
4835
|
const debounceTimerRef = useRef12(null);
|
|
4829
|
-
|
|
4836
|
+
useEffect19(() => {
|
|
4830
4837
|
if (selectedCrypto?.networks?.length > 0) {
|
|
4831
4838
|
const exists = selectedCrypto.networks.find((n) => n.id === selectedNetwork.id);
|
|
4832
4839
|
if (!exists) {
|
|
@@ -4834,7 +4841,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4834
4841
|
}
|
|
4835
4842
|
}
|
|
4836
4843
|
}, [selectedCrypto]);
|
|
4837
|
-
|
|
4844
|
+
useEffect19(() => {
|
|
4838
4845
|
if (!recipientAddress.trim()) {
|
|
4839
4846
|
setIsAddressValid(false);
|
|
4840
4847
|
return;
|
|
@@ -5104,7 +5111,7 @@ var UniversalHuddlesPage = ({
|
|
|
5104
5111
|
};
|
|
5105
5112
|
|
|
5106
5113
|
// src/components/UniversalMembersPage.tsx
|
|
5107
|
-
import React50, { useState as useState35, useEffect as
|
|
5114
|
+
import React50, { useState as useState35, useEffect as useEffect20, useRef as useRef13 } from "react";
|
|
5108
5115
|
import { HugeiconsIcon as HugeiconsIcon36 } from "@hugeicons/react";
|
|
5109
5116
|
import toast13 from "react-hot-toast";
|
|
5110
5117
|
import {
|
|
@@ -5178,7 +5185,7 @@ var UniversalMembersPage = ({
|
|
|
5178
5185
|
const statusDropdownRef = useRef13(null);
|
|
5179
5186
|
const roleDropdownRef = useRef13(null);
|
|
5180
5187
|
const cleanEmailId = (val) => val.toLowerCase().replace(/[^a-z0-9@._-]/g, "");
|
|
5181
|
-
|
|
5188
|
+
useEffect20(() => {
|
|
5182
5189
|
function handleClickOutside(event) {
|
|
5183
5190
|
if (statusDropdownRef.current && !statusDropdownRef.current.contains(event.target)) {
|
|
5184
5191
|
setIsStatusModalOpen(false);
|
|
@@ -5190,7 +5197,7 @@ var UniversalMembersPage = ({
|
|
|
5190
5197
|
document.addEventListener("mousedown", handleClickOutside);
|
|
5191
5198
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
5192
5199
|
}, []);
|
|
5193
|
-
|
|
5200
|
+
useEffect20(() => {
|
|
5194
5201
|
setIsTyping(true);
|
|
5195
5202
|
const handler = setTimeout(() => {
|
|
5196
5203
|
onSearchChange(localSearchQuery);
|
|
@@ -5198,7 +5205,7 @@ var UniversalMembersPage = ({
|
|
|
5198
5205
|
}, 600);
|
|
5199
5206
|
return () => clearTimeout(handler);
|
|
5200
5207
|
}, [localSearchQuery, onSearchChange]);
|
|
5201
|
-
|
|
5208
|
+
useEffect20(() => {
|
|
5202
5209
|
if (searchQuery === "" && localSearchQuery !== "") {
|
|
5203
5210
|
setLocalSearchQuery("");
|
|
5204
5211
|
}
|
|
@@ -5283,7 +5290,7 @@ var UniversalMembersPage = ({
|
|
|
5283
5290
|
onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)),
|
|
5284
5291
|
required: true,
|
|
5285
5292
|
autoFocus: true,
|
|
5286
|
-
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-
|
|
5293
|
+
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300",
|
|
5287
5294
|
placeholder: "name@company.com"
|
|
5288
5295
|
}
|
|
5289
5296
|
)), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React50.createElement(
|
|
@@ -5598,7 +5605,7 @@ var UniversalHome2 = ({
|
|
|
5598
5605
|
};
|
|
5599
5606
|
|
|
5600
5607
|
// src/components/UniversalSettings.tsx
|
|
5601
|
-
import React52, { useState as useState37, useEffect as
|
|
5608
|
+
import React52, { useState as useState37, useEffect as useEffect21, useRef as useRef14 } from "react";
|
|
5602
5609
|
import toast15 from "react-hot-toast";
|
|
5603
5610
|
import { HugeiconsIcon as HugeiconsIcon38 } from "@hugeicons/react";
|
|
5604
5611
|
import {
|
|
@@ -5728,7 +5735,7 @@ var UniversalSettings = ({
|
|
|
5728
5735
|
const [pendingUserAvatar, setPendingUserAvatar] = useState37(null);
|
|
5729
5736
|
const [isUploadingOrgAvatar, setIsUploadingOrgAvatar] = useState37(false);
|
|
5730
5737
|
const [isUploadingUserAvatar, setIsUploadingUserAvatar] = useState37(false);
|
|
5731
|
-
|
|
5738
|
+
useEffect21(() => {
|
|
5732
5739
|
setOrgName(initialOrgName || "");
|
|
5733
5740
|
setOrgSlug(initialOrgSlug || "");
|
|
5734
5741
|
setOrgAvatarUrl(initialOrgAvatarUrl || "");
|
|
@@ -5763,7 +5770,7 @@ var UniversalSettings = ({
|
|
|
5763
5770
|
}
|
|
5764
5771
|
e.target.value = "";
|
|
5765
5772
|
};
|
|
5766
|
-
|
|
5773
|
+
useEffect21(() => {
|
|
5767
5774
|
if (activeTab !== "MEMBERS") return;
|
|
5768
5775
|
if (isFirstSearchMount.current) {
|
|
5769
5776
|
isFirstSearchMount.current = false;
|
|
@@ -5820,7 +5827,7 @@ var UniversalSettings = ({
|
|
|
5820
5827
|
}
|
|
5821
5828
|
};
|
|
5822
5829
|
const activeExpandedMember = expandedId ? members.find((m) => m.id === expandedId) : null;
|
|
5823
|
-
|
|
5830
|
+
useEffect21(() => {
|
|
5824
5831
|
if (!isOrg || !orgSlug || orgSlug === initialOrgSlug) {
|
|
5825
5832
|
setSlugAvailable(null);
|
|
5826
5833
|
setIsCheckingSlug(false);
|
|
@@ -5952,7 +5959,7 @@ var UniversalSettings = ({
|
|
|
5952
5959
|
className: "text-xs text-[#d97757] hover:underline outline-none disabled:opacity-50"
|
|
5953
5960
|
},
|
|
5954
5961
|
"Remove"
|
|
5955
|
-
))))))) : /* @__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-
|
|
5962
|
+
))))))) : /* @__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-[#d97757] 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: () => {
|
|
5956
5963
|
setIsInviteMode(false);
|
|
5957
5964
|
setInviteEmail("");
|
|
5958
5965
|
}, 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", { className: "flex items-center gap-4" }, /* @__PURE__ */ React52.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => canManage && !isSavingOrg ? orgFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React52.createElement(OrgAvatar2, { src: orgAvatarUrl, sizeClass: "w-14 h-14" }), canManage && /* @__PURE__ */ React52.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-10" }, isUploadingOrgAvatar ? /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Loading03Icon26, size: 12, className: "animate-spin" }) : /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: CloudUploadIcon, size: 14 })), /* @__PURE__ */ React52.createElement("input", { type: "file", ref: orgFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "ORGANIZATION") })), /* @__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: () => {
|
|
@@ -5974,7 +5981,7 @@ var UniversalSettings = ({
|
|
|
5974
5981
|
};
|
|
5975
5982
|
|
|
5976
5983
|
// src/components/UniversalCreateHuddle.tsx
|
|
5977
|
-
import React53, { useState as useState38, useEffect as
|
|
5984
|
+
import React53, { useState as useState38, useEffect as useEffect22, useRef as useRef15 } from "react";
|
|
5978
5985
|
import toast16 from "react-hot-toast";
|
|
5979
5986
|
import { HugeiconsIcon as HugeiconsIcon39 } from "@hugeicons/react";
|
|
5980
5987
|
import {
|
|
@@ -6041,7 +6048,7 @@ var UniversalCreateHuddle = ({
|
|
|
6041
6048
|
const [title, setTitle] = useState38("");
|
|
6042
6049
|
const [isPrivate, setIsPrivate] = useState38(false);
|
|
6043
6050
|
const [timezone, setTimezone] = useState38("UTC");
|
|
6044
|
-
|
|
6051
|
+
useEffect22(() => {
|
|
6045
6052
|
try {
|
|
6046
6053
|
setTimezone(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
6047
6054
|
} catch (e) {
|
|
@@ -6214,7 +6221,7 @@ var UniversalCreateHuddle = ({
|
|
|
6214
6221
|
};
|
|
6215
6222
|
|
|
6216
6223
|
// src/components/HomeHuddleCalendar.tsx
|
|
6217
|
-
import React54, { useState as useState39, useRef as useRef16, useEffect as
|
|
6224
|
+
import React54, { useState as useState39, useRef as useRef16, useEffect as useEffect23 } from "react";
|
|
6218
6225
|
import { useRouter as useRouter4 } from "next/navigation";
|
|
6219
6226
|
import { HugeiconsIcon as HugeiconsIcon40 } from "@hugeicons/react";
|
|
6220
6227
|
import {
|
|
@@ -6268,7 +6275,7 @@ var HomeHuddleCalendar = ({
|
|
|
6268
6275
|
const [isStatusModalOpen, setIsStatusModalOpen] = useState39(false);
|
|
6269
6276
|
const typingTimer = useRef16(null);
|
|
6270
6277
|
const isSearching = localSearch.trim().length > 0;
|
|
6271
|
-
|
|
6278
|
+
useEffect23(() => {
|
|
6272
6279
|
setLocalSearch(searchQuery);
|
|
6273
6280
|
}, [searchQuery]);
|
|
6274
6281
|
const handleSearchInput = (e) => {
|
|
@@ -6415,7 +6422,7 @@ var formatType = (type) => {
|
|
|
6415
6422
|
return type.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
6416
6423
|
};
|
|
6417
6424
|
var ApplicationIcon = ({ icon, sizeClass = "w-10 h-10" }) => {
|
|
6418
|
-
return /* @__PURE__ */ React55.createElement("div", { className: `relative shrink-0 aspect-square ${sizeClass}` }, /* @__PURE__ */ React55.createElement("div", { className: "w-full h-full aspect-square rounded-
|
|
6425
|
+
return /* @__PURE__ */ React55.createElement("div", { className: `relative shrink-0 aspect-square ${sizeClass}` }, /* @__PURE__ */ React55.createElement("div", { className: "w-full h-full aspect-square rounded-full bg-neutral-50 flex items-center justify-center overflow-hidden" }, icon ? /* @__PURE__ */ React55.createElement(HugeiconsIcon41, { icon, size: 18, className: "text-stone-500" }) : /* @__PURE__ */ React55.createElement("div", { className: "w-4 h-4 rounded-sm bg-stone-300" })));
|
|
6419
6426
|
};
|
|
6420
6427
|
var PageSpinner9 = () => /* @__PURE__ */ React55.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React55.createElement(HugeiconsIcon41, { icon: Loading03Icon29, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
6421
6428
|
var UniversalApplicationsPage = ({
|
|
@@ -6646,7 +6653,7 @@ var UniversalHome3 = ({
|
|
|
6646
6653
|
},
|
|
6647
6654
|
/* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Logout01Icon2, size: 15 }),
|
|
6648
6655
|
"Log Out"
|
|
6649
|
-
)))), showNotifDialog && /* @__PURE__ */ React56.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React56.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] h-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React56.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-[#d97757] hover:text-[#d97757] transition-colors outline-none flex items-center gap-2 text-xs tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: ArrowLeft01Icon22, size: 14 }), " Back") : /* @__PURE__ */ React56.createElement("h3", { className: "text-sm text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React56.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-stone-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: CancelCircleIcon14, size: 18 }))), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Loading03Icon30, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ React56.createElement("div", { className: "p-4 text-left" }, selectedNotif.type === "
|
|
6656
|
+
)))), showNotifDialog && /* @__PURE__ */ React56.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React56.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] h-auto" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React56.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-[#d97757] hover:text-[#d97757] transition-colors outline-none flex items-center gap-2 text-xs tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: ArrowLeft01Icon22, size: 14 }), " Back") : /* @__PURE__ */ React56.createElement("h3", { className: "text-sm text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React56.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-stone-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: CancelCircleIcon14, size: 18 }))), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon42, { icon: Loading03Icon30, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ React56.createElement("div", { className: "p-4 text-left" }, selectedNotif.type === "ORG_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && selectedNotif.meta_json?.completed ? /* @__PURE__ */ React56.createElement("div", { className: "" }) : /* @__PURE__ */ React56.createElement("h4", { className: "text-sm text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React56.createElement("span", { className: "text-xs text-stone-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React56.createElement("p", { className: "text-xs text-stone-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "ORG_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React56.createElement("div", { className: `mt-8 flex gap-3 pt-6 ${selectedNotif.meta_json?.completed ? "opacity-40 pointer-events-none cursor-not-allowed" : ""}` }, /* @__PURE__ */ React56.createElement(
|
|
6650
6657
|
"button",
|
|
6651
6658
|
{
|
|
6652
6659
|
onClick: () => handleResolve("ACCEPTED"),
|
|
@@ -6825,7 +6832,7 @@ function RootSidebar({
|
|
|
6825
6832
|
}
|
|
6826
6833
|
|
|
6827
6834
|
// src/components/UniversalSettings2.tsx
|
|
6828
|
-
import React58, { useState as useState42, useEffect as
|
|
6835
|
+
import React58, { useState as useState42, useEffect as useEffect24, useRef as useRef17 } from "react";
|
|
6829
6836
|
import toast18 from "react-hot-toast";
|
|
6830
6837
|
import { HugeiconsIcon as HugeiconsIcon44 } from "@hugeicons/react";
|
|
6831
6838
|
import {
|
|
@@ -6937,7 +6944,7 @@ var UniversalSettings2 = ({
|
|
|
6937
6944
|
const [pendingUserAvatar, setPendingUserAvatar] = useState42(null);
|
|
6938
6945
|
const [isUploadingOrgAvatar, setIsUploadingOrgAvatar] = useState42(false);
|
|
6939
6946
|
const [isUploadingUserAvatar, setIsUploadingUserAvatar] = useState42(false);
|
|
6940
|
-
|
|
6947
|
+
useEffect24(() => {
|
|
6941
6948
|
setOrgName(initialOrgName || "");
|
|
6942
6949
|
setOrgSlug(initialOrgSlug || "");
|
|
6943
6950
|
setOrgAvatarUrl(initialOrgAvatarUrl || "");
|
|
@@ -6972,7 +6979,7 @@ var UniversalSettings2 = ({
|
|
|
6972
6979
|
}
|
|
6973
6980
|
e.target.value = "";
|
|
6974
6981
|
};
|
|
6975
|
-
|
|
6982
|
+
useEffect24(() => {
|
|
6976
6983
|
if (activeTab !== "MEMBERS") return;
|
|
6977
6984
|
if (isFirstSearchMount.current) {
|
|
6978
6985
|
isFirstSearchMount.current = false;
|
|
@@ -7029,7 +7036,7 @@ var UniversalSettings2 = ({
|
|
|
7029
7036
|
}
|
|
7030
7037
|
};
|
|
7031
7038
|
const activeExpandedMember = expandedId ? members.find((m) => m.id === expandedId) : null;
|
|
7032
|
-
|
|
7039
|
+
useEffect24(() => {
|
|
7033
7040
|
if (!isOrg || !orgSlug || orgSlug === initialOrgSlug) {
|
|
7034
7041
|
setSlugAvailable(null);
|
|
7035
7042
|
setIsCheckingSlug(false);
|
|
@@ -7189,7 +7196,7 @@ var UniversalSettings2 = ({
|
|
|
7189
7196
|
required: true,
|
|
7190
7197
|
autoFocus: true,
|
|
7191
7198
|
disabled: isInviting,
|
|
7192
|
-
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-
|
|
7199
|
+
className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-[#d97757] transition-all duration-300 disabled:opacity-50",
|
|
7193
7200
|
placeholder: "name@company.com"
|
|
7194
7201
|
}
|
|
7195
7202
|
)), /* @__PURE__ */ React58.createElement("div", { className: "pt-2" }, /* @__PURE__ */ React58.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"))))))), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React58.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => canManage && !isSavingOrg ? orgFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React58.createElement(OrgAvatar4, { src: orgAvatarUrl, sizeClass: "w-14 h-14" }), canManage && /* @__PURE__ */ React58.createElement("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 bg-white border border-stone-200 rounded-full flex items-center justify-center text-stone-500 group-hover:text-black transition-colors z-10" }, isUploadingOrgAvatar ? /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: Loading03Icon31, size: 12, className: "animate-spin" }) : /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CloudUploadIcon2, size: 14 })), /* @__PURE__ */ React58.createElement("input", { type: "file", ref: orgFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "ORGANIZATION") })), /* @__PURE__ */ React58.createElement("div", null, /* @__PURE__ */ React58.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-stone-500" }, "Manage your organizational identity and handles."))), !canManage && /* @__PURE__ */ React58.createElement("span", { className: "p-2 w-9 h-9 bg-stone-100 text-stone-400 rounded-full shrink-0" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon44, { icon: CircleLock02Icon5, size: 18, className: "text-current" }))), /* @__PURE__ */ React58.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ React58.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ React58.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React58.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React58.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__ */ React58.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__ */ React58.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React58.createElement(InputSpinner4, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React58.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-[#d97757]/10" }, /* @__PURE__ */ React58.createElement("svg", { className: "w-2 h-2 text-[#d97757]", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React58.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__ */ React58.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React58.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React58.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__ */ React58.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React58.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ React58.createElement("button", { type: "button", onClick: () => {
|
|
@@ -7211,7 +7218,7 @@ var UniversalSettings2 = ({
|
|
|
7211
7218
|
};
|
|
7212
7219
|
|
|
7213
7220
|
// src/components/UniversalDeveloperSettings.tsx
|
|
7214
|
-
import React59, { useState as useState43, useEffect as
|
|
7221
|
+
import React59, { useState as useState43, useEffect as useEffect25 } from "react";
|
|
7215
7222
|
import toast19 from "react-hot-toast";
|
|
7216
7223
|
import { HugeiconsIcon as HugeiconsIcon45 } from "@hugeicons/react";
|
|
7217
7224
|
import {
|
|
@@ -7233,7 +7240,7 @@ var UniversalDeveloperSettings = ({
|
|
|
7233
7240
|
const [isGenerating, setIsGenerating] = useState43(false);
|
|
7234
7241
|
const [isSavingWebhook, setIsSavingWebhook] = useState43(false);
|
|
7235
7242
|
const [isRollModalOpen, setIsRollModalOpen] = useState43(false);
|
|
7236
|
-
|
|
7243
|
+
useEffect25(() => {
|
|
7237
7244
|
setPublicKey(initialPublicKey || "");
|
|
7238
7245
|
setWebhookUrl(initialWebhookUrl || "");
|
|
7239
7246
|
}, [initialPublicKey, initialWebhookUrl]);
|
|
@@ -7450,16 +7457,21 @@ var UniversalApplicationPage2 = ({
|
|
|
7450
7457
|
// src/components/UniversalApplicationDetails.tsx
|
|
7451
7458
|
import React61, { useState as useState45 } from "react";
|
|
7452
7459
|
import { HugeiconsIcon as HugeiconsIcon47 } from "@hugeicons/react";
|
|
7453
|
-
import { ArrowLeft01Icon as ArrowLeft01Icon26 } from "@hugeicons/core-free-icons";
|
|
7460
|
+
import { ArrowLeft01Icon as ArrowLeft01Icon26, CancelCircleIcon as CancelCircleIcon16, CheckmarkCircle02Icon as CheckmarkCircle02Icon2 } from "@hugeicons/core-free-icons";
|
|
7454
7461
|
var formatType2 = (type) => type.split("_").map((w) => w[0] + w.slice(1).toLowerCase()).join(" ");
|
|
7455
7462
|
var UniversalApplicationDetails = ({
|
|
7456
7463
|
onBackHref = "/app",
|
|
7457
7464
|
application,
|
|
7458
7465
|
canDelete,
|
|
7459
|
-
onDeleteSubmit
|
|
7466
|
+
onDeleteSubmit,
|
|
7467
|
+
supportedCountries,
|
|
7468
|
+
onUpdateCountry
|
|
7460
7469
|
}) => {
|
|
7461
7470
|
const [isDeleting, setIsDeleting] = useState45(false);
|
|
7462
7471
|
const [confirmDialog, setConfirmDialog] = useState45(false);
|
|
7472
|
+
const [isCountryModalOpen, setIsCountryModalOpen] = useState45(false);
|
|
7473
|
+
const [selectedCountryCode, setSelectedCountryCode] = useState45(null);
|
|
7474
|
+
const [isUpdatingCountry, setIsUpdatingCountry] = useState45(false);
|
|
7463
7475
|
const isLockedStatus = ["COMPLETED", "PENDING", "REJECTED", "QUERIED"].includes(application.status);
|
|
7464
7476
|
const deletePermitted = canDelete && !isLockedStatus;
|
|
7465
7477
|
const handleDelete = async () => {
|
|
@@ -7471,6 +7483,24 @@ var UniversalApplicationDetails = ({
|
|
|
7471
7483
|
}
|
|
7472
7484
|
setIsDeleting(false);
|
|
7473
7485
|
};
|
|
7486
|
+
const handleOpenApplication = () => {
|
|
7487
|
+
if (application.data?.country) {
|
|
7488
|
+
window.location.href = `/app/applications/app/${application.id}/${application.data.country}`;
|
|
7489
|
+
} else {
|
|
7490
|
+
setIsCountryModalOpen(true);
|
|
7491
|
+
}
|
|
7492
|
+
};
|
|
7493
|
+
const handleConfirmCountry = async () => {
|
|
7494
|
+
if (!selectedCountryCode) return;
|
|
7495
|
+
setIsUpdatingCountry(true);
|
|
7496
|
+
try {
|
|
7497
|
+
await onUpdateCountry(selectedCountryCode);
|
|
7498
|
+
setIsCountryModalOpen(false);
|
|
7499
|
+
} catch (error) {
|
|
7500
|
+
}
|
|
7501
|
+
setIsUpdatingCountry(false);
|
|
7502
|
+
};
|
|
7503
|
+
const activeCountryObj = application.data?.country ? supportedCountries.find((c) => c.code === application.data.country) : null;
|
|
7474
7504
|
return /* @__PURE__ */ React61.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React61.createElement(ManagedToaster, null), /* @__PURE__ */ React61.createElement(
|
|
7475
7505
|
ConfirmationDialog,
|
|
7476
7506
|
{
|
|
@@ -7484,11 +7514,34 @@ var UniversalApplicationDetails = ({
|
|
|
7484
7514
|
onClose: () => setConfirmDialog(false),
|
|
7485
7515
|
onConfirm: handleDelete
|
|
7486
7516
|
}
|
|
7487
|
-
), /* @__PURE__ */ React61.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React61.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React61.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon26, size: 16 }), " Back")), /* @__PURE__ */ React61.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ React61.createElement("div", null, /* @__PURE__ */ React61.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ React61.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ React61.createElement("div", { className: "px-4 py-1.5 bg-stone-200 text-stone-600 rounded-full text-xs self-start sm:self-auto
|
|
7517
|
+
), /* @__PURE__ */ React61.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React61.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#d97757] hover:text-[#d97757] transition-colors text-sm outline-none" }, /* @__PURE__ */ React61.createElement(HugeiconsIcon47, { icon: ArrowLeft01Icon26, size: 16 }), " Back")), /* @__PURE__ */ React61.createElement("div", { className: "mb-8 px-1 flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, /* @__PURE__ */ React61.createElement("div", null, /* @__PURE__ */ React61.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Application Details"), /* @__PURE__ */ React61.createElement("p", { className: "text-xs text-stone-500" }, "Review your filing entity and access its workspace.")), /* @__PURE__ */ React61.createElement("div", { className: "px-4 py-1.5 bg-stone-200 text-stone-600 rounded-full text-xs self-start sm:self-auto tracking-widest uppercase" }, application.status)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block uppercase" }, "Target Company"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2 " }, application.name)), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block uppercase" }, "Filing Type"), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black py-2" }, formatType2(application.type))), activeCountryObj && /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col gap-1 w-full border-t border-stone-100 pt-6" }, /* @__PURE__ */ React61.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block uppercase" }, "Jurisdiction"), /* @__PURE__ */ React61.createElement("div", { className: "flex items-center gap-2 py-2" }, /* @__PURE__ */ React61.createElement("img", { src: activeCountryObj.flag, alt: "flag", className: "w-5 h-5 rounded-full object-cover" }), /* @__PURE__ */ React61.createElement("span", { className: "text-sm text-black" }, activeCountryObj.name))), /* @__PURE__ */ React61.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 pt-6 mt-2 border-t border-stone-100" }, /* @__PURE__ */ React61.createElement("button", { onClick: handleOpenApplication, className: "flex-1 w-full py-2.5 bg-[#d97757] text-white rounded-full text-center text-xs transition-colors hover:bg-[#d97757]/90 outline-none" }, "Open Application"), /* @__PURE__ */ React61.createElement("a", { href: `/app/applications/assets/${application.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" }, "Application Assets"), deletePermitted && /* @__PURE__ */ React61.createElement("button", { onClick: () => setConfirmDialog(true), 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" }, "Delete Application"))), isCountryModalOpen && /* @__PURE__ */ React61.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React61.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isUpdatingCountry && setIsCountryModalOpen(false) }), /* @__PURE__ */ React61.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-[85vh]" }, /* @__PURE__ */ React61.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React61.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Jurisdiction"), /* @__PURE__ */ React61.createElement("button", { onClick: () => !isUpdatingCountry && setIsCountryModalOpen(false), className: "text-stone-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React61.createElement(HugeiconsIcon47, { icon: CancelCircleIcon16, size: 18 }))), /* @__PURE__ */ React61.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-3 space-y-1.5" }, supportedCountries.map((country) => {
|
|
7518
|
+
const isSelected = selectedCountryCode === country.code;
|
|
7519
|
+
const isAvailable = country.available;
|
|
7520
|
+
return /* @__PURE__ */ React61.createElement(
|
|
7521
|
+
"button",
|
|
7522
|
+
{
|
|
7523
|
+
key: country.code,
|
|
7524
|
+
disabled: !isAvailable || isUpdatingCountry,
|
|
7525
|
+
onClick: () => setSelectedCountryCode(country.code),
|
|
7526
|
+
className: `w-full flex items-center justify-between p-3 rounded-xl transition-all outline-none border ${!isAvailable ? "opacity-40 cursor-not-allowed border-transparent bg-stone-50" : isSelected ? "bg-white border-[#d97757]" : "bg-stone-50 border-transparent hover:bg-stone-100/60 cursor-pointer"}`
|
|
7527
|
+
},
|
|
7528
|
+
/* @__PURE__ */ React61.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React61.createElement("img", { src: country.flag, alt: country.name, className: "w-6 h-6 rounded-full object-cover shrink-0" }), /* @__PURE__ */ React61.createElement("span", { className: `text-sm tracking-tight ${isSelected ? "text-black" : "text-stone-700"}` }, country.name)),
|
|
7529
|
+
isSelected && /* @__PURE__ */ React61.createElement(HugeiconsIcon47, { icon: CheckmarkCircle02Icon2, size: 16, className: "text-[#d97757] shrink-0" })
|
|
7530
|
+
);
|
|
7531
|
+
})), /* @__PURE__ */ React61.createElement("div", { className: "p-4 shrink-0 bg-white" }, /* @__PURE__ */ React61.createElement(
|
|
7532
|
+
ThreeDActionButton,
|
|
7533
|
+
{
|
|
7534
|
+
onClick: handleConfirmCountry,
|
|
7535
|
+
disabled: !selectedCountryCode || isUpdatingCountry,
|
|
7536
|
+
isLoading: isUpdatingCountry,
|
|
7537
|
+
className: "w-full"
|
|
7538
|
+
},
|
|
7539
|
+
"Confirm Jurisdiction"
|
|
7540
|
+
)))));
|
|
7488
7541
|
};
|
|
7489
7542
|
|
|
7490
7543
|
// src/components/UniversalCreateApplication.tsx
|
|
7491
|
-
import React62, { useState as useState46, useRef as useRef19, useEffect as
|
|
7544
|
+
import React62, { useState as useState46, useRef as useRef19, useEffect as useEffect26 } from "react";
|
|
7492
7545
|
import toast20 from "react-hot-toast";
|
|
7493
7546
|
import { HugeiconsIcon as HugeiconsIcon48 } from "@hugeicons/react";
|
|
7494
7547
|
import {
|
|
@@ -7497,7 +7550,7 @@ import {
|
|
|
7497
7550
|
Loading03Icon as Loading03Icon33,
|
|
7498
7551
|
Search01Icon as Search01Icon10,
|
|
7499
7552
|
CircleLock02Icon as CircleLock02Icon7,
|
|
7500
|
-
CheckmarkCircle02Icon as
|
|
7553
|
+
CheckmarkCircle02Icon as CheckmarkCircle02Icon3,
|
|
7501
7554
|
Building03Icon,
|
|
7502
7555
|
File02Icon,
|
|
7503
7556
|
Tick02Icon as Tick02Icon5
|
|
@@ -7532,7 +7585,7 @@ var UniversalCreateApplication = ({
|
|
|
7532
7585
|
const [creationMode, setCreationMode] = useState46("EXISTING");
|
|
7533
7586
|
const defaultTypeKey = applicationTypesMeta.length > 0 ? applicationTypesMeta[0].key : "";
|
|
7534
7587
|
const [selectedTypeKey, setSelectedTypeKey] = useState46(defaultTypeKey);
|
|
7535
|
-
|
|
7588
|
+
useEffect26(() => {
|
|
7536
7589
|
if (!selectedTypeKey && applicationTypesMeta.length > 0) {
|
|
7537
7590
|
setSelectedTypeKey(applicationTypesMeta[0].key);
|
|
7538
7591
|
}
|
|
@@ -7621,12 +7674,12 @@ var UniversalCreateApplication = ({
|
|
|
7621
7674
|
},
|
|
7622
7675
|
className: `p-4 rounded-xl cursor-pointer transition-all border ${isSelected ? "bg-white border-[#d97757]" : "bg-stone-50 border-transparent hover:bg-stone-100/60"}`
|
|
7623
7676
|
},
|
|
7624
|
-
/* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React62.createElement("h4", { className: "text-xs text-black" }, item.label), isSelected && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon:
|
|
7677
|
+
/* @__PURE__ */ React62.createElement("div", { className: "flex items-center justify-between gap-2" }, /* @__PURE__ */ React62.createElement("h4", { className: "text-xs text-black" }, item.label), isSelected && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: CheckmarkCircle02Icon3, size: 16, className: "text-[#d97757] shrink-0" })),
|
|
7625
7678
|
/* @__PURE__ */ React62.createElement("p", { className: "text-[11px] text-stone-500 mt-1 leading-relaxed whitespace-normal wrap-break-word" }, item.desc)
|
|
7626
7679
|
);
|
|
7627
7680
|
})))), showCompaniesModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowCompaniesModal(false) }), /* @__PURE__ */ React62.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__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Select Company"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowCompaniesModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Search01Icon10, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search companies...", value: localCompSearch, onChange: handleCompSearch, 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 outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isCompaniesLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Loading03Icon33, size: 28, className: "animate-spin text-black" })) : companies.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No companies available.") : companies.map((comp) => /* @__PURE__ */ React62.createElement("div", { key: comp.id, onClick: () => {
|
|
7628
7681
|
setSelectedCompanyId(comp.id);
|
|
7629
|
-
}, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, comp.name), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-stone-500 tracking-widest " }, "Applications: ", comp.applicationsCount || 0), comp.isPrivate && /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-[#d97757] tracking-widest " }, "Private"))), selectedCompanyId === comp.id && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon:
|
|
7682
|
+
}, className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-stone-50 transition-colors" }, /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1 pl-2" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, comp.name), /* @__PURE__ */ React62.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-stone-500 tracking-widest " }, "Applications: ", comp.applicationsCount || 0), comp.isPrivate && /* @__PURE__ */ React62.createElement("span", { className: "text-[10px] text-[#d97757] tracking-widest " }, "Private"))), selectedCompanyId === comp.id && /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: CheckmarkCircle02Icon3, size: 16, className: "text-[#d97757] mr-2" })))), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", companiesCurrentPage, " of ", companiesTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage <= 1 || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage - 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" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowLeft01Icon27, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: companiesCurrentPage >= companiesTotalPages || isCompaniesLoading, onClick: () => onCompaniesPageChange(companiesCurrentPage + 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" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowRight01Icon19, size: 12 })))))), showMembersModal && canManage && /* @__PURE__ */ React62.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React62.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__ */ React62.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React62.createElement("h3", { className: "text-sm text-black tracking-tight" }, "Assign Members"), /* @__PURE__ */ React62.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#d97757] outline-none text-sm" }, "Done")), /* @__PURE__ */ React62.createElement("div", { className: "p-4 shrink-0" }, /* @__PURE__ */ React62.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Search01Icon10, size: 16, className: "text-stone-400 absolute left-4 top-1/2 -translate-y-1/2 pointer-events-none" }), /* @__PURE__ */ React62.createElement("input", { type: "text", placeholder: "Search team...", value: localMemSearch, onChange: handleMemSearch, 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 outline-none focus:bg-stone-50 transition-colors" }))), /* @__PURE__ */ React62.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, isMembersLoading ? /* @__PURE__ */ React62.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: Loading03Icon33, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React62.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
7630
7683
|
const isChecked = selectedParticipants.has(member.userId);
|
|
7631
7684
|
return /* @__PURE__ */ React62.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__ */ React62.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement(MemberAvatar6, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React62.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React62.createElement("span", { className: "text-sm text-black truncate" }, member.fullName), /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 capitalize truncate" }, member.role.toLowerCase()))), /* @__PURE__ */ React62.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React62.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__ */ React62.createElement(HugeiconsIcon48, { icon: Tick02Icon5, size: 14, className: "text-white" }))));
|
|
7632
7685
|
})), /* @__PURE__ */ React62.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React62.createElement("span", { className: "text-xs text-stone-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages || 1), /* @__PURE__ */ React62.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React62.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" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowLeft01Icon27, size: 12 })), /* @__PURE__ */ React62.createElement("button", { disabled: membersCurrentPage >= membersTotalPages || 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" }, /* @__PURE__ */ React62.createElement(HugeiconsIcon48, { icon: ArrowRight01Icon19, size: 12 })))))));
|