@retinalabsllc/zairusjs 21.0.9 → 21.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -19
- package/dist/index.d.ts +1 -19
- package/dist/index.js +242 -120
- package/dist/index.mjs +207 -85
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3384,26 +3384,110 @@ var ManagedDocument = ({
|
|
|
3384
3384
|
};
|
|
3385
3385
|
|
|
3386
3386
|
// src/components/ManagedContactBlock.tsx
|
|
3387
|
-
import React32, { useState as useState24
|
|
3387
|
+
import React32, { useState as useState24 } from "react";
|
|
3388
3388
|
import { HugeiconsIcon as HugeiconsIcon24 } from "@hugeicons/react";
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3389
|
+
import { Loading03Icon as Loading03Icon14 } from "@hugeicons/core-free-icons";
|
|
3390
|
+
var TextInput2 = ({
|
|
3391
|
+
label,
|
|
3392
|
+
value,
|
|
3393
|
+
onChange,
|
|
3394
|
+
placeholder,
|
|
3395
|
+
maxLength,
|
|
3396
|
+
disabled,
|
|
3397
|
+
readOnly,
|
|
3398
|
+
type = "text",
|
|
3399
|
+
onClick
|
|
3400
|
+
}) => /* @__PURE__ */ React32.createElement("div", { className: "space-y-2 flex-1 w-full", onClick }, label && /* @__PURE__ */ React32.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, label), /* @__PURE__ */ React32.createElement(
|
|
3401
|
+
"input",
|
|
3402
|
+
{
|
|
3403
|
+
type,
|
|
3404
|
+
value,
|
|
3405
|
+
onChange: (e) => onChange(e.target.value.substring(0, maxLength || 100)),
|
|
3406
|
+
placeholder,
|
|
3407
|
+
disabled,
|
|
3408
|
+
readOnly,
|
|
3409
|
+
autoComplete: "off",
|
|
3410
|
+
spellCheck: "false",
|
|
3411
|
+
className: `w-full px-2 py-3 text-sm bg-transparent border-b border-stone-200 text-black transition-all outline-none focus:border-[#d97757] disabled:opacity-50 ${readOnly ? "cursor-pointer" : ""}`
|
|
3412
|
+
}
|
|
3413
|
+
));
|
|
3414
|
+
var TextAreaInput = ({
|
|
3415
|
+
label,
|
|
3416
|
+
value,
|
|
3417
|
+
onChange,
|
|
3418
|
+
placeholder,
|
|
3419
|
+
maxLength,
|
|
3420
|
+
disabled
|
|
3421
|
+
}) => /* @__PURE__ */ React32.createElement("div", { className: "space-y-2 w-full" }, label && /* @__PURE__ */ React32.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, label), /* @__PURE__ */ React32.createElement(
|
|
3422
|
+
"textarea",
|
|
3423
|
+
{
|
|
3424
|
+
value,
|
|
3425
|
+
onChange: (e) => onChange(e.target.value.substring(0, maxLength || 3e3)),
|
|
3426
|
+
placeholder,
|
|
3427
|
+
disabled,
|
|
3428
|
+
autoComplete: "off",
|
|
3429
|
+
spellCheck: "false",
|
|
3430
|
+
rows: 4,
|
|
3431
|
+
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 resize-none"
|
|
3396
3432
|
}
|
|
3397
|
-
|
|
3398
|
-
|
|
3433
|
+
));
|
|
3434
|
+
var ThreeDActionButton2 = ({
|
|
3435
|
+
type = "button",
|
|
3436
|
+
disabled = false,
|
|
3437
|
+
isLoading = false,
|
|
3438
|
+
children,
|
|
3439
|
+
className = ""
|
|
3440
|
+
}) => {
|
|
3441
|
+
const isInteractionDisabled = disabled || isLoading;
|
|
3442
|
+
return /* @__PURE__ */ React32.createElement(
|
|
3443
|
+
"button",
|
|
3444
|
+
{
|
|
3445
|
+
type,
|
|
3446
|
+
disabled: isInteractionDisabled,
|
|
3447
|
+
className: `
|
|
3448
|
+
relative inline-flex items-center justify-center py-2.5 px-8 rounded-full
|
|
3449
|
+
bg-[#d97757] text-white text-xs tracking-widest
|
|
3450
|
+
transition-colors duration-150 select-none group outline-none
|
|
3451
|
+
${isInteractionDisabled ? "opacity-50 cursor-not-allowed" : "hover:bg-[#d97757]"}
|
|
3452
|
+
${className}
|
|
3453
|
+
`
|
|
3454
|
+
},
|
|
3455
|
+
/* @__PURE__ */ React32.createElement("span", { className: "relative z-10 flex items-center justify-center gap-2 leading-none" }, isLoading ? /* @__PURE__ */ React32.createElement(HugeiconsIcon24, { icon: Loading03Icon14, size: 16, className: "animate-spin text-white" }) : children)
|
|
3456
|
+
);
|
|
3399
3457
|
};
|
|
3400
3458
|
var ManagedContactBlock = ({
|
|
3401
3459
|
tagline,
|
|
3402
3460
|
title,
|
|
3403
3461
|
company,
|
|
3404
|
-
emails,
|
|
3405
3462
|
socials
|
|
3406
3463
|
}) => {
|
|
3464
|
+
const [formData, setFormData] = useState24({ name: "", title: "", phone: "", message: "" });
|
|
3465
|
+
const [status, setStatus] = useState24("idle");
|
|
3466
|
+
const [responseMessage, setResponseMessage] = useState24("");
|
|
3467
|
+
const handleSubmit = async (e) => {
|
|
3468
|
+
e.preventDefault();
|
|
3469
|
+
setStatus("loading");
|
|
3470
|
+
setResponseMessage("");
|
|
3471
|
+
try {
|
|
3472
|
+
const res = await fetch("/api/contact", {
|
|
3473
|
+
method: "POST",
|
|
3474
|
+
headers: { "Content-Type": "application/json" },
|
|
3475
|
+
body: JSON.stringify(formData)
|
|
3476
|
+
});
|
|
3477
|
+
const data = await res.json();
|
|
3478
|
+
if (res.ok) {
|
|
3479
|
+
setStatus("success");
|
|
3480
|
+
setResponseMessage(data.message || "Message sent successfully!");
|
|
3481
|
+
setFormData({ name: "", title: "", phone: "", message: "" });
|
|
3482
|
+
} else {
|
|
3483
|
+
setStatus("error");
|
|
3484
|
+
setResponseMessage(data.error || "Failed to send message.");
|
|
3485
|
+
}
|
|
3486
|
+
} catch (error) {
|
|
3487
|
+
setStatus("error");
|
|
3488
|
+
setResponseMessage("An unexpected error occurred. Please try again.");
|
|
3489
|
+
}
|
|
3490
|
+
};
|
|
3407
3491
|
return /* @__PURE__ */ React32.createElement("div", { className: "grow pt-4 pb-20 px-4 md:px-8 w-full flex justify-center z-10 relative" }, /* @__PURE__ */ React32.createElement("div", { className: "relative bg-white rounded-2xl w-full max-w-7xl mx-auto overflow-hidden" }, /* @__PURE__ */ React32.createElement(
|
|
3408
3492
|
"div",
|
|
3409
3493
|
{
|
|
@@ -3413,28 +3497,21 @@ var ManagedContactBlock = ({
|
|
|
3413
3497
|
backgroundRepeat: "repeat"
|
|
3414
3498
|
}
|
|
3415
3499
|
}
|
|
3416
|
-
), /* @__PURE__ */ React32.createElement("div", { className: "relative z-10" }, /* @__PURE__ */ React32.createElement("div", { className: "relative px-8 md:px-12 py-10" }, tagline && /* @__PURE__ */ React32.createElement("span", { className: "text-xs tracking-[0.4em] text-stone-500 text-left block " }, tagline), /* @__PURE__ */ React32.createElement("h1", { className: "
|
|
3500
|
+
), /* @__PURE__ */ React32.createElement("div", { className: "relative z-10" }, /* @__PURE__ */ React32.createElement("div", { className: "relative px-8 md:px-12 py-10 pb-4" }, tagline && /* @__PURE__ */ React32.createElement("span", { className: "text-xs tracking-[0.4em] text-stone-500 text-left block " }, tagline), /* @__PURE__ */ React32.createElement("h1", { className: "text-3xl mt-4 text-black tracking-tight text-left" }, title)), /* @__PURE__ */ React32.createElement("div", { className: "relative px-8 md:px-12 py-8 pb-14" }, /* @__PURE__ */ React32.createElement("div", { className: "flex flex-col lg:flex-row gap-16 w-full" }, /* @__PURE__ */ React32.createElement("div", { className: "w-full lg:w-1/3 flex flex-col gap-12" }, company && (company.phone || company.phone2) && /* @__PURE__ */ React32.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React32.createElement("p", { className: "text-sm tracking-[0.2em] text-black mb-4" }, "Direct Lines"), /* @__PURE__ */ React32.createElement("div", { className: "space-y-3 text-sm text-stone-600 leading-[1.8]" }, company.phone && /* @__PURE__ */ React32.createElement("p", null, /* @__PURE__ */ React32.createElement(
|
|
3417
3501
|
"a",
|
|
3418
3502
|
{
|
|
3419
3503
|
href: `tel:${company.phone.replace(/\s+/g, "")}`,
|
|
3420
3504
|
className: "transition-colors hover:text-black"
|
|
3421
3505
|
},
|
|
3422
3506
|
company.phone
|
|
3423
|
-
)), company.phone2 && /* @__PURE__ */ React32.createElement("p",
|
|
3507
|
+
)), company.phone2 && /* @__PURE__ */ React32.createElement("p", null, /* @__PURE__ */ React32.createElement(
|
|
3424
3508
|
"a",
|
|
3425
3509
|
{
|
|
3426
3510
|
href: `tel:${company.phone2.replace(/\s+/g, "")}`,
|
|
3427
3511
|
className: "transition-colors hover:text-black"
|
|
3428
3512
|
},
|
|
3429
3513
|
company.phone2
|
|
3430
|
-
)))),
|
|
3431
|
-
SecureEmail,
|
|
3432
|
-
{
|
|
3433
|
-
user: email.user,
|
|
3434
|
-
domain: email.domain,
|
|
3435
|
-
className: "text-stone-600 transition-colors hover:text-black"
|
|
3436
|
-
}
|
|
3437
|
-
))))), socials && socials.length > 0 && /* @__PURE__ */ React32.createElement("div", { className: "flex-1 min-w-65 space-y-6" }, /* @__PURE__ */ React32.createElement("p", { className: "text-sm tracking-[0.2em] text-black mb-4 " }, "Find Us Online"), /* @__PURE__ */ React32.createElement("div", { className: "flex flex-col space-y-5 pt-1" }, socials.map((social, idx) => /* @__PURE__ */ React32.createElement(
|
|
3514
|
+
)))), socials && socials.length > 0 && /* @__PURE__ */ React32.createElement("div", { className: "space-y-6" }, /* @__PURE__ */ React32.createElement("p", { className: "text-sm tracking-[0.2em] text-black mb-4" }, "Find Us Online"), /* @__PURE__ */ React32.createElement("div", { className: "flex flex-col space-y-5 pt-1" }, socials.map((social, idx) => /* @__PURE__ */ React32.createElement(
|
|
3438
3515
|
"a",
|
|
3439
3516
|
{
|
|
3440
3517
|
key: idx,
|
|
@@ -3445,11 +3522,56 @@ var ManagedContactBlock = ({
|
|
|
3445
3522
|
},
|
|
3446
3523
|
/* @__PURE__ */ React32.createElement(HugeiconsIcon24, { icon: social.icon, size: 18 }),
|
|
3447
3524
|
/* @__PURE__ */ React32.createElement("span", { className: "text-xs" }, social.label)
|
|
3525
|
+
))))), /* @__PURE__ */ React32.createElement("div", { className: "w-full lg:w-2/3" }, /* @__PURE__ */ React32.createElement("p", { className: "text-sm tracking-[0.2em] text-black mb-8" }, "Send a Message"), /* @__PURE__ */ React32.createElement("form", { onSubmit: handleSubmit, className: "space-y-6" }, /* @__PURE__ */ React32.createElement("div", { className: "flex flex-col md:flex-row gap-6" }, /* @__PURE__ */ React32.createElement(
|
|
3526
|
+
TextInput2,
|
|
3527
|
+
{
|
|
3528
|
+
label: "YOUR NAME",
|
|
3529
|
+
placeholder: "John Doe",
|
|
3530
|
+
value: formData.name,
|
|
3531
|
+
onChange: (val) => setFormData({ ...formData, name: val }),
|
|
3532
|
+
disabled: status === "loading"
|
|
3533
|
+
}
|
|
3534
|
+
), /* @__PURE__ */ React32.createElement(
|
|
3535
|
+
TextInput2,
|
|
3536
|
+
{
|
|
3537
|
+
label: "SUBJECT TITLE",
|
|
3538
|
+
placeholder: "Partnership Inquiry",
|
|
3539
|
+
value: formData.title,
|
|
3540
|
+
onChange: (val) => setFormData({ ...formData, title: val }),
|
|
3541
|
+
disabled: status === "loading"
|
|
3542
|
+
}
|
|
3543
|
+
)), /* @__PURE__ */ React32.createElement(
|
|
3544
|
+
TextInput2,
|
|
3545
|
+
{
|
|
3546
|
+
label: "PHONE NUMBER (OPTIONAL)",
|
|
3547
|
+
type: "tel",
|
|
3548
|
+
placeholder: "+1 234 567 8900",
|
|
3549
|
+
value: formData.phone,
|
|
3550
|
+
onChange: (val) => setFormData({ ...formData, phone: val }),
|
|
3551
|
+
disabled: status === "loading"
|
|
3552
|
+
}
|
|
3553
|
+
), /* @__PURE__ */ React32.createElement(
|
|
3554
|
+
TextAreaInput,
|
|
3555
|
+
{
|
|
3556
|
+
label: "MESSAGE",
|
|
3557
|
+
placeholder: "How can we help you?",
|
|
3558
|
+
value: formData.message,
|
|
3559
|
+
onChange: (val) => setFormData({ ...formData, message: val }),
|
|
3560
|
+
disabled: status === "loading"
|
|
3561
|
+
}
|
|
3562
|
+
), responseMessage && /* @__PURE__ */ React32.createElement("p", { className: `text-sm ${status === "error" ? "text-red-500" : "text-green-600"}` }, responseMessage), /* @__PURE__ */ React32.createElement("div", { className: "pt-4" }, /* @__PURE__ */ React32.createElement(
|
|
3563
|
+
ThreeDActionButton2,
|
|
3564
|
+
{
|
|
3565
|
+
type: "submit",
|
|
3566
|
+
isLoading: status === "loading",
|
|
3567
|
+
disabled: !formData.name || !formData.title || !formData.message
|
|
3568
|
+
},
|
|
3569
|
+
"Submit Message"
|
|
3448
3570
|
)))))))));
|
|
3449
3571
|
};
|
|
3450
3572
|
|
|
3451
3573
|
// src/components/ManagedPricingBlock.tsx
|
|
3452
|
-
import React33, { useState as useState25, useEffect as
|
|
3574
|
+
import React33, { useState as useState25, useEffect as useEffect14, useRef as useRef9 } from "react";
|
|
3453
3575
|
import Link7 from "next/link";
|
|
3454
3576
|
import Image5 from "next/image";
|
|
3455
3577
|
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" }));
|
|
@@ -3463,7 +3585,7 @@ var ManagedPricingBlock = ({
|
|
|
3463
3585
|
const [isAnimating, setIsAnimating] = useState25(false);
|
|
3464
3586
|
const [activeTabIndex, setActiveTabIndex] = useState25(0);
|
|
3465
3587
|
const titleRef = useRef9(null);
|
|
3466
|
-
|
|
3588
|
+
useEffect14(() => {
|
|
3467
3589
|
const observer = new IntersectionObserver(
|
|
3468
3590
|
([entry]) => {
|
|
3469
3591
|
if (entry.isIntersecting) {
|
|
@@ -3678,12 +3800,12 @@ var ManagedNewsletterSplitBlock = ({
|
|
|
3678
3800
|
};
|
|
3679
3801
|
|
|
3680
3802
|
// src/components/PortfolioHero.tsx
|
|
3681
|
-
import React37, { useEffect as
|
|
3803
|
+
import React37, { useEffect as useEffect15, useRef as useRef10 } from "react";
|
|
3682
3804
|
import Link8 from "next/link";
|
|
3683
3805
|
import Image8 from "next/image";
|
|
3684
3806
|
var useScrollAnimation = () => {
|
|
3685
3807
|
const elementRef = useRef10(null);
|
|
3686
|
-
|
|
3808
|
+
useEffect15(() => {
|
|
3687
3809
|
const el = elementRef.current;
|
|
3688
3810
|
if (!el) return;
|
|
3689
3811
|
const observer = new IntersectionObserver(
|
|
@@ -3769,7 +3891,7 @@ var PortfolioHero = ({
|
|
|
3769
3891
|
import React38, { useState as useState26 } from "react";
|
|
3770
3892
|
import Image9 from "next/image";
|
|
3771
3893
|
import { HugeiconsIcon as HugeiconsIcon26 } from "@hugeicons/react";
|
|
3772
|
-
import { Loading03Icon as
|
|
3894
|
+
import { Loading03Icon as Loading03Icon15 } from "@hugeicons/core-free-icons";
|
|
3773
3895
|
var GifFeatureCard = ({
|
|
3774
3896
|
gifSrc,
|
|
3775
3897
|
title,
|
|
@@ -3781,7 +3903,7 @@ var GifFeatureCard = ({
|
|
|
3781
3903
|
return /* @__PURE__ */ React38.createElement("div", { className: `relative w-full bg-black overflow-hidden ${className}` }, isLoading && /* @__PURE__ */ React38.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-black" }, /* @__PURE__ */ React38.createElement(
|
|
3782
3904
|
HugeiconsIcon26,
|
|
3783
3905
|
{
|
|
3784
|
-
icon:
|
|
3906
|
+
icon: Loading03Icon15,
|
|
3785
3907
|
size: 32,
|
|
3786
3908
|
className: "animate-spin text-white"
|
|
3787
3909
|
}
|
|
@@ -3810,7 +3932,7 @@ var GifFeatureCard = ({
|
|
|
3810
3932
|
};
|
|
3811
3933
|
|
|
3812
3934
|
// src/components/MedicalFeatureStatsBlock.tsx
|
|
3813
|
-
import React39, { useState as useState27, useEffect as
|
|
3935
|
+
import React39, { useState as useState27, useEffect as useEffect16, useRef as useRef11 } from "react";
|
|
3814
3936
|
import Image10 from "next/image";
|
|
3815
3937
|
var MedicalFeatureStatsBlock = ({
|
|
3816
3938
|
bottomHeadline,
|
|
@@ -3821,7 +3943,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
3821
3943
|
}) => {
|
|
3822
3944
|
const [isAnimating, setIsAnimating] = useState27(false);
|
|
3823
3945
|
const titleRef = useRef11(null);
|
|
3824
|
-
|
|
3946
|
+
useEffect16(() => {
|
|
3825
3947
|
const observer = new IntersectionObserver(
|
|
3826
3948
|
([entry]) => {
|
|
3827
3949
|
if (entry.isIntersecting) {
|
|
@@ -3863,10 +3985,10 @@ var MedicalFeatureStatsBlock = ({
|
|
|
3863
3985
|
import React40, { useState as useState28 } from "react";
|
|
3864
3986
|
import Image11 from "next/image";
|
|
3865
3987
|
import { HugeiconsIcon as HugeiconsIcon27 } from "@hugeicons/react";
|
|
3866
|
-
import { Loading03Icon as
|
|
3988
|
+
import { Loading03Icon as Loading03Icon16 } from "@hugeicons/core-free-icons";
|
|
3867
3989
|
var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
3868
3990
|
const [isLoading, setIsLoading] = useState28(true);
|
|
3869
|
-
return /* @__PURE__ */ React40.createElement("div", { className: `absolute inset-0 bg-stone-800 ${className}` }, isLoading && /* @__PURE__ */ React40.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-stone-800/50 backdrop-blur-md transition-opacity duration-300" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon27, { icon:
|
|
3991
|
+
return /* @__PURE__ */ React40.createElement("div", { className: `absolute inset-0 bg-stone-800 ${className}` }, isLoading && /* @__PURE__ */ React40.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-stone-800/50 backdrop-blur-md transition-opacity duration-300" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon27, { icon: Loading03Icon16, size: 24, className: "animate-spin text-white/50" })), /* @__PURE__ */ React40.createElement(
|
|
3870
3992
|
Image11,
|
|
3871
3993
|
{
|
|
3872
3994
|
src,
|
|
@@ -3958,7 +4080,7 @@ var ConsultantShowcase = ({
|
|
|
3958
4080
|
import React41, { useState as useState29 } from "react";
|
|
3959
4081
|
import Image12 from "next/image";
|
|
3960
4082
|
import { HugeiconsIcon as HugeiconsIcon28 } from "@hugeicons/react";
|
|
3961
|
-
import { Loading03Icon as
|
|
4083
|
+
import { Loading03Icon as Loading03Icon17 } from "@hugeicons/core-free-icons";
|
|
3962
4084
|
var ContentGridBlock = ({
|
|
3963
4085
|
header,
|
|
3964
4086
|
leftCard,
|
|
@@ -4039,7 +4161,7 @@ import {
|
|
|
4039
4161
|
CheckmarkCircle01Icon,
|
|
4040
4162
|
Time02Icon,
|
|
4041
4163
|
InformationCircleIcon as InformationCircleIcon2,
|
|
4042
|
-
Loading03Icon as
|
|
4164
|
+
Loading03Icon as Loading03Icon18
|
|
4043
4165
|
} from "@hugeicons/core-free-icons";
|
|
4044
4166
|
var VerificationRow = ({
|
|
4045
4167
|
icon,
|
|
@@ -4094,7 +4216,7 @@ var VerificationRow = ({
|
|
|
4094
4216
|
},
|
|
4095
4217
|
/* @__PURE__ */ React43.createElement("div", { className: "w-9 h-9 rounded-full border border-stone-200 bg-white flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ React43.createElement(HugeiconsIcon29, { icon, size: 16, className: "text-black" })),
|
|
4096
4218
|
/* @__PURE__ */ React43.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React43.createElement("p", { className: "text-sm truncate text-black" }, title), /* @__PURE__ */ React43.createElement("p", { className: `text-xs inline-flex items-center ${bg} rounded-full px-2 py-1 ${statusColor} mt-0.5` }, statusText)),
|
|
4097
|
-
/* @__PURE__ */ React43.createElement("div", { className: "shrink-0 ml-2" }, isLoading ? /* @__PURE__ */ React43.createElement(HugeiconsIcon29, { icon:
|
|
4219
|
+
/* @__PURE__ */ React43.createElement("div", { className: "shrink-0 ml-2" }, isLoading ? /* @__PURE__ */ React43.createElement(HugeiconsIcon29, { icon: Loading03Icon18, size: 20, className: "animate-spin text-black" }) : /* @__PURE__ */ React43.createElement(HugeiconsIcon29, { icon: StatusIcon, size: 20, className: iconColor }))
|
|
4098
4220
|
);
|
|
4099
4221
|
};
|
|
4100
4222
|
var UniversalVerificationPage = ({
|
|
@@ -4155,19 +4277,19 @@ import { useWindowSize } from "react-use";
|
|
|
4155
4277
|
import { HugeiconsIcon as HugeiconsIcon30 } from "@hugeicons/react";
|
|
4156
4278
|
import {
|
|
4157
4279
|
GiftIcon,
|
|
4158
|
-
Loading03Icon as
|
|
4280
|
+
Loading03Icon as Loading03Icon19,
|
|
4159
4281
|
ArrowLeft01Icon as ArrowLeft01Icon11
|
|
4160
4282
|
} from "@hugeicons/core-free-icons";
|
|
4161
4283
|
var formatWeb3Name = (name) => {
|
|
4162
4284
|
if (!name) return "";
|
|
4163
4285
|
return name.toLowerCase().replace(/\b\w/g, (c) => c.toUpperCase());
|
|
4164
4286
|
};
|
|
4165
|
-
var PageSpinner4 = () => /* @__PURE__ */ React44.createElement("div", { className: "flex justify-center items-center py-12 w-full" }, /* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon:
|
|
4287
|
+
var PageSpinner4 = () => /* @__PURE__ */ React44.createElement("div", { className: "flex justify-center items-center py-12 w-full" }, /* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon: Loading03Icon19, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
4166
4288
|
var AvatarLogo = ({ src, alt, name, sizeClass = "w-12 h-12" }) => {
|
|
4167
4289
|
const [isLoaded, setIsLoaded] = useState30(false);
|
|
4168
4290
|
const fallbackUrl = `/api/avatar/?name=${encodeURIComponent(name || " ")}&background=ffffff&color=000000&size=100&font-size=0.33`;
|
|
4169
4291
|
const finalSrc = src || fallbackUrl;
|
|
4170
|
-
return /* @__PURE__ */ React44.createElement("div", { className: `relative shrink-0 rounded-full bg-stone-100 flex items-center justify-center overflow-hidden border-[3px] border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon:
|
|
4292
|
+
return /* @__PURE__ */ React44.createElement("div", { className: `relative shrink-0 rounded-full bg-stone-100 flex items-center justify-center overflow-hidden border-[3px] border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon: Loading03Icon19, size: 16, className: "animate-spin text-stone-400 absolute" }), /* @__PURE__ */ React44.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
|
|
4171
4293
|
};
|
|
4172
4294
|
var UniversalRewardPage = ({
|
|
4173
4295
|
leaderboardToday,
|
|
@@ -4267,10 +4389,10 @@ import { HugeiconsIcon as HugeiconsIcon31 } from "@hugeicons/react";
|
|
|
4267
4389
|
import {
|
|
4268
4390
|
ArrowLeft01Icon as ArrowLeft01Icon12,
|
|
4269
4391
|
ArrowRight01Icon as ArrowRight01Icon9,
|
|
4270
|
-
Loading03Icon as
|
|
4392
|
+
Loading03Icon as Loading03Icon20,
|
|
4271
4393
|
Copy01Icon as Copy01Icon4
|
|
4272
4394
|
} from "@hugeicons/core-free-icons";
|
|
4273
|
-
var PageSpinner5 = () => /* @__PURE__ */ React45.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React45.createElement(HugeiconsIcon31, { icon:
|
|
4395
|
+
var PageSpinner5 = () => /* @__PURE__ */ React45.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React45.createElement(HugeiconsIcon31, { icon: Loading03Icon20, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
4274
4396
|
var formatWeb3Name2 = (name) => {
|
|
4275
4397
|
if (!name) return "";
|
|
4276
4398
|
return name.toLowerCase().replace(/\b\w/g, (c) => c.toUpperCase());
|
|
@@ -4305,7 +4427,7 @@ var UniversalReferralPage = ({
|
|
|
4305
4427
|
const [isLoaded, setIsLoaded] = useState31(false);
|
|
4306
4428
|
const fallbackUrl = `/api/avatar/?name=${encodeURIComponent(name || " ")}&background=e0e0e0&color=000000&size=100&font-size=0.33`;
|
|
4307
4429
|
const finalSrc = src || fallbackUrl;
|
|
4308
|
-
return /* @__PURE__ */ React45.createElement("div", { className: `relative shrink-0 rounded-full bg-stone-100 flex items-center justify-center overflow-hidden border-2 border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React45.createElement(HugeiconsIcon31, { icon:
|
|
4430
|
+
return /* @__PURE__ */ React45.createElement("div", { className: `relative shrink-0 rounded-full bg-stone-100 flex items-center justify-center overflow-hidden border-2 border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React45.createElement(HugeiconsIcon31, { icon: Loading03Icon20, size: 16, className: "animate-spin text-stone-400 absolute" }), /* @__PURE__ */ React45.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
|
|
4309
4431
|
};
|
|
4310
4432
|
return /* @__PURE__ */ React45.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React45.createElement(ManagedToaster, null), /* @__PURE__ */ React45.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React45.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-stone-500 hover:text-black transition-colors text-sm outline-none" }, /* @__PURE__ */ React45.createElement(HugeiconsIcon31, { icon: ArrowLeft01Icon12, size: 16 }), " Back")), /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-4 mb-6 px-1" }, /* @__PURE__ */ React45.createElement("div", null, /* @__PURE__ */ React45.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ React45.createElement("p", { className: "text-xs text-stone-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ React45.createElement("div", { className: "bg-[#143731] rounded-3xl p-6 relative overflow-hidden flex flex-col min-h-25 w-full mt-2" }, /* @__PURE__ */ React45.createElement("div", { className: "relative z-10 flex flex-col items-start" }, /* @__PURE__ */ React45.createElement("p", { className: "text-xs text-white leading-tight mb-1" }, /* @__PURE__ */ React45.createElement("span", { className: "text-white/60" }, "AFT Balance")), isLoading ? /* @__PURE__ */ React45.createElement("div", { className: "h-8 w-32 bg-white/10 animate-pulse rounded mt-2" }) : /* @__PURE__ */ React45.createElement("span", { className: "text-lg text-white tracking-tight mt-1" }, referralCoins)))), /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-6 p-4 rounded-3xl bg-white w-full" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React45.createElement("div", { className: "border border-stone-200 rounded-xl p-4 flex items-center justify-between" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React45.createElement("span", { className: "text-xs tracking-widest text-stone-400 " }, "Invitation Code"), isLoading && !referralCode ? /* @__PURE__ */ React45.createElement("div", { className: "h-6 w-24 bg-stone-50 animate-pulse rounded mt-1" }) : /* @__PURE__ */ React45.createElement("span", { className: "text-sm text-black tracking-widest" }, referralCode)), /* @__PURE__ */ React45.createElement(
|
|
4311
4433
|
"button",
|
|
@@ -4357,7 +4479,7 @@ import { HugeiconsIcon as HugeiconsIcon32 } from "@hugeicons/react";
|
|
|
4357
4479
|
import {
|
|
4358
4480
|
ArrowLeft01Icon as ArrowLeft01Icon13,
|
|
4359
4481
|
CancelCircleIcon as CancelCircleIcon11,
|
|
4360
|
-
Loading03Icon as
|
|
4482
|
+
Loading03Icon as Loading03Icon21
|
|
4361
4483
|
} from "@hugeicons/core-free-icons";
|
|
4362
4484
|
var CheckIcon2 = ({ className = "" }) => /* @__PURE__ */ React46.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__ */ React46.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "black" }), /* @__PURE__ */ React46.createElement("path", { d: "M8 12L11 15L16 9", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
4363
4485
|
var CrossIcon2 = ({ className = "" }) => /* @__PURE__ */ React46.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__ */ React46.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "#F5F5F5" }), /* @__PURE__ */ React46.createElement("path", { d: "M15 9L9 15M9 9l6 6", stroke: "#D4D4D4", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
@@ -4449,7 +4571,7 @@ var UniversalCardActionPage = ({
|
|
|
4449
4571
|
},
|
|
4450
4572
|
/* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowLeft01Icon13, size: 16 }),
|
|
4451
4573
|
" Back"
|
|
4452
|
-
)), /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col animate-in max-w-5xl w-full mx-auto fade-in duration-300" }, /* @__PURE__ */ React46.createElement("div", { className: "w-full flex flex-col items-center text-center mb-10 px-4" }, /* @__PURE__ */ React46.createElement("span", { className: "text-xs tracking-[0.4em] text-stone-400 block mb-3" }, cardType, " CARD ACTIVATION"), /* @__PURE__ */ React46.createElement("h1", { className: "text-2xl sm:text-3xl text-black tracking-tight mb-2" }, "Select Your Tier"), /* @__PURE__ */ React46.createElement("p", { className: "text-xs text-stone-500 max-w-lg" }, hasPreordered ? "You have already secured your card. Upgrades are disabled while your order is pending processing." : "Upgrade your tier or secure your card now. Pre-orders guarantee priority processing when the batch goes live.")), isLoadingData ? /* @__PURE__ */ React46.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon:
|
|
4574
|
+
)), /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col animate-in max-w-5xl w-full mx-auto fade-in duration-300" }, /* @__PURE__ */ React46.createElement("div", { className: "w-full flex flex-col items-center text-center mb-10 px-4" }, /* @__PURE__ */ React46.createElement("span", { className: "text-xs tracking-[0.4em] text-stone-400 block mb-3" }, cardType, " CARD ACTIVATION"), /* @__PURE__ */ React46.createElement("h1", { className: "text-2xl sm:text-3xl text-black tracking-tight mb-2" }, "Select Your Tier"), /* @__PURE__ */ React46.createElement("p", { className: "text-xs text-stone-500 max-w-lg" }, hasPreordered ? "You have already secured your card. Upgrades are disabled while your order is pending processing." : "Upgrade your tier or secure your card now. Pre-orders guarantee priority processing when the batch goes live.")), isLoadingData ? /* @__PURE__ */ React46.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: Loading03Icon21, size: 32, className: "animate-spin text-stone-300" })) : /* @__PURE__ */ React46.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5 w-full max-w-4xl mx-auto px-4" }, availableTiers.map((tier) => {
|
|
4453
4575
|
const isCurrent = tier.tierName === currentTier;
|
|
4454
4576
|
const isCardDisabled = hasPreordered && !isCurrent;
|
|
4455
4577
|
const isHighlighted = hasPreordered && isCurrent;
|
|
@@ -4471,7 +4593,7 @@ var UniversalCardActionPage = ({
|
|
|
4471
4593
|
className: `absolute -top-10 -right-10 w-48 h-48 bg-linear-to-bl ${getTierGlow(tier.tierName)} to-transparent opacity-40 blur-2xl rounded-full pointer-events-none`
|
|
4472
4594
|
}
|
|
4473
4595
|
),
|
|
4474
|
-
isThisCardLoading && /* @__PURE__ */ React46.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-white/40 backdrop-blur-[1px]" }, /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon:
|
|
4596
|
+
isThisCardLoading && /* @__PURE__ */ React46.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-white/40 backdrop-blur-[1px]" }, /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: Loading03Icon21, size: 32, className: "animate-spin text-black" })),
|
|
4475
4597
|
/* @__PURE__ */ React46.createElement("div", { className: "mb-6 relative z-10" }, /* @__PURE__ */ React46.createElement("div", { className: "flex justify-between items-start mb-1" }, /* @__PURE__ */ React46.createElement("span", { className: "text-black text-sm tracking-widest " }, formatTierName(tier.tierName)), isCurrent && !hasPreordered && /* @__PURE__ */ React46.createElement("span", { className: "text-xs bg-stone-100 text-stone-600 px-2 py-1 rounded-full tracking-wider" }, "Current")), /* @__PURE__ */ React46.createElement("div", { className: "flex items-baseline gap-1 mt-2" }, /* @__PURE__ */ React46.createElement("h3", { className: "text-3xl font-light text-black" }, tier.priceUSD === 0 ? "Free" : `$${tier.priceUSD.toFixed(2)}`), tier.priceUSD > 0 && /* @__PURE__ */ React46.createElement("span", { className: "text-xs text-stone-500" }, tier.isYearly ? "/ year" : "one-time")), /* @__PURE__ */ React46.createElement("p", { className: "text-sm text-stone-500 mt-3 min-h-12 leading-relaxed" }, tier.description)),
|
|
4476
4598
|
/* @__PURE__ */ React46.createElement("div", { className: "flex flex-col gap-2.5 mb-6 relative z-10" }, /* @__PURE__ */ React46.createElement("div", { className: isPrimaryDisabled ? "opacity-50 pointer-events-none" : "" }, /* @__PURE__ */ React46.createElement(
|
|
4477
4599
|
ThreeDActionButton,
|
|
@@ -4544,7 +4666,7 @@ var UniversalCardActionPage = ({
|
|
|
4544
4666
|
};
|
|
4545
4667
|
|
|
4546
4668
|
// src/components/PinDialerBottomSheet.tsx
|
|
4547
|
-
import React47, { useState as useState33, useEffect as
|
|
4669
|
+
import React47, { useState as useState33, useEffect as useEffect17 } from "react";
|
|
4548
4670
|
import { HugeiconsIcon as HugeiconsIcon33 } from "@hugeicons/react";
|
|
4549
4671
|
import { CancelCircleIcon as CancelCircleIcon12 } from "@hugeicons/core-free-icons";
|
|
4550
4672
|
var PinDialerBottomSheet = ({
|
|
@@ -4555,7 +4677,7 @@ var PinDialerBottomSheet = ({
|
|
|
4555
4677
|
onComplete
|
|
4556
4678
|
}) => {
|
|
4557
4679
|
const [pin, setPin] = useState33("");
|
|
4558
|
-
|
|
4680
|
+
useEffect17(() => {
|
|
4559
4681
|
setPin("");
|
|
4560
4682
|
}, [isOpen]);
|
|
4561
4683
|
const handleSubmit = (e) => {
|
|
@@ -4606,7 +4728,7 @@ var PinDialerBottomSheet = ({
|
|
|
4606
4728
|
};
|
|
4607
4729
|
|
|
4608
4730
|
// src/components/UniversalBuyCryptoPage.tsx
|
|
4609
|
-
import React48, { useState as useState34, useEffect as
|
|
4731
|
+
import React48, { useState as useState34, useEffect as useEffect18, useRef as useRef12, useCallback } from "react";
|
|
4610
4732
|
import toast11 from "react-hot-toast";
|
|
4611
4733
|
import { HugeiconsIcon as HugeiconsIcon34 } from "@hugeicons/react";
|
|
4612
4734
|
import {
|
|
@@ -4691,7 +4813,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4691
4813
|
const [isNetworkDialogOpen, setIsNetworkDialogOpen] = useState34(false);
|
|
4692
4814
|
const [isSubmitting, setIsSubmitting] = useState34(false);
|
|
4693
4815
|
const debounceTimerRef = useRef12(null);
|
|
4694
|
-
|
|
4816
|
+
useEffect18(() => {
|
|
4695
4817
|
if (selectedCrypto?.networks?.length > 0) {
|
|
4696
4818
|
const exists = selectedCrypto.networks.find((n) => n.id === selectedNetwork.id);
|
|
4697
4819
|
if (!exists) {
|
|
@@ -4699,7 +4821,7 @@ var UniversalBuyCryptoPage = ({
|
|
|
4699
4821
|
}
|
|
4700
4822
|
}
|
|
4701
4823
|
}, [selectedCrypto]);
|
|
4702
|
-
|
|
4824
|
+
useEffect18(() => {
|
|
4703
4825
|
if (!recipientAddress.trim()) {
|
|
4704
4826
|
setIsAddressValid(false);
|
|
4705
4827
|
return;
|
|
@@ -4892,7 +5014,7 @@ import { HugeiconsIcon as HugeiconsIcon35 } from "@hugeicons/react";
|
|
|
4892
5014
|
import {
|
|
4893
5015
|
ArrowLeft01Icon as ArrowLeft01Icon15,
|
|
4894
5016
|
ArrowRight01Icon as ArrowRight01Icon10,
|
|
4895
|
-
Loading03Icon as
|
|
5017
|
+
Loading03Icon as Loading03Icon23
|
|
4896
5018
|
} from "@hugeicons/core-free-icons";
|
|
4897
5019
|
var HuddleAvatar = ({ timeString, status, sizeClass = "w-10 h-10" }) => {
|
|
4898
5020
|
const getStatusColor = () => {
|
|
@@ -4918,9 +5040,9 @@ var HuddleAvatar = ({ timeString, status, sizeClass = "w-10 h-10" }) => {
|
|
|
4918
5040
|
month = parts[1].substring(0, 3).toUpperCase();
|
|
4919
5041
|
}
|
|
4920
5042
|
}
|
|
4921
|
-
return /* @__PURE__ */ React49.createElement("div", { className: `relative shrink-0 aspect-square ${sizeClass}` }, /* @__PURE__ */ React49.createElement("div", { className: "w-full h-full aspect-square rounded-lg bg-neutral-
|
|
5043
|
+
return /* @__PURE__ */ React49.createElement("div", { className: `relative shrink-0 aspect-square ${sizeClass}` }, /* @__PURE__ */ React49.createElement("div", { className: "w-full h-full aspect-square rounded-lg bg-neutral-50 flex flex-col items-center justify-center overflow-hidden" }, /* @__PURE__ */ React49.createElement("span", { className: "text-[9px] tracking-wider leading-tight", style: { color: "#d97757" } }, month), /* @__PURE__ */ React49.createElement("span", { className: "text-sm text-black leading-tight" }, day)), /* @__PURE__ */ React49.createElement("div", { className: `absolute -bottom-1 -right-1 w-3 h-3 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
|
|
4922
5044
|
};
|
|
4923
|
-
var PageSpinner6 = () => /* @__PURE__ */ React49.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon:
|
|
5045
|
+
var PageSpinner6 = () => /* @__PURE__ */ React49.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: Loading03Icon23, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
4924
5046
|
var UniversalHuddlesPage = ({
|
|
4925
5047
|
headerTitle,
|
|
4926
5048
|
headerDescription,
|
|
@@ -4969,13 +5091,13 @@ var UniversalHuddlesPage = ({
|
|
|
4969
5091
|
};
|
|
4970
5092
|
|
|
4971
5093
|
// src/components/UniversalMembersPage.tsx
|
|
4972
|
-
import React50, { useState as useState35, useEffect as
|
|
5094
|
+
import React50, { useState as useState35, useEffect as useEffect19, useRef as useRef13 } from "react";
|
|
4973
5095
|
import { HugeiconsIcon as HugeiconsIcon36 } from "@hugeicons/react";
|
|
4974
5096
|
import toast12 from "react-hot-toast";
|
|
4975
5097
|
import {
|
|
4976
5098
|
ArrowLeft01Icon as ArrowLeft01Icon16,
|
|
4977
5099
|
ArrowRight01Icon as ArrowRight01Icon11,
|
|
4978
|
-
Loading03Icon as
|
|
5100
|
+
Loading03Icon as Loading03Icon24,
|
|
4979
5101
|
Search01Icon as Search01Icon5,
|
|
4980
5102
|
SearchList02Icon as SearchList02Icon2,
|
|
4981
5103
|
ListSettingIcon as ListSettingIcon2
|
|
@@ -4999,7 +5121,7 @@ var MemberAvatar2 = ({ src, status }) => {
|
|
|
4999
5121
|
return "bg-stone-200";
|
|
5000
5122
|
}
|
|
5001
5123
|
};
|
|
5002
|
-
return /* @__PURE__ */ React50.createElement("div", { className: "relative w-10 h-10 shrink-0" }, /* @__PURE__ */ React50.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon:
|
|
5124
|
+
return /* @__PURE__ */ React50.createElement("div", { className: "relative w-10 h-10 shrink-0" }, /* @__PURE__ */ React50.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: Loading03Icon24, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React50.createElement(
|
|
5003
5125
|
"img",
|
|
5004
5126
|
{
|
|
5005
5127
|
src: finalSrc,
|
|
@@ -5010,7 +5132,7 @@ var MemberAvatar2 = ({ src, status }) => {
|
|
|
5010
5132
|
}
|
|
5011
5133
|
)), /* @__PURE__ */ React50.createElement("div", { className: `absolute -bottom-1 -right-1 w-2.5 h-2.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
|
|
5012
5134
|
};
|
|
5013
|
-
var PageSpinner7 = () => /* @__PURE__ */ React50.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon:
|
|
5135
|
+
var PageSpinner7 = () => /* @__PURE__ */ React50.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon36, { icon: Loading03Icon24, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
5014
5136
|
var UniversalMembersPage = ({
|
|
5015
5137
|
headerTitle,
|
|
5016
5138
|
headerDescription,
|
|
@@ -5043,7 +5165,7 @@ var UniversalMembersPage = ({
|
|
|
5043
5165
|
const statusDropdownRef = useRef13(null);
|
|
5044
5166
|
const roleDropdownRef = useRef13(null);
|
|
5045
5167
|
const cleanEmailId = (val) => val.toLowerCase().replace(/[^a-z0-9@._-]/g, "");
|
|
5046
|
-
|
|
5168
|
+
useEffect19(() => {
|
|
5047
5169
|
function handleClickOutside(event) {
|
|
5048
5170
|
if (statusDropdownRef.current && !statusDropdownRef.current.contains(event.target)) {
|
|
5049
5171
|
setIsStatusModalOpen(false);
|
|
@@ -5055,7 +5177,7 @@ var UniversalMembersPage = ({
|
|
|
5055
5177
|
document.addEventListener("mousedown", handleClickOutside);
|
|
5056
5178
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
5057
5179
|
}, []);
|
|
5058
|
-
|
|
5180
|
+
useEffect19(() => {
|
|
5059
5181
|
setIsTyping(true);
|
|
5060
5182
|
const handler = setTimeout(() => {
|
|
5061
5183
|
onSearchChange(localSearchQuery);
|
|
@@ -5063,7 +5185,7 @@ var UniversalMembersPage = ({
|
|
|
5063
5185
|
}, 600);
|
|
5064
5186
|
return () => clearTimeout(handler);
|
|
5065
5187
|
}, [localSearchQuery, onSearchChange]);
|
|
5066
|
-
|
|
5188
|
+
useEffect19(() => {
|
|
5067
5189
|
if (searchQuery === "" && localSearchQuery !== "") {
|
|
5068
5190
|
setLocalSearchQuery("");
|
|
5069
5191
|
}
|
|
@@ -5240,7 +5362,7 @@ import { useRouter as useRouter3 } from "next/navigation";
|
|
|
5240
5362
|
import { HugeiconsIcon as HugeiconsIcon37 } from "@hugeicons/react";
|
|
5241
5363
|
import toast13 from "react-hot-toast";
|
|
5242
5364
|
import {
|
|
5243
|
-
Loading03Icon as
|
|
5365
|
+
Loading03Icon as Loading03Icon25,
|
|
5244
5366
|
Notification01Icon as Notification01Icon2,
|
|
5245
5367
|
ArrowLeft01Icon as ArrowLeft01Icon17,
|
|
5246
5368
|
ArrowRight01Icon as ArrowRight01Icon12,
|
|
@@ -5254,7 +5376,7 @@ var OrgAvatar = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
|
5254
5376
|
const [error, setError] = useState36(false);
|
|
5255
5377
|
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/office_a.avif";
|
|
5256
5378
|
const finalSrc = error || !src ? defaultAvatar : src;
|
|
5257
|
-
return /* @__PURE__ */ React51.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React51.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon:
|
|
5379
|
+
return /* @__PURE__ */ React51.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React51.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: Loading03Icon25, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React51.createElement(
|
|
5258
5380
|
"img",
|
|
5259
5381
|
{
|
|
5260
5382
|
src: finalSrc,
|
|
@@ -5330,7 +5452,7 @@ var UniversalHome2 = ({
|
|
|
5330
5452
|
onClose: () => setShowLogoutConfirm(false),
|
|
5331
5453
|
onConfirm: confirmLogout
|
|
5332
5454
|
}
|
|
5333
|
-
), /* @__PURE__ */ React51.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ React51.createElement("div", { className: "w-10 h-10 shrink-0 cursor-pointer", onClick: () => setShowOrgSwitcher(true) }, /* @__PURE__ */ React51.createElement("div", { className: "relative w-full h-full rounded-lg overflow-hidden bg-white flex items-center justify-center" }, !isAvatarLoaded && /* @__PURE__ */ React51.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-white" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon:
|
|
5455
|
+
), /* @__PURE__ */ React51.createElement("div", { className: "flex items-center justify-between w-full pb-4" }, /* @__PURE__ */ React51.createElement("div", { className: "w-10 h-10 shrink-0 cursor-pointer", onClick: () => setShowOrgSwitcher(true) }, /* @__PURE__ */ React51.createElement("div", { className: "relative w-full h-full rounded-lg overflow-hidden bg-white flex items-center justify-center" }, !isAvatarLoaded && /* @__PURE__ */ React51.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-white" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: Loading03Icon25, size: 16, className: "animate-spin text-black" })), /* @__PURE__ */ React51.createElement(
|
|
5334
5456
|
"img",
|
|
5335
5457
|
{
|
|
5336
5458
|
src: finalAvatarSrc,
|
|
@@ -5415,14 +5537,14 @@ var UniversalHome2 = ({
|
|
|
5415
5537
|
},
|
|
5416
5538
|
/* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: Logout01Icon, size: 15 }),
|
|
5417
5539
|
"Log Out"
|
|
5418
|
-
)))), showNotifDialog && /* @__PURE__ */ React51.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React51.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React51.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__ */ React51.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React51.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__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowLeft01Icon17, size: 14 }), " Back") : /* @__PURE__ */ React51.createElement("h3", { className: "text-sm text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React51.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-stone-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: CancelCircleIcon13, size: 18 }))), /* @__PURE__ */ React51.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React51.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon:
|
|
5540
|
+
)))), showNotifDialog && /* @__PURE__ */ React51.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React51.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React51.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__ */ React51.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React51.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__ */ React51.createElement(HugeiconsIcon37, { icon: ArrowLeft01Icon17, size: 14 }), " Back") : /* @__PURE__ */ React51.createElement("h3", { className: "text-sm text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React51.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-stone-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: CancelCircleIcon13, size: 18 }))), /* @__PURE__ */ React51.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React51.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: Loading03Icon25, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ React51.createElement("div", { className: "p-4 text-left" }, selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && selectedNotif.meta_json?.completed ? /* @__PURE__ */ React51.createElement("div", { className: "" }) : /* @__PURE__ */ React51.createElement("h4", { className: "text-sm text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React51.createElement("span", { className: "text-xs text-stone-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React51.createElement("p", { className: "text-xs text-stone-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React51.createElement("div", { className: `mt-8 flex gap-3 pt-6 ${selectedNotif.meta_json?.completed ? "opacity-40 pointer-events-none cursor-not-allowed" : ""}` }, /* @__PURE__ */ React51.createElement(
|
|
5419
5541
|
"button",
|
|
5420
5542
|
{
|
|
5421
5543
|
onClick: () => handleResolve("ACCEPTED"),
|
|
5422
5544
|
disabled: isResolving || selectedNotif.meta_json?.completed,
|
|
5423
5545
|
className: "flex-1 py-2.5 rounded-full bg-black text-white text-xs tracking-wide transition-all outline-none hover:bg-stone-800 flex justify-center items-center disabled:opacity-50"
|
|
5424
5546
|
},
|
|
5425
|
-
isResolving ? /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon:
|
|
5547
|
+
isResolving ? /* @__PURE__ */ React51.createElement(HugeiconsIcon37, { icon: Loading03Icon25, className: "animate-spin", size: 16 }) : "Accept"
|
|
5426
5548
|
), /* @__PURE__ */ React51.createElement(
|
|
5427
5549
|
"button",
|
|
5428
5550
|
{
|
|
@@ -5463,13 +5585,13 @@ var UniversalHome2 = ({
|
|
|
5463
5585
|
};
|
|
5464
5586
|
|
|
5465
5587
|
// src/components/UniversalSettings.tsx
|
|
5466
|
-
import React52, { useState as useState37, useEffect as
|
|
5588
|
+
import React52, { useState as useState37, useEffect as useEffect20, useRef as useRef14 } from "react";
|
|
5467
5589
|
import toast14 from "react-hot-toast";
|
|
5468
5590
|
import { HugeiconsIcon as HugeiconsIcon38 } from "@hugeicons/react";
|
|
5469
5591
|
import {
|
|
5470
5592
|
ArrowLeft01Icon as ArrowLeft01Icon18,
|
|
5471
5593
|
ArrowRight01Icon as ArrowRight01Icon13,
|
|
5472
|
-
Loading03Icon as
|
|
5594
|
+
Loading03Icon as Loading03Icon26,
|
|
5473
5595
|
Search01Icon as Search01Icon6,
|
|
5474
5596
|
SearchList02Icon as SearchList02Icon3,
|
|
5475
5597
|
ListSettingIcon as ListSettingIcon3,
|
|
@@ -5497,14 +5619,14 @@ var MemberAvatar3 = ({ src, status, sizeClass = "w-10 h-10" }) => {
|
|
|
5497
5619
|
return "bg-stone-200";
|
|
5498
5620
|
}
|
|
5499
5621
|
};
|
|
5500
|
-
return /* @__PURE__ */ React52.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React52.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon:
|
|
5622
|
+
return /* @__PURE__ */ React52.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React52.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Loading03Icon26, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React52.createElement("img", { src: finalSrc, alt: "Member", className: `w-full h-full object-cover transition-opacity duration-300 ${loaded || error ? "opacity-100" : "opacity-0"}`, onLoad: () => setLoaded(true), onError: () => setError(true) })), /* @__PURE__ */ React52.createElement("div", { className: `absolute -bottom-1 -right-1 w-3.5 h-3.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
|
|
5501
5623
|
};
|
|
5502
5624
|
var OrgAvatar2 = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
5503
5625
|
const [loaded, setLoaded] = useState37(false);
|
|
5504
5626
|
const [error, setError] = useState37(false);
|
|
5505
5627
|
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/office_a.avif";
|
|
5506
5628
|
const finalSrc = error || !src ? defaultAvatar : src;
|
|
5507
|
-
return /* @__PURE__ */ React52.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React52.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon:
|
|
5629
|
+
return /* @__PURE__ */ React52.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React52.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Loading03Icon26, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React52.createElement(
|
|
5508
5630
|
"img",
|
|
5509
5631
|
{
|
|
5510
5632
|
src: finalSrc,
|
|
@@ -5515,7 +5637,7 @@ var OrgAvatar2 = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
|
5515
5637
|
}
|
|
5516
5638
|
)));
|
|
5517
5639
|
};
|
|
5518
|
-
var PageSpinner8 = () => /* @__PURE__ */ React52.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon:
|
|
5640
|
+
var PageSpinner8 = () => /* @__PURE__ */ React52.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Loading03Icon26, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
5519
5641
|
var InputSpinner3 = () => /* @__PURE__ */ React52.createElement("svg", { className: "animate-spin h-4 w-4 text-stone-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React52.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React52.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }));
|
|
5520
5642
|
var UniversalSettings = ({
|
|
5521
5643
|
accountType,
|
|
@@ -5593,7 +5715,7 @@ var UniversalSettings = ({
|
|
|
5593
5715
|
const [pendingUserAvatar, setPendingUserAvatar] = useState37(null);
|
|
5594
5716
|
const [isUploadingOrgAvatar, setIsUploadingOrgAvatar] = useState37(false);
|
|
5595
5717
|
const [isUploadingUserAvatar, setIsUploadingUserAvatar] = useState37(false);
|
|
5596
|
-
|
|
5718
|
+
useEffect20(() => {
|
|
5597
5719
|
setOrgName(initialOrgName || "");
|
|
5598
5720
|
setOrgSlug(initialOrgSlug || "");
|
|
5599
5721
|
setOrgAvatarUrl(initialOrgAvatarUrl || "");
|
|
@@ -5628,7 +5750,7 @@ var UniversalSettings = ({
|
|
|
5628
5750
|
}
|
|
5629
5751
|
e.target.value = "";
|
|
5630
5752
|
};
|
|
5631
|
-
|
|
5753
|
+
useEffect20(() => {
|
|
5632
5754
|
if (activeTab !== "MEMBERS") return;
|
|
5633
5755
|
if (isFirstSearchMount.current) {
|
|
5634
5756
|
isFirstSearchMount.current = false;
|
|
@@ -5685,7 +5807,7 @@ var UniversalSettings = ({
|
|
|
5685
5807
|
}
|
|
5686
5808
|
};
|
|
5687
5809
|
const activeExpandedMember = expandedId ? members.find((m) => m.id === expandedId) : null;
|
|
5688
|
-
|
|
5810
|
+
useEffect20(() => {
|
|
5689
5811
|
if (!isOrg || !orgSlug || orgSlug === initialOrgSlug) {
|
|
5690
5812
|
setSlugAvailable(null);
|
|
5691
5813
|
setIsCheckingSlug(false);
|
|
@@ -5809,7 +5931,7 @@ var UniversalSettings = ({
|
|
|
5809
5931
|
},
|
|
5810
5932
|
/* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: ArrowLeft01Icon18, size: 16 }),
|
|
5811
5933
|
" Back"
|
|
5812
|
-
)), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-4 mb-4" }, /* @__PURE__ */ React52.createElement(MemberAvatar3, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React52.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React52.createElement("span", { className: "text-xs text-stone-500 capitalize" }, activeExpandedMember.role.toLowerCase()), canManage && (isUpdatingRole ? /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon:
|
|
5934
|
+
)), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-4 mb-4" }, /* @__PURE__ */ React52.createElement(MemberAvatar3, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React52.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React52.createElement("span", { className: "text-xs text-stone-500 capitalize" }, activeExpandedMember.role.toLowerCase()), canManage && (isUpdatingRole ? /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon: Loading03Icon26, size: 12, className: "animate-spin text-stone-400 ml-1" }) : /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("span", { className: "text-stone-300 text-xs px-0.5" }, "\u2022"), /* @__PURE__ */ React52.createElement("button", { onClick: () => setRoleEditTarget(activeExpandedMember), className: "text-xs text-[#d97757] hover:underline outline-none" }, "Edit"), /* @__PURE__ */ React52.createElement("span", { className: "text-stone-300 text-xs px-0.5" }, "\u2022"), /* @__PURE__ */ React52.createElement(
|
|
5813
5935
|
"button",
|
|
5814
5936
|
{
|
|
5815
5937
|
onClick: () => setMemberToRemove(activeExpandedMember),
|
|
@@ -5820,12 +5942,12 @@ var UniversalSettings = ({
|
|
|
5820
5942
|
))))))) : /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && canManage && /* @__PURE__ */ React52.createElement("button", { onClick: () => setIsInviteMode(true), className: "shrink-0 px-4 py-1.5 border border-stone-200 text-black text-xs tracking-wide rounded-full hover:bg-stone-50 transition-colors outline-none" }, "Invite Team")), !isInviteMode && /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ React52.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ React52.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React52.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React52.createElement("input", { type: "email", value: inviteEmail, onChange: (e) => setInviteEmail(cleanEmailId(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 bg-transparent text-sm border-b border-stone-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "name@company.com" })), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React52.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"), /* @__PURE__ */ React52.createElement("button", { type: "button", onClick: () => {
|
|
5821
5943
|
setIsInviteMode(false);
|
|
5822
5944
|
setInviteEmail("");
|
|
5823
|
-
}, 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:
|
|
5945
|
+
}, 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: () => {
|
|
5824
5946
|
setOrgName(initialOrgName || "");
|
|
5825
5947
|
setOrgSlug(initialOrgSlug || "");
|
|
5826
5948
|
setOrgAvatarUrl(initialOrgAvatarUrl || "");
|
|
5827
5949
|
setPendingOrgAvatar(null);
|
|
5828
|
-
}, className: "text-xs tracking-widest text-stone-400 hover:text-black transition-colors outline-none" }, "Cancel")))), activeTab === "ACCOUNT" && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 rounded-2xl p-6 bg-white w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React52.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => !isSavingProfile ? userFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React52.createElement(MemberAvatar3, { src: avatarUrl, status: "ACTIVE", sizeClass: "w-14 h-14" }), /* @__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-20" }, isUploadingUserAvatar ? /* @__PURE__ */ React52.createElement(HugeiconsIcon38, { icon:
|
|
5950
|
+
}, className: "text-xs tracking-widest text-stone-400 hover:text-black transition-colors outline-none" }, "Cancel")))), activeTab === "ACCOUNT" && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in duration-300" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 rounded-2xl p-6 bg-white w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React52.createElement("div", { className: "relative group cursor-pointer shrink-0", onClick: () => !isSavingProfile ? userFileInputRef.current?.click() : void 0 }, /* @__PURE__ */ React52.createElement(MemberAvatar3, { src: avatarUrl, status: "ACTIVE", sizeClass: "w-14 h-14" }), /* @__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-20" }, isUploadingUserAvatar ? /* @__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: userFileInputRef, className: "hidden", accept: ".png, .jpg, .jpeg", onChange: (e) => handleFileSelect(e, "USER") })), /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Personal Identity"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-stone-500" }, "Update your system display name and contact email.")))), /* @__PURE__ */ React52.createElement("form", { className: "flex flex-col gap-6 w-full max-w-5xl", onSubmit: handleSaveProfile, autoComplete: "off" }, /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "First Name", value: firstName, onChange: (v) => setFirstName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "First name", maxLength: 50 }), /* @__PURE__ */ React52.createElement(TextInput, { label: "Last Name", value: lastName, onChange: (v) => setLastName(v.replace(/[^a-zA-Z\s-]/g, "").substring(0, 50)), disabled: isSavingProfile, placeholder: "Last name", maxLength: 50 })), /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "Job Title", value: jobTitle, onChange: (v) => setJobTitle(v.substring(0, 50)), disabled: isSavingProfile, placeholder: "e.g. HR Manager, CEO", maxLength: 50 }), /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React52.createElement("input", { type: "email", value: initialEmail, disabled: true, className: "w-full pb-3 pt-3 text-sm bg-transparent text-stone-400 border-b border-stone-200 outline-none cursor-not-allowed" }))), /* @__PURE__ */ React52.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React52.createElement("label", { className: "text-xs text-stone-400 tracking-[0.2em] block" }, "About Me"), /* @__PURE__ */ React52.createElement(
|
|
5829
5951
|
"textarea",
|
|
5830
5952
|
{
|
|
5831
5953
|
value: description,
|
|
@@ -5839,13 +5961,13 @@ var UniversalSettings = ({
|
|
|
5839
5961
|
};
|
|
5840
5962
|
|
|
5841
5963
|
// src/components/UniversalCreateHuddle.tsx
|
|
5842
|
-
import React53, { useState as useState38, useEffect as
|
|
5964
|
+
import React53, { useState as useState38, useEffect as useEffect21, useRef as useRef15 } from "react";
|
|
5843
5965
|
import toast15 from "react-hot-toast";
|
|
5844
5966
|
import { HugeiconsIcon as HugeiconsIcon39 } from "@hugeicons/react";
|
|
5845
5967
|
import {
|
|
5846
5968
|
ArrowLeft01Icon as ArrowLeft01Icon19,
|
|
5847
5969
|
ArrowRight01Icon as ArrowRight01Icon14,
|
|
5848
|
-
Loading03Icon as
|
|
5970
|
+
Loading03Icon as Loading03Icon27,
|
|
5849
5971
|
Search01Icon as Search01Icon7,
|
|
5850
5972
|
Calendar01Icon as Calendar01Icon2,
|
|
5851
5973
|
Clock01Icon as Clock01Icon2,
|
|
@@ -5857,7 +5979,7 @@ var MemberAvatar4 = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
|
5857
5979
|
const [loaded, setLoaded] = useState38(false);
|
|
5858
5980
|
const [error, setError] = useState38(false);
|
|
5859
5981
|
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
5860
|
-
return /* @__PURE__ */ React53.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React53.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React53.createElement(HugeiconsIcon39, { icon:
|
|
5982
|
+
return /* @__PURE__ */ React53.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React53.createElement("div", { className: "w-full h-full rounded-lg bg-stone-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React53.createElement(HugeiconsIcon39, { icon: Loading03Icon27, className: "animate-spin text-stone-400 absolute", size: 14 }), /* @__PURE__ */ React53.createElement(
|
|
5861
5983
|
"img",
|
|
5862
5984
|
{
|
|
5863
5985
|
src: error || !src ? defaultAvatar : src,
|
|
@@ -5906,7 +6028,7 @@ var UniversalCreateHuddle = ({
|
|
|
5906
6028
|
const [title, setTitle] = useState38("");
|
|
5907
6029
|
const [isPrivate, setIsPrivate] = useState38(false);
|
|
5908
6030
|
const [timezone, setTimezone] = useState38("UTC");
|
|
5909
|
-
|
|
6031
|
+
useEffect21(() => {
|
|
5910
6032
|
try {
|
|
5911
6033
|
setTimezone(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
5912
6034
|
} catch (e) {
|
|
@@ -6047,7 +6169,7 @@ var UniversalCreateHuddle = ({
|
|
|
6047
6169
|
onChange: handleSearchInput,
|
|
6048
6170
|
className: "w-full pl-10 pr-4 py-2.5 bg-stone-100 rounded-full focus:border-[#d97757] border border-transparent text-sm text-black placeholder-stone-400 outline-none focus:bg-stone-200 transition-colors"
|
|
6049
6171
|
}
|
|
6050
|
-
))), /* @__PURE__ */ React53.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isMembersLoading || isTyping ? /* @__PURE__ */ React53.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React53.createElement(HugeiconsIcon39, { icon:
|
|
6172
|
+
))), /* @__PURE__ */ React53.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isMembersLoading || isTyping ? /* @__PURE__ */ React53.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React53.createElement(HugeiconsIcon39, { icon: Loading03Icon27, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React53.createElement("div", { className: "p-8 text-center text-xs text-stone-400" }, "No members found.") : members.map((member) => {
|
|
6051
6173
|
const isChecked = selectedParticipants.has(member.userId);
|
|
6052
6174
|
return /* @__PURE__ */ React53.createElement(
|
|
6053
6175
|
"div",
|
|
@@ -6079,13 +6201,13 @@ var UniversalCreateHuddle = ({
|
|
|
6079
6201
|
};
|
|
6080
6202
|
|
|
6081
6203
|
// src/components/HomeHuddleCalendar.tsx
|
|
6082
|
-
import React54, { useState as useState39, useRef as useRef16, useEffect as
|
|
6204
|
+
import React54, { useState as useState39, useRef as useRef16, useEffect as useEffect22 } from "react";
|
|
6083
6205
|
import { useRouter as useRouter4 } from "next/navigation";
|
|
6084
6206
|
import { HugeiconsIcon as HugeiconsIcon40 } from "@hugeicons/react";
|
|
6085
6207
|
import {
|
|
6086
6208
|
ArrowLeft01Icon as ArrowLeft01Icon20,
|
|
6087
6209
|
ArrowRight01Icon as ArrowRight01Icon15,
|
|
6088
|
-
Loading03Icon as
|
|
6210
|
+
Loading03Icon as Loading03Icon28,
|
|
6089
6211
|
Search01Icon as Search01Icon8,
|
|
6090
6212
|
TimeScheduleIcon
|
|
6091
6213
|
} from "@hugeicons/core-free-icons";
|
|
@@ -6115,7 +6237,7 @@ var HuddleAvatar2 = ({ timeString, status, sizeClass = "w-10 h-10" }) => {
|
|
|
6115
6237
|
month = parts[1].substring(0, 3).toUpperCase();
|
|
6116
6238
|
}
|
|
6117
6239
|
}
|
|
6118
|
-
return /* @__PURE__ */ React54.createElement("div", { className: `relative shrink-0 aspect-square ${sizeClass}` }, /* @__PURE__ */ React54.createElement("div", { className: "w-full h-full aspect-square rounded-lg bg-neutral-
|
|
6240
|
+
return /* @__PURE__ */ React54.createElement("div", { className: `relative shrink-0 aspect-square ${sizeClass}` }, /* @__PURE__ */ React54.createElement("div", { className: "w-full h-full aspect-square rounded-lg bg-neutral-50 flex flex-col items-center justify-center overflow-hidden" }, /* @__PURE__ */ React54.createElement("span", { className: "text-[9px] tracking-wider leading-tight", style: { color: "#d97757" } }, month), /* @__PURE__ */ React54.createElement("span", { className: "text-sm text-black leading-tight" }, day)), /* @__PURE__ */ React54.createElement("div", { className: `absolute -bottom-1 -right-1 w-3 h-3 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
|
|
6119
6241
|
};
|
|
6120
6242
|
var HomeHuddleCalendar = ({
|
|
6121
6243
|
huddles = [],
|
|
@@ -6133,7 +6255,7 @@ var HomeHuddleCalendar = ({
|
|
|
6133
6255
|
const [isStatusModalOpen, setIsStatusModalOpen] = useState39(false);
|
|
6134
6256
|
const typingTimer = useRef16(null);
|
|
6135
6257
|
const isSearching = localSearch.trim().length > 0;
|
|
6136
|
-
|
|
6258
|
+
useEffect22(() => {
|
|
6137
6259
|
setLocalSearch(searchQuery);
|
|
6138
6260
|
}, [searchQuery]);
|
|
6139
6261
|
const handleSearchInput = (e) => {
|
|
@@ -6192,7 +6314,7 @@ var HomeHuddleCalendar = ({
|
|
|
6192
6314
|
onChange: handleSearchInput,
|
|
6193
6315
|
className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-sm text-black placeholder-stone-400 outline-none transition-colors focus:border-[#d97757] border border-transparent hover:border-stone-200"
|
|
6194
6316
|
}
|
|
6195
|
-
)), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React54.createElement("button", { onClick: () => setIsStatusModalOpen(true), className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none " }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: TimeScheduleIcon, size: 16 }))))), !isSearching && /* @__PURE__ */ React54.createElement("div", { className: "bg-white rounded-2xl p-5 mb-6 relative overflow-hidden animate-in fade-in duration-300" }, isLoading && /* @__PURE__ */ React54.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-white/60 backdrop-blur-sm" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon:
|
|
6317
|
+
)), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-3 w-auto pb-0 shrink-0" }, /* @__PURE__ */ React54.createElement("button", { onClick: () => setIsStatusModalOpen(true), className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-stone-500 hover:text-black transition-colors outline-none " }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: TimeScheduleIcon, size: 16 }))))), !isSearching && /* @__PURE__ */ React54.createElement("div", { className: "bg-white rounded-2xl p-5 mb-6 relative overflow-hidden animate-in fade-in duration-300" }, isLoading && /* @__PURE__ */ React54.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-white/60 backdrop-blur-sm" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: Loading03Icon28, size: 28, className: "animate-spin text-black" })), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center justify-between px-2 mb-4" }, /* @__PURE__ */ React54.createElement("span", { className: "text-sm text-black tracking-wide" }, MONTHS2[viewMonth], " ", viewYear), /* @__PURE__ */ React54.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React54.createElement(
|
|
6196
6318
|
"button",
|
|
6197
6319
|
{
|
|
6198
6320
|
onClick: handlePrevMonth,
|
|
@@ -6228,7 +6350,7 @@ var HomeHuddleCalendar = ({
|
|
|
6228
6350
|
dayEventsCount
|
|
6229
6351
|
)
|
|
6230
6352
|
));
|
|
6231
|
-
}))), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-4 bg-white rounded-2xl p-6 relative min-h-37.5" }, /* @__PURE__ */ React54.createElement("div", { className: "flex items-center justify-between pb-4" }, /* @__PURE__ */ React54.createElement("h3", { className: "text-sm text-black " }, isSearching ? "Search Results" : `Events for ${selectedDate.toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" })}`), /* @__PURE__ */ React54.createElement("span", { className: "text-[10px] uppercase tracking-widest text-stone-400 " }, displayedEvents.length, " ", displayedEvents.length === 1 ? "Session" : "Sessions")), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col min-w-0 pt-2" }, isLoading ? /* @__PURE__ */ React54.createElement("div", { className: "py-8 flex flex-col items-center justify-center text-center" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon:
|
|
6353
|
+
}))), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-4 bg-white rounded-2xl p-6 relative min-h-37.5" }, /* @__PURE__ */ React54.createElement("div", { className: "flex items-center justify-between pb-4" }, /* @__PURE__ */ React54.createElement("h3", { className: "text-sm text-black " }, isSearching ? "Search Results" : `Events for ${selectedDate.toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" })}`), /* @__PURE__ */ React54.createElement("span", { className: "text-[10px] uppercase tracking-widest text-stone-400 " }, displayedEvents.length, " ", displayedEvents.length === 1 ? "Session" : "Sessions")), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col min-w-0 pt-2" }, isLoading ? /* @__PURE__ */ React54.createElement("div", { className: "py-8 flex flex-col items-center justify-center text-center" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon40, { icon: Loading03Icon28, size: 28, className: "animate-spin text-stone-400" })) : displayedEvents.length === 0 ? /* @__PURE__ */ React54.createElement("div", { className: "py-8 flex flex-col items-center justify-center text-center" }, /* @__PURE__ */ React54.createElement("p", { className: "text-xs text-stone-400" }, isSearching ? "No sessions found for this search." : "No sessions scheduled for this date.")) : displayedEvents.map((huddle) => /* @__PURE__ */ React54.createElement(
|
|
6232
6354
|
"div",
|
|
6233
6355
|
{
|
|
6234
6356
|
key: huddle.id,
|