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