@retinalabsllc/zairusjs 4.0.7 → 4.0.9
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.js +16 -8
- package/dist/index.mjs +16 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2721,7 +2721,7 @@ var UniversalBillingPage = ({
|
|
|
2721
2721
|
setIsUpdating(false);
|
|
2722
2722
|
}
|
|
2723
2723
|
};
|
|
2724
|
-
return /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex max-w-5xl rounded-2xl bg-white p-6 flex-col gap-8 animate-in fade-in duration-300 " }, /* @__PURE__ */ import_react46.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0 w-full" }, /* @__PURE__ */ import_react46.default.createElement("h1", { className: "text-
|
|
2724
|
+
return /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex max-w-5xl rounded-2xl bg-white p-6 flex-col gap-8 animate-in fade-in duration-300 " }, /* @__PURE__ */ import_react46.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0 w-full" }, /* @__PURE__ */ import_react46.default.createElement("h1", { className: "text-lg text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500 truncate mb-6" }, headerDescription), showSearchAndFilter && onSearchChange && onTimeframeChange && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col sm:flex-row gap-4 mb-4" }, /* @__PURE__ */ import_react46.default.createElement(
|
|
2725
2725
|
TextInput,
|
|
2726
2726
|
{
|
|
2727
2727
|
placeholder: "Search by ID or Name...",
|
|
@@ -2736,10 +2736,10 @@ var UniversalBillingPage = ({
|
|
|
2736
2736
|
className: "px-4 py-3 text-sm bg-transparent border-b border-neutral-100 text-black outline-none focus:border-black shrink-0 text-left"
|
|
2737
2737
|
},
|
|
2738
2738
|
timeframe === "ALL" ? "All Time" : timeframe === "24H" ? "Past 24 Hours" : timeframe === "7D" ? "Past 7 Days" : "Past 30 Days"
|
|
2739
|
-
))) : /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[11px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.ArrowLeft01Icon, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ import_react46.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.CircleLock02Icon, size: 18, className: "text-current" }))), currentView === "list" && /* @__PURE__ */ import_react46.default.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-100 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricPrimaryLabel), /* @__PURE__ */ import_react46.default.createElement("div", { className: "text-2xl text-black tracking-tight truncate" }, formatUsd(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricSecondaryLabel), /* @__PURE__ */ import_react46.default.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatUsd(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Billing Status"), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Next Billing Date"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Last Paid Date"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ import_react46.default.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-6 truncate block " }, "Usage & Limits"), /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ import_react46.default.createElement("div", { key: idx, className: "flex justify-between
|
|
2739
|
+
))) : /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[11px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.ArrowLeft01Icon, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ import_react46.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.CircleLock02Icon, size: 18, className: "text-current" }))), currentView === "list" && /* @__PURE__ */ import_react46.default.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-100 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricPrimaryLabel), /* @__PURE__ */ import_react46.default.createElement("div", { className: "text-2xl text-black tracking-tight truncate" }, formatUsd(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricSecondaryLabel), /* @__PURE__ */ import_react46.default.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatUsd(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Billing Status"), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Next Billing Date"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ import_react46.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Last Paid Date"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ import_react46.default.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-6 truncate block " }, "Usage & Limits"), /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ import_react46.default.createElement("div", { key: idx, className: "flex justify-between pb-2" }, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-neutral-500 text-xs" }, metric.label), /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-xs text-black" }, metric.value))))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ import_react46.default.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-4 truncate block " }, "Transaction History"), isLoading ? /* @__PURE__ */ import_react46.default.createElement(PageSpinner3, null) : invoices.length === 0 ? /* @__PURE__ */ import_react46.default.createElement(import_react46.default.Fragment, null, /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500 py-4" }, "No records found.")) : /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "divide-y divide-neutral-100" }, invoices.map((inv) => /* @__PURE__ */ import_react46.default.createElement("div", { key: inv.id, onClick: () => {
|
|
2740
2740
|
setSelectedInvoice(inv);
|
|
2741
2741
|
setCurrentView("details");
|
|
2742
|
-
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, inv.name), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black" }, formatUsd(inv.amountDue)), /* @__PURE__ */ import_react46.default.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.ArrowRight01Icon, size: 14 })))))))), currentView === "details" && selectedInvoice && /* @__PURE__ */ import_react46.default.createElement("div", { className: "w-full max-w-5xl animate-in fade-in duration-300" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-6 w-full" }, /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Breakdown"), /* @__PURE__ */ import_react46.default.createElement("h2", { className: "text-
|
|
2742
|
+
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black truncate pr-4" }, inv.name), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-sm text-black" }, formatUsd(inv.amountDue)), /* @__PURE__ */ import_react46.default.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react46.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react46.default.createElement(import_react47.HugeiconsIcon, { icon: import_core_free_icons13.ArrowRight01Icon, size: 14 })))))))), currentView === "details" && selectedInvoice && /* @__PURE__ */ import_react46.default.createElement("div", { className: "w-full max-w-5xl animate-in fade-in duration-300" }, /* @__PURE__ */ import_react46.default.createElement("div", { className: "flex flex-col gap-6 w-full" }, /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Breakdown"), /* @__PURE__ */ import_react46.default.createElement("h2", { className: "text-lg text-black mb-1" }, selectedInvoice.name), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate(selectedInvoice.createdAt))), /* @__PURE__ */ import_react46.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 " }, /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Amount"), /* @__PURE__ */ import_react46.default.createElement("p", { className: "text-xl text-black" }, formatUsd(selectedInvoice.amountDue))), /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Status"), isModMode ? /* @__PURE__ */ import_react46.default.createElement(
|
|
2743
2743
|
"button",
|
|
2744
2744
|
{
|
|
2745
2745
|
onClick: () => !isUpdating && setIsActionModalOpen(true),
|
|
@@ -2834,7 +2834,7 @@ var UniversalCheckoutView = ({
|
|
|
2834
2834
|
}
|
|
2835
2835
|
};
|
|
2836
2836
|
const displayStatus = localStatus || invoice?.status;
|
|
2837
|
-
return /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex max-w-5xl rounded-2xl bg-white p-6 sm:p-8 flex-col gap-6 animate-in fade-in duration-300 mx-auto w-full border border-neutral-100" }, /* @__PURE__ */ import_react48.default.createElement(ManagedToaster, null), isLoading ? /* @__PURE__ */ import_react48.default.createElement(PageSpinner4, null) : !invoice ? /* @__PURE__ */ import_react48.default.createElement("div", { className: "py-12 text-center text-sm text-neutral-500" }, "Invoice not found or could not be loaded.") : /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex flex-col gap-8 w-full animate-in fade-in duration-300" }, /* @__PURE__ */ import_react48.default.createElement("div", null, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Checkout Summary"), /* @__PURE__ */ import_react48.default.createElement("h2", { className: "text-
|
|
2837
|
+
return /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex max-w-5xl rounded-2xl bg-white p-6 sm:p-8 flex-col gap-6 animate-in fade-in duration-300 mx-auto w-full border border-neutral-100" }, /* @__PURE__ */ import_react48.default.createElement(ManagedToaster, null), isLoading ? /* @__PURE__ */ import_react48.default.createElement(PageSpinner4, null) : !invoice ? /* @__PURE__ */ import_react48.default.createElement("div", { className: "py-12 text-center text-sm text-neutral-500" }, "Invoice not found or could not be loaded.") : /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex flex-col gap-8 w-full animate-in fade-in duration-300" }, /* @__PURE__ */ import_react48.default.createElement("div", null, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Checkout Summary"), /* @__PURE__ */ import_react48.default.createElement("h2", { className: "text-lg text-black mb-1" }, invoice.name), /* @__PURE__ */ import_react48.default.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate2(invoice.createdAt))), /* @__PURE__ */ import_react48.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6" }, /* @__PURE__ */ import_react48.default.createElement("div", null, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Amount Due"), /* @__PURE__ */ import_react48.default.createElement("p", { className: "text-xl text-black" }, formatUsd2(invoice.amountDue))), /* @__PURE__ */ import_react48.default.createElement("div", null, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Status"), /* @__PURE__ */ import_react48.default.createElement("span", { className: `text-[11px] tracking-widest px-3 py-1 mt-1 inline-block rounded-full ${displayStatus === "PAID" ? "bg-emerald-100 text-emerald-700" : "bg-neutral-100 text-neutral-700"}` }, displayStatus)), /* @__PURE__ */ import_react48.default.createElement("div", { className: "md:col-span-2 pt-4 border-t border-neutral-200/60 mt-2" }, /* @__PURE__ */ import_react48.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Reference ID"), /* @__PURE__ */ import_react48.default.createElement("p", { className: "text-xs text-neutral-500 inline-block" }, invoice.invoiceNumber))), /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-end gap-4 pt-4" }, (displayStatus === "ISSUED" || displayStatus === "OVERDUE") && /* @__PURE__ */ import_react48.default.createElement("div", { className: "flex flex-col items-end gap-2 w-full sm:w-auto" }, /* @__PURE__ */ import_react48.default.createElement(
|
|
2838
2838
|
ThreeDActionButton,
|
|
2839
2839
|
{
|
|
2840
2840
|
onClick: handlePayment,
|
|
@@ -3480,12 +3480,20 @@ var UniversalDriveView = ({
|
|
|
3480
3480
|
}, className: "text-neutral-500 hover:text-red-600 p-1 flex items-center gap-1.5 text-xs outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Delete02Icon, size: 14 }), " Move to Trash"))), /* @__PURE__ */ import_react65.default.createElement("div", { className: `flex items-center gap-1.5 overflow-x-auto text-xs py-1 text-neutral-400 whitespace-nowrap ${lockClass}` }, folderBreadcrumbs.map((crumb, idx) => /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ import_react65.default.createElement("span", null, "/"), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => {
|
|
3481
3481
|
setSelectedIds([]);
|
|
3482
3482
|
onNavigateFolder(crumb.id);
|
|
3483
|
-
}, className: `hover:text-black transition-colors outline-none ${idx === folderBreadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ import_react65.default.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ import_react65.default.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ import_react65.default.createElement("
|
|
3483
|
+
}, className: `hover:text-black transition-colors outline-none ${idx === folderBreadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ import_react65.default.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ import_react65.default.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ import_react65.default.createElement("thead", null, /* @__PURE__ */ import_react65.default.createElement("tr", { className: "bg-neutral-50" }, /* @__PURE__ */ import_react65.default.createElement("th", { className: "w-10 p-3" }, /* @__PURE__ */ import_react65.default.createElement(
|
|
3484
|
+
"input",
|
|
3485
|
+
{
|
|
3486
|
+
type: "checkbox",
|
|
3487
|
+
checked: selectedIds.length === items.length && items.length > 0,
|
|
3488
|
+
onChange: () => items.length > 0 && (selectedIds.length === items.length ? setSelectedIds([]) : setSelectedIds(items.map((i) => i.id))),
|
|
3489
|
+
className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer"
|
|
3490
|
+
}
|
|
3491
|
+
)), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3" }, "Name"), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3" }, "Modified"), /* @__PURE__ */ import_react65.default.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3 text-right" }, "Size"))), /* @__PURE__ */ import_react65.default.createElement("tbody", { className: "divide-y divide-neutral-50" }, items.length === 0 && !isLoading && /* @__PURE__ */ import_react65.default.createElement("tr", null, /* @__PURE__ */ import_react65.default.createElement("td", { colSpan: 4, className: "py-24 text-center" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex flex-col items-center justify-center" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.FolderIcon, size: 40, className: "text-neutral-200 mb-3" }), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-neutral-400" }, "This directory is empty.")))), items.map((item) => {
|
|
3484
3492
|
const isChecked = selectedIds.includes(item.id);
|
|
3485
3493
|
return /* @__PURE__ */ import_react65.default.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onDoubleClick: () => handleItemDoubleClick(item), onContextMenu: (e) => {
|
|
3486
3494
|
e.preventDefault();
|
|
3487
3495
|
setSelectedIds([item.id]);
|
|
3488
|
-
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ import_react65.default.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-
|
|
3496
|
+
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ import_react65.default.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react65.default.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react65.default.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative" }, /* @__PURE__ */ import_react65.default.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-xs text-black truncate pr-4" }, item.name)), /* @__PURE__ */ import_react65.default.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" }, formatDate3(item.updatedAt)), /* @__PURE__ */ import_react65.default.createElement("td", { className: "p-3 text-xs text-neutral-500 text-right whitespace-nowrap" }, formatBytes(item.size)));
|
|
3489
3497
|
}))), isLoading && /* @__PURE__ */ import_react65.default.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Loading03Icon, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ import_react65.default.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] " }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ import_react65.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react65.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.ArrowRight01Icon, size: 14 })))), activeJobs.length > 0 && /* @__PURE__ */ import_react65.default.createElement("div", { className: "fixed bottom-6 right-6 w-80 bg-white shadow-2xl rounded-xl z-100 overflow-hidden flex flex-col animate-in slide-in-from-bottom-4 duration-300" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "p-4 bg-neutral-50 flex items-center justify-between" }, /* @__PURE__ */ import_react65.default.createElement("div", null, /* @__PURE__ */ import_react65.default.createElement("h4", { className: "text-xs text-black " }, "Uploading Elements"), /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-[10px] text-neutral-500 mt-0.5" }, "Processing ", activeJobs.length, " streams")), onClearUploadQueue && activeJobs.length === 0 && /* @__PURE__ */ import_react65.default.createElement("button", { onClick: onClearUploadQueue, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Cancel01Icon, size: 14 }))), /* @__PURE__ */ import_react65.default.createElement("div", { className: "w-full h-1 bg-neutral-100 relative" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "h-full transition-all duration-500 ease-out", style: { width: `${globalProgress}%`, background: "linear-gradient(to right, #f64b4d, #ffa360)" } })), /* @__PURE__ */ import_react65.default.createElement("div", { className: "max-h-40 overflow-y-auto p-2" }, uploadQueue.map((job) => /* @__PURE__ */ import_react65.default.createElement("div", { key: job.id, className: "flex items-center justify-between p-2 text-[11px] gap-4" }, /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-black truncate flex-1 pr-2" }, job.name), /* @__PURE__ */ import_react65.default.createElement("div", { className: "shrink-0 whitespace-nowrap flex items-center gap-2" }, job.status === "COMPLETED" ? /* @__PURE__ */ import_react65.default.createElement(import_react66.HugeiconsIcon, { icon: import_core_free_icons22.Tick01Icon, size: 12, className: "text-green-600" }) : job.status === "FAILED" ? /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-red-600 text-[10px]" }, "Failed") : /* @__PURE__ */ import_react65.default.createElement("span", { className: "text-neutral-500 text-[10px]" }, job.progress, "%")))))), (isNewFolderModalOpen || renameModal.isOpen) && /* @__PURE__ */ import_react65.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react65.default.createElement("div", { className: "absolute inset-0 bg-black/30 ", onClick: () => !isSubmitting && (setIsNewFolderModalOpen(false), setRenameModal({ isOpen: false, id: "", name: "" })) }), /* @__PURE__ */ import_react65.default.createElement("form", { onSubmit: async (e) => {
|
|
3490
3498
|
e.preventDefault();
|
|
3491
3499
|
if (!folderInputVal.trim() || isSubmitting) return;
|
|
@@ -3566,12 +3574,12 @@ var UniversalTrashView = ({
|
|
|
3566
3574
|
type: "warning",
|
|
3567
3575
|
isDismissible: true
|
|
3568
3576
|
}
|
|
3569
|
-
)), /* @__PURE__ */ import_react67.default.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ import_react67.default.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ import_react67.default.createElement("
|
|
3577
|
+
)), /* @__PURE__ */ import_react67.default.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ import_react67.default.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ import_react67.default.createElement("thead", null, /* @__PURE__ */ import_react67.default.createElement("tr", { className: "bg-neutral-50" }, /* @__PURE__ */ import_react67.default.createElement("th", { className: "w-10 p-3" }, /* @__PURE__ */ import_react67.default.createElement("input", { type: "checkbox", checked: selectedIds.length === items.length && items.length > 0, onChange: () => items.length > 0 && (selectedIds.length === items.length ? setSelectedIds([]) : setSelectedIds(items.map((i) => i.id))), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react67.default.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3" }, "Name"), /* @__PURE__ */ import_react67.default.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3" }, "Modified"), /* @__PURE__ */ import_react67.default.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3 text-right" }, "Size"))), /* @__PURE__ */ import_react67.default.createElement("tbody", { className: "divide-y divide-neutral-50" }, items.length === 0 && !isLoading && /* @__PURE__ */ import_react67.default.createElement("tr", null, /* @__PURE__ */ import_react67.default.createElement("td", { colSpan: 4, className: "py-24 text-center" }, /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex flex-col items-center justify-center" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Delete01Icon, size: 40, className: "text-neutral-200 mb-3" }), /* @__PURE__ */ import_react67.default.createElement("p", { className: "text-xs text-neutral-400" }, "Trash is completely empty.")))), items.map((item) => {
|
|
3570
3578
|
const isChecked = selectedIds.includes(item.id);
|
|
3571
3579
|
return /* @__PURE__ */ import_react67.default.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onContextMenu: (e) => {
|
|
3572
3580
|
e.preventDefault();
|
|
3573
3581
|
setSelectedIds([item.id]);
|
|
3574
|
-
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ import_react67.default.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react67.default.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-
|
|
3582
|
+
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ import_react67.default.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ import_react67.default.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ import_react67.default.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ import_react67.default.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative opacity-50" }, /* @__PURE__ */ import_react67.default.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ import_react67.default.createElement("span", { className: "text-xs text-black truncate pr-4 line-through decoration-neutral-300 opacity-60" }, item.name)), /* @__PURE__ */ import_react67.default.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" }, formatDate3(item.updatedAt)), /* @__PURE__ */ import_react67.default.createElement("td", { className: "p-3 text-xs text-neutral-500 text-right whitespace-nowrap" }, formatBytes(item.size)));
|
|
3575
3583
|
}))), isLoading && /* @__PURE__ */ import_react67.default.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ import_react67.default.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ import_react67.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ import_react67.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react67.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react67.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ import_react67.default.createElement(import_react68.HugeiconsIcon, { icon: import_core_free_icons23.ArrowRight01Icon, size: 14 })))), showEmptyTrashDialog && /* @__PURE__ */ import_react67.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react67.default.createElement(
|
|
3576
3584
|
"div",
|
|
3577
3585
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -2662,7 +2662,7 @@ var UniversalBillingPage = ({
|
|
|
2662
2662
|
setIsUpdating(false);
|
|
2663
2663
|
}
|
|
2664
2664
|
};
|
|
2665
|
-
return /* @__PURE__ */ React30.createElement("div", { className: "flex max-w-5xl rounded-2xl bg-white p-6 flex-col gap-8 animate-in fade-in duration-300 " }, /* @__PURE__ */ React30.createElement(ManagedToaster, null), /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, currentView === "list" ? /* @__PURE__ */ React30.createElement("div", { className: "min-w-0 w-full" }, /* @__PURE__ */ React30.createElement("h1", { className: "text-
|
|
2665
|
+
return /* @__PURE__ */ React30.createElement("div", { className: "flex max-w-5xl rounded-2xl bg-white p-6 flex-col gap-8 animate-in fade-in duration-300 " }, /* @__PURE__ */ React30.createElement(ManagedToaster, null), /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, currentView === "list" ? /* @__PURE__ */ React30.createElement("div", { className: "min-w-0 w-full" }, /* @__PURE__ */ React30.createElement("h1", { className: "text-lg text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ React30.createElement("p", { className: "text-xs text-neutral-500 truncate mb-6" }, headerDescription), showSearchAndFilter && onSearchChange && onTimeframeChange && /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col sm:flex-row gap-4 mb-4" }, /* @__PURE__ */ React30.createElement(
|
|
2666
2666
|
TextInput,
|
|
2667
2667
|
{
|
|
2668
2668
|
placeholder: "Search by ID or Name...",
|
|
@@ -2677,10 +2677,10 @@ var UniversalBillingPage = ({
|
|
|
2677
2677
|
className: "px-4 py-3 text-sm bg-transparent border-b border-neutral-100 text-black outline-none focus:border-black shrink-0 text-left"
|
|
2678
2678
|
},
|
|
2679
2679
|
timeframe === "ALL" ? "All Time" : timeframe === "24H" ? "Past 24 Hours" : timeframe === "7D" ? "Past 7 Days" : "Past 30 Days"
|
|
2680
|
-
))) : /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React30.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[11px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ React30.createElement(HugeiconsIcon17, { icon: ArrowLeft01Icon4, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ React30.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ React30.createElement(HugeiconsIcon17, { icon: CircleLock02Icon4, size: 18, className: "text-current" }))), currentView === "list" && /* @__PURE__ */ React30.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-100 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ React30.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricPrimaryLabel), /* @__PURE__ */ React30.createElement("div", { className: "text-2xl text-black tracking-tight truncate" }, formatUsd(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ React30.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ React30.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricSecondaryLabel), /* @__PURE__ */ React30.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatUsd(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ React30.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ React30.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ React30.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Billing Status"), /* @__PURE__ */ React30.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ React30.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ React30.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ React30.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Next Billing Date"), /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ React30.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Last Paid Date"), /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ React30.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-6 truncate block " }, "Usage & Limits"), /* @__PURE__ */ React30.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ React30.createElement("div", { key: idx, className: "flex justify-between
|
|
2680
|
+
))) : /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React30.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[11px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ React30.createElement(HugeiconsIcon17, { icon: ArrowLeft01Icon4, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ React30.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ React30.createElement(HugeiconsIcon17, { icon: CircleLock02Icon4, size: 18, className: "text-current" }))), currentView === "list" && /* @__PURE__ */ React30.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 border-b border-neutral-100 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ React30.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricPrimaryLabel), /* @__PURE__ */ React30.createElement("div", { className: "text-2xl text-black tracking-tight truncate" }, formatUsd(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ React30.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ React30.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricSecondaryLabel), /* @__PURE__ */ React30.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatUsd(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ React30.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ React30.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ React30.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Billing Status"), /* @__PURE__ */ React30.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ React30.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ React30.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ React30.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Next Billing Date"), /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ React30.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Last Paid Date"), /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ React30.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-6 truncate block " }, "Usage & Limits"), /* @__PURE__ */ React30.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ React30.createElement("div", { key: idx, className: "flex justify-between pb-2" }, /* @__PURE__ */ React30.createElement("span", { className: "text-neutral-500 text-xs" }, metric.label), /* @__PURE__ */ React30.createElement("span", { className: "text-xs text-black" }, metric.value))))), /* @__PURE__ */ React30.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React30.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-4 truncate block " }, "Transaction History"), isLoading ? /* @__PURE__ */ React30.createElement(PageSpinner3, null) : invoices.length === 0 ? /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement("p", { className: "text-xs text-neutral-500 py-4" }, "No records found.")) : /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React30.createElement("div", { className: "divide-y divide-neutral-100" }, invoices.map((inv) => /* @__PURE__ */ React30.createElement("div", { key: inv.id, onClick: () => {
|
|
2681
2681
|
setSelectedInvoice(inv);
|
|
2682
2682
|
setCurrentView("details");
|
|
2683
|
-
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-black truncate pr-4" }, inv.name), /* @__PURE__ */ React30.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-black" }, formatUsd(inv.amountDue)), /* @__PURE__ */ React30.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ React30.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ React30.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React30.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React30.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React30.createElement(HugeiconsIcon17, { icon: ArrowLeft01Icon4, size: 14 })), /* @__PURE__ */ React30.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React30.createElement(HugeiconsIcon17, { icon: ArrowRight01Icon4, size: 14 })))))))), currentView === "details" && selectedInvoice && /* @__PURE__ */ React30.createElement("div", { className: "w-full max-w-5xl animate-in fade-in duration-300" }, /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col gap-6 w-full" }, /* @__PURE__ */ React30.createElement("div", null, /* @__PURE__ */ React30.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Breakdown"), /* @__PURE__ */ React30.createElement("h2", { className: "text-
|
|
2683
|
+
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-black truncate pr-4" }, inv.name), /* @__PURE__ */ React30.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React30.createElement("p", { className: "text-sm text-black" }, formatUsd(inv.amountDue)), /* @__PURE__ */ React30.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ React30.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ React30.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React30.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React30.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React30.createElement(HugeiconsIcon17, { icon: ArrowLeft01Icon4, size: 14 })), /* @__PURE__ */ React30.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React30.createElement(HugeiconsIcon17, { icon: ArrowRight01Icon4, size: 14 })))))))), currentView === "details" && selectedInvoice && /* @__PURE__ */ React30.createElement("div", { className: "w-full max-w-5xl animate-in fade-in duration-300" }, /* @__PURE__ */ React30.createElement("div", { className: "flex flex-col gap-6 w-full" }, /* @__PURE__ */ React30.createElement("div", null, /* @__PURE__ */ React30.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Breakdown"), /* @__PURE__ */ React30.createElement("h2", { className: "text-lg text-black mb-1" }, selectedInvoice.name), /* @__PURE__ */ React30.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate(selectedInvoice.createdAt))), /* @__PURE__ */ React30.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 " }, /* @__PURE__ */ React30.createElement("div", null, /* @__PURE__ */ React30.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Amount"), /* @__PURE__ */ React30.createElement("p", { className: "text-xl text-black" }, formatUsd(selectedInvoice.amountDue))), /* @__PURE__ */ React30.createElement("div", null, /* @__PURE__ */ React30.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Status"), isModMode ? /* @__PURE__ */ React30.createElement(
|
|
2684
2684
|
"button",
|
|
2685
2685
|
{
|
|
2686
2686
|
onClick: () => !isUpdating && setIsActionModalOpen(true),
|
|
@@ -2775,7 +2775,7 @@ var UniversalCheckoutView = ({
|
|
|
2775
2775
|
}
|
|
2776
2776
|
};
|
|
2777
2777
|
const displayStatus = localStatus || invoice?.status;
|
|
2778
|
-
return /* @__PURE__ */ React31.createElement("div", { className: "flex max-w-5xl rounded-2xl bg-white p-6 sm:p-8 flex-col gap-6 animate-in fade-in duration-300 mx-auto w-full border border-neutral-100" }, /* @__PURE__ */ React31.createElement(ManagedToaster, null), isLoading ? /* @__PURE__ */ React31.createElement(PageSpinner4, null) : !invoice ? /* @__PURE__ */ React31.createElement("div", { className: "py-12 text-center text-sm text-neutral-500" }, "Invoice not found or could not be loaded.") : /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col gap-8 w-full animate-in fade-in duration-300" }, /* @__PURE__ */ React31.createElement("div", null, /* @__PURE__ */ React31.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Checkout Summary"), /* @__PURE__ */ React31.createElement("h2", { className: "text-
|
|
2778
|
+
return /* @__PURE__ */ React31.createElement("div", { className: "flex max-w-5xl rounded-2xl bg-white p-6 sm:p-8 flex-col gap-6 animate-in fade-in duration-300 mx-auto w-full border border-neutral-100" }, /* @__PURE__ */ React31.createElement(ManagedToaster, null), isLoading ? /* @__PURE__ */ React31.createElement(PageSpinner4, null) : !invoice ? /* @__PURE__ */ React31.createElement("div", { className: "py-12 text-center text-sm text-neutral-500" }, "Invoice not found or could not be loaded.") : /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col gap-8 w-full animate-in fade-in duration-300" }, /* @__PURE__ */ React31.createElement("div", null, /* @__PURE__ */ React31.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Checkout Summary"), /* @__PURE__ */ React31.createElement("h2", { className: "text-lg text-black mb-1" }, invoice.name), /* @__PURE__ */ React31.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate2(invoice.createdAt))), /* @__PURE__ */ React31.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6" }, /* @__PURE__ */ React31.createElement("div", null, /* @__PURE__ */ React31.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Amount Due"), /* @__PURE__ */ React31.createElement("p", { className: "text-xl text-black" }, formatUsd2(invoice.amountDue))), /* @__PURE__ */ React31.createElement("div", null, /* @__PURE__ */ React31.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Status"), /* @__PURE__ */ React31.createElement("span", { className: `text-[11px] tracking-widest px-3 py-1 mt-1 inline-block rounded-full ${displayStatus === "PAID" ? "bg-emerald-100 text-emerald-700" : "bg-neutral-100 text-neutral-700"}` }, displayStatus)), /* @__PURE__ */ React31.createElement("div", { className: "md:col-span-2 pt-4 border-t border-neutral-200/60 mt-2" }, /* @__PURE__ */ React31.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Reference ID"), /* @__PURE__ */ React31.createElement("p", { className: "text-xs text-neutral-500 inline-block" }, invoice.invoiceNumber))), /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-end gap-4 pt-4" }, (displayStatus === "ISSUED" || displayStatus === "OVERDUE") && /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col items-end gap-2 w-full sm:w-auto" }, /* @__PURE__ */ React31.createElement(
|
|
2779
2779
|
ThreeDActionButton,
|
|
2780
2780
|
{
|
|
2781
2781
|
onClick: handlePayment,
|
|
@@ -3466,12 +3466,20 @@ var UniversalDriveView = ({
|
|
|
3466
3466
|
}, className: "text-neutral-500 hover:text-red-600 p-1 flex items-center gap-1.5 text-xs outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Delete02Icon2, size: 14 }), " Move to Trash"))), /* @__PURE__ */ React40.createElement("div", { className: `flex items-center gap-1.5 overflow-x-auto text-xs py-1 text-neutral-400 whitespace-nowrap ${lockClass}` }, folderBreadcrumbs.map((crumb, idx) => /* @__PURE__ */ React40.createElement(React40.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ React40.createElement("span", null, "/"), /* @__PURE__ */ React40.createElement("button", { onClick: () => {
|
|
3467
3467
|
setSelectedIds([]);
|
|
3468
3468
|
onNavigateFolder(crumb.id);
|
|
3469
|
-
}, className: `hover:text-black transition-colors outline-none ${idx === folderBreadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ React40.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ React40.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ React40.createElement("
|
|
3469
|
+
}, className: `hover:text-black transition-colors outline-none ${idx === folderBreadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ React40.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ React40.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ React40.createElement("thead", null, /* @__PURE__ */ React40.createElement("tr", { className: "bg-neutral-50" }, /* @__PURE__ */ React40.createElement("th", { className: "w-10 p-3" }, /* @__PURE__ */ React40.createElement(
|
|
3470
|
+
"input",
|
|
3471
|
+
{
|
|
3472
|
+
type: "checkbox",
|
|
3473
|
+
checked: selectedIds.length === items.length && items.length > 0,
|
|
3474
|
+
onChange: () => items.length > 0 && (selectedIds.length === items.length ? setSelectedIds([]) : setSelectedIds(items.map((i) => i.id))),
|
|
3475
|
+
className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer"
|
|
3476
|
+
}
|
|
3477
|
+
)), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3" }, "Name"), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3" }, "Modified"), /* @__PURE__ */ React40.createElement("th", { className: "text-[11px] font-light uppercase tracking-[0.2em] text-neutral-400 p-3 text-right" }, "Size"))), /* @__PURE__ */ React40.createElement("tbody", { className: "divide-y divide-neutral-50" }, items.length === 0 && !isLoading && /* @__PURE__ */ React40.createElement("tr", null, /* @__PURE__ */ React40.createElement("td", { colSpan: 4, className: "py-24 text-center" }, /* @__PURE__ */ React40.createElement("div", { className: "flex flex-col items-center justify-center" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: FolderIcon2, size: 40, className: "text-neutral-200 mb-3" }), /* @__PURE__ */ React40.createElement("p", { className: "text-xs text-neutral-400" }, "This directory is empty.")))), items.map((item) => {
|
|
3470
3478
|
const isChecked = selectedIds.includes(item.id);
|
|
3471
3479
|
return /* @__PURE__ */ React40.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onDoubleClick: () => handleItemDoubleClick(item), onContextMenu: (e) => {
|
|
3472
3480
|
e.preventDefault();
|
|
3473
3481
|
setSelectedIds([item.id]);
|
|
3474
|
-
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ React40.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React40.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-
|
|
3482
|
+
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ React40.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React40.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React40.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React40.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative" }, /* @__PURE__ */ React40.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ React40.createElement("span", { className: "text-xs text-black truncate pr-4" }, item.name)), /* @__PURE__ */ React40.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" }, formatDate3(item.updatedAt)), /* @__PURE__ */ React40.createElement("td", { className: "p-3 text-xs text-neutral-500 text-right whitespace-nowrap" }, formatBytes(item.size)));
|
|
3475
3483
|
}))), isLoading && /* @__PURE__ */ React40.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Loading03Icon12, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ React40.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ React40.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] " }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ React40.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React40.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: ArrowLeft01Icon8, size: 14 })), /* @__PURE__ */ React40.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: ArrowRight01Icon7, size: 14 })))), activeJobs.length > 0 && /* @__PURE__ */ React40.createElement("div", { className: "fixed bottom-6 right-6 w-80 bg-white shadow-2xl rounded-xl z-100 overflow-hidden flex flex-col animate-in slide-in-from-bottom-4 duration-300" }, /* @__PURE__ */ React40.createElement("div", { className: "p-4 bg-neutral-50 flex items-center justify-between" }, /* @__PURE__ */ React40.createElement("div", null, /* @__PURE__ */ React40.createElement("h4", { className: "text-xs text-black " }, "Uploading Elements"), /* @__PURE__ */ React40.createElement("p", { className: "text-[10px] text-neutral-500 mt-0.5" }, "Processing ", activeJobs.length, " streams")), onClearUploadQueue && activeJobs.length === 0 && /* @__PURE__ */ React40.createElement("button", { onClick: onClearUploadQueue, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Cancel01Icon3, size: 14 }))), /* @__PURE__ */ React40.createElement("div", { className: "w-full h-1 bg-neutral-100 relative" }, /* @__PURE__ */ React40.createElement("div", { className: "h-full transition-all duration-500 ease-out", style: { width: `${globalProgress}%`, background: "linear-gradient(to right, #f64b4d, #ffa360)" } })), /* @__PURE__ */ React40.createElement("div", { className: "max-h-40 overflow-y-auto p-2" }, uploadQueue.map((job) => /* @__PURE__ */ React40.createElement("div", { key: job.id, className: "flex items-center justify-between p-2 text-[11px] gap-4" }, /* @__PURE__ */ React40.createElement("span", { className: "text-black truncate flex-1 pr-2" }, job.name), /* @__PURE__ */ React40.createElement("div", { className: "shrink-0 whitespace-nowrap flex items-center gap-2" }, job.status === "COMPLETED" ? /* @__PURE__ */ React40.createElement(HugeiconsIcon26, { icon: Tick01Icon, size: 12, className: "text-green-600" }) : job.status === "FAILED" ? /* @__PURE__ */ React40.createElement("span", { className: "text-red-600 text-[10px]" }, "Failed") : /* @__PURE__ */ React40.createElement("span", { className: "text-neutral-500 text-[10px]" }, job.progress, "%")))))), (isNewFolderModalOpen || renameModal.isOpen) && /* @__PURE__ */ React40.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React40.createElement("div", { className: "absolute inset-0 bg-black/30 ", onClick: () => !isSubmitting && (setIsNewFolderModalOpen(false), setRenameModal({ isOpen: false, id: "", name: "" })) }), /* @__PURE__ */ React40.createElement("form", { onSubmit: async (e) => {
|
|
3476
3484
|
e.preventDefault();
|
|
3477
3485
|
if (!folderInputVal.trim() || isSubmitting) return;
|
|
@@ -3559,12 +3567,12 @@ var UniversalTrashView = ({
|
|
|
3559
3567
|
type: "warning",
|
|
3560
3568
|
isDismissible: true
|
|
3561
3569
|
}
|
|
3562
|
-
)), /* @__PURE__ */ React41.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ React41.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ React41.createElement("
|
|
3570
|
+
)), /* @__PURE__ */ React41.createElement("div", { className: `w-full overflow-x-auto select-none flex-1 relative min-h-75 ${lockClass}` }, /* @__PURE__ */ React41.createElement("table", { className: "w-full text-left border-collapse min-w-full relative z-10" }, /* @__PURE__ */ React41.createElement("thead", null, /* @__PURE__ */ React41.createElement("tr", { className: "bg-neutral-50" }, /* @__PURE__ */ React41.createElement("th", { className: "w-10 p-3" }, /* @__PURE__ */ React41.createElement("input", { type: "checkbox", checked: selectedIds.length === items.length && items.length > 0, onChange: () => items.length > 0 && (selectedIds.length === items.length ? setSelectedIds([]) : setSelectedIds(items.map((i) => i.id))), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React41.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3" }, "Name"), /* @__PURE__ */ React41.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3" }, "Modified"), /* @__PURE__ */ React41.createElement("th", { className: "text-[11px] font-light tracking-[0.2em] text-neutral-400 p-3 text-right" }, "Size"))), /* @__PURE__ */ React41.createElement("tbody", { className: "divide-y divide-neutral-50" }, items.length === 0 && !isLoading && /* @__PURE__ */ React41.createElement("tr", null, /* @__PURE__ */ React41.createElement("td", { colSpan: 4, className: "py-24 text-center" }, /* @__PURE__ */ React41.createElement("div", { className: "flex flex-col items-center justify-center" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon27, { icon: Delete01Icon2, size: 40, className: "text-neutral-200 mb-3" }), /* @__PURE__ */ React41.createElement("p", { className: "text-xs text-neutral-400" }, "Trash is completely empty.")))), items.map((item) => {
|
|
3563
3571
|
const isChecked = selectedIds.includes(item.id);
|
|
3564
3572
|
return /* @__PURE__ */ React41.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onContextMenu: (e) => {
|
|
3565
3573
|
e.preventDefault();
|
|
3566
3574
|
setSelectedIds([item.id]);
|
|
3567
|
-
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ React41.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React41.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-
|
|
3575
|
+
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ React41.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React41.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React41.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React41.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative opacity-50" }, /* @__PURE__ */ React41.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ React41.createElement("span", { className: "text-xs text-black truncate pr-4 line-through decoration-neutral-300 opacity-60" }, item.name)), /* @__PURE__ */ React41.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" }, formatDate3(item.updatedAt)), /* @__PURE__ */ React41.createElement("td", { className: "p-3 text-xs text-neutral-500 text-right whitespace-nowrap" }, formatBytes(item.size)));
|
|
3568
3576
|
}))), isLoading && /* @__PURE__ */ React41.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon27, { icon: Loading03Icon13, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ React41.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ React41.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ React41.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React41.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon27, { icon: ArrowLeft01Icon9, size: 14 })), /* @__PURE__ */ React41.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon27, { icon: ArrowRight01Icon8, size: 14 })))), showEmptyTrashDialog && /* @__PURE__ */ React41.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React41.createElement(
|
|
3569
3577
|
"div",
|
|
3570
3578
|
{
|