@6thbridge/hexa 0.0.5 → 0.0.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.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import Ye from"react";import*as be from"react";import*as pe from"@radix-ui/react-label";import{cva as qe}from"class-variance-authority";import{clsx as $e}from"clsx";import{twMerge as je}from"tailwind-merge";function a(...t){return je($e(t))}import{jsx as Qe}from"react/jsx-runtime";var Je=qe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),me=be.forwardRef(({className:t,...e},r)=>Qe(pe.Root,{ref:r,className:a(Je(),t),...e}));me.displayName=pe.Root.displayName;import{jsx as he,jsxs as et}from"react/jsx-runtime";var C=Ye.forwardRef(({className:t,children:e,showAsterisk:r,error:o,...n},s)=>he(me,{ref:s,className:a(o&&"text-red-500",t),...n,children:r?et("p",{children:[e,he("span",{className:"text-red-500",children:"*"})]}):e}));C.displayName="FormLabel";import{jsx as ve,jsxs as tt}from"react/jsx-runtime";var H=({size:t=16,colour:e="primary"})=>tt("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[ve("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),ve("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:e==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as Ne from"react";import{Slot as rt}from"@radix-ui/react-slot";import{cva as ot}from"class-variance-authority";import{Fragment as Pe,jsx as B,jsxs as nt}from"react/jsx-runtime";var at=ot("overflow-hidden isolate relative 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] text-[0.75rem] leading-[1rem] font-medium 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"}}),xe=({className:t,variant:e="primary",size:r,asChild:o=!1,isLoading:n=!1,leftNode:s,rightNode:l,LoaderSize:i,ref:f,...m})=>{let d=o?rt:"button",{children:u,disabled:S,...O}=m,W=Ne.useRef(null);return B(d,{className:a(at({variant:e,size:r,className:t})),ref:W||f,disabled:S||n,...O,children:B("div",{className:"flex font-medium justify-center items-center gap-2",children:n?B(Pe,{children:B("span",{className:"mx-auto",children:B(H,{size:i,colour:"secondary"})})}):nt(Pe,{children:[s,u,l]})})})};xe.displayName="Button";import{cva as ue}from"class-variance-authority";import it from"react";import{jsx as st}from"react/jsx-runtime";var h=it.forwardRef(({className:t,children:e,error:r,...o},n)=>{let s=r??e;return s?st("p",{ref:n,className:a("text-xs font-normal text-[#F04248]",t),...o,children:s}):null});h.displayName="ErrorMessage";import lt from"react";import{jsx as ct}from"react/jsx-runtime";var v=lt.forwardRef(({className:t,...e},r)=>ct("p",{ref:r,className:a("text-sm text-[#8E98A8",t),...e}));v.displayName="FormDescription";import{jsx as A,jsxs as we}from"react/jsx-runtime";var dt=ue("!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:""}},defaultVariants:{status:"default"}}),De=({className:t,status:e,type:r,ref:o,...n})=>A("input",{type:r,className:a(dt({status:e}),t),ref:o,...n});De.displayName="BaseInnerInput";var w=ue("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] dark:border-[#676767] 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-[#00B2A9] 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]"}},defaultVariants:{status:"default"}}),Re=ue("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] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] 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]"}},defaultVariants:{status:"default",side:"left"}}),E=({className:t,status:e="default",disabled:r,error:o,isLoading:n,sideNodeClassName:s,showAsterisk:l,label:i,description:f,ref:m,...d})=>{let u=e;return o&&(u="error"),n&&(u="loading"),r&&(u="prefilled"),we("div",{className:"relative space-y-1",children:[A(C,{showAsterisk:l,error:o,children:i}),we("div",{className:a(w({status:u}),d.leftNode||d.rightNode?"p-0":"",t),children:[d.leftNode?A("div",{className:a(Re({status:u,side:"left"}),s),children:d.leftNode}):null,A(De,{ref:m,disabled:n||r,className:d.leftNode||d.rightNode?"!px-3 !py-2":"",...d}),d.rightNode?A("div",{className:a(Re({status:u,side:"right"}),s),children:d.rightNode}):null]}),A(v,{className:"text-gray-400 text-sm !font-normal",children:f}),A(h,{error:o})]})};E.displayName="Input";import{useState as ut}from"react";import{jsx as ke,jsxs as pt}from"react/jsx-runtime";var Se=()=>pt("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ke("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"}),ke("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 Ae,jsxs as mt}from"react/jsx-runtime";var Ie=()=>mt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ae("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"}),Ae("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 G}from"react/jsx-runtime";var Le=({...t})=>{let[e,r]=ut(!1);return G(E,{sideNodeClassName:"!border-l-0",rightNode:e?G("button",{type:"button",onClick:()=>r(o=>!o),children:G(Se,{})}):G("button",{type:"button",onClick:()=>r(o=>!o),children:G(Ie,{})}),type:e?"text":"password",...t})};Le.displayName="PasswordInput";import{cva as ft}from"class-variance-authority";import{jsx as ae,jsxs as yt}from"react/jsx-runtime";var Or=ft("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-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] 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]"}},defaultVariants:{status:"default"}}),Fe=({className:t,status:e="default",disabled:r,error:o,isLoading:n,showAsterisk:s,label:l,description:i,...f})=>{let m=e;return o&&(m="error"),n&&(m="loading"),r&&(m="prefilled"),yt("div",{className:"relative space-y-1",children:[ae(C,{showAsterisk:s,error:o,children:l}),ae("textarea",{className:a("min-h-[80px]",w({status:m}),t),disabled:n||r,...f}),ae(v,{className:"text-gray-400 text-sm !font-normal",children:i}),ae(h,{error:o})]})};Fe.displayName="Textarea";import*as L from"react";import*as D from"react";import{Command as g}from"cmdk";import{Search as vt}from"lucide-react";import*as _ from"react";import*as p from"@radix-ui/react-dialog";import{jsx as Te,jsxs as gt}from"react/jsx-runtime";var Ee=()=>gt("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:[Te("path",{d:"M18 6 6 18"}),Te("path",{d:"m6 6 12 12"})]});import{Fragment as ht,jsx as y,jsxs as M}from"react/jsx-runtime";var Ct=p.Root,bt=p.Trigger,Me=p.Portal,Ve=_.forwardRef(({className:t,...e},r)=>y(p.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",t),...e}));Ve.displayName=p.Overlay.displayName;var fe=_.forwardRef(({className:t,hideCloseButton:e,children:r,...o},n)=>M(Me,{children:[y(Ve,{}),M(p.Content,{ref:n,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",t),...o,children:[r,!e&&M(p.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:[y(Ee,{}),y("span",{className:"sr-only",children:"Close"})]})]})]}));fe.displayName=p.Content.displayName;var Oe=({className:t,...e})=>y("div",{className:a("flex flex-col space-y-1.5 text-left",t),...e});Oe.displayName="DialogHeader";var We=({className:t,...e})=>y("div",{className:a("flex flex-row justify-end sm:space-x-2",t),...e});We.displayName="DialogFooter";var He=_.forwardRef(({className:t,...e},r)=>y(p.Title,{ref:r,className:a("text-xl font-semibold leading-none tracking-tight",t),...e}));He.displayName=p.Title.displayName;var Be=_.forwardRef(({className:t,...e},r)=>y(p.Description,{ref:r,className:a("text-sm text-gray-500",t),...e}));Be.displayName=p.Description.displayName;var ye=({trigger:t=void 0,children:e,open:r,onOpenChange:o,hideCloseButton:n,footer:s,title:l,description:i,contentClassName:f,headerClassName:m,titleClassName:d,descriptionClassName:u,footerClassName:S,asChild:O=!0,onOpenAutoFocus:W,onCloseAutoFocus:le,onEscapeKeyDown:oe,onInteractOutside:F,onPointerDownOutside:ce,...de})=>M(Ct,{...de,open:r,onOpenChange:o,children:[y(bt,{asChild:O,children:t}),y(Me,{children:M(fe,{className:f,hideCloseButton:n,onOpenAutoFocus:W,onCloseAutoFocus:le,onEscapeKeyDown:oe,onPointerDownOutside:ce,onInteractOutside:F,children:[l||i?M(Oe,{className:m,children:[l&&y(He,{className:d,children:l}),i&&y(Be,{className:u,children:i})]}):y(ht,{}),e,s&&y(We,{className:S,children:s})]})})]});ye.displayName=p.Dialog.displayName;import{Fragment as Qr,jsx as x,jsxs as xt}from"react/jsx-runtime";var z=D.forwardRef(({className:t,...e},r)=>x(g,{ref:r,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));z.displayName=g.displayName;var Z=D.forwardRef(({className:t,CommandInputContainerClassName:e,loading:r,...o},n)=>xt("div",{className:a("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[r?x(H,{size:16,colour:"secondary"}):x(vt,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),x(g.Input,{ref:n,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",t),disabled:r,...o})]}));Z.displayName=g.Input.displayName;var X=D.forwardRef(({className:t,...e},r)=>x(g.List,{ref:r,className:a("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));X.displayName=g.List.displayName;var K=D.forwardRef((t,e)=>x(g.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));K.displayName=g.Empty.displayName;var U=D.forwardRef(({className:t,...e},r)=>x(g.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",t),...e}));U.displayName=g.Group.displayName;var Pt=D.forwardRef(({className:t,...e},r)=>x(g.Separator,{ref:r,className:a("-mx-1 h-px bg-border",t),...e}));Pt.displayName=g.Separator.displayName;var $=D.forwardRef(({className:t,...e},r)=>x(g.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",t),...e}));$.displayName=g.Item.displayName;var Nt=({className:t,...e})=>x("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});Nt.displayName="CommandShortcut";import*as Ge from"react";import*as P from"@radix-ui/react-popover";import{jsx as j,jsxs as wt}from"react/jsx-runtime";var q=P.Root,I=P.Trigger,V=Ge.forwardRef(({className:t,align:e="center",sideOffset:r=4,portal:o=!0,...n},s)=>o?j(P.Portal,{children:j(P.Content,{ref:s,align:e,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",t),onOpenAutoFocus:n.onOpenAutoFocus,onCloseAutoFocus:n.onCloseAutoFocus,...n})}):j(P.Content,{ref:s,align:e,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",t),onOpenAutoFocus:n.onOpenAutoFocus,onCloseAutoFocus:n.onCloseAutoFocus,...n}));V.displayName=P.Content.displayName;var Rt=({trigger:t,children:e,open:r,onOpenChange:o,contentClassName:n,asChild:s=!0,align:l,side:i,alignOffset:f,sideOffset:m,onOpenAutoFocus:d,onCloseAutoFocus:u,...S})=>wt(q,{...S,open:r,onOpenChange:o,children:[j(I,{asChild:s,children:t}),j(V,{alignOffset:f,sideOffset:m,side:i,align:l,className:n,onOpenAutoFocus:d,onCloseAutoFocus:u,children:e})]});Rt.displayName=P.Root.displayName;import*as ge from"react";import*as b from"@radix-ui/react-scroll-area";import{jsx as J,jsxs as Dt}from"react/jsx-runtime";var Q=ge.forwardRef(({className:t,children:e,...r},o)=>Dt(b.Root,{ref:o,className:a("relative overflow-hidden",t),...r,children:[J(b.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),J(_e,{}),J(b.Corner,{})]}));Q.displayName=b.Root.displayName;var _e=ge.forwardRef(({className:t,orientation:e="vertical",...r},o)=>J(b.ScrollAreaScrollbar,{ref:o,orientation:e,className:a("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:J(b.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));_e.displayName=b.ScrollAreaScrollbar.displayName;import{jsx as R,jsxs as ne}from"react/jsx-runtime";var ze=({className:t,value:e,placeholder:r="",status:o,disabled:n})=>R(I,{asChild:!0,disabled:n,children:ne("button",{disabled:n,className:a(w({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e??r??"Select options...",R("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:R("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"})})]})}),ie=({options:t=[],value:e,onChange:r,containerClassName:o,placeholder:n,disabled:s,loading:l,optionComponent:i,children:f,modal:m=!1,hideSearch:d,className:u,inputValue:S,onValueChange:O,onInputValueChange:W})=>{let[le,oe]=L.useState(!1),F=L.useRef(null),[ce,de]=L.useState(void 0);return L.useLayoutEffect(()=>{F.current&&de(F.current.clientWidth)},[F.current]),ne(q,{modal:m,open:le,onOpenChange:oe,children:[R("div",{className:a("w-full",u),ref:F,children:f}),R(V,{portal:!m,className:"p-0 min-w-[200px]",style:{width:ce},children:ne(z,{className:"max-h-[270px] pt-3 relative",children:[!d&&R(Z,{loading:l,placeholder:n??"Search options...",onValueChange:W,value:S,CommandInputContainerClassName:"mx-3 border rounded-md border-[#DEDEDE]"}),R(Q,{className:a("w-full px-0",o),children:ne(X,{children:[!d&&R(K,{children:"No result found."}),R(U,{className:"w-full",children:t?.map(T=>R($,{defaultValue:e?.label,value:T.label,disabled:s,onSelect:()=>{r(T),oe(!1),O?.(T?.value)},children:i?i(T):T.label},T.value))})]})})]})})]})};import{jsx as Y,jsxs as St}from"react/jsx-runtime";var kt=({showAsterisk:t,label:e,description:r,error:o,hideSearch:n=!0,status:s,...l})=>St("div",{className:"relative space-y-1",children:[Y(C,{showAsterisk:t,error:o,children:e}),Y(ie,{hideSearch:n,...l,children:Y(ze,{disabled:l?.disabled,placeholder:"Select or search email",status:s,value:l?.value?.label??l?.value?.value})}),Y(v,{className:"text-gray-400 text-sm !font-normal",children:r}),Y(h,{error:o})]});var Ce=[{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"}],Ze=()=>{let t={};return Ce?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};import*as te from"react";import*as se from"react-phone-number-input";import At from"react-phone-number-input/flags";import{jsx as c,jsxs as ee}from"react/jsx-runtime";var Xe=te.forwardRef(({className:t,onChange:e,modal:r,showAsterisk:o,label:n,description:s,error:l,defaultCountry:i="NG",...f},m)=>{let d=u=>c(It,{...u,status:f.status,modal:r});return ee("div",{className:"relative space-y-1",children:[c(C,{showAsterisk:o,error:l,children:n}),c(se.default,{ref:m,className:a("flex",t),flagComponent:k,countrySelectComponent:d,inputComponent:Ke,defaultCountry:i,onChange:u=>e?.(u),...f}),c(v,{className:"text-gray-400 text-sm !font-normal",children:s}),c(h,{error:l})]})});Xe.displayName="PhoneInput";var Ke=te.forwardRef(({className:t,...e},r)=>c(E,{className:a("h-full !-mt-0 border-l-0 rounded-l-none flex-1",t),...e,ref:r}));Ke.displayName="InputComponent";var It=({disabled:t,value:e,onChange:r,options:o,status:n,modal:s})=>{let l=te.useCallback(i=>{r(i)},[r]);return ee(q,{modal:s,children:[c(I,{disabled:t,children:ee("div",{className:a(w({status:n}),"!border-r-0 transition justify-center items-center border disabled:text-base-500 disabled:border-base-300 border-status-neutral-fill dark:border-[#9299A2] text-texts-50 focus:ring-offset-1 focus:ring-offset-base-100 focus-visible:!ring-offset-base-100 focus-visible:ring-2 focus-visible:!ring-accent focus:ring-accent focus:ring-2 flex gap-1 h-full rounded-e-none rounded-s-lg px-3 dark:!bg-transparent"),children:[c(k,{country:e,countryName:e}),c("svg",{className:a("-mr-2 h-4 w-4 opacity-50",t?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:c("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"})})]})}),c(V,{portal:!s,className:"w-[200px] md:w-[300px] p-0",children:c(z,{children:c(X,{children:ee(Q,{className:"h-72",children:[c(Z,{placeholder:"Search country..."}),c(K,{children:"No country found."}),c(U,{children:o.filter(i=>i.value).map(i=>ee($,{className:"gap-2",onSelect:()=>l(i.value),children:[c(k,{country:i.value,countryName:i.label}),c("span",{className:"flex-1 text-sm",children:i.label}),i.value&&c("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${se.getCountryCallingCode(i.value)}`}),c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:a("ml-auto",i.value===e?"opacity-100":"opacity-0"),children:c("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${i.value}-${i.label}`))})]})})})})]})},k=({country:t,countryName:e,className:r})=>{let o=At[t];return c("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:o&&c(o,{title:e})})};k.displayName="FlagComponent";import{jsx as N,jsxs as re}from"react/jsx-runtime";var Lt=Ze(),Ft=({className:t,value:e,placeholder:r="",status:o,disabled:n})=>N(I,{asChild:!0,disabled:n,children:re("button",{disabled:n,className:a(w({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e?re("div",{className:"flex gap-2",children:[N(k,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),re("span",{className:"",children:[" ",Lt[e]]})]}):r??"Select options...",N("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:N("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"})})]})}),Tt=({hideSearch:t=!0,showAsterisk:e,label:r,description:o,error:n,...s})=>{let l=Ce?.map(i=>({value:i?.internetCountryCode,label:i?.countryName,...i}));return re("div",{className:"relative space-y-1",children:[N(C,{showAsterisk:e,error:n,children:r}),N(ie,{options:l,hideSearch:t,optionComponent:i=>re("div",{className:"w-full flex items-center gap-2",children:[N(k,{country:i?.internetCountryCode,countryName:i?.label,className:"ml-2 !w-6 !h-5"}),N("span",{className:"flex-1 text-sm",children:i?.label})]}),...s,children:N(Ft,{value:s?.value?.value,status:s?.status,placeholder:s?.placeholder??" Select Country"})}),N(v,{className:"text-gray-400 text-sm !font-normal",children:o}),N(h,{error:n})]})};import Et from"react-otp-input";import{cva as Mt}from"class-variance-authority";import{useMemo as Vt}from"react";import{jsx as Ue}from"react/jsx-runtime";var Ot=Mt("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"}}),Wt=({numInputs:t=4,inputStyle:e,containerStyle:r,placeholder:o="-",status:n,...s})=>{let l=Vt(()=>o||new Array(t).fill("").reduce((m,d)=>m+=d,""),[t,o]);return Ue(Et,{numInputs:t,placeholder:l,containerStyle:a("w-full",r),inputStyle:a(Ot({status:n}),e),renderInput:i=>Ue("input",{...i}),...s})};export{xe as Button,Tt as Country,ye as Dialog,k as FlagComponent,C as FormLabel,E as Input,H as Loader,Wt as OTPInput,Le as PasswordInput,Xe as PhoneInput,kt as Select,Fe as Textarea};
1
+ import lt from"react";import*as be from"react";import*as pe from"@radix-ui/react-label";import{cva as nt}from"class-variance-authority";import{clsx as ot}from"clsx";import{twMerge as at}from"tailwind-merge";function o(...t){return at(ot(t))}import{jsx as st}from"react/jsx-runtime";var it=nt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),me=be.forwardRef(({className:t,...e},r)=>st(pe.Root,{ref:r,className:o(it(),t),...e}));me.displayName=pe.Root.displayName;import{jsx as ve,jsxs as dt}from"react/jsx-runtime";var b=lt.forwardRef(({className:t,children:e,showAsterisk:r,error:a,...n},l)=>ve(me,{ref:l,className:o(a&&"text-red-500",t),...n,children:r?dt("p",{children:[e,ve("span",{className:"text-red-500",children:"*"})]}):e}));b.displayName="FormLabel";import{jsx as Pe,jsxs as ct}from"react/jsx-runtime";var H=({size:t=16,colour:e="primary"})=>ct("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[Pe("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Pe("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:e==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as xe from"react";import{Slot as pt}from"@radix-ui/react-slot";import{cva as mt}from"class-variance-authority";import{Fragment as Ne,jsx as B,jsxs as ft}from"react/jsx-runtime";var ut=mt("overflow-hidden isolate relative 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] text-[0.75rem] leading-[1rem] font-medium 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"}}),we=({className:t,variant:e="primary",size:r,asChild:a=!1,isLoading:n=!1,leftNode:l,rightNode:d,LoaderSize:i,ref:f,...m})=>{let s=a?pt:"button",{children:p,disabled:h,...y}=m,A=xe.useRef(null);return B(s,{className:o(ut({variant:e,size:r,className:t})),ref:A||f,disabled:h||n,...y,children:B("div",{className:"flex font-medium justify-center items-center gap-2",children:n?B(Ne,{children:B("span",{className:"mx-auto",children:B(H,{size:i,colour:"secondary"})})}):ft(Ne,{children:[l,p,d]})})})};we.displayName="Button";import{cva as ue}from"class-variance-authority";import yt from"react";import{jsx as gt}from"react/jsx-runtime";var P=yt.forwardRef(({className:t,children:e,error:r,...a},n)=>{let l=r??e;return l?gt("p",{ref:n,className:o("text-xs font-normal text-[#F04248]",t),...a,children:l}):null});P.displayName="ErrorMessage";import Ct from"react";import{jsx as ht}from"react/jsx-runtime";var N=Ct.forwardRef(({className:t,...e},r)=>ht("p",{ref:r,className:o("text-sm text-[#8E98A8",t),...e}));N.displayName="FormDescription";import{jsx as F,jsxs as ke}from"react/jsx-runtime";var fe=ue("!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:""}},defaultVariants:{status:"default"}}),De=({className:t,status:e,type:r,ref:a,...n})=>F("input",{type:r,className:o(fe({status:e}),t),ref:a,...n});De.displayName="BaseInnerInput";var R=ue("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]"}},defaultVariants:{status:"default"}}),Re=ue("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] 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: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]"}},defaultVariants:{status:"default",side:"left"}}),ae=({className:t,status:e="default",disabled:r,error:a,isLoading:n,sideNodeClassName:l,showAsterisk:d,label:i,description:f,ref:m,...s})=>{let p=e;return a&&(p="error"),n&&(p="loading"),r&&(p="prefilled"),ke("div",{className:"relative space-y-1 w-full",children:[F(b,{showAsterisk:d,error:a,children:i}),ke("div",{className:o(R({status:p}),s.leftNode||s.rightNode?"p-0":"",t),children:[s.leftNode?F("div",{className:o(Re({status:p,side:"left"}),l),children:s.leftNode}):null,F(De,{ref:m,disabled:n||r,className:s.leftNode||s.rightNode?"!px-3 !py-2":"",...s}),s.rightNode?F("div",{className:o(Re({status:p,side:"right"}),l),children:s.rightNode}):null]}),F(N,{className:"text-gray-400 text-sm !font-normal",children:f}),F(P,{error:a})]})};ae.displayName="Input";import{useState as Ve}from"react";import{jsx as Le,jsxs as bt}from"react/jsx-runtime";var Se=()=>bt("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Le("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"}),Le("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 Ie,jsxs as vt}from"react/jsx-runtime";var Ae=()=>vt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ie("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"}),Ie("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 Fe}from"react/jsx-runtime";var Ee=()=>Fe("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Fe("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 Te}from"react/jsx-runtime";var Me=()=>Te("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Te("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 Pt}from"react/jsx-runtime";var Oe=[{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}],We=({onValidate:t,onChange:e,...r})=>{let[a,n]=Ve(!1),[l,d]=Ve(Oe),i=s=>Oe.map(p=>({...p,validated:p.RegExp.test(s)})),f=s=>{let p=i(s),h=p.every(y=>y.validated);return d(p),h};return k(ae,{sideNodeClassName:"!border-l-0",rightNode:a?k("button",{type:"button",onClick:()=>n(s=>!s),children:k(Se,{})}):k("button",{type:"button",onClick:()=>n(s=>!s),children:k(Ae,{})}),type:a?"text":"password",onChange:s=>{e&&e(s);let p=s?.target?.value,h=f(p);t&&t(h,p)},description:k("div",{className:"flex items-center gap-2",children:l?.map(s=>Pt("div",{className:o("text-xs flex items-center gap-0.5",{"text-[#62C554]":s?.validated,"text-[#8E98A8]":!s?.validated}),children:[k("span",{className:"",children:s?.validated?k(Ee,{}):k(Me,{})}),k("span",{className:"",children:s?.label})]},s?.key))}),...r})};We.displayName="PasswordInput";import{cva as Nt}from"class-variance-authority";import{jsx as ne,jsxs as xt}from"react/jsx-runtime";var to=Nt("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]"}},defaultVariants:{status:"default"}}),He=({className:t,status:e="default",disabled:r,error:a,isLoading:n,showAsterisk:l,label:d,description:i,...f})=>{let m=e;return a&&(m="error"),n&&(m="loading"),r&&(m="prefilled"),xt("div",{className:"relative space-y-1",children:[ne(b,{showAsterisk:l,error:a,children:d}),ne("textarea",{className:o("min-h-[80px]",R({status:m}),t),disabled:n||r,...f}),ne(N,{className:"text-gray-400 text-sm !font-normal",children:i}),ne(P,{error:a})]})};He.displayName="Textarea";import*as T from"react";import*as S from"react";import{Command as C}from"cmdk";import{Search as Lt}from"lucide-react";import*as G from"react";import*as u from"@radix-ui/react-dialog";import{jsx as Be,jsxs as wt}from"react/jsx-runtime";var Ge=()=>wt("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:[Be("path",{d:"M18 6 6 18"}),Be("path",{d:"m6 6 12 12"})]});import{Fragment as Dt,jsx as g,jsxs as O}from"react/jsx-runtime";var Rt=u.Root,kt=u.Trigger,_e=u.Portal,ze=G.forwardRef(({className:t,...e},r)=>g(u.Overlay,{ref:r,className:o("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",t),...e}));ze.displayName=u.Overlay.displayName;var ye=G.forwardRef(({className:t,hideCloseButton:e,children:r,...a},n)=>O(_e,{children:[g(ze,{}),O(u.Content,{ref:n,className:o("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",t),...a,children:[r,!e&&O(u.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:[g(Ge,{}),g("span",{className:"sr-only",children:"Close"})]})]})]}));ye.displayName=u.Content.displayName;var Ze=({className:t,...e})=>g("div",{className:o("flex flex-col space-y-1.5 text-left",t),...e});Ze.displayName="DialogHeader";var Xe=({className:t,...e})=>g("div",{className:o("flex flex-row justify-end sm:space-x-2",t),...e});Xe.displayName="DialogFooter";var Ke=G.forwardRef(({className:t,...e},r)=>g(u.Title,{ref:r,className:o("text-xl font-semibold leading-none tracking-tight",t),...e}));Ke.displayName=u.Title.displayName;var Ue=G.forwardRef(({className:t,...e},r)=>g(u.Description,{ref:r,className:o("text-sm text-gray-500",t),...e}));Ue.displayName=u.Description.displayName;var ge=({trigger:t=void 0,children:e,open:r,onOpenChange:a,hideCloseButton:n,footer:l,title:d,description:i,contentClassName:f,headerClassName:m,titleClassName:s,descriptionClassName:p,footerClassName:h,asChild:y=!0,onOpenAutoFocus:A,onCloseAutoFocus:le,onEscapeKeyDown:oe,onInteractOutside:M,onPointerDownOutside:de,...ce})=>O(Rt,{...ce,open:r,onOpenChange:a,children:[g(kt,{asChild:y,children:t}),g(_e,{children:O(ye,{className:f,hideCloseButton:n,onOpenAutoFocus:A,onCloseAutoFocus:le,onEscapeKeyDown:oe,onPointerDownOutside:de,onInteractOutside:M,children:[d||i?O(Ze,{className:m,children:[d&&g(Ke,{className:s,children:d}),i&&g(Ue,{className:p,children:i})]}):g(Dt,{}),e,l&&g(Xe,{className:h,children:l})]})})]});ge.displayName=u.Dialog.displayName;import{Fragment as Co,jsx as D,jsxs as At}from"react/jsx-runtime";var _=S.forwardRef(({className:t,...e},r)=>D(C,{ref:r,className:o("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));_.displayName=C.displayName;var z=S.forwardRef(({className:t,CommandInputContainerClassName:e,loading:r,...a},n)=>At("div",{className:o("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[r?D(H,{size:16,colour:"secondary"}):D(Lt,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),D(C.Input,{ref:n,className:o("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",t),disabled:r,...a})]}));z.displayName=C.Input.displayName;var Z=S.forwardRef(({className:t,...e},r)=>D(C.List,{ref:r,className:o("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));Z.displayName=C.List.displayName;var X=S.forwardRef((t,e)=>D(C.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));X.displayName=C.Empty.displayName;var K=S.forwardRef(({className:t,...e},r)=>D(C.Group,{ref:r,className:o("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",t),...e}));K.displayName=C.Group.displayName;var St=S.forwardRef(({className:t,...e},r)=>D(C.Separator,{ref:r,className:o("-mx-1 h-px bg-border",t),...e}));St.displayName=C.Separator.displayName;var U=S.forwardRef(({className:t,...e},r)=>D(C.Item,{ref:r,className:o("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",t),...e}));U.displayName=C.Item.displayName;var It=({className:t,...e})=>D("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});It.displayName="CommandShortcut";import*as $e from"react";import*as x from"@radix-ui/react-popover";import{jsx as $,jsxs as Et}from"react/jsx-runtime";var q=x.Root,E=x.Trigger,W=$e.forwardRef(({className:t,align:e="center",sideOffset:r=4,portal:a=!0,...n},l)=>a?$(x.Portal,{children:$(x.Content,{ref:l,align:e,sideOffset:r,className:o("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",t),onOpenAutoFocus:n.onOpenAutoFocus,onCloseAutoFocus:n.onCloseAutoFocus,...n})}):$(x.Content,{ref:l,align:e,sideOffset:r,className:o("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",t),onOpenAutoFocus:n.onOpenAutoFocus,onCloseAutoFocus:n.onCloseAutoFocus,...n}));W.displayName=x.Content.displayName;var Ft=({trigger:t,children:e,open:r,onOpenChange:a,contentClassName:n,asChild:l=!0,align:d,side:i,alignOffset:f,sideOffset:m,onOpenAutoFocus:s,onCloseAutoFocus:p,...h})=>Et(q,{...h,open:r,onOpenChange:a,children:[$(E,{asChild:l,children:t}),$(W,{alignOffset:f,sideOffset:m,side:i,align:d,className:n,onOpenAutoFocus:s,onCloseAutoFocus:p,children:e})]});Ft.displayName=x.Root.displayName;import*as Ce from"react";import*as v from"@radix-ui/react-scroll-area";import{jsx as j,jsxs as Tt}from"react/jsx-runtime";var J=Ce.forwardRef(({className:t,children:e,...r},a)=>Tt(v.Root,{ref:a,className:o("relative overflow-hidden",t),...r,children:[j(v.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),j(qe,{}),j(v.Corner,{})]}));J.displayName=v.Root.displayName;var qe=Ce.forwardRef(({className:t,orientation:e="vertical",...r},a)=>j(v.ScrollAreaScrollbar,{ref:a,orientation:e,className:o("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:j(v.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));qe.displayName=v.ScrollAreaScrollbar.displayName;import{jsx as L,jsxs as ie}from"react/jsx-runtime";var je=({className:t,value:e,placeholder:r="",status:a,disabled:n})=>L(E,{asChild:!0,disabled:n,children:ie("button",{disabled:n,className:o(R({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e??r??"Select options...",L("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:L("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"})})]})}),se=({options:t=[],value:e,onChange:r,containerClassName:a,placeholder:n,disabled:l,loading:d,optionComponent:i,children:f,modal:m=!1,hideSearch:s,className:p,inputValue:h,onValueChange:y,onInputValueChange:A})=>{let[le,oe]=T.useState(!1),M=T.useRef(null),[de,ce]=T.useState(void 0);return T.useLayoutEffect(()=>{M.current&&ce(M.current.clientWidth)},[M.current]),ie(q,{modal:m,open:le,onOpenChange:oe,children:[L("div",{className:o("w-full",p),ref:M,children:f}),L(W,{portal:!m,className:"p-0 min-w-[200px]",style:{width:de},children:ie(_,{className:"max-h-[270px] relative",children:[!s&&L(z,{loading:d,placeholder:n??"Search options...",onValueChange:A,value:h,CommandInputContainerClassName:"mx-3 border rounded-md border-[#DEDEDE]"}),L(J,{className:o("w-full px-0 h-full overflow-y-auto",a),children:ie(Z,{children:[!s&&L(X,{children:"No result found."}),L(K,{className:"w-full",children:t?.map(V=>L(U,{defaultValue:e?.label,value:V.label,disabled:l,onSelect:()=>{r(V),oe(!1),y?.(V?.value)},children:i?i(V):V.label},V.value))})]})})]})})]})};import{jsx as Q,jsxs as Vt}from"react/jsx-runtime";var Mt=({showAsterisk:t,label:e,description:r,error:a,hideSearch:n=!0,status:l,...d})=>Vt("div",{className:"relative space-y-1",children:[Q(b,{showAsterisk:t,error:a,children:e}),Q(se,{hideSearch:n,...d,containerClassName:"max-h-[700px] h-full",children:Q(je,{disabled:d?.disabled,placeholder:"Select or search email",status:l,value:d?.value?.label??d?.value?.value})}),Q(N,{className:"text-gray-400 text-sm !font-normal",children:r}),Q(P,{error:a})]});var he=[{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"}],Je=()=>{let t={};return he?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};import*as te from"react";import*as Ye from"react-phone-number-input";import Ht from"react-phone-number-input";import Bt from"react-phone-number-input/flags";import{jsx as Y,jsxs as Wt}from"react/jsx-runtime";var Ot=t=>Wt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...t,children:[Y("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",Y("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"}),Y("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),Y("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),Y("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Qe=Ot;import{jsx as c,jsxs as ee}from"react/jsx-runtime";var et=te.forwardRef(({className:t,onChange:e,value:r,modal:a,showAsterisk:n,label:l,description:d,error:i,defaultCountry:f="NG",...m},s)=>{let p=y=>c(Gt,{...y,status:m.status,modal:a,onChange:A=>y.onChange(A)}),h=r;return ee("div",{className:"relative space-y-1",children:[c(b,{showAsterisk:n,error:i,children:l}),c(Ht,{ref:s,className:o("flex",t),flagComponent:I,countrySelectComponent:p,focusInputOnCountrySelection:!0,countryCallingCodeEditable:!0,enableLongNumber:!0,addInternationalOption:!0,international:!0,inputComponent:tt,defaultCountry:f,containerComponent:({children:y})=>c("div",{className:o(R({status:m?.status}),"p-0 gap-1"),children:y}),...m,onChange:y=>{e&&e(y)},value:h}),c(N,{className:"text-gray-400 text-sm !font-normal",children:d}),c(P,{error:i})]})});et.displayName="PhoneInput";var tt=te.forwardRef(({className:t,...e},r)=>c("input",{className:o(fe({status:e?.status})," h-full !-mt-0 border-0 rounded-l-none !flex-1 !block !w-full",t),...e,ref:r}));tt.displayName="InputComponent";var Gt=({disabled:t,value:e,onChange:r,options:a,status:n,modal:l})=>{let d=te.useCallback(i=>{console.log(i),r(i)},[r]);return ee(q,{modal:l,children:[c(E,{disabled:t,children:ee("div",{className:o(R({status:n}),"!border-0 transition justify-center items-center disabled:text-base-500 flex gap-3 h-full rounded-e-none pl-2 pr-2"),children:[c(I,{country:e,countryName:e}),c("svg",{className:o("-mr-2 h-4 w-4 opacity-50",t?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:c("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"})})]})}),c(W,{portal:!l,className:"w-[200px] md:w-[300px] p-0",children:c(_,{children:c(Z,{children:ee(J,{className:"h-72",children:[c(z,{placeholder:"Search country..."}),c(X,{children:"No country found."}),c(K,{children:a.filter(i=>i.value).map(i=>ee(U,{className:"gap-2",onSelect:()=>d(i.value),children:[c(I,{country:i.value,countryName:i.label}),c("span",{className:"flex-1 text-sm",children:i.label}),i.value&&c("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${Ye.getCountryCallingCode(i.value)}`}),c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:o("ml-auto",i.value===e?"opacity-100":"opacity-0"),children:c("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${i.value}-${i.label}`))})]})})})})]})},I=({country:t,countryName:e,className:r})=>{let a=Bt[t];return t==="GLOBAL"?c("span",{className:o("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:c(Qe,{className:"w-full h-[90%]"})}):c("span",{className:o("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:a&&c(a,{title:e})})};I.displayName="FlagComponent";import{jsx as w,jsxs as re}from"react/jsx-runtime";var _t=Je(),zt=({className:t,value:e,placeholder:r="",status:a,disabled:n})=>w(E,{asChild:!0,disabled:n,children:re("button",{disabled:n,className:o(R({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e?re("div",{className:"flex gap-2 items-center",children:[w(I,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),re("span",{className:"",children:[" ",_t[e]]})]}):r??"Select options...",w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:w("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"})})]})}),Zt=({hideSearch:t=!0,showAsterisk:e,label:r,description:a,error:n,...l})=>{let d=he?.map(i=>({value:i?.internetCountryCode,label:i?.countryName,...i}));return re("div",{className:"relative space-y-1",children:[w(b,{showAsterisk:e,error:n,children:r}),w(se,{options:d,hideSearch:t,optionComponent:i=>re("div",{className:"w-full flex items-center gap-2",children:[w(I,{country:i?.internetCountryCode,countryName:i?.label,className:"ml-2 !w-6 !h-5"}),w("span",{className:"flex-1 text-sm",children:i?.label})]}),...l,children:w(zt,{value:l?.value?.value,status:l?.status,placeholder:l?.placeholder??" Select Country"})}),w(N,{className:"text-gray-400 text-sm !font-normal",children:a}),w(P,{error:n})]})};import Xt from"react-otp-input";import{cva as Kt}from"class-variance-authority";import{useMemo as Ut}from"react";import{jsx as rt}from"react/jsx-runtime";var $t=Kt("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"}}),qt=({numInputs:t=4,inputStyle:e,containerStyle:r,placeholder:a="-",status:n,...l})=>{let d=Ut(()=>a||new Array(t).fill("").reduce((m,s)=>m+=s,""),[t,a]);return rt(Xt,{numInputs:t,placeholder:d,containerStyle:o("w-full",r),inputStyle:o($t({status:n}),e),renderInput:i=>rt("input",{...i}),...l})};export{we as Button,Zt as Country,ge as Dialog,I as FlagComponent,b as FormLabel,ae as Input,H as Loader,qt as OTPInput,We as PasswordInput,et as PhoneInput,Mt as Select,He as Textarea};
2
2
  //# sourceMappingURL=index.mjs.map