@6thbridge/hexa 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,1773 @@
1
- "use strict";var mt=Object.create;var le=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var ft=Object.getOwnPropertyNames;var yt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var Ct=(t,e)=>{for(var r in e)le(t,r,{get:e[r],enumerable:!0})},De=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ft(e))!gt.call(t,n)&&n!==r&&le(t,n,{get:()=>e[n],enumerable:!(o=ut(e,n))||o.enumerable});return t};var y=(t,e,r)=>(r=t!=null?mt(yt(t)):{},De(e||!t||!t.__esModule?le(r,"default",{value:t,enumerable:!0}):r,t)),bt=t=>De(le({},"__esModule",{value:!0}),t);var Lt={};Ct(Lt,{Button:()=>be,Country:()=>st,Dialog:()=>de,FlagComponent:()=>A,FormLabel:()=>P,Input:()=>M,Loader:()=>G,OTPInput:()=>pt,PasswordInput:()=>he,PhoneInput:()=>Re,Select:()=>ot,Textarea:()=>ve});module.exports=bt(Lt);var Fe=y(require("react"));var Ae=y(require("react")),ge=y(require("@radix-ui/react-label")),Ie=require("class-variance-authority");var ke=require("clsx"),Se=require("tailwind-merge");function a(...t){return(0,Se.twMerge)((0,ke.clsx)(t))}var Le=require("react/jsx-runtime"),ht=(0,Ie.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ce=Ae.forwardRef(({className:t,...e},r)=>(0,Le.jsx)(ge.Root,{ref:r,className:a(ht(),t),...e}));Ce.displayName=ge.Root.displayName;var K=require("react/jsx-runtime"),P=Fe.default.forwardRef(({className:t,children:e,showAsterisk:r,error:o,...n},s)=>(0,K.jsx)(Ce,{ref:s,className:a(o&&"text-red-500",t),...n,children:r?(0,K.jsxs)("p",{children:[e,(0,K.jsx)("span",{className:"text-red-500",children:"*"})]}):e}));P.displayName="FormLabel";var U=require("react/jsx-runtime"),G=({size:t=16,colour:e="primary"})=>(0,U.jsxs)("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[(0,U.jsx)("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),(0,U.jsx)("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"})]});var Te=y(require("react")),Ee=require("@radix-ui/react-slot"),Me=require("class-variance-authority");var x=require("react/jsx-runtime"),vt=(0,Me.cva)("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"}}),be=({className:t,variant:e="primary",size:r,asChild:o=!1,isLoading:n=!1,leftNode:s,rightNode:c,LoaderSize:i,ref:b,...u})=>{let p=o?Ee.Slot:"button",{children:f,disabled:E,...Z}=u,X=Te.useRef(null);return(0,x.jsx)(p,{className:a(vt({variant:e,size:r,className:t})),ref:X||b,disabled:E||n,...Z,children:(0,x.jsx)("div",{className:"flex font-medium justify-center items-center gap-2",children:n?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("span",{className:"mx-auto",children:(0,x.jsx)(G,{size:i,colour:"secondary"})})}):(0,x.jsxs)(x.Fragment,{children:[s,f,c]})})})};be.displayName="Button";var ce=require("class-variance-authority");var Ve=y(require("react")),Oe=require("react/jsx-runtime"),R=Ve.default.forwardRef(({className:t,children:e,error:r,...o},n)=>{let s=r??e;return s?(0,Oe.jsx)("p",{ref:n,className:a("text-xs font-normal text-[#F04248]",t),...o,children:s}):null});R.displayName="ErrorMessage";var We=y(require("react")),He=require("react/jsx-runtime"),w=We.default.forwardRef(({className:t,...e},r)=>(0,He.jsx)("p",{ref:r,className:a("text-sm text-[#8E98A8",t),...e}));w.displayName="FormDescription";var D=require("react/jsx-runtime"),Pt=(0,ce.cva)("!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"}}),Ge=({className:t,status:e,type:r,ref:o,...n})=>(0,D.jsx)("input",{type:r,className:a(Pt({status:e}),t),ref:o,...n});Ge.displayName="BaseInnerInput";var S=(0,ce.cva)("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"}}),Be=(0,ce.cva)("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"}}),M=({className:t,status:e="default",disabled:r,error:o,isLoading:n,sideNodeClassName:s,showAsterisk:c,label:i,description:b,ref:u,...p})=>{let f=e;return o&&(f="error"),n&&(f="loading"),r&&(f="prefilled"),(0,D.jsxs)("div",{className:"relative space-y-1",children:[(0,D.jsx)(P,{showAsterisk:c,error:o,children:i}),(0,D.jsxs)("div",{className:a(S({status:f}),p.leftNode||p.rightNode?"p-0":"",t),children:[p.leftNode?(0,D.jsx)("div",{className:a(Be({status:f,side:"left"}),s),children:p.leftNode}):null,(0,D.jsx)(Ge,{ref:u,disabled:n||r,className:p.leftNode||p.rightNode?"!px-3 !py-2":"",...p}),p.rightNode?(0,D.jsx)("div",{className:a(Be({status:f,side:"right"}),s),children:p.rightNode}):null]}),(0,D.jsx)(w,{className:"text-gray-400 text-sm !font-normal",children:b}),(0,D.jsx)(R,{error:o})]})};M.displayName="Input";var Ze=require("react");var $=require("react/jsx-runtime"),_e=()=>(0,$.jsxs)("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,$.jsx)("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"}),(0,$.jsx)("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"})]});var j=require("react/jsx-runtime"),ze=()=>(0,j.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,j.jsx)("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"}),(0,j.jsx)("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"})]});var _=require("react/jsx-runtime"),he=({...t})=>{let[e,r]=(0,Ze.useState)(!1);return(0,_.jsx)(M,{sideNodeClassName:"!border-l-0",rightNode:e?(0,_.jsx)("button",{type:"button",onClick:()=>r(o=>!o),children:(0,_.jsx)(_e,{})}):(0,_.jsx)("button",{type:"button",onClick:()=>r(o=>!o),children:(0,_.jsx)(ze,{})}),type:e?"text":"password",...t})};he.displayName="PasswordInput";var Xe=require("class-variance-authority");var V=require("react/jsx-runtime"),dr=(0,Xe.cva)("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"}}),ve=({className:t,status:e="default",disabled:r,error:o,isLoading:n,showAsterisk:s,label:c,description:i,...b})=>{let u=e;return o&&(u="error"),n&&(u="loading"),r&&(u="prefilled"),(0,V.jsxs)("div",{className:"relative space-y-1",children:[(0,V.jsx)(P,{showAsterisk:s,error:o,children:c}),(0,V.jsx)("textarea",{className:a("min-h-[80px]",S({status:u}),t),disabled:n||r,...b}),(0,V.jsx)(w,{className:"text-gray-400 text-sm !font-normal",children:i}),(0,V.jsx)(R,{error:o})]})};ve.displayName="Textarea";var W=y(require("react"));var I=y(require("react")),h=require("cmdk"),Ye=require("lucide-react");var J=y(require("react")),m=y(require("@radix-ui/react-dialog"));var q=require("react/jsx-runtime"),Ke=()=>(0,q.jsxs)("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:[(0,q.jsx)("path",{d:"M18 6 6 18"}),(0,q.jsx)("path",{d:"m6 6 12 12"})]});var d=require("react/jsx-runtime"),Nt=m.Root,xt=m.Trigger,Ue=m.Portal,$e=J.forwardRef(({className:t,...e},r)=>(0,d.jsx)(m.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}));$e.displayName=m.Overlay.displayName;var Pe=J.forwardRef(({className:t,hideCloseButton:e,children:r,...o},n)=>(0,d.jsxs)(Ue,{children:[(0,d.jsx)($e,{}),(0,d.jsxs)(m.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&&(0,d.jsxs)(m.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:[(0,d.jsx)(Ke,{}),(0,d.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Pe.displayName=m.Content.displayName;var je=({className:t,...e})=>(0,d.jsx)("div",{className:a("flex flex-col space-y-1.5 text-left",t),...e});je.displayName="DialogHeader";var qe=({className:t,...e})=>(0,d.jsx)("div",{className:a("flex flex-row justify-end sm:space-x-2",t),...e});qe.displayName="DialogFooter";var Je=J.forwardRef(({className:t,...e},r)=>(0,d.jsx)(m.Title,{ref:r,className:a("text-xl font-semibold leading-none tracking-tight",t),...e}));Je.displayName=m.Title.displayName;var Qe=J.forwardRef(({className:t,...e},r)=>(0,d.jsx)(m.Description,{ref:r,className:a("text-sm text-gray-500",t),...e}));Qe.displayName=m.Description.displayName;var de=({trigger:t=void 0,children:e,open:r,onOpenChange:o,hideCloseButton:n,footer:s,title:c,description:i,contentClassName:b,headerClassName:u,titleClassName:p,descriptionClassName:f,footerClassName:E,asChild:Z=!0,onOpenAutoFocus:X,onCloseAutoFocus:ue,onEscapeKeyDown:se,onInteractOutside:H,onPointerDownOutside:fe,...ye})=>(0,d.jsxs)(Nt,{...ye,open:r,onOpenChange:o,children:[(0,d.jsx)(xt,{asChild:Z,children:t}),(0,d.jsx)(Ue,{children:(0,d.jsxs)(Pe,{className:b,hideCloseButton:n,onOpenAutoFocus:X,onCloseAutoFocus:ue,onEscapeKeyDown:se,onPointerDownOutside:fe,onInteractOutside:H,children:[c||i?(0,d.jsxs)(je,{className:u,children:[c&&(0,d.jsx)(Je,{className:p,children:c}),i&&(0,d.jsx)(Qe,{className:f,children:i})]}):(0,d.jsx)(d.Fragment,{}),e,s&&(0,d.jsx)(qe,{className:E,children:s})]})})]});de.displayName=m.Dialog.displayName;var v=require("react/jsx-runtime"),Q=I.forwardRef(({className:t,...e},r)=>(0,v.jsx)(h.Command,{ref:r,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));Q.displayName=h.Command.displayName;var Y=I.forwardRef(({className:t,CommandInputContainerClassName:e,loading:r,...o},n)=>(0,v.jsxs)("div",{className:a("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[r?(0,v.jsx)(G,{size:16,colour:"secondary"}):(0,v.jsx)(Ye.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,v.jsx)(h.Command.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})]}));Y.displayName=h.Command.Input.displayName;var ee=I.forwardRef(({className:t,...e},r)=>(0,v.jsx)(h.Command.List,{ref:r,className:a("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));ee.displayName=h.Command.List.displayName;var te=I.forwardRef((t,e)=>(0,v.jsx)(h.Command.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));te.displayName=h.Command.Empty.displayName;var re=I.forwardRef(({className:t,...e},r)=>(0,v.jsx)(h.Command.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}));re.displayName=h.Command.Group.displayName;var Rt=I.forwardRef(({className:t,...e},r)=>(0,v.jsx)(h.Command.Separator,{ref:r,className:a("-mx-1 h-px bg-border",t),...e}));Rt.displayName=h.Command.Separator.displayName;var oe=I.forwardRef(({className:t,...e},r)=>(0,v.jsx)(h.Command.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}));oe.displayName=h.Command.Item.displayName;var wt=({className:t,...e})=>(0,v.jsx)("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});wt.displayName="CommandShortcut";var et=y(require("react")),k=y(require("@radix-ui/react-popover"));var L=require("react/jsx-runtime"),ae=k.Root,O=k.Trigger,z=et.forwardRef(({className:t,align:e="center",sideOffset:r=4,portal:o=!0,...n},s)=>o?(0,L.jsx)(k.Portal,{children:(0,L.jsx)(k.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})}):(0,L.jsx)(k.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}));z.displayName=k.Content.displayName;var Dt=({trigger:t,children:e,open:r,onOpenChange:o,contentClassName:n,asChild:s=!0,align:c,side:i,alignOffset:b,sideOffset:u,onOpenAutoFocus:p,onCloseAutoFocus:f,...E})=>(0,L.jsxs)(ae,{...E,open:r,onOpenChange:o,children:[(0,L.jsx)(O,{asChild:s,children:t}),(0,L.jsx)(z,{alignOffset:b,sideOffset:u,side:i,align:c,className:n,onOpenAutoFocus:p,onCloseAutoFocus:f,children:e})]});Dt.displayName=k.Root.displayName;var Ne=y(require("react")),N=y(require("@radix-ui/react-scroll-area"));var F=require("react/jsx-runtime"),ne=Ne.forwardRef(({className:t,children:e,...r},o)=>(0,F.jsxs)(N.Root,{ref:o,className:a("relative overflow-hidden",t),...r,children:[(0,F.jsx)(N.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),(0,F.jsx)(tt,{}),(0,F.jsx)(N.Corner,{})]}));ne.displayName=N.Root.displayName;var tt=Ne.forwardRef(({className:t,orientation:e="vertical",...r},o)=>(0,F.jsx)(N.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:(0,F.jsx)(N.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));tt.displayName=N.ScrollAreaScrollbar.displayName;var C=require("react/jsx-runtime"),rt=({className:t,value:e,placeholder:r="",status:o,disabled:n})=>(0,C.jsx)(O,{asChild:!0,disabled:n,children:(0,C.jsxs)("button",{disabled:n,className:a(S({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...",(0,C.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,C.jsx)("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"})})]})}),pe=({options:t=[],value:e,onChange:r,containerClassName:o,placeholder:n,disabled:s,loading:c,optionComponent:i,children:b,modal:u=!1,hideSearch:p,className:f,inputValue:E,onValueChange:Z,onInputValueChange:X})=>{let[ue,se]=W.useState(!1),H=W.useRef(null),[fe,ye]=W.useState(void 0);return W.useLayoutEffect(()=>{H.current&&ye(H.current.clientWidth)},[H.current]),(0,C.jsxs)(ae,{modal:u,open:ue,onOpenChange:se,children:[(0,C.jsx)("div",{className:a("w-full",f),ref:H,children:b}),(0,C.jsx)(z,{portal:!u,className:"p-0 min-w-[200px]",style:{width:fe},children:(0,C.jsxs)(Q,{className:"max-h-[270px] pt-3 relative",children:[!p&&(0,C.jsx)(Y,{loading:c,placeholder:n??"Search options...",onValueChange:X,value:E,CommandInputContainerClassName:"mx-3 border rounded-md border-[#DEDEDE]"}),(0,C.jsx)(ne,{className:a("w-full px-0",o),children:(0,C.jsxs)(ee,{children:[!p&&(0,C.jsx)(te,{children:"No result found."}),(0,C.jsx)(re,{className:"w-full",children:t?.map(B=>(0,C.jsx)(oe,{defaultValue:e?.label,value:B.label,disabled:s,onSelect:()=>{r(B),se(!1),Z?.(B?.value)},children:i?i(B):B.label},B.value))})]})})]})})]})};var T=require("react/jsx-runtime"),ot=({showAsterisk:t,label:e,description:r,error:o,hideSearch:n=!0,status:s,...c})=>(0,T.jsxs)("div",{className:"relative space-y-1",children:[(0,T.jsx)(P,{showAsterisk:t,error:o,children:e}),(0,T.jsx)(pe,{hideSearch:n,...c,children:(0,T.jsx)(rt,{disabled:c?.disabled,placeholder:"Select or search email",status:s,value:c?.value?.label??c?.value?.value})}),(0,T.jsx)(w,{className:"text-gray-400 text-sm !font-normal",children:r}),(0,T.jsx)(R,{error:o})]});var xe=[{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"}],at=()=>{let t={};return xe?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};var ie=y(require("react")),me=y(require("react-phone-number-input")),nt=y(require("react-phone-number-input/flags"));var l=require("react/jsx-runtime"),Re=ie.forwardRef(({className:t,onChange:e,modal:r,showAsterisk:o,label:n,description:s,error:c,defaultCountry:i="NG",...b},u)=>{let p=f=>(0,l.jsx)(kt,{...f,status:b.status,modal:r});return(0,l.jsxs)("div",{className:"relative space-y-1",children:[(0,l.jsx)(P,{showAsterisk:o,error:c,children:n}),(0,l.jsx)(me.default,{ref:u,className:a("flex",t),flagComponent:A,countrySelectComponent:p,inputComponent:it,defaultCountry:i,onChange:f=>e?.(f),...b}),(0,l.jsx)(w,{className:"text-gray-400 text-sm !font-normal",children:s}),(0,l.jsx)(R,{error:c})]})});Re.displayName="PhoneInput";var it=ie.forwardRef(({className:t,...e},r)=>(0,l.jsx)(M,{className:a("h-full !-mt-0 border-l-0 rounded-l-none flex-1",t),...e,ref:r}));it.displayName="InputComponent";var kt=({disabled:t,value:e,onChange:r,options:o,status:n,modal:s})=>{let c=ie.useCallback(i=>{r(i)},[r]);return(0,l.jsxs)(ae,{modal:s,children:[(0,l.jsx)(O,{disabled:t,children:(0,l.jsxs)("div",{className:a(S({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:[(0,l.jsx)(A,{country:e,countryName:e}),(0,l.jsx)("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:(0,l.jsx)("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"})})]})}),(0,l.jsx)(z,{portal:!s,className:"w-[200px] md:w-[300px] p-0",children:(0,l.jsx)(Q,{children:(0,l.jsx)(ee,{children:(0,l.jsxs)(ne,{className:"h-72",children:[(0,l.jsx)(Y,{placeholder:"Search country..."}),(0,l.jsx)(te,{children:"No country found."}),(0,l.jsx)(re,{children:o.filter(i=>i.value).map(i=>(0,l.jsxs)(oe,{className:"gap-2",onSelect:()=>c(i.value),children:[(0,l.jsx)(A,{country:i.value,countryName:i.label}),(0,l.jsx)("span",{className:"flex-1 text-sm",children:i.label}),i.value&&(0,l.jsx)("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${me.getCountryCallingCode(i.value)}`}),(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:a("ml-auto",i.value===e?"opacity-100":"opacity-0"),children:(0,l.jsx)("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${i.value}-${i.label}`))})]})})})})]})},A=({country:t,countryName:e,className:r})=>{let o=nt.default[t];return(0,l.jsx)("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:o&&(0,l.jsx)(o,{title:e})})};A.displayName="FlagComponent";var g=require("react/jsx-runtime"),St=at(),At=({className:t,value:e,placeholder:r="",status:o,disabled:n})=>(0,g.jsx)(O,{asChild:!0,disabled:n,children:(0,g.jsxs)("button",{disabled:n,className:a(S({status:o}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e?(0,g.jsxs)("div",{className:"flex gap-2",children:[(0,g.jsx)(A,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),(0,g.jsxs)("span",{className:"",children:[" ",St[e]]})]}):r??"Select options...",(0,g.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,g.jsx)("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"})})]})}),st=({hideSearch:t=!0,showAsterisk:e,label:r,description:o,error:n,...s})=>{let c=xe?.map(i=>({value:i?.internetCountryCode,label:i?.countryName,...i}));return(0,g.jsxs)("div",{className:"relative space-y-1",children:[(0,g.jsx)(P,{showAsterisk:e,error:n,children:r}),(0,g.jsx)(pe,{options:c,hideSearch:t,optionComponent:i=>(0,g.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,g.jsx)(A,{country:i?.internetCountryCode,countryName:i?.label,className:"ml-2 !w-6 !h-5"}),(0,g.jsx)("span",{className:"flex-1 text-sm",children:i?.label})]}),...s,children:(0,g.jsx)(At,{value:s?.value?.value,status:s?.status,placeholder:s?.placeholder??" Select Country"})}),(0,g.jsx)(w,{className:"text-gray-400 text-sm !font-normal",children:o}),(0,g.jsx)(R,{error:n})]})};var lt=y(require("react-otp-input"));var ct=require("class-variance-authority"),dt=require("react"),we=require("react/jsx-runtime"),It=(0,ct.cva)("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"}}),pt=({numInputs:t=4,inputStyle:e,containerStyle:r,placeholder:o="-",status:n,...s})=>{let c=(0,dt.useMemo)(()=>o||new Array(t).fill("").reduce((u,p)=>u+=p,""),[t,o]);return(0,we.jsx)(lt.default,{numInputs:t,placeholder:c,containerStyle:a("w-full",r),inputStyle:a(It({status:n}),e),renderInput:i=>(0,we.jsx)("input",{...i}),...s})};0&&(module.exports={Button,Country,Dialog,FlagComponent,FormLabel,Input,Loader,OTPInput,PasswordInput,PhoneInput,Select,Textarea});
2
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Button: () => Button,
34
+ Country: () => Country,
35
+ Dialog: () => Dialog2,
36
+ FlagComponent: () => FlagComponent,
37
+ FormLabel: () => FormLabel,
38
+ Input: () => Input,
39
+ Loader: () => Loader,
40
+ OTPInput: () => OTPInput,
41
+ PasswordInput: () => PasswordInput,
42
+ PhoneInput: () => PhoneInput,
43
+ Select: () => Select,
44
+ Textarea: () => Textarea
45
+ });
46
+ module.exports = __toCommonJS(index_exports);
47
+
48
+ // src/components/label/FormLabel.tsx
49
+ var import_react = __toESM(require("react"));
50
+
51
+ // src/components/label/index.tsx
52
+ var React = __toESM(require("react"));
53
+ var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
54
+ var import_class_variance_authority = require("class-variance-authority");
55
+
56
+ // src/utils/index.ts
57
+ var import_clsx = require("clsx");
58
+ var import_tailwind_merge = require("tailwind-merge");
59
+ function cn(...inputs) {
60
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
61
+ }
62
+
63
+ // src/components/label/index.tsx
64
+ var import_jsx_runtime = require("react/jsx-runtime");
65
+ var labelVariants = (0, import_class_variance_authority.cva)(
66
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
67
+ );
68
+ var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ LabelPrimitive.Root,
70
+ {
71
+ ref,
72
+ className: cn(labelVariants(), className),
73
+ ...props
74
+ }
75
+ ));
76
+ Label.displayName = LabelPrimitive.Root.displayName;
77
+
78
+ // src/components/label/FormLabel.tsx
79
+ var import_jsx_runtime2 = require("react/jsx-runtime");
80
+ var FormLabel = import_react.default.forwardRef(({ className, children, showAsterisk, error, ...props }, ref) => {
81
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
82
+ Label,
83
+ {
84
+ ref,
85
+ className: cn(error && "text-red-500", className),
86
+ ...props,
87
+ children: showAsterisk ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("p", { children: [
88
+ children,
89
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500", children: "*" })
90
+ ] }) : children
91
+ }
92
+ );
93
+ });
94
+ FormLabel.displayName = "FormLabel";
95
+
96
+ // src/components/loader/index.tsx
97
+ var import_jsx_runtime3 = require("react/jsx-runtime");
98
+ var Loader = ({
99
+ size = 16,
100
+ colour = "primary"
101
+ }) => {
102
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
103
+ "svg",
104
+ {
105
+ className: "animate-spin",
106
+ width: size,
107
+ height: size,
108
+ viewBox: "0 0 20 20",
109
+ fill: "none",
110
+ children: [
111
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "10", cy: "10", r: "9.25", stroke: "transparent", strokeWidth: "1.5" }),
112
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
113
+ "path",
114
+ {
115
+ 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",
116
+ fill: colour === "primary" ? "#ffffff" : "currentColor",
117
+ className: "rounded"
118
+ }
119
+ )
120
+ ]
121
+ }
122
+ );
123
+ };
124
+
125
+ // src/components/button/index.tsx
126
+ var React3 = __toESM(require("react"));
127
+ var import_react_slot = require("@radix-ui/react-slot");
128
+ var import_class_variance_authority2 = require("class-variance-authority");
129
+ var import_jsx_runtime4 = require("react/jsx-runtime");
130
+ var buttonVariants = (0, import_class_variance_authority2.cva)(
131
+ "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",
132
+ {
133
+ variants: {
134
+ variant: {
135
+ primary: "border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",
136
+ danger: "border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",
137
+ neutral: "!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",
138
+ outlined: "border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60",
139
+ "danger-outlined": "border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60",
140
+ "light-outlined": "border-white text-white hover:opacity-80 disabled:opacity-60",
141
+ "dark-text": "border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",
142
+ light: "border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"
143
+ },
144
+ size: {
145
+ // lg: "h-15 px-8 items-center",
146
+ // sm: "h-10 px-3.5 items-center text-sm",
147
+ default: "py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",
148
+ sm: "py-[0.375rem] px-[1rem] text-[0.75rem] leading-[1rem] font-medium rounded-lg",
149
+ lg: "py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",
150
+ md: "h-12 py-1 px-5 items-center",
151
+ "icon-sm": "h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",
152
+ icon: "h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg",
153
+ "icon-lg": "h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"
154
+ }
155
+ },
156
+ defaultVariants: {
157
+ variant: "primary",
158
+ size: "default"
159
+ }
160
+ }
161
+ );
162
+ var Button = ({
163
+ className,
164
+ variant = "primary",
165
+ size,
166
+ asChild = false,
167
+ isLoading = false,
168
+ leftNode,
169
+ rightNode,
170
+ LoaderSize,
171
+ ref,
172
+ ...props
173
+ }) => {
174
+ const Component = asChild ? import_react_slot.Slot : "button";
175
+ const { children, disabled, ...rest } = props;
176
+ const reference = React3.useRef(null);
177
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
178
+ Component,
179
+ {
180
+ className: cn(buttonVariants({ variant, size, className })),
181
+ ref: reference || ref,
182
+ disabled: disabled || isLoading,
183
+ ...rest,
184
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex font-medium justify-center items-center gap-2", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "mx-auto", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Loader, { size: LoaderSize, colour: "secondary" }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
185
+ leftNode,
186
+ children,
187
+ rightNode
188
+ ] }) })
189
+ }
190
+ );
191
+ };
192
+ Button.displayName = "Button";
193
+
194
+ // src/components/input/index.tsx
195
+ var import_class_variance_authority3 = require("class-variance-authority");
196
+
197
+ // src/components/form/ErrorMessage.tsx
198
+ var import_react2 = __toESM(require("react"));
199
+ var import_jsx_runtime5 = require("react/jsx-runtime");
200
+ var ErrorMessage = import_react2.default.forwardRef(({ className, children, error, ...props }, ref) => {
201
+ const body = error ?? children;
202
+ if (!body) {
203
+ return null;
204
+ }
205
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
206
+ "p",
207
+ {
208
+ ref,
209
+ className: cn("text-xs font-normal text-[#F04248]", className),
210
+ ...props,
211
+ children: body
212
+ }
213
+ );
214
+ });
215
+ ErrorMessage.displayName = "ErrorMessage";
216
+
217
+ // src/components/form/FormDescription.tsx
218
+ var import_react3 = __toESM(require("react"));
219
+ var import_jsx_runtime6 = require("react/jsx-runtime");
220
+ var FormDescription = import_react3.default.forwardRef(({ className, ...props }, ref) => {
221
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
222
+ "p",
223
+ {
224
+ ref,
225
+ className: cn("text-sm text-[#8E98A8", className),
226
+ ...props
227
+ }
228
+ );
229
+ });
230
+ FormDescription.displayName = "FormDescription";
231
+
232
+ // src/components/input/index.tsx
233
+ var import_jsx_runtime7 = require("react/jsx-runtime");
234
+ var inputVariants = (0, import_class_variance_authority3.cva)(
235
+ "!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",
236
+ {
237
+ variants: {
238
+ status: {
239
+ default: "placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",
240
+ error: "placeholder:text-red-500 text-red-500",
241
+ loading: "placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",
242
+ prefilled: ""
243
+ }
244
+ },
245
+ defaultVariants: {
246
+ status: "default"
247
+ }
248
+ }
249
+ );
250
+ var BaseInnerInput = ({
251
+ className,
252
+ status,
253
+ type,
254
+ ref,
255
+ ...props
256
+ }) => {
257
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
258
+ "input",
259
+ {
260
+ type,
261
+ className: cn(inputVariants({ status }), className),
262
+ ref,
263
+ ...props
264
+ }
265
+ );
266
+ };
267
+ BaseInnerInput.displayName = "BaseInnerInput";
268
+ var inputContainerVariants = (0, import_class_variance_authority3.cva)(
269
+ "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]",
270
+ {
271
+ variants: {
272
+ status: {
273
+ 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-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",
274
+ 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",
275
+ loading: "",
276
+ 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]"
277
+ }
278
+ },
279
+ defaultVariants: {
280
+ status: "default"
281
+ }
282
+ }
283
+ );
284
+ var sideVariants = (0, import_class_variance_authority3.cva)(
285
+ "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]",
286
+ {
287
+ variants: {
288
+ side: {
289
+ left: "left-0 rounded-l-[8px] border-r",
290
+ right: "right-0 rounded-r-[8px] border-l"
291
+ },
292
+ status: {
293
+ 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]",
294
+ 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",
295
+ loading: "",
296
+ 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]"
297
+ }
298
+ },
299
+ defaultVariants: {
300
+ status: "default",
301
+ side: "left"
302
+ }
303
+ }
304
+ );
305
+ var Input = ({
306
+ className,
307
+ status = "default",
308
+ disabled,
309
+ error,
310
+ isLoading,
311
+ sideNodeClassName,
312
+ showAsterisk,
313
+ label,
314
+ description,
315
+ ref,
316
+ ...props
317
+ }) => {
318
+ let containerStatus = status;
319
+ if (error) containerStatus = "error";
320
+ if (isLoading) containerStatus = "loading";
321
+ if (disabled) containerStatus = "prefilled";
322
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative space-y-1", children: [
323
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FormLabel, { showAsterisk, error, children: label }),
324
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
325
+ "div",
326
+ {
327
+ className: cn(
328
+ inputContainerVariants({ status: containerStatus }),
329
+ props.leftNode || props.rightNode ? "p-0" : "",
330
+ className
331
+ ),
332
+ children: [
333
+ props.leftNode ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
334
+ "div",
335
+ {
336
+ className: cn(
337
+ sideVariants({
338
+ status: containerStatus,
339
+ side: "left"
340
+ }),
341
+ sideNodeClassName
342
+ ),
343
+ children: props.leftNode
344
+ }
345
+ ) : null,
346
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
347
+ BaseInnerInput,
348
+ {
349
+ ref,
350
+ disabled: isLoading || disabled,
351
+ className: props.leftNode || props.rightNode ? "!px-3 !py-2" : "",
352
+ ...props
353
+ }
354
+ ),
355
+ props.rightNode ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
356
+ "div",
357
+ {
358
+ className: cn(
359
+ sideVariants({
360
+ status: containerStatus,
361
+ side: "right"
362
+ }),
363
+ sideNodeClassName
364
+ ),
365
+ children: props.rightNode
366
+ }
367
+ ) : null
368
+ ]
369
+ }
370
+ ),
371
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
372
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ErrorMessage, { error })
373
+ ] });
374
+ };
375
+ Input.displayName = "Input";
376
+
377
+ // src/components/password-input/index.tsx
378
+ var import_react4 = require("react");
379
+
380
+ // src/components/password-input/icons/Eye.tsx
381
+ var import_jsx_runtime8 = require("react/jsx-runtime");
382
+ var Eye = () => {
383
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
384
+ "svg",
385
+ {
386
+ width: "18",
387
+ height: "14",
388
+ viewBox: "0 0 18 14",
389
+ fill: "none",
390
+ xmlns: "http://www.w3.org/2000/svg",
391
+ children: [
392
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
393
+ "path",
394
+ {
395
+ 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",
396
+ stroke: "#8E98A8",
397
+ strokeWidth: "2",
398
+ strokeLinecap: "round",
399
+ strokeLinejoin: "round"
400
+ }
401
+ ),
402
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
403
+ "path",
404
+ {
405
+ 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",
406
+ stroke: "#8E98A8",
407
+ strokeWidth: "2",
408
+ strokeLinecap: "round",
409
+ strokeLinejoin: "round"
410
+ }
411
+ )
412
+ ]
413
+ }
414
+ );
415
+ };
416
+
417
+ // src/components/password-input/icons/EyeOff.tsx
418
+ var import_jsx_runtime9 = require("react/jsx-runtime");
419
+ var EyeOff = () => {
420
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
421
+ "svg",
422
+ {
423
+ width: "18",
424
+ height: "18",
425
+ viewBox: "0 0 18 18",
426
+ fill: "none",
427
+ xmlns: "http://www.w3.org/2000/svg",
428
+ children: [
429
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
430
+ "path",
431
+ {
432
+ 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",
433
+ stroke: "#8E98A8",
434
+ strokeWidth: "1.5",
435
+ strokeLinecap: "round",
436
+ strokeLinejoin: "round"
437
+ }
438
+ ),
439
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
440
+ "path",
441
+ {
442
+ 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",
443
+ stroke: "#8E98A8",
444
+ strokeWidth: "1.5",
445
+ strokeLinecap: "round",
446
+ strokeLinejoin: "round"
447
+ }
448
+ )
449
+ ]
450
+ }
451
+ );
452
+ };
453
+
454
+ // src/components/password-input/icons/Check.tsx
455
+ var import_jsx_runtime10 = require("react/jsx-runtime");
456
+ var Check = () => {
457
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
458
+ "svg",
459
+ {
460
+ width: "12",
461
+ height: "12",
462
+ viewBox: "0 0 12 12",
463
+ fill: "none",
464
+ xmlns: "http://www.w3.org/2000/svg",
465
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
466
+ "path",
467
+ {
468
+ d: "M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",
469
+ fill: "currentColor"
470
+ }
471
+ )
472
+ }
473
+ );
474
+ };
475
+
476
+ // src/components/password-input/icons/Fail.tsx
477
+ var import_jsx_runtime11 = require("react/jsx-runtime");
478
+ var Fail = () => {
479
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
480
+ "svg",
481
+ {
482
+ width: "12",
483
+ height: "12",
484
+ viewBox: "0 0 12 12",
485
+ fill: "none",
486
+ xmlns: "http://www.w3.org/2000/svg",
487
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
488
+ "path",
489
+ {
490
+ d: "M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",
491
+ stroke: "currentColor",
492
+ strokeWidth: "1.5",
493
+ strokeLinecap: "round",
494
+ strokeLinejoin: "round"
495
+ }
496
+ )
497
+ }
498
+ );
499
+ };
500
+
501
+ // src/components/password-input/index.tsx
502
+ var import_jsx_runtime12 = require("react/jsx-runtime");
503
+ var validationOptions = [
504
+ {
505
+ label: "Uppercase",
506
+ key: "uppercase",
507
+ RegExp: /[A-Z]/,
508
+ validated: false
509
+ },
510
+ {
511
+ label: "Lowercase",
512
+ key: "lowercase",
513
+ RegExp: /[a-z]/,
514
+ validated: false
515
+ },
516
+ {
517
+ label: "Number",
518
+ key: "number",
519
+ RegExp: /\d/,
520
+ validated: false
521
+ },
522
+ {
523
+ label: "8 Characters",
524
+ key: "eight-chars",
525
+ RegExp: /.{8}/,
526
+ validated: false
527
+ }
528
+ ];
529
+ var PasswordInput = ({
530
+ onValidate,
531
+ onChange,
532
+ ...props
533
+ }) => {
534
+ const [passwordVisible, setPasswordVisible] = (0, import_react4.useState)(false);
535
+ const [validatedValues, setValidatedValues] = (0, import_react4.useState)(validationOptions);
536
+ const validatePassword = (value) => {
537
+ return validationOptions.map((option) => ({
538
+ ...option,
539
+ validated: option.RegExp.test(value)
540
+ }));
541
+ };
542
+ const checkPasswordStrength = (value) => {
543
+ const validatedOptions = validatePassword(value);
544
+ const allValidated = validatedOptions.every((option) => option.validated);
545
+ setValidatedValues(validatedOptions);
546
+ return allValidated;
547
+ };
548
+ const handlePaswordInputChange = (e) => {
549
+ if (onChange) onChange(e);
550
+ const value = e?.target?.value;
551
+ const validated = checkPasswordStrength(value);
552
+ if (onValidate) onValidate(validated, value);
553
+ };
554
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
555
+ Input,
556
+ {
557
+ sideNodeClassName: "!border-l-0",
558
+ rightNode: passwordVisible ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
559
+ "button",
560
+ {
561
+ type: "button",
562
+ onClick: () => setPasswordVisible((val) => !val),
563
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Eye, {})
564
+ }
565
+ ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
566
+ "button",
567
+ {
568
+ type: "button",
569
+ onClick: () => setPasswordVisible((val) => !val),
570
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EyeOff, {})
571
+ }
572
+ ),
573
+ type: passwordVisible ? "text" : "password",
574
+ onChange: handlePaswordInputChange,
575
+ description: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex items-center gap-2", children: validatedValues?.map((value) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
576
+ "div",
577
+ {
578
+ className: cn("text-xs flex items-center gap-0.5", {
579
+ "text-[#62C554]": value?.validated,
580
+ "text-[#8E98A8]": !value?.validated
581
+ }),
582
+ children: [
583
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "", children: value?.validated ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Check, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Fail, {}) }),
584
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "", children: value?.label })
585
+ ]
586
+ },
587
+ value?.key
588
+ )) }),
589
+ ...props
590
+ }
591
+ );
592
+ };
593
+ PasswordInput.displayName = "PasswordInput";
594
+
595
+ // src/components/textarea/index.tsx
596
+ var import_class_variance_authority4 = require("class-variance-authority");
597
+ var import_jsx_runtime13 = require("react/jsx-runtime");
598
+ var textareaContainerVariants = (0, import_class_variance_authority4.cva)(
599
+ "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",
600
+ {
601
+ variants: {
602
+ status: {
603
+ 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]",
604
+ 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",
605
+ loading: "placeholder:text-[#C4C4C4]",
606
+ 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]"
607
+ }
608
+ },
609
+ defaultVariants: {
610
+ status: "default"
611
+ }
612
+ }
613
+ );
614
+ var Textarea = ({
615
+ className,
616
+ status = "default",
617
+ disabled,
618
+ error,
619
+ isLoading,
620
+ showAsterisk,
621
+ label,
622
+ description,
623
+ ...props
624
+ }) => {
625
+ let containerStatus = status;
626
+ if (error) containerStatus = "error";
627
+ if (isLoading) containerStatus = "loading";
628
+ if (disabled) containerStatus = "prefilled";
629
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative space-y-1", children: [
630
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FormLabel, { showAsterisk, error, children: label }),
631
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
632
+ "textarea",
633
+ {
634
+ className: cn(
635
+ "min-h-[80px]",
636
+ inputContainerVariants({ status: containerStatus }),
637
+ className
638
+ ),
639
+ disabled: isLoading || disabled,
640
+ ...props
641
+ }
642
+ ),
643
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
644
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ErrorMessage, { error })
645
+ ] });
646
+ };
647
+ Textarea.displayName = "Textarea";
648
+
649
+ // src/components/searcheable/index.tsx
650
+ var React10 = __toESM(require("react"));
651
+
652
+ // src/components/command/index.tsx
653
+ var React7 = __toESM(require("react"));
654
+ var import_cmdk = require("cmdk");
655
+ var import_lucide_react = require("lucide-react");
656
+
657
+ // src/components/dialog/index.tsx
658
+ var React6 = __toESM(require("react"));
659
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
660
+
661
+ // src/components/dialog/icon/CloseIcon.tsx
662
+ var import_jsx_runtime14 = require("react/jsx-runtime");
663
+ var CloseIcon = () => {
664
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
665
+ "svg",
666
+ {
667
+ xmlns: "http://www.w3.org/2000/svg",
668
+ width: "24",
669
+ height: "24",
670
+ viewBox: "0 0 24 24",
671
+ fill: "none",
672
+ stroke: "currentColor",
673
+ strokeWidth: "2",
674
+ strokeLinecap: "round",
675
+ strokeLinejoin: "round",
676
+ className: "lucide lucide-x",
677
+ children: [
678
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M18 6 6 18" }),
679
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m6 6 12 12" })
680
+ ]
681
+ }
682
+ );
683
+ };
684
+
685
+ // src/components/dialog/index.tsx
686
+ var import_jsx_runtime15 = require("react/jsx-runtime");
687
+ var DialogRoot = DialogPrimitive.Root;
688
+ var DialogTrigger = DialogPrimitive.Trigger;
689
+ var DialogPortal = DialogPrimitive.Portal;
690
+ var DialogOverlay = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
691
+ DialogPrimitive.Overlay,
692
+ {
693
+ ref,
694
+ className: cn(
695
+ "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",
696
+ className
697
+ ),
698
+ ...props
699
+ }
700
+ ));
701
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
702
+ var DialogContent = React6.forwardRef(({ className, hideCloseButton, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPortal, { children: [
703
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogOverlay, {}),
704
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
705
+ DialogPrimitive.Content,
706
+ {
707
+ ref,
708
+ className: cn(
709
+ "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",
710
+ className
711
+ ),
712
+ ...props,
713
+ children: [
714
+ children,
715
+ !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPrimitive.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: [
716
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CloseIcon, {}),
717
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: "Close" })
718
+ ] })
719
+ ]
720
+ }
721
+ )
722
+ ] }));
723
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
724
+ var DialogHeader = ({
725
+ className,
726
+ ...props
727
+ }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
728
+ "div",
729
+ {
730
+ className: cn("flex flex-col space-y-1.5 text-left", className),
731
+ ...props
732
+ }
733
+ );
734
+ DialogHeader.displayName = "DialogHeader";
735
+ var DialogFooter = ({
736
+ className,
737
+ ...props
738
+ }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
739
+ "div",
740
+ {
741
+ className: cn("flex flex-row justify-end sm:space-x-2", className),
742
+ ...props
743
+ }
744
+ );
745
+ DialogFooter.displayName = "DialogFooter";
746
+ var DialogTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
747
+ DialogPrimitive.Title,
748
+ {
749
+ ref,
750
+ className: cn(
751
+ "text-xl font-semibold leading-none tracking-tight",
752
+ className
753
+ ),
754
+ ...props
755
+ }
756
+ ));
757
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
758
+ var DialogDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
759
+ DialogPrimitive.Description,
760
+ {
761
+ ref,
762
+ className: cn("text-sm text-gray-500", className),
763
+ ...props
764
+ }
765
+ ));
766
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
767
+ var Dialog2 = ({
768
+ trigger = void 0,
769
+ children,
770
+ open,
771
+ onOpenChange,
772
+ hideCloseButton,
773
+ footer,
774
+ title,
775
+ description,
776
+ contentClassName,
777
+ headerClassName,
778
+ titleClassName,
779
+ descriptionClassName,
780
+ footerClassName,
781
+ asChild = true,
782
+ onOpenAutoFocus,
783
+ onCloseAutoFocus,
784
+ onEscapeKeyDown,
785
+ onInteractOutside,
786
+ onPointerDownOutside,
787
+ ...props
788
+ }) => {
789
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogRoot, { ...props, open, onOpenChange, children: [
790
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogTrigger, { asChild, children: trigger }),
791
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
792
+ DialogContent,
793
+ {
794
+ className: contentClassName,
795
+ hideCloseButton,
796
+ onOpenAutoFocus,
797
+ onCloseAutoFocus,
798
+ onEscapeKeyDown,
799
+ onPointerDownOutside,
800
+ onInteractOutside,
801
+ children: [
802
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogHeader, { className: headerClassName, children: [
803
+ title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogTitle, { className: titleClassName, children: title }),
804
+ description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogDescription, { className: descriptionClassName, children: description })
805
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, {}),
806
+ children,
807
+ footer && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogFooter, { className: footerClassName, children: footer })
808
+ ]
809
+ }
810
+ ) })
811
+ ] });
812
+ };
813
+ Dialog2.displayName = DialogPrimitive.Dialog.displayName;
814
+
815
+ // src/components/command/index.tsx
816
+ var import_jsx_runtime16 = require("react/jsx-runtime");
817
+ var Command = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
818
+ import_cmdk.Command,
819
+ {
820
+ ref,
821
+ className: cn(
822
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
823
+ className
824
+ ),
825
+ ...props
826
+ }
827
+ ));
828
+ Command.displayName = import_cmdk.Command.displayName;
829
+ var CommandInput = React7.forwardRef(({ className, CommandInputContainerClassName, loading, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
830
+ "div",
831
+ {
832
+ className: cn(
833
+ "flex items-center border-0 px-3 gap-2",
834
+ CommandInputContainerClassName
835
+ ),
836
+ "cmdk-input-wrapper": "",
837
+ children: [
838
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Loader, { size: 16, colour: "secondary" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
839
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
840
+ import_cmdk.Command.Input,
841
+ {
842
+ ref,
843
+ className: cn(
844
+ "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",
845
+ className
846
+ ),
847
+ disabled: loading,
848
+ ...props
849
+ }
850
+ )
851
+ ]
852
+ }
853
+ ));
854
+ CommandInput.displayName = import_cmdk.Command.Input.displayName;
855
+ var CommandList = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
856
+ import_cmdk.Command.List,
857
+ {
858
+ ref,
859
+ className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
860
+ ...props
861
+ }
862
+ ));
863
+ CommandList.displayName = import_cmdk.Command.List.displayName;
864
+ var CommandEmpty = React7.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
865
+ import_cmdk.Command.Empty,
866
+ {
867
+ ref,
868
+ className: "py-6 text-center text-sm",
869
+ ...props
870
+ }
871
+ ));
872
+ CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
873
+ var CommandGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
874
+ import_cmdk.Command.Group,
875
+ {
876
+ ref,
877
+ className: cn(
878
+ "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",
879
+ className
880
+ ),
881
+ ...props
882
+ }
883
+ ));
884
+ CommandGroup.displayName = import_cmdk.Command.Group.displayName;
885
+ var CommandSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
886
+ import_cmdk.Command.Separator,
887
+ {
888
+ ref,
889
+ className: cn("-mx-1 h-px bg-border", className),
890
+ ...props
891
+ }
892
+ ));
893
+ CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
894
+ var CommandItem = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
895
+ import_cmdk.Command.Item,
896
+ {
897
+ ref,
898
+ className: cn(
899
+ "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",
900
+ className
901
+ ),
902
+ ...props
903
+ }
904
+ ));
905
+ CommandItem.displayName = import_cmdk.Command.Item.displayName;
906
+ var CommandShortcut = ({
907
+ className,
908
+ ...props
909
+ }) => {
910
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
911
+ "span",
912
+ {
913
+ className: cn(
914
+ "ml-auto text-xs tracking-widest text-muted-foreground",
915
+ className
916
+ ),
917
+ ...props
918
+ }
919
+ );
920
+ };
921
+ CommandShortcut.displayName = "CommandShortcut";
922
+
923
+ // src/components/popover/index.tsx
924
+ var React8 = __toESM(require("react"));
925
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
926
+ var import_jsx_runtime17 = require("react/jsx-runtime");
927
+ var PopoverRoot = PopoverPrimitive.Root;
928
+ var PopoverTrigger = PopoverPrimitive.Trigger;
929
+ var PopoverContent = React8.forwardRef(
930
+ ({ className, align = "center", sideOffset = 4, portal = true, ...props }, ref) => portal ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
931
+ PopoverPrimitive.Content,
932
+ {
933
+ ref,
934
+ align,
935
+ sideOffset,
936
+ className: cn(
937
+ "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",
938
+ className
939
+ ),
940
+ onOpenAutoFocus: props.onOpenAutoFocus,
941
+ onCloseAutoFocus: props.onCloseAutoFocus,
942
+ ...props
943
+ }
944
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
945
+ PopoverPrimitive.Content,
946
+ {
947
+ ref,
948
+ align,
949
+ sideOffset,
950
+ className: cn(
951
+ "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",
952
+ className
953
+ ),
954
+ onOpenAutoFocus: props.onOpenAutoFocus,
955
+ onCloseAutoFocus: props.onCloseAutoFocus,
956
+ ...props
957
+ }
958
+ )
959
+ );
960
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
961
+ var Popover = ({
962
+ trigger,
963
+ children,
964
+ open,
965
+ onOpenChange,
966
+ contentClassName,
967
+ asChild = true,
968
+ align,
969
+ side,
970
+ alignOffset,
971
+ sideOffset,
972
+ onOpenAutoFocus,
973
+ onCloseAutoFocus,
974
+ ...props
975
+ }) => {
976
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(PopoverRoot, { ...props, open, onOpenChange, children: [
977
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger, { asChild, children: trigger }),
978
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
979
+ PopoverContent,
980
+ {
981
+ alignOffset,
982
+ sideOffset,
983
+ side,
984
+ align,
985
+ className: contentClassName,
986
+ onOpenAutoFocus,
987
+ onCloseAutoFocus,
988
+ children
989
+ }
990
+ )
991
+ ] });
992
+ };
993
+ Popover.displayName = PopoverPrimitive.Root.displayName;
994
+
995
+ // src/components/scroll-area/index.tsx
996
+ var React9 = __toESM(require("react"));
997
+ var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"));
998
+ var import_jsx_runtime18 = require("react/jsx-runtime");
999
+ var ScrollArea = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1000
+ ScrollAreaPrimitive.Root,
1001
+ {
1002
+ ref,
1003
+ className: cn("relative overflow-hidden", className),
1004
+ ...props,
1005
+ children: [
1006
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
1007
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ScrollBar, {}),
1008
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ScrollAreaPrimitive.Corner, {})
1009
+ ]
1010
+ }
1011
+ ));
1012
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
1013
+ var ScrollBar = React9.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1014
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
1015
+ {
1016
+ ref,
1017
+ orientation,
1018
+ className: cn(
1019
+ "flex touch-none select-none transition-colors",
1020
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
1021
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
1022
+ className
1023
+ ),
1024
+ ...props,
1025
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
1026
+ }
1027
+ ));
1028
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
1029
+
1030
+ // src/components/searcheable/index.tsx
1031
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1032
+ var SearchableTrigger = ({
1033
+ className,
1034
+ value,
1035
+ placeholder = "",
1036
+ status,
1037
+ disabled
1038
+ }) => {
1039
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1040
+ "button",
1041
+ {
1042
+ disabled,
1043
+ className: cn(
1044
+ inputContainerVariants({ status }),
1045
+ "[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",
1046
+ value ? "" : "text-[#79818C]",
1047
+ className
1048
+ ),
1049
+ children: [
1050
+ value ?? placeholder ?? "Select options...",
1051
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1052
+ "svg",
1053
+ {
1054
+ width: "20",
1055
+ height: "20",
1056
+ viewBox: "0 0 20 20",
1057
+ fill: "none",
1058
+ className: " data-[state=open]:goup-rotate-180",
1059
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1060
+ "path",
1061
+ {
1062
+ d: "M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",
1063
+ stroke: "currentColor",
1064
+ strokeWidth: "1.5",
1065
+ strokeMiterlimit: "10",
1066
+ strokeLinecap: "round",
1067
+ strokeLinejoin: "round"
1068
+ }
1069
+ )
1070
+ }
1071
+ )
1072
+ ]
1073
+ }
1074
+ ) });
1075
+ };
1076
+ var Searchable = ({
1077
+ options = [],
1078
+ value,
1079
+ onChange,
1080
+ containerClassName,
1081
+ placeholder,
1082
+ disabled,
1083
+ loading,
1084
+ optionComponent,
1085
+ children,
1086
+ modal = false,
1087
+ hideSearch,
1088
+ className,
1089
+ inputValue,
1090
+ onValueChange,
1091
+ onInputValueChange
1092
+ }) => {
1093
+ const [open, setOpen] = React10.useState(false);
1094
+ const triggerRef = React10.useRef(null);
1095
+ const [width, setWidth] = React10.useState(void 0);
1096
+ React10.useLayoutEffect(() => {
1097
+ if (triggerRef.current) {
1098
+ setWidth(triggerRef.current.clientWidth);
1099
+ }
1100
+ }, [triggerRef.current]);
1101
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(PopoverRoot, { modal, open, onOpenChange: setOpen, children: [
1102
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("w-full", className), ref: triggerRef, children }),
1103
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1104
+ PopoverContent,
1105
+ {
1106
+ portal: !modal,
1107
+ className: "p-0 min-w-[200px]",
1108
+ style: { width },
1109
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Command, { className: "max-h-[270px] pt-3 relative", children: [
1110
+ !hideSearch && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1111
+ CommandInput,
1112
+ {
1113
+ loading,
1114
+ placeholder: placeholder ?? "Search options...",
1115
+ onValueChange: onInputValueChange,
1116
+ value: inputValue,
1117
+ CommandInputContainerClassName: "mx-3 border rounded-md border-[#DEDEDE]"
1118
+ }
1119
+ ),
1120
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ScrollArea, { className: cn("w-full px-0", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CommandList, { children: [
1121
+ !hideSearch && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandEmpty, { children: "No result found." }),
1122
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandGroup, { className: "w-full", children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1123
+ CommandItem,
1124
+ {
1125
+ defaultValue: value?.label,
1126
+ value: option.label,
1127
+ disabled,
1128
+ onSelect: () => {
1129
+ onChange(option);
1130
+ setOpen(false);
1131
+ onValueChange?.(option?.value);
1132
+ },
1133
+ children: !optionComponent ? option.label : optionComponent(option)
1134
+ },
1135
+ option.value
1136
+ )) })
1137
+ ] }) })
1138
+ ] })
1139
+ }
1140
+ )
1141
+ ] });
1142
+ };
1143
+
1144
+ // src/components/select/index.tsx
1145
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1146
+ var Select = ({
1147
+ showAsterisk,
1148
+ label,
1149
+ description,
1150
+ error,
1151
+ hideSearch = true,
1152
+ status,
1153
+ ...props
1154
+ }) => {
1155
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative space-y-1", children: [
1156
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormLabel, { showAsterisk, error, children: label }),
1157
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Searchable, { hideSearch, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1158
+ SearchableTrigger,
1159
+ {
1160
+ disabled: props?.disabled,
1161
+ placeholder: "Select or search email",
1162
+ status,
1163
+ value: props?.value?.label ?? props?.value?.value
1164
+ }
1165
+ ) }),
1166
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
1167
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorMessage, { error })
1168
+ ] });
1169
+ };
1170
+
1171
+ // src/components/country/data.ts
1172
+ var countryData = [
1173
+ {
1174
+ countryCode: "GLOBAL",
1175
+ countryName: "Global",
1176
+ currency: "Dollars",
1177
+ currencyCode: "USD",
1178
+ internetCountryCode: "GLOBAL"
1179
+ },
1180
+ {
1181
+ countryName: "Benin",
1182
+ countryCode: "+229",
1183
+ currency: "West African CFA franc",
1184
+ currencyCode: "XOF",
1185
+ currencyIcon: "Fr",
1186
+ internetCountryCode: "BJ"
1187
+ },
1188
+ {
1189
+ countryName: "Burkina Faso",
1190
+ countryCode: "+226",
1191
+ currency: "West African CFA franc",
1192
+ currencyCode: "XOF",
1193
+ currencyIcon: "Fr",
1194
+ internetCountryCode: "BF"
1195
+ },
1196
+ {
1197
+ countryName: "Cameroon",
1198
+ countryCode: "+237",
1199
+ currency: "Central African CFA franc",
1200
+ currencyCode: "XAF",
1201
+ currencyIcon: "Fr",
1202
+ internetCountryCode: "CM"
1203
+ },
1204
+ {
1205
+ countryName: "Chad",
1206
+ countryCode: "+235",
1207
+ currency: "Central African CFA franc",
1208
+ currencyCode: "XAF",
1209
+ currencyIcon: "Fr",
1210
+ internetCountryCode: "TD"
1211
+ },
1212
+ {
1213
+ countryName: "DR Congo",
1214
+ countryCode: "+243",
1215
+ currency: "Congolese franc",
1216
+ currencyCode: "CDF",
1217
+ currencyIcon: "FC",
1218
+ internetCountryCode: "CD"
1219
+ },
1220
+ {
1221
+ countryName: "Eswatini",
1222
+ countryCode: "+268",
1223
+ currency: "Swazi lilangeni",
1224
+ currencyCode: "SZL",
1225
+ currencyIcon: "L",
1226
+ internetCountryCode: "SZ"
1227
+ },
1228
+ {
1229
+ countryName: "Gabon",
1230
+ countryCode: "+241",
1231
+ currency: "Central African CFA franc",
1232
+ currencyCode: "XAF",
1233
+ currencyIcon: "Fr",
1234
+ internetCountryCode: "GA"
1235
+ },
1236
+ {
1237
+ countryName: "Ghana",
1238
+ countryCode: "+233",
1239
+ currency: "Ghanaian cedi",
1240
+ currencyCode: "GHS",
1241
+ currencyIcon: "\u20B5",
1242
+ internetCountryCode: "GH"
1243
+ },
1244
+ {
1245
+ countryName: "Guinea",
1246
+ countryCode: "+224",
1247
+ currency: "Guinean franc",
1248
+ currencyCode: "GNF",
1249
+ currencyIcon: "Fr",
1250
+ internetCountryCode: "GN"
1251
+ },
1252
+ {
1253
+ countryName: "Ivory Coast",
1254
+ countryCode: "+225",
1255
+ currency: "West African CFA franc",
1256
+ currencyCode: "XOF",
1257
+ currencyIcon: "Fr",
1258
+ internetCountryCode: "CI"
1259
+ },
1260
+ {
1261
+ countryName: "Kenya",
1262
+ countryCode: "+254",
1263
+ currency: "Kenyan shilling",
1264
+ currencyCode: "KES",
1265
+ currencyIcon: "Sh",
1266
+ internetCountryCode: "KE"
1267
+ },
1268
+ {
1269
+ countryName: "Lesotho",
1270
+ countryCode: "+266",
1271
+ currency: "Lesotho loti",
1272
+ currencyCode: "LSL",
1273
+ currencyIcon: "L",
1274
+ internetCountryCode: "LS"
1275
+ },
1276
+ {
1277
+ countryName: "Liberia",
1278
+ countryCode: "+231",
1279
+ currency: "Liberian dollar",
1280
+ currencyCode: "LRD",
1281
+ currencyIcon: "$",
1282
+ internetCountryCode: "LR"
1283
+ },
1284
+ {
1285
+ countryName: "Madagascar",
1286
+ countryCode: "+261",
1287
+ currency: "Malagasy ariary",
1288
+ currencyCode: "MGA",
1289
+ currencyIcon: "Ar",
1290
+ internetCountryCode: "MG"
1291
+ },
1292
+ {
1293
+ countryName: "Malawi",
1294
+ countryCode: "+265",
1295
+ currency: "Malawian kwacha",
1296
+ currencyCode: "MWK",
1297
+ currencyIcon: "MK",
1298
+ internetCountryCode: "MW"
1299
+ },
1300
+ {
1301
+ countryName: "Mali",
1302
+ countryCode: "+223",
1303
+ currency: "West African CFA franc",
1304
+ currencyCode: "XOF",
1305
+ currencyIcon: "Fr",
1306
+ internetCountryCode: "ML"
1307
+ },
1308
+ {
1309
+ countryName: "Mozambique",
1310
+ countryCode: "+258",
1311
+ currency: "Mozambican metical",
1312
+ currencyCode: "MZN",
1313
+ currencyIcon: "MT",
1314
+ internetCountryCode: "MZ"
1315
+ },
1316
+ {
1317
+ countryName: "Namibia",
1318
+ countryCode: "+264",
1319
+ currency: "Namibian dollar",
1320
+ currencyCode: "NAD",
1321
+ currencyIcon: "$",
1322
+ internetCountryCode: "NA"
1323
+ },
1324
+ {
1325
+ countryName: "Niger",
1326
+ countryCode: "+227",
1327
+ currency: "West African CFA franc",
1328
+ currencyCode: "XOF",
1329
+ currencyIcon: "Fr",
1330
+ internetCountryCode: "NE"
1331
+ },
1332
+ {
1333
+ countryName: "Nigeria",
1334
+ countryCode: "+234",
1335
+ currency: "Nigerian naira",
1336
+ currencyCode: "NGN",
1337
+ currencyIcon: "\u20A6",
1338
+ internetCountryCode: "NG"
1339
+ },
1340
+ {
1341
+ countryName: "Republic of the Congo",
1342
+ countryCode: "+242",
1343
+ currency: "Central African CFA franc",
1344
+ currencyCode: "XAF",
1345
+ currencyIcon: "Fr",
1346
+ internetCountryCode: "CG"
1347
+ },
1348
+ {
1349
+ countryName: "Rwanda",
1350
+ countryCode: "+250",
1351
+ currency: "Rwandan franc",
1352
+ currencyCode: "RWF",
1353
+ currencyIcon: "Fr",
1354
+ internetCountryCode: "RW"
1355
+ },
1356
+ {
1357
+ countryName: "Senegal",
1358
+ countryCode: "+221",
1359
+ currency: "West African CFA franc",
1360
+ currencyCode: "XOF",
1361
+ currencyIcon: "Fr",
1362
+ internetCountryCode: "SN"
1363
+ },
1364
+ {
1365
+ countryName: "Seychelles",
1366
+ countryCode: "+248",
1367
+ currency: "Seychellois rupee",
1368
+ currencyCode: "SCR",
1369
+ currencyIcon: "\u20A8",
1370
+ internetCountryCode: "SC"
1371
+ },
1372
+ {
1373
+ countryName: "South Africa",
1374
+ countryCode: "+27",
1375
+ currency: "South African rand",
1376
+ currencyCode: "ZAR",
1377
+ currencyIcon: "R",
1378
+ internetCountryCode: "ZA"
1379
+ },
1380
+ {
1381
+ countryName: "South Sudan",
1382
+ countryCode: "+211",
1383
+ currency: "South Sudanese pound",
1384
+ currencyCode: "SSP",
1385
+ currencyIcon: "\xA3",
1386
+ internetCountryCode: "SS"
1387
+ },
1388
+ {
1389
+ countryName: "Tanzania",
1390
+ countryCode: "+255",
1391
+ currency: "Tanzanian shilling",
1392
+ currencyCode: "TZS",
1393
+ currencyIcon: "Sh",
1394
+ internetCountryCode: "TZ"
1395
+ },
1396
+ {
1397
+ countryName: "Togo",
1398
+ countryCode: "+228",
1399
+ currency: "West African CFA franc",
1400
+ currencyCode: "XOF",
1401
+ currencyIcon: "Fr",
1402
+ internetCountryCode: "TG"
1403
+ },
1404
+ {
1405
+ countryName: "Uganda",
1406
+ countryCode: "+256",
1407
+ currency: "Ugandan shilling",
1408
+ currencyCode: "UGX",
1409
+ currencyIcon: "Sh",
1410
+ internetCountryCode: "UG"
1411
+ },
1412
+ {
1413
+ countryName: "Zambia",
1414
+ countryCode: "+260",
1415
+ currency: "Zambian kwacha",
1416
+ currencyCode: "ZMW",
1417
+ currencyIcon: "ZK",
1418
+ internetCountryCode: "ZM"
1419
+ }
1420
+ ];
1421
+ var getCountryDataMap = () => {
1422
+ const frequency = {};
1423
+ countryData?.forEach((country) => {
1424
+ frequency[country?.internetCountryCode] = country?.countryName;
1425
+ });
1426
+ return frequency;
1427
+ };
1428
+
1429
+ // src/components/phone-input/index.tsx
1430
+ var React11 = __toESM(require("react"));
1431
+ var RPNInput = __toESM(require("react-phone-number-input"));
1432
+ var import_flags = __toESM(require("react-phone-number-input/flags"));
1433
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1434
+ var PhoneInput = React11.forwardRef(
1435
+ ({
1436
+ className,
1437
+ onChange,
1438
+ modal,
1439
+ showAsterisk,
1440
+ label,
1441
+ description,
1442
+ error,
1443
+ defaultCountry = "NG",
1444
+ ...props
1445
+ }, ref) => {
1446
+ const CountrySelectWrapper = (innerProps) => {
1447
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CountrySelect, { ...innerProps, status: props.status, modal });
1448
+ };
1449
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative space-y-1", children: [
1450
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormLabel, { showAsterisk, error, children: label }),
1451
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1452
+ RPNInput.default,
1453
+ {
1454
+ ref,
1455
+ className: cn("flex", className),
1456
+ flagComponent: FlagComponent,
1457
+ countrySelectComponent: CountrySelectWrapper,
1458
+ inputComponent: InputComponent,
1459
+ defaultCountry,
1460
+ onChange: (value) => onChange?.(value),
1461
+ ...props
1462
+ }
1463
+ ),
1464
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
1465
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorMessage, { error })
1466
+ ] });
1467
+ }
1468
+ );
1469
+ PhoneInput.displayName = "PhoneInput";
1470
+ var InputComponent = React11.forwardRef(
1471
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1472
+ Input,
1473
+ {
1474
+ className: cn(
1475
+ "h-full !-mt-0 border-l-0 rounded-l-none flex-1",
1476
+ className
1477
+ ),
1478
+ ...props,
1479
+ ref
1480
+ }
1481
+ )
1482
+ );
1483
+ InputComponent.displayName = "InputComponent";
1484
+ var CountrySelect = ({
1485
+ disabled,
1486
+ value,
1487
+ onChange,
1488
+ options,
1489
+ status,
1490
+ modal
1491
+ }) => {
1492
+ const handleSelect = React11.useCallback(
1493
+ (country) => {
1494
+ onChange(country);
1495
+ },
1496
+ [onChange]
1497
+ );
1498
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(PopoverRoot, { modal, children: [
1499
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PopoverTrigger, { disabled, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1500
+ "div",
1501
+ {
1502
+ className: cn(
1503
+ inputContainerVariants({ status }),
1504
+ "!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"
1505
+ ),
1506
+ children: [
1507
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FlagComponent, { country: value, countryName: value }),
1508
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1509
+ "svg",
1510
+ {
1511
+ className: cn(
1512
+ "-mr-2 h-4 w-4 opacity-50",
1513
+ disabled ? "hidden" : "opacity-100"
1514
+ ),
1515
+ width: "20",
1516
+ height: "20",
1517
+ viewBox: "0 0 20 20",
1518
+ fill: "none",
1519
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1520
+ "path",
1521
+ {
1522
+ d: "M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",
1523
+ stroke: "#959595",
1524
+ strokeWidth: "1.5",
1525
+ strokeMiterlimit: "10",
1526
+ strokeLinecap: "round",
1527
+ strokeLinejoin: "round"
1528
+ }
1529
+ )
1530
+ }
1531
+ )
1532
+ ]
1533
+ }
1534
+ ) }),
1535
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PopoverContent, { portal: !modal, className: "w-[200px] md:w-[300px] p-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Command, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CommandList, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ScrollArea, { className: "h-72", children: [
1536
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CommandInput, { placeholder: "Search country..." }),
1537
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CommandEmpty, { children: "No country found." }),
1538
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CommandGroup, { children: options.filter((x) => x.value).map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1539
+ CommandItem,
1540
+ {
1541
+ className: "gap-2",
1542
+ onSelect: () => handleSelect(option.value),
1543
+ children: [
1544
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1545
+ FlagComponent,
1546
+ {
1547
+ country: option.value,
1548
+ countryName: option.label
1549
+ }
1550
+ ),
1551
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "flex-1 text-sm", children: option.label }),
1552
+ option.value && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[#191919]/50 text-sm dark:text-white", children: `+${RPNInput.getCountryCallingCode(option.value)}` }),
1553
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1554
+ "svg",
1555
+ {
1556
+ width: "16",
1557
+ height: "16",
1558
+ viewBox: "0 0 16 16",
1559
+ fill: "none",
1560
+ className: cn(
1561
+ "ml-auto",
1562
+ option.value === value ? "opacity-100" : "opacity-0"
1563
+ ),
1564
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1565
+ "path",
1566
+ {
1567
+ d: "M4 8.00008L6.66353 10.6636L12 5.33655",
1568
+ stroke: "#959595",
1569
+ strokeWidth: "1.06667",
1570
+ strokeLinecap: "round",
1571
+ strokeLinejoin: "round"
1572
+ }
1573
+ )
1574
+ }
1575
+ )
1576
+ ]
1577
+ },
1578
+ `${option.value}-${option.label}`
1579
+ )) })
1580
+ ] }) }) }) })
1581
+ ] });
1582
+ };
1583
+ var FlagComponent = ({
1584
+ country,
1585
+ countryName,
1586
+ className
1587
+ }) => {
1588
+ const Flag = import_flags.default[country];
1589
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1590
+ "span",
1591
+ {
1592
+ className: cn(
1593
+ "bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",
1594
+ className
1595
+ ),
1596
+ children: Flag && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Flag, { title: countryName })
1597
+ }
1598
+ );
1599
+ };
1600
+ FlagComponent.displayName = "FlagComponent";
1601
+
1602
+ // src/components/country/index.tsx
1603
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1604
+ var countryMap = getCountryDataMap();
1605
+ var CountryTrigger = ({
1606
+ className,
1607
+ value,
1608
+ placeholder = "",
1609
+ status,
1610
+ disabled
1611
+ }) => {
1612
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1613
+ "button",
1614
+ {
1615
+ disabled,
1616
+ className: cn(
1617
+ inputContainerVariants({ status }),
1618
+ "[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",
1619
+ value ? "" : "text-[#79818C]",
1620
+ className
1621
+ ),
1622
+ children: [
1623
+ value ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex gap-2", children: [
1624
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1625
+ FlagComponent,
1626
+ {
1627
+ country: value,
1628
+ countryName: value,
1629
+ className: "ml-1 !w-6 h-5"
1630
+ }
1631
+ ),
1632
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "", children: [
1633
+ " ",
1634
+ countryMap[value]
1635
+ ] })
1636
+ ] }) : placeholder ?? "Select options...",
1637
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1638
+ "svg",
1639
+ {
1640
+ width: "20",
1641
+ height: "20",
1642
+ viewBox: "0 0 20 20",
1643
+ fill: "none",
1644
+ className: " data-[state=open]:goup-rotate-180",
1645
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1646
+ "path",
1647
+ {
1648
+ d: "M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",
1649
+ stroke: "currentColor",
1650
+ strokeWidth: "1.5",
1651
+ strokeMiterlimit: "10",
1652
+ strokeLinecap: "round",
1653
+ strokeLinejoin: "round"
1654
+ }
1655
+ )
1656
+ }
1657
+ )
1658
+ ]
1659
+ }
1660
+ ) });
1661
+ };
1662
+ var Country = ({
1663
+ hideSearch = true,
1664
+ showAsterisk,
1665
+ label,
1666
+ description,
1667
+ error,
1668
+ ...props
1669
+ }) => {
1670
+ const options = countryData?.map((country) => ({
1671
+ value: country?.internetCountryCode,
1672
+ label: country?.countryName,
1673
+ ...country
1674
+ }));
1675
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "relative space-y-1", children: [
1676
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormLabel, { showAsterisk, error, children: label }),
1677
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1678
+ Searchable,
1679
+ {
1680
+ options,
1681
+ hideSearch,
1682
+ optionComponent: (arg) => {
1683
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "w-full flex items-center gap-2", children: [
1684
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1685
+ FlagComponent,
1686
+ {
1687
+ country: arg?.internetCountryCode,
1688
+ countryName: arg?.label,
1689
+ className: "ml-2 !w-6 !h-5"
1690
+ }
1691
+ ),
1692
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "flex-1 text-sm", children: arg?.label })
1693
+ ] });
1694
+ },
1695
+ ...props,
1696
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1697
+ CountryTrigger,
1698
+ {
1699
+ value: props?.value?.value,
1700
+ status: props?.status,
1701
+ placeholder: props?.placeholder ?? " Select Country"
1702
+ }
1703
+ )
1704
+ }
1705
+ ),
1706
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
1707
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorMessage, { error })
1708
+ ] });
1709
+ };
1710
+
1711
+ // src/components/otp/index.tsx
1712
+ var import_react_otp_input = __toESM(require("react-otp-input"));
1713
+ var import_class_variance_authority5 = require("class-variance-authority");
1714
+ var import_react5 = require("react");
1715
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1716
+ var otpInputVariants = (0, import_class_variance_authority5.cva)(
1717
+ "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",
1718
+ {
1719
+ variants: {
1720
+ status: {
1721
+ 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]",
1722
+ error: "placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",
1723
+ loading: "placeholder:text-[#C4C4C4]"
1724
+ }
1725
+ },
1726
+ defaultVariants: {
1727
+ status: "default"
1728
+ }
1729
+ }
1730
+ );
1731
+ var OTPInput = ({
1732
+ numInputs = 4,
1733
+ inputStyle,
1734
+ containerStyle,
1735
+ placeholder = "-",
1736
+ status,
1737
+ ...props
1738
+ }) => {
1739
+ const placeholderValue = (0, import_react5.useMemo)(() => {
1740
+ if (placeholder) return placeholder;
1741
+ const numInputArr = new Array(numInputs).fill("");
1742
+ const result = numInputArr.reduce((accumulator, currentValue) => {
1743
+ return accumulator += currentValue;
1744
+ }, "");
1745
+ return result;
1746
+ }, [numInputs, placeholder]);
1747
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1748
+ import_react_otp_input.default,
1749
+ {
1750
+ numInputs,
1751
+ placeholder: placeholderValue,
1752
+ containerStyle: cn("w-full", containerStyle),
1753
+ inputStyle: cn(otpInputVariants({ status }), inputStyle),
1754
+ renderInput: (props2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { ...props2 }),
1755
+ ...props
1756
+ }
1757
+ );
1758
+ };
1759
+ // Annotate the CommonJS export names for ESM import in node:
1760
+ 0 && (module.exports = {
1761
+ Button,
1762
+ Country,
1763
+ Dialog,
1764
+ FlagComponent,
1765
+ FormLabel,
1766
+ Input,
1767
+ Loader,
1768
+ OTPInput,
1769
+ PasswordInput,
1770
+ PhoneInput,
1771
+ Select,
1772
+ Textarea
1773
+ });