@retinalabsllc/zairusjs 15.0.10 → 15.0.15

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 CHANGED
@@ -338,6 +338,7 @@ interface UniversalProfilePageProps {
338
338
  avatarSrc?: string;
339
339
  roleName: string;
340
340
  memberSince: string;
341
+ onAvatarTap?: () => void;
341
342
  onAccountTap?: () => void;
342
343
  onSecurityTap?: () => void;
343
344
  onDefiTap?: () => void;
@@ -345,7 +346,7 @@ interface UniversalProfilePageProps {
345
346
  onVerificationsTap?: () => void;
346
347
  onExportTap?: () => void;
347
348
  onLogoutTap?: () => void | Promise<void>;
348
- onDeleteTap?: () => void;
349
+ onDeleteTap?: () => void | Promise<void>;
349
350
  }
350
351
  declare const UniversalProfilePage: React.FC<UniversalProfilePageProps>;
351
352
 
package/dist/index.d.ts CHANGED
@@ -338,6 +338,7 @@ interface UniversalProfilePageProps {
338
338
  avatarSrc?: string;
339
339
  roleName: string;
340
340
  memberSince: string;
341
+ onAvatarTap?: () => void;
341
342
  onAccountTap?: () => void;
342
343
  onSecurityTap?: () => void;
343
344
  onDefiTap?: () => void;
@@ -345,7 +346,7 @@ interface UniversalProfilePageProps {
345
346
  onVerificationsTap?: () => void;
346
347
  onExportTap?: () => void;
347
348
  onLogoutTap?: () => void | Promise<void>;
348
- onDeleteTap?: () => void;
349
+ onDeleteTap?: () => void | Promise<void>;
349
350
  }
350
351
  declare const UniversalProfilePage: React.FC<UniversalProfilePageProps>;
351
352
 
package/dist/index.js CHANGED
@@ -2225,6 +2225,7 @@ var UniversalProfilePage = ({
2225
2225
  avatarSrc,
2226
2226
  roleName,
2227
2227
  memberSince,
2228
+ onAvatarTap,
2228
2229
  onAccountTap,
2229
2230
  onSecurityTap,
2230
2231
  onDefiTap,
@@ -2237,6 +2238,8 @@ var UniversalProfilePage = ({
2237
2238
  const [isAvatarLoaded, setIsAvatarLoaded] = (0, import_react33.useState)(false);
2238
2239
  const [showLogoutDialog, setShowLogoutDialog] = (0, import_react33.useState)(false);
2239
2240
  const [isLoggingOut, setIsLoggingOut] = (0, import_react33.useState)(false);
2241
+ const [showDeleteDialog, setShowDeleteDialog] = (0, import_react33.useState)(false);
2242
+ const [isDeleting, setIsDeleting] = (0, import_react33.useState)(false);
2240
2243
  const handleConfirmLogout = async () => {
2241
2244
  setIsLoggingOut(true);
2242
2245
  try {
@@ -2248,6 +2251,17 @@ var UniversalProfilePage = ({
2248
2251
  setShowLogoutDialog(false);
2249
2252
  }
2250
2253
  };
2254
+ const handleConfirmDelete = async () => {
2255
+ setIsDeleting(true);
2256
+ try {
2257
+ if (onDeleteTap) {
2258
+ await onDeleteTap();
2259
+ }
2260
+ } finally {
2261
+ setIsDeleting(false);
2262
+ setShowDeleteDialog(false);
2263
+ }
2264
+ };
2251
2265
  const getBadgeColorClass = (role) => {
2252
2266
  if (!role) return "text-neutral-400";
2253
2267
  const r = role.toLowerCase();
@@ -2256,15 +2270,22 @@ var UniversalProfilePage = ({
2256
2270
  if (r.includes("platinum")) return "text-yellow-400";
2257
2271
  return "text-neutral-400";
2258
2272
  };
2259
- return /* @__PURE__ */ import_react33.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react33.default.createElement("div", { className: "pt-8 pb-4 flex flex-col items-center" }, /* @__PURE__ */ import_react33.default.createElement("div", { className: "w-22 h-22 rounded-full bg-white p-1 mb-4 flex items-center justify-center" }, /* @__PURE__ */ import_react33.default.createElement("div", { className: "relative w-full h-full rounded-full overflow-hidden bg-neutral-100 flex items-center justify-center" }, avatarSrc ? /* @__PURE__ */ import_react33.default.createElement(import_react33.default.Fragment, null, !isAvatarLoaded && /* @__PURE__ */ import_react33.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-100" }, /* @__PURE__ */ import_react33.default.createElement(import_react34.HugeiconsIcon, { icon: import_core_free_icons12.Loading03Icon, size: 24, className: "animate-spin text-black" })), /* @__PURE__ */ import_react33.default.createElement(
2260
- "img",
2273
+ return /* @__PURE__ */ import_react33.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react33.default.createElement("div", { className: "pt-8 pb-4 flex flex-col items-center" }, /* @__PURE__ */ import_react33.default.createElement(
2274
+ "div",
2261
2275
  {
2262
- src: avatarSrc,
2263
- alt: "User Avatar",
2264
- onLoad: () => setIsAvatarLoaded(true),
2265
- className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
2266
- }
2267
- )) : /* @__PURE__ */ import_react33.default.createElement(import_react34.HugeiconsIcon, { icon: import_core_free_icons12.UserIcon, size: 40, className: "text-neutral-300" }))), /* @__PURE__ */ import_react33.default.createElement("div", { className: "bg-white rounded-full px-4 py-2 flex items-center justify-center gap-2 mb-3" }, /* @__PURE__ */ import_react33.default.createElement("span", { className: "text-[12px] text-black" }, roleName), /* @__PURE__ */ import_react33.default.createElement("span", { className: getBadgeColorClass(roleName), "aria-hidden": true }, /* @__PURE__ */ import_react33.default.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react33.default.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }), /* @__PURE__ */ import_react33.default.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ import_react33.default.createElement("g", { id: "SVGRepo_iconCarrier" }, " ", /* @__PURE__ */ import_react33.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5924 3.20027C9.34888 3.4078 9.22711 3.51158 9.09706 3.59874C8.79896 3.79854 8.46417 3.93721 8.1121 4.00672C7.95851 4.03705 7.79903 4.04977 7.48008 4.07522C6.6787 4.13918 6.278 4.17115 5.94371 4.28923C5.17051 4.56233 4.56233 5.17051 4.28923 5.94371C4.17115 6.278 4.13918 6.6787 4.07522 7.48008C4.04977 7.79903 4.03705 7.95851 4.00672 8.1121C3.93721 8.46417 3.79854 8.79896 3.59874 9.09706C3.51158 9.22711 3.40781 9.34887 3.20027 9.5924C2.67883 10.2043 2.4181 10.5102 2.26522 10.8301C1.91159 11.57 1.91159 12.43 2.26522 13.1699C2.41811 13.4898 2.67883 13.7957 3.20027 14.4076C3.40778 14.6511 3.51158 14.7729 3.59874 14.9029C3.79854 15.201 3.93721 15.5358 4.00672 15.8879C4.03705 16.0415 4.04977 16.201 4.07522 16.5199C4.13918 17.3213 4.17115 17.722 4.28923 18.0563C4.56233 18.8295 5.17051 19.4377 5.94371 19.7108C6.278 19.8288 6.6787 19.8608 7.48008 19.9248C7.79903 19.9502 7.95851 19.963 8.1121 19.9933C8.46417 20.0628 8.79896 20.2015 9.09706 20.4013C9.22711 20.4884 9.34887 20.5922 9.5924 20.7997C10.2043 21.3212 10.5102 21.5819 10.8301 21.7348C11.57 22.0884 12.43 22.0884 13.1699 21.7348C13.4898 21.5819 13.7957 21.3212 14.4076 20.7997C14.6511 20.5922 14.7729 20.4884 14.9029 20.4013C15.201 20.2015 15.5358 20.0628 15.8879 19.9933C16.0415 19.963 16.201 19.9502 16.5199 19.9248C17.3213 19.8608 17.722 19.8288 18.0563 19.7108C18.8295 19.4377 19.4377 18.8295 19.7108 18.0563C19.8288 17.722 19.8608 17.3213 19.9248 16.5199C19.9502 16.201 19.963 16.0415 19.9933 15.8879C20.0628 15.5358 20.2015 15.201 20.4013 14.9029C20.4884 14.7729 20.5922 14.6511 20.7997 14.4076C21.3212 13.7957 21.5819 13.4898 21.7348 13.1699C22.0884 12.43 22.0884 11.57 21.7348 10.8301C21.5819 10.5102 21.3212 10.2043 20.7997 9.5924C20.5922 9.34887 20.4884 9.22711 20.4013 9.09706C20.2015 8.79896 20.0628 8.46417 19.9933 8.1121C19.963 7.95851 19.9502 7.79903 19.9248 7.48008C19.8608 6.6787 19.8288 6.278 19.7108 5.94371C19.4377 5.17051 18.8295 4.56233 18.0563 4.28923C17.722 4.17115 17.3213 4.13918 16.5199 4.07522C16.201 4.04977 16.0415 4.03705 15.8879 4.00672C15.5358 3.93721 15.201 3.79854 14.9029 3.59874C14.7729 3.51158 14.6511 3.40781 14.4076 3.20027C13.7957 2.67883 13.4898 2.41811 13.1699 2.26522C12.43 1.91159 11.57 1.91159 10.8301 2.26522C10.5102 2.4181 10.2043 2.67883 9.5924 3.20027ZM16.3735 9.86314C16.6913 9.5453 16.6913 9.03 16.3735 8.71216C16.0557 8.39433 15.5403 8.39433 15.2225 8.71216L10.3723 13.5624L8.77746 11.9676C8.45963 11.6498 7.94432 11.6498 7.62649 11.9676C7.30866 12.2854 7.30866 12.8007 7.62649 13.1186L9.79678 15.2889C10.1146 15.6067 10.6299 15.6067 10.9478 15.2889L16.3735 9.86314Z", fill: "currentColor" }), " ")))), /* @__PURE__ */ import_react33.default.createElement("span", { className: "text-[12px] text-neutral-500" }, memberSince)), /* @__PURE__ */ import_react33.default.createElement("div", { className: "w-full flex flex-col gap-4 mt-2" }, /* @__PURE__ */ import_react33.default.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ import_react33.default.createElement(
2276
+ onClick: onAvatarTap,
2277
+ className: `w-22 h-22 rounded-full bg-white p-1 mb-4 flex items-center justify-center ${onAvatarTap ? "cursor-pointer group" : ""}`
2278
+ },
2279
+ /* @__PURE__ */ import_react33.default.createElement("div", { className: "relative w-full h-full rounded-full overflow-hidden bg-neutral-100 flex items-center justify-center" }, avatarSrc ? /* @__PURE__ */ import_react33.default.createElement(import_react33.default.Fragment, null, !isAvatarLoaded && /* @__PURE__ */ import_react33.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-100" }, /* @__PURE__ */ import_react33.default.createElement(import_react34.HugeiconsIcon, { icon: import_core_free_icons12.Loading03Icon, size: 24, className: "animate-spin text-black" })), /* @__PURE__ */ import_react33.default.createElement(
2280
+ "img",
2281
+ {
2282
+ src: avatarSrc,
2283
+ alt: "User Avatar",
2284
+ onLoad: () => setIsAvatarLoaded(true),
2285
+ className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
2286
+ }
2287
+ )) : /* @__PURE__ */ import_react33.default.createElement(import_react34.HugeiconsIcon, { icon: import_core_free_icons12.UserIcon, size: 40, className: "text-neutral-300" }), onAvatarTap && /* @__PURE__ */ import_react33.default.createElement("div", { className: "absolute inset-0 bg-black/30 backdrop-blur-[1px] flex items-center justify-center opacity-80 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity duration-200 z-20" }, /* @__PURE__ */ import_react33.default.createElement(import_react34.HugeiconsIcon, { icon: import_core_free_icons12.Camera01Icon, size: 24, className: "text-white" })))
2288
+ ), /* @__PURE__ */ import_react33.default.createElement("div", { className: "bg-white rounded-full px-4 py-2 flex items-center justify-center gap-2 mb-3" }, /* @__PURE__ */ import_react33.default.createElement("span", { className: "text-[12px] text-black" }, roleName), /* @__PURE__ */ import_react33.default.createElement("span", { className: getBadgeColorClass(roleName), "aria-hidden": true }, /* @__PURE__ */ import_react33.default.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react33.default.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }), /* @__PURE__ */ import_react33.default.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ import_react33.default.createElement("g", { id: "SVGRepo_iconCarrier" }, " ", /* @__PURE__ */ import_react33.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5924 3.20027C9.34888 3.4078 9.22711 3.51158 9.09706 3.59874C8.79896 3.79854 8.46417 3.93721 8.1121 4.00672C7.95851 4.03705 7.79903 4.04977 7.48008 4.07522C6.6787 4.13918 6.278 4.17115 5.94371 4.28923C5.17051 4.56233 4.56233 5.17051 4.28923 5.94371C4.17115 6.278 4.13918 6.6787 4.07522 7.48008C4.04977 7.79903 4.03705 7.95851 4.00672 8.1121C3.93721 8.46417 3.79854 8.79896 3.59874 9.09706C3.51158 9.22711 3.40781 9.34887 3.20027 9.5924C2.67883 10.2043 2.4181 10.5102 2.26522 10.8301C1.91159 11.57 1.91159 12.43 2.26522 13.1699C2.41811 13.4898 2.67883 13.7957 3.20027 14.4076C3.40778 14.6511 3.51158 14.7729 3.59874 14.9029C3.79854 15.201 3.93721 15.5358 4.00672 15.8879C4.03705 16.0415 4.04977 16.201 4.07522 16.5199C4.13918 17.3213 4.17115 17.722 4.28923 18.0563C4.56233 18.8295 5.17051 19.4377 5.94371 19.7108C6.278 19.8288 6.6787 19.8608 7.48008 19.9248C7.79903 19.9502 7.95851 19.963 8.1121 19.9933C8.46417 20.0628 8.79896 20.2015 9.09706 20.4013C9.22711 20.4884 9.34887 20.5922 9.5924 20.7997C10.2043 21.3212 10.5102 21.5819 10.8301 21.7348C11.57 22.0884 12.43 22.0884 13.1699 21.7348C13.4898 21.5819 13.7957 21.3212 14.4076 20.7997C14.6511 20.5922 14.7729 20.4884 14.9029 20.4013C15.201 20.2015 15.5358 20.0628 15.8879 19.9933C16.0415 19.963 16.201 19.9502 16.5199 19.9248C17.3213 19.8608 17.722 19.8288 18.0563 19.7108C18.8295 19.4377 19.4377 18.8295 19.7108 18.0563C19.8288 17.722 19.8608 17.3213 19.9248 16.5199C19.9502 16.201 19.963 16.0415 19.9933 15.8879C20.0628 15.5358 20.2015 15.201 20.4013 14.9029C20.4884 14.7729 20.5922 14.6511 20.7997 14.4076C21.3212 13.7957 21.5819 13.4898 21.7348 13.1699C22.0884 12.43 22.0884 11.57 21.7348 10.8301C21.5819 10.5102 21.3212 10.2043 20.7997 9.5924C20.5922 9.34887 20.4884 9.22711 20.4013 9.09706C20.2015 8.79896 20.0628 8.46417 19.9933 8.1121C19.963 7.95851 19.9502 7.79903 19.9248 7.48008C19.8608 6.6787 19.8288 6.278 19.7108 5.94371C19.4377 5.17051 18.8295 4.56233 18.0563 4.28923C17.722 4.17115 17.3213 4.13918 16.5199 4.07522C16.201 4.04977 16.0415 4.03705 15.8879 4.00672C15.5358 3.93721 15.201 3.79854 14.9029 3.59874C14.7729 3.51158 14.6511 3.40781 14.4076 3.20027C13.7957 2.67883 13.4898 2.41811 13.1699 2.26522C12.43 1.91159 11.57 1.91159 10.8301 2.26522C10.5102 2.4181 10.2043 2.67883 9.5924 3.20027ZM16.3735 9.86314C16.6913 9.5453 16.6913 9.03 16.3735 8.71216C16.0557 8.39433 15.5403 8.39433 15.2225 8.71216L10.3723 13.5624L8.77746 11.9676C8.45963 11.6498 7.94432 11.6498 7.62649 11.9676C7.30866 12.2854 7.30866 12.8007 7.62649 13.1186L9.79678 15.2889C10.1146 15.6067 10.6299 15.6067 10.9478 15.2889L16.3735 9.86314Z", fill: "currentColor" }), " ")))), /* @__PURE__ */ import_react33.default.createElement("span", { className: "text-[12px] text-neutral-500" }, memberSince)), /* @__PURE__ */ import_react33.default.createElement("div", { className: "w-full flex flex-col gap-4 mt-2" }, /* @__PURE__ */ import_react33.default.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ import_react33.default.createElement(
2268
2289
  MenuRow2,
2269
2290
  {
2270
2291
  icon: import_core_free_icons12.UserIcon,
@@ -2328,7 +2349,7 @@ var UniversalProfilePage = ({
2328
2349
  icon: import_core_free_icons12.UserRemove01Icon,
2329
2350
  title: "Delete Account",
2330
2351
  subtitle: "Remove account",
2331
- onClick: onDeleteTap,
2352
+ onClick: () => setShowDeleteDialog(true),
2332
2353
  isLast: true
2333
2354
  }
2334
2355
  ))), /* @__PURE__ */ import_react33.default.createElement(
@@ -2343,6 +2364,18 @@ var UniversalProfilePage = ({
2343
2364
  onClose: () => setShowLogoutDialog(false),
2344
2365
  onConfirm: handleConfirmLogout
2345
2366
  }
2367
+ ), /* @__PURE__ */ import_react33.default.createElement(
2368
+ ConfirmationDialog,
2369
+ {
2370
+ isOpen: showDeleteDialog,
2371
+ title: "Delete Account",
2372
+ message: "Are you sure you want to delete your account? This action is permanent and cannot be undone.",
2373
+ confirmText: "Delete Account",
2374
+ isDestructive: true,
2375
+ isProcessing: isDeleting,
2376
+ onClose: () => setShowDeleteDialog(false),
2377
+ onConfirm: handleConfirmDelete
2378
+ }
2346
2379
  ));
2347
2380
  };
2348
2381
  var MenuRow2 = ({ icon, title, subtitle, onClick, iconColor = "text-black", titleColor = "text-black", isLast = false }) => /* @__PURE__ */ import_react33.default.createElement(
@@ -2352,7 +2385,7 @@ var MenuRow2 = ({ icon, title, subtitle, onClick, iconColor = "text-black", titl
2352
2385
  className: `flex items-center p-4 cursor-pointer hover:bg-neutral-50 transition-colors ${!isLast ? "" : ""}`
2353
2386
  },
2354
2387
  /* @__PURE__ */ import_react33.default.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ import_react33.default.createElement(import_react34.HugeiconsIcon, { icon, size: 16, className: iconColor })),
2355
- /* @__PURE__ */ import_react33.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react33.default.createElement("p", { className: `text-[13px] truncate ${titleColor}` }, title), /* @__PURE__ */ import_react33.default.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)),
2388
+ /* @__PURE__ */ import_react33.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react33.default.createElement("p", { className: `text-[13px] truncate ${titleColor}` }, title), /* @__PURE__ */ import_react33.default.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)),
2356
2389
  /* @__PURE__ */ import_react33.default.createElement(import_react34.HugeiconsIcon, { icon: import_core_free_icons12.ArrowRight01Icon, size: 18, className: "text-neutral-400 shrink-0 ml-2" })
2357
2390
  );
2358
2391
 
@@ -4085,7 +4118,7 @@ var UniversalReferralPage = ({
4085
4118
  };
4086
4119
  const AvatarLogo2 = ({ src, alt, name, sizeClass = "w-10 h-10" }) => {
4087
4120
  const [isLoaded, setIsLoaded] = (0, import_react69.useState)(false);
4088
- const fallbackUrl = `/api/avatar/?name=${encodeURIComponent(name || " ")}&background=ffffff&color=000000&size=200&font-size=0.33`;
4121
+ const fallbackUrl = `/api/avatar/?name=${encodeURIComponent(name || " ")}&background=e0e0e0&color=000000&size=200&font-size=0.33`;
4089
4122
  const finalSrc = src || fallbackUrl;
4090
4123
  return /* @__PURE__ */ import_react69.default.createElement("div", { className: `relative shrink-0 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden border-2 border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ import_react69.default.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
4091
4124
  };
package/dist/index.mjs CHANGED
@@ -2203,12 +2203,14 @@ import {
2203
2203
  LogoutCircle02Icon,
2204
2204
  UserRemove01Icon,
2205
2205
  ArrowRight01Icon as ArrowRight01Icon4,
2206
- Loading03Icon as Loading03Icon9
2206
+ Loading03Icon as Loading03Icon9,
2207
+ Camera01Icon
2207
2208
  } from "@hugeicons/core-free-icons";
2208
2209
  var UniversalProfilePage = ({
2209
2210
  avatarSrc,
2210
2211
  roleName,
2211
2212
  memberSince,
2213
+ onAvatarTap,
2212
2214
  onAccountTap,
2213
2215
  onSecurityTap,
2214
2216
  onDefiTap,
@@ -2221,6 +2223,8 @@ var UniversalProfilePage = ({
2221
2223
  const [isAvatarLoaded, setIsAvatarLoaded] = useState12(false);
2222
2224
  const [showLogoutDialog, setShowLogoutDialog] = useState12(false);
2223
2225
  const [isLoggingOut, setIsLoggingOut] = useState12(false);
2226
+ const [showDeleteDialog, setShowDeleteDialog] = useState12(false);
2227
+ const [isDeleting, setIsDeleting] = useState12(false);
2224
2228
  const handleConfirmLogout = async () => {
2225
2229
  setIsLoggingOut(true);
2226
2230
  try {
@@ -2232,6 +2236,17 @@ var UniversalProfilePage = ({
2232
2236
  setShowLogoutDialog(false);
2233
2237
  }
2234
2238
  };
2239
+ const handleConfirmDelete = async () => {
2240
+ setIsDeleting(true);
2241
+ try {
2242
+ if (onDeleteTap) {
2243
+ await onDeleteTap();
2244
+ }
2245
+ } finally {
2246
+ setIsDeleting(false);
2247
+ setShowDeleteDialog(false);
2248
+ }
2249
+ };
2235
2250
  const getBadgeColorClass = (role) => {
2236
2251
  if (!role) return "text-neutral-400";
2237
2252
  const r = role.toLowerCase();
@@ -2240,15 +2255,22 @@ var UniversalProfilePage = ({
2240
2255
  if (r.includes("platinum")) return "text-yellow-400";
2241
2256
  return "text-neutral-400";
2242
2257
  };
2243
- return /* @__PURE__ */ React20.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React20.createElement("div", { className: "pt-8 pb-4 flex flex-col items-center" }, /* @__PURE__ */ React20.createElement("div", { className: "w-22 h-22 rounded-full bg-white p-1 mb-4 flex items-center justify-center" }, /* @__PURE__ */ React20.createElement("div", { className: "relative w-full h-full rounded-full overflow-hidden bg-neutral-100 flex items-center justify-center" }, avatarSrc ? /* @__PURE__ */ React20.createElement(React20.Fragment, null, !isAvatarLoaded && /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-100" }, /* @__PURE__ */ React20.createElement(HugeiconsIcon14, { icon: Loading03Icon9, size: 24, className: "animate-spin text-black" })), /* @__PURE__ */ React20.createElement(
2244
- "img",
2258
+ return /* @__PURE__ */ React20.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React20.createElement("div", { className: "pt-8 pb-4 flex flex-col items-center" }, /* @__PURE__ */ React20.createElement(
2259
+ "div",
2245
2260
  {
2246
- src: avatarSrc,
2247
- alt: "User Avatar",
2248
- onLoad: () => setIsAvatarLoaded(true),
2249
- className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
2250
- }
2251
- )) : /* @__PURE__ */ React20.createElement(HugeiconsIcon14, { icon: UserIcon, size: 40, className: "text-neutral-300" }))), /* @__PURE__ */ React20.createElement("div", { className: "bg-white rounded-full px-4 py-2 flex items-center justify-center gap-2 mb-3" }, /* @__PURE__ */ React20.createElement("span", { className: "text-[12px] text-black" }, roleName), /* @__PURE__ */ React20.createElement("span", { className: getBadgeColorClass(roleName), "aria-hidden": true }, /* @__PURE__ */ React20.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React20.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }), /* @__PURE__ */ React20.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ React20.createElement("g", { id: "SVGRepo_iconCarrier" }, " ", /* @__PURE__ */ React20.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5924 3.20027C9.34888 3.4078 9.22711 3.51158 9.09706 3.59874C8.79896 3.79854 8.46417 3.93721 8.1121 4.00672C7.95851 4.03705 7.79903 4.04977 7.48008 4.07522C6.6787 4.13918 6.278 4.17115 5.94371 4.28923C5.17051 4.56233 4.56233 5.17051 4.28923 5.94371C4.17115 6.278 4.13918 6.6787 4.07522 7.48008C4.04977 7.79903 4.03705 7.95851 4.00672 8.1121C3.93721 8.46417 3.79854 8.79896 3.59874 9.09706C3.51158 9.22711 3.40781 9.34887 3.20027 9.5924C2.67883 10.2043 2.4181 10.5102 2.26522 10.8301C1.91159 11.57 1.91159 12.43 2.26522 13.1699C2.41811 13.4898 2.67883 13.7957 3.20027 14.4076C3.40778 14.6511 3.51158 14.7729 3.59874 14.9029C3.79854 15.201 3.93721 15.5358 4.00672 15.8879C4.03705 16.0415 4.04977 16.201 4.07522 16.5199C4.13918 17.3213 4.17115 17.722 4.28923 18.0563C4.56233 18.8295 5.17051 19.4377 5.94371 19.7108C6.278 19.8288 6.6787 19.8608 7.48008 19.9248C7.79903 19.9502 7.95851 19.963 8.1121 19.9933C8.46417 20.0628 8.79896 20.2015 9.09706 20.4013C9.22711 20.4884 9.34887 20.5922 9.5924 20.7997C10.2043 21.3212 10.5102 21.5819 10.8301 21.7348C11.57 22.0884 12.43 22.0884 13.1699 21.7348C13.4898 21.5819 13.7957 21.3212 14.4076 20.7997C14.6511 20.5922 14.7729 20.4884 14.9029 20.4013C15.201 20.2015 15.5358 20.0628 15.8879 19.9933C16.0415 19.963 16.201 19.9502 16.5199 19.9248C17.3213 19.8608 17.722 19.8288 18.0563 19.7108C18.8295 19.4377 19.4377 18.8295 19.7108 18.0563C19.8288 17.722 19.8608 17.3213 19.9248 16.5199C19.9502 16.201 19.963 16.0415 19.9933 15.8879C20.0628 15.5358 20.2015 15.201 20.4013 14.9029C20.4884 14.7729 20.5922 14.6511 20.7997 14.4076C21.3212 13.7957 21.5819 13.4898 21.7348 13.1699C22.0884 12.43 22.0884 11.57 21.7348 10.8301C21.5819 10.5102 21.3212 10.2043 20.7997 9.5924C20.5922 9.34887 20.4884 9.22711 20.4013 9.09706C20.2015 8.79896 20.0628 8.46417 19.9933 8.1121C19.963 7.95851 19.9502 7.79903 19.9248 7.48008C19.8608 6.6787 19.8288 6.278 19.7108 5.94371C19.4377 5.17051 18.8295 4.56233 18.0563 4.28923C17.722 4.17115 17.3213 4.13918 16.5199 4.07522C16.201 4.04977 16.0415 4.03705 15.8879 4.00672C15.5358 3.93721 15.201 3.79854 14.9029 3.59874C14.7729 3.51158 14.6511 3.40781 14.4076 3.20027C13.7957 2.67883 13.4898 2.41811 13.1699 2.26522C12.43 1.91159 11.57 1.91159 10.8301 2.26522C10.5102 2.4181 10.2043 2.67883 9.5924 3.20027ZM16.3735 9.86314C16.6913 9.5453 16.6913 9.03 16.3735 8.71216C16.0557 8.39433 15.5403 8.39433 15.2225 8.71216L10.3723 13.5624L8.77746 11.9676C8.45963 11.6498 7.94432 11.6498 7.62649 11.9676C7.30866 12.2854 7.30866 12.8007 7.62649 13.1186L9.79678 15.2889C10.1146 15.6067 10.6299 15.6067 10.9478 15.2889L16.3735 9.86314Z", fill: "currentColor" }), " ")))), /* @__PURE__ */ React20.createElement("span", { className: "text-[12px] text-neutral-500" }, memberSince)), /* @__PURE__ */ React20.createElement("div", { className: "w-full flex flex-col gap-4 mt-2" }, /* @__PURE__ */ React20.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ React20.createElement(
2261
+ onClick: onAvatarTap,
2262
+ className: `w-22 h-22 rounded-full bg-white p-1 mb-4 flex items-center justify-center ${onAvatarTap ? "cursor-pointer group" : ""}`
2263
+ },
2264
+ /* @__PURE__ */ React20.createElement("div", { className: "relative w-full h-full rounded-full overflow-hidden bg-neutral-100 flex items-center justify-center" }, avatarSrc ? /* @__PURE__ */ React20.createElement(React20.Fragment, null, !isAvatarLoaded && /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-100" }, /* @__PURE__ */ React20.createElement(HugeiconsIcon14, { icon: Loading03Icon9, size: 24, className: "animate-spin text-black" })), /* @__PURE__ */ React20.createElement(
2265
+ "img",
2266
+ {
2267
+ src: avatarSrc,
2268
+ alt: "User Avatar",
2269
+ onLoad: () => setIsAvatarLoaded(true),
2270
+ className: `w-full h-full object-cover transition-opacity duration-300 ${isAvatarLoaded ? "opacity-100" : "opacity-0"}`
2271
+ }
2272
+ )) : /* @__PURE__ */ React20.createElement(HugeiconsIcon14, { icon: UserIcon, size: 40, className: "text-neutral-300" }), onAvatarTap && /* @__PURE__ */ React20.createElement("div", { className: "absolute inset-0 bg-black/30 backdrop-blur-[1px] flex items-center justify-center opacity-80 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity duration-200 z-20" }, /* @__PURE__ */ React20.createElement(HugeiconsIcon14, { icon: Camera01Icon, size: 24, className: "text-white" })))
2273
+ ), /* @__PURE__ */ React20.createElement("div", { className: "bg-white rounded-full px-4 py-2 flex items-center justify-center gap-2 mb-3" }, /* @__PURE__ */ React20.createElement("span", { className: "text-[12px] text-black" }, roleName), /* @__PURE__ */ React20.createElement("span", { className: getBadgeColorClass(roleName), "aria-hidden": true }, /* @__PURE__ */ React20.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React20.createElement("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }), /* @__PURE__ */ React20.createElement("g", { id: "SVGRepo_tracerCarrier", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ React20.createElement("g", { id: "SVGRepo_iconCarrier" }, " ", /* @__PURE__ */ React20.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5924 3.20027C9.34888 3.4078 9.22711 3.51158 9.09706 3.59874C8.79896 3.79854 8.46417 3.93721 8.1121 4.00672C7.95851 4.03705 7.79903 4.04977 7.48008 4.07522C6.6787 4.13918 6.278 4.17115 5.94371 4.28923C5.17051 4.56233 4.56233 5.17051 4.28923 5.94371C4.17115 6.278 4.13918 6.6787 4.07522 7.48008C4.04977 7.79903 4.03705 7.95851 4.00672 8.1121C3.93721 8.46417 3.79854 8.79896 3.59874 9.09706C3.51158 9.22711 3.40781 9.34887 3.20027 9.5924C2.67883 10.2043 2.4181 10.5102 2.26522 10.8301C1.91159 11.57 1.91159 12.43 2.26522 13.1699C2.41811 13.4898 2.67883 13.7957 3.20027 14.4076C3.40778 14.6511 3.51158 14.7729 3.59874 14.9029C3.79854 15.201 3.93721 15.5358 4.00672 15.8879C4.03705 16.0415 4.04977 16.201 4.07522 16.5199C4.13918 17.3213 4.17115 17.722 4.28923 18.0563C4.56233 18.8295 5.17051 19.4377 5.94371 19.7108C6.278 19.8288 6.6787 19.8608 7.48008 19.9248C7.79903 19.9502 7.95851 19.963 8.1121 19.9933C8.46417 20.0628 8.79896 20.2015 9.09706 20.4013C9.22711 20.4884 9.34887 20.5922 9.5924 20.7997C10.2043 21.3212 10.5102 21.5819 10.8301 21.7348C11.57 22.0884 12.43 22.0884 13.1699 21.7348C13.4898 21.5819 13.7957 21.3212 14.4076 20.7997C14.6511 20.5922 14.7729 20.4884 14.9029 20.4013C15.201 20.2015 15.5358 20.0628 15.8879 19.9933C16.0415 19.963 16.201 19.9502 16.5199 19.9248C17.3213 19.8608 17.722 19.8288 18.0563 19.7108C18.8295 19.4377 19.4377 18.8295 19.7108 18.0563C19.8288 17.722 19.8608 17.3213 19.9248 16.5199C19.9502 16.201 19.963 16.0415 19.9933 15.8879C20.0628 15.5358 20.2015 15.201 20.4013 14.9029C20.4884 14.7729 20.5922 14.6511 20.7997 14.4076C21.3212 13.7957 21.5819 13.4898 21.7348 13.1699C22.0884 12.43 22.0884 11.57 21.7348 10.8301C21.5819 10.5102 21.3212 10.2043 20.7997 9.5924C20.5922 9.34887 20.4884 9.22711 20.4013 9.09706C20.2015 8.79896 20.0628 8.46417 19.9933 8.1121C19.963 7.95851 19.9502 7.79903 19.9248 7.48008C19.8608 6.6787 19.8288 6.278 19.7108 5.94371C19.4377 5.17051 18.8295 4.56233 18.0563 4.28923C17.722 4.17115 17.3213 4.13918 16.5199 4.07522C16.201 4.04977 16.0415 4.03705 15.8879 4.00672C15.5358 3.93721 15.201 3.79854 14.9029 3.59874C14.7729 3.51158 14.6511 3.40781 14.4076 3.20027C13.7957 2.67883 13.4898 2.41811 13.1699 2.26522C12.43 1.91159 11.57 1.91159 10.8301 2.26522C10.5102 2.4181 10.2043 2.67883 9.5924 3.20027ZM16.3735 9.86314C16.6913 9.5453 16.6913 9.03 16.3735 8.71216C16.0557 8.39433 15.5403 8.39433 15.2225 8.71216L10.3723 13.5624L8.77746 11.9676C8.45963 11.6498 7.94432 11.6498 7.62649 11.9676C7.30866 12.2854 7.30866 12.8007 7.62649 13.1186L9.79678 15.2889C10.1146 15.6067 10.6299 15.6067 10.9478 15.2889L16.3735 9.86314Z", fill: "currentColor" }), " ")))), /* @__PURE__ */ React20.createElement("span", { className: "text-[12px] text-neutral-500" }, memberSince)), /* @__PURE__ */ React20.createElement("div", { className: "w-full flex flex-col gap-4 mt-2" }, /* @__PURE__ */ React20.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ React20.createElement(
2252
2274
  MenuRow2,
2253
2275
  {
2254
2276
  icon: UserIcon,
@@ -2312,7 +2334,7 @@ var UniversalProfilePage = ({
2312
2334
  icon: UserRemove01Icon,
2313
2335
  title: "Delete Account",
2314
2336
  subtitle: "Remove account",
2315
- onClick: onDeleteTap,
2337
+ onClick: () => setShowDeleteDialog(true),
2316
2338
  isLast: true
2317
2339
  }
2318
2340
  ))), /* @__PURE__ */ React20.createElement(
@@ -2327,6 +2349,18 @@ var UniversalProfilePage = ({
2327
2349
  onClose: () => setShowLogoutDialog(false),
2328
2350
  onConfirm: handleConfirmLogout
2329
2351
  }
2352
+ ), /* @__PURE__ */ React20.createElement(
2353
+ ConfirmationDialog,
2354
+ {
2355
+ isOpen: showDeleteDialog,
2356
+ title: "Delete Account",
2357
+ message: "Are you sure you want to delete your account? This action is permanent and cannot be undone.",
2358
+ confirmText: "Delete Account",
2359
+ isDestructive: true,
2360
+ isProcessing: isDeleting,
2361
+ onClose: () => setShowDeleteDialog(false),
2362
+ onConfirm: handleConfirmDelete
2363
+ }
2330
2364
  ));
2331
2365
  };
2332
2366
  var MenuRow2 = ({ icon, title, subtitle, onClick, iconColor = "text-black", titleColor = "text-black", isLast = false }) => /* @__PURE__ */ React20.createElement(
@@ -2336,7 +2370,7 @@ var MenuRow2 = ({ icon, title, subtitle, onClick, iconColor = "text-black", titl
2336
2370
  className: `flex items-center p-4 cursor-pointer hover:bg-neutral-50 transition-colors ${!isLast ? "" : ""}`
2337
2371
  },
2338
2372
  /* @__PURE__ */ React20.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ React20.createElement(HugeiconsIcon14, { icon, size: 16, className: iconColor })),
2339
- /* @__PURE__ */ React20.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React20.createElement("p", { className: `text-[13px] truncate ${titleColor}` }, title), /* @__PURE__ */ React20.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)),
2373
+ /* @__PURE__ */ React20.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React20.createElement("p", { className: `text-[13px] truncate ${titleColor}` }, title), /* @__PURE__ */ React20.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)),
2340
2374
  /* @__PURE__ */ React20.createElement(HugeiconsIcon14, { icon: ArrowRight01Icon4, size: 18, className: "text-neutral-400 shrink-0 ml-2" })
2341
2375
  );
2342
2376
 
@@ -4097,7 +4131,7 @@ var UniversalReferralPage = ({
4097
4131
  };
4098
4132
  const AvatarLogo2 = ({ src, alt, name, sizeClass = "w-10 h-10" }) => {
4099
4133
  const [isLoaded, setIsLoaded] = useState27(false);
4100
- const fallbackUrl = `/api/avatar/?name=${encodeURIComponent(name || " ")}&background=ffffff&color=000000&size=200&font-size=0.33`;
4134
+ const fallbackUrl = `/api/avatar/?name=${encodeURIComponent(name || " ")}&background=e0e0e0&color=000000&size=200&font-size=0.33`;
4101
4135
  const finalSrc = src || fallbackUrl;
4102
4136
  return /* @__PURE__ */ React42.createElement("div", { className: `relative shrink-0 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden border-2 border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: Loading03Icon17, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ React42.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
4103
4137
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retinalabsllc/zairusjs",
3
- "version": "15.0.10",
3
+ "version": "15.0.15",
4
4
  "description": "A perceptive, Ai data driven Next.js UI component library.",
5
5
  "author": "Retina Labs Company",
6
6
  "license": "MIT",