@6thbridge/hexa 0.0.20 → 0.0.22

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.
@@ -1,5 +1,5 @@
1
1
   WARN  Issue while reading "/Users/joachim/.nvm/versions/node/v20.17.0/lib/node_modules/npmrc". EISDIR: illegal operation on a directory, read
2
2
 
3
- > @6thbridge/hexa@0.0.19 lint /Users/joachim/Documents/dev/payfusion/payfusion-component-library/packages/6thbridge-hexa
3
+ > @6thbridge/hexa@0.0.22 lint /Users/joachim/Documents/dev/payfusion/payfusion-component-library/packages/6thbridge-hexa
4
4
  > eslint . --max-warnings 0
5
5
 
package/dist/index.d.mts CHANGED
@@ -236,13 +236,6 @@ type PaginationProps = {
236
236
  itemsPerPage?: number;
237
237
  };
238
238
 
239
- type Variant = "success" | "failed" | "pending" | "abandoned";
240
- declare const Status: ({ status, variant, className, }: {
241
- status: string;
242
- variant: Variant;
243
- className?: string;
244
- }) => react_jsx_runtime.JSX.Element;
245
-
246
239
  type TableSearchProps = {
247
240
  enabled: boolean;
248
241
  debounceRate?: number;
@@ -268,6 +261,13 @@ type TableProps<T extends RowData> = {
268
261
  };
269
262
  declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, isLoading, pagination, }: TableProps<T>) => react_jsx_runtime.JSX.Element;
270
263
 
264
+ type Variant = "success" | "failed" | "pending" | "abandoned";
265
+ declare const Status: ({ status, variant, className, }: {
266
+ status: string;
267
+ variant: Variant;
268
+ className?: string;
269
+ }) => react_jsx_runtime.JSX.Element;
270
+
271
271
  declare function cn(...inputs: ClassValue[]): string;
272
272
 
273
- export { Button, CopyableLabel, Country, DebouncedInput, Dialog, FlagComponent, FormLabel, Input, Loader, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type PaginationProps as TablePaginationProps, Textarea, buttonVariants, cn };
273
+ export { Button, CopyableLabel, Country, DebouncedInput, Dialog, FlagComponent, FormLabel, Input, Loader, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn };
package/dist/index.d.ts CHANGED
@@ -236,13 +236,6 @@ type PaginationProps = {
236
236
  itemsPerPage?: number;
237
237
  };
238
238
 
239
- type Variant = "success" | "failed" | "pending" | "abandoned";
240
- declare const Status: ({ status, variant, className, }: {
241
- status: string;
242
- variant: Variant;
243
- className?: string;
244
- }) => react_jsx_runtime.JSX.Element;
245
-
246
239
  type TableSearchProps = {
247
240
  enabled: boolean;
248
241
  debounceRate?: number;
@@ -268,6 +261,13 @@ type TableProps<T extends RowData> = {
268
261
  };
269
262
  declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, isLoading, pagination, }: TableProps<T>) => react_jsx_runtime.JSX.Element;
270
263
 
264
+ type Variant = "success" | "failed" | "pending" | "abandoned";
265
+ declare const Status: ({ status, variant, className, }: {
266
+ status: string;
267
+ variant: Variant;
268
+ className?: string;
269
+ }) => react_jsx_runtime.JSX.Element;
270
+
271
271
  declare function cn(...inputs: ClassValue[]): string;
272
272
 
273
- export { Button, CopyableLabel, Country, DebouncedInput, Dialog, FlagComponent, FormLabel, Input, Loader, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type PaginationProps as TablePaginationProps, Textarea, buttonVariants, cn };
273
+ export { Button, CopyableLabel, Country, DebouncedInput, Dialog, FlagComponent, FormLabel, Input, Loader, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, type TablePaginationProps, Textarea, buttonVariants, cn };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Kt=Object.create;var ve=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var qt=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty;var Jt=(e,t)=>{for(var r in t)ve(e,r,{get:t[r],enumerable:!0})},$e=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ut(t))!jt.call(e,o)&&o!==r&&ve(e,o,{get:()=>t[o],enumerable:!(n=$t(t,o))||n.enumerable});return e};var v=(e,t,r)=>(r=e!=null?Kt(qt(e)):{},$e(t||!e||!e.__esModule?ve(r,"default",{value:e,enumerable:!0}):r,e)),Qt=e=>$e(ve({},"__esModule",{value:!0}),e);var dr={};Jt(dr,{Button:()=>Q,CopyableLabel:()=>Ht,Country:()=>Tt,DebouncedInput:()=>De,Dialog:()=>Ne,FlagComponent:()=>V,FormLabel:()=>R,Input:()=>X,Loader:()=>J,OTPInput:()=>Vt,PasswordInput:()=>Be,PhoneInput:()=>_e,Popover:()=>ge,PopoverContent:()=>G,PopoverRoot:()=>$,PopoverTrigger:()=>M,Select:()=>Et,Status:()=>Gt,Table:()=>Xt,Textarea:()=>He,buttonVariants:()=>oe,cn:()=>a});module.exports=Qt(dr);var Ye=v(require("react"));var je=v(require("react")),Ae=v(require("@radix-ui/react-label")),Je=require("class-variance-authority");var Ue=require("clsx"),qe=require("tailwind-merge");function a(...e){return(0,qe.twMerge)((0,Ue.clsx)(e))}var Qe=require("react/jsx-runtime"),Yt=(0,Je.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fe=je.forwardRef(({className:e,...t},r)=>(0,Qe.jsx)(Ae.Root,{ref:r,className:a(Yt(),e),...t}));Fe.displayName=Ae.Root.displayName;var te=require("react/jsx-runtime"),R=Ye.default.forwardRef(({className:e,children:t,showAsterisk:r,error:n,...o},i)=>(0,te.jsx)(Fe,{ref:i,className:a(n&&"text-red-500",e),...o,children:r?(0,te.jsxs)("p",{children:[t,(0,te.jsx)("span",{className:"text-red-500",children:"*"})]}):t}));R.displayName="FormLabel";var re=require("react/jsx-runtime"),J=({size:e=16,colour:t="primary"})=>(0,re.jsxs)("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[(0,re.jsx)("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),(0,re.jsx)("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});var xe=v(require("react")),et=require("@radix-ui/react-slot"),tt=require("class-variance-authority");var S=require("react/jsx-runtime"),oe=(0,tt.cva)("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),Q=xe.forwardRef(({className:e,variant:t="primary",size:r,asChild:n=!1,isLoading:o=!1,leftNode:i,rightNode:l,LoaderSize:s,...p},c)=>{let m=n?et.Slot:"button",{children:g,disabled:u,...y}=p,h=xe.useRef(null);return(0,S.jsx)(m,{className:a(oe({variant:t,size:r,className:e})),ref:h||c,disabled:u||o,...y,children:(0,S.jsx)("div",{className:"flex font-medium justify-center items-center gap-2",children:o?(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("span",{className:"mx-auto",children:(0,S.jsx)(J,{size:s,colour:"secondary"})})}):(0,S.jsxs)(S.Fragment,{children:[i,g,l]})})})});Q.displayName="Button";var Pe=require("class-variance-authority");var rt=v(require("react")),ot=require("react/jsx-runtime"),I=rt.default.forwardRef(({className:e,children:t,error:r,...n},o)=>{let i=r??t;return i?(0,ot.jsx)("p",{ref:o,className:a("text-xs font-normal text-[#F04248]",e),...n,children:i}):null});I.displayName="ErrorMessage";var at=v(require("react")),nt=require("react/jsx-runtime"),T=at.default.forwardRef(({className:e,...t},r)=>(0,nt.jsx)("div",{ref:r,className:a("text-sm text-[#8E98A8",e),...t}));T.displayName="FormDescription";var E=require("react/jsx-runtime"),Me=(0,Pe.cva)("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),st=({className:e,status:t,type:r,ref:n,...o})=>(0,E.jsx)("input",{type:r,className:a(Me({status:t}),e),ref:n,...o});st.displayName="BaseInnerInput";var F=(0,Pe.cva)("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),it=(0,Pe.cva)("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),X=({className:e,status:t="default",disabled:r,error:n,isLoading:o,sideNodeClassName:i,showAsterisk:l,label:s,description:p,ref:c,...m})=>{let g=t;return n&&(g="error"),o&&(g="loading"),r&&(g="prefilled"),(0,E.jsxs)("div",{className:"relative space-y-1 w-full",children:[s&&(0,E.jsx)(R,{showAsterisk:l,error:n,children:s}),(0,E.jsxs)("div",{className:a(F({status:g}),m.leftNode?"pl-0":"",m.rightNode?"pr-0":"",e),children:[m.leftNode?(0,E.jsx)("div",{className:a(it({status:g,side:"left"}),i),children:m.leftNode}):null,(0,E.jsx)(st,{ref:c,disabled:o||r,className:a({"!pl-3":m.leftNode&&t!=="neutral","!pr-3":m.rightNode&&t!=="neutral"}),...m}),m.rightNode?(0,E.jsx)("div",{className:a(it({status:g,side:"right"}),i),children:m.rightNode}):null]}),p&&(0,E.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:p}),(0,E.jsx)(I,{error:n})]})};X.displayName="Input";var ie=require("react");var ae=require("react/jsx-runtime"),lt=()=>(0,ae.jsxs)("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ae.jsx)("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,ae.jsx)("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});var ne=require("react/jsx-runtime"),ct=()=>(0,ne.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ne.jsx)("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,ne.jsx)("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});var Ve=require("react/jsx-runtime"),dt=()=>(0,Ve.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ve.jsx)("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"})});var Oe=require("react/jsx-runtime"),pt=()=>(0,Oe.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Oe.jsx)("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"})});var k=require("react/jsx-runtime"),mt=[{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}],Be=({onValidate:e,onChange:t,disableValidation:r,...n})=>{let[o,i]=(0,ie.useState)(!1),[l,s]=(0,ie.useState)(mt),p=u=>mt.map(y=>({...y,validated:y.RegExp.test(u)})),c=u=>{let y=p(u),h=y.every(ee=>ee.validated);return s(y),h},m=u=>{if(t&&t(u),r)return;let y=u?.target?.value,h=c(y);e&&e(h,y)},g=(0,ie.useMemo)(()=>(0,k.jsx)("div",{className:"flex items-center gap-2",children:l?.map(u=>(0,k.jsxs)("div",{className:a("text-xs flex items-center gap-0.5",{"text-[#62C554]":u?.validated,"text-[#8E98A8]":!u?.validated}),children:[(0,k.jsx)("span",{className:"",children:u?.validated?(0,k.jsx)(dt,{}):(0,k.jsx)(pt,{})}),(0,k.jsx)("span",{className:"",children:u?.label})]},u?.key))}),[l]);return(0,k.jsx)(X,{sideNodeClassName:"!border-l-0",rightNode:o?(0,k.jsx)("button",{type:"button",onClick:()=>i(u=>!u),children:(0,k.jsx)(lt,{})}):(0,k.jsx)("button",{type:"button",onClick:()=>i(u=>!u),children:(0,k.jsx)(ct,{})}),type:o?"text":"password",onChange:m,description:!r&&g,...n})};Be.displayName="PasswordInput";var ut=require("class-variance-authority");var K=require("react/jsx-runtime"),Ur=(0,ut.cva)("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),He=({className:e,status:t="default",disabled:r,error:n,isLoading:o,showAsterisk:i,label:l,description:s,...p})=>{let c=t;return n&&(c="error"),o&&(c="loading"),r&&(c="prefilled"),(0,K.jsxs)("div",{className:"relative space-y-1",children:[(0,K.jsx)(R,{showAsterisk:i,error:n,children:l}),(0,K.jsx)("textarea",{className:a("min-h-[80px]",F({status:c}),e),disabled:o||r,...p}),(0,K.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:s}),(0,K.jsx)(I,{error:n})]})};He.displayName="Textarea";var U=v(require("react"));var H=v(require("react")),N=require("cmdk"),xt=require("lucide-react");var le=v(require("react")),C=v(require("@radix-ui/react-dialog"));var se=require("react/jsx-runtime"),ft=()=>(0,se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[(0,se.jsx)("path",{d:"M18 6 6 18"}),(0,se.jsx)("path",{d:"m6 6 12 12"})]});var b=require("react/jsx-runtime"),er=C.Root,tr=C.Trigger,gt=C.Portal,yt=le.forwardRef(({className:e,...t},r)=>(0,b.jsx)(C.Overlay,{ref:r,className:a("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));yt.displayName=C.Overlay.displayName;var We=le.forwardRef(({className:e,hideCloseButton:t,children:r,...n},o)=>(0,b.jsxs)(gt,{children:[(0,b.jsx)(yt,{}),(0,b.jsxs)(C.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...n,children:[r,!t&&(0,b.jsxs)(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:[(0,b.jsx)(ft,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));We.displayName=C.Content.displayName;var bt=({className:e,...t})=>(0,b.jsx)("div",{className:a("flex flex-col space-y-1.5 text-left",e),...t});bt.displayName="DialogHeader";var Ct=({className:e,...t})=>(0,b.jsx)("div",{className:a("flex flex-row justify-end sm:space-x-2",e),...t});Ct.displayName="DialogFooter";var ht=le.forwardRef(({className:e,...t},r)=>(0,b.jsx)(C.Title,{ref:r,className:a("text-xl font-semibold leading-none tracking-tight",e),...t}));ht.displayName=C.Title.displayName;var vt=le.forwardRef(({className:e,...t},r)=>(0,b.jsx)(C.Description,{ref:r,className:a("text-sm text-gray-500",e),...t}));vt.displayName=C.Description.displayName;var Ne=({trigger:e=void 0,children:t,open:r,onOpenChange:n,hideCloseButton:o,footer:i,title:l,description:s,contentClassName:p,headerClassName:c,titleClassName:m,descriptionClassName:g,footerClassName:u,asChild:y=!0,onOpenAutoFocus:h,onCloseAutoFocus:ee,onEscapeKeyDown:he,onInteractOutside:q,onPointerDownOutside:Te,...Ee})=>(0,b.jsxs)(er,{...Ee,open:r,onOpenChange:n,children:[(0,b.jsx)(tr,{asChild:y,children:e}),(0,b.jsx)(gt,{children:(0,b.jsxs)(We,{className:p,hideCloseButton:o,onOpenAutoFocus:h,onCloseAutoFocus:ee,onEscapeKeyDown:he,onPointerDownOutside:Te,onInteractOutside:q,children:[l||s?(0,b.jsxs)(bt,{className:c,children:[l&&(0,b.jsx)(ht,{className:m,children:l}),s&&(0,b.jsx)(vt,{className:g,children:s})]}):(0,b.jsx)(b.Fragment,{}),t,i&&(0,b.jsx)(Ct,{className:u,children:i})]})})]});Ne.displayName=C.Dialog.displayName;var w=require("react/jsx-runtime"),ce=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(N.Command,{ref:r,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ce.displayName=N.Command.displayName;var de=H.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...n},o)=>(0,w.jsxs)("div",{className:a("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?(0,w.jsx)(J,{size:16,colour:"secondary"}):(0,w.jsx)(xt.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,w.jsx)(N.Command.Input,{ref:o,className:a("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:r,...n})]}));de.displayName=N.Command.Input.displayName;var pe=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(N.Command.List,{ref:r,className:a("overflow-y-auto overflow-x-hidden",e),...t}));pe.displayName=N.Command.List.displayName;var me=H.forwardRef((e,t)=>(0,w.jsx)(N.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));me.displayName=N.Command.Empty.displayName;var ue=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(N.Command.Group,{ref:r,className:a("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ue.displayName=N.Command.Group.displayName;var rr=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(N.Command.Separator,{ref:r,className:a("-mx-1 h-px bg-border",e),...t}));rr.displayName=N.Command.Separator.displayName;var fe=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(N.Command.Item,{ref:r,className:a("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));fe.displayName=N.Command.Item.displayName;var or=({className:e,...t})=>(0,w.jsx)("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});or.displayName="CommandShortcut";var Pt=v(require("react")),A=v(require("@radix-ui/react-popover"));var W=require("react/jsx-runtime"),$=A.Root,M=A.Trigger,G=Pt.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:n=!0,...o},i)=>n?(0,W.jsx)(A.Portal,{children:(0,W.jsx)(A.Content,{ref:i,align:t,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o})}):(0,W.jsx)(A.Content,{ref:i,align:t,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o}));G.displayName=A.Content.displayName;var ge=({trigger:e,children:t,open:r,onOpenChange:n,contentClassName:o,asChild:i=!0,align:l,side:s,alignOffset:p,triggerClassName:c,sideOffset:m,onOpenAutoFocus:g,onCloseAutoFocus:u,portal:y=!0,...h})=>(0,W.jsxs)($,{...h,open:r,onOpenChange:n,children:[(0,W.jsx)(M,{asChild:i,className:c,children:e}),(0,W.jsx)(G,{alignOffset:p,sideOffset:m,side:s,align:l,className:o,onOpenAutoFocus:g,onCloseAutoFocus:u,portal:y,children:t})]});ge.displayName=A.Root.displayName;var Ge=v(require("react")),D=v(require("@radix-ui/react-scroll-area"));var z=require("react/jsx-runtime"),ye=Ge.forwardRef(({className:e,viewPortClassName:t,children:r,...n},o)=>(0,z.jsxs)(D.Root,{ref:o,className:a("relative overflow-hidden",e),...n,children:[(0,z.jsx)(D.Viewport,{className:a("h-full w-full rounded-[inherit]",t),children:r}),(0,z.jsx)(Nt,{}),(0,z.jsx)(D.Corner,{})]}));ye.displayName=D.Root.displayName;var Nt=Ge.forwardRef(({className:e,orientation:t="vertical",...r},n)=>(0,z.jsx)(D.ScrollAreaScrollbar,{ref:n,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,z.jsx)(D.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));Nt.displayName=D.ScrollAreaScrollbar.displayName;var P=require("react/jsx-runtime"),wt=({className:e,value:t,placeholder:r="",status:n,disabled:o})=>(0,P.jsx)(M,{asChild:!0,disabled:o,children:(0,P.jsxs)("button",{disabled:o,className:a(F({status:n}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??r??"Select options...",(0,P.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,P.jsx)("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),we=({options:e=[],value:t,onChange:r,containerClassName:n,placeholder:o,disabled:i,loading:l,optionComponent:s,children:p,modal:c=!1,hideSearch:m,className:g,inputValue:u,onValueChange:y,onInputValueChange:h})=>{let[ee,he]=U.useState(!1),q=U.useRef(null),[Te,Ee]=U.useState(void 0);return U.useLayoutEffect(()=>{q.current&&Ee(q.current.clientWidth)},[q.current]),(0,P.jsxs)($,{modal:c,open:ee,onOpenChange:he,children:[(0,P.jsx)("div",{className:a("w-full",g),ref:q,children:p}),(0,P.jsx)(G,{portal:!c,className:"p-0 min-w-[200px]",style:{width:Te},children:(0,P.jsxs)(ce,{className:a("relative max-h-[270px]",{"mt-2":!m}),children:[!m&&(0,P.jsx)(de,{loading:l,placeholder:o??"Search options...",onValueChange:h,value:u,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),(0,P.jsx)(ye,{viewPortClassName:"max-h-[225px]",className:a("w-full px-0 h-full overflow-y-auto",n),children:(0,P.jsxs)(pe,{children:[!m&&(0,P.jsx)(me,{children:"No result found."}),(0,P.jsx)(ue,{className:"w-full",children:e?.map(j=>(0,P.jsx)(fe,{defaultValue:t?.label,value:j.label,disabled:i,onSelect:()=>{r(j),he(!1),y?.(j?.value)},children:s?s(j):j.label},j.value))})]})})]})})]})};var ze=[{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"}],Rt=()=>{let e={};return ze?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};var be=v(require("react")),Dt=v(require("react-phone-number-input")),Lt=v(require("react-phone-number-input")),St=v(require("react-phone-number-input/flags"));var _=require("react/jsx-runtime"),ar=e=>(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[(0,_.jsx)("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",(0,_.jsx)("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"}),(0,_.jsx)("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),(0,_.jsx)("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),(0,_.jsx)("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),kt=ar;var d=require("react/jsx-runtime"),_e=be.forwardRef(({className:e,onChange:t,value:r,modal:n,showAsterisk:o,label:i,description:l,error:s,defaultCountry:p="NG",...c},m)=>{let g=y=>(0,d.jsx)(nr,{...y,status:c.status,modal:n,onChange:h=>y.onChange(h)}),u=r;return(0,d.jsxs)("div",{className:"relative space-y-1",children:[(0,d.jsx)(R,{showAsterisk:o,error:s,children:i}),(0,d.jsx)(Lt.default,{ref:m,className:a("flex",e),flagComponent:V,countrySelectComponent:g,focusInputOnCountrySelection:!0,countryCallingCodeEditable:!0,enableLongNumber:!0,addInternationalOption:!0,international:!0,inputComponent:It,defaultCountry:p,containerComponent:({children:y})=>(0,d.jsx)("div",{className:a(F({status:c?.status}),"p-0 gap-1"),children:y}),...c,onChange:y=>{t&&t(y)},value:u}),(0,d.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:l}),(0,d.jsx)(I,{error:s})]})});_e.displayName="PhoneInput";var It=be.forwardRef(({className:e,...t},r)=>(0,d.jsx)("input",{className:a(Me({status:t?.status})," h-full !-mt-0 border-0 rounded-l-none !flex-1 !block !w-full",e),...t,ref:r}));It.displayName="InputComponent";var nr=({disabled:e,value:t,onChange:r,options:n,status:o,modal:i})=>{let l=be.useCallback(s=>{console.log(s),r(s)},[r]);return(0,d.jsxs)($,{modal:i,children:[(0,d.jsx)(M,{disabled:e,children:(0,d.jsxs)("div",{className:a(F({status:o}),"!border-0 transition justify-center items-center disabled:text-base-500 flex gap-3 h-full rounded-e-none pl-2 pr-2"),children:[(0,d.jsx)(V,{country:t,countryName:t}),(0,d.jsx)("svg",{className:a("-mr-2 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,d.jsx)("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),(0,d.jsx)(G,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:(0,d.jsx)(ce,{children:(0,d.jsx)(pe,{children:(0,d.jsxs)(ye,{className:"h-72",children:[(0,d.jsx)(de,{placeholder:"Search country..."}),(0,d.jsx)(me,{children:"No country found."}),(0,d.jsx)(ue,{children:n.filter(s=>s.value).map(s=>(0,d.jsxs)(fe,{className:"gap-2",onSelect:()=>l(s.value),children:[(0,d.jsx)(V,{country:s.value,countryName:s.label}),(0,d.jsx)("span",{className:"flex-1 text-sm",children:s.label}),s.value&&(0,d.jsx)("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${Dt.getCountryCallingCode(s.value)}`}),(0,d.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:a("ml-auto",s.value===t?"opacity-100":"opacity-0"),children:(0,d.jsx)("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},V=({country:e,countryName:t,className:r})=>{let n=St.default[e];return e==="GLOBAL"?(0,d.jsx)("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:(0,d.jsx)(kt,{className:"w-full h-[90%]"})}):(0,d.jsx)("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:n&&(0,d.jsx)(n,{title:t})})};V.displayName="FlagComponent";var x=require("react/jsx-runtime"),ir=Rt(),sr=({className:e,value:t,placeholder:r="",status:n,disabled:o})=>(0,x.jsx)(M,{asChild:!0,disabled:o,children:(0,x.jsxs)("button",{disabled:o,className:a(F({status:n}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(V,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),(0,x.jsxs)("span",{className:"",children:[" ",ir[t]]})]}):r??"Select options...",(0,x.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,x.jsx)("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Tt=({hideSearch:e=!0,showAsterisk:t,label:r,description:n,error:o,...i})=>{let l=ze?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return(0,x.jsxs)("div",{className:"relative space-y-1",children:[(0,x.jsx)(R,{showAsterisk:t,error:o,children:r}),(0,x.jsx)(we,{options:l,hideSearch:e,optionComponent:s=>(0,x.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,x.jsx)(V,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),(0,x.jsx)("span",{className:"flex-1 text-sm",children:s?.label})]}),...i,children:(0,x.jsx)(sr,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),(0,x.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:n}),(0,x.jsx)(I,{error:o})]})};var Z=require("react/jsx-runtime"),Et=({showAsterisk:e,label:t,description:r,error:n,hideSearch:o=!0,status:i,...l})=>(0,Z.jsxs)("div",{className:"relative space-y-1",children:[(0,Z.jsx)(R,{showAsterisk:e,error:n,children:t}),(0,Z.jsx)(we,{hideSearch:o,...l,containerClassName:"h-full",children:(0,Z.jsx)(wt,{disabled:l?.disabled,placeholder:"Select or search email",status:i,value:l?.value?.label??l?.value?.value})}),(0,Z.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:r}),(0,Z.jsx)(I,{error:n})]});var At=v(require("react-otp-input"));var Ft=require("class-variance-authority"),Mt=require("react"),Ze=require("react/jsx-runtime"),lr=(0,Ft.cva)("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),Vt=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:n="-",status:o,...i})=>{let l=(0,Mt.useMemo)(()=>n||new Array(e).fill("").reduce((c,m)=>c+=m,""),[e,n]);return(0,Ze.jsx)(At.default,{numInputs:e,placeholder:l,containerStyle:a("w-full",r),inputStyle:a(lr({status:o}),t),renderInput:s=>(0,Ze.jsx)("input",{...s}),...i})};var Bt=require("react"),Re=require("lucide-react"),ke=require("framer-motion"),O=require("react/jsx-runtime"),Ht=({text:e,onCopy:t,iconsPosition:r="right",clampText:n=!0})=>{let[o,i]=(0,Bt.useState)(!1),l=()=>{navigator.clipboard.writeText(e).then(()=>{i(!0),t?.(),setTimeout(()=>i(!1),2e3)})},s=o?Re.CheckIcon:Re.Copy;return(0,O.jsxs)("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"&&(0,O.jsx)(Ot,{Icon:s,onClick:l,copied:o}),(0,O.jsx)("span",{className:`${n?"truncate max-w-[100px]":""}`,children:e}),r==="right"&&(0,O.jsx)(Ot,{Icon:s,onClick:l,copied:o})]})},Ot=({Icon:e,onClick:t,copied:r})=>(0,O.jsx)(ke.AnimatePresence,{mode:"wait",children:(0,O.jsx)(ke.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:(0,O.jsx)(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});var Ce=require("react");var Wt=require("lucide-react"),Xe=require("react/jsx-runtime"),De=({value:e,onChange:t,debounce:r=500,addon:n,...o})=>{let[i,l]=(0,Ce.useState)(e??""),s=p=>l(p.target.value);return(0,Ce.useEffect)(()=>{e&&l(e)},[e]),(0,Ce.useEffect)(()=>{let p=setTimeout(()=>{t(i)},r);return()=>clearTimeout(p)},[i,r,t]),(0,Xe.jsx)(X,{leftNode:n??(0,Xe.jsx)(Wt.Search,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...o,className:a("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",o?.className),onChange:s,value:i})};var Le=require("react/jsx-runtime"),Gt=({status:e,variant:t,className:r})=>(0,Le.jsx)("div",{children:(0,Le.jsx)("div",{className:a("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},r),children:(0,Le.jsx)("p",{children:e.replace("-"," ")})})});var Y=require("lucide-react");var Ke=require("@tanstack/react-table");var L=require("react/jsx-runtime"),zt=({table:e,isMobile:t,onRowClick:r,id:n})=>(0,L.jsx)("div",{className:a("relative w-full rounded-b border-0",{}),children:(0,L.jsxs)("table",{id:n??"table",className:"w-full overflow-x-scroll",children:[(0,L.jsx)("thead",{children:e.getHeaderGroups().map(o=>(0,L.jsx)("tr",{className:a(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:o.headers.map(i=>(0,L.jsx)("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:i.colSpan,style:{width:i.getSize()},children:i.isPlaceholder?null:(0,L.jsx)("div",{className:a("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:(0,Ke.flexRender)(i.column.columnDef.header,i.getContext())})},i.id))},o.id))}),(0,L.jsx)("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(o=>(0,L.jsx)("tr",{className:a("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(o):{},children:o.getVisibleCells().map(i=>(0,L.jsx)("td",{className:a("",{}),children:(0,L.jsx)("div",{className:a("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:(0,Ke.flexRender)(i.column.columnDef.cell,i.getContext())})},i.id))},o.id))})]})});var Ie=require("lucide-react");var Se=require("react/jsx-runtime"),cr=({page:e,currentPage:t,onClick:r})=>typeof e=="string"?(0,Se.jsx)("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):(0,Se.jsx)("button",{onClick:r,className:`px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold rounded-md ${e===t?"bg-primary-main text-white":"text-gray-900 ring-1 ring-primary-main/30 hover:bg-primary-main/10"}`,children:e}),_t=({totalPages:e,currentPage:t,handlePageClick:r})=>{let o=()=>{let p=Math.floor(1.5),c=Math.max(1,t-p),m=Math.min(e,c+3-1);return m>e&&(c=Math.max(1,e-3+1),m=e),{start:c,end:m}},{start:i,end:l}=o(),s=[];return i>1&&s.push(1),i>2&&s.push("..."),s.push(...Array.from({length:l-i+1},(p,c)=>i+c)),l<e-1&&s.push("..."),l<e&&s.push(e),s.map((p,c)=>(0,Se.jsx)(cr,{page:p,currentPage:t,onClick:typeof p=="number"?()=>r(p):void 0},c))};var B=require("react/jsx-runtime"),Zt=({currentPage:e=1,totalPages:t=1,onPageChange:r})=>{let n=o=>{o>=1&&o<=t&&r?.(o)};return(0,B.jsx)("div",{className:"flex items-center justify-center border-t border-gray-200 bg-white px-4 py-3 sm:px-6",children:(0,B.jsx)("div",{className:"flex flex-1 items-center justify-center w-full max-w-xl",children:(0,B.jsxs)("nav",{className:"isolate inline-flex -space-x-px rounded-md shadow-sm- gap-x-1 sm:gap-x-2",children:[(0,B.jsx)("button",{onClick:()=>n(e-1),disabled:e===1,className:"sm:flex hidden px-2 py-2 text-primary-main/30 ring-1 ring-primary-main/30 rounded-l-md hover:bg-primary-main/10 disabled:opacity-50 disabled:cursor-not-allowed",children:(0,B.jsx)(Ie.ChevronLeftIcon,{className:"size-5"})}),_t({currentPage:e,totalPages:t,handlePageClick:n}),(0,B.jsx)("button",{onClick:()=>n(e+1),disabled:e===t,className:"sm:flex hidden px-2 py-2 text-primary-main/30 ring-1 ring-primary-main/30 rounded-r-md hover:bg-primary-main/10 disabled:opacity-50 disabled:cursor-not-allowed",children:(0,B.jsx)(Ie.ChevronRightIcon,{className:"size-5"})})]})})})};var f=require("react/jsx-runtime"),Xt=({table:e,isMobile:t=!1,onRowClick:r,id:n,onRefetch:o,isRefetching:i,FilterMenu:l,ExtraNode:s,onExport:p,search:c={enabled:!1,debounceRate:700},isLoading:m,pagination:g})=>{let u=()=>{try{o?.()}catch(h){console.error("Error while refetching data",h)}},y=h=>{c?.onSearch?.(h)};return(0,f.jsxs)("div",{className:a("relative w-full rounded-b border-0 overflow-x-auto"),children:[(o||c?.enabled||l||s||p)&&(0,f.jsxs)("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:[(0,f.jsx)("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:c?.enabled&&(0,f.jsxs)("div",{className:" w-full flex gap-x-3",children:[(0,f.jsx)("section",{className:"sm:w-56",children:(0,f.jsx)(De,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:y,debounce:c?.debounceRate})}),(0,f.jsxs)("div",{className:" flex gap-2",children:[o&&(0,f.jsx)(Q,{onClick:u,title:"Refetch Data",disabled:i,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:(0,f.jsx)(Y.RotateCw,{className:a("w-4 h-4",{"animate-spin":i}),size:5})}),l&&(0,f.jsx)(ge,{trigger:(0,f.jsx)("button",{title:"Filter",className:a("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",oe({variant:"outlined",size:"sm"})),children:(0,f.jsx)(Y.ListFilter,{className:"w-4 h-4",size:5})}),children:l})]})]})}),(0,f.jsx)("div",{className:"flex items-start flex-col gap-2 justify-center",children:(0,f.jsx)("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:(0,f.jsxs)("div",{className:"flex gap-2",children:[s&&s,p&&(0,f.jsx)(Q,{variant:"primary",onClick:p,size:"sm",children:"Export"})]})})})]}),(0,f.jsx)("main",{className:"w-full overflow-x-auto mt-5",children:m?(0,f.jsxs)("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[(0,f.jsx)(Y.Loader,{size:20,className:"animate-spin"}),(0,f.jsx)("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?(0,f.jsx)("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:(0,f.jsx)("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):(0,f.jsx)("div",{className:"flex flex-col gap-2",children:(0,f.jsx)(zt,{table:e,isMobile:t,onRowClick:r,id:n})})}),!m&&g?.enabled&&(0,f.jsx)(Zt,{...g,currentPage:g?.currentPage??1,totalPages:g?.totalPages??Math.ceil((g?.totalItems??0)/Math.max(g?.itemsPerPage??1,1))??1,onPageChange:h=>g?.onPageChange?.(h)})]})};0&&(module.exports={Button,CopyableLabel,Country,DebouncedInput,Dialog,FlagComponent,FormLabel,Input,Loader,OTPInput,PasswordInput,PhoneInput,Popover,PopoverContent,PopoverRoot,PopoverTrigger,Select,Status,Table,Textarea,buttonVariants,cn});
1
+ "use strict";var Kt=Object.create;var ve=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var qt=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty;var Jt=(e,t)=>{for(var r in t)ve(e,r,{get:t[r],enumerable:!0})},$e=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ut(t))!jt.call(e,o)&&o!==r&&ve(e,o,{get:()=>t[o],enumerable:!(i=$t(t,o))||i.enumerable});return e};var v=(e,t,r)=>(r=e!=null?Kt(qt(e)):{},$e(t||!e||!e.__esModule?ve(r,"default",{value:e,enumerable:!0}):r,e)),Qt=e=>$e(ve({},"__esModule",{value:!0}),e);var dr={};Jt(dr,{Button:()=>Q,CopyableLabel:()=>Ht,Country:()=>Et,DebouncedInput:()=>ke,Dialog:()=>Pe,FlagComponent:()=>O,FormLabel:()=>R,Input:()=>X,Loader:()=>J,OTPInput:()=>Vt,PasswordInput:()=>Be,PhoneInput:()=>_e,Popover:()=>ge,PopoverContent:()=>G,PopoverRoot:()=>$,PopoverTrigger:()=>V,Select:()=>Tt,Status:()=>Gt,Table:()=>Xt,Textarea:()=>He,buttonVariants:()=>oe,cn:()=>a});module.exports=Qt(dr);var Ye=v(require("react"));var je=v(require("react")),Ae=v(require("@radix-ui/react-label")),Je=require("class-variance-authority");var Ue=require("clsx"),qe=require("tailwind-merge");function a(...e){return(0,qe.twMerge)((0,Ue.clsx)(e))}var Qe=require("react/jsx-runtime"),Yt=(0,Je.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fe=je.forwardRef(({className:e,...t},r)=>(0,Qe.jsx)(Ae.Root,{ref:r,className:a(Yt(),e),...t}));Fe.displayName=Ae.Root.displayName;var te=require("react/jsx-runtime"),R=Ye.default.forwardRef(({className:e,children:t,showAsterisk:r,error:i,...o},n)=>(0,te.jsx)(Fe,{ref:n,className:a(i&&"text-red-500",e),...o,children:r?(0,te.jsxs)("p",{children:[t,(0,te.jsx)("span",{className:"text-red-500",children:"*"})]}):t}));R.displayName="FormLabel";var re=require("react/jsx-runtime"),J=({size:e=16,colour:t="primary"})=>(0,re.jsxs)("svg",{className:"animate-spin",width:e,height:e,viewBox:"0 0 20 20",fill:"none",children:[(0,re.jsx)("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),(0,re.jsx)("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:t==="primary"?"#ffffff":"currentColor",className:"rounded"})]});var xe=v(require("react")),et=require("@radix-ui/react-slot"),tt=require("class-variance-authority");var S=require("react/jsx-runtime"),oe=(0,tt.cva)("overflow-hidden isolate inline-flex h-fit items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background dark:ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:!pointer-events-none",{variants:{variant:{primary:"border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",danger:"border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",neutral:"!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",outlined:"border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60","danger-outlined":"border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60","light-outlined":"border-white text-white hover:opacity-80 disabled:opacity-60","dark-text":"border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",light:"border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"},size:{default:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",sm:"py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),Q=xe.forwardRef(({className:e,variant:t="primary",size:r,asChild:i=!1,isLoading:o=!1,leftNode:n,rightNode:l,LoaderSize:s,...c},d)=>{let m=i?et.Slot:"button",{children:g,disabled:u,...y}=c,h=xe.useRef(null);return(0,S.jsx)(m,{className:a(oe({variant:t,size:r,className:e})),ref:h||d,disabled:u||o,...y,children:(0,S.jsx)("div",{className:"flex font-medium justify-center items-center gap-2",children:o?(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("span",{className:"mx-auto",children:(0,S.jsx)(J,{size:s,colour:"secondary"})})}):(0,S.jsxs)(S.Fragment,{children:[n,g,l]})})})});Q.displayName="Button";var Ne=require("class-variance-authority");var rt=v(require("react")),ot=require("react/jsx-runtime"),I=rt.default.forwardRef(({className:e,children:t,error:r,...i},o)=>{let n=r??t;return n?(0,ot.jsx)("p",{ref:o,className:a("text-xs font-normal text-[#F04248]",e),...i,children:n}):null});I.displayName="ErrorMessage";var at=v(require("react")),nt=require("react/jsx-runtime"),E=at.default.forwardRef(({className:e,...t},r)=>(0,nt.jsx)("div",{ref:r,className:a("text-sm text-[#8E98A8",e),...t}));E.displayName="FormDescription";var T=require("react/jsx-runtime"),Me=(0,Ne.cva)("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:"",neutral:""}},defaultVariants:{status:"default"}}),st=({className:e,status:t,type:r,ref:i,...o})=>(0,T.jsx)("input",{type:r,className:a(Me({status:t}),e),ref:i,...o});st.displayName="BaseInnerInput";var M=(0,Ne.cva)("flex relative h-10 w-full rounded-[4px] dark:!bg-transparent border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-text-primary focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-status-error-bg-dark text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default"}}),it=(0,Ne.cva)("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:"bg-transparent border-0 caret-[#DEDEDE] !px-0"}},defaultVariants:{status:"default",side:"left"}}),X=({className:e,status:t="default",disabled:r,error:i,isLoading:o,sideNodeClassName:n,showAsterisk:l,label:s,description:c,ref:d,...m})=>{let g=t;return i&&(g="error"),o&&(g="loading"),r&&(g="prefilled"),(0,T.jsxs)("div",{className:"relative space-y-1 w-full",children:[s&&(0,T.jsx)(R,{showAsterisk:l,error:i,children:s}),(0,T.jsxs)("div",{className:a(M({status:g}),m.leftNode?"pl-0":"",m.rightNode?"pr-0":"",e),children:[m.leftNode?(0,T.jsx)("div",{className:a(it({status:g,side:"left"}),n),children:m.leftNode}):null,(0,T.jsx)(st,{ref:d,disabled:o||r,className:a({"!pl-3":m.leftNode&&t!=="neutral","!pr-3":m.rightNode&&t!=="neutral"}),...m}),m.rightNode?(0,T.jsx)("div",{className:a(it({status:g,side:"right"}),n),children:m.rightNode}):null]}),c&&(0,T.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:c}),(0,T.jsx)(I,{error:i})]})};X.displayName="Input";var ie=require("react");var ae=require("react/jsx-runtime"),lt=()=>(0,ae.jsxs)("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ae.jsx)("path",{d:"M1.54639 7.26103C1.48389 7.09264 1.48389 6.90741 1.54639 6.73903C2.15517 5.26292 3.18853 4.00081 4.51547 3.1127C5.84241 2.22459 7.40317 1.75049 8.99989 1.75049C10.5966 1.75049 12.1574 2.22459 13.4843 3.1127C14.8113 4.00081 15.8446 5.26292 16.4534 6.73903C16.5159 6.90741 16.5159 7.09264 16.4534 7.26103C15.8446 8.73713 14.8113 9.99925 13.4843 10.8874C12.1574 11.7755 10.5966 12.2496 8.99989 12.2496C7.40317 12.2496 5.84241 11.7755 4.51547 10.8874C3.18853 9.99925 2.15517 8.73713 1.54639 7.26103Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,ae.jsx)("path",{d:"M9 9.25C10.2426 9.25 11.25 8.24264 11.25 7C11.25 5.75736 10.2426 4.75 9 4.75C7.75736 4.75 6.75 5.75736 6.75 7C6.75 8.24264 7.75736 9.25 9 9.25Z",stroke:"#8E98A8",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});var ne=require("react/jsx-runtime"),ct=()=>(0,ne.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ne.jsx)("path",{d:"M4.08759 12.69C3.26171 11.9072 2.61006 10.9591 2.17509 9.90752C2.10081 9.73454 2.0625 9.54826 2.0625 9.36001C2.0625 9.17177 2.10081 8.98549 2.17509 8.81252C2.75274 7.4073 3.72095 6.19704 4.96509 5.32502C6.14597 4.4998 7.55989 4.07405 9.00009 4.11002C10.0363 4.084 11.064 4.30239 12.0001 4.74752M13.9201 6.03752C14.7415 6.81964 15.3904 7.76486 15.8251 8.81252C15.8994 8.98549 15.9377 9.17177 15.9377 9.36001C15.9377 9.54826 15.8994 9.73454 15.8251 9.90752C15.2474 11.3127 14.2792 12.523 13.0351 13.395C11.8542 14.2202 10.4403 14.646 9.00009 14.61C7.9639 14.636 6.93616 14.4176 6.00009 13.9725",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,ne.jsx)("path",{d:"M6.5325 10.2375C6.42732 9.95694 6.37395 9.65962 6.375 9.36C6.375 8.66381 6.65156 7.99613 7.14384 7.50384C7.63613 7.01156 8.30381 6.735 9 6.735C9.3 6.7335 9.597 6.7875 9.8775 6.8925M11.4675 8.4825C11.5725 8.763 11.6265 9.06 11.625 9.36C11.625 10.0562 11.3484 10.7239 10.8562 11.2162C10.3639 11.7084 9.69619 11.985 9 11.985C8.70038 11.986 8.40306 11.9327 8.1225 11.8275M2.25 15L14.25 3",stroke:"#8E98A8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});var Ve=require("react/jsx-runtime"),dt=()=>(0,Ve.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ve.jsx)("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"})});var Oe=require("react/jsx-runtime"),pt=()=>(0,Oe.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Oe.jsx)("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"})});var D=require("react/jsx-runtime"),mt=[{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}],Be=({onValidate:e,onChange:t,disableValidation:r,...i})=>{let[o,n]=(0,ie.useState)(!1),[l,s]=(0,ie.useState)(mt),c=u=>mt.map(y=>({...y,validated:y.RegExp.test(u)})),d=u=>{let y=c(u),h=y.every(ee=>ee.validated);return s(y),h},m=u=>{if(t&&t(u),r)return;let y=u?.target?.value,h=d(y);e&&e(h,y)},g=(0,ie.useMemo)(()=>(0,D.jsx)("div",{className:"flex items-center gap-2",children:l?.map(u=>(0,D.jsxs)("div",{className:a("text-xs flex items-center gap-0.5",{"text-[#62C554]":u?.validated,"text-[#8E98A8]":!u?.validated}),children:[(0,D.jsx)("span",{className:"",children:u?.validated?(0,D.jsx)(dt,{}):(0,D.jsx)(pt,{})}),(0,D.jsx)("span",{className:"",children:u?.label})]},u?.key))}),[l]);return(0,D.jsx)(X,{sideNodeClassName:"!border-l-0",rightNode:o?(0,D.jsx)("button",{type:"button",onClick:()=>n(u=>!u),children:(0,D.jsx)(lt,{})}):(0,D.jsx)("button",{type:"button",onClick:()=>n(u=>!u),children:(0,D.jsx)(ct,{})}),type:o?"text":"password",onChange:m,description:!r&&g,...i})};Be.displayName="PasswordInput";var ut=require("class-variance-authority");var K=require("react/jsx-runtime"),Ur=(0,ut.cva)("flex relative min-h-[80px] w-full rounded-[8px] border transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"border-[#D7D7D7] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-status-error-fill bg-status-error-bg border-status-error-fill dark:!bg-status-error-bg-dark text-status-error-fill focus-within:bg-status-error-bg focus-within:border-status-error-fill",loading:"placeholder:text-[#C4C4C4]",prefilled:"resize-none bg-[#F6F6F6] border-[#D7D7D7] dark:!bg-transparent caret-[#D7D7D7] focus-within:bg-[#F6F6F6] focus-within:border-[#D7D7D7] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]",neutral:""}},defaultVariants:{status:"default"}}),He=({className:e,status:t="default",disabled:r,error:i,isLoading:o,showAsterisk:n,label:l,description:s,...c})=>{let d=t;return i&&(d="error"),o&&(d="loading"),r&&(d="prefilled"),(0,K.jsxs)("div",{className:"relative space-y-1",children:[(0,K.jsx)(R,{showAsterisk:n,error:i,children:l}),(0,K.jsx)("textarea",{className:a("min-h-[80px]",M({status:d}),e),disabled:o||r,...c}),(0,K.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:s}),(0,K.jsx)(I,{error:i})]})};He.displayName="Textarea";var U=v(require("react"));var H=v(require("react")),P=require("cmdk"),xt=require("lucide-react");var le=v(require("react")),C=v(require("@radix-ui/react-dialog"));var se=require("react/jsx-runtime"),ft=()=>(0,se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[(0,se.jsx)("path",{d:"M18 6 6 18"}),(0,se.jsx)("path",{d:"m6 6 12 12"})]});var b=require("react/jsx-runtime"),er=C.Root,tr=C.Trigger,gt=C.Portal,yt=le.forwardRef(({className:e,...t},r)=>(0,b.jsx)(C.Overlay,{ref:r,className:a("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));yt.displayName=C.Overlay.displayName;var We=le.forwardRef(({className:e,hideCloseButton:t,children:r,...i},o)=>(0,b.jsxs)(gt,{children:[(0,b.jsx)(yt,{}),(0,b.jsxs)(C.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...i,children:[r,!t&&(0,b.jsxs)(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:[(0,b.jsx)(ft,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));We.displayName=C.Content.displayName;var bt=({className:e,...t})=>(0,b.jsx)("div",{className:a("flex flex-col space-y-1.5 text-left",e),...t});bt.displayName="DialogHeader";var Ct=({className:e,...t})=>(0,b.jsx)("div",{className:a("flex flex-row justify-end sm:space-x-2",e),...t});Ct.displayName="DialogFooter";var ht=le.forwardRef(({className:e,...t},r)=>(0,b.jsx)(C.Title,{ref:r,className:a("text-xl font-semibold leading-none tracking-tight",e),...t}));ht.displayName=C.Title.displayName;var vt=le.forwardRef(({className:e,...t},r)=>(0,b.jsx)(C.Description,{ref:r,className:a("text-sm text-gray-500",e),...t}));vt.displayName=C.Description.displayName;var Pe=({trigger:e=void 0,children:t,open:r,onOpenChange:i,hideCloseButton:o,footer:n,title:l,description:s,contentClassName:c,headerClassName:d,titleClassName:m,descriptionClassName:g,footerClassName:u,asChild:y=!0,onOpenAutoFocus:h,onCloseAutoFocus:ee,onEscapeKeyDown:he,onInteractOutside:q,onPointerDownOutside:Ee,...Te})=>(0,b.jsxs)(er,{...Te,open:r,onOpenChange:i,children:[(0,b.jsx)(tr,{asChild:y,children:e}),(0,b.jsx)(gt,{children:(0,b.jsxs)(We,{className:c,hideCloseButton:o,onOpenAutoFocus:h,onCloseAutoFocus:ee,onEscapeKeyDown:he,onPointerDownOutside:Ee,onInteractOutside:q,children:[l||s?(0,b.jsxs)(bt,{className:d,children:[l&&(0,b.jsx)(ht,{className:m,children:l}),s&&(0,b.jsx)(vt,{className:g,children:s})]}):(0,b.jsx)(b.Fragment,{}),t,n&&(0,b.jsx)(Ct,{className:u,children:n})]})})]});Pe.displayName=C.Dialog.displayName;var w=require("react/jsx-runtime"),ce=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(P.Command,{ref:r,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ce.displayName=P.Command.displayName;var de=H.forwardRef(({className:e,CommandInputContainerClassName:t,loading:r,...i},o)=>(0,w.jsxs)("div",{className:a("flex items-center border-0 px-3 gap-2",t),"cmdk-input-wrapper":"",children:[r?(0,w.jsx)(J,{size:16,colour:"secondary"}):(0,w.jsx)(xt.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,w.jsx)(P.Command.Input,{ref:o,className:a("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:r,...i})]}));de.displayName=P.Command.Input.displayName;var pe=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(P.Command.List,{ref:r,className:a("overflow-y-auto overflow-x-hidden",e),...t}));pe.displayName=P.Command.List.displayName;var me=H.forwardRef((e,t)=>(0,w.jsx)(P.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));me.displayName=P.Command.Empty.displayName;var ue=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(P.Command.Group,{ref:r,className:a("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ue.displayName=P.Command.Group.displayName;var rr=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(P.Command.Separator,{ref:r,className:a("-mx-1 h-px bg-border",e),...t}));rr.displayName=P.Command.Separator.displayName;var fe=H.forwardRef(({className:e,...t},r)=>(0,w.jsx)(P.Command.Item,{ref:r,className:a("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));fe.displayName=P.Command.Item.displayName;var or=({className:e,...t})=>(0,w.jsx)("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});or.displayName="CommandShortcut";var Nt=v(require("react")),A=v(require("@radix-ui/react-popover"));var W=require("react/jsx-runtime"),$=A.Root,V=A.Trigger,G=Nt.forwardRef(({className:e,align:t="center",sideOffset:r=4,portal:i=!0,...o},n)=>i?(0,W.jsx)(A.Portal,{children:(0,W.jsx)(A.Content,{ref:n,align:t,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o})}):(0,W.jsx)(A.Content,{ref:n,align:t,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o}));G.displayName=A.Content.displayName;var ge=({trigger:e,children:t,open:r,onOpenChange:i,contentClassName:o,asChild:n=!0,align:l,side:s,alignOffset:c,triggerClassName:d,sideOffset:m,onOpenAutoFocus:g,onCloseAutoFocus:u,portal:y=!0,...h})=>(0,W.jsxs)($,{...h,open:r,onOpenChange:i,children:[(0,W.jsx)(V,{asChild:n,className:d,children:e}),(0,W.jsx)(G,{alignOffset:c,sideOffset:m,side:s,align:l,className:o,onOpenAutoFocus:g,onCloseAutoFocus:u,portal:y,children:t})]});ge.displayName=A.Root.displayName;var Ge=v(require("react")),k=v(require("@radix-ui/react-scroll-area"));var z=require("react/jsx-runtime"),ye=Ge.forwardRef(({className:e,viewPortClassName:t,children:r,...i},o)=>(0,z.jsxs)(k.Root,{ref:o,className:a("relative overflow-hidden",e),...i,children:[(0,z.jsx)(k.Viewport,{className:a("h-full w-full rounded-[inherit]",t),children:r}),(0,z.jsx)(Pt,{}),(0,z.jsx)(k.Corner,{})]}));ye.displayName=k.Root.displayName;var Pt=Ge.forwardRef(({className:e,orientation:t="vertical",...r},i)=>(0,z.jsx)(k.ScrollAreaScrollbar,{ref:i,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,z.jsx)(k.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));Pt.displayName=k.ScrollAreaScrollbar.displayName;var N=require("react/jsx-runtime"),wt=({className:e,value:t,placeholder:r="",status:i,disabled:o})=>(0,N.jsx)(V,{asChild:!0,disabled:o,children:(0,N.jsxs)("button",{disabled:o,className:a(M({status:i}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t??r??"Select options...",(0,N.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,N.jsx)("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),we=({options:e=[],value:t,onChange:r,containerClassName:i,placeholder:o,disabled:n,loading:l,optionComponent:s,children:c,modal:d=!1,hideSearch:m,className:g,inputValue:u,onValueChange:y,onInputValueChange:h})=>{let[ee,he]=U.useState(!1),q=U.useRef(null),[Ee,Te]=U.useState(void 0);return U.useLayoutEffect(()=>{q.current&&Te(q.current.clientWidth)},[q.current]),(0,N.jsxs)($,{modal:d,open:ee,onOpenChange:he,children:[(0,N.jsx)("div",{className:a("w-full",g),ref:q,children:c}),(0,N.jsx)(G,{portal:!d,className:"p-0 min-w-[200px]",style:{width:Ee},children:(0,N.jsxs)(ce,{className:a("relative max-h-[270px]",{"mt-2":!m}),children:[!m&&(0,N.jsx)(de,{loading:l,placeholder:o??"Search options...",onValueChange:h,value:u,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),(0,N.jsx)(ye,{viewPortClassName:"max-h-[225px]",className:a("w-full px-0 h-full overflow-y-auto",i),children:(0,N.jsxs)(pe,{children:[!m&&(0,N.jsx)(me,{children:"No result found."}),(0,N.jsx)(ue,{className:"w-full",children:e?.map(j=>(0,N.jsx)(fe,{defaultValue:t?.label,value:j.label,disabled:n,onSelect:()=>{r(j),he(!1),y?.(j?.value)},children:s?s(j):j.label},j.value))})]})})]})})]})};var ze=[{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"}],Rt=()=>{let e={};return ze?.forEach(t=>{e[t?.internetCountryCode]=t?.countryName}),e};var be=v(require("react")),kt=v(require("react-phone-number-input")),Lt=v(require("react-phone-number-input")),St=v(require("react-phone-number-input/flags"));var _=require("react/jsx-runtime"),ar=e=>(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...e,children:[(0,_.jsx)("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",(0,_.jsx)("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"}),(0,_.jsx)("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),(0,_.jsx)("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),(0,_.jsx)("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Dt=ar;var p=require("react/jsx-runtime"),_e=be.forwardRef(({className:e,onChange:t,value:r,modal:i,showAsterisk:o,label:n,description:l,error:s,defaultCountry:c="NG",...d},m)=>{let g=y=>(0,p.jsx)(nr,{...y,status:d.status,modal:i,onChange:h=>y.onChange(h)}),u=r;return(0,p.jsxs)("div",{className:"relative space-y-1",children:[(0,p.jsx)(R,{showAsterisk:o,error:s,children:n}),(0,p.jsx)(Lt.default,{ref:m,className:a("flex",e),flagComponent:O,countrySelectComponent:g,focusInputOnCountrySelection:!0,countryCallingCodeEditable:!0,enableLongNumber:!0,addInternationalOption:!0,international:!0,inputComponent:It,defaultCountry:c,containerComponent:({children:y})=>(0,p.jsx)("div",{className:a(M({status:d?.status}),"p-0 gap-1"),children:y}),...d,onChange:y=>{t&&t(y)},value:u}),(0,p.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:l}),(0,p.jsx)(I,{error:s})]})});_e.displayName="PhoneInput";var It=be.forwardRef(({className:e,...t},r)=>(0,p.jsx)("input",{className:a(Me({status:t?.status})," h-full !-mt-0 border-0 rounded-l-none !flex-1 !block !w-full",e),...t,ref:r}));It.displayName="InputComponent";var nr=({disabled:e,value:t,onChange:r,options:i,status:o,modal:n})=>{let l=be.useCallback(s=>{console.log(s),r(s)},[r]);return(0,p.jsxs)($,{modal:n,children:[(0,p.jsx)(V,{disabled:e,children:(0,p.jsxs)("div",{className:a(M({status:o}),"!border-0 transition justify-center items-center disabled:text-base-500 flex gap-3 h-full rounded-e-none pl-2 pr-2"),children:[(0,p.jsx)(O,{country:t,countryName:t}),(0,p.jsx)("svg",{className:a("-mr-2 h-4 w-4 opacity-50",e?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,p.jsx)("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),(0,p.jsx)(G,{portal:!n,className:"w-[200px] md:w-[300px] p-0",children:(0,p.jsx)(ce,{children:(0,p.jsx)(pe,{children:(0,p.jsxs)(ye,{className:"h-72",children:[(0,p.jsx)(de,{placeholder:"Search country..."}),(0,p.jsx)(me,{children:"No country found."}),(0,p.jsx)(ue,{children:i.filter(s=>s.value).map(s=>(0,p.jsxs)(fe,{className:"gap-2",onSelect:()=>l(s.value),children:[(0,p.jsx)(O,{country:s.value,countryName:s.label}),(0,p.jsx)("span",{className:"flex-1 text-sm",children:s.label}),s.value&&(0,p.jsx)("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${kt.getCountryCallingCode(s.value)}`}),(0,p.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:a("ml-auto",s.value===t?"opacity-100":"opacity-0"),children:(0,p.jsx)("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},O=({country:e,countryName:t,className:r})=>{let i=St.default[e];return e==="GLOBAL"?(0,p.jsx)("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:(0,p.jsx)(Dt,{className:"w-full h-[90%]"})}):(0,p.jsx)("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:i&&(0,p.jsx)(i,{title:t})})};O.displayName="FlagComponent";var x=require("react/jsx-runtime"),ir=Rt(),sr=({className:e,value:t,placeholder:r="",status:i,disabled:o})=>(0,x.jsx)(V,{asChild:!0,disabled:o,children:(0,x.jsxs)("button",{disabled:o,className:a(M({status:i}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",t?"":"text-[#79818C]",e),children:[t?(0,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(O,{country:t,countryName:t,className:"ml-1 !w-6 h-5"}),(0,x.jsxs)("span",{className:"",children:[" ",ir[t]]})]}):r??"Select options...",(0,x.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,x.jsx)("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),Et=({hideSearch:e=!0,showAsterisk:t,label:r,description:i,error:o,...n})=>{let l=ze?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return(0,x.jsxs)("div",{className:"relative space-y-1",children:[(0,x.jsx)(R,{showAsterisk:t,error:o,children:r}),(0,x.jsx)(we,{options:l,hideSearch:e,optionComponent:s=>(0,x.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,x.jsx)(O,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),(0,x.jsx)("span",{className:"flex-1 text-sm",children:s?.label})]}),...n,children:(0,x.jsx)(sr,{value:n?.value?.value,status:n?.status,placeholder:n?.placeholder??" Select Country"})}),(0,x.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:i}),(0,x.jsx)(I,{error:o})]})};var Z=require("react/jsx-runtime"),Tt=({showAsterisk:e,label:t,description:r,error:i,hideSearch:o=!0,status:n,...l})=>(0,Z.jsxs)("div",{className:"relative space-y-1",children:[(0,Z.jsx)(R,{showAsterisk:e,error:i,children:t}),(0,Z.jsx)(we,{hideSearch:o,...l,containerClassName:"h-full",children:(0,Z.jsx)(wt,{disabled:l?.disabled,placeholder:"Select or search email",status:n,value:l?.value?.label??l?.value?.value})}),(0,Z.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:r}),(0,Z.jsx)(I,{error:i})]});var At=v(require("react-otp-input"));var Ft=require("class-variance-authority"),Mt=require("react"),Ze=require("react/jsx-runtime"),lr=(0,Ft.cva)("transition cursor-default placeholder:text-black dark:placeholder:text-white rounded-lg !h-14 !w-14 border aspect-square text-base font-semibold tracking-normal outline-none placeholder:text-sm placeholder:font-normal text-black focus:bg-white",{variants:{status:{default:"border-gray-300 dark:border-[#d4d4d4] focus:border-gray-400 focus-visible:!ring-offset-gray-200 focus:ring-offset-gray-200 !ring-gray-200 !focus-visible:ring-1 bg-white dark:!bg-transparent dark:focus-visible:!ring-0 dark:focus-within:!bg-transparent dark:text-white dark:focus-within:border-[#9299A2] dark:border-[#676767] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",loading:"placeholder:text-[#C4C4C4]"}},defaultVariants:{status:"default"}}),Vt=({numInputs:e=4,inputStyle:t,containerStyle:r,placeholder:i="-",status:o,...n})=>{let l=(0,Mt.useMemo)(()=>i||new Array(e).fill("").reduce((d,m)=>d+=m,""),[e,i]);return(0,Ze.jsx)(At.default,{numInputs:e,placeholder:l,containerStyle:a("w-full",r),inputStyle:a(lr({status:o}),t),renderInput:s=>(0,Ze.jsx)("input",{...s}),...n})};var Bt=require("react"),Re=require("lucide-react"),De=require("framer-motion"),B=require("react/jsx-runtime"),Ht=({text:e,onCopy:t,iconsPosition:r="right",clampText:i=!0})=>{let[o,n]=(0,Bt.useState)(!1),l=()=>{navigator.clipboard.writeText(e).then(()=>{n(!0),t?.(),setTimeout(()=>n(!1),2e3)})},s=o?Re.CheckIcon:Re.Copy;return(0,B.jsxs)("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"&&(0,B.jsx)(Ot,{Icon:s,onClick:l,copied:o}),(0,B.jsx)("span",{className:`${i?"truncate max-w-[100px]":""}`,children:e}),r==="right"&&(0,B.jsx)(Ot,{Icon:s,onClick:l,copied:o})]})},Ot=({Icon:e,onClick:t,copied:r})=>(0,B.jsx)(De.AnimatePresence,{mode:"wait",children:(0,B.jsx)(De.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:t,children:(0,B.jsx)(e,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});var Ce=require("react");var Wt=require("lucide-react"),Xe=require("react/jsx-runtime"),ke=({value:e,onChange:t,debounce:r=500,addon:i,...o})=>{let[n,l]=(0,Ce.useState)(e??""),s=c=>l(c.target.value);return(0,Ce.useEffect)(()=>{e&&l(e)},[e]),(0,Ce.useEffect)(()=>{let c=setTimeout(()=>{t(n)},r);return()=>clearTimeout(c)},[n,r,t]),(0,Xe.jsx)(X,{leftNode:i??(0,Xe.jsx)(Wt.Search,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...o,className:a("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",o?.className),onChange:s,value:n})};var Le=require("react/jsx-runtime"),Gt=({status:e,variant:t,className:r})=>(0,Le.jsx)("div",{children:(0,Le.jsx)("div",{className:a("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":t==="success"},{"bg-gray-500/20 text-white":t==="abandoned"},{"bg-red-500/20 text-red-500":t==="failed"},{"bg-yellow-500/20 text-yellow-500":t==="pending"},r),children:(0,Le.jsx)("p",{children:e.replace("-"," ")})})});var Y=require("lucide-react");var Ke=require("@tanstack/react-table");var L=require("react/jsx-runtime"),zt=({table:e,isMobile:t,onRowClick:r,id:i})=>(0,L.jsx)("div",{className:a("relative w-full rounded-b border-0",{}),children:(0,L.jsxs)("table",{id:i??"table",className:"w-full overflow-x-scroll",children:[(0,L.jsx)("thead",{children:e.getHeaderGroups().map(o=>(0,L.jsx)("tr",{className:a(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:o.headers.map(n=>(0,L.jsx)("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:(0,L.jsx)("div",{className:a("flex items-center",{"cursor-pointer select-none":n.column.getCanSort()}),onClick:n.column.getToggleSortingHandler(),children:n.isPlaceholder?null:(0,Ke.flexRender)(n.column.columnDef.header,n.getContext())})},n.id))},o.id))}),(0,L.jsx)("tbody",{className:" pl-2.5",children:e?.getFilteredRowModel().rows.map(o=>(0,L.jsx)("tr",{className:a("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!t},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(o):{},children:o.getVisibleCells().map(n=>(0,L.jsx)("td",{className:a("",{}),children:(0,L.jsx)("div",{className:a("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:(0,Ke.flexRender)(n.column.columnDef.cell,n.getContext())})},n.id))},o.id))})]})});var Ie=require("lucide-react");var Se=require("react/jsx-runtime"),cr=({page:e,currentPage:t,onClick:r})=>typeof e=="string"?(0,Se.jsx)("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:e}):(0,Se.jsx)("button",{onClick:r,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${e===t?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:e}),_t=({totalPages:e,currentPage:t,handlePageClick:r})=>{let o=()=>{let c=Math.floor(1.5),d=Math.max(1,t-c),m=Math.min(e,d+3-1);return m>e&&(d=Math.max(1,e-3+1),m=e),{start:d,end:m}},{start:n,end:l}=o(),s=[];return n>1&&s.push(1),n>2&&s.push("..."),s.push(...Array.from({length:l-n+1},(c,d)=>n+d)),l<e-1&&s.push("..."),l<e&&s.push(e),s.map((c,d)=>(0,Se.jsx)(cr,{page:c,currentPage:t,onClick:typeof c=="number"?()=>r(c):void 0},d))};var F=require("react/jsx-runtime"),Zt=({currentPage:e=1,totalPages:t=1,onPageChange:r,itemsPerPage:i=0,totalItems:o=0})=>{let n=c=>{c>=1&&c<=t&&r?.(c)},l=i===0?1:i*(e-1)+1,s=e===t?o:Math.min(l+i-1,o);return(0,F.jsxs)("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10",children:[(0,F.jsx)("section",{className:"text-[#717171] text-[12px]",children:(0,F.jsxs)("p",{className:"",children:["Showing ",l," - ",s," of ",o]})}),(0,F.jsx)("div",{className:"flex flex-1- items-center justify-center sm:justify-end w-full sm:max-w-xl max-w-full ",children:(0,F.jsxs)("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[(0,F.jsx)("button",{onClick:()=>n(e-1),disabled:e===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:(0,F.jsx)(Ie.ChevronLeftIcon,{className:"size-5"})}),_t({currentPage:e,totalPages:t,handlePageClick:n}),(0,F.jsx)("button",{onClick:()=>n(e+1),disabled:e===t,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:(0,F.jsx)(Ie.ChevronRightIcon,{className:"size-5"})})]})})]})};var f=require("react/jsx-runtime"),Xt=({table:e,isMobile:t=!1,onRowClick:r,id:i,onRefetch:o,isRefetching:n,FilterMenu:l,ExtraNode:s,onExport:c,search:d={enabled:!1,debounceRate:700},isLoading:m,pagination:g})=>{let u=()=>{try{o?.()}catch(h){console.error("Error while refetching data",h)}},y=h=>{d?.onSearch?.(h)};return(0,f.jsxs)("div",{className:a("relative w-full rounded-b border-0 overflow-x-auto"),children:[(o||d?.enabled||l||s||c)&&(0,f.jsxs)("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:[(0,f.jsx)("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:d?.enabled&&(0,f.jsxs)("div",{className:" w-full flex gap-x-3",children:[(0,f.jsx)("section",{className:"sm:w-56",children:(0,f.jsx)(ke,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:y,debounce:d?.debounceRate})}),(0,f.jsxs)("div",{className:" flex gap-2",children:[o&&(0,f.jsx)(Q,{onClick:u,title:"Refetch Data",disabled:n,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:(0,f.jsx)(Y.RotateCw,{className:a("w-4 h-4",{"animate-spin":n}),size:5})}),l&&(0,f.jsx)(ge,{trigger:(0,f.jsx)("button",{title:"Filter",className:a("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",oe({variant:"outlined",size:"sm"})),children:(0,f.jsx)(Y.ListFilter,{className:"w-4 h-4",size:5})}),children:l})]})]})}),(0,f.jsx)("div",{className:"flex items-start flex-col gap-2 justify-center",children:(0,f.jsx)("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:(0,f.jsxs)("div",{className:"flex gap-2",children:[s&&s,c&&(0,f.jsx)(Q,{variant:"primary",onClick:c,size:"sm",children:"Export"})]})})})]}),(0,f.jsx)("main",{className:"w-full overflow-x-auto mt-5",children:m?(0,f.jsxs)("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[(0,f.jsx)(Y.Loader,{size:20,className:"animate-spin"}),(0,f.jsx)("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):e.getRowModel().rows.length<1?(0,f.jsx)("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:(0,f.jsx)("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):(0,f.jsx)("div",{className:"flex flex-col gap-2",children:(0,f.jsx)(zt,{table:e,isMobile:t,onRowClick:r,id:i})})}),!m&&g?.enabled&&(0,f.jsx)(Zt,{...g,currentPage:g?.currentPage??1,totalPages:g?.totalPages??Math.ceil((g?.totalItems??0)/Math.max(g?.itemsPerPage??1,1))??1,onPageChange:h=>g?.onPageChange?.(h)})]})};0&&(module.exports={Button,CopyableLabel,Country,DebouncedInput,Dialog,FlagComponent,FormLabel,Input,Loader,OTPInput,PasswordInput,PhoneInput,Popover,PopoverContent,PopoverRoot,PopoverTrigger,Select,Status,Table,Textarea,buttonVariants,cn});
2
2
  //# sourceMappingURL=index.js.map