@retinalabsllc/zairusjs 17.2.1 → 17.2.6
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 +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +332 -82
- package/dist/index.mjs +347 -90
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5415,24 +5415,280 @@ var UniversalHome2 = ({
|
|
|
5415
5415
|
))))));
|
|
5416
5416
|
};
|
|
5417
5417
|
|
|
5418
|
+
// src/components/OpenBidHome.tsx
|
|
5419
|
+
import React53, { useState as useState39, useRef as useRef14, useEffect as useEffect21 } from "react";
|
|
5420
|
+
import { HugeiconsIcon as HugeiconsIcon40 } from "@hugeicons/react";
|
|
5421
|
+
import {
|
|
5422
|
+
Loading03Icon as Loading03Icon25,
|
|
5423
|
+
Search01Icon as Search01Icon7,
|
|
5424
|
+
ArrowRight01Icon as ArrowRight01Icon14,
|
|
5425
|
+
ArrowLeft01Icon as ArrowLeft01Icon18,
|
|
5426
|
+
StarIcon,
|
|
5427
|
+
Link01Icon,
|
|
5428
|
+
ListSettingIcon as ListSettingIcon3
|
|
5429
|
+
} from "@hugeicons/core-free-icons";
|
|
5430
|
+
|
|
5431
|
+
// src/components/OptionWithIcon.tsx
|
|
5432
|
+
import React52, { useState as useState38 } from "react";
|
|
5433
|
+
import { HugeiconsIcon as HugeiconsIcon39 } from "@hugeicons/react";
|
|
5434
|
+
import { CancelCircleIcon as CancelCircleIcon12, Search01Icon as Search01Icon6 } from "@hugeicons/core-free-icons";
|
|
5435
|
+
var OptionWithIcon = ({
|
|
5436
|
+
isOpen,
|
|
5437
|
+
onClose,
|
|
5438
|
+
title,
|
|
5439
|
+
options,
|
|
5440
|
+
selectedOption,
|
|
5441
|
+
onSelect,
|
|
5442
|
+
showSearch = false
|
|
5443
|
+
}) => {
|
|
5444
|
+
const [searchQuery, setSearchQuery] = useState38("");
|
|
5445
|
+
if (!isOpen) return null;
|
|
5446
|
+
const filteredOptions = options.filter(
|
|
5447
|
+
(opt) => opt.label.toLowerCase().includes(searchQuery.toLowerCase())
|
|
5448
|
+
);
|
|
5449
|
+
return /* @__PURE__ */ React52.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: onClose }), /* @__PURE__ */ React52.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 max-h-[80vh]" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React52.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, title), /* @__PURE__ */ React52.createElement("button", { onClick: onClose, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon39, { icon: CancelCircleIcon12, size: 18 }))), showSearch && /* @__PURE__ */ React52.createElement("div", { className: "p-4 shrink-0 " }, /* @__PURE__ */ React52.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon39, { icon: Search01Icon6, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React52.createElement(
|
|
5450
|
+
"input",
|
|
5451
|
+
{
|
|
5452
|
+
type: "text",
|
|
5453
|
+
placeholder: "Search...",
|
|
5454
|
+
value: searchQuery,
|
|
5455
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
5456
|
+
className: "w-full pl-10 pr-4 py-2.5 bg-neutral-100 rounded-full text-[12px] text-black placeholder-neutral-400 outline-none focus:bg-neutral-200 transition-colors"
|
|
5457
|
+
}
|
|
5458
|
+
))), /* @__PURE__ */ React52.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, filteredOptions.length === 0 ? /* @__PURE__ */ React52.createElement("div", { className: "p-6 text-center text-[12px] text-neutral-400" }, "No options found.") : filteredOptions.map((opt) => {
|
|
5459
|
+
const isSelected = selectedOption.label === opt.label;
|
|
5460
|
+
return /* @__PURE__ */ React52.createElement(
|
|
5461
|
+
"button",
|
|
5462
|
+
{
|
|
5463
|
+
key: opt.label,
|
|
5464
|
+
onClick: () => {
|
|
5465
|
+
onSelect(opt);
|
|
5466
|
+
onClose();
|
|
5467
|
+
},
|
|
5468
|
+
className: `w-full flex items-center gap-3 p-4 text-[12px] tracking-tight rounded-full transition-colors outline-none ${isSelected ? "text-[#068afe] bg-[#068afe]/10" : "text-neutral-600 hover:bg-neutral-50/50"}`
|
|
5469
|
+
},
|
|
5470
|
+
opt.icon && /* @__PURE__ */ React52.createElement(HugeiconsIcon39, { icon: opt.icon, size: 16, className: isSelected ? "text-[#068afe]" : "text-neutral-400" }),
|
|
5471
|
+
/* @__PURE__ */ React52.createElement("span", null, opt.label.charAt(0).toUpperCase() + opt.label.slice(1).toLowerCase())
|
|
5472
|
+
);
|
|
5473
|
+
}))));
|
|
5474
|
+
};
|
|
5475
|
+
|
|
5476
|
+
// src/components/OpenBidHome.tsx
|
|
5477
|
+
var CATEGORIES = [
|
|
5478
|
+
{ label: "Leaderboards & Attention", icon: StarIcon },
|
|
5479
|
+
{ label: "SEO & AI Visibility", icon: Search01Icon7 },
|
|
5480
|
+
{ label: "AI Agents & Infrastructure", icon: Link01Icon },
|
|
5481
|
+
{ label: "Marketing & Advertising", icon: StarIcon },
|
|
5482
|
+
{ label: "Developer Tools", icon: ListSettingIcon3 },
|
|
5483
|
+
{ label: "Crypto, Web3 & Investing", icon: StarIcon }
|
|
5484
|
+
];
|
|
5485
|
+
var SiteAvatar = ({ src, sizeClass = "w-9 h-9" }) => {
|
|
5486
|
+
const [loaded, setLoaded] = useState39(false);
|
|
5487
|
+
const [error, setError] = useState39(false);
|
|
5488
|
+
return /* @__PURE__ */ React53.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React53.createElement("div", { className: "w-full h-full flex items-center justify-center overflow-hidden" }, !loaded && !error && src && /* @__PURE__ */ React53.createElement(HugeiconsIcon40, { icon: Loading03Icon25, className: "animate-spin text-neutral-400 absolute", size: 14 }), error || !src ? /* @__PURE__ */ React53.createElement(HugeiconsIcon40, { icon: StarIcon, className: "text-neutral-300", size: 18 }) : /* @__PURE__ */ React53.createElement(
|
|
5489
|
+
"img",
|
|
5490
|
+
{
|
|
5491
|
+
src,
|
|
5492
|
+
alt: "Site icon",
|
|
5493
|
+
className: `w-full h-full object-cover transition-opacity duration-300 ${loaded ? "opacity-100" : "opacity-0"}`,
|
|
5494
|
+
onLoad: () => setLoaded(true),
|
|
5495
|
+
onError: () => setError(true)
|
|
5496
|
+
}
|
|
5497
|
+
)));
|
|
5498
|
+
};
|
|
5499
|
+
var AnimatedCounter = ({ value }) => {
|
|
5500
|
+
const [count, setCount] = useState39(0);
|
|
5501
|
+
useEffect21(() => {
|
|
5502
|
+
let startTimestamp = 0;
|
|
5503
|
+
const duration = 2e3;
|
|
5504
|
+
let animationFrameId;
|
|
5505
|
+
const step = (timestamp) => {
|
|
5506
|
+
if (!startTimestamp) startTimestamp = timestamp;
|
|
5507
|
+
const progress = Math.min((timestamp - startTimestamp) / duration, 1);
|
|
5508
|
+
const easeProgress = progress === 1 ? 1 : 1 - Math.pow(2, -10 * progress);
|
|
5509
|
+
setCount(Math.floor(easeProgress * value));
|
|
5510
|
+
if (progress < 1) {
|
|
5511
|
+
animationFrameId = window.requestAnimationFrame(step);
|
|
5512
|
+
}
|
|
5513
|
+
};
|
|
5514
|
+
animationFrameId = window.requestAnimationFrame(step);
|
|
5515
|
+
return () => window.cancelAnimationFrame(animationFrameId);
|
|
5516
|
+
}, [value]);
|
|
5517
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, count.toLocaleString());
|
|
5518
|
+
};
|
|
5519
|
+
var SkeletonRow = () => /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-3 p-3 md:p-4 rounded-2xl mb-2" }, /* @__PURE__ */ React53.createElement("div", { className: "w-10 h-10 md:w-14 md:h-14 rounded-xl bg-neutral-200 animate-pulse shrink-0" }), /* @__PURE__ */ React53.createElement("div", { className: "flex-1 flex flex-col gap-3" }, /* @__PURE__ */ React53.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React53.createElement("div", { className: "h-4 bg-neutral-200 rounded w-1/3 animate-pulse" }), /* @__PURE__ */ React53.createElement("div", { className: "h-4 bg-neutral-200 rounded w-16 animate-pulse" })), /* @__PURE__ */ React53.createElement("div", { className: "h-3 bg-neutral-200 rounded w-2/3 animate-pulse" })));
|
|
5520
|
+
function OpenBidHome({
|
|
5521
|
+
data,
|
|
5522
|
+
latestActivity,
|
|
5523
|
+
isLoading,
|
|
5524
|
+
currentPage,
|
|
5525
|
+
totalPages,
|
|
5526
|
+
totalItems,
|
|
5527
|
+
onPageChange,
|
|
5528
|
+
totalProcessedAmount,
|
|
5529
|
+
inputFaviconSrc,
|
|
5530
|
+
onIdentityChange,
|
|
5531
|
+
onOutbidSubmit,
|
|
5532
|
+
isSubmitting,
|
|
5533
|
+
onlineCount = 0,
|
|
5534
|
+
visitorCount = 0
|
|
5535
|
+
}) {
|
|
5536
|
+
const topRef = useRef14(null);
|
|
5537
|
+
const [bidAmount, setBidAmount] = useState39(3134);
|
|
5538
|
+
const [identity, setIdentity] = useState39("");
|
|
5539
|
+
const [selectedCategory, setSelectedCategory] = useState39(CATEGORIES[0]);
|
|
5540
|
+
const [isCategoryModalOpen, setIsCategoryModalOpen] = useState39(false);
|
|
5541
|
+
const [isActivityExpanded, setIsActivityExpanded] = useState39(false);
|
|
5542
|
+
const handleBidChange = (delta) => {
|
|
5543
|
+
setBidAmount((prev) => Math.max(5, prev + delta));
|
|
5544
|
+
};
|
|
5545
|
+
const handleClaimRankClick = (requiredAmount) => {
|
|
5546
|
+
setBidAmount(requiredAmount);
|
|
5547
|
+
topRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
5548
|
+
const input = document.getElementById("identity-input");
|
|
5549
|
+
if (input) input.focus();
|
|
5550
|
+
};
|
|
5551
|
+
const handleSubmit = (e) => {
|
|
5552
|
+
e.preventDefault();
|
|
5553
|
+
onOutbidSubmit(identity, bidAmount, selectedCategory.label);
|
|
5554
|
+
};
|
|
5555
|
+
const handleIdentityChange = (e) => {
|
|
5556
|
+
const val = e.target.value;
|
|
5557
|
+
setIdentity(val);
|
|
5558
|
+
onIdentityChange(val);
|
|
5559
|
+
};
|
|
5560
|
+
return /* @__PURE__ */ React53.createElement("div", { className: "w-full max-w-4xl mx-auto flex flex-col px-4 pt-12 pb-24 animate-in fade-in duration-300" }, /* @__PURE__ */ React53.createElement("header", { className: "mb-12 px-2 text-center", ref: topRef }, /* @__PURE__ */ React53.createElement("div", { className: "inline-block max-w-full bg-white rounded-full px-4 py-2 text-xs text-neutral-500 transition-colors hover:text-black cursor-pointer leading-relaxed text-balance" }, /* @__PURE__ */ React53.createElement("span", { className: "inline-flex items-center gap-1.5 text-emerald-600 align-text-bottom whitespace-nowrap" }, /* @__PURE__ */ React53.createElement("span", { className: "relative flex h-2 w-2 shrink-0" }, /* @__PURE__ */ React53.createElement("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75" }), /* @__PURE__ */ React53.createElement("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-emerald-500" })), /* @__PURE__ */ React53.createElement("span", null, onlineCount.toLocaleString(), " online")), /* @__PURE__ */ React53.createElement("span", { className: "mx-1.5" }, "\xB7"), /* @__PURE__ */ React53.createElement("span", null, visitorCount.toLocaleString(), " visitors since launch"), /* @__PURE__ */ React53.createElement("span", { className: "mx-1.5" }, "\xB7"), /* @__PURE__ */ React53.createElement("span", { className: "text-black underline decoration-neutral-300 hover:decoration-black transition-colors whitespace-nowrap" }, "Live stats"))), /* @__PURE__ */ React53.createElement("section", { className: "flex flex-col items-center mb-16" }, /* @__PURE__ */ React53.createElement("h2", { className: "flex flex-wrap items-center justify-center gap-x-3 text-center text-3xl md:text-5xl tracking-tight text-black mb-3" }, /* @__PURE__ */ React53.createElement("span", null, "Claim #1 for"), /* @__PURE__ */ React53.createElement("span", { className: "inline-flex items-center gap-3 bg-neutral-100 rounded-full p-1.5 border border-neutral-200" }, /* @__PURE__ */ React53.createElement("button", { onClick: () => handleBidChange(-1), type: "button", className: "w-8 h-8 md:w-10 md:h-10 flex items-center justify-center rounded-full bg-white text-black hover:bg-neutral-50 transition-colors outline-none text-lg" }, "\u2212"), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center tracking-tight px-2 w-24 justify-center" }, /* @__PURE__ */ React53.createElement("span", { className: "text-[#068afe] mr-0.5" }, "$"), /* @__PURE__ */ React53.createElement(
|
|
5561
|
+
"input",
|
|
5562
|
+
{
|
|
5563
|
+
type: "number",
|
|
5564
|
+
value: bidAmount,
|
|
5565
|
+
onChange: (e) => setBidAmount(Number(e.target.value)),
|
|
5566
|
+
className: "w-full bg-transparent p-0 outline-none text-center tabular-nums text-[#068afe] "
|
|
5567
|
+
}
|
|
5568
|
+
)), /* @__PURE__ */ React53.createElement("button", { onClick: () => handleBidChange(1), type: "button", className: "w-8 h-8 md:w-10 md:h-10 flex items-center justify-center rounded-full bg-white text-black hover:bg-neutral-50 transition-colors outline-none text-lg" }, "+"))), /* @__PURE__ */ React53.createElement("p", { className: "text-center text-sm text-neutral-500 max-w-md" }, /* @__PURE__ */ React53.createElement("span", { className: "text-[#068afe]" }, "New spots start at $5."), " Paying less than the #1 price puts you on the board at whatever rank your bid secures."), /* @__PURE__ */ React53.createElement("form", { onSubmit: handleSubmit, className: "mt-8 flex flex-col md:flex-row items-stretch md:items-center gap-3 w-full max-w-3xl bg-white p-2 rounded-2xl md:rounded-full" }, /* @__PURE__ */ React53.createElement("div", { className: "relative flex-1 min-w-0" }, /* @__PURE__ */ React53.createElement("div", { className: "absolute inset-y-0 left-0 pl-3 md:pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React53.createElement("div", { className: "w-7 h-7 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden" }, inputFaviconSrc ? /* @__PURE__ */ React53.createElement("img", { src: inputFaviconSrc, alt: "", className: "w-full h-full object-cover" }) : /* @__PURE__ */ React53.createElement(HugeiconsIcon40, { icon: Link01Icon, size: 14, className: "text-neutral-400" }))), /* @__PURE__ */ React53.createElement(
|
|
5569
|
+
"input",
|
|
5570
|
+
{
|
|
5571
|
+
id: "identity-input",
|
|
5572
|
+
type: "text",
|
|
5573
|
+
placeholder: "Your product URL or @handle",
|
|
5574
|
+
value: identity,
|
|
5575
|
+
onChange: handleIdentityChange,
|
|
5576
|
+
required: true,
|
|
5577
|
+
className: "w-full pl-12 md:pl-14 pr-4 h-12 bg-transparent text-sm text-black placeholder-neutral-400 outline-none transition-colors"
|
|
5578
|
+
}
|
|
5579
|
+
)), /* @__PURE__ */ React53.createElement("div", { className: "h-px w-full md:h-8 md:w-px bg-neutral-200 hidden md:block" }), /* @__PURE__ */ React53.createElement("div", { className: "min-w-0 md:w-64 shrink-0" }, /* @__PURE__ */ React53.createElement(
|
|
5580
|
+
"button",
|
|
5581
|
+
{
|
|
5582
|
+
type: "button",
|
|
5583
|
+
onClick: () => setIsCategoryModalOpen(true),
|
|
5584
|
+
className: "flex items-center justify-between w-full gap-2 h-12 px-4 bg-transparent outline-none text-sm text-black hover:text-black"
|
|
5585
|
+
},
|
|
5586
|
+
/* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-2 truncate" }, selectedCategory.icon && /* @__PURE__ */ React53.createElement(HugeiconsIcon40, { icon: selectedCategory.icon, size: 16, className: "text-[#068afe] shrink-0" }), /* @__PURE__ */ React53.createElement("span", { className: "truncate" }, selectedCategory.label)),
|
|
5587
|
+
/* @__PURE__ */ React53.createElement(HugeiconsIcon40, { icon: ListSettingIcon3, size: 16, className: "text-neutral-400 shrink-0" })
|
|
5588
|
+
)), /* @__PURE__ */ React53.createElement(
|
|
5589
|
+
ThreeDActionButton,
|
|
5590
|
+
{
|
|
5591
|
+
type: "submit",
|
|
5592
|
+
isLoading: isSubmitting,
|
|
5593
|
+
disabled: !identity || isSubmitting,
|
|
5594
|
+
className: "h-12 px-8 min-w-30 w-full md:w-auto md:rounded-full"
|
|
5595
|
+
},
|
|
5596
|
+
"Place Bid"
|
|
5597
|
+
)), /* @__PURE__ */ React53.createElement("p", { className: "mt-4 text-xs text-neutral-400" }, "Already on the list? Enter the same URL to increase your bid.")), /* @__PURE__ */ React53.createElement("div", { className: "mb-6 relative" }, /* @__PURE__ */ React53.createElement("div", { className: "flex overflow-x-auto gap-2 pb-2 custom-scrollbar items-center" }, /* @__PURE__ */ React53.createElement("button", { className: "flex items-center gap-1.5 px-4 py-1.5 rounded-full border border-black bg-black text-white text-xs shrink-0 whitespace-nowrap transition-colors outline-none" }, "All"), CATEGORIES.map((cat) => /* @__PURE__ */ React53.createElement("button", { key: cat.label, className: "flex items-center gap-1.5 px-4 py-2 rounded-full bg-white text-black hover:bg-neutral-50 text-xs shrink-0 whitespace-nowrap transition-colors outline-none" }, cat.icon && /* @__PURE__ */ React53.createElement(HugeiconsIcon40, { icon: cat.icon, size: 14, className: "text-neutral-400" }), cat.label))), /* @__PURE__ */ React53.createElement("div", { className: "absolute inset-y-0 right-0 w-12 bg-linear-to-l from-neutral-100 to-transparent pointer-events-none" })), /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col relative w-full" }, isLoading ? /* @__PURE__ */ React53.createElement(React53.Fragment, null, Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ React53.createElement(SkeletonRow, { key: `skel-${i}` }))) : data.length === 0 ? /* @__PURE__ */ React53.createElement("div", { className: "text-center py-12 text-sm text-neutral-500" }, "No data") : data.map((item, index) => {
|
|
5598
|
+
const requiredBid = item.amount + 1;
|
|
5599
|
+
const isRank1 = item.rank === 1;
|
|
5600
|
+
const isRank2 = item.rank === 2;
|
|
5601
|
+
const isRank3 = item.rank === 3;
|
|
5602
|
+
const showActivity = item.rank === 4 || data.length < 4 && index === data.length - 1;
|
|
5603
|
+
let cardClasses = "";
|
|
5604
|
+
let numClasses = "";
|
|
5605
|
+
if (isRank1) {
|
|
5606
|
+
cardClasses = "bg-[#068afe]/20 rounded-2xl md:px-4 px-3 py-2 md:py-3 my-1.5 md:my-3";
|
|
5607
|
+
numClasses = "bg-[#068afe] text-white";
|
|
5608
|
+
} else if (isRank2) {
|
|
5609
|
+
cardClasses = "bg-[#068afe]/10 rounded-2xl md:px-4 px-3 py-2 md:py-3 my-1.5 md:my-3";
|
|
5610
|
+
numClasses = "bg-[#068afe] text-white";
|
|
5611
|
+
} else if (isRank3) {
|
|
5612
|
+
cardClasses = "bg-[#068afe]/5 rounded-2xl md:px-4 px-3 py-2 md:py-3 my-1.5 md:my-3";
|
|
5613
|
+
numClasses = "bg-[#068afe] text-white";
|
|
5614
|
+
} else {
|
|
5615
|
+
cardClasses = "border-t border-neutral-200 bg-transparent px-3 md:px-4 py-3 md:py-4 rounded-none";
|
|
5616
|
+
numClasses = "text-neutral-400 bg-transparent";
|
|
5617
|
+
}
|
|
5618
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, { key: item.id }, showActivity && /* @__PURE__ */ React53.createElement("div", { className: "my-6 md:my-8 bg-white rounded-2xl p-4 md:p-5 relative" }, /* @__PURE__ */ React53.createElement("h2", { className: "text-sm mb-3 flex items-center gap-2" }, /* @__PURE__ */ React53.createElement("span", { className: "relative flex h-2 w-2" }, /* @__PURE__ */ React53.createElement("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-[#068afe] opacity-75" }), /* @__PURE__ */ React53.createElement("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-[#068afe]" })), "Latest activity"), latestActivity.length === 0 ? /* @__PURE__ */ React53.createElement("div", { className: "text-center py-6 text-sm text-neutral-400" }, "No data") : /* @__PURE__ */ React53.createElement("div", { className: `relative ${!isActivityExpanded ? "max-h-18 md:max-h-22 overflow-hidden md:overflow-visible" : ""}` }, /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col md:grid md:grid-cols-5 md:gap-2" }, latestActivity.map((act, idx) => /* @__PURE__ */ React53.createElement("div", { key: act.id, className: `flex flex-row items-center gap-3 py-2 md:p-3 md:rounded-2xl md:bg-neutral-50 md:hover:bg-neutral-100 transition-colors ${idx !== 0 ? "border-t border-neutral-100 md:border-0" : ""}` }, /* @__PURE__ */ React53.createElement(SiteAvatar, { src: act.favicon, sizeClass: "w-7 h-7 shrink-0" }), /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React53.createElement("p", { className: "text-xs text-black truncate" }, act.name), /* @__PURE__ */ React53.createElement("p", { className: "text-[10px] text-neutral-500 mt-0.5" }, "at #", act.rank, " \xB7 $", act.amount), /* @__PURE__ */ React53.createElement("p", { className: "text-[9px] text-neutral-400 mt-0.5" }, act.time))))), !isActivityExpanded && /* @__PURE__ */ React53.createElement("div", { className: "absolute inset-x-0 bottom-0 h-16 bg-linear-to-t from-white via-white/90 to-transparent pointer-events-none md:hidden flex items-end justify-center pb-1" }, /* @__PURE__ */ React53.createElement(
|
|
5619
|
+
"button",
|
|
5620
|
+
{
|
|
5621
|
+
onClick: () => setIsActivityExpanded(true),
|
|
5622
|
+
className: "pointer-events-auto px-4 py-1.5 bg-white border border-neutral-200 rounded-full text-[11px] outline-none"
|
|
5623
|
+
},
|
|
5624
|
+
"Show more"
|
|
5625
|
+
))), isActivityExpanded && latestActivity.length > 0 && /* @__PURE__ */ React53.createElement("div", { className: "mt-4 flex justify-center md:hidden" }, /* @__PURE__ */ React53.createElement(
|
|
5626
|
+
"button",
|
|
5627
|
+
{
|
|
5628
|
+
onClick: () => setIsActivityExpanded(false),
|
|
5629
|
+
className: "px-4 py-1.5 bg-white border border-neutral-200 rounded-full text-[11px] outline-none"
|
|
5630
|
+
},
|
|
5631
|
+
"Show less"
|
|
5632
|
+
))), /* @__PURE__ */ React53.createElement("div", { className: `group relative flex items-center justify-between transition-colors duration-300 ${cardClasses}` }, /* @__PURE__ */ React53.createElement("a", { href: item.url, target: "_blank", rel: "noopener noreferrer", className: "absolute inset-0 z-0 outline-none" }), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-3 md:gap-4 flex-1 min-w-0 z-10 pointer-events-none group-hover:text-[#068afe]" }, /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col md:flex-row items-center gap-2 md:gap-3 shrink-0" }, /* @__PURE__ */ React53.createElement("span", { className: `inline-flex items-center justify-center tabular-nums min-w-7 md:min-w-10 px-2 py-0.5 md:py-1 rounded-full text-[11px] md:text-xs ${numClasses}` }, "#", item.rank), /* @__PURE__ */ React53.createElement(SiteAvatar, { src: item.favicon })), /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col min-w-0 flex-1 transition-opacity duration-300" }, /* @__PURE__ */ React53.createElement("div", { className: "flex items-baseline gap-2 mb-0.5" }, /* @__PURE__ */ React53.createElement("p", { className: "text-black group-hover:text-[#068afe] text-sm truncate tracking-tight" }, item.name), /* @__PURE__ */ React53.createElement("p", { className: "text-[#068afe] text-[12px] shrink-0 tabular-nums" }, "$", item.amount.toLocaleString())), /* @__PURE__ */ React53.createElement("p", { className: "text-neutral-500 text-xs line-clamp-1 md:line-clamp-2 leading-relaxed" }, item.desc), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-2 mt-1.5 text-[10px] md:text-[11px] text-neutral-400 " }, /* @__PURE__ */ React53.createElement("span", null, item.time), /* @__PURE__ */ React53.createElement("span", { className: "flex items-center gap-1 text-black" }, /* @__PURE__ */ React53.createElement("span", { className: "relative flex h-1.5 w-1.5" }, /* @__PURE__ */ React53.createElement("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-[#068afe] opacity-75" }), /* @__PURE__ */ React53.createElement("span", { className: "relative inline-flex rounded-full h-1.5 w-1.5 bg-[#068afe]" })), item.clicks, " clicks")))), /* @__PURE__ */ React53.createElement("div", { className: "absolute left-1/2 -translate-x-1/2 top-0 -translate-y-1/2 z-20 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity duration-200" }, /* @__PURE__ */ React53.createElement(
|
|
5633
|
+
"button",
|
|
5634
|
+
{
|
|
5635
|
+
onClick: (e) => {
|
|
5636
|
+
e.stopPropagation();
|
|
5637
|
+
handleClaimRankClick(requiredBid);
|
|
5638
|
+
},
|
|
5639
|
+
className: "px-3 py-0.5 bg-[#068afe] text-white text-[11px] md:text-xs whitespace-nowrap rounded-full outline-none pointer-events-auto hover:bg-[#0575d9] transition-colors"
|
|
5640
|
+
},
|
|
5641
|
+
"claim this rank for $",
|
|
5642
|
+
requiredBid
|
|
5643
|
+
))), item.rank === 10 && /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-3 py-6 px-4" }, /* @__PURE__ */ React53.createElement("div", { className: "h-0.5 flex-1 bg-[#068afe]/20 rounded-full" }), /* @__PURE__ */ React53.createElement("span", { className: "text-xs tracking-widest text-[#068afe] px-3 py-1 bg-[#068afe]/10 border border-[#068afe]/20 rounded-full" }, "Top 10"), /* @__PURE__ */ React53.createElement("div", { className: "h-0.5 flex-1 bg-[#068afe]/20 rounded-full" })), item.rank === 20 && /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-3 py-6 px-4" }, /* @__PURE__ */ React53.createElement("div", { className: "h-0.5 flex-1 bg-[#068afe]/20 rounded-full" }), /* @__PURE__ */ React53.createElement("span", { className: "text-xs tracking-widest text-[#068afe] px-3 py-1 bg-[#068afe]/10 border border-[#068afe]/20 rounded-full" }, "Top 20"), /* @__PURE__ */ React53.createElement("div", { className: "h-0.5 flex-1 bg-[#068afe]/20 rounded-full" })));
|
|
5644
|
+
})), !isLoading && data.length > 0 && /* @__PURE__ */ React53.createElement("div", { className: "mt-12 flex flex-col items-center gap-3" }, /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React53.createElement(
|
|
5645
|
+
"button",
|
|
5646
|
+
{
|
|
5647
|
+
disabled: currentPage <= 1,
|
|
5648
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
5649
|
+
className: "w-10 h-10 flex items-center justify-center rounded-full bg-white text-black hover:bg-neutral-50 disabled:text-neutral-300 disabled:bg-white outline-none transition-colors"
|
|
5650
|
+
},
|
|
5651
|
+
/* @__PURE__ */ React53.createElement(HugeiconsIcon40, { icon: ArrowLeft01Icon18, size: 16 })
|
|
5652
|
+
), /* @__PURE__ */ React53.createElement("span", { className: "w-10 h-10 flex items-center justify-center rounded-full bg-black text-white text-sm outline-none" }, currentPage), /* @__PURE__ */ React53.createElement(
|
|
5653
|
+
"button",
|
|
5654
|
+
{
|
|
5655
|
+
disabled: currentPage >= totalPages,
|
|
5656
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
5657
|
+
className: "w-10 h-10 flex items-center justify-center rounded-full bg-white text-black hover:bg-neutral-50 disabled:text-neutral-300 disabled:bg-white outline-none transition-colors"
|
|
5658
|
+
},
|
|
5659
|
+
/* @__PURE__ */ React53.createElement(HugeiconsIcon40, { icon: ArrowRight01Icon14, size: 16 })
|
|
5660
|
+
)), /* @__PURE__ */ React53.createElement("p", { className: "text-[11px] text-neutral-400 tracking-widest mt-1" }, Math.min((currentPage - 1) * 50 + 1, totalItems), " - ", Math.min(currentPage * 50, totalItems), " of ", totalItems)), /* @__PURE__ */ React53.createElement("section", { className: "mt-8 flex flex-col items-center" }, /* @__PURE__ */ React53.createElement("p", { className: "mb-4 text-xs tracking-widest text-neutral-400" }), /* @__PURE__ */ React53.createElement("div", { className: "bg-white rounded-full px-10 py-3 flex items-baseline justify-center tracking-tighter text-4xl text-black" }, /* @__PURE__ */ React53.createElement("span", { className: "text-[#068afe] mr-2" }, "$"), /* @__PURE__ */ React53.createElement(AnimatedCounter, { value: totalProcessedAmount })), /* @__PURE__ */ React53.createElement("p", { className: "mt-4 text-xs tracking-widest text-neutral-400" }, "Total Processed")), /* @__PURE__ */ React53.createElement(
|
|
5661
|
+
OptionWithIcon,
|
|
5662
|
+
{
|
|
5663
|
+
isOpen: isCategoryModalOpen,
|
|
5664
|
+
onClose: () => setIsCategoryModalOpen(false),
|
|
5665
|
+
title: "Select Category",
|
|
5666
|
+
options: CATEGORIES,
|
|
5667
|
+
selectedOption: selectedCategory,
|
|
5668
|
+
onSelect: (val) => setSelectedCategory(val),
|
|
5669
|
+
showSearch: true
|
|
5670
|
+
}
|
|
5671
|
+
));
|
|
5672
|
+
}
|
|
5673
|
+
|
|
5418
5674
|
// src/components/UniversalSettings.tsx
|
|
5419
|
-
import
|
|
5675
|
+
import React54, { useState as useState40, useEffect as useEffect22, useRef as useRef15 } from "react";
|
|
5420
5676
|
import toast14 from "react-hot-toast";
|
|
5421
|
-
import { HugeiconsIcon as
|
|
5677
|
+
import { HugeiconsIcon as HugeiconsIcon41 } from "@hugeicons/react";
|
|
5422
5678
|
import {
|
|
5423
|
-
ArrowLeft01Icon as
|
|
5424
|
-
ArrowRight01Icon as
|
|
5425
|
-
Loading03Icon as
|
|
5426
|
-
Search01Icon as
|
|
5679
|
+
ArrowLeft01Icon as ArrowLeft01Icon19,
|
|
5680
|
+
ArrowRight01Icon as ArrowRight01Icon15,
|
|
5681
|
+
Loading03Icon as Loading03Icon26,
|
|
5682
|
+
Search01Icon as Search01Icon8,
|
|
5427
5683
|
SearchList02Icon as SearchList02Icon3,
|
|
5428
|
-
ListSettingIcon as
|
|
5684
|
+
ListSettingIcon as ListSettingIcon4,
|
|
5429
5685
|
CircleLock02Icon as CircleLock02Icon3,
|
|
5430
5686
|
Coins01Icon,
|
|
5431
5687
|
PlusSignIcon as PlusSignIcon3
|
|
5432
5688
|
} from "@hugeicons/core-free-icons";
|
|
5433
5689
|
var MemberAvatar3 = ({ src, status, sizeClass = "w-10 h-10" }) => {
|
|
5434
|
-
const [loaded, setLoaded] =
|
|
5435
|
-
const [error, setError] =
|
|
5690
|
+
const [loaded, setLoaded] = useState40(false);
|
|
5691
|
+
const [error, setError] = useState40(false);
|
|
5436
5692
|
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
5437
5693
|
const finalSrc = error || !src ? defaultAvatar : src;
|
|
5438
5694
|
const getStatusColor = () => {
|
|
@@ -5449,10 +5705,10 @@ var MemberAvatar3 = ({ src, status, sizeClass = "w-10 h-10" }) => {
|
|
|
5449
5705
|
return "bg-neutral-200";
|
|
5450
5706
|
}
|
|
5451
5707
|
};
|
|
5452
|
-
return /* @__PURE__ */
|
|
5708
|
+
return /* @__PURE__ */ React54.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React54.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: Loading03Icon26, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ React54.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__ */ React54.createElement("div", { className: `absolute -bottom-1 -right-1 w-3.5 h-3.5 rounded-full border-2 border-white z-10 ${getStatusColor()}` }));
|
|
5453
5709
|
};
|
|
5454
|
-
var PageSpinner8 = () => /* @__PURE__ */
|
|
5455
|
-
var InputSpinner3 = () => /* @__PURE__ */
|
|
5710
|
+
var PageSpinner8 = () => /* @__PURE__ */ React54.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: Loading03Icon26, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
5711
|
+
var InputSpinner3 = () => /* @__PURE__ */ React54.createElement("svg", { className: "animate-spin h-4 w-4 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React54.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React54.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" }));
|
|
5456
5712
|
var UniversalSettings = ({
|
|
5457
5713
|
accountType,
|
|
5458
5714
|
userRole,
|
|
@@ -5491,36 +5747,36 @@ var UniversalSettings = ({
|
|
|
5491
5747
|
});
|
|
5492
5748
|
const isOrg = accountType === "ORGANIZATION";
|
|
5493
5749
|
const canManage = userRole === "ADMIN" || userRole === "MANAGER" || userRole === "OWNER";
|
|
5494
|
-
const [activeTab, setActiveTab] =
|
|
5495
|
-
const [expandedId, setExpandedId] =
|
|
5496
|
-
const [memberToRemove, setMemberToRemove] =
|
|
5497
|
-
const [isRemoving, setIsRemoving] =
|
|
5498
|
-
const [isInviteMode, setIsInviteMode] =
|
|
5499
|
-
const [inviteEmail, setInviteEmail] =
|
|
5500
|
-
const [isInviting, setIsInviting] =
|
|
5501
|
-
const [localSearchQuery, setLocalSearchQuery] =
|
|
5502
|
-
const [isTyping, setIsTyping] =
|
|
5503
|
-
const isFirstSearchMount =
|
|
5504
|
-
const [isStatusModalOpen, setIsStatusModalOpen] =
|
|
5505
|
-
const [isRoleModalOpen, setIsRoleModalOpen] =
|
|
5506
|
-
const [roleEditTarget, setRoleEditTarget] =
|
|
5507
|
-
const [isUpdatingRole, setIsUpdatingRole] =
|
|
5508
|
-
const [orgName, setOrgName] =
|
|
5509
|
-
const [orgSlug, setOrgSlug] =
|
|
5510
|
-
const [firstName, setFirstName] =
|
|
5511
|
-
const [lastName, setLastName] =
|
|
5512
|
-
const [isCheckingSlug, setIsCheckingSlug] =
|
|
5513
|
-
const [slugAvailable, setSlugAvailable] =
|
|
5514
|
-
const [isSavingOrg, setIsSavingOrg] =
|
|
5515
|
-
const [isSavingProfile, setIsSavingProfile] =
|
|
5516
|
-
|
|
5750
|
+
const [activeTab, setActiveTab] = useState40(isOrg ? "MEMBERS" : "ACCOUNT");
|
|
5751
|
+
const [expandedId, setExpandedId] = useState40(null);
|
|
5752
|
+
const [memberToRemove, setMemberToRemove] = useState40(null);
|
|
5753
|
+
const [isRemoving, setIsRemoving] = useState40(false);
|
|
5754
|
+
const [isInviteMode, setIsInviteMode] = useState40(false);
|
|
5755
|
+
const [inviteEmail, setInviteEmail] = useState40("");
|
|
5756
|
+
const [isInviting, setIsInviting] = useState40(false);
|
|
5757
|
+
const [localSearchQuery, setLocalSearchQuery] = useState40(membersSearchQuery);
|
|
5758
|
+
const [isTyping, setIsTyping] = useState40(false);
|
|
5759
|
+
const isFirstSearchMount = useRef15(true);
|
|
5760
|
+
const [isStatusModalOpen, setIsStatusModalOpen] = useState40(false);
|
|
5761
|
+
const [isRoleModalOpen, setIsRoleModalOpen] = useState40(false);
|
|
5762
|
+
const [roleEditTarget, setRoleEditTarget] = useState40(null);
|
|
5763
|
+
const [isUpdatingRole, setIsUpdatingRole] = useState40(false);
|
|
5764
|
+
const [orgName, setOrgName] = useState40(initialOrgName);
|
|
5765
|
+
const [orgSlug, setOrgSlug] = useState40(initialOrgSlug);
|
|
5766
|
+
const [firstName, setFirstName] = useState40("");
|
|
5767
|
+
const [lastName, setLastName] = useState40("");
|
|
5768
|
+
const [isCheckingSlug, setIsCheckingSlug] = useState40(false);
|
|
5769
|
+
const [slugAvailable, setSlugAvailable] = useState40(null);
|
|
5770
|
+
const [isSavingOrg, setIsSavingOrg] = useState40(false);
|
|
5771
|
+
const [isSavingProfile, setIsSavingProfile] = useState40(false);
|
|
5772
|
+
useEffect22(() => {
|
|
5517
5773
|
setOrgName(initialOrgName || "");
|
|
5518
5774
|
setOrgSlug(initialOrgSlug || "");
|
|
5519
5775
|
const parts = (initialFullName || "").split(" ");
|
|
5520
5776
|
setFirstName(parts[0] || "");
|
|
5521
5777
|
setLastName(parts.slice(1).join(" ") || "");
|
|
5522
5778
|
}, [initialOrgName, initialOrgSlug, initialFullName]);
|
|
5523
|
-
|
|
5779
|
+
useEffect22(() => {
|
|
5524
5780
|
if (activeTab !== "MEMBERS") return;
|
|
5525
5781
|
if (isFirstSearchMount.current) {
|
|
5526
5782
|
isFirstSearchMount.current = false;
|
|
@@ -5577,7 +5833,7 @@ var UniversalSettings = ({
|
|
|
5577
5833
|
}
|
|
5578
5834
|
};
|
|
5579
5835
|
const activeExpandedMember = expandedId ? members.find((m) => m.id === expandedId) : null;
|
|
5580
|
-
|
|
5836
|
+
useEffect22(() => {
|
|
5581
5837
|
if (!isOrg || !orgSlug || orgSlug === initialOrgSlug) {
|
|
5582
5838
|
setSlugAvailable(null);
|
|
5583
5839
|
setIsCheckingSlug(false);
|
|
@@ -5637,11 +5893,11 @@ var UniversalSettings = ({
|
|
|
5637
5893
|
const isOrgSaveDisabled = isSavingOrg || !canManage || isCheckingSlug || !hasOrgChanges || orgName.length < 3 || orgSlug.length < 3 || orgSlug !== initialOrgSlug && slugAvailable === false;
|
|
5638
5894
|
const hasProfileChanges = `${firstName} ${lastName}`.trim() !== initialFullName;
|
|
5639
5895
|
const isProfileSaveDisabled = isSavingProfile || !hasProfileChanges || firstName.length < 2 || lastName.length < 2;
|
|
5640
|
-
return /* @__PURE__ */
|
|
5896
|
+
return /* @__PURE__ */ React54.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React54.createElement(ManagedToaster, null), /* @__PURE__ */ React54.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React54.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-[#068afe] hover:text-[#068afe] transition-colors text-[12px] outline-none" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: ArrowLeft01Icon19, size: 16 }), " Back")), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React54.createElement("h1", { className: "text-black text-xl tracking-tight" }, "System Settings"), /* @__PURE__ */ React54.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your workspace identity, team configurations, and AI billing parameters.")), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-6 mb-6 overflow-x-auto custom-scrollbar px-1" }, isOrg && /* @__PURE__ */ React54.createElement("button", { onClick: () => {
|
|
5641
5897
|
setActiveTab("MEMBERS");
|
|
5642
5898
|
setExpandedId(null);
|
|
5643
5899
|
setIsInviteMode(false);
|
|
5644
|
-
}, className: `pb-3 text-[12px] tracking-wide outline-none transition-colors border-b-2 whitespace-nowrap ${activeTab === "MEMBERS" ? "border-black text-black" : "border-transparent text-neutral-500 hover:text-black"}` }, "Members"), isOrg && /* @__PURE__ */
|
|
5900
|
+
}, className: `pb-3 text-[12px] tracking-wide outline-none transition-colors border-b-2 whitespace-nowrap ${activeTab === "MEMBERS" ? "border-black text-black" : "border-transparent text-neutral-500 hover:text-black"}` }, "Members"), isOrg && /* @__PURE__ */ React54.createElement("button", { onClick: () => setActiveTab("ORGANIZATION"), className: `pb-3 text-[12px] tracking-wide outline-none transition-colors border-b-2 whitespace-nowrap ${activeTab === "ORGANIZATION" ? "border-black text-black" : "border-transparent text-neutral-500 hover:text-black"}` }, "Organization"), /* @__PURE__ */ React54.createElement("button", { onClick: () => setActiveTab("ACCOUNT"), className: `pb-3 text-[12px] tracking-wide outline-none transition-colors border-b-2 whitespace-nowrap ${activeTab === "ACCOUNT" ? "border-black text-black" : "border-transparent text-neutral-500 hover:text-black"}` }, "Profile")), activeTab === "MEMBERS" && isOrg && /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React54.createElement(
|
|
5645
5901
|
ConfirmationDialog,
|
|
5646
5902
|
{
|
|
5647
5903
|
isOpen: !!memberToRemove,
|
|
@@ -5654,7 +5910,7 @@ var UniversalSettings = ({
|
|
|
5654
5910
|
onClose: () => setMemberToRemove(null),
|
|
5655
5911
|
onConfirm: handleConfirmRemove
|
|
5656
5912
|
}
|
|
5657
|
-
), !isInviteMode && !activeExpandedMember && /* @__PURE__ */
|
|
5913
|
+
), !isInviteMode && !activeExpandedMember && /* @__PURE__ */ React54.createElement("div", { className: "flex flex-row flex-nowrap mb-4 items-center justify-between gap-4 w-full px-1" }, /* @__PURE__ */ React54.createElement("div", { className: "relative flex-1 min-w-0 max-w-full" }, /* @__PURE__ */ React54.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: Search01Icon8, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React54.createElement("input", { type: "text", placeholder: "Search members...", value: localSearchQuery, onChange: (e) => setLocalSearchQuery(e.target.value), className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-[12px] text-black placeholder-neutral-400 outline-none transition-colors focus:border-black" })), /* @__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-neutral-500 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: SearchList02Icon3, size: 16 })), /* @__PURE__ */ React54.createElement("button", { onClick: () => setIsRoleModalOpen(true), className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: ListSettingIcon4, size: 16 })))), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React54.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React54.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ React54.createElement(MemberAvatar3, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React54.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-2 mt-0.5" }, /* @__PURE__ */ React54.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()), canManage && !activeExpandedMember.isRootAdmin && (isUpdatingRole ? /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: Loading03Icon26, size: 12, className: "animate-spin text-neutral-400 ml-1" }) : /* @__PURE__ */ React54.createElement("button", { onClick: () => setRoleEditTarget(activeExpandedMember), className: "text-[11px] text-[#068afe] hover:underline outline-none" }, "Edit"))))), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6 " }, canManage && !activeExpandedMember.isRootAdmin && /* @__PURE__ */ React54.createElement(
|
|
5658
5914
|
"button",
|
|
5659
5915
|
{
|
|
5660
5916
|
onClick: () => setMemberToRemove(activeExpandedMember),
|
|
@@ -5662,24 +5918,24 @@ var UniversalSettings = ({
|
|
|
5662
5918
|
className: "w-full sm:flex-1 py-2.5 bg-white border border-rose-200 text-rose-600 hover:bg-rose-50 rounded-full text-[12px] tracking-wide transition-colors outline-none disabled:opacity-50"
|
|
5663
5919
|
},
|
|
5664
5920
|
"Remove Access"
|
|
5665
|
-
), /* @__PURE__ */
|
|
5921
|
+
), /* @__PURE__ */ React54.createElement("button", { onClick: () => setExpandedId(null), disabled: isUpdatingRole, className: "w-full sm:flex-1 py-2.5 bg-white border border-neutral-200 text-black hover:bg-neutral-100 rounded-full text-[12px] tracking-wide transition-colors outline-none disabled:opacity-50" }, "Close Profile"))) : /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ React54.createElement("div", { className: "flex flex-row items-center justify-between gap-4" }, /* @__PURE__ */ React54.createElement("h2", { className: "text-black text-xl tracking-tight" }, isInviteMode ? "Add Member" : "Team Directory"), !isInviteMode && canManage && /* @__PURE__ */ React54.createElement("button", { onClick: () => setIsInviteMode(true), className: "shrink-0 px-4 py-1.5 border border-neutral-200 text-black text-[12px] tracking-wide rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "Invite Team")), !isInviteMode && /* @__PURE__ */ React54.createElement("p", { className: "text-[12px] text-neutral-500" }, "Manage members and access controls across your organization.")), /* @__PURE__ */ React54.createElement("div", { className: "w-full overflow-hidden" }, isInviteMode ? /* @__PURE__ */ React54.createElement("form", { onSubmit: handleInviteSubmit, className: "flex flex-col gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React54.createElement("div", { className: "space-y-1.5 mt-2" }, /* @__PURE__ */ React54.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React54.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-neutral-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "name@company.com" })), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React54.createElement(ThreeDActionButton, { type: "submit", disabled: inviteEmail.length < 5 || isInviting, isLoading: isInviting, className: "w-full" }, "Send Invitation"), /* @__PURE__ */ React54.createElement("button", { type: "button", onClick: () => {
|
|
5666
5922
|
setIsInviteMode(false);
|
|
5667
5923
|
setInviteEmail("");
|
|
5668
|
-
}, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */
|
|
5924
|
+
}, disabled: isInviting, className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-xs tracking-wide" }, "Cancel"))) : isMembersLoading || isTyping ? /* @__PURE__ */ React54.createElement(PageSpinner8, null) : /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col min-w-0 animate-in fade-in duration-300" }, /* @__PURE__ */ React54.createElement("div", null, members.length === 0 ? /* @__PURE__ */ React54.createElement("p", { className: "text-[12px] text-neutral-400 py-6 text-center" }, "No members found") : members.map((member) => /* @__PURE__ */ React54.createElement("div", { key: member.id, onClick: () => setExpandedId(member.id), className: "flex items-center justify-between py-3 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl" }, /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React54.createElement(MemberAvatar3, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React54.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React54.createElement("p", { className: "text-[12px] text-black truncate" }, member.fullName), /* @__PURE__ */ React54.createElement("p", { className: "text-[11px] text-neutral-500 capitalize truncate" }, member.role.toLowerCase())))))), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React54.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React54.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage - 1), disabled: membersCurrentPage <= 1 || isMembersLoading, className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: ArrowLeft01Icon19, size: 14 })), /* @__PURE__ */ React54.createElement("button", { onClick: () => onMembersPageChange(membersCurrentPage + 1), disabled: membersCurrentPage >= membersTotalPages || isMembersLoading || membersTotalPages === 0, className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: ArrowRight01Icon15, size: 14 })))))))), /* @__PURE__ */ React54.createElement(ReusableOptions, { isOpen: isStatusModalOpen, onClose: () => setIsStatusModalOpen(false), title: "Status Filter", options: ["ALL", "ACTIVE", "BUSY", "OFFLINE", "AWAY"], selectedOption: activeStatusFilter, onSelect: (status) => onStatusFilterChange(status) }), /* @__PURE__ */ React54.createElement(ReusableOptions, { isOpen: isRoleModalOpen, onClose: () => setIsRoleModalOpen(false), title: "Role Filter", options: ["ALL", "ADMIN", "MANAGER", "MEMBER"], selectedOption: activeRoleFilter, onSelect: (role) => onRoleFilterChange(role) }), /* @__PURE__ */ React54.createElement(ReusableOptions, { isOpen: !!roleEditTarget, onClose: () => setRoleEditTarget(null), title: "Modify Access Role", options: ["ADMIN", "MANAGER", "MEMBER"], selectedOption: roleEditTarget?.role || "", onSelect: handleRoleUpdate })), activeTab === "ORGANIZATION" && isOrg && /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React54.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React54.createElement("div", null, /* @__PURE__ */ React54.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Workspace Details"), /* @__PURE__ */ React54.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your organizational identity and handles.")), !canManage && /* @__PURE__ */ React54.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-100 text-neutral-400 rounded-full shrink-0" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: CircleLock02Icon3, size: 18, className: "text-current" }))), /* @__PURE__ */ React54.createElement("form", { className: "flex flex-col gap-8 w-full max-w-5xl", onSubmit: handleSaveOrganization, autoComplete: "off" }, /* @__PURE__ */ React54.createElement(TextInput, { label: "Workspace Name", value: orgName, onChange: handleOrgNameChange, disabled: !canManage || isSavingOrg, placeholder: "Acme Corporation", maxLength: 50 }), /* @__PURE__ */ React54.createElement("div", { className: "space-y-1.5 relative w-full" }, /* @__PURE__ */ React54.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Workspace Handle"), /* @__PURE__ */ React54.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-200 focus-within:border-black transition-all duration-300 overflow-hidden" }, /* @__PURE__ */ React54.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__ */ React54.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React54.createElement(InputSpinner3, null), !isCheckingSlug && canManage && orgSlug !== initialOrgSlug && orgSlug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React54.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-red-100" }, /* @__PURE__ */ React54.createElement("svg", { className: "w-2 h-2 text-red-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React54.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__ */ React54.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React54.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React54.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__ */ React54.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React54.createElement(ThreeDActionButton, { type: "submit", disabled: isOrgSaveDisabled, isLoading: isSavingOrg, className: "min-w-32" }, "Save Changes"), hasOrgChanges && !isSavingOrg && canManage && /* @__PURE__ */ React54.createElement("button", { type: "button", onClick: () => {
|
|
5669
5925
|
setOrgName(initialOrgName || "");
|
|
5670
5926
|
setOrgSlug(initialOrgSlug || "");
|
|
5671
|
-
}, className: "text-[11px] tracking-widest text-neutral-400 hover:text-black transition-colors outline-none" }, "Cancel")))), activeTab === "ACCOUNT" && /* @__PURE__ */
|
|
5927
|
+
}, className: "text-[11px] tracking-widest text-neutral-400 hover:text-black transition-colors outline-none" }, "Cancel")))), activeTab === "ACCOUNT" && /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in duration-300" }, /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-8 rounded-2xl p-6 bg-white w-full" }, /* @__PURE__ */ React54.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React54.createElement("div", null, /* @__PURE__ */ React54.createElement("h2", { className: "text-black text-xl mb-1 tracking-tight" }, "Personal Identity"), /* @__PURE__ */ React54.createElement("p", { className: "text-xs text-neutral-500" }, "Update your system display name and contact email."))), /* @__PURE__ */ React54.createElement("form", { className: "flex flex-col gap-6 w-full max-w-5xl", onSubmit: handleSaveProfile, autoComplete: "off" }, /* @__PURE__ */ React54.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6" }, /* @__PURE__ */ React54.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__ */ React54.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__ */ React54.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React54.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Email Address"), /* @__PURE__ */ React54.createElement("input", { type: "email", value: initialEmail, disabled: true, className: "w-full pb-3 pt-3 text-sm bg-transparent text-neutral-400 border-b border-neutral-200 outline-none cursor-not-allowed" })), /* @__PURE__ */ React54.createElement("div", { className: "pt-4 flex items-center gap-4" }, /* @__PURE__ */ React54.createElement(ThreeDActionButton, { type: "submit", disabled: isProfileSaveDisabled, isLoading: isSavingProfile, className: "min-w-32" }, "Update Identity")))), /* @__PURE__ */ React54.createElement("div", { className: "bg-white rounded-2xl p-6 w-full flex flex-col sm:flex-row sm:items-center justify-between gap-6 border border-neutral-100" }, /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col items-start max-w-sm" }, /* @__PURE__ */ React54.createElement("p", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 uppercase" }, "AI Credits Balance"), isBillingLoading ? /* @__PURE__ */ React54.createElement("div", { className: "h-8 w-32 bg-neutral-100 animate-pulse rounded mt-1" }) : /* @__PURE__ */ React54.createElement("div", { className: "flex items-center gap-2 mt-1" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: Coins01Icon, size: 28, className: "text-[#000000]" }), /* @__PURE__ */ React54.createElement("span", { className: "text-3xl text-black tracking-tight" }, aiCredits)), /* @__PURE__ */ React54.createElement("p", { className: "text-[11px] text-neutral-500 mt-4 leading-relaxed" }, "AI credits are consumed when generating intelligent summaries, transcriptions, and automated huddle insights.")), /* @__PURE__ */ React54.createElement("button", { onClick: onTopUp, className: "w-12 h-12 rounded-full border border-neutral-200 flex items-center justify-center text-black hover:bg-neutral-50 transition-colors outline-none shrink-0", "aria-label": "Top Up Credits" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon41, { icon: PlusSignIcon3, size: 20 })))));
|
|
5672
5928
|
};
|
|
5673
5929
|
|
|
5674
5930
|
// src/components/UniversalCreateHuddle.tsx
|
|
5675
|
-
import
|
|
5931
|
+
import React55, { useState as useState41, useEffect as useEffect23, useRef as useRef16 } from "react";
|
|
5676
5932
|
import toast15 from "react-hot-toast";
|
|
5677
|
-
import { HugeiconsIcon as
|
|
5933
|
+
import { HugeiconsIcon as HugeiconsIcon42 } from "@hugeicons/react";
|
|
5678
5934
|
import {
|
|
5679
|
-
ArrowLeft01Icon as
|
|
5680
|
-
ArrowRight01Icon as
|
|
5681
|
-
Loading03Icon as
|
|
5682
|
-
Search01Icon as
|
|
5935
|
+
ArrowLeft01Icon as ArrowLeft01Icon20,
|
|
5936
|
+
ArrowRight01Icon as ArrowRight01Icon16,
|
|
5937
|
+
Loading03Icon as Loading03Icon27,
|
|
5938
|
+
Search01Icon as Search01Icon9,
|
|
5683
5939
|
Calendar01Icon as Calendar01Icon2,
|
|
5684
5940
|
Clock01Icon as Clock01Icon2,
|
|
5685
5941
|
Globe02Icon as Globe02Icon2,
|
|
@@ -5687,10 +5943,10 @@ import {
|
|
|
5687
5943
|
CircleLock02Icon as CircleLock02Icon4
|
|
5688
5944
|
} from "@hugeicons/core-free-icons";
|
|
5689
5945
|
var MemberAvatar4 = ({ src, sizeClass = "w-10 h-10" }) => {
|
|
5690
|
-
const [loaded, setLoaded] =
|
|
5691
|
-
const [error, setError] =
|
|
5946
|
+
const [loaded, setLoaded] = useState41(false);
|
|
5947
|
+
const [error, setError] = useState41(false);
|
|
5692
5948
|
const defaultAvatar = "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif";
|
|
5693
|
-
return /* @__PURE__ */
|
|
5949
|
+
return /* @__PURE__ */ React55.createElement("div", { className: `relative shrink-0 ${sizeClass}` }, /* @__PURE__ */ React55.createElement("div", { className: "w-full h-full rounded-lg bg-neutral-100 flex items-center justify-center overflow-hidden" }, !loaded && !error && /* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: Loading03Icon27, className: "animate-spin text-neutral-400 absolute", size: 14 }), /* @__PURE__ */ React55.createElement(
|
|
5694
5950
|
"img",
|
|
5695
5951
|
{
|
|
5696
5952
|
src: error || !src ? defaultAvatar : src,
|
|
@@ -5731,28 +5987,28 @@ var UniversalCreateHuddle = ({
|
|
|
5731
5987
|
onCreateSubmit
|
|
5732
5988
|
}) => {
|
|
5733
5989
|
const canManage = userRole === "ADMIN" || userRole === "MANAGER" || userRole === "OWNER";
|
|
5734
|
-
const [huddleDate, setHuddleDate] =
|
|
5990
|
+
const [huddleDate, setHuddleDate] = useState41(() => {
|
|
5735
5991
|
const d = /* @__PURE__ */ new Date();
|
|
5736
5992
|
d.setHours(d.getHours() + 1, 0, 0, 0);
|
|
5737
5993
|
return d;
|
|
5738
5994
|
});
|
|
5739
|
-
const [title, setTitle] =
|
|
5740
|
-
const [isPrivate, setIsPrivate] =
|
|
5741
|
-
const [timezone, setTimezone] =
|
|
5742
|
-
|
|
5995
|
+
const [title, setTitle] = useState41("");
|
|
5996
|
+
const [isPrivate, setIsPrivate] = useState41(false);
|
|
5997
|
+
const [timezone, setTimezone] = useState41("UTC");
|
|
5998
|
+
useEffect23(() => {
|
|
5743
5999
|
try {
|
|
5744
6000
|
setTimezone(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
5745
6001
|
} catch (e) {
|
|
5746
6002
|
}
|
|
5747
6003
|
}, []);
|
|
5748
|
-
const [calendarMode, setCalendarMode] =
|
|
5749
|
-
const [showTimezoneModal, setShowTimezoneModal] =
|
|
5750
|
-
const [showMembersModal, setShowMembersModal] =
|
|
5751
|
-
const [selectedParticipants, setSelectedParticipants] =
|
|
5752
|
-
const [isSubmitting, setIsSubmitting] =
|
|
5753
|
-
const [localSearchQuery, setLocalSearchQuery] =
|
|
5754
|
-
const [isTyping, setIsTyping] =
|
|
5755
|
-
const typingTimer =
|
|
6004
|
+
const [calendarMode, setCalendarMode] = useState41(null);
|
|
6005
|
+
const [showTimezoneModal, setShowTimezoneModal] = useState41(false);
|
|
6006
|
+
const [showMembersModal, setShowMembersModal] = useState41(false);
|
|
6007
|
+
const [selectedParticipants, setSelectedParticipants] = useState41(/* @__PURE__ */ new Set());
|
|
6008
|
+
const [isSubmitting, setIsSubmitting] = useState41(false);
|
|
6009
|
+
const [localSearchQuery, setLocalSearchQuery] = useState41(membersSearchQuery);
|
|
6010
|
+
const [isTyping, setIsTyping] = useState41(false);
|
|
6011
|
+
const typingTimer = useRef16(null);
|
|
5756
6012
|
const handleSearchInput = (e) => {
|
|
5757
6013
|
const val = e.target.value;
|
|
5758
6014
|
setLocalSearchQuery(val);
|
|
@@ -5790,7 +6046,7 @@ var UniversalCreateHuddle = ({
|
|
|
5790
6046
|
setIsSubmitting(false);
|
|
5791
6047
|
}
|
|
5792
6048
|
};
|
|
5793
|
-
return /* @__PURE__ */
|
|
6049
|
+
return /* @__PURE__ */ React55.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ React55.createElement(ManagedToaster, null), /* @__PURE__ */ React55.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ React55.createElement("a", { href: onBackHref, className: "flex items-center gap-2 text-[#068afe] hover:text-[#068afe] transition-colors text-[12px] outline-none" }, /* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: ArrowLeft01Icon20, size: 16 }), " Back")), /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col gap-1 mb-8 px-1" }, /* @__PURE__ */ React55.createElement("h1", { className: "text-black text-xl tracking-tight" }, "Create Huddle"), /* @__PURE__ */ React55.createElement("p", { className: "text-xs text-neutral-500" }, "Schedule a new workspace huddle and manage participant access.")), /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col gap-8 animate-in rounded-2xl p-6 bg-white fade-in duration-300" }, /* @__PURE__ */ React55.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSubmit, autoComplete: "off" }, !canManage && /* @__PURE__ */ React55.createElement("div", { className: "flex items-start gap-3 p-4 bg-neutral-50 rounded-xl" }, /* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: CircleLock02Icon4, size: 20, className: "text-neutral-500 shrink-0 mt-0.5" }), /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React55.createElement("span", { className: "text-[12px] text-black tracking-tight" }, "Access Restricted"), /* @__PURE__ */ React55.createElement("span", { className: "text-[12px] text-neutral-500 mt-1 leading-relaxed" }, "You do not have sufficient permissions to access this page. Contact organization admin or manager."))), /* @__PURE__ */ React55.createElement(
|
|
5794
6050
|
TextInput,
|
|
5795
6051
|
{
|
|
5796
6052
|
label: "Huddle Subject",
|
|
@@ -5800,31 +6056,31 @@ var UniversalCreateHuddle = ({
|
|
|
5800
6056
|
placeholder: "e.g. Q4 Engineering Sync",
|
|
5801
6057
|
maxLength: 80
|
|
5802
6058
|
}
|
|
5803
|
-
), /* @__PURE__ */
|
|
6059
|
+
), /* @__PURE__ */ React55.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-6" }, /* @__PURE__ */ React55.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React55.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Date"), /* @__PURE__ */ React55.createElement(
|
|
5804
6060
|
"div",
|
|
5805
6061
|
{
|
|
5806
6062
|
onClick: () => canManage && !isSubmitting && setCalendarMode("DATE"),
|
|
5807
6063
|
className: `flex items-center relative w-full border-b border-neutral-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}`
|
|
5808
6064
|
},
|
|
5809
|
-
/* @__PURE__ */
|
|
5810
|
-
/* @__PURE__ */
|
|
5811
|
-
)), /* @__PURE__ */
|
|
6065
|
+
/* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: Calendar01Icon2, size: 16, className: "text-neutral-400 absolute left-0" }),
|
|
6066
|
+
/* @__PURE__ */ React55.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, huddleDate.toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" }))
|
|
6067
|
+
)), /* @__PURE__ */ React55.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React55.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Time"), /* @__PURE__ */ React55.createElement(
|
|
5812
6068
|
"div",
|
|
5813
6069
|
{
|
|
5814
6070
|
onClick: () => canManage && !isSubmitting && setCalendarMode("TIME"),
|
|
5815
6071
|
className: `flex items-center relative w-full border-b border-neutral-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}`
|
|
5816
6072
|
},
|
|
5817
|
-
/* @__PURE__ */
|
|
5818
|
-
/* @__PURE__ */
|
|
5819
|
-
)), /* @__PURE__ */
|
|
6073
|
+
/* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: Clock01Icon2, size: 16, className: "text-neutral-400 absolute left-0" }),
|
|
6074
|
+
/* @__PURE__ */ React55.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, huddleDate.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }))
|
|
6075
|
+
)), /* @__PURE__ */ React55.createElement("div", { className: "space-y-1.5 w-full" }, /* @__PURE__ */ React55.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, "Timezone"), /* @__PURE__ */ React55.createElement(
|
|
5820
6076
|
"div",
|
|
5821
6077
|
{
|
|
5822
6078
|
onClick: () => canManage && !isSubmitting && setShowTimezoneModal(true),
|
|
5823
6079
|
className: `flex items-center relative w-full border-b border-neutral-200 transition-all duration-300 pb-3 pt-3 ${!canManage || isSubmitting ? "opacity-50 pointer-events-none" : "hover:border-black cursor-pointer"}`
|
|
5824
6080
|
},
|
|
5825
|
-
/* @__PURE__ */
|
|
5826
|
-
/* @__PURE__ */
|
|
5827
|
-
))), /* @__PURE__ */
|
|
6081
|
+
/* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: Globe02Icon2, size: 16, className: "text-neutral-400 absolute left-0" }),
|
|
6082
|
+
/* @__PURE__ */ React55.createElement("span", { className: "w-full pl-8 text-sm text-black truncate block" }, timezone)
|
|
6083
|
+
))), /* @__PURE__ */ React55.createElement("div", { className: `flex items-center justify-between py-2 mt-2 ${!canManage ? "opacity-50 pointer-events-none" : ""}` }, /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React55.createElement("span", { className: "text-[12px] text-black tracking-tight" }, "Private Huddle"), /* @__PURE__ */ React55.createElement("span", { className: "text-[11px] text-neutral-500" }, "Only invited members can join.")), /* @__PURE__ */ React55.createElement(
|
|
5828
6084
|
"button",
|
|
5829
6085
|
{
|
|
5830
6086
|
type: "button",
|
|
@@ -5832,8 +6088,8 @@ var UniversalCreateHuddle = ({
|
|
|
5832
6088
|
disabled: !canManage || isSubmitting,
|
|
5833
6089
|
className: `relative w-11 h-6 rounded-full transition-colors outline-none shrink-0 ${isPrivate ? "bg-[#068afe]" : "bg-neutral-200"}`
|
|
5834
6090
|
},
|
|
5835
|
-
/* @__PURE__ */
|
|
5836
|
-
)), isPrivate && /* @__PURE__ */
|
|
6091
|
+
/* @__PURE__ */ React55.createElement("div", { className: `absolute top-1 left-1 bg-white w-4 h-4 rounded-full transition-transform ${isPrivate ? "translate-x-5" : "translate-x-0"}` })
|
|
6092
|
+
)), isPrivate && /* @__PURE__ */ React55.createElement("div", { className: `flex items-center justify-between animate-in fade-in zoom-in-95 duration-200 bg-neutral-50 p-4 rounded-xl ${!canManage ? "opacity-50" : ""}` }, /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React55.createElement("span", { className: "text-[12px] text-black tracking-tight" }, "Participants"), /* @__PURE__ */ React55.createElement("span", { className: "text-[11px] text-[#068afe] " }, selectedParticipants.size === 0 ? "0 added" : selectedParticipants.size >= 1e3 ? `${(selectedParticipants.size / 1e3).toFixed(1)}k+ added` : `${selectedParticipants.size} added`)), /* @__PURE__ */ React55.createElement(
|
|
5837
6093
|
"button",
|
|
5838
6094
|
{
|
|
5839
6095
|
type: "button",
|
|
@@ -5842,7 +6098,7 @@ var UniversalCreateHuddle = ({
|
|
|
5842
6098
|
className: "px-4 py-2 border border-neutral-200 text-black text-[11px] tracking-wide rounded-full hover:bg-white transition-colors outline-none bg-transparent disabled:cursor-not-allowed"
|
|
5843
6099
|
},
|
|
5844
6100
|
"Manage Access"
|
|
5845
|
-
)), canManage && /* @__PURE__ */
|
|
6101
|
+
)), canManage && /* @__PURE__ */ React55.createElement("div", { className: "pt-6" }, /* @__PURE__ */ React55.createElement(
|
|
5846
6102
|
ThreeDActionButton,
|
|
5847
6103
|
{
|
|
5848
6104
|
type: "submit",
|
|
@@ -5851,7 +6107,7 @@ var UniversalCreateHuddle = ({
|
|
|
5851
6107
|
className: "w-full sm:w-auto min-w-40"
|
|
5852
6108
|
},
|
|
5853
6109
|
"Schedule Huddle"
|
|
5854
|
-
)))), canManage && /* @__PURE__ */
|
|
6110
|
+
)))), canManage && /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(
|
|
5855
6111
|
CalendarPicker,
|
|
5856
6112
|
{
|
|
5857
6113
|
isOpen: calendarMode !== null,
|
|
@@ -5860,7 +6116,7 @@ var UniversalCreateHuddle = ({
|
|
|
5860
6116
|
defaultMode: calendarMode || "DATE",
|
|
5861
6117
|
onConfirm: (d) => setHuddleDate(d)
|
|
5862
6118
|
}
|
|
5863
|
-
), /* @__PURE__ */
|
|
6119
|
+
), /* @__PURE__ */ React55.createElement(
|
|
5864
6120
|
ReusableOptions,
|
|
5865
6121
|
{
|
|
5866
6122
|
isOpen: showTimezoneModal,
|
|
@@ -5871,7 +6127,7 @@ var UniversalCreateHuddle = ({
|
|
|
5871
6127
|
onSelect: (tz) => setTimezone(tz),
|
|
5872
6128
|
showSearch: true
|
|
5873
6129
|
}
|
|
5874
|
-
)), showMembersModal && canManage && /* @__PURE__ */
|
|
6130
|
+
)), showMembersModal && canManage && /* @__PURE__ */ React55.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React55.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowMembersModal(false) }), /* @__PURE__ */ React55.createElement("div", { className: "relative w-full max-w-md bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React55.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React55.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Select Participants"), /* @__PURE__ */ React55.createElement("button", { onClick: () => setShowMembersModal(false), className: "text-[#068afe] hover:text-[#068afe] transition-colors outline-none text-[12px] " }, "Done")), /* @__PURE__ */ React55.createElement("div", { className: "p-4 shrink-0 " }, /* @__PURE__ */ React55.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React55.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: Search01Icon9, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React55.createElement(
|
|
5875
6131
|
"input",
|
|
5876
6132
|
{
|
|
5877
6133
|
type: "text",
|
|
@@ -5880,34 +6136,34 @@ var UniversalCreateHuddle = ({
|
|
|
5880
6136
|
onChange: handleSearchInput,
|
|
5881
6137
|
className: "w-full pl-10 pr-4 py-2.5 bg-neutral-100 rounded-full text-[12px] text-black placeholder-neutral-400 outline-none focus:bg-neutral-200 transition-colors"
|
|
5882
6138
|
}
|
|
5883
|
-
))), /* @__PURE__ */
|
|
6139
|
+
))), /* @__PURE__ */ React55.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isMembersLoading || isTyping ? /* @__PURE__ */ React55.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: Loading03Icon27, size: 28, className: "animate-spin text-black" })) : members.length === 0 ? /* @__PURE__ */ React55.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "No members found.") : members.map((member) => {
|
|
5884
6140
|
const isChecked = selectedParticipants.has(member.userId);
|
|
5885
|
-
return /* @__PURE__ */
|
|
6141
|
+
return /* @__PURE__ */ React55.createElement(
|
|
5886
6142
|
"div",
|
|
5887
6143
|
{
|
|
5888
6144
|
key: member.id,
|
|
5889
6145
|
onClick: () => toggleParticipant(member.userId),
|
|
5890
6146
|
className: "flex items-center justify-between p-3 rounded-xl cursor-pointer hover:bg-neutral-50 transition-colors select-none"
|
|
5891
6147
|
},
|
|
5892
|
-
/* @__PURE__ */
|
|
5893
|
-
/* @__PURE__ */
|
|
6148
|
+
/* @__PURE__ */ React55.createElement("div", { className: "flex items-center gap-3 min-w-0 flex-1" }, /* @__PURE__ */ React55.createElement(MemberAvatar4, { src: member.avatarUrl, sizeClass: "w-9 h-9" }), /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React55.createElement("span", { className: "text-[12px] text-black truncate" }, member.fullName), /* @__PURE__ */ React55.createElement("span", { className: "text-[11px] text-neutral-400 capitalize truncate" }, member.role.toLowerCase()))),
|
|
6149
|
+
/* @__PURE__ */ React55.createElement("div", { className: "shrink-0 pl-3" }, /* @__PURE__ */ React55.createElement("div", { className: `w-5 h-5 rounded-full flex items-center justify-center transition-colors ${isChecked ? "bg-[#068afe]" : "border border-neutral-300 bg-white"}` }, isChecked && /* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: Tick02Icon3, size: 14, className: "text-white" })))
|
|
5894
6150
|
);
|
|
5895
|
-
})), /* @__PURE__ */
|
|
6151
|
+
})), /* @__PURE__ */ React55.createElement("div", { className: "p-4 flex items-center justify-between shrink-0 bg-white" }, /* @__PURE__ */ React55.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React55.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React55.createElement(
|
|
5896
6152
|
"button",
|
|
5897
6153
|
{
|
|
5898
6154
|
disabled: membersCurrentPage <= 1 || isMembersLoading,
|
|
5899
6155
|
onClick: () => onMembersPageChange(membersCurrentPage - 1),
|
|
5900
6156
|
className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-neutral-200 text-neutral-600 disabled:opacity-30 outline-none hover:bg-neutral-50 transition-colors"
|
|
5901
6157
|
},
|
|
5902
|
-
/* @__PURE__ */
|
|
5903
|
-
), /* @__PURE__ */
|
|
6158
|
+
/* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: ArrowLeft01Icon20, size: 12 })
|
|
6159
|
+
), /* @__PURE__ */ React55.createElement(
|
|
5904
6160
|
"button",
|
|
5905
6161
|
{
|
|
5906
6162
|
disabled: membersCurrentPage >= membersTotalPages || membersTotalPages === 0 || isMembersLoading,
|
|
5907
6163
|
onClick: () => onMembersPageChange(membersCurrentPage + 1),
|
|
5908
6164
|
className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-neutral-200 text-neutral-600 disabled:opacity-30 outline-none hover:bg-neutral-50 transition-colors"
|
|
5909
6165
|
},
|
|
5910
|
-
/* @__PURE__ */
|
|
6166
|
+
/* @__PURE__ */ React55.createElement(HugeiconsIcon42, { icon: ArrowRight01Icon16, size: 12 })
|
|
5911
6167
|
))))));
|
|
5912
6168
|
};
|
|
5913
6169
|
export {
|
|
@@ -5933,6 +6189,7 @@ export {
|
|
|
5933
6189
|
MedicalFeatureStatsBlock,
|
|
5934
6190
|
MobileNav,
|
|
5935
6191
|
NumberInput,
|
|
6192
|
+
OpenBidHome,
|
|
5936
6193
|
PageSpinner,
|
|
5937
6194
|
PinDialerBottomSheet,
|
|
5938
6195
|
PipleAuth,
|