@retinalabsllc/zairusjs 0.2.5 → 0.2.7
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 +91 -1
- package/dist/index.d.ts +91 -1
- package/dist/index.js +232 -0
- package/dist/index.mjs +226 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -747,4 +747,94 @@ interface UniversalOverviewPageProps {
|
|
|
747
747
|
}
|
|
748
748
|
declare const UniversalOverviewPage: React.FC<UniversalOverviewPageProps>;
|
|
749
749
|
|
|
750
|
-
|
|
750
|
+
interface UniversalErrorViewProps {
|
|
751
|
+
isBooting: boolean;
|
|
752
|
+
isLoading: boolean;
|
|
753
|
+
activeData: any;
|
|
754
|
+
activeError: any;
|
|
755
|
+
/** The dynamic name of the environment failing to load (e.g., "application", "workspace") */
|
|
756
|
+
envName: string;
|
|
757
|
+
/** Function to execute when the user clicks "Refresh" */
|
|
758
|
+
onRetry: () => void;
|
|
759
|
+
/** URL to fallback to on a hard error. Defaults to '/app' */
|
|
760
|
+
returnUrl?: string;
|
|
761
|
+
/** Label for the hard fallback button. Defaults to 'Return to Workspace' */
|
|
762
|
+
returnLabel?: string;
|
|
763
|
+
}
|
|
764
|
+
declare const UniversalErrorView: React.FC<UniversalErrorViewProps>;
|
|
765
|
+
|
|
766
|
+
interface SearchTypeOption {
|
|
767
|
+
value: string;
|
|
768
|
+
label: string;
|
|
769
|
+
}
|
|
770
|
+
interface UniversalLookupPageProps {
|
|
771
|
+
headerTitle: string;
|
|
772
|
+
headerDescription: string;
|
|
773
|
+
searchOptions: SearchTypeOption[];
|
|
774
|
+
selectedSearchType: string;
|
|
775
|
+
onSearchTypeChange: (val: string) => void;
|
|
776
|
+
searchQuery: string;
|
|
777
|
+
onSearchQueryChange: (val: string) => void;
|
|
778
|
+
isSearching: boolean;
|
|
779
|
+
onSearch: (e: React.FormEvent) => void;
|
|
780
|
+
resultContent?: React.ReactNode;
|
|
781
|
+
modals?: React.ReactNode;
|
|
782
|
+
}
|
|
783
|
+
declare const UniversalLookupPage: React.FC<UniversalLookupPageProps>;
|
|
784
|
+
|
|
785
|
+
interface DirectoryItem {
|
|
786
|
+
id: string;
|
|
787
|
+
icon: React.ReactNode;
|
|
788
|
+
primaryText: React.ReactNode;
|
|
789
|
+
secondaryText: React.ReactNode;
|
|
790
|
+
rightBadge?: string;
|
|
791
|
+
rightBadgeClass?: string;
|
|
792
|
+
}
|
|
793
|
+
interface UniversalDirectoryPageProps {
|
|
794
|
+
headerTitle: string;
|
|
795
|
+
headerDescription: string;
|
|
796
|
+
hideSearch?: boolean;
|
|
797
|
+
headerAction?: React.ReactNode;
|
|
798
|
+
searchPlaceholder?: string;
|
|
799
|
+
searchQuery: string;
|
|
800
|
+
onSearchChange: (val: string) => void;
|
|
801
|
+
currentView: 'list' | 'details';
|
|
802
|
+
onBackToList: () => void;
|
|
803
|
+
items: DirectoryItem[];
|
|
804
|
+
isLoading: boolean;
|
|
805
|
+
currentPage: number;
|
|
806
|
+
totalPages: number;
|
|
807
|
+
onPageChange: (page: number) => void;
|
|
808
|
+
onRowClick: (id: string) => void;
|
|
809
|
+
detailsContent?: React.ReactNode;
|
|
810
|
+
modals?: React.ReactNode;
|
|
811
|
+
}
|
|
812
|
+
declare const UniversalDirectoryPage: React.FC<UniversalDirectoryPageProps>;
|
|
813
|
+
|
|
814
|
+
interface AiApproveDeclineProps {
|
|
815
|
+
suggestionTitle: string;
|
|
816
|
+
suggestionValue: React.ReactNode;
|
|
817
|
+
onApprove: () => void;
|
|
818
|
+
onDecline: () => void;
|
|
819
|
+
onEdit?: (newVal: string) => void;
|
|
820
|
+
}
|
|
821
|
+
declare const AiApproveDecline: React.FC<AiApproveDeclineProps>;
|
|
822
|
+
|
|
823
|
+
type AiTaskStatus = 'pending' | 'loading' | 'success' | 'error';
|
|
824
|
+
interface AiTask {
|
|
825
|
+
id: string;
|
|
826
|
+
label: string;
|
|
827
|
+
status: AiTaskStatus;
|
|
828
|
+
}
|
|
829
|
+
interface AiStageCheckProps {
|
|
830
|
+
tasks: AiTask[];
|
|
831
|
+
}
|
|
832
|
+
declare const AiStageCheck: React.FC<AiStageCheckProps>;
|
|
833
|
+
|
|
834
|
+
interface StaggerProps {
|
|
835
|
+
steps: string[];
|
|
836
|
+
currentStep: number;
|
|
837
|
+
}
|
|
838
|
+
declare const Stagger: React.FC<StaggerProps>;
|
|
839
|
+
|
|
840
|
+
export { AITranscriptionFeature, type AITranscriptionFeatureProps, type AgentFilePayload, type AgentStat, AiApproveDecline, type AiApproveDeclineProps, AiStageCheck, type AiStageCheckProps, type AiTask, type AiTaskStatus, AppBento2, type AppBento2Props, type BentoFeature, type BoardMember, type CompanyDetails, type DashboardList, type DashboardListItem, type DashboardStat, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, HeroSection, type HeroSectionProps, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, type NavItem, NumberInput, type NumberInputProps, type OverviewAlert, type OverviewStat, PageSpinner, type PageSpinnerProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type PricingFeature, type PricingPlan, ProductHero, type ProductHeroProps, type ProjectItem, type ScrollFeature, type SearchTypeOption, type SocialContact, type SocialLink, Stagger, type StaggerProps, TextInput, type TextInputProps, type ThemeColorOption, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, UniversalAgentConsole, type UniversalAgentConsoleProps, UniversalBillingPage, type UniversalBillingPageProps, UniversalDashboardPage, type UniversalDashboardPageProps, UniversalDirectoryPage, type UniversalDirectoryPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHeader, type UniversalHeaderProps, UniversalIdentityPage, type UniversalIdentityPageProps, type UniversalInvoice, UniversalLookupPage, type UniversalLookupPageProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalOverviewPage, type UniversalOverviewPageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, UniversalSidebar, type UniversalSidebarProps, type WorkspaceItem, ZairusAuth, type ZairusAuthProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -747,4 +747,94 @@ interface UniversalOverviewPageProps {
|
|
|
747
747
|
}
|
|
748
748
|
declare const UniversalOverviewPage: React.FC<UniversalOverviewPageProps>;
|
|
749
749
|
|
|
750
|
-
|
|
750
|
+
interface UniversalErrorViewProps {
|
|
751
|
+
isBooting: boolean;
|
|
752
|
+
isLoading: boolean;
|
|
753
|
+
activeData: any;
|
|
754
|
+
activeError: any;
|
|
755
|
+
/** The dynamic name of the environment failing to load (e.g., "application", "workspace") */
|
|
756
|
+
envName: string;
|
|
757
|
+
/** Function to execute when the user clicks "Refresh" */
|
|
758
|
+
onRetry: () => void;
|
|
759
|
+
/** URL to fallback to on a hard error. Defaults to '/app' */
|
|
760
|
+
returnUrl?: string;
|
|
761
|
+
/** Label for the hard fallback button. Defaults to 'Return to Workspace' */
|
|
762
|
+
returnLabel?: string;
|
|
763
|
+
}
|
|
764
|
+
declare const UniversalErrorView: React.FC<UniversalErrorViewProps>;
|
|
765
|
+
|
|
766
|
+
interface SearchTypeOption {
|
|
767
|
+
value: string;
|
|
768
|
+
label: string;
|
|
769
|
+
}
|
|
770
|
+
interface UniversalLookupPageProps {
|
|
771
|
+
headerTitle: string;
|
|
772
|
+
headerDescription: string;
|
|
773
|
+
searchOptions: SearchTypeOption[];
|
|
774
|
+
selectedSearchType: string;
|
|
775
|
+
onSearchTypeChange: (val: string) => void;
|
|
776
|
+
searchQuery: string;
|
|
777
|
+
onSearchQueryChange: (val: string) => void;
|
|
778
|
+
isSearching: boolean;
|
|
779
|
+
onSearch: (e: React.FormEvent) => void;
|
|
780
|
+
resultContent?: React.ReactNode;
|
|
781
|
+
modals?: React.ReactNode;
|
|
782
|
+
}
|
|
783
|
+
declare const UniversalLookupPage: React.FC<UniversalLookupPageProps>;
|
|
784
|
+
|
|
785
|
+
interface DirectoryItem {
|
|
786
|
+
id: string;
|
|
787
|
+
icon: React.ReactNode;
|
|
788
|
+
primaryText: React.ReactNode;
|
|
789
|
+
secondaryText: React.ReactNode;
|
|
790
|
+
rightBadge?: string;
|
|
791
|
+
rightBadgeClass?: string;
|
|
792
|
+
}
|
|
793
|
+
interface UniversalDirectoryPageProps {
|
|
794
|
+
headerTitle: string;
|
|
795
|
+
headerDescription: string;
|
|
796
|
+
hideSearch?: boolean;
|
|
797
|
+
headerAction?: React.ReactNode;
|
|
798
|
+
searchPlaceholder?: string;
|
|
799
|
+
searchQuery: string;
|
|
800
|
+
onSearchChange: (val: string) => void;
|
|
801
|
+
currentView: 'list' | 'details';
|
|
802
|
+
onBackToList: () => void;
|
|
803
|
+
items: DirectoryItem[];
|
|
804
|
+
isLoading: boolean;
|
|
805
|
+
currentPage: number;
|
|
806
|
+
totalPages: number;
|
|
807
|
+
onPageChange: (page: number) => void;
|
|
808
|
+
onRowClick: (id: string) => void;
|
|
809
|
+
detailsContent?: React.ReactNode;
|
|
810
|
+
modals?: React.ReactNode;
|
|
811
|
+
}
|
|
812
|
+
declare const UniversalDirectoryPage: React.FC<UniversalDirectoryPageProps>;
|
|
813
|
+
|
|
814
|
+
interface AiApproveDeclineProps {
|
|
815
|
+
suggestionTitle: string;
|
|
816
|
+
suggestionValue: React.ReactNode;
|
|
817
|
+
onApprove: () => void;
|
|
818
|
+
onDecline: () => void;
|
|
819
|
+
onEdit?: (newVal: string) => void;
|
|
820
|
+
}
|
|
821
|
+
declare const AiApproveDecline: React.FC<AiApproveDeclineProps>;
|
|
822
|
+
|
|
823
|
+
type AiTaskStatus = 'pending' | 'loading' | 'success' | 'error';
|
|
824
|
+
interface AiTask {
|
|
825
|
+
id: string;
|
|
826
|
+
label: string;
|
|
827
|
+
status: AiTaskStatus;
|
|
828
|
+
}
|
|
829
|
+
interface AiStageCheckProps {
|
|
830
|
+
tasks: AiTask[];
|
|
831
|
+
}
|
|
832
|
+
declare const AiStageCheck: React.FC<AiStageCheckProps>;
|
|
833
|
+
|
|
834
|
+
interface StaggerProps {
|
|
835
|
+
steps: string[];
|
|
836
|
+
currentStep: number;
|
|
837
|
+
}
|
|
838
|
+
declare const Stagger: React.FC<StaggerProps>;
|
|
839
|
+
|
|
840
|
+
export { AITranscriptionFeature, type AITranscriptionFeatureProps, type AgentFilePayload, type AgentStat, AiApproveDecline, type AiApproveDeclineProps, AiStageCheck, type AiStageCheckProps, type AiTask, type AiTaskStatus, AppBento2, type AppBento2Props, type BentoFeature, type BoardMember, type CompanyDetails, type DashboardList, type DashboardListItem, type DashboardStat, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, HeroSection, type HeroSectionProps, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, type NavItem, NumberInput, type NumberInputProps, type OverviewAlert, type OverviewStat, PageSpinner, type PageSpinnerProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type PricingFeature, type PricingPlan, ProductHero, type ProductHeroProps, type ProjectItem, type ScrollFeature, type SearchTypeOption, type SocialContact, type SocialLink, Stagger, type StaggerProps, TextInput, type TextInputProps, type ThemeColorOption, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, UniversalAgentConsole, type UniversalAgentConsoleProps, UniversalBillingPage, type UniversalBillingPageProps, UniversalDashboardPage, type UniversalDashboardPageProps, UniversalDirectoryPage, type UniversalDirectoryPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHeader, type UniversalHeaderProps, UniversalIdentityPage, type UniversalIdentityPageProps, type UniversalInvoice, UniversalLookupPage, type UniversalLookupPageProps, type UniversalMember, UniversalMembersPage, type UniversalMembersPageProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalOverviewPage, type UniversalOverviewPageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, UniversalSidebar, type UniversalSidebarProps, type WorkspaceItem, ZairusAuth, type ZairusAuthProps };
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
32
|
var index_exports = {};
|
|
33
33
|
__export(index_exports, {
|
|
34
34
|
AITranscriptionFeature: () => AITranscriptionFeature,
|
|
35
|
+
AiApproveDecline: () => AiApproveDecline,
|
|
36
|
+
AiStageCheck: () => AiStageCheck,
|
|
35
37
|
AppBento2: () => AppBento2,
|
|
36
38
|
Faq: () => Faq,
|
|
37
39
|
FeatureScroll: () => FeatureScroll,
|
|
@@ -52,14 +54,18 @@ __export(index_exports, {
|
|
|
52
54
|
PlatformFeatures: () => PlatformFeatures,
|
|
53
55
|
PortfolioHero: () => PortfolioHero,
|
|
54
56
|
ProductHero: () => ProductHero,
|
|
57
|
+
Stagger: () => Stagger,
|
|
55
58
|
TextInput: () => TextInput,
|
|
56
59
|
ThreeDActionButton: () => ThreeDActionButton,
|
|
57
60
|
ThreeDButton: () => ThreeDButton,
|
|
58
61
|
UniversalAgentConsole: () => UniversalAgentConsole,
|
|
59
62
|
UniversalBillingPage: () => UniversalBillingPage,
|
|
60
63
|
UniversalDashboardPage: () => UniversalDashboardPage,
|
|
64
|
+
UniversalDirectoryPage: () => UniversalDirectoryPage,
|
|
65
|
+
UniversalErrorView: () => UniversalErrorView,
|
|
61
66
|
UniversalHeader: () => UniversalHeader,
|
|
62
67
|
UniversalIdentityPage: () => UniversalIdentityPage,
|
|
68
|
+
UniversalLookupPage: () => UniversalLookupPage,
|
|
63
69
|
UniversalMembersPage: () => UniversalMembersPage,
|
|
64
70
|
UniversalOrganizationPage: () => UniversalOrganizationPage,
|
|
65
71
|
UniversalOverviewPage: () => UniversalOverviewPage,
|
|
@@ -2746,9 +2752,231 @@ var UniversalOverviewPage = ({
|
|
|
2746
2752
|
return /* @__PURE__ */ import_react53.default.createElement("div", { key: idx, className: `mt-4 p-5 rounded-xl flex flex-col gap-4 ${bgClass}` }, /* @__PURE__ */ import_react53.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react53.default.createElement("span", { className: `text-[11px] tracking-widest uppercase ${textClass}` }, alert.title)), alert.items.map((item, itemIdx) => /* @__PURE__ */ import_react53.default.createElement("div", { key: itemIdx }, /* @__PURE__ */ import_react53.default.createElement("span", { className: `text-[10px] tracking-[0.2em] block mb-1 uppercase ${lblClass}` }, item.label), /* @__PURE__ */ import_react53.default.createElement("p", { className: `text-[13px] leading-relaxed ${valClass}` }, item.text))));
|
|
2747
2753
|
}))));
|
|
2748
2754
|
};
|
|
2755
|
+
|
|
2756
|
+
// src/components/UniversalErrorView.tsx
|
|
2757
|
+
var import_react54 = __toESM(require("react"));
|
|
2758
|
+
var import_react55 = require("@hugeicons/react");
|
|
2759
|
+
var import_core_free_icons16 = require("@hugeicons/core-free-icons");
|
|
2760
|
+
var UniversalErrorView = ({
|
|
2761
|
+
isBooting,
|
|
2762
|
+
isLoading,
|
|
2763
|
+
activeData,
|
|
2764
|
+
activeError,
|
|
2765
|
+
envName,
|
|
2766
|
+
onRetry,
|
|
2767
|
+
returnUrl = "/app",
|
|
2768
|
+
returnLabel = "Return to Workspace"
|
|
2769
|
+
}) => {
|
|
2770
|
+
if (isBooting || isLoading && !activeData) {
|
|
2771
|
+
return /* @__PURE__ */ import_react54.default.createElement("div", { className: "flex items-center justify-center h-screen w-full bg-transparent" }, /* @__PURE__ */ import_react54.default.createElement(PageSpinner, null));
|
|
2772
|
+
}
|
|
2773
|
+
if (!isLoading && (!activeData || activeError)) {
|
|
2774
|
+
const errorString = typeof activeError === "string" ? activeError : JSON.stringify(activeError || "");
|
|
2775
|
+
const errorMsg = errorString.toLowerCase();
|
|
2776
|
+
const isPermissionError = errorMsg.includes("forbidden") || errorMsg.includes("unauthorized") || errorMsg.includes("permission");
|
|
2777
|
+
const isNetworkError = errorMsg.includes("network") || errorMsg.includes("connection") || errorMsg.includes("fetch");
|
|
2778
|
+
const isNotFoundError = errorMsg.includes("not found") || errorMsg.includes("404") || errorMsg.includes("does not exist") || !activeData && !isPermissionError && !isNetworkError;
|
|
2779
|
+
const apiMessage = typeof activeError === "string" && activeError.trim() !== "" ? activeError : null;
|
|
2780
|
+
let title = "Oops Connection Error";
|
|
2781
|
+
let description = apiMessage || `We could not load your request. Please check your connection and try again.`;
|
|
2782
|
+
let IconComponent = import_core_free_icons16.ConfusedIcon;
|
|
2783
|
+
if (isNotFoundError) {
|
|
2784
|
+
title = "Oops its not your fault";
|
|
2785
|
+
description = apiMessage || `We could not reach the ${envName} you just loaded. Our team has been notified.`;
|
|
2786
|
+
} else if (isPermissionError) {
|
|
2787
|
+
title = "Access Restricted";
|
|
2788
|
+
description = apiMessage || `You have insufficient permissions to view this ${envName}. Please contact your administrator.`;
|
|
2789
|
+
}
|
|
2790
|
+
return /* @__PURE__ */ import_react54.default.createElement("div", { className: "flex flex-col items-center justify-center h-screen w-full px-4 animate-in fade-in duration-500" }, /* @__PURE__ */ import_react54.default.createElement("div", { className: "mb-4 flex justify-center" }, /* @__PURE__ */ import_react54.default.createElement(import_react55.HugeiconsIcon, { icon: IconComponent, size: 48, className: "text-neutral-300" })), /* @__PURE__ */ import_react54.default.createElement("h2", { className: "text-lg text-black tracking-tight " }, title), /* @__PURE__ */ import_react54.default.createElement("p", { className: "text-xs mt-2 mb-8 text-neutral-500 max-w-sm text-center leading-relaxed" }, description), /* @__PURE__ */ import_react54.default.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full justify-center sm:w-auto" }, isNotFoundError || isPermissionError ? /* @__PURE__ */ import_react54.default.createElement(
|
|
2791
|
+
"button",
|
|
2792
|
+
{
|
|
2793
|
+
onClick: () => window.location.href = returnUrl,
|
|
2794
|
+
className: "px-6 py-2 bg-neutral-100 hover:bg-neutral-200 text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2795
|
+
},
|
|
2796
|
+
returnLabel
|
|
2797
|
+
) : (
|
|
2798
|
+
// Soft errors (Network timeouts) allow them to retry or optionally retreat
|
|
2799
|
+
/* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, envName.toLowerCase().includes("application") && /* @__PURE__ */ import_react54.default.createElement(
|
|
2800
|
+
"button",
|
|
2801
|
+
{
|
|
2802
|
+
onClick: () => window.location.href = returnUrl,
|
|
2803
|
+
className: "px-6 py-2 bg-transparent border border-neutral-200 hover:bg-neutral-50 text-neutral-600 hover:text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2804
|
+
},
|
|
2805
|
+
"Back Home"
|
|
2806
|
+
), /* @__PURE__ */ import_react54.default.createElement(
|
|
2807
|
+
"button",
|
|
2808
|
+
{
|
|
2809
|
+
onClick: onRetry,
|
|
2810
|
+
className: "px-6 py-2 bg-black hover:bg-neutral-800 text-white rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none capitalize"
|
|
2811
|
+
},
|
|
2812
|
+
"Refresh ",
|
|
2813
|
+
envName
|
|
2814
|
+
))
|
|
2815
|
+
)));
|
|
2816
|
+
}
|
|
2817
|
+
return null;
|
|
2818
|
+
};
|
|
2819
|
+
|
|
2820
|
+
// src/components/UniversalLookupPage.tsx
|
|
2821
|
+
var import_react56 = __toESM(require("react"));
|
|
2822
|
+
var import_react57 = require("@hugeicons/react");
|
|
2823
|
+
var import_core_free_icons17 = require("@hugeicons/core-free-icons");
|
|
2824
|
+
var UniversalLookupPage = ({
|
|
2825
|
+
headerTitle,
|
|
2826
|
+
headerDescription,
|
|
2827
|
+
searchOptions,
|
|
2828
|
+
selectedSearchType,
|
|
2829
|
+
onSearchTypeChange,
|
|
2830
|
+
searchQuery,
|
|
2831
|
+
onSearchQueryChange,
|
|
2832
|
+
isSearching,
|
|
2833
|
+
onSearch,
|
|
2834
|
+
resultContent,
|
|
2835
|
+
modals
|
|
2836
|
+
}) => {
|
|
2837
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = (0, import_react56.useState)(false);
|
|
2838
|
+
const currentOptionLabel = searchOptions.find((opt) => opt.value === selectedSearchType)?.label || "Select Type";
|
|
2839
|
+
return /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 min-h-full pb-20" }, /* @__PURE__ */ import_react56.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react56.default.createElement("h1", { className: "text-xl text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ import_react56.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, headerDescription))), /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full max-w-2xl pb-8" }, /* @__PURE__ */ import_react56.default.createElement("form", { className: "flex flex-col gap-6", onSubmit: onSearch, autoComplete: "off" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ import_react56.default.createElement(
|
|
2840
|
+
"button",
|
|
2841
|
+
{
|
|
2842
|
+
type: "button",
|
|
2843
|
+
onClick: () => setIsTypeModalOpen(true),
|
|
2844
|
+
className: "mt-2 text-[12px] tracking-widest bg-transparent border-b border-neutral-200 text-black text-left outline-none focus:border-black shrink-0 uppercase"
|
|
2845
|
+
},
|
|
2846
|
+
currentOptionLabel
|
|
2847
|
+
), /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ import_react56.default.createElement(
|
|
2848
|
+
TextInput,
|
|
2849
|
+
{
|
|
2850
|
+
placeholder: "Enter Exact ID, Email, or Slug...",
|
|
2851
|
+
value: searchQuery,
|
|
2852
|
+
onChange: onSearchQueryChange,
|
|
2853
|
+
disabled: isSearching
|
|
2854
|
+
}
|
|
2855
|
+
))), /* @__PURE__ */ import_react56.default.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ import_react56.default.createElement(
|
|
2856
|
+
ThreeDActionButton,
|
|
2857
|
+
{
|
|
2858
|
+
type: "submit",
|
|
2859
|
+
disabled: isSearching || !searchQuery,
|
|
2860
|
+
isLoading: isSearching,
|
|
2861
|
+
className: "min-w-32"
|
|
2862
|
+
},
|
|
2863
|
+
/* @__PURE__ */ import_react56.default.createElement(import_react57.HugeiconsIcon, { icon: import_core_free_icons17.Search01Icon, size: 14, className: "mr-2" }),
|
|
2864
|
+
" Lookup"
|
|
2865
|
+
)))), resultContent && /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full max-w-2xl bg-white text-left animate-in fade-in slide-in-from-bottom-4" }, /* @__PURE__ */ import_react56.default.createElement("h3", { className: "text-[10px] text-neutral-400 tracking-[0.2em] mb-6 uppercase" }, "Entity Record Found"), resultContent), isTypeModalOpen && /* @__PURE__ */ import_react56.default.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ import_react56.default.createElement("div", { className: "relative w-80 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react56.default.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ import_react56.default.createElement("h3", { className: "text-[14px] text-black tracking-tight mb-2" }, "Select Entity Type")), /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, searchOptions.map((option) => /* @__PURE__ */ import_react56.default.createElement(
|
|
2866
|
+
"button",
|
|
2867
|
+
{
|
|
2868
|
+
key: option.value,
|
|
2869
|
+
type: "button",
|
|
2870
|
+
onClick: () => {
|
|
2871
|
+
onSearchTypeChange(option.value);
|
|
2872
|
+
setIsTypeModalOpen(false);
|
|
2873
|
+
},
|
|
2874
|
+
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${selectedSearchType === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2875
|
+
},
|
|
2876
|
+
/* @__PURE__ */ import_react56.default.createElement("span", { className: "truncate pr-2" }, option.label),
|
|
2877
|
+
selectedSearchType === option.value && /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-1.5 h-1.5 bg-black rounded-full shrink-0" })
|
|
2878
|
+
))), /* @__PURE__ */ import_react56.default.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ import_react56.default.createElement("button", { type: "button", onClick: () => setIsTypeModalOpen(false), className: "w-full py-2.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none" }, "Cancel")))), modals);
|
|
2879
|
+
};
|
|
2880
|
+
|
|
2881
|
+
// src/components/UniversalDirectoryPage.tsx
|
|
2882
|
+
var import_react58 = __toESM(require("react"));
|
|
2883
|
+
var import_react59 = require("@hugeicons/react");
|
|
2884
|
+
var import_core_free_icons18 = require("@hugeicons/core-free-icons");
|
|
2885
|
+
var PageSpinner4 = () => /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons18.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2886
|
+
var UniversalDirectoryPage = ({
|
|
2887
|
+
headerTitle,
|
|
2888
|
+
headerDescription,
|
|
2889
|
+
hideSearch = false,
|
|
2890
|
+
// Default to false
|
|
2891
|
+
headerAction,
|
|
2892
|
+
// Capture the action button
|
|
2893
|
+
searchPlaceholder = "Search...",
|
|
2894
|
+
searchQuery,
|
|
2895
|
+
onSearchChange,
|
|
2896
|
+
currentView,
|
|
2897
|
+
onBackToList,
|
|
2898
|
+
items,
|
|
2899
|
+
isLoading,
|
|
2900
|
+
currentPage,
|
|
2901
|
+
totalPages,
|
|
2902
|
+
onPageChange,
|
|
2903
|
+
onRowClick,
|
|
2904
|
+
detailsContent,
|
|
2905
|
+
modals
|
|
2906
|
+
}) => {
|
|
2907
|
+
return /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-3xl fade-in duration-300 p-6 rounded-2xl bg-white min-h-full" }, /* @__PURE__ */ import_react58.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ import_react58.default.createElement(import_react58.default.Fragment, null, /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-full" }, /* @__PURE__ */ import_react58.default.createElement("h1", { className: "text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ import_react58.default.createElement("p", { className: "text-xs text-neutral-500 mb-6" }, headerDescription), !hideSearch && /* @__PURE__ */ import_react58.default.createElement(
|
|
2908
|
+
TextInput,
|
|
2909
|
+
{
|
|
2910
|
+
placeholder: searchPlaceholder,
|
|
2911
|
+
value: searchQuery,
|
|
2912
|
+
onChange: onSearchChange
|
|
2913
|
+
}
|
|
2914
|
+
)), headerAction && /* @__PURE__ */ import_react58.default.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ import_react58.default.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons18.ArrowLeft01Icon, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ import_react58.default.createElement(PageSpinner4, null) : /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ import_react58.default.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.") : items.map((item) => /* @__PURE__ */ import_react58.default.createElement(
|
|
2915
|
+
"div",
|
|
2916
|
+
{
|
|
2917
|
+
key: item.id,
|
|
2918
|
+
onClick: () => onRowClick(item.id),
|
|
2919
|
+
className: "flex items-center justify-between p-4 sm:p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0"
|
|
2920
|
+
},
|
|
2921
|
+
/* @__PURE__ */ import_react58.default.createElement("div", { className: "flex items-center gap-3 sm:gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "w-10 h-10 shrink-0 rounded-full flex items-center justify-center bg-neutral-100 text-black text-xs" }, item.icon), /* @__PURE__ */ import_react58.default.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ import_react58.default.createElement("div", { className: "text-sm text-black truncate pr-2" }, item.primaryText), /* @__PURE__ */ import_react58.default.createElement("div", { className: "text-xs text-neutral-500 truncate pr-2 mt-0.5" }, item.secondaryText))),
|
|
2922
|
+
item.rightBadge && /* @__PURE__ */ import_react58.default.createElement("div", { className: "shrink-0 pl-2" }, /* @__PURE__ */ import_react58.default.createElement("span", { className: `text-[10px] tracking-[0.2em] px-3 py-1 rounded-full whitespace-nowrap uppercase ${item.rightBadgeClass || "text-neutral-500 border border-neutral-200 bg-white"}` }, item.rightBadge))
|
|
2923
|
+
))), totalPages > 1 && /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex items-center justify-between p-4 sm:p-5" }, /* @__PURE__ */ import_react58.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] uppercase" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ import_react58.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react58.default.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons18.ArrowLeft01Icon, size: 14 })), /* @__PURE__ */ import_react58.default.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ import_react58.default.createElement(import_react59.HugeiconsIcon, { icon: import_core_free_icons18.ArrowRight01Icon, size: 14 })))))), currentView === "details" && detailsContent, modals);
|
|
2924
|
+
};
|
|
2925
|
+
|
|
2926
|
+
// src/components/AiApproveDecline.tsx
|
|
2927
|
+
var import_react60 = __toESM(require("react"));
|
|
2928
|
+
var import_react61 = require("@hugeicons/react");
|
|
2929
|
+
var import_core_free_icons19 = require("@hugeicons/core-free-icons");
|
|
2930
|
+
var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
|
|
2931
|
+
const [isEditing, setIsEditing] = (0, import_react60.useState)(false);
|
|
2932
|
+
const [editVal, setEditVal] = (0, import_react60.useState)(typeof suggestionValue === "string" ? suggestionValue : "");
|
|
2933
|
+
return /* @__PURE__ */ import_react60.default.createElement("div", { className: "border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ import_react60.default.createElement("div", null, /* @__PURE__ */ import_react60.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1 uppercase" }, "AI Suggestion: ", suggestionTitle), !isEditing ? /* @__PURE__ */ import_react60.default.createElement("div", { className: "text-sm text-black" }, suggestionValue) : /* @__PURE__ */ import_react60.default.createElement(
|
|
2934
|
+
"input",
|
|
2935
|
+
{
|
|
2936
|
+
type: "text",
|
|
2937
|
+
value: editVal,
|
|
2938
|
+
onChange: (e) => setEditVal(e.target.value),
|
|
2939
|
+
className: "w-full text-sm p-2 border-b border-purple-200 bg-transparent outline-none focus:border-purple-400 transition-colors",
|
|
2940
|
+
autoFocus: true
|
|
2941
|
+
}
|
|
2942
|
+
)), /* @__PURE__ */ import_react60.default.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ import_react60.default.createElement(import_react60.default.Fragment, null, /* @__PURE__ */ import_react60.default.createElement("button", { onClick: onApprove, title: "Approve", className: "p-1.5 text-black hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons19.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react60.default.createElement("button", { onClick: onDecline, title: "Decline", className: "p-1.5 text-neutral-400 hover:text-neutral-400 hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons19.CancelCircleIcon, size: 28 })), onEdit && /* @__PURE__ */ import_react60.default.createElement("button", { onClick: () => setIsEditing(true), title: "Edit", className: "ml-auto p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons19.PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ import_react60.default.createElement(import_react60.default.Fragment, null, /* @__PURE__ */ import_react60.default.createElement("button", { onClick: () => {
|
|
2943
|
+
onEdit?.(editVal);
|
|
2944
|
+
setIsEditing(false);
|
|
2945
|
+
}, title: "Save Edit", className: "p-1.5 text-emerald-500 hover:text-emerald-600 hover:bg-emerald-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons19.CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ import_react60.default.createElement("button", { onClick: () => setIsEditing(false), title: "Cancel Edit", className: "p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ import_react60.default.createElement(import_react61.HugeiconsIcon, { icon: import_core_free_icons19.CancelCircleIcon, size: 28 })))));
|
|
2946
|
+
};
|
|
2947
|
+
|
|
2948
|
+
// src/components/AiStageCheck.tsx
|
|
2949
|
+
var import_react62 = __toESM(require("react"));
|
|
2950
|
+
var import_react63 = require("@hugeicons/react");
|
|
2951
|
+
var import_core_free_icons20 = require("@hugeicons/core-free-icons");
|
|
2952
|
+
var AiStageCheck = ({ tasks }) => {
|
|
2953
|
+
return /* @__PURE__ */ import_react62.default.createElement("div", { className: "flex flex-col gap-3 p-5 rounded-2xl border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white relative overflow-hidden" }, /* @__PURE__ */ import_react62.default.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 mb-1 uppercase" }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ import_react62.default.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ import_react62.default.createElement("div", { className: "w-4 h-4 rounded-full border border-purple-200" }), task.status === "loading" && /* @__PURE__ */ import_react62.default.createElement(import_react63.HugeiconsIcon, { icon: import_core_free_icons20.Loading03Icon, size: 16, className: "animate-spin text-purple-500" }), task.status === "success" && /* @__PURE__ */ import_react62.default.createElement(import_react63.HugeiconsIcon, { icon: import_core_free_icons20.CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ import_react62.default.createElement(import_react63.HugeiconsIcon, { icon: import_core_free_icons20.CancelCircleIcon, size: 16, className: "text-red-500" }), /* @__PURE__ */ import_react62.default.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-purple-700" : "text-neutral-500"}` }, task.label))));
|
|
2954
|
+
};
|
|
2955
|
+
|
|
2956
|
+
// src/components/Stagger.tsx
|
|
2957
|
+
var import_react64 = __toESM(require("react"));
|
|
2958
|
+
var import_react65 = require("@hugeicons/react");
|
|
2959
|
+
var import_core_free_icons21 = require("@hugeicons/core-free-icons");
|
|
2960
|
+
var Stagger = ({ steps, currentStep }) => {
|
|
2961
|
+
const getIconForStep = (stepName) => {
|
|
2962
|
+
const lowerName = stepName.toLowerCase();
|
|
2963
|
+
if (lowerName.includes("document")) return import_core_free_icons21.Upload01Icon;
|
|
2964
|
+
if (lowerName.includes("review")) return import_core_free_icons21.FileSyncIcon;
|
|
2965
|
+
if (lowerName.includes("submit")) return import_core_free_icons21.CloudUploadIcon;
|
|
2966
|
+
return import_core_free_icons21.Briefcase02Icon;
|
|
2967
|
+
};
|
|
2968
|
+
return /* @__PURE__ */ import_react64.default.createElement("div", { className: "w-full flex items-center justify-between relative z-0" }, /* @__PURE__ */ import_react64.default.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-full h-px bg-neutral-200 -z-10" }), /* @__PURE__ */ import_react64.default.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 h-px bg-emerald-500 -z-10 transition-all duration-500", style: { width: `${currentStep / (steps.length - 1) * 100}%` } }), steps.map((step, idx) => {
|
|
2969
|
+
const isActive = idx === currentStep;
|
|
2970
|
+
const isPassed = idx < currentStep;
|
|
2971
|
+
const colorClass = isPassed ? "bg-emerald-500 text-white" : isActive ? "bg-neutral-200 text-neutral-500" : "bg-neutral-200 text-neutral-500";
|
|
2972
|
+
return /* @__PURE__ */ import_react64.default.createElement("div", { key: step, className: `w-6 h-6 rounded-full flex items-center justify-center transition-colors duration-300 ${colorClass}` }, /* @__PURE__ */ import_react64.default.createElement(import_react65.HugeiconsIcon, { icon: getIconForStep(step), size: 11 }));
|
|
2973
|
+
}));
|
|
2974
|
+
};
|
|
2749
2975
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2750
2976
|
0 && (module.exports = {
|
|
2751
2977
|
AITranscriptionFeature,
|
|
2978
|
+
AiApproveDecline,
|
|
2979
|
+
AiStageCheck,
|
|
2752
2980
|
AppBento2,
|
|
2753
2981
|
Faq,
|
|
2754
2982
|
FeatureScroll,
|
|
@@ -2769,14 +2997,18 @@ var UniversalOverviewPage = ({
|
|
|
2769
2997
|
PlatformFeatures,
|
|
2770
2998
|
PortfolioHero,
|
|
2771
2999
|
ProductHero,
|
|
3000
|
+
Stagger,
|
|
2772
3001
|
TextInput,
|
|
2773
3002
|
ThreeDActionButton,
|
|
2774
3003
|
ThreeDButton,
|
|
2775
3004
|
UniversalAgentConsole,
|
|
2776
3005
|
UniversalBillingPage,
|
|
2777
3006
|
UniversalDashboardPage,
|
|
3007
|
+
UniversalDirectoryPage,
|
|
3008
|
+
UniversalErrorView,
|
|
2778
3009
|
UniversalHeader,
|
|
2779
3010
|
UniversalIdentityPage,
|
|
3011
|
+
UniversalLookupPage,
|
|
2780
3012
|
UniversalMembersPage,
|
|
2781
3013
|
UniversalOrganizationPage,
|
|
2782
3014
|
UniversalOverviewPage,
|
package/dist/index.mjs
CHANGED
|
@@ -2706,8 +2706,230 @@ var UniversalOverviewPage = ({
|
|
|
2706
2706
|
return /* @__PURE__ */ React34.createElement("div", { key: idx, className: `mt-4 p-5 rounded-xl flex flex-col gap-4 ${bgClass}` }, /* @__PURE__ */ React34.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React34.createElement("span", { className: `text-[11px] tracking-widest uppercase ${textClass}` }, alert.title)), alert.items.map((item, itemIdx) => /* @__PURE__ */ React34.createElement("div", { key: itemIdx }, /* @__PURE__ */ React34.createElement("span", { className: `text-[10px] tracking-[0.2em] block mb-1 uppercase ${lblClass}` }, item.label), /* @__PURE__ */ React34.createElement("p", { className: `text-[13px] leading-relaxed ${valClass}` }, item.text))));
|
|
2707
2707
|
}))));
|
|
2708
2708
|
};
|
|
2709
|
+
|
|
2710
|
+
// src/components/UniversalErrorView.tsx
|
|
2711
|
+
import React35 from "react";
|
|
2712
|
+
import { HugeiconsIcon as HugeiconsIcon20 } from "@hugeicons/react";
|
|
2713
|
+
import { ConfusedIcon } from "@hugeicons/core-free-icons";
|
|
2714
|
+
var UniversalErrorView = ({
|
|
2715
|
+
isBooting,
|
|
2716
|
+
isLoading,
|
|
2717
|
+
activeData,
|
|
2718
|
+
activeError,
|
|
2719
|
+
envName,
|
|
2720
|
+
onRetry,
|
|
2721
|
+
returnUrl = "/app",
|
|
2722
|
+
returnLabel = "Return to Workspace"
|
|
2723
|
+
}) => {
|
|
2724
|
+
if (isBooting || isLoading && !activeData) {
|
|
2725
|
+
return /* @__PURE__ */ React35.createElement("div", { className: "flex items-center justify-center h-screen w-full bg-transparent" }, /* @__PURE__ */ React35.createElement(PageSpinner, null));
|
|
2726
|
+
}
|
|
2727
|
+
if (!isLoading && (!activeData || activeError)) {
|
|
2728
|
+
const errorString = typeof activeError === "string" ? activeError : JSON.stringify(activeError || "");
|
|
2729
|
+
const errorMsg = errorString.toLowerCase();
|
|
2730
|
+
const isPermissionError = errorMsg.includes("forbidden") || errorMsg.includes("unauthorized") || errorMsg.includes("permission");
|
|
2731
|
+
const isNetworkError = errorMsg.includes("network") || errorMsg.includes("connection") || errorMsg.includes("fetch");
|
|
2732
|
+
const isNotFoundError = errorMsg.includes("not found") || errorMsg.includes("404") || errorMsg.includes("does not exist") || !activeData && !isPermissionError && !isNetworkError;
|
|
2733
|
+
const apiMessage = typeof activeError === "string" && activeError.trim() !== "" ? activeError : null;
|
|
2734
|
+
let title = "Oops Connection Error";
|
|
2735
|
+
let description = apiMessage || `We could not load your request. Please check your connection and try again.`;
|
|
2736
|
+
let IconComponent = ConfusedIcon;
|
|
2737
|
+
if (isNotFoundError) {
|
|
2738
|
+
title = "Oops its not your fault";
|
|
2739
|
+
description = apiMessage || `We could not reach the ${envName} you just loaded. Our team has been notified.`;
|
|
2740
|
+
} else if (isPermissionError) {
|
|
2741
|
+
title = "Access Restricted";
|
|
2742
|
+
description = apiMessage || `You have insufficient permissions to view this ${envName}. Please contact your administrator.`;
|
|
2743
|
+
}
|
|
2744
|
+
return /* @__PURE__ */ React35.createElement("div", { className: "flex flex-col items-center justify-center h-screen w-full px-4 animate-in fade-in duration-500" }, /* @__PURE__ */ React35.createElement("div", { className: "mb-4 flex justify-center" }, /* @__PURE__ */ React35.createElement(HugeiconsIcon20, { icon: IconComponent, size: 48, className: "text-neutral-300" })), /* @__PURE__ */ React35.createElement("h2", { className: "text-lg text-black tracking-tight " }, title), /* @__PURE__ */ React35.createElement("p", { className: "text-xs mt-2 mb-8 text-neutral-500 max-w-sm text-center leading-relaxed" }, description), /* @__PURE__ */ React35.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full justify-center sm:w-auto" }, isNotFoundError || isPermissionError ? /* @__PURE__ */ React35.createElement(
|
|
2745
|
+
"button",
|
|
2746
|
+
{
|
|
2747
|
+
onClick: () => window.location.href = returnUrl,
|
|
2748
|
+
className: "px-6 py-2 bg-neutral-100 hover:bg-neutral-200 text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2749
|
+
},
|
|
2750
|
+
returnLabel
|
|
2751
|
+
) : (
|
|
2752
|
+
// Soft errors (Network timeouts) allow them to retry or optionally retreat
|
|
2753
|
+
/* @__PURE__ */ React35.createElement(React35.Fragment, null, envName.toLowerCase().includes("application") && /* @__PURE__ */ React35.createElement(
|
|
2754
|
+
"button",
|
|
2755
|
+
{
|
|
2756
|
+
onClick: () => window.location.href = returnUrl,
|
|
2757
|
+
className: "px-6 py-2 bg-transparent border border-neutral-200 hover:bg-neutral-50 text-neutral-600 hover:text-black rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none"
|
|
2758
|
+
},
|
|
2759
|
+
"Back Home"
|
|
2760
|
+
), /* @__PURE__ */ React35.createElement(
|
|
2761
|
+
"button",
|
|
2762
|
+
{
|
|
2763
|
+
onClick: onRetry,
|
|
2764
|
+
className: "px-6 py-2 bg-black hover:bg-neutral-800 text-white rounded-full text-[11px] tracking-widest transition-colors w-full sm:w-auto outline-none capitalize"
|
|
2765
|
+
},
|
|
2766
|
+
"Refresh ",
|
|
2767
|
+
envName
|
|
2768
|
+
))
|
|
2769
|
+
)));
|
|
2770
|
+
}
|
|
2771
|
+
return null;
|
|
2772
|
+
};
|
|
2773
|
+
|
|
2774
|
+
// src/components/UniversalLookupPage.tsx
|
|
2775
|
+
import React36, { useState as useState18 } from "react";
|
|
2776
|
+
import { HugeiconsIcon as HugeiconsIcon21 } from "@hugeicons/react";
|
|
2777
|
+
import { Search01Icon } from "@hugeicons/core-free-icons";
|
|
2778
|
+
var UniversalLookupPage = ({
|
|
2779
|
+
headerTitle,
|
|
2780
|
+
headerDescription,
|
|
2781
|
+
searchOptions,
|
|
2782
|
+
selectedSearchType,
|
|
2783
|
+
onSearchTypeChange,
|
|
2784
|
+
searchQuery,
|
|
2785
|
+
onSearchQueryChange,
|
|
2786
|
+
isSearching,
|
|
2787
|
+
onSearch,
|
|
2788
|
+
resultContent,
|
|
2789
|
+
modals
|
|
2790
|
+
}) => {
|
|
2791
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = useState18(false);
|
|
2792
|
+
const currentOptionLabel = searchOptions.find((opt) => opt.value === selectedSearchType)?.label || "Select Type";
|
|
2793
|
+
return /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col max-w-3xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300 min-h-full pb-20" }, /* @__PURE__ */ React36.createElement(ManagedToaster, null), /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React36.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React36.createElement("h1", { className: "text-xl text-black mb-1 truncate tracking-tight" }, headerTitle), /* @__PURE__ */ React36.createElement("p", { className: "text-xs text-neutral-500 truncate" }, headerDescription))), /* @__PURE__ */ React36.createElement("div", { className: "w-full max-w-2xl pb-8" }, /* @__PURE__ */ React36.createElement("form", { className: "flex flex-col gap-6", onSubmit: onSearch, autoComplete: "off" }, /* @__PURE__ */ React36.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ React36.createElement(
|
|
2794
|
+
"button",
|
|
2795
|
+
{
|
|
2796
|
+
type: "button",
|
|
2797
|
+
onClick: () => setIsTypeModalOpen(true),
|
|
2798
|
+
className: "mt-2 text-[12px] tracking-widest bg-transparent border-b border-neutral-200 text-black text-left outline-none focus:border-black shrink-0 uppercase"
|
|
2799
|
+
},
|
|
2800
|
+
currentOptionLabel
|
|
2801
|
+
), /* @__PURE__ */ React36.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React36.createElement(
|
|
2802
|
+
TextInput,
|
|
2803
|
+
{
|
|
2804
|
+
placeholder: "Enter Exact ID, Email, or Slug...",
|
|
2805
|
+
value: searchQuery,
|
|
2806
|
+
onChange: onSearchQueryChange,
|
|
2807
|
+
disabled: isSearching
|
|
2808
|
+
}
|
|
2809
|
+
))), /* @__PURE__ */ React36.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React36.createElement(
|
|
2810
|
+
ThreeDActionButton,
|
|
2811
|
+
{
|
|
2812
|
+
type: "submit",
|
|
2813
|
+
disabled: isSearching || !searchQuery,
|
|
2814
|
+
isLoading: isSearching,
|
|
2815
|
+
className: "min-w-32"
|
|
2816
|
+
},
|
|
2817
|
+
/* @__PURE__ */ React36.createElement(HugeiconsIcon21, { icon: Search01Icon, size: 14, className: "mr-2" }),
|
|
2818
|
+
" Lookup"
|
|
2819
|
+
)))), resultContent && /* @__PURE__ */ React36.createElement("div", { className: "w-full max-w-2xl bg-white text-left animate-in fade-in slide-in-from-bottom-4" }, /* @__PURE__ */ React36.createElement("h3", { className: "text-[10px] text-neutral-400 tracking-[0.2em] mb-6 uppercase" }, "Entity Record Found"), resultContent), isTypeModalOpen && /* @__PURE__ */ React36.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React36.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ React36.createElement("div", { className: "relative w-80 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React36.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React36.createElement("h3", { className: "text-[14px] text-black tracking-tight mb-2" }, "Select Entity Type")), /* @__PURE__ */ React36.createElement("div", { className: "w-full flex flex-col pl-2 pr-2 pb-2" }, searchOptions.map((option) => /* @__PURE__ */ React36.createElement(
|
|
2820
|
+
"button",
|
|
2821
|
+
{
|
|
2822
|
+
key: option.value,
|
|
2823
|
+
type: "button",
|
|
2824
|
+
onClick: () => {
|
|
2825
|
+
onSearchTypeChange(option.value);
|
|
2826
|
+
setIsTypeModalOpen(false);
|
|
2827
|
+
},
|
|
2828
|
+
className: `text-left px-4 py-3 text-[12px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${selectedSearchType === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
2829
|
+
},
|
|
2830
|
+
/* @__PURE__ */ React36.createElement("span", { className: "truncate pr-2" }, option.label),
|
|
2831
|
+
selectedSearchType === option.value && /* @__PURE__ */ React36.createElement("div", { className: "w-1.5 h-1.5 bg-black rounded-full shrink-0" })
|
|
2832
|
+
))), /* @__PURE__ */ React36.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React36.createElement("button", { type: "button", onClick: () => setIsTypeModalOpen(false), className: "w-full py-2.5 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none" }, "Cancel")))), modals);
|
|
2833
|
+
};
|
|
2834
|
+
|
|
2835
|
+
// src/components/UniversalDirectoryPage.tsx
|
|
2836
|
+
import React37 from "react";
|
|
2837
|
+
import { HugeiconsIcon as HugeiconsIcon22 } from "@hugeicons/react";
|
|
2838
|
+
import { ArrowLeft01Icon as ArrowLeft01Icon6, ArrowRight01Icon as ArrowRight01Icon6, Loading03Icon as Loading03Icon10 } from "@hugeicons/core-free-icons";
|
|
2839
|
+
var PageSpinner4 = () => /* @__PURE__ */ React37.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon22, { icon: Loading03Icon10, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
2840
|
+
var UniversalDirectoryPage = ({
|
|
2841
|
+
headerTitle,
|
|
2842
|
+
headerDescription,
|
|
2843
|
+
hideSearch = false,
|
|
2844
|
+
// Default to false
|
|
2845
|
+
headerAction,
|
|
2846
|
+
// Capture the action button
|
|
2847
|
+
searchPlaceholder = "Search...",
|
|
2848
|
+
searchQuery,
|
|
2849
|
+
onSearchChange,
|
|
2850
|
+
currentView,
|
|
2851
|
+
onBackToList,
|
|
2852
|
+
items,
|
|
2853
|
+
isLoading,
|
|
2854
|
+
currentPage,
|
|
2855
|
+
totalPages,
|
|
2856
|
+
onPageChange,
|
|
2857
|
+
onRowClick,
|
|
2858
|
+
detailsContent,
|
|
2859
|
+
modals
|
|
2860
|
+
}) => {
|
|
2861
|
+
return /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-3xl fade-in duration-300 p-6 rounded-2xl bg-white min-h-full" }, /* @__PURE__ */ React37.createElement(ManagedToaster, null), /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement("div", { className: "w-full" }, /* @__PURE__ */ React37.createElement("h1", { className: "text-xl text-black mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ React37.createElement("p", { className: "text-xs text-neutral-500 mb-6" }, headerDescription), !hideSearch && /* @__PURE__ */ React37.createElement(
|
|
2862
|
+
TextInput,
|
|
2863
|
+
{
|
|
2864
|
+
placeholder: searchPlaceholder,
|
|
2865
|
+
value: searchQuery,
|
|
2866
|
+
onChange: onSearchChange
|
|
2867
|
+
}
|
|
2868
|
+
)), headerAction && /* @__PURE__ */ React37.createElement("div", { className: "shrink-0 w-full sm:w-auto mt-4 sm:mt-0" }, headerAction)) : /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React37.createElement("button", { onClick: onBackToList, className: "text-[10px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none uppercase" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon22, { icon: ArrowLeft01Icon6, size: 12 }), " Back"))), currentView === "list" && /* @__PURE__ */ React37.createElement("div", { className: "w-full overflow-hidden pt-2" }, isLoading ? /* @__PURE__ */ React37.createElement(PageSpinner4, null) : /* @__PURE__ */ React37.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React37.createElement("div", { className: "divide-y divide-neutral-100" }, items.length === 0 ? /* @__PURE__ */ React37.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No records found.") : items.map((item) => /* @__PURE__ */ React37.createElement(
|
|
2869
|
+
"div",
|
|
2870
|
+
{
|
|
2871
|
+
key: item.id,
|
|
2872
|
+
onClick: () => onRowClick(item.id),
|
|
2873
|
+
className: "flex items-center justify-between p-4 sm:p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0"
|
|
2874
|
+
},
|
|
2875
|
+
/* @__PURE__ */ React37.createElement("div", { className: "flex items-center gap-3 sm:gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React37.createElement("div", { className: "w-10 h-10 shrink-0 rounded-full flex items-center justify-center bg-neutral-100 text-black text-xs" }, item.icon), /* @__PURE__ */ React37.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React37.createElement("div", { className: "text-sm text-black truncate pr-2" }, item.primaryText), /* @__PURE__ */ React37.createElement("div", { className: "text-xs text-neutral-500 truncate pr-2 mt-0.5" }, item.secondaryText))),
|
|
2876
|
+
item.rightBadge && /* @__PURE__ */ React37.createElement("div", { className: "shrink-0 pl-2" }, /* @__PURE__ */ React37.createElement("span", { className: `text-[10px] tracking-[0.2em] px-3 py-1 rounded-full whitespace-nowrap uppercase ${item.rightBadgeClass || "text-neutral-500 border border-neutral-200 bg-white"}` }, item.rightBadge))
|
|
2877
|
+
))), totalPages > 1 && /* @__PURE__ */ React37.createElement("div", { className: "flex items-center justify-between p-4 sm:p-5" }, /* @__PURE__ */ React37.createElement("span", { className: "text-[10px] text-neutral-400 tracking-[0.2em] uppercase" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React37.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React37.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon22, { icon: ArrowLeft01Icon6, size: 14 })), /* @__PURE__ */ React37.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-200 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon22, { icon: ArrowRight01Icon6, size: 14 })))))), currentView === "details" && detailsContent, modals);
|
|
2878
|
+
};
|
|
2879
|
+
|
|
2880
|
+
// src/components/AiApproveDecline.tsx
|
|
2881
|
+
import React38, { useState as useState19 } from "react";
|
|
2882
|
+
import { HugeiconsIcon as HugeiconsIcon23 } from "@hugeicons/react";
|
|
2883
|
+
import { CheckmarkCircle01Icon as CheckmarkCircle01Icon2, CancelCircleIcon, PencilEdit01Icon } from "@hugeicons/core-free-icons";
|
|
2884
|
+
var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
|
|
2885
|
+
const [isEditing, setIsEditing] = useState19(false);
|
|
2886
|
+
const [editVal, setEditVal] = useState19(typeof suggestionValue === "string" ? suggestionValue : "");
|
|
2887
|
+
return /* @__PURE__ */ React38.createElement("div", { className: "border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React38.createElement("div", null, /* @__PURE__ */ React38.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 block mb-1 uppercase" }, "AI Suggestion: ", suggestionTitle), !isEditing ? /* @__PURE__ */ React38.createElement("div", { className: "text-sm text-black" }, suggestionValue) : /* @__PURE__ */ React38.createElement(
|
|
2888
|
+
"input",
|
|
2889
|
+
{
|
|
2890
|
+
type: "text",
|
|
2891
|
+
value: editVal,
|
|
2892
|
+
onChange: (e) => setEditVal(e.target.value),
|
|
2893
|
+
className: "w-full text-sm p-2 border-b border-purple-200 bg-transparent outline-none focus:border-purple-400 transition-colors",
|
|
2894
|
+
autoFocus: true
|
|
2895
|
+
}
|
|
2896
|
+
)), /* @__PURE__ */ React38.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("button", { onClick: onApprove, title: "Approve", className: "p-1.5 text-black hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon23, { icon: CheckmarkCircle01Icon2, size: 28 })), /* @__PURE__ */ React38.createElement("button", { onClick: onDecline, title: "Decline", className: "p-1.5 text-neutral-400 hover:text-neutral-400 hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon23, { icon: CancelCircleIcon, size: 28 })), onEdit && /* @__PURE__ */ React38.createElement("button", { onClick: () => setIsEditing(true), title: "Edit", className: "ml-auto p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon23, { icon: PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("button", { onClick: () => {
|
|
2897
|
+
onEdit?.(editVal);
|
|
2898
|
+
setIsEditing(false);
|
|
2899
|
+
}, title: "Save Edit", className: "p-1.5 text-emerald-500 hover:text-emerald-600 hover:bg-emerald-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon23, { icon: CheckmarkCircle01Icon2, size: 28 })), /* @__PURE__ */ React38.createElement("button", { onClick: () => setIsEditing(false), title: "Cancel Edit", className: "p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React38.createElement(HugeiconsIcon23, { icon: CancelCircleIcon, size: 28 })))));
|
|
2900
|
+
};
|
|
2901
|
+
|
|
2902
|
+
// src/components/AiStageCheck.tsx
|
|
2903
|
+
import React39 from "react";
|
|
2904
|
+
import { HugeiconsIcon as HugeiconsIcon24 } from "@hugeicons/react";
|
|
2905
|
+
import { Loading03Icon as Loading03Icon11, CheckmarkCircle02Icon, CancelCircleIcon as CancelCircleIcon2 } from "@hugeicons/core-free-icons";
|
|
2906
|
+
var AiStageCheck = ({ tasks }) => {
|
|
2907
|
+
return /* @__PURE__ */ React39.createElement("div", { className: "flex flex-col gap-3 p-5 rounded-2xl border border-purple-100 bg-linear-to-bl from-purple-50/80 via-white to-white relative overflow-hidden" }, /* @__PURE__ */ React39.createElement("span", { className: "text-[10px] tracking-widest text-purple-600 mb-1 uppercase" }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ React39.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ React39.createElement("div", { className: "w-4 h-4 rounded-full border border-purple-200" }), task.status === "loading" && /* @__PURE__ */ React39.createElement(HugeiconsIcon24, { icon: Loading03Icon11, size: 16, className: "animate-spin text-purple-500" }), task.status === "success" && /* @__PURE__ */ React39.createElement(HugeiconsIcon24, { icon: CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ React39.createElement(HugeiconsIcon24, { icon: CancelCircleIcon2, size: 16, className: "text-red-500" }), /* @__PURE__ */ React39.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-purple-700" : "text-neutral-500"}` }, task.label))));
|
|
2908
|
+
};
|
|
2909
|
+
|
|
2910
|
+
// src/components/Stagger.tsx
|
|
2911
|
+
import React40 from "react";
|
|
2912
|
+
import { HugeiconsIcon as HugeiconsIcon25 } from "@hugeicons/react";
|
|
2913
|
+
import { Briefcase02Icon, Upload01Icon as Upload01Icon2, FileSyncIcon, CloudUploadIcon } from "@hugeicons/core-free-icons";
|
|
2914
|
+
var Stagger = ({ steps, currentStep }) => {
|
|
2915
|
+
const getIconForStep = (stepName) => {
|
|
2916
|
+
const lowerName = stepName.toLowerCase();
|
|
2917
|
+
if (lowerName.includes("document")) return Upload01Icon2;
|
|
2918
|
+
if (lowerName.includes("review")) return FileSyncIcon;
|
|
2919
|
+
if (lowerName.includes("submit")) return CloudUploadIcon;
|
|
2920
|
+
return Briefcase02Icon;
|
|
2921
|
+
};
|
|
2922
|
+
return /* @__PURE__ */ React40.createElement("div", { className: "w-full flex items-center justify-between relative z-0" }, /* @__PURE__ */ React40.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-full h-px bg-neutral-200 -z-10" }), /* @__PURE__ */ React40.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 h-px bg-emerald-500 -z-10 transition-all duration-500", style: { width: `${currentStep / (steps.length - 1) * 100}%` } }), steps.map((step, idx) => {
|
|
2923
|
+
const isActive = idx === currentStep;
|
|
2924
|
+
const isPassed = idx < currentStep;
|
|
2925
|
+
const colorClass = isPassed ? "bg-emerald-500 text-white" : isActive ? "bg-neutral-200 text-neutral-500" : "bg-neutral-200 text-neutral-500";
|
|
2926
|
+
return /* @__PURE__ */ React40.createElement("div", { key: step, className: `w-6 h-6 rounded-full flex items-center justify-center transition-colors duration-300 ${colorClass}` }, /* @__PURE__ */ React40.createElement(HugeiconsIcon25, { icon: getIconForStep(step), size: 11 }));
|
|
2927
|
+
}));
|
|
2928
|
+
};
|
|
2709
2929
|
export {
|
|
2710
2930
|
AITranscriptionFeature,
|
|
2931
|
+
AiApproveDecline,
|
|
2932
|
+
AiStageCheck,
|
|
2711
2933
|
AppBento2,
|
|
2712
2934
|
Faq,
|
|
2713
2935
|
FeatureScroll,
|
|
@@ -2728,14 +2950,18 @@ export {
|
|
|
2728
2950
|
PlatformFeatures,
|
|
2729
2951
|
PortfolioHero,
|
|
2730
2952
|
ProductHero,
|
|
2953
|
+
Stagger,
|
|
2731
2954
|
TextInput,
|
|
2732
2955
|
ThreeDActionButton,
|
|
2733
2956
|
ThreeDButton,
|
|
2734
2957
|
UniversalAgentConsole,
|
|
2735
2958
|
UniversalBillingPage,
|
|
2736
2959
|
UniversalDashboardPage,
|
|
2960
|
+
UniversalDirectoryPage,
|
|
2961
|
+
UniversalErrorView,
|
|
2737
2962
|
UniversalHeader,
|
|
2738
2963
|
UniversalIdentityPage,
|
|
2964
|
+
UniversalLookupPage,
|
|
2739
2965
|
UniversalMembersPage,
|
|
2740
2966
|
UniversalOrganizationPage,
|
|
2741
2967
|
UniversalOverviewPage,
|