@6thbridge/hexa 0.0.24 → 0.0.26

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.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import Dt from"react";import*as Te from"react";import*as ve from"@radix-ui/react-label";import{cva as Pt}from"class-variance-authority";import{clsx as xt}from"clsx";import{twMerge as Nt}from"tailwind-merge";function a(...e){return Nt(xt(e))}import{jsx as Rt}from"react/jsx-runtime";var wt=Pt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xe=Te.forwardRef(({className:e,...t},r)=>Rt(ve.Root,{ref:r,className:a(wt(),e),...t}));xe.displayName=ve.Root.displayName;import{jsx as Ae,jsxs as kt}from"react/jsx-runtime";var x=Dt.forwardRef(({className:e,children:t,showAsterisk:r,error:i,...o},n)=>Ae(xe,{ref:n,className:a(i&&"text-red-500",e),...o,children:r?kt("p",{children:[t,Ae("span",{className:"text-red-500",children:"*"})]}):t}));x.displayName="FormLabel";import{jsx as Fe,jsxs as Lt}from"react/jsx-runtime";var $=({size:e=16,colour:t="primary"})=>Lt("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Fe("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Fe("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as me from"react";import{Slot as St}from"@radix-ui/react-slot";import{cva as It}from"class-variance-authority";import{Fragment as Me,jsx as U,jsxs as Et}from"react/jsx-runtime";var ue=It("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),q=me.forwardRef(({className:e,variant:t="primary",size:r,asChild:i=!1,isLoading:o=!1,leftNode:n,rightNode:l,LoaderSize:s,...c},d)=>{let p=i?St:"button",{children:u,disabled:m,...g}=c,b=me.useRef(null);return U(p,{className:a(ue({variant:t,size:r,className:e})),ref:b||d,disabled:m||o,...g,children:U("div",{className:"flex font-medium justify-center items-center gap-2",children:o?U(Me,{children:U("span",{className:"mx-auto",children:U($,{size:s,colour:"secondary"})})}):Et(Me,{children:[n,u,l]})})})});q.displayName="Button";import{cva as Ne}from"class-variance-authority";import Tt from"react";import{jsx as At}from"react/jsx-runtime";var P=Tt.forwardRef(({className:e,children:t,error:r,...i},o)=>{let n=r??t;return n?At("p",{ref:o,className:a("text-xs font-normal text-[#F04248]",e),...i,children:n}):null});P.displayName="ErrorMessage";import Ft from"react";import{jsx as Mt}from"react/jsx-runtime";var w=Ft.forwardRef(({className:e,...t},r)=>Mt("div",{ref:r,className:a("text-sm text-[#8E98A8",e),...t}));w.displayName="FormDescription";import{jsx as M,jsxs as Oe}from"react/jsx-runtime";var Pe=Ne("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),Be=({className:e,status:t,type:r,ref:i,...o})=>M("input",{type:r,className:a(Pe({status:t}),e),ref:i,...o});Be.displayName="BaseInnerInput";var k=Ne("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Ve=Ne("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),W=({className:e,status:t="default",disabled:r,error:i,isLoading:o,sideNodeClassName:n,showAsterisk:l,label:s,description:c,ref:d,...p})=>{let u=t;return i&&(u="error"),o&&(u="loading"),r&&(u="prefilled"),Oe("div",{className:"relative space-y-1 w-full",children:[s&&M(x,{showAsterisk:l,error:i,children:s}),Oe("div",{className:a(k({status:u}),p.leftNode?"pl-0":"",p.rightNode?"pr-0":"",e),children:[p.leftNode?M("div",{className:a(Ve({status:u,side:"left"}),n),children:p.leftNode}):null,M(Be,{ref:d,disabled:o||r,className:a({"!pl-3":p.leftNode&&t!=="neutral","!pr-3":p.rightNode&&t!=="neutral"}),...p}),p.rightNode?M("div",{className:a(Ve({status:u,side:"right"}),n),children:p.rightNode}):null]}),c&&M(w,{className:"text-gray-400 text-sm !font-normal",children:c}),M(P,{error:i})]})};W.displayName="Input";import{useMemo as Bt,useState as $e}from"react";import{jsx as He,jsxs as Vt}from"react/jsx-runtime";var We=()=>Vt("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[He("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),He("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as Ge,jsxs as Ot}from"react/jsx-runtime";var ze=()=>Ot("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ge("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Ge("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as _e}from"react/jsx-runtime";var Ze=()=>_e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_e("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as Xe}from"react/jsx-runtime";var Ke=()=>Xe("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Xe("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as L,jsxs as Ht}from"react/jsx-runtime";var Ue=[{label:"Uppercase",key:"uppercase",RegExp:/[A-Z]/,validated:!1},{label:"Lowercase",key:"lowercase",RegExp:/[a-z]/,validated:!1},{label:"Number",key:"number",RegExp:/\d/,validated:!1},{label:"8 Characters",key:"eight-chars",RegExp:/.{8}/,validated:!1}],qe=({onValidate:e,onChange:t,disableValidation:r,...i})=>{let[o,n]=$e(!1),[l,s]=$e(Ue),c=m=>Ue.map(g=>({...g,validated:g.RegExp.test(m)})),d=m=>{let g=c(m),b=g.every(K=>K.validated);return s(g),b},p=m=>{if(t&&t(m),r)return;let g=m?.target?.value,b=d(g);e&&e(b,g)},u=Bt(()=>L("div",{className:"flex items-center gap-2",children:l?.map(m=>Ht("div",{className:a("text-xs flex items-center gap-0.5",{"text-[#62C554]":m?.validated,"text-[#8E98A8]":!m?.validated}),children:[L("span",{className:"",children:m?.validated?L(Ze,{}):L(Ke,{})}),L("span",{className:"",children:m?.label})]},m?.key))}),[l]);return L(W,{sideNodeClassName:"!border-l-0",rightNode:o?L("button",{type:"button",onClick:()=>n(m=>!m),children:L(We,{})}):L("button",{type:"button",onClick:()=>n(m=>!m),children:L(ze,{})}),type:o?"text":"password",onChange:p,description:!r&&u,...i})};qe.displayName="PasswordInput";import{cva as Wt}from"class-variance-authority";import{jsx as fe,jsxs as Gt}from"react/jsx-runtime";var Oo=Wt("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),je=({className:e,status:t="default",disabled:r,error:i,isLoading:o,showAsterisk:n,label:l,description:s,...c})=>{let d=t;return i&&(d="error"),o&&(d="loading"),r&&(d="prefilled"),Gt("div",{className:"relative space-y-1",children:[fe(x,{showAsterisk:n,error:i,children:l}),fe("textarea",{className:a("min-h-[80px]",k({status:d}),e),disabled:o||r,...c}),fe(w,{className:"text-gray-400 text-sm !font-normal",children:s}),fe(P,{error:i})]})};je.displayName="Textarea";import*as O from"react";import*as T from"react";import{Command as v}from"cmdk";import{Search as Kt}from"lucide-react";import*as j from"react";import*as y from"@radix-ui/react-dialog";import{jsx as Je,jsxs as zt}from"react/jsx-runtime";var Qe=()=>zt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[Je("path",{d:"M18 6 6 18"}),Je("path",{d:"m6 6 12 12"})]});import{Fragment as Xt,jsx as h,jsxs as G}from"react/jsx-runtime";var _t=y.Root,Zt=y.Trigger,Ye=y.Portal,et=j.forwardRef(({className:e,...t},r)=>h(y.Overlay,{ref:r,className:a("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));et.displayName=y.Overlay.displayName;var we=j.forwardRef(({className:e,hideCloseButton:t,children:r,...i},o)=>G(Ye,{children:[h(et,{}),G(y.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...i,children:[r,!t&&G(y.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h(Qe,{}),h("span",{className:"sr-only",children:"Close"})]})]})]}));we.displayName=y.Content.displayName;var tt=({className:e,...t})=>h("div",{className:a("flex flex-col space-y-1.5 text-left",e),...t});tt.displayName="DialogHeader";var rt=({className:e,...t})=>h("div",{className:a("flex flex-row justify-end sm:space-x-2",e),...t});rt.displayName="DialogFooter";var ot=j.forwardRef(({className:e,...t},r)=>h(y.Title,{ref:r,className:a("text-xl font-semibold leading-none tracking-tight",e),...t}));ot.displayName=y.Title.displayName;var at=j.forwardRef(({className:e,...t},r)=>h(y.Description,{ref:r,className:a("text-sm text-gray-500",e),...t}));at.displayName=y.Description.displayName;var Re=({trigger:e=void 0,children:t,open:r,onOpenChange:i,hideCloseButton:o,footer:n,title:l,description:s,contentClassName:c,headerClassName:d,titleClassName:p,descriptionClassName:u,footerClassName:m,asChild:g=!0,onOpenAutoFocus:b,onCloseAutoFocus:K,onEscapeKeyDown:pe,onInteractOutside:B,onPointerDownOutside:Ce,...he})=>G(_t,{...he,open:r,onOpenChange:i,children:[h(Zt,{asChild:g,children:e}),h(Ye,{children:G(we,{className:c,hideCloseButton:o,onOpenAutoFocus:b,onCloseAutoFocus:K,onEscapeKeyDown:pe,onPointerDownOutside:Ce,onInteractOutside:B,children:[l||s?G(tt,{className:d,children:[l&&h(ot,{className:p,children:l}),s&&h(at,{className:u,children:s})]}):h(Xt,{}),t,n&&h(rt,{className:m,children:n})]})})]});Re.displayName=y.Dialog.displayName;import{Fragment as Qo,jsx as S,jsxs as qt}from"react/jsx-runtime";var J=T.forwardRef(({className:e,...t},r)=>S(v,{ref:r,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));J.displayName=v.displayName;var Q=T.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...i},o)=>qt("div",{className:a("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?S($,{size:16,colour:"secondary"}):S(Kt,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),S(v.Input,{ref:o,className:a("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:r,...i})]}));Q.displayName=v.Input.displayName;var Y=T.forwardRef(({className:e,...t},r)=>S(v.List,{ref:r,className:a("overflow-y-auto overflow-x-hidden",e),...t}));Y.displayName=v.List.displayName;var ee=T.forwardRef((e,t)=>S(v.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ee.displayName=v.Empty.displayName;var te=T.forwardRef(({className:e,...t},r)=>S(v.Group,{ref:r,className:a("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));te.displayName=v.Group.displayName;var $t=T.forwardRef(({className:e,...t},r)=>S(v.Separator,{ref:r,className:a("-mx-1 h-px bg-border",e),...t}));$t.displayName=v.Separator.displayName;var re=T.forwardRef(({className:e,...t},r)=>S(v.Item,{ref:r,className:a("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));re.displayName=v.Item.displayName;var Ut=({className:e,...t})=>S("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ut.displayName="CommandShortcut";import*as nt from"react";import*as R from"@radix-ui/react-popover";import{jsx as oe,jsxs as jt}from"react/jsx-runtime";var z=R.Root,A=R.Trigger,V=nt.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:i=!0,...o},n)=>i?oe(R.Portal,{children:oe(R.Content,{ref:n,align:t,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o})}):oe(R.Content,{ref:n,align:t,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o}));V.displayName=R.Content.displayName;var ge=({trigger:e,children:t,open:r,onOpenChange:i,contentClassName:o,asChild:n=!0,align:l,side:s,alignOffset:c,triggerClassName:d,sideOffset:p,onOpenAutoFocus:u,onCloseAutoFocus:m,portal:g=!0,...b})=>jt(z,{...b,open:r,onOpenChange:i,children:[oe(A,{asChild:n,className:d,children:e}),oe(V,{alignOffset:c,sideOffset:p,side:s,align:l,className:o,onOpenAutoFocus:u,onCloseAutoFocus:m,portal:g,children:t})]});ge.displayName=R.Root.displayName;import*as De from"react";import*as N from"@radix-ui/react-scroll-area";import{jsx as ae,jsxs as Jt}from"react/jsx-runtime";var ne=De.forwardRef(({className:e,viewPortClassName:t,children:r,...i},o)=>Jt(N.Root,{ref:o,className:a("relative overflow-hidden",e),...i,children:[ae(N.Viewport,{className:a("h-full w-full rounded-[inherit]",t),children:r}),ae(it,{}),ae(N.Corner,{})]}));ne.displayName=N.Root.displayName;var it=De.forwardRef(({className:e,orientation:t="vertical",...r},i)=>ae(N.ScrollAreaScrollbar,{ref:i,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:ae(N.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));it.displayName=N.ScrollAreaScrollbar.displayName;import{jsx as I,jsxs as ye}from"react/jsx-runtime";var st=({className:e,value:t,placeholder:r="",status:i,disabled:o})=>I(A,{asChild:!0,disabled:o,children:ye("button",{disabled:o,className:a(k({status:i}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??r??"Select options...",I("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:I("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),be=({options:e=[],value:t,onChange:r,containerClassName:i,placeholder:o,disabled:n,loading:l,optionComponent:s,children:c,modal:d=!1,hideSearch:p,className:u,inputValue:m,onValueChange:g,onInputValueChange:b})=>{let[K,pe]=O.useState(!1),B=O.useRef(null),[Ce,he]=O.useState(void 0);return O.useLayoutEffect(()=>{B.current&&he(B.current.clientWidth)},[B.current]),ye(z,{modal:d,open:K,onOpenChange:pe,children:[I("div",{className:a("w-full",u),ref:B,children:c}),I(V,{portal:!d,className:"p-0 min-w-[200px]",style:{width:Ce},children:ye(J,{className:a("relative max-h-[270px]",{"mt-2":!p}),children:[!p&&I(Q,{loading:l,placeholder:o??"Search options...",onValueChange:b,value:m,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),I(ne,{viewPortClassName:"max-h-[225px]",className:a("w-full px-0 h-full overflow-y-auto",i),children:ye(Y,{children:[!p&&I(ee,{children:"No result found."}),I(te,{className:"w-full",children:e?.map(H=>I(re,{defaultValue:t?.label,value:H.label,disabled:n,onSelect:()=>{r(H),pe(!1),g?.(H?.value)},children:s?s(H):H.label},H.value))})]})})]})})]})};var ke=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],lt=()=>{let e={};return ke?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as le from"react";import*as dt from"react-phone-number-input";import er from"react-phone-number-input";import tr from"react-phone-number-input/flags";import{jsx as ie,jsxs as Yt}from"react/jsx-runtime";var Qt=e=>Yt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[ie("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",ie("path",{d:"M3 10L7 8L10 9L13 8L16 10L19 9L22 11L25 10L28 12V15L26 17L28 19L27 22L29 24L27 26L24 25L21 26L18 24L15 25L12 23L9 24L6 22L4 23L2 21V18L4 16L3 13L5 11L3 10Z",fill:"#34D399"}),ie("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),ie("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),ie("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),ct=Qt;import{jsx as f,jsxs as se}from"react/jsx-runtime";var pt=le.forwardRef(({className:e,onChange:t,value:r,modal:i,showAsterisk:o,label:n,description:l,error:s,defaultCountry:c="NG",...d},p)=>{let u=g=>f(rr,{...g,status:d.status,modal:i,onChange:b=>g.onChange(b)}),m=r;return se("div",{className:"relative space-y-1",children:[f(x,{showAsterisk:o,error:s,children:n}),f(er,{ref:p,className:a("flex",e),flagComponent:F,countrySelectComponent:u,focusInputOnCountrySelection:!0,countryCallingCodeEditable:!0,enableLongNumber:!0,addInternationalOption:!0,international:!0,inputComponent:mt,defaultCountry:c,containerComponent:({children:g})=>f("div",{className:a(k({status:d?.status}),"p-0 gap-1"),children:g}),...d,onChange:g=>{t&&t(g)},value:m}),f(w,{className:"text-gray-400 text-sm !font-normal",children:l}),f(P,{error:s})]})});pt.displayName="PhoneInput";var mt=le.forwardRef(({className:e,...t},r)=>f("input",{className:a(Pe({status:t?.status})," h-full !-mt-0 border-0 rounded-l-none !flex-1 !block !w-full",e),...t,ref:r}));mt.displayName="InputComponent";var rr=({disabled:e,value:t,onChange:r,options:i,status:o,modal:n})=>{let l=le.useCallback(s=>{console.log(s),r(s)},[r]);return se(z,{modal:n,children:[f(A,{disabled:e,children:se("div",{className:a(k({status:o}),"!border-0 transition justify-center items-center disabled:text-base-500 flex gap-3 h-full rounded-e-none pl-2 pr-2"),children:[f(F,{country:t,countryName:t}),f("svg",{className:a("-mr-2 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:f("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),f(V,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:f(J,{children:f(Y,{children:se(ne,{className:"h-72",children:[f(Q,{placeholder:"Search country..."}),f(ee,{children:"No country found."}),f(te,{children:i.filter(s=>s.value).map(s=>se(re,{className:"gap-2",onSelect:()=>l(s.value),children:[f(F,{country:s.value,countryName:s.label}),f("span",{className:"flex-1 text-sm",children:s.label}),s.value&&f("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${dt.getCountryCallingCode(s.value)}`}),f("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:a("ml-auto",s.value===t?"opacity-100":"opacity-0"),children:f("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},F=({country:e,countryName:t,className:r})=>{let i=tr[e];return e==="GLOBAL"?f("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:f(ct,{className:"w-full h-[90%]"})}):f("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:i&&f(i,{title:t})})};F.displayName="FlagComponent";import{jsx as D,jsxs as ce}from"react/jsx-runtime";var or=lt(),ar=({className:e,value:t,placeholder:r="",status:i,disabled:o})=>D(A,{asChild:!0,disabled:o,children:ce("button",{disabled:o,className:a(k({status:i}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?ce("div",{className:"flex gap-2 items-center",children:[D(F,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),ce("span",{className:"",children:[" ",or[t]]})]}):r??"Select options...",D("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:D("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),nr=({hideSearch:e=!0,showAsterisk:t,label:r,description:i,error:o,...n})=>{let l=ke?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return ce("div",{className:"relative space-y-1",children:[D(x,{showAsterisk:t,error:o,children:r}),D(be,{options:l,hideSearch:e,optionComponent:s=>ce("div",{className:"w-full flex items-center gap-2",children:[D(F,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),D("span",{className:"flex-1 text-sm",children:s?.label})]}),...n,children:D(ar,{value:n?.value?.value,status:n?.status,placeholder:n?.placeholder??" Select Country"})}),D(w,{className:"text-gray-400 text-sm !font-normal",children:i}),D(P,{error:o})]})};import{jsx as de,jsxs as sr}from"react/jsx-runtime";var ir=({showAsterisk:e,label:t,description:r,error:i,hideSearch:o=!0,status:n,...l})=>sr("div",{className:"relative space-y-1",children:[de(x,{showAsterisk:e,error:i,children:t}),de(be,{hideSearch:o,...l,containerClassName:"h-full",children:de(st,{disabled:l?.disabled,placeholder:"Select or search email",status:n,value:l?.value?.label??l?.value?.value})}),de(w,{className:"text-gray-400 text-sm !font-normal",children:r}),de(P,{error:i})]});import lr from"react-otp-input";import{cva as cr}from"class-variance-authority";import{useMemo as dr}from"react";import{jsx as ut}from"react/jsx-runtime";var pr=cr("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),mr=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:i="-",status:o,...n})=>{let l=dr(()=>i||new Array(e).fill("").reduce((d,p)=>d+=p,""),[e,i]);return ut(lr,{numInputs:e,placeholder:l,containerStyle:a("w-full",r),inputStyle:a(pr({status:o}),t),renderInput:s=>ut("input",{...s}),...n})};import{useState as ur}from"react";import{Copy as fr,CheckIcon as gr}from"lucide-react";import{motion as yr,AnimatePresence as br}from"framer-motion";import{jsx as _,jsxs as hr}from"react/jsx-runtime";var Cr=({text:e,onCopy:t,iconsPosition:r="right",clampText:i=!0})=>{let[o,n]=ur(!1),l=()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),t?.(),setTimeout(()=>n(!1),2e3)})},s=o?gr:fr;return hr("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[r==="left"&&_(ft,{Icon:s,onClick:l,copied:o}),_("span",{className:`${i?"truncate max-w-[100px]":""}`,children:e}),r==="right"&&_(ft,{Icon:s,onClick:l,copied:o})]})},ft=({Icon:e,onClick:t,copied:r})=>_(br,{mode:"wait",children:_(yr.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:_(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});import{useEffect as gt,useState as vr}from"react";import{Search as xr}from"lucide-react";import{jsx as yt}from"react/jsx-runtime";var Le=({value:e,onChange:t,debounce:r=500,addon:i,...o})=>{let[n,l]=vr(e??""),s=c=>l(c.target.value);return gt(()=>{e&&l(e)},[e]),gt(()=>{let c=setTimeout(()=>{t(n)},r);return()=>clearTimeout(c)},[n,r,t]),yt(W,{leftNode:i??yt(xr,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...o,className:a("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",o?.className),onChange:s,value:n})};import{jsx as Se}from"react/jsx-runtime";var Nr=({status:e,variant:t,className:r})=>Se("div",{children:Se("div",{className:a("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},r),children:Se("p",{children:e.replace("-"," ")})})});import{ListFilter as kr,Loader as Lr,RotateCw as Sr}from"lucide-react";import{flexRender as bt}from"@tanstack/react-table";import{jsx as E,jsxs as Pr}from"react/jsx-runtime";var Ct=({table:e,isMobile:t,onRowClick:r,id:i})=>E("div",{className:a("relative w-full rounded-b border-0",{}),children:Pr("table",{id:i??"table",className:"w-full overflow-x-scroll",children:[E("thead",{children:e.getHeaderGroups().map(o=>E("tr",{className:a(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:o.headers.map(n=>E("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:E("div",{className:a("flex items-center",{"cursor-pointer select-none":n.column.getCanSort()}),onClick:n.column.getToggleSortingHandler(),children:n.isPlaceholder?null:bt(n.column.columnDef.header,n.getContext())})},n.id))},o.id))}),E("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(o=>E("tr",{className:a("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(o):{},children:o.getVisibleCells().map(n=>E("td",{className:a("",{}),children:E("div",{className:a("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:bt(n.column.columnDef.cell,n.getContext())})},n.id))},o.id))})]})});import{ChevronLeftIcon as Rr,ChevronRightIcon as Dr}from"lucide-react";import{jsx as Ie}from"react/jsx-runtime";var wr=({page:e,currentPage:t,onClick:r})=>typeof e=="string"?Ie("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):Ie("button",{onClick:r,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${e===t?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:e}),ht=({totalPages:e,currentPage:t,handlePageClick:r})=>{let o=()=>{let c=Math.floor(1.5),d=Math.max(1,t-c),p=Math.min(e,d+3-1);return p>e&&(d=Math.max(1,e-3+1),p=e),{start:d,end:p}},{start:n,end:l}=o(),s=[];return n>1&&s.push(1),n>2&&s.push("..."),s.push(...Array.from({length:l-n+1},(c,d)=>n+d)),l<e-1&&s.push("..."),l<e&&s.push(e),s.map((c,d)=>Ie(wr,{page:c,currentPage:t,onClick:typeof c=="number"?()=>r(c):void 0},d))};import{jsx as Z,jsxs as Ee}from"react/jsx-runtime";var vt=({currentPage:e=1,totalPages:t=1,onPageChange:r,itemsPerPage:i=0,totalItems:o=0})=>{let n=c=>{c>=1&&c<=t&&r?.(c)},l=i===0?1:i*(e-1)+1,s=e===t?o:Math.min(l+i-1,o);return Ee("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10",children:[o&&Z("section",{className:"text-[#717171] text-[12px]",children:Ee("p",{className:"",children:["Showing ",l," - ",s," of ",o]})}),Z("div",{className:"flex flex-1 items-center justify-center sm:justify-end w-full ",children:Ee("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Z("button",{onClick:()=>n(e-1),disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Z(Rr,{className:"size-5"})}),ht({currentPage:e,totalPages:t,handlePageClick:n}),Z("button",{onClick:()=>n(e+1),disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Z(Dr,{className:"size-5"})})]})})]})};import{jsx as C,jsxs as X}from"react/jsx-runtime";var Ir=({table:e,isMobile:t=!1,onRowClick:r,id:i,onRefetch:o,isRefetching:n,FilterMenu:l,ExtraNode:s,onExport:c,search:d={enabled:!1,debounceRate:700},isLoading:p,pagination:u})=>{let m=()=>{try{o?.()}catch(b){console.error("Error while refetching data",b)}},g=b=>{d?.onSearch?.(b)};return X("div",{className:a("relative w-full rounded-b border-0 overflow-x-auto"),children:[(o||d?.enabled||l||s||c)&&X("div",{className:"sticky top-0 z-10 w-full flex flex-col sm:flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[C("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:d?.enabled&&X("div",{className:" w-full flex gap-x-3",children:[C("section",{className:"sm:w-56",children:C(Le,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:g,debounce:d?.debounceRate})}),X("div",{className:" flex gap-2",children:[o&&C(q,{onClick:m,title:"Refetch Data",disabled:n,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:C(Sr,{className:a("w-4 h-4",{"animate-spin":n}),size:5})}),l&&C(ge,{trigger:C("button",{title:"Filter",className:a("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",ue({variant:"outlined",size:"sm"})),children:C(kr,{className:"w-4 h-4",size:5})}),children:l})]})]})}),C("div",{className:"flex items-start flex-col gap-2 justify-center",children:C("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:X("div",{className:"flex gap-2",children:[s&&s,c&&C(q,{variant:"primary",onClick:c,size:"sm",children:"Export"})]})})})]}),C("main",{className:"w-full overflow-x-auto mt-5",children:p?X("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[C(Lr,{size:20,className:"animate-spin"}),C("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?C("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:C("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):C("div",{className:"flex flex-col gap-2",children:C(Ct,{table:e,isMobile:t,onRowClick:r,id:i})})}),!p&&u?.enabled&&C(vt,{...u,currentPage:u?.currentPage??1,totalPages:u?.totalPages??Math.ceil((u?.totalItems??0)/Math.max(u?.itemsPerPage??1,1))??1,onPageChange:b=>u?.onPageChange?.(b)})]})};export{q as Button,Cr as CopyableLabel,nr as Country,Le as DebouncedInput,Re as Dialog,F as FlagComponent,x as FormLabel,W as Input,$ as Loader,mr as OTPInput,qe as PasswordInput,pt as PhoneInput,ge as Popover,V as PopoverContent,z as PopoverRoot,A as PopoverTrigger,ir as Select,Nr as Status,Ir as Table,je as Textarea,ue as buttonVariants,a as cn};
1
+ import Dt from"react";import*as Ae from"react";import*as xe from"@radix-ui/react-label";import{cva as Pt}from"class-variance-authority";import{clsx as xt}from"clsx";import{twMerge as Nt}from"tailwind-merge";function a(...e){return Nt(xt(e))}import{jsx as Rt}from"react/jsx-runtime";var wt=Pt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ne=Ae.forwardRef(({className:e,...t},r)=>Rt(xe.Root,{ref:r,className:a(wt(),e),...t}));Ne.displayName=xe.Root.displayName;import{jsx as Fe,jsxs as kt}from"react/jsx-runtime";var x=Dt.forwardRef(({className:e,children:t,showAsterisk:r,error:i,...o},n)=>Fe(Ne,{ref:n,className:a(i&&"text-red-500",e),...o,children:r?kt("p",{children:[t,Fe("span",{className:"text-red-500",children:"*"})]}):t}));x.displayName="FormLabel";import{jsx as Me,jsxs as Lt}from"react/jsx-runtime";var $=({size:e=16,colour:t="primary"})=>Lt("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[Me("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Me("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as me from"react";import{Slot as St}from"@radix-ui/react-slot";import{cva as It}from"class-variance-authority";import{Fragment as Ve,jsx as U,jsxs as Et}from"react/jsx-runtime";var ue=It("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),q=me.forwardRef(({className:e,variant:t="primary",size:r,asChild:i=!1,isLoading:o=!1,leftNode:n,rightNode:l,LoaderSize:s,...d},c)=>{let f=i?St:"button",{children:p,disabled:m,...b}=d,C=me.useRef(null);return U(f,{className:a(ue({variant:t,size:r,className:e})),ref:C||c,disabled:m||o,...b,children:U("div",{className:"flex font-medium justify-center items-center gap-2",children:o?U(Ve,{children:U("span",{className:"mx-auto",children:U($,{size:s,colour:"secondary"})})}):Et(Ve,{children:[n,p,l]})})})});q.displayName="Button";import*as Pe from"react";import{cva as we}from"class-variance-authority";import Tt from"react";import{jsx as At}from"react/jsx-runtime";var P=Tt.forwardRef(({className:e,children:t,error:r,...i},o)=>{let n=r??t;return n?At("p",{ref:o,className:a("text-xs font-normal text-[#F04248]",e),...i,children:n}):null});P.displayName="ErrorMessage";import Ft from"react";import{jsx as Mt}from"react/jsx-runtime";var w=Ft.forwardRef(({className:e,...t},r)=>Mt("div",{ref:r,className:a("text-sm text-[#8E98A8",e),...t}));w.displayName="FormDescription";import{jsx as V,jsxs as Be}from"react/jsx-runtime";var Vt=we("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),We=Pe.forwardRef(({className:e,status:t,type:r,...i},o)=>V("input",{type:r,className:a(Vt({status:t}),e),ref:o,...i}));We.displayName="BaseInnerInput";var I=we("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Oe=we("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),T=Pe.forwardRef(({className:e,status:t="default",disabled:r,error:i,isLoading:o,sideNodeClassName:n,showAsterisk:l,label:s,description:d,...c},f)=>{let p=t;return i&&(p="error"),o&&(p="loading"),r&&(p="prefilled"),Be("div",{className:"relative space-y-1 w-full",children:[s&&V(x,{showAsterisk:l,error:i,children:s}),Be("div",{className:a(I({status:p}),c.leftNode?"pl-0":"",c.rightNode?"pr-0":"",e),children:[c.leftNode?V("div",{className:a(Oe({status:p,side:"left"}),n),children:c.leftNode}):null,V(We,{ref:f,disabled:o||r,className:a({"!pl-3":c.leftNode&&t!=="neutral","!pr-3":c.rightNode&&t!=="neutral"}),...c}),c.rightNode?V("div",{className:a(Oe({status:p,side:"right"}),n),children:c.rightNode}):null]}),d&&V(w,{className:"text-gray-400 text-sm !font-normal",children:d}),V(P,{error:i})]})});T.displayName="Input";import{useMemo as Wt,useState as Ue}from"react";import{jsx as He,jsxs as Ot}from"react/jsx-runtime";var Ge=()=>Ot("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[He("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),He("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as ze,jsxs as Bt}from"react/jsx-runtime";var _e=()=>Bt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ze("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),ze("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as Ze}from"react/jsx-runtime";var Xe=()=>Ze("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ze("path",{d:"M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",fill:"currentColor"})});import{jsx as Ke}from"react/jsx-runtime";var $e=()=>Ke("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ke("path",{d:"M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});import{jsx as k,jsxs as Ht}from"react/jsx-runtime";var qe=[{label:"Uppercase",key:"uppercase",RegExp:/[A-Z]/,validated:!1},{label:"Lowercase",key:"lowercase",RegExp:/[a-z]/,validated:!1},{label:"Number",key:"number",RegExp:/\d/,validated:!1},{label:"8 Characters",key:"eight-chars",RegExp:/.{8}/,validated:!1}],je=({onValidate:e,onChange:t,disableValidation:r,...i})=>{let[o,n]=Ue(!1),[l,s]=Ue(qe),d=m=>qe.map(b=>({...b,validated:b.RegExp.test(m)})),c=m=>{let b=d(m),C=b.every(K=>K.validated);return s(b),C},f=m=>{if(t&&t(m),r)return;let b=m?.target?.value,C=c(b);e&&e(C,b)},p=Wt(()=>k("div",{className:"flex items-center gap-2",children:l?.map(m=>Ht("div",{className:a("text-xs flex items-center gap-0.5",{"text-[#62C554]":m?.validated,"text-[#8E98A8]":!m?.validated}),children:[k("span",{className:"",children:m?.validated?k(Xe,{}):k($e,{})}),k("span",{className:"",children:m?.label})]},m?.key))}),[l]);return k(T,{sideNodeClassName:"!border-l-0",rightNode:o?k("button",{type:"button",onClick:()=>n(m=>!m),children:k(Ge,{})}):k("button",{type:"button",onClick:()=>n(m=>!m),children:k(_e,{})}),type:o?"text":"password",onChange:f,description:!r&&p,...i})};je.displayName="PasswordInput";import{cva as Gt}from"class-variance-authority";import{jsx as fe,jsxs as zt}from"react/jsx-runtime";var Oo=Gt("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),Je=({className:e,status:t="default",disabled:r,error:i,isLoading:o,showAsterisk:n,label:l,description:s,...d})=>{let c=t;return i&&(c="error"),o&&(c="loading"),r&&(c="prefilled"),zt("div",{className:"relative space-y-1",children:[fe(x,{showAsterisk:n,error:i,children:l}),fe("textarea",{className:a("min-h-[80px]",I({status:c}),e),disabled:o||r,...d}),fe(w,{className:"text-gray-400 text-sm !font-normal",children:s}),fe(P,{error:i})]})};Je.displayName="Textarea";import*as B from"react";import*as A from"react";import{Command as v}from"cmdk";import{Search as $t}from"lucide-react";import*as j from"react";import*as g from"@radix-ui/react-dialog";import{jsx as Qe,jsxs as _t}from"react/jsx-runtime";var Ye=()=>_t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[Qe("path",{d:"M18 6 6 18"}),Qe("path",{d:"m6 6 12 12"})]});import{Fragment as Kt,jsx as h,jsxs as G}from"react/jsx-runtime";var Zt=g.Root,Xt=g.Trigger,et=g.Portal,tt=j.forwardRef(({className:e,...t},r)=>h(g.Overlay,{ref:r,className:a("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));tt.displayName=g.Overlay.displayName;var Re=j.forwardRef(({className:e,hideCloseButton:t,children:r,...i},o)=>G(et,{children:[h(tt,{}),G(g.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...i,children:[r,!t&&G(g.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h(Ye,{}),h("span",{className:"sr-only",children:"Close"})]})]})]}));Re.displayName=g.Content.displayName;var rt=({className:e,...t})=>h("div",{className:a("flex flex-col space-y-1.5 text-left",e),...t});rt.displayName="DialogHeader";var ot=({className:e,...t})=>h("div",{className:a("flex flex-row justify-end sm:space-x-2",e),...t});ot.displayName="DialogFooter";var at=j.forwardRef(({className:e,...t},r)=>h(g.Title,{ref:r,className:a("text-xl font-semibold leading-none tracking-tight",e),...t}));at.displayName=g.Title.displayName;var nt=j.forwardRef(({className:e,...t},r)=>h(g.Description,{ref:r,className:a("text-sm text-gray-500",e),...t}));nt.displayName=g.Description.displayName;var De=({trigger:e=void 0,children:t,open:r,onOpenChange:i,hideCloseButton:o,footer:n,title:l,description:s,contentClassName:d,headerClassName:c,titleClassName:f,descriptionClassName:p,footerClassName:m,asChild:b=!0,onOpenAutoFocus:C,onCloseAutoFocus:K,onEscapeKeyDown:pe,onInteractOutside:W,onPointerDownOutside:he,...ve})=>G(Zt,{...ve,open:r,onOpenChange:i,children:[h(Xt,{asChild:b,children:e}),h(et,{children:G(Re,{className:d,hideCloseButton:o,onOpenAutoFocus:C,onCloseAutoFocus:K,onEscapeKeyDown:pe,onPointerDownOutside:he,onInteractOutside:W,children:[l||s?G(rt,{className:c,children:[l&&h(at,{className:f,children:l}),s&&h(nt,{className:p,children:s})]}):h(Kt,{}),t,n&&h(ot,{className:m,children:n})]})})]});De.displayName=g.Dialog.displayName;import{Fragment as Qo,jsx as L,jsxs as jt}from"react/jsx-runtime";var J=A.forwardRef(({className:e,...t},r)=>L(v,{ref:r,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));J.displayName=v.displayName;var Q=A.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...i},o)=>jt("div",{className:a("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?L($,{size:16,colour:"secondary"}):L($t,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),L(v.Input,{ref:o,className:a("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:r,...i})]}));Q.displayName=v.Input.displayName;var Y=A.forwardRef(({className:e,...t},r)=>L(v.List,{ref:r,className:a("overflow-y-auto overflow-x-hidden",e),...t}));Y.displayName=v.List.displayName;var ee=A.forwardRef((e,t)=>L(v.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ee.displayName=v.Empty.displayName;var te=A.forwardRef(({className:e,...t},r)=>L(v.Group,{ref:r,className:a("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));te.displayName=v.Group.displayName;var Ut=A.forwardRef(({className:e,...t},r)=>L(v.Separator,{ref:r,className:a("-mx-1 h-px bg-border",e),...t}));Ut.displayName=v.Separator.displayName;var re=A.forwardRef(({className:e,...t},r)=>L(v.Item,{ref:r,className:a("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));re.displayName=v.Item.displayName;var qt=({className:e,...t})=>L("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});qt.displayName="CommandShortcut";import*as it from"react";import*as R from"@radix-ui/react-popover";import{jsx as oe,jsxs as Jt}from"react/jsx-runtime";var z=R.Root,F=R.Trigger,O=it.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:i=!0,...o},n)=>i?oe(R.Portal,{children:oe(R.Content,{ref:n,align:t,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o})}):oe(R.Content,{ref:n,align:t,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o}));O.displayName=R.Content.displayName;var ge=({trigger:e,children:t,open:r,onOpenChange:i,contentClassName:o,asChild:n=!0,align:l,side:s,alignOffset:d,triggerClassName:c,sideOffset:f,onOpenAutoFocus:p,onCloseAutoFocus:m,portal:b=!0,...C})=>Jt(z,{...C,open:r,onOpenChange:i,children:[oe(F,{asChild:n,className:c,children:e}),oe(O,{alignOffset:d,sideOffset:f,side:s,align:l,className:o,onOpenAutoFocus:p,onCloseAutoFocus:m,portal:b,children:t})]});ge.displayName=R.Root.displayName;import*as ke from"react";import*as N from"@radix-ui/react-scroll-area";import{jsx as ae,jsxs as Qt}from"react/jsx-runtime";var ne=ke.forwardRef(({className:e,viewPortClassName:t,children:r,...i},o)=>Qt(N.Root,{ref:o,className:a("relative overflow-hidden",e),...i,children:[ae(N.Viewport,{className:a("h-full w-full rounded-[inherit]",t),children:r}),ae(st,{}),ae(N.Corner,{})]}));ne.displayName=N.Root.displayName;var st=ke.forwardRef(({className:e,orientation:t="vertical",...r},i)=>ae(N.ScrollAreaScrollbar,{ref:i,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:ae(N.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));st.displayName=N.ScrollAreaScrollbar.displayName;import{jsx as S,jsxs as ye}from"react/jsx-runtime";var lt=({className:e,value:t,placeholder:r="",status:i,disabled:o})=>S(F,{asChild:!0,disabled:o,children:ye("button",{disabled:o,className:a(I({status:i}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??r??"Select options...",S("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:S("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),be=({options:e=[],value:t,onChange:r,containerClassName:i,placeholder:o,disabled:n,loading:l,optionComponent:s,children:d,modal:c=!1,hideSearch:f,className:p,inputValue:m,onValueChange:b,onInputValueChange:C})=>{let[K,pe]=B.useState(!1),W=B.useRef(null),[he,ve]=B.useState(void 0);return B.useLayoutEffect(()=>{W.current&&ve(W.current.clientWidth)},[W.current]),ye(z,{modal:c,open:K,onOpenChange:pe,children:[S("div",{className:a("w-full",p),ref:W,children:d}),S(O,{portal:!c,className:"p-0 min-w-[200px]",style:{width:he},children:ye(J,{className:a("relative max-h-[270px]",{"mt-2":!f}),children:[!f&&S(Q,{loading:l,placeholder:o??"Search options...",onValueChange:C,value:m,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),S(ne,{viewPortClassName:"max-h-[225px]",className:a("w-full px-0 h-full overflow-y-auto",i),children:ye(Y,{children:[!f&&S(ee,{children:"No result found."}),S(te,{className:"w-full",children:e?.map(H=>S(re,{defaultValue:t?.label,value:H.label,disabled:n,onSelect:()=>{r(H),pe(!1),b?.(H?.value)},children:s?s(H):H.label},H.value))})]})})]})})]})};var Le=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],ct=()=>{let e={};return Le?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};import*as le from"react";import*as Ce from"react-phone-number-input";import tr from"react-phone-number-input/flags";import{jsx as ie,jsxs as er}from"react/jsx-runtime";var Yt=e=>er("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[ie("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",ie("path",{d:"M3 10L7 8L10 9L13 8L16 10L19 9L22 11L25 10L28 12V15L26 17L28 19L27 22L29 24L27 26L24 25L21 26L18 24L15 25L12 23L9 24L6 22L4 23L2 21V18L4 16L3 13L5 11L3 10Z",fill:"#34D399"}),ie("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),ie("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),ie("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),dt=Yt;import{jsx as u,jsxs as se}from"react/jsx-runtime";var pt=le.forwardRef(({className:e,onChange:t,defaultCountry:r="NG",modal:i,showAsterisk:o,label:n,description:l,error:s,...d},c)=>{let f=p=>u(rr,{...p,status:d.status,modal:i});return se("div",{className:"relative space-y-1",children:[u(x,{showAsterisk:o,error:s,children:n}),u(Ce.default,{ref:c,className:a("flex",e),flagComponent:M,countrySelectComponent:f,inputComponent:mt,defaultCountry:r,onChange:p=>{t&&t?.(p)},...d}),u(w,{className:"text-gray-400 text-sm !font-normal",children:l}),u(P,{error:s})]})});pt.displayName="PhoneInput";var mt=le.forwardRef(({className:e,...t},r)=>u(T,{className:a("!rounded-s-none",e),...t,ref:r}));mt.displayName="InputComponent";var rr=({disabled:e,value:t,onChange:r,options:i,status:o,modal:n})=>{let l=le.useCallback(s=>{r(s)},[r]);return se(z,{modal:n,children:[u(F,{disabled:e,children:se("div",{className:a(I({status:o}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-full rounded-e-none border-e-0 pl-2 pr-2"),children:[u(M,{country:t,countryName:t}),u("svg",{className:a("mr-0.5 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:u("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),u(O,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:u(J,{children:u(Y,{children:se(ne,{className:"h-72",children:[u(Q,{placeholder:"Search country..."}),u(ee,{children:"No country found."}),u(te,{children:i.filter(s=>s.value).map(s=>se(re,{className:"gap-2",onSelect:()=>l(s.value),children:[u(M,{country:s.value,countryName:s.label}),u("span",{className:"flex-1 text-sm",children:s.label}),s.value&&u("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${Ce.getCountryCallingCode(s.value)}`}),u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:a("ml-auto",s.value===t?"opacity-100":"opacity-0"),children:u("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},M=({country:e,countryName:t,className:r})=>{let i=tr[e];return e==="GLOBAL"?u("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:u(dt,{className:"w-full h-[90%]"})}):u("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:i&&u(i,{title:t})})};M.displayName="FlagComponent";import{jsx as D,jsxs as ce}from"react/jsx-runtime";var or=ct(),ar=({className:e,value:t,placeholder:r="",status:i,disabled:o})=>D(F,{asChild:!0,disabled:o,children:ce("button",{disabled:o,className:a(I({status:i}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?ce("div",{className:"flex gap-2 items-center",children:[D(M,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),ce("span",{className:"",children:[" ",or[t]]})]}):r??"Select options...",D("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:D("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),nr=({hideSearch:e=!0,showAsterisk:t,label:r,description:i,error:o,...n})=>{let l=Le?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return ce("div",{className:"relative space-y-1",children:[D(x,{showAsterisk:t,error:o,children:r}),D(be,{options:l,hideSearch:e,optionComponent:s=>ce("div",{className:"w-full flex items-center gap-2",children:[D(M,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),D("span",{className:"flex-1 text-sm",children:s?.label})]}),...n,children:D(ar,{value:n?.value?.value,status:n?.status,placeholder:n?.placeholder??" Select Country"})}),D(w,{className:"text-gray-400 text-sm !font-normal",children:i}),D(P,{error:o})]})};import{jsx as de,jsxs as sr}from"react/jsx-runtime";var ir=({showAsterisk:e,label:t,description:r,error:i,hideSearch:o=!0,status:n,...l})=>sr("div",{className:"relative space-y-1",children:[de(x,{showAsterisk:e,error:i,children:t}),de(be,{hideSearch:o,...l,containerClassName:"h-full",children:de(lt,{disabled:l?.disabled,placeholder:"Select or search email",status:n,value:l?.value?.label??l?.value?.value})}),de(w,{className:"text-gray-400 text-sm !font-normal",children:r}),de(P,{error:i})]});import lr from"react-otp-input";import{cva as cr}from"class-variance-authority";import{useMemo as dr}from"react";import{jsx as ut}from"react/jsx-runtime";var pr=cr("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),mr=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:i="-",status:o,...n})=>{let l=dr(()=>i||new Array(e).fill("").reduce((c,f)=>c+=f,""),[e,i]);return ut(lr,{numInputs:e,placeholder:l,containerStyle:a("w-full",r),inputStyle:a(pr({status:o}),t),renderInput:s=>ut("input",{...s}),...n})};import{useState as ur}from"react";import{Copy as fr,CheckIcon as gr}from"lucide-react";import{motion as yr,AnimatePresence as br}from"framer-motion";import{jsx as _,jsxs as hr}from"react/jsx-runtime";var Cr=({text:e,onCopy:t,iconsPosition:r="right",clampText:i=!0})=>{let[o,n]=ur(!1),l=()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),t?.(),setTimeout(()=>n(!1),2e3)})},s=o?gr:fr;return hr("div",{className:"flex items-center space-x-2 cursor-pointer text-[#717171] bg-gray-100 w-fit max-w-full rounded-md p-1 px-2",children:[r==="left"&&_(ft,{Icon:s,onClick:l,copied:o}),_("span",{className:`${i?"truncate max-w-[100px]":""}`,children:e}),r==="right"&&_(ft,{Icon:s,onClick:l,copied:o})]})},ft=({Icon:e,onClick:t,copied:r})=>_(br,{mode:"wait",children:_(yr.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:_(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});import{useEffect as gt,useState as vr}from"react";import{Search as xr}from"lucide-react";import{jsx as yt}from"react/jsx-runtime";var Se=({value:e,onChange:t,debounce:r=500,addon:i,...o})=>{let[n,l]=vr(e??""),s=d=>l(d.target.value);return gt(()=>{e&&l(e)},[e]),gt(()=>{let d=setTimeout(()=>{t(n)},r);return()=>clearTimeout(d)},[n,r,t]),yt(T,{leftNode:i??yt(xr,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...o,className:a("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",o?.className),onChange:s,value:n})};import{jsx as Ie}from"react/jsx-runtime";var Nr=({status:e,variant:t,className:r})=>Ie("div",{children:Ie("div",{className:a("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},r),children:Ie("p",{children:e.replace("-"," ")})})});import{ListFilter as kr,Loader as Lr,RotateCw as Sr}from"lucide-react";import{flexRender as bt}from"@tanstack/react-table";import{jsx as E,jsxs as Pr}from"react/jsx-runtime";var Ct=({table:e,isMobile:t,onRowClick:r,id:i})=>E("div",{className:a("relative w-full rounded-b border-0",{}),children:Pr("table",{id:i??"table",className:"w-full overflow-x-scroll",children:[E("thead",{children:e.getHeaderGroups().map(o=>E("tr",{className:a(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:o.headers.map(n=>E("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:E("div",{className:a("flex items-center",{"cursor-pointer select-none":n.column.getCanSort()}),onClick:n.column.getToggleSortingHandler(),children:n.isPlaceholder?null:bt(n.column.columnDef.header,n.getContext())})},n.id))},o.id))}),E("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(o=>E("tr",{className:a("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(o):{},children:o.getVisibleCells().map(n=>E("td",{className:a("",{}),children:E("div",{className:a("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:bt(n.column.columnDef.cell,n.getContext())})},n.id))},o.id))})]})});import{ChevronLeftIcon as Rr,ChevronRightIcon as Dr}from"lucide-react";import{jsx as Ee}from"react/jsx-runtime";var wr=({page:e,currentPage:t,onClick:r})=>typeof e=="string"?Ee("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):Ee("button",{onClick:r,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${e===t?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:e}),ht=({totalPages:e,currentPage:t,handlePageClick:r})=>{let o=()=>{let d=Math.floor(1.5),c=Math.max(1,t-d),f=Math.min(e,c+3-1);return f>e&&(c=Math.max(1,e-3+1),f=e),{start:c,end:f}},{start:n,end:l}=o(),s=[];return n>1&&s.push(1),n>2&&s.push("..."),s.push(...Array.from({length:l-n+1},(d,c)=>n+c)),l<e-1&&s.push("..."),l<e&&s.push(e),s.map((d,c)=>Ee(wr,{page:d,currentPage:t,onClick:typeof d=="number"?()=>r(d):void 0},c))};import{jsx as Z,jsxs as Te}from"react/jsx-runtime";var vt=({currentPage:e=1,totalPages:t=1,onPageChange:r,itemsPerPage:i=0,totalItems:o=0})=>{let n=d=>{d>=1&&d<=t&&r?.(d)},l=i===0?1:i*(e-1)+1,s=e===t?o:Math.min(l+i-1,o);return Te("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[o&&Z("section",{className:"text-[#717171] text-[12px]",children:Te("p",{className:"",children:["Showing ",l," - ",s," of ",o]})}),Z("div",{className:"flex items-center justify-center sm:justify-end ",children:Te("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[Z("button",{onClick:()=>n(e-1),disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Z(Rr,{className:"size-5"})}),ht({currentPage:e,totalPages:t,handlePageClick:n}),Z("button",{onClick:()=>n(e+1),disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:Z(Dr,{className:"size-5"})})]})})]})};import{jsx as y,jsxs as X}from"react/jsx-runtime";var Ir=({table:e,isMobile:t=!1,onRowClick:r,id:i,onRefetch:o,isRefetching:n,FilterMenu:l,ExtraNode:s,onExport:d,search:c={enabled:!1,debounceRate:700},isLoading:f,pagination:p})=>{let m=()=>{try{o?.()}catch(C){console.error("Error while refetching data",C)}},b=C=>{c?.onSearch?.(C)};return X("div",{className:a("relative w-full rounded-b border-0 overflow-x-auto"),children:[(o||c?.enabled||l||s||d)&&X("div",{className:"sticky top-0 z-10 w-full flex flex-col sm:flex-row justify-between items-start sm:items-center bg-white p-2 gap-2",children:[y("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:c?.enabled&&X("div",{className:" w-full flex gap-x-3",children:[y("section",{className:"sm:w-56",children:y(Se,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:b,debounce:c?.debounceRate})}),X("div",{className:" flex gap-2",children:[o&&y(q,{onClick:m,title:"Refetch Data",disabled:n,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:y(Sr,{className:a("w-4 h-4",{"animate-spin":n}),size:5})}),l&&y(ge,{trigger:y("button",{title:"Filter",className:a("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",ue({variant:"outlined",size:"sm"})),children:y(kr,{className:"w-4 h-4",size:5})}),children:l})]})]})}),y("div",{className:"flex items-start flex-col gap-2 justify-center",children:y("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:X("div",{className:"flex gap-2",children:[s&&s,d&&y(q,{variant:"primary",onClick:d,size:"sm",children:"Export"})]})})})]}),y("main",{className:"w-full overflow-x-auto mt-5",children:f?X("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[y(Lr,{size:20,className:"animate-spin"}),y("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?y("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:y("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):y("div",{className:"flex flex-col gap-2",children:y(Ct,{table:e,isMobile:t,onRowClick:r,id:i})})}),!f&&p?.enabled&&y(vt,{...p,currentPage:p?.currentPage??1,totalPages:p?.totalPages??Math.ceil((p?.totalItems??0)/Math.max(p?.itemsPerPage??1,1))??1,onPageChange:C=>p?.onPageChange?.(C)})]})};export{q as Button,Cr as CopyableLabel,nr as Country,Se as DebouncedInput,De as Dialog,M as FlagComponent,x as FormLabel,T as Input,$ as Loader,mr as OTPInput,je as PasswordInput,pt as PhoneInput,ge as Popover,O as PopoverContent,z as PopoverRoot,F as PopoverTrigger,ir as Select,Nr as Status,Ir as Table,Je as Textarea,ue as buttonVariants,a as cn};
2
2
  //# sourceMappingURL=index.mjs.map