@6thbridge/hexa 0.0.3 → 0.0.4
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/.turbo/turbo-lint.log +1 -1
- package/dist/index.d.mts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/output.css +23 -14
- package/package.json +1 -1
- package/tsconfig.json +1 -2
- package/tsconfig.node.json +0 -10
package/dist/index.mjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import Ye from"react";import*as he from"react";import*as ce from"@radix-ui/react-label";import{cva as je}from"class-variance-authority";import{clsx as Xe}from"clsx";import{twMerge as Ke}from"tailwind-merge";function r(...t){return Ke(Xe(t))}import{jsx as Je}from"react/jsx-runtime";var $e=je("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pe=he.forwardRef(({className:t,...e},o)=>Je(ce.Root,{ref:o,className:r($e(),t),...e}));pe.displayName=ce.Root.displayName;import{jsx as be,jsxs as Qe}from"react/jsx-runtime";var A=Ye.forwardRef(({className:t,children:e,showAsterisk:o,error:a,...n},s)=>be(pe,{ref:s,className:r(a&&"text-red-500",t),...n,children:o?Qe("p",{children:[e,be("span",{className:"text-red-500",children:"*"})]}):e}));A.displayName="FormLabel";import{jsx as ye,jsxs as et}from"react/jsx-runtime";var z=({size:t=16,colour:e="primary"})=>et("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[ye("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),ye("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:e==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as ve from"react";import{Slot as tt}from"@radix-ui/react-slot";import{cva as ot}from"class-variance-authority";import{Fragment as Ce,jsx as O,jsxs as rt}from"react/jsx-runtime";var at=ot("overflow-hidden isolate relative inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border-blue-950 text-blue-950 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","primary-outlined":" text-primary-main bg-primary-main/20 hover:opacity-80 disabled:opacity-60 !font-medium","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-blue-950 font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] text-[0.75rem] leading-[1rem] font-medium rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),we=({className:t,variant:e="primary",size:o,asChild:a=!1,isLoading:n=!1,leftNode:s,rightNode:p,LoaderSize:i,ref:b,...m})=>{let c=a?tt:"button",{children:u,disabled:N,...M}=m,V=ve.useRef(null);return O(c,{className:r(at({variant:e,size:o,className:t})),ref:V||b,disabled:N||n,...M,children:O("div",{className:"flex font-medium justify-center items-center gap-2",children:n?O(Ce,{children:O("span",{className:"mx-auto",children:O(z,{size:i})})}):rt(Ce,{children:[s,u,p]})})})};we.displayName="Button";import{cva as me}from"class-variance-authority";import nt from"react";import{jsx as it}from"react/jsx-runtime";var W=nt.forwardRef(({className:t,children:e,error:o,...a},n)=>{let s=o??e;return s?it("p",{ref:n,className:r("text-xs font-normal text-[#F04248]",t),...a,children:s}):null});W.displayName="ErrorMessage";import st from"react";import{jsx as lt}from"react/jsx-runtime";var B=st.forwardRef(({className:t,...e},o)=>lt("p",{ref:o,className:r("text-sm text-[#8E98A8",t),...e}));B.displayName="FormDescription";import{jsx as x,jsxs as Pe}from"react/jsx-runtime";var dt=me("!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"}}),Ne=({className:t,status:e,type:o,ref:a,...n})=>x("input",{type:o,className:r(dt({status:e}),t),ref:a,...n});Ne.displayName="BaseInnerInput";var w=me("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Re=me("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"}}),T=({className:t,status:e="default",disabled:o,error:a,isLoading:n,sideNodeClassName:s,showAsterisk:p,label:i,description:b,ref:m,...c})=>{let u=e;return a&&(u="error"),n&&(u="loading"),o&&(u="prefilled"),Pe("div",{className:"relative space-y-1",children:[x(A,{showAsterisk:p,error:a,children:i}),Pe("div",{className:r(w({status:u}),c.leftNode||c.rightNode?"p-0":"",t),children:[c.leftNode?x("div",{className:r(Re({status:u,side:"left"}),s),children:c.leftNode}):null,x(Ne,{ref:m,disabled:n||o,className:c.leftNode||c.rightNode?"!px-3 !py-2":"",...c}),c.rightNode?x("div",{className:r(Re({status:u,side:"right"}),s),children:c.rightNode}):null]}),x(B,{className:"text-gray-400 text-sm !font-normal",children:b}),x(W,{error:a})]})};T.displayName="Input";import{useState as mt}from"react";import{jsx as xe,jsxs as ct}from"react/jsx-runtime";var ke=()=>ct("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[xe("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"}),xe("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as De,jsxs as pt}from"react/jsx-runtime";var Ie=()=>pt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[De("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"}),De("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as H}from"react/jsx-runtime";var Le=({...t})=>{let[e,o]=mt(!1);return H(T,{sideNodeClassName:"!border-l-0",rightNode:e?H("button",{type:"button",onClick:()=>o(a=>!a),children:H(ke,{})}):H("button",{type:"button",onClick:()=>o(a=>!a),children:H(Ie,{})}),type:e?"text":"password",...t})};Le.displayName="PasswordInput";import{cva as ut}from"class-variance-authority";import{jsx as te,jsxs as ft}from"react/jsx-runtime";var Ao=ut("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"}}),Se=({className:t,status:e="default",disabled:o,error:a,isLoading:n,showAsterisk:s,label:p,description:i,...b})=>{let m=e;return a&&(m="error"),n&&(m="loading"),o&&(m="prefilled"),ft("div",{className:"relative space-y-1",children:[te(A,{showAsterisk:s,error:a,children:p}),te("textarea",{className:r("min-h-[80px]",w({status:m}),t),disabled:n||o,...b}),te(B,{className:"text-gray-400 text-sm !font-normal",children:i}),te(W,{error:a})]})};Se.displayName="Textarea";import*as D from"react";import*as R from"react";import{Command as g}from"cmdk";import{Search as Ct}from"lucide-react";import*as U from"react";import*as l from"@radix-ui/react-dialog";import{jsx as Ae,jsxs as gt}from"react/jsx-runtime";var Te=()=>gt("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"stroke-[#232528]]",children:[Ae("path",{d:"M5.00098 5L19 18.9991",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Ae("path",{d:"M4.99996 18.9991L18.999 5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{Fragment as yt,jsx as f,jsxs as E}from"react/jsx-runtime";var ht=l.Root,bt=l.Trigger,Ee=l.Portal,Fe=U.forwardRef(({className:t,...e},o)=>f(l.Overlay,{ref:o,className:r("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));Fe.displayName=l.Overlay.displayName;var ue=U.forwardRef(({className:t,hideCloseButton:e,children:o,...a},n)=>E(Ee,{children:[f(Fe,{}),E(l.Content,{ref:n,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",t),...a,children:[o,!e&&E(l.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:[f(Te,{}),f("span",{className:"sr-only",children:"Close"})]})]})]}));ue.displayName=l.Content.displayName;var Me=({className:t,...e})=>f("div",{className:r("flex flex-col space-y-1.5 text-left",t),...e});Me.displayName="DialogHeader";var Ve=({className:t,...e})=>f("div",{className:r("flex flex-row justify-end sm:space-x-2",t),...e});Ve.displayName="DialogFooter";var ze=U.forwardRef(({className:t,...e},o)=>f(l.Title,{ref:o,className:r("text-lg font-semibold leading-none tracking-tight",t),...e}));ze.displayName=l.Title.displayName;var Oe=U.forwardRef(({className:t,...e},o)=>f(l.Description,{ref:o,className:r("text-sm text-muted-foreground",t),...e}));Oe.displayName=l.Description.displayName;var We=({trigger:t,children:e,open:o,onOpenChange:a,hideCloseButton:n,footer:s,title:p,description:i,contentClassName:b,headerClassName:m,titleClassName:c,descriptionClassName:u,footerClassName:N,asChild:M=!0,onOpenAutoFocus:V,onCloseAutoFocus:se,onEscapeKeyDown:ee,onInteractOutside:L,onPointerDownOutside:le,...de})=>E(ht,{...de,open:o,onOpenChange:a,children:[f(bt,{asChild:M,children:t}),f(Ee,{children:E(ue,{className:b,hideCloseButton:n,onOpenAutoFocus:V,onCloseAutoFocus:se,onEscapeKeyDown:ee,onPointerDownOutside:le,onInteractOutside:L,children:[p||i?E(Me,{className:m,children:[p&&f(ze,{className:c,children:p}),i&&f(Oe,{className:u,children:i})]}):f(yt,{}),e,s&&f(Ve,{className:N,children:s})]})})]});We.displayName=l.Dialog.displayName;import{Fragment as Zo,jsx as C,jsxs as Rt}from"react/jsx-runtime";var G=R.forwardRef(({className:t,...e},o)=>C(g,{ref:o,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));G.displayName=g.displayName;var q=R.forwardRef(({className:t,CommandInputContainerClassName:e,loading:o,...a},n)=>Rt("div",{className:r("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[o?C(z,{size:16,colour:"secondary"}):C(Ct,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),C(g.Input,{ref:n,className:r("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:o,...a})]}));q.displayName=g.Input.displayName;var _=R.forwardRef(({className:t,...e},o)=>C(g.List,{ref:o,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));_.displayName=g.List.displayName;var Z=R.forwardRef((t,e)=>C(g.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));Z.displayName=g.Empty.displayName;var X=R.forwardRef(({className:t,...e},o)=>C(g.Group,{ref:o,className:r("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}));X.displayName=g.Group.displayName;var vt=R.forwardRef(({className:t,...e},o)=>C(g.Separator,{ref:o,className:r("-mx-1 h-px bg-border",t),...e}));vt.displayName=g.Separator.displayName;var K=R.forwardRef(({className:t,...e},o)=>C(g.Item,{ref:o,className:r("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}));K.displayName=g.Item.displayName;var wt=({className:t,...e})=>C("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});wt.displayName="CommandShortcut";import*as Be from"react";import*as y from"@radix-ui/react-popover";import{jsx as j,jsxs as Nt}from"react/jsx-runtime";var $=y.Root,k=y.Trigger,F=Be.forwardRef(({className:t,align:e="center",sideOffset:o=4,portal:a=!0,...n},s)=>a?j(y.Portal,{children:j(y.Content,{ref:s,align:e,sideOffset:o,className:r("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:n.onOpenAutoFocus,onCloseAutoFocus:n.onCloseAutoFocus,...n})}):j(y.Content,{ref:s,align:e,sideOffset:o,className:r("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}));F.displayName=y.Content.displayName;var Pt=({trigger:t,children:e,open:o,onOpenChange:a,contentClassName:n,asChild:s=!0,align:p,side:i,alignOffset:b,sideOffset:m,onOpenAutoFocus:c,onCloseAutoFocus:u,...N})=>Nt($,{...N,open:o,onOpenChange:a,children:[j(k,{asChild:s,children:t}),j(F,{alignOffset:b,sideOffset:m,side:i,align:p,className:n,onOpenAutoFocus:c,onCloseAutoFocus:u,children:e})]});Pt.displayName=y.Root.displayName;import*as fe from"react";import*as h from"@radix-ui/react-scroll-area";import{jsx as J,jsxs as xt}from"react/jsx-runtime";var Y=fe.forwardRef(({className:t,children:e,...o},a)=>xt(h.Root,{ref:a,className:r("relative overflow-hidden",t),...o,children:[J(h.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),J(He,{}),J(h.Corner,{})]}));Y.displayName=h.Root.displayName;var He=fe.forwardRef(({className:t,orientation:e="vertical",...o},a)=>J(h.ScrollAreaScrollbar,{ref:a,orientation:e,className:r("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),...o,children:J(h.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));He.displayName=h.ScrollAreaScrollbar.displayName;import{jsx as v,jsxs as oe}from"react/jsx-runtime";var Ue=({className:t,value:e,placeholder:o="",status:a,disabled:n})=>v(k,{asChild:!0,disabled:n,children:oe("button",{disabled:n,className:r(w({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e??o??"Select options...",v("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:v("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"})})]})}),ae=({options:t=[],value:e,onChange:o,containerClassName:a,placeholder:n,disabled:s,loading:p,optionComponent:i,children:b,modal:m,hideSearch:c,className:u,inputValue:N,onValueChange:M,onInputValueChange:V})=>{let[se,ee]=D.useState(!1),L=D.useRef(null),[le,de]=D.useState(void 0);return D.useLayoutEffect(()=>{L.current&&de(L.current.clientWidth)},[L.current]),oe($,{modal:m,open:se,onOpenChange:ee,children:[v("div",{className:r("w-full",u),ref:L,children:b}),v(F,{portal:m,className:"p-0 min-w-[200px]",style:{width:le},children:oe(G,{className:"max-h-[270px] pt-3 relative",children:[!c&&v(q,{loading:p,placeholder:n??"Search options...",onValueChange:V,value:N,CommandInputContainerClassName:"mx-3 border rounded-md border-[#DEDEDE]"}),v(Y,{className:r("w-full px-0",a),children:oe(_,{children:[!c&&v(Z,{children:"No result found."}),v(X,{className:"w-full",children:t?.map(S=>v(K,{defaultValue:e?.label,value:S.label,disabled:s,onSelect:()=>{o(S),ee(!1),M?.(S?.value)},children:i?i(S):S.label},S.value))})]})})]})})]})};import{jsx as Ge}from"react/jsx-runtime";var kt=({hideSearch:t=!0,status:e,...o})=>Ge(ae,{hideSearch:t,...o,children:Ge(Ue,{disabled:o?.disabled,placeholder:"Select or search email",status:e,value:o?.value?.label??o?.value?.value})});var ge=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",currencyIcon:"\u{1F30E}",flag:"",flagURL:"",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",flag:"\u{1F1E7}\u{1F1EF}",flagURL:{png:"https://flagcdn.com/w320/bj.png",svg:"https://flagcdn.com/bj.svg",alt:"The flag of Benin features a green vertical band on its hoist side that takes up about two-fifth the width of the field and two equal horizontal bands of yellow and red adjoining the vertical band."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ",countryId:"659cb4624b4e7400b1c12efc"},{countryName:"Burkina Faso",countryCode:"+226",flag:"\u{1F1E7}\u{1F1EB}",flagURL:{png:"https://flagcdn.com/w320/bf.png",svg:"https://flagcdn.com/bf.svg",alt:"The flag of Burkina Faso features two equal horizontal bands of red and green, with a yellow five-pointed star in the center."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF",countryId:"659cb4624b4e7400b1c12f0d"},{countryName:"Cameroon",countryCode:"+237",flag:"\u{1F1E8}\u{1F1F2}",flagURL:{png:"https://flagcdn.com/w320/cm.png",svg:"https://flagcdn.com/cm.svg",alt:"The flag of Cameroon is composed of three equal vertical bands of green, red and yellow, with a yellow five-pointed star in the center."},currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM",countryId:"659cb4624b4e7400b1c12ee6"},{countryName:"Chad",countryCode:"+235",flag:"\u{1F1F9}\u{1F1E9}",flagURL:{png:"https://flagcdn.com/w320/td.png",svg:"https://flagcdn.com/td.svg",alt:"The flag of Chad is composed of three equal vertical bands of blue, gold and red."},currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD",countryId:"659cb4624b4e7400b1c12ea8"},{countryName:"DR Congo",countryCode:"+243",flag:"\u{1F1E8}\u{1F1E9}",flagURL:{png:"https://flagcdn.com/w320/cd.png",svg:"https://flagcdn.com/cd.svg",alt:"The flag of the Democratic Republic of the Congo has a sky-blue field with a yellow-edged red diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. A large five-pointed yellow star is situated above the diagonal band on the upper hoist side of the field."},currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD",countryId:"659cb4624b4e7400b1c12ee5"},{countryName:"Eswatini",countryCode:"+268",flag:"\u{1F1F8}\u{1F1FF}",flagURL:{png:"https://flagcdn.com/w320/sz.png",svg:"https://flagcdn.com/sz.svg",alt:"The flag of Eswatini is composed of three horizontal bands \u2014 a large central yellow-edged red band, and a light blue band above and beneath the red band. The red band is three times the height of the blue bands and bears a centered emblem made up of a large black and white Nguni shield covering two spears and a staff decorated with feather tassels, all placed horizontally."},currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ",countryId:"659cb4624b4e7400b1c12edc"},{countryName:"Gabon",countryCode:"+241",flag:"\u{1F1EC}\u{1F1E6}",flagURL:{png:"https://flagcdn.com/w320/ga.png",svg:"https://flagcdn.com/ga.svg",alt:"The flag of Gabon is composed of three equal horizontal bands of green, yellow and blue."},currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA",countryId:"659cb4624b4e7400b1c12f51"},{countryName:"Ghana",countryCode:"+233",flag:"\u{1F1EC}\u{1F1ED}",flagURL:{png:"https://flagcdn.com/w320/gh.png",svg:"https://flagcdn.com/gh.svg",alt:"The flag of Ghana is composed of three equal horizontal bands of red, gold and green, with a five-pointed black star centered in the gold band."},currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH",countryId:"659cb4624b4e7400b1c12e75"},{countryName:"Guinea",countryCode:"+224",flag:"\u{1F1EC}\u{1F1F3}",flagURL:{png:"https://flagcdn.com/w320/gn.png",svg:"https://flagcdn.com/gn.svg",alt:"The flag of Guinea is composed of three equal vertical bands of red, yellow and green."},currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN",countryId:"659cb4624b4e7400b1c12f3f"},{countryName:"Ivory Coast",countryCode:"+225",flag:"\u{1F1E8}\u{1F1EE}",flagURL:{png:"https://flagcdn.com/w320/ci.png",svg:"https://flagcdn.com/ci.svg",alt:"The flag of Ivory Coast is composed of three equal vertical bands of orange, white and green."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI",countryId:"659cb4624b4e7400b1c12f5f"},{countryName:"Kenya",countryCode:"+254",flag:"\u{1F1F0}\u{1F1EA}",flagURL:{png:"https://flagcdn.com/w320/ke.png",svg:"https://flagcdn.com/ke.svg",alt:"The flag of Kenya is composed of three equal horizontal bands of black, red with white top and bottom edges, and green. An emblem comprising a red, black and white Maasai shield covering two crossed white spears is superimposed at the center of the field."},currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE",countryId:"659cb4624b4e7400b1c12f3c"},{countryName:"Lesotho",countryCode:"+266",flag:"\u{1F1F1}\u{1F1F8}",flagURL:{png:"https://flagcdn.com/w320/ls.png",svg:"https://flagcdn.com/ls.svg",alt:"The flag of Lesotho is composed of three horizontal bands of blue, white and green in the ratio of 3:4:3. A black mokorotlo \u2014 a Basotho hat \u2014 is centered in the white band."},currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS",countryId:"659cb4624b4e7400b1c12f02"},{countryName:"Liberia",countryCode:"+231",flag:"\u{1F1F1}\u{1F1F7}",flagURL:{png:"https://flagcdn.com/w320/lr.png",svg:"https://flagcdn.com/lr.svg",alt:"The flag of Liberia is composed of eleven equal horizontal bands of red alternating with white. A blue square bearing a five-pointed white star is superimposed in the canton."},currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR",countryId:"659cb4624b4e7400b1c12ec0"},{countryName:"Madagascar",countryCode:"+261",flag:"\u{1F1F2}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/mg.png",svg:"https://flagcdn.com/mg.svg",alt:"The flag of Madagascar features a white vertical band on the hoist side that takes up about one-third the width of the field, and two equal horizontal bands of red and green adjoining the vertical band."},currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG",countryId:"659cb4624b4e7400b1c12ede"},{countryName:"Malawi",countryCode:"+265",flag:"\u{1F1F2}\u{1F1FC}",flagURL:{png:"https://flagcdn.com/w320/mw.png",svg:"https://flagcdn.com/mw.svg",alt:"The flag of Malawi is composed of three equal horizontal bands of black, red and green. The top half of a red sun with thirty-one visible rays is centered in the black band."},currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW",countryId:"659cb4624b4e7400b1c12f24"},{countryName:"Mali",countryCode:"+223",flag:"\u{1F1F2}\u{1F1F1}",flagURL:{png:"https://flagcdn.com/w320/ml.png",svg:"https://flagcdn.com/ml.svg",alt:"The flag of Mali is composed of three equal vertical bands of green, yellow and red."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML",countryId:"659cb4624b4e7400b1c12f25"},{countryName:"Mozambique",countryCode:"+258",flag:"\u{1F1F2}\u{1F1FF}",flagURL:{png:"https://flagcdn.com/w320/mz.png",svg:"https://flagcdn.com/mz.svg",alt:"The flag of Mozambique is composed of three equal horizontal bands of teal, black with white top and bottom edges, and yellow. A red isosceles triangle spanning about two-fifth the width of the field is superimposed on the hoist side with its base on the hoist end. This triangle bears a crossed rifle and hoe in black superimposed on an open white book which is superimposed on a five-pointed yellow star."},currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ",countryId:"659cb4624b4e7400b1c12f22"},{countryName:"Namibia",countryCode:"+264",flag:"\u{1F1F3}\u{1F1E6}",flagURL:{png:"https://flagcdn.com/w320/na.png",svg:"https://flagcdn.com/na.svg",alt:"The flag of Namibia features a white-edged red diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a blue and green triangle respectively. A gold sun with twelve triangular rays is situated on the hoist side of the upper triangle."},currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA",countryId:"659cb4624b4e7400b1c12e74"},{countryName:"Niger",countryCode:"+227",flag:"\u{1F1F3}\u{1F1EA}",flagURL:{png:"https://flagcdn.com/w320/ne.png",svg:"https://flagcdn.com/ne.svg",alt:"The flag of Niger features three equal horizontal bands of orange, white and green, with an orange circle centered in the white band."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE",countryId:"659cb4624b4e7400b1c12efb"},{countryName:"Nigeria",countryCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/ng.png",svg:"https://flagcdn.com/ng.svg",alt:"The flag of Nigeria is composed of three equal vertical bands of green, white and green."},currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG",countryId:"659cb4624b4e7400b1c12eae"},{countryName:"Republic of the Congo",countryCode:"+242",flag:"\u{1F1E8}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/cg.png",svg:"https://flagcdn.com/cg.svg",alt:"The flag of the Republic of the Congo features a yellow diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a green and red triangle respectively."},currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG",countryId:"659cb4624b4e7400b1c12e8b"},{countryName:"Rwanda",countryCode:"+250",flag:"\u{1F1F7}\u{1F1FC}",flagURL:{png:"https://flagcdn.com/w320/rw.png",svg:"https://flagcdn.com/rw.svg",alt:"The flag of Rwanda is composed of three horizontal bands of light blue, yellow and green. The light blue band is twice the height of the other two bands and bears a yellow sun with twenty-four rays on its fly side."},currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW",countryId:"659cb4624b4e7400b1c12ee4"},{countryName:"Senegal",countryCode:"+221",flag:"\u{1F1F8}\u{1F1F3}",flagURL:{png:"https://flagcdn.com/w320/sn.png",svg:"https://flagcdn.com/sn.svg",alt:"The flag of Senegal is composed of three equal vertical bands of green, golden-yellow and red, with a five-pointed green star centered in the golden-yellow band."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN",countryId:"659cb4624b4e7400b1c12ebb"},{countryName:"Seychelles",countryCode:"+248",flag:"\u{1F1F8}\u{1F1E8}",flagURL:{png:"https://flagcdn.com/w320/sc.png",svg:"https://flagcdn.com/sc.svg",alt:"The flag of Seychelles is composed of five broadening oblique bands of blue, yellow, red, white and green, which extend from the hoist side of the bottom edge to the top and fly edges of the field."},currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC",countryId:"659cb4624b4e7400b1c12e7d"},{countryName:"South Africa",countryCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",flagURL:{png:"https://flagcdn.com/w320/za.png",svg:"https://flagcdn.com/za.svg",alt:"The flag of South Africa is composed of two equal horizontal bands of red and blue, with a yellow-edged black isosceles triangle superimposed on the hoist side of the field. This triangle has its base centered on the hoist end, spans about two-fifth the width and two-third the height of the field, and is enclosed on its sides by the arms of a white-edged green horizontally oriented Y-shaped band which extends along the boundary of the red and blue bands to the fly end of the field."},currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA",countryId:"659cb4624b4e7400b1c12ec1"},{countryName:"South Sudan",countryCode:"+211",flag:"\u{1F1F8}\u{1F1F8}",flagURL:{png:"https://flagcdn.com/w320/ss.png",svg:"https://flagcdn.com/ss.svg",alt:"The flag of South Sudan is composed of three equal horizontal bands of black, red with white top and bottom edges, and green. A blue equilateral triangle which spans about two-fifth the width of the field is superimposed on the hoist side with its base on the hoist end of the field. At the center of this triangle is a five-pointed yellow star."},currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS",countryId:"659cb4624b4e7400b1c12e76"},{countryName:"Tanzania",countryCode:"+255",flag:"\u{1F1F9}\u{1F1FF}",flagURL:{png:"https://flagcdn.com/w320/tz.png",svg:"https://flagcdn.com/tz.svg",alt:"The flag of Tanzania features a yellow-edged black diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a green and light blue triangle respectively."},currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ",countryId:"659cb4624b4e7400b1c12eb1"},{countryName:"Togo",countryCode:"+228",flag:"\u{1F1F9}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/tg.png",svg:"https://flagcdn.com/tg.svg",alt:"The flag of Togo is composed of five equal horizontal bands of green alternating with yellow. A red square bearing a five-pointed white star is superimposed in the canton."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG",countryId:"659cb4624b4e7400b1c12ef2"},{countryName:"Uganda",countryCode:"+256",flag:"\u{1F1FA}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/ug.png",svg:"https://flagcdn.com/ug.svg",alt:"The flag of Uganda is composed of six equal horizontal bands of black, yellow, red, black, yellow and red. A white circle bearing a hoist-side facing grey red-crested crane is superimposed in the center of the field."},currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG",countryId:"659cb4624b4e7400b1c12edd"},{countryName:"Zambia",countryCode:"+260",flag:"\u{1F1FF}\u{1F1F2}",flagURL:{png:"https://flagcdn.com/w320/zm.png",svg:"https://flagcdn.com/zm.svg",alt:"The flag of Zambia has a green field, on the fly side of which is a soaring orange African fish eagle above a rectangular area divided into three equal vertical bands of red, black and orange."},currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM",countryId:"659cb4624b4e7400b1c12f2b"}],qe=()=>{let t={};return ge?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};import*as Q from"react";import*as ne from"react-phone-number-input";import Dt from"react-phone-number-input/flags";import{jsx as d,jsxs as re}from"react/jsx-runtime";var _e=Q.forwardRef(({className:t,onChange:e,modal:o,defaultCountry:a="NG",...n},s)=>{let p=i=>d(It,{...i,status:n.status,modal:o});return d(ne.default,{ref:s,className:r("flex",t),flagComponent:I,countrySelectComponent:p,inputComponent:Ze,defaultCountry:a,onChange:i=>e?.(i),...n})});_e.displayName="PhoneInput";var Ze=Q.forwardRef(({className:t,...e},o)=>d(T,{className:r("h-full !-mt-0 border-l-0 rounded-l-none flex-1",t),...e,ref:o}));Ze.displayName="InputComponent";var It=({disabled:t,value:e,onChange:o,options:a,status:n,modal:s})=>{let p=Q.useCallback(i=>{o(i)},[o]);return re($,{modal:s,children:[d(k,{disabled:t,children:re("div",{className:r(w({status:n}),"!border-r-0 transition justify-center items-center border disabled:text-base-500 disabled:border-base-300 border-status-neutral-fill dark:border-[#9299A2] text-texts-50 focus:ring-offset-1 focus:ring-offset-base-100 focus-visible:!ring-offset-base-100 focus-visible:ring-2 focus-visible:!ring-accent focus:ring-accent focus:ring-2 flex gap-1 h-full rounded-e-none rounded-s-lg px-3 dark:!bg-transparent"),children:[d(I,{country:e,countryName:e}),d("svg",{className:r("-mr-2 h-4 w-4 opacity-50",t?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:d("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),d(F,{portal:!s,className:"w-[200px] md:w-[300px] p-0",children:d(G,{children:d(_,{children:re(Y,{className:"h-72",children:[d(q,{placeholder:"Search country..."}),d(Z,{children:"No country found."}),d(X,{children:a.filter(i=>i.value).map(i=>re(K,{className:"gap-2",onSelect:()=>p(i.value),children:[d(I,{country:i.value,countryName:i.label}),d("span",{className:"flex-1 text-sm",children:i.label}),i.value&&d("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${ne.getCountryCallingCode(i.value)}`}),d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:r("ml-auto",i.value===e?"opacity-100":"opacity-0"),children:d("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${i.value}-${i.label}`))})]})})})})]})},I=({country:t,countryName:e,className:o})=>{let a=Dt[t];return d("span",{className:r("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:a&&d(a,{title:e})})};I.displayName="FlagComponent";import{jsx as P,jsxs as ie}from"react/jsx-runtime";var Lt=qe(),St=({className:t,value:e,placeholder:o="",status:a,disabled:n})=>P(k,{asChild:!0,disabled:n,children:ie("button",{disabled:n,className:r(w({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e?ie("div",{className:"flex gap-2",children:[P(I,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),ie("span",{className:"",children:[" ",Lt[e]]})]}):o??"Select options...",P("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:P("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"})})]})}),At=({hideSearch:t=!0,...e})=>{let o=ge?.map(a=>({value:a?.internetCountryCode,label:a?.countryName,...a}));return P(ae,{options:o,hideSearch:t,optionComponent:a=>ie("div",{className:"w-full flex items-center gap-2",children:[P(I,{country:a?.internetCountryCode,countryName:a?.label,className:"ml-2 !w-6 !h-5"}),P("span",{className:"flex-1 text-sm",children:a?.label})]}),...e,children:P(St,{value:e?.value?.value,status:e?.status,placeholder:e?.placeholder??" Select Country"})})};export{we as Button,At as Country,A as FormLabel,T as Input,z as Loader,Le as PasswordInput,_e as PhoneInput,kt as Select,Se as Textarea};
|
1
|
+
import Ye from"react";import*as be from"react";import*as pe from"@radix-ui/react-label";import{cva as je}from"class-variance-authority";import{clsx as Xe}from"clsx";import{twMerge as Ke}from"tailwind-merge";function r(...t){return Ke(Xe(t))}import{jsx as Je}from"react/jsx-runtime";var $e=je("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),me=be.forwardRef(({className:t,...e},o)=>Je(pe.Root,{ref:o,className:r($e(),t),...e}));me.displayName=pe.Root.displayName;import{jsx as ye,jsxs as Qe}from"react/jsx-runtime";var b=Ye.forwardRef(({className:t,children:e,showAsterisk:o,error:a,...n},s)=>ye(me,{ref:s,className:r(a&&"text-red-500",t),...n,children:o?Qe("p",{children:[e,ye("span",{className:"text-red-500",children:"*"})]}):e}));b.displayName="FormLabel";import{jsx as Ce,jsxs as et}from"react/jsx-runtime";var W=({size:t=16,colour:e="primary"})=>et("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[Ce("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),Ce("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:e==="primary"?"#ffffff":"currentColor",className:"rounded"})]});import*as we from"react";import{Slot as tt}from"@radix-ui/react-slot";import{cva as ot}from"class-variance-authority";import{Fragment as ve,jsx as B,jsxs as at}from"react/jsx-runtime";var rt=ot("overflow-hidden isolate relative inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] text-[0.75rem] leading-[1rem] font-medium rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),Re=({className:t,variant:e="primary",size:o,asChild:a=!1,isLoading:n=!1,leftNode:s,rightNode:l,LoaderSize:i,ref:u,...f})=>{let p=a?tt:"button",{children:m,disabled:D,...z}=f,O=we.useRef(null);return B(p,{className:r(rt({variant:e,size:o,className:t})),ref:O||u,disabled:D||n,...z,children:B("div",{className:"flex font-medium justify-center items-center gap-2",children:n?B(ve,{children:B("span",{className:"mx-auto",children:B(W,{size:i,colour:"secondary"})})}):at(ve,{children:[s,m,l]})})})};Re.displayName="Button";import{cva as fe}from"class-variance-authority";import nt from"react";import{jsx as it}from"react/jsx-runtime";var C=nt.forwardRef(({className:t,children:e,error:o,...a},n)=>{let s=o??e;return s?it("p",{ref:n,className:r("text-xs font-normal text-[#F04248]",t),...a,children:s}):null});C.displayName="ErrorMessage";import st from"react";import{jsx as lt}from"react/jsx-runtime";var v=st.forwardRef(({className:t,...e},o)=>lt("p",{ref:o,className:r("text-sm text-[#8E98A8",t),...e}));v.displayName="FormDescription";import{jsx as L,jsxs as Pe}from"react/jsx-runtime";var dt=fe("!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"}}),xe=({className:t,status:e,type:o,ref:a,...n})=>L("input",{type:o,className:r(dt({status:e}),t),ref:a,...n});xe.displayName="BaseInnerInput";var x=fe("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"}}),Ne=fe("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default",side:"left"}}),E=({className:t,status:e="default",disabled:o,error:a,isLoading:n,sideNodeClassName:s,showAsterisk:l,label:i,description:u,ref:f,...p})=>{let m=e;return a&&(m="error"),n&&(m="loading"),o&&(m="prefilled"),Pe("div",{className:"relative space-y-1",children:[L(b,{showAsterisk:l,error:a,children:i}),Pe("div",{className:r(x({status:m}),p.leftNode||p.rightNode?"p-0":"",t),children:[p.leftNode?L("div",{className:r(Ne({status:m,side:"left"}),s),children:p.leftNode}):null,L(xe,{ref:f,disabled:n||o,className:p.leftNode||p.rightNode?"!px-3 !py-2":"",...p}),p.rightNode?L("div",{className:r(Ne({status:m,side:"right"}),s),children:p.rightNode}):null]}),L(v,{className:"text-gray-400 text-sm !font-normal",children:u}),L(C,{error:a})]})};E.displayName="Input";import{useState as mt}from"react";import{jsx as ke,jsxs as ct}from"react/jsx-runtime";var De=()=>ct("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ke("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ke("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as Le,jsxs as pt}from"react/jsx-runtime";var Ie=()=>pt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Le("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"}),Le("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as H}from"react/jsx-runtime";var Ae=({...t})=>{let[e,o]=mt(!1);return H(E,{sideNodeClassName:"!border-l-0",rightNode:e?H("button",{type:"button",onClick:()=>o(a=>!a),children:H(De,{})}):H("button",{type:"button",onClick:()=>o(a=>!a),children:H(Ie,{})}),type:e?"text":"password",...t})};Ae.displayName="PasswordInput";import{cva as ft}from"class-variance-authority";import{jsx as ae,jsxs as ut}from"react/jsx-runtime";var To=ft("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-[#00B2A9] focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-[#00B2A9] dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),Se=({className:t,status:e="default",disabled:o,error:a,isLoading:n,showAsterisk:s,label:l,description:i,...u})=>{let f=e;return a&&(f="error"),n&&(f="loading"),o&&(f="prefilled"),ut("div",{className:"relative space-y-1",children:[ae(b,{showAsterisk:s,error:a,children:l}),ae("textarea",{className:r("min-h-[80px]",x({status:f}),t),disabled:n||o,...u}),ae(v,{className:"text-gray-400 text-sm !font-normal",children:i}),ae(C,{error:a})]})};Se.displayName="Textarea";import*as A from"react";import*as k from"react";import{Command as h}from"cmdk";import{Search as Ct}from"lucide-react";import*as U from"react";import*as c from"@radix-ui/react-dialog";import{jsx as Te,jsxs as gt}from"react/jsx-runtime";var Fe=()=>gt("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"stroke-[#232528]]",children:[Te("path",{d:"M5.00098 5L19 18.9991",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Te("path",{d:"M4.99996 18.9991L18.999 5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});import{Fragment as yt,jsx as g,jsxs as M}from"react/jsx-runtime";var ht=c.Root,bt=c.Trigger,Ee=c.Portal,Me=U.forwardRef(({className:t,...e},o)=>g(c.Overlay,{ref:o,className:r("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));Me.displayName=c.Overlay.displayName;var ue=U.forwardRef(({className:t,hideCloseButton:e,children:o,...a},n)=>M(Ee,{children:[g(Me,{}),M(c.Content,{ref:n,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",t),...a,children:[o,!e&&M(c.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g(Fe,{}),g("span",{className:"sr-only",children:"Close"})]})]})]}));ue.displayName=c.Content.displayName;var Ve=({className:t,...e})=>g("div",{className:r("flex flex-col space-y-1.5 text-left",t),...e});Ve.displayName="DialogHeader";var ze=({className:t,...e})=>g("div",{className:r("flex flex-row justify-end sm:space-x-2",t),...e});ze.displayName="DialogFooter";var Oe=U.forwardRef(({className:t,...e},o)=>g(c.Title,{ref:o,className:r("text-lg font-semibold leading-none tracking-tight",t),...e}));Oe.displayName=c.Title.displayName;var We=U.forwardRef(({className:t,...e},o)=>g(c.Description,{ref:o,className:r("text-sm text-muted-foreground",t),...e}));We.displayName=c.Description.displayName;var Be=({trigger:t,children:e,open:o,onOpenChange:a,hideCloseButton:n,footer:s,title:l,description:i,contentClassName:u,headerClassName:f,titleClassName:p,descriptionClassName:m,footerClassName:D,asChild:z=!0,onOpenAutoFocus:O,onCloseAutoFocus:le,onEscapeKeyDown:re,onInteractOutside:T,onPointerDownOutside:de,...ce})=>M(ht,{...ce,open:o,onOpenChange:a,children:[g(bt,{asChild:z,children:t}),g(Ee,{children:M(ue,{className:u,hideCloseButton:n,onOpenAutoFocus:O,onCloseAutoFocus:le,onEscapeKeyDown:re,onPointerDownOutside:de,onInteractOutside:T,children:[l||i?M(Ve,{className:f,children:[l&&g(Oe,{className:p,children:l}),i&&g(We,{className:m,children:i})]}):g(yt,{}),e,s&&g(ze,{className:D,children:s})]})})]});Be.displayName=c.Dialog.displayName;import{Fragment as Xo,jsx as N,jsxs as Rt}from"react/jsx-runtime";var G=k.forwardRef(({className:t,...e},o)=>N(h,{ref:o,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));G.displayName=h.displayName;var q=k.forwardRef(({className:t,CommandInputContainerClassName:e,loading:o,...a},n)=>Rt("div",{className:r("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[o?N(W,{size:16,colour:"secondary"}):N(Ct,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),N(h.Input,{ref:n,className:r("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:o,...a})]}));q.displayName=h.Input.displayName;var _=k.forwardRef(({className:t,...e},o)=>N(h.List,{ref:o,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));_.displayName=h.List.displayName;var Z=k.forwardRef((t,e)=>N(h.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));Z.displayName=h.Empty.displayName;var X=k.forwardRef(({className:t,...e},o)=>N(h.Group,{ref:o,className:r("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}));X.displayName=h.Group.displayName;var vt=k.forwardRef(({className:t,...e},o)=>N(h.Separator,{ref:o,className:r("-mx-1 h-px bg-border",t),...e}));vt.displayName=h.Separator.displayName;var K=k.forwardRef(({className:t,...e},o)=>N(h.Item,{ref:o,className:r("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}));K.displayName=h.Item.displayName;var wt=({className:t,...e})=>N("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});wt.displayName="CommandShortcut";import*as He from"react";import*as w from"@radix-ui/react-popover";import{jsx as j,jsxs as Pt}from"react/jsx-runtime";var $=w.Root,I=w.Trigger,V=He.forwardRef(({className:t,align:e="center",sideOffset:o=4,portal:a=!0,...n},s)=>a?j(w.Portal,{children:j(w.Content,{ref:s,align:e,sideOffset:o,className:r("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:n.onOpenAutoFocus,onCloseAutoFocus:n.onCloseAutoFocus,...n})}):j(w.Content,{ref:s,align:e,sideOffset:o,className:r("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:n.onOpenAutoFocus,onCloseAutoFocus:n.onCloseAutoFocus,...n}));V.displayName=w.Content.displayName;var Nt=({trigger:t,children:e,open:o,onOpenChange:a,contentClassName:n,asChild:s=!0,align:l,side:i,alignOffset:u,sideOffset:f,onOpenAutoFocus:p,onCloseAutoFocus:m,...D})=>Pt($,{...D,open:o,onOpenChange:a,children:[j(I,{asChild:s,children:t}),j(V,{alignOffset:u,sideOffset:f,side:i,align:l,className:n,onOpenAutoFocus:p,onCloseAutoFocus:m,children:e})]});Nt.displayName=w.Root.displayName;import*as ge from"react";import*as y from"@radix-ui/react-scroll-area";import{jsx as J,jsxs as xt}from"react/jsx-runtime";var Y=ge.forwardRef(({className:t,children:e,...o},a)=>xt(y.Root,{ref:a,className:r("relative overflow-hidden",t),...o,children:[J(y.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),J(Ue,{}),J(y.Corner,{})]}));Y.displayName=y.Root.displayName;var Ue=ge.forwardRef(({className:t,orientation:e="vertical",...o},a)=>J(y.ScrollAreaScrollbar,{ref:a,orientation:e,className:r("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),...o,children:J(y.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ue.displayName=y.ScrollAreaScrollbar.displayName;import{jsx as P,jsxs as ne}from"react/jsx-runtime";var Ge=({className:t,value:e,placeholder:o="",status:a,disabled:n})=>P(I,{asChild:!0,disabled:n,children:ne("button",{disabled:n,className:r(x({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e??o??"Select options...",P("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:P("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),ie=({options:t=[],value:e,onChange:o,containerClassName:a,placeholder:n,disabled:s,loading:l,optionComponent:i,children:u,modal:f=!1,hideSearch:p,className:m,inputValue:D,onValueChange:z,onInputValueChange:O})=>{let[le,re]=A.useState(!1),T=A.useRef(null),[de,ce]=A.useState(void 0);return A.useLayoutEffect(()=>{T.current&&ce(T.current.clientWidth)},[T.current]),ne($,{modal:f,open:le,onOpenChange:re,children:[P("div",{className:r("w-full",m),ref:T,children:u}),P(V,{portal:!f,className:"p-0 min-w-[200px]",style:{width:de},children:ne(G,{className:"max-h-[270px] pt-3 relative",children:[!p&&P(q,{loading:l,placeholder:n??"Search options...",onValueChange:O,value:D,CommandInputContainerClassName:"mx-3 border rounded-md border-[#DEDEDE]"}),P(Y,{className:r("w-full px-0",a),children:ne(_,{children:[!p&&P(Z,{children:"No result found."}),P(X,{className:"w-full",children:t?.map(F=>P(K,{defaultValue:e?.label,value:F.label,disabled:s,onSelect:()=>{o(F),re(!1),z?.(F?.value)},children:i?i(F):F.label},F.value))})]})})]})})]})};import{jsx as Q,jsxs as Dt}from"react/jsx-runtime";var kt=({showAsterisk:t,label:e,description:o,error:a,hideSearch:n=!0,status:s,...l})=>Dt("div",{className:"relative space-y-1",children:[Q(b,{showAsterisk:t,error:a,children:e}),Q(ie,{hideSearch:n,...l,children:Q(Ge,{disabled:l?.disabled,placeholder:"Select or search email",status:s,value:l?.value?.label??l?.value?.value})}),Q(v,{className:"text-gray-400 text-sm !font-normal",children:o}),Q(C,{error:a})]});var he=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",currencyIcon:"\u{1F30E}",flag:"",flagURL:"",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",flag:"\u{1F1E7}\u{1F1EF}",flagURL:{png:"https://flagcdn.com/w320/bj.png",svg:"https://flagcdn.com/bj.svg",alt:"The flag of Benin features a green vertical band on its hoist side that takes up about two-fifth the width of the field and two equal horizontal bands of yellow and red adjoining the vertical band."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ",countryId:"659cb4624b4e7400b1c12efc"},{countryName:"Burkina Faso",countryCode:"+226",flag:"\u{1F1E7}\u{1F1EB}",flagURL:{png:"https://flagcdn.com/w320/bf.png",svg:"https://flagcdn.com/bf.svg",alt:"The flag of Burkina Faso features two equal horizontal bands of red and green, with a yellow five-pointed star in the center."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF",countryId:"659cb4624b4e7400b1c12f0d"},{countryName:"Cameroon",countryCode:"+237",flag:"\u{1F1E8}\u{1F1F2}",flagURL:{png:"https://flagcdn.com/w320/cm.png",svg:"https://flagcdn.com/cm.svg",alt:"The flag of Cameroon is composed of three equal vertical bands of green, red and yellow, with a yellow five-pointed star in the center."},currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM",countryId:"659cb4624b4e7400b1c12ee6"},{countryName:"Chad",countryCode:"+235",flag:"\u{1F1F9}\u{1F1E9}",flagURL:{png:"https://flagcdn.com/w320/td.png",svg:"https://flagcdn.com/td.svg",alt:"The flag of Chad is composed of three equal vertical bands of blue, gold and red."},currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD",countryId:"659cb4624b4e7400b1c12ea8"},{countryName:"DR Congo",countryCode:"+243",flag:"\u{1F1E8}\u{1F1E9}",flagURL:{png:"https://flagcdn.com/w320/cd.png",svg:"https://flagcdn.com/cd.svg",alt:"The flag of the Democratic Republic of the Congo has a sky-blue field with a yellow-edged red diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. A large five-pointed yellow star is situated above the diagonal band on the upper hoist side of the field."},currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD",countryId:"659cb4624b4e7400b1c12ee5"},{countryName:"Eswatini",countryCode:"+268",flag:"\u{1F1F8}\u{1F1FF}",flagURL:{png:"https://flagcdn.com/w320/sz.png",svg:"https://flagcdn.com/sz.svg",alt:"The flag of Eswatini is composed of three horizontal bands \u2014 a large central yellow-edged red band, and a light blue band above and beneath the red band. The red band is three times the height of the blue bands and bears a centered emblem made up of a large black and white Nguni shield covering two spears and a staff decorated with feather tassels, all placed horizontally."},currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ",countryId:"659cb4624b4e7400b1c12edc"},{countryName:"Gabon",countryCode:"+241",flag:"\u{1F1EC}\u{1F1E6}",flagURL:{png:"https://flagcdn.com/w320/ga.png",svg:"https://flagcdn.com/ga.svg",alt:"The flag of Gabon is composed of three equal horizontal bands of green, yellow and blue."},currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA",countryId:"659cb4624b4e7400b1c12f51"},{countryName:"Ghana",countryCode:"+233",flag:"\u{1F1EC}\u{1F1ED}",flagURL:{png:"https://flagcdn.com/w320/gh.png",svg:"https://flagcdn.com/gh.svg",alt:"The flag of Ghana is composed of three equal horizontal bands of red, gold and green, with a five-pointed black star centered in the gold band."},currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH",countryId:"659cb4624b4e7400b1c12e75"},{countryName:"Guinea",countryCode:"+224",flag:"\u{1F1EC}\u{1F1F3}",flagURL:{png:"https://flagcdn.com/w320/gn.png",svg:"https://flagcdn.com/gn.svg",alt:"The flag of Guinea is composed of three equal vertical bands of red, yellow and green."},currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN",countryId:"659cb4624b4e7400b1c12f3f"},{countryName:"Ivory Coast",countryCode:"+225",flag:"\u{1F1E8}\u{1F1EE}",flagURL:{png:"https://flagcdn.com/w320/ci.png",svg:"https://flagcdn.com/ci.svg",alt:"The flag of Ivory Coast is composed of three equal vertical bands of orange, white and green."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI",countryId:"659cb4624b4e7400b1c12f5f"},{countryName:"Kenya",countryCode:"+254",flag:"\u{1F1F0}\u{1F1EA}",flagURL:{png:"https://flagcdn.com/w320/ke.png",svg:"https://flagcdn.com/ke.svg",alt:"The flag of Kenya is composed of three equal horizontal bands of black, red with white top and bottom edges, and green. An emblem comprising a red, black and white Maasai shield covering two crossed white spears is superimposed at the center of the field."},currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE",countryId:"659cb4624b4e7400b1c12f3c"},{countryName:"Lesotho",countryCode:"+266",flag:"\u{1F1F1}\u{1F1F8}",flagURL:{png:"https://flagcdn.com/w320/ls.png",svg:"https://flagcdn.com/ls.svg",alt:"The flag of Lesotho is composed of three horizontal bands of blue, white and green in the ratio of 3:4:3. A black mokorotlo \u2014 a Basotho hat \u2014 is centered in the white band."},currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS",countryId:"659cb4624b4e7400b1c12f02"},{countryName:"Liberia",countryCode:"+231",flag:"\u{1F1F1}\u{1F1F7}",flagURL:{png:"https://flagcdn.com/w320/lr.png",svg:"https://flagcdn.com/lr.svg",alt:"The flag of Liberia is composed of eleven equal horizontal bands of red alternating with white. A blue square bearing a five-pointed white star is superimposed in the canton."},currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR",countryId:"659cb4624b4e7400b1c12ec0"},{countryName:"Madagascar",countryCode:"+261",flag:"\u{1F1F2}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/mg.png",svg:"https://flagcdn.com/mg.svg",alt:"The flag of Madagascar features a white vertical band on the hoist side that takes up about one-third the width of the field, and two equal horizontal bands of red and green adjoining the vertical band."},currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG",countryId:"659cb4624b4e7400b1c12ede"},{countryName:"Malawi",countryCode:"+265",flag:"\u{1F1F2}\u{1F1FC}",flagURL:{png:"https://flagcdn.com/w320/mw.png",svg:"https://flagcdn.com/mw.svg",alt:"The flag of Malawi is composed of three equal horizontal bands of black, red and green. The top half of a red sun with thirty-one visible rays is centered in the black band."},currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW",countryId:"659cb4624b4e7400b1c12f24"},{countryName:"Mali",countryCode:"+223",flag:"\u{1F1F2}\u{1F1F1}",flagURL:{png:"https://flagcdn.com/w320/ml.png",svg:"https://flagcdn.com/ml.svg",alt:"The flag of Mali is composed of three equal vertical bands of green, yellow and red."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML",countryId:"659cb4624b4e7400b1c12f25"},{countryName:"Mozambique",countryCode:"+258",flag:"\u{1F1F2}\u{1F1FF}",flagURL:{png:"https://flagcdn.com/w320/mz.png",svg:"https://flagcdn.com/mz.svg",alt:"The flag of Mozambique is composed of three equal horizontal bands of teal, black with white top and bottom edges, and yellow. A red isosceles triangle spanning about two-fifth the width of the field is superimposed on the hoist side with its base on the hoist end. This triangle bears a crossed rifle and hoe in black superimposed on an open white book which is superimposed on a five-pointed yellow star."},currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ",countryId:"659cb4624b4e7400b1c12f22"},{countryName:"Namibia",countryCode:"+264",flag:"\u{1F1F3}\u{1F1E6}",flagURL:{png:"https://flagcdn.com/w320/na.png",svg:"https://flagcdn.com/na.svg",alt:"The flag of Namibia features a white-edged red diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a blue and green triangle respectively. A gold sun with twelve triangular rays is situated on the hoist side of the upper triangle."},currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA",countryId:"659cb4624b4e7400b1c12e74"},{countryName:"Niger",countryCode:"+227",flag:"\u{1F1F3}\u{1F1EA}",flagURL:{png:"https://flagcdn.com/w320/ne.png",svg:"https://flagcdn.com/ne.svg",alt:"The flag of Niger features three equal horizontal bands of orange, white and green, with an orange circle centered in the white band."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE",countryId:"659cb4624b4e7400b1c12efb"},{countryName:"Nigeria",countryCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/ng.png",svg:"https://flagcdn.com/ng.svg",alt:"The flag of Nigeria is composed of three equal vertical bands of green, white and green."},currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG",countryId:"659cb4624b4e7400b1c12eae"},{countryName:"Republic of the Congo",countryCode:"+242",flag:"\u{1F1E8}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/cg.png",svg:"https://flagcdn.com/cg.svg",alt:"The flag of the Republic of the Congo features a yellow diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a green and red triangle respectively."},currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG",countryId:"659cb4624b4e7400b1c12e8b"},{countryName:"Rwanda",countryCode:"+250",flag:"\u{1F1F7}\u{1F1FC}",flagURL:{png:"https://flagcdn.com/w320/rw.png",svg:"https://flagcdn.com/rw.svg",alt:"The flag of Rwanda is composed of three horizontal bands of light blue, yellow and green. The light blue band is twice the height of the other two bands and bears a yellow sun with twenty-four rays on its fly side."},currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW",countryId:"659cb4624b4e7400b1c12ee4"},{countryName:"Senegal",countryCode:"+221",flag:"\u{1F1F8}\u{1F1F3}",flagURL:{png:"https://flagcdn.com/w320/sn.png",svg:"https://flagcdn.com/sn.svg",alt:"The flag of Senegal is composed of three equal vertical bands of green, golden-yellow and red, with a five-pointed green star centered in the golden-yellow band."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN",countryId:"659cb4624b4e7400b1c12ebb"},{countryName:"Seychelles",countryCode:"+248",flag:"\u{1F1F8}\u{1F1E8}",flagURL:{png:"https://flagcdn.com/w320/sc.png",svg:"https://flagcdn.com/sc.svg",alt:"The flag of Seychelles is composed of five broadening oblique bands of blue, yellow, red, white and green, which extend from the hoist side of the bottom edge to the top and fly edges of the field."},currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC",countryId:"659cb4624b4e7400b1c12e7d"},{countryName:"South Africa",countryCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",flagURL:{png:"https://flagcdn.com/w320/za.png",svg:"https://flagcdn.com/za.svg",alt:"The flag of South Africa is composed of two equal horizontal bands of red and blue, with a yellow-edged black isosceles triangle superimposed on the hoist side of the field. This triangle has its base centered on the hoist end, spans about two-fifth the width and two-third the height of the field, and is enclosed on its sides by the arms of a white-edged green horizontally oriented Y-shaped band which extends along the boundary of the red and blue bands to the fly end of the field."},currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA",countryId:"659cb4624b4e7400b1c12ec1"},{countryName:"South Sudan",countryCode:"+211",flag:"\u{1F1F8}\u{1F1F8}",flagURL:{png:"https://flagcdn.com/w320/ss.png",svg:"https://flagcdn.com/ss.svg",alt:"The flag of South Sudan is composed of three equal horizontal bands of black, red with white top and bottom edges, and green. A blue equilateral triangle which spans about two-fifth the width of the field is superimposed on the hoist side with its base on the hoist end of the field. At the center of this triangle is a five-pointed yellow star."},currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS",countryId:"659cb4624b4e7400b1c12e76"},{countryName:"Tanzania",countryCode:"+255",flag:"\u{1F1F9}\u{1F1FF}",flagURL:{png:"https://flagcdn.com/w320/tz.png",svg:"https://flagcdn.com/tz.svg",alt:"The flag of Tanzania features a yellow-edged black diagonal band that extends from the lower hoist-side corner to the upper fly-side corner of the field. Above and beneath this band are a green and light blue triangle respectively."},currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ",countryId:"659cb4624b4e7400b1c12eb1"},{countryName:"Togo",countryCode:"+228",flag:"\u{1F1F9}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/tg.png",svg:"https://flagcdn.com/tg.svg",alt:"The flag of Togo is composed of five equal horizontal bands of green alternating with yellow. A red square bearing a five-pointed white star is superimposed in the canton."},currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG",countryId:"659cb4624b4e7400b1c12ef2"},{countryName:"Uganda",countryCode:"+256",flag:"\u{1F1FA}\u{1F1EC}",flagURL:{png:"https://flagcdn.com/w320/ug.png",svg:"https://flagcdn.com/ug.svg",alt:"The flag of Uganda is composed of six equal horizontal bands of black, yellow, red, black, yellow and red. A white circle bearing a hoist-side facing grey red-crested crane is superimposed in the center of the field."},currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG",countryId:"659cb4624b4e7400b1c12edd"},{countryName:"Zambia",countryCode:"+260",flag:"\u{1F1FF}\u{1F1F2}",flagURL:{png:"https://flagcdn.com/w320/zm.png",svg:"https://flagcdn.com/zm.svg",alt:"The flag of Zambia has a green field, on the fly side of which is a soaring orange African fish eagle above a rectangular area divided into three equal vertical bands of red, black and orange."},currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM",countryId:"659cb4624b4e7400b1c12f2b"}],qe=()=>{let t={};return he?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};import*as te from"react";import*as se from"react-phone-number-input";import Lt from"react-phone-number-input/flags";import{jsx as d,jsxs as ee}from"react/jsx-runtime";var _e=te.forwardRef(({className:t,onChange:e,modal:o,showAsterisk:a,label:n,description:s,error:l,defaultCountry:i="NG",...u},f)=>{let p=m=>d(It,{...m,status:u.status,modal:o});return ee("div",{className:"relative space-y-1",children:[d(b,{showAsterisk:a,error:l,children:n}),d(se.default,{ref:f,className:r("flex",t),flagComponent:S,countrySelectComponent:p,inputComponent:Ze,defaultCountry:i,onChange:m=>e?.(m),...u}),d(v,{className:"text-gray-400 text-sm !font-normal",children:s}),d(C,{error:l})]})});_e.displayName="PhoneInput";var Ze=te.forwardRef(({className:t,...e},o)=>d(E,{className:r("h-full !-mt-0 border-l-0 rounded-l-none flex-1",t),...e,ref:o}));Ze.displayName="InputComponent";var It=({disabled:t,value:e,onChange:o,options:a,status:n,modal:s})=>{let l=te.useCallback(i=>{o(i)},[o]);return ee($,{modal:s,children:[d(I,{disabled:t,children:ee("div",{className:r(x({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:[d(S,{country:e,countryName:e}),d("svg",{className:r("-mr-2 h-4 w-4 opacity-50",t?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:d("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),d(V,{portal:!s,className:"w-[200px] md:w-[300px] p-0",children:d(G,{children:d(_,{children:ee(Y,{className:"h-72",children:[d(q,{placeholder:"Search country..."}),d(Z,{children:"No country found."}),d(X,{children:a.filter(i=>i.value).map(i=>ee(K,{className:"gap-2",onSelect:()=>l(i.value),children:[d(S,{country:i.value,countryName:i.label}),d("span",{className:"flex-1 text-sm",children:i.label}),i.value&&d("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${se.getCountryCallingCode(i.value)}`}),d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:r("ml-auto",i.value===e?"opacity-100":"opacity-0"),children:d("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${i.value}-${i.label}`))})]})})})})]})},S=({country:t,countryName:e,className:o})=>{let a=Lt[t];return d("span",{className:r("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",o),children:a&&d(a,{title:e})})};S.displayName="FlagComponent";import{jsx as R,jsxs as oe}from"react/jsx-runtime";var At=qe(),St=({className:t,value:e,placeholder:o="",status:a,disabled:n})=>R(I,{asChild:!0,disabled:n,children:oe("button",{disabled:n,className:r(x({status:a}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e?oe("div",{className:"flex gap-2",children:[R(S,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),oe("span",{className:"",children:[" ",At[e]]})]}):o??"Select options...",R("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:R("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Tt=({hideSearch:t=!0,showAsterisk:e,label:o,description:a,error:n,...s})=>{let l=he?.map(i=>({value:i?.internetCountryCode,label:i?.countryName,...i}));return oe("div",{className:"relative space-y-1",children:[R(b,{showAsterisk:e,error:n,children:o}),R(ie,{options:l,hideSearch:t,optionComponent:i=>oe("div",{className:"w-full flex items-center gap-2",children:[R(S,{country:i?.internetCountryCode,countryName:i?.label,className:"ml-2 !w-6 !h-5"}),R("span",{className:"flex-1 text-sm",children:i?.label})]}),...s,children:R(St,{value:s?.value?.value,status:s?.status,placeholder:s?.placeholder??" Select Country"})}),R(v,{className:"text-gray-400 text-sm !font-normal",children:a}),R(C,{error:n})]})};export{Re as Button,Tt as Country,b as FormLabel,E as Input,W as Loader,Ae as PasswordInput,_e as PhoneInput,kt as Select,Se as Textarea};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|