@6thbridge/hexa 0.0.13 → 0.0.15

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.11 lint /Users/joachim/Documents/dev/payfusion/payfusion-component-library/packages/6thbridge-hexa
3
+ > @6thbridge/hexa@0.0.14 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
@@ -5,8 +5,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
6
6
  import { VariantProps } from 'class-variance-authority';
7
7
  import * as RPNInput from 'react-phone-number-input';
8
- import { OTPInputProps as OTPInputProps$1 } from 'react-otp-input';
9
8
  import * as DialogPrimitive from '@radix-ui/react-dialog';
9
+ import { OTPInputProps as OTPInputProps$1 } from 'react-otp-input';
10
10
  import * as PopoverPrimitive from '@radix-ui/react-popover';
11
11
  import { RowData, Table as Table$1, Row } from '@tanstack/react-table';
12
12
  import { ClassValue } from 'clsx';
@@ -37,12 +37,12 @@ interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonE
37
37
  declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
38
38
 
39
39
  declare const inputVariants: (props?: ({
40
- status?: "loading" | "default" | "error" | "prefilled" | null | undefined;
40
+ status?: "loading" | "default" | "error" | "neutral" | "prefilled" | null | undefined;
41
41
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
42
42
  interface BaseInnerInputProps extends DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, VariantProps<typeof inputVariants> {
43
43
  }
44
44
  declare const inputContainerVariants: (props?: ({
45
- status?: "loading" | "default" | "error" | "prefilled" | null | undefined;
45
+ status?: "loading" | "default" | "error" | "neutral" | "prefilled" | null | undefined;
46
46
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
47
47
  interface InputProps extends BaseInnerInputProps, VariantProps<typeof inputContainerVariants> {
48
48
  isLoading?: boolean;
@@ -66,9 +66,10 @@ type PasswordInputProps = InputProps & {
66
66
  * args - value: this is the string input value
67
67
  */
68
68
  onValidate?: (validated: boolean, value: string) => void;
69
+ disableValidation?: boolean;
69
70
  };
70
71
  declare const PasswordInput: {
71
- ({ onValidate, onChange, ...props }: PasswordInputProps): react_jsx_runtime.JSX.Element;
72
+ ({ onValidate, onChange, disableValidation, ...props }: PasswordInputProps): react_jsx_runtime.JSX.Element;
72
73
  displayName: string;
73
74
  };
74
75
 
@@ -91,8 +92,8 @@ type SearchableDataType = {
91
92
  [key: string]: any;
92
93
  };
93
94
 
94
- type SelectPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
95
- interface SelectProps {
95
+ type CountryPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
96
+ interface CountryProps {
96
97
  modal?: boolean;
97
98
  hideSearch?: boolean;
98
99
  loading?: boolean;
@@ -101,21 +102,20 @@ interface SelectProps {
101
102
  disabled?: boolean;
102
103
  placeholder?: string;
103
104
  value?: SearchableDataType;
104
- options: SearchableDataType[];
105
105
  optionComponent?: (arg: SearchableDataType) => React.ReactNode;
106
106
  className?: string;
107
107
  containerClassName?: string;
108
108
  onChange: (value: SearchableDataType) => void;
109
- status?: SelectPropsStatus;
109
+ status?: CountryPropsStatus;
110
110
  label?: string;
111
111
  showAsterisk?: boolean;
112
112
  description?: React.ReactNode;
113
113
  error?: string;
114
114
  }
115
- declare const Select: ({ showAsterisk, label, description, error, hideSearch, status, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
115
+ declare const Country: ({ hideSearch, showAsterisk, label, description, error, ...props }: CountryProps) => react_jsx_runtime.JSX.Element;
116
116
 
117
- type CountryPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
118
- interface CountryProps {
117
+ type SelectPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
118
+ interface SelectProps {
119
119
  modal?: boolean;
120
120
  hideSearch?: boolean;
121
121
  loading?: boolean;
@@ -124,17 +124,18 @@ interface CountryProps {
124
124
  disabled?: boolean;
125
125
  placeholder?: string;
126
126
  value?: SearchableDataType;
127
+ options: SearchableDataType[];
127
128
  optionComponent?: (arg: SearchableDataType) => React.ReactNode;
128
129
  className?: string;
129
130
  containerClassName?: string;
130
131
  onChange: (value: SearchableDataType) => void;
131
- status?: CountryPropsStatus;
132
+ status?: SelectPropsStatus;
132
133
  label?: string;
133
134
  showAsterisk?: boolean;
134
135
  description?: React.ReactNode;
135
136
  error?: string;
136
137
  }
137
- declare const Country: ({ hideSearch, showAsterisk, label, description, error, ...props }: CountryProps) => react_jsx_runtime.JSX.Element;
138
+ declare const Select: ({ showAsterisk, label, description, error, hideSearch, status, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
138
139
 
139
140
  type PhoneInputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & Omit<RPNInput.Props<typeof RPNInput.default>, "onChange"> & {
140
141
  onChange?: (value?: RPNInput.Value) => void;
@@ -156,13 +157,6 @@ declare const FlagComponent: {
156
157
  displayName: string;
157
158
  };
158
159
 
159
- declare const otpInputVariants: (props?: ({
160
- status?: "loading" | "default" | "error" | null | undefined;
161
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
162
- type DefailtInputProps = Omit<OTPInputProps$1, "renderInput">;
163
- type OTPInputProps = DefailtInputProps & VariantProps<typeof otpInputVariants> & {};
164
- declare const OTPInput: ({ numInputs, inputStyle, containerStyle, placeholder, status, ...props }: OTPInputProps) => react_jsx_runtime.JSX.Element;
165
-
166
160
  type DialogPropsType = {
167
161
  trigger?: React$1.ReactNode;
168
162
  children: React$1.ReactNode;
@@ -187,6 +181,13 @@ declare const Dialog: {
187
181
  displayName: string | undefined;
188
182
  };
189
183
 
184
+ declare const otpInputVariants: (props?: ({
185
+ status?: "loading" | "default" | "error" | null | undefined;
186
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
187
+ type DefailtInputProps = Omit<OTPInputProps$1, "renderInput">;
188
+ type OTPInputProps = DefailtInputProps & VariantProps<typeof otpInputVariants> & {};
189
+ declare const OTPInput: ({ numInputs, inputStyle, containerStyle, placeholder, status, ...props }: OTPInputProps) => react_jsx_runtime.JSX.Element;
190
+
190
191
  declare const PopoverRoot: React$1.FC<PopoverPrimitive.PopoverProps>;
191
192
  declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
192
193
  declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
@@ -219,28 +220,41 @@ interface CopyableLabelProps {
219
220
  }
220
221
  declare const CopyableLabel: React.FC<CopyableLabelProps>;
221
222
 
223
+ type DebouncedInputProps = {
224
+ value?: string;
225
+ onChange: (e: string) => void;
226
+ debounce?: number;
227
+ addon?: React__default.ReactNode;
228
+ } & Omit<BaseInnerInputProps, "onChange" | "size">;
229
+ declare const DebouncedInput: ({ value: initialValue, onChange, debounce, addon, ...props }: DebouncedInputProps) => react_jsx_runtime.JSX.Element;
230
+
231
+ type Variant = "success" | "failed" | "pending" | "abandoned";
232
+ declare const Status: ({ status, variant, className, }: {
233
+ status: string;
234
+ variant: Variant;
235
+ className?: string;
236
+ }) => react_jsx_runtime.JSX.Element;
237
+
238
+ type TableSearchProps = {
239
+ enabled: boolean;
240
+ debounceRate?: number;
241
+ onSearch?: (query: string) => void;
242
+ };
222
243
  type TableProps<T extends RowData> = {
223
244
  table: Table$1<T>;
224
245
  isMobile?: boolean;
225
246
  onRowClick?: (row: Row<T>) => void;
226
247
  id?: string;
227
248
  onRefetch?: () => void;
228
- onSearch?: (query: string) => void;
229
249
  ExtraNode?: ReactNode;
230
250
  onExport?: () => void;
231
251
  FilterMenu?: ReactNode;
232
252
  isRefetching?: boolean;
233
253
  buttonClassName?: string;
254
+ search?: TableSearchProps;
234
255
  };
235
- declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, onSearch, }: TableProps<T>) => react_jsx_runtime.JSX.Element;
236
-
237
- type Variant = "success" | "failed" | "pending" | "abandoned";
238
- declare const Status: ({ status, variant, className, }: {
239
- status: string;
240
- variant: Variant;
241
- className?: string;
242
- }) => react_jsx_runtime.JSX.Element;
256
+ declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, }: TableProps<T>) => react_jsx_runtime.JSX.Element;
243
257
 
244
258
  declare function cn(...inputs: ClassValue[]): string;
245
259
 
246
- export { Button, CopyableLabel, Country, Dialog, FlagComponent, FormLabel, Input, Loader, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, Textarea, buttonVariants, cn };
260
+ export { Button, CopyableLabel, Country, DebouncedInput, Dialog, FlagComponent, FormLabel, Input, Loader, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, Textarea, buttonVariants, cn };
package/dist/index.d.ts CHANGED
@@ -5,8 +5,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
6
6
  import { VariantProps } from 'class-variance-authority';
7
7
  import * as RPNInput from 'react-phone-number-input';
8
- import { OTPInputProps as OTPInputProps$1 } from 'react-otp-input';
9
8
  import * as DialogPrimitive from '@radix-ui/react-dialog';
9
+ import { OTPInputProps as OTPInputProps$1 } from 'react-otp-input';
10
10
  import * as PopoverPrimitive from '@radix-ui/react-popover';
11
11
  import { RowData, Table as Table$1, Row } from '@tanstack/react-table';
12
12
  import { ClassValue } from 'clsx';
@@ -37,12 +37,12 @@ interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonE
37
37
  declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
38
38
 
39
39
  declare const inputVariants: (props?: ({
40
- status?: "loading" | "default" | "error" | "prefilled" | null | undefined;
40
+ status?: "loading" | "default" | "error" | "neutral" | "prefilled" | null | undefined;
41
41
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
42
42
  interface BaseInnerInputProps extends DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, VariantProps<typeof inputVariants> {
43
43
  }
44
44
  declare const inputContainerVariants: (props?: ({
45
- status?: "loading" | "default" | "error" | "prefilled" | null | undefined;
45
+ status?: "loading" | "default" | "error" | "neutral" | "prefilled" | null | undefined;
46
46
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
47
47
  interface InputProps extends BaseInnerInputProps, VariantProps<typeof inputContainerVariants> {
48
48
  isLoading?: boolean;
@@ -66,9 +66,10 @@ type PasswordInputProps = InputProps & {
66
66
  * args - value: this is the string input value
67
67
  */
68
68
  onValidate?: (validated: boolean, value: string) => void;
69
+ disableValidation?: boolean;
69
70
  };
70
71
  declare const PasswordInput: {
71
- ({ onValidate, onChange, ...props }: PasswordInputProps): react_jsx_runtime.JSX.Element;
72
+ ({ onValidate, onChange, disableValidation, ...props }: PasswordInputProps): react_jsx_runtime.JSX.Element;
72
73
  displayName: string;
73
74
  };
74
75
 
@@ -91,8 +92,8 @@ type SearchableDataType = {
91
92
  [key: string]: any;
92
93
  };
93
94
 
94
- type SelectPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
95
- interface SelectProps {
95
+ type CountryPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
96
+ interface CountryProps {
96
97
  modal?: boolean;
97
98
  hideSearch?: boolean;
98
99
  loading?: boolean;
@@ -101,21 +102,20 @@ interface SelectProps {
101
102
  disabled?: boolean;
102
103
  placeholder?: string;
103
104
  value?: SearchableDataType;
104
- options: SearchableDataType[];
105
105
  optionComponent?: (arg: SearchableDataType) => React.ReactNode;
106
106
  className?: string;
107
107
  containerClassName?: string;
108
108
  onChange: (value: SearchableDataType) => void;
109
- status?: SelectPropsStatus;
109
+ status?: CountryPropsStatus;
110
110
  label?: string;
111
111
  showAsterisk?: boolean;
112
112
  description?: React.ReactNode;
113
113
  error?: string;
114
114
  }
115
- declare const Select: ({ showAsterisk, label, description, error, hideSearch, status, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
115
+ declare const Country: ({ hideSearch, showAsterisk, label, description, error, ...props }: CountryProps) => react_jsx_runtime.JSX.Element;
116
116
 
117
- type CountryPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
118
- interface CountryProps {
117
+ type SelectPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
118
+ interface SelectProps {
119
119
  modal?: boolean;
120
120
  hideSearch?: boolean;
121
121
  loading?: boolean;
@@ -124,17 +124,18 @@ interface CountryProps {
124
124
  disabled?: boolean;
125
125
  placeholder?: string;
126
126
  value?: SearchableDataType;
127
+ options: SearchableDataType[];
127
128
  optionComponent?: (arg: SearchableDataType) => React.ReactNode;
128
129
  className?: string;
129
130
  containerClassName?: string;
130
131
  onChange: (value: SearchableDataType) => void;
131
- status?: CountryPropsStatus;
132
+ status?: SelectPropsStatus;
132
133
  label?: string;
133
134
  showAsterisk?: boolean;
134
135
  description?: React.ReactNode;
135
136
  error?: string;
136
137
  }
137
- declare const Country: ({ hideSearch, showAsterisk, label, description, error, ...props }: CountryProps) => react_jsx_runtime.JSX.Element;
138
+ declare const Select: ({ showAsterisk, label, description, error, hideSearch, status, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
138
139
 
139
140
  type PhoneInputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value"> & Omit<RPNInput.Props<typeof RPNInput.default>, "onChange"> & {
140
141
  onChange?: (value?: RPNInput.Value) => void;
@@ -156,13 +157,6 @@ declare const FlagComponent: {
156
157
  displayName: string;
157
158
  };
158
159
 
159
- declare const otpInputVariants: (props?: ({
160
- status?: "loading" | "default" | "error" | null | undefined;
161
- } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
162
- type DefailtInputProps = Omit<OTPInputProps$1, "renderInput">;
163
- type OTPInputProps = DefailtInputProps & VariantProps<typeof otpInputVariants> & {};
164
- declare const OTPInput: ({ numInputs, inputStyle, containerStyle, placeholder, status, ...props }: OTPInputProps) => react_jsx_runtime.JSX.Element;
165
-
166
160
  type DialogPropsType = {
167
161
  trigger?: React$1.ReactNode;
168
162
  children: React$1.ReactNode;
@@ -187,6 +181,13 @@ declare const Dialog: {
187
181
  displayName: string | undefined;
188
182
  };
189
183
 
184
+ declare const otpInputVariants: (props?: ({
185
+ status?: "loading" | "default" | "error" | null | undefined;
186
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
187
+ type DefailtInputProps = Omit<OTPInputProps$1, "renderInput">;
188
+ type OTPInputProps = DefailtInputProps & VariantProps<typeof otpInputVariants> & {};
189
+ declare const OTPInput: ({ numInputs, inputStyle, containerStyle, placeholder, status, ...props }: OTPInputProps) => react_jsx_runtime.JSX.Element;
190
+
190
191
  declare const PopoverRoot: React$1.FC<PopoverPrimitive.PopoverProps>;
191
192
  declare const PopoverTrigger: React$1.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
192
193
  declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
@@ -219,28 +220,41 @@ interface CopyableLabelProps {
219
220
  }
220
221
  declare const CopyableLabel: React.FC<CopyableLabelProps>;
221
222
 
223
+ type DebouncedInputProps = {
224
+ value?: string;
225
+ onChange: (e: string) => void;
226
+ debounce?: number;
227
+ addon?: React__default.ReactNode;
228
+ } & Omit<BaseInnerInputProps, "onChange" | "size">;
229
+ declare const DebouncedInput: ({ value: initialValue, onChange, debounce, addon, ...props }: DebouncedInputProps) => react_jsx_runtime.JSX.Element;
230
+
231
+ type Variant = "success" | "failed" | "pending" | "abandoned";
232
+ declare const Status: ({ status, variant, className, }: {
233
+ status: string;
234
+ variant: Variant;
235
+ className?: string;
236
+ }) => react_jsx_runtime.JSX.Element;
237
+
238
+ type TableSearchProps = {
239
+ enabled: boolean;
240
+ debounceRate?: number;
241
+ onSearch?: (query: string) => void;
242
+ };
222
243
  type TableProps<T extends RowData> = {
223
244
  table: Table$1<T>;
224
245
  isMobile?: boolean;
225
246
  onRowClick?: (row: Row<T>) => void;
226
247
  id?: string;
227
248
  onRefetch?: () => void;
228
- onSearch?: (query: string) => void;
229
249
  ExtraNode?: ReactNode;
230
250
  onExport?: () => void;
231
251
  FilterMenu?: ReactNode;
232
252
  isRefetching?: boolean;
233
253
  buttonClassName?: string;
254
+ search?: TableSearchProps;
234
255
  };
235
- declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, onSearch, }: TableProps<T>) => react_jsx_runtime.JSX.Element;
236
-
237
- type Variant = "success" | "failed" | "pending" | "abandoned";
238
- declare const Status: ({ status, variant, className, }: {
239
- status: string;
240
- variant: Variant;
241
- className?: string;
242
- }) => react_jsx_runtime.JSX.Element;
256
+ declare const Table: <T extends RowData>({ table, isMobile, onRowClick, id, onRefetch, isRefetching, FilterMenu, ExtraNode, onExport, search, }: TableProps<T>) => react_jsx_runtime.JSX.Element;
243
257
 
244
258
  declare function cn(...inputs: ClassValue[]): string;
245
259
 
246
- export { Button, CopyableLabel, Country, Dialog, FlagComponent, FormLabel, Input, Loader, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, Textarea, buttonVariants, cn };
260
+ export { Button, CopyableLabel, Country, DebouncedInput, Dialog, FlagComponent, FormLabel, Input, Loader, OTPInput, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverRoot, PopoverTrigger, Select, Status, Table, Textarea, buttonVariants, cn };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Ot=Object.create;var Ce=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Wt=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var zt=(t,e)=>{for(var r in e)Ce(t,r,{get:e[r],enumerable:!0})},Ge=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Ht(e))!Gt.call(t,a)&&a!==r&&Ce(t,a,{get:()=>e[a],enumerable:!(n=Bt(e,a))||n.enumerable});return t};var C=(t,e,r)=>(r=t!=null?Ot(Wt(t)):{},Ge(e||!t||!t.__esModule?Ce(r,"default",{value:t,enumerable:!0}):r,t)),_t=t=>Ge(Ce({},"__esModule",{value:!0}),t);var er={};zt(er,{Button:()=>j,CopyableLabel:()=>Ft,Country:()=>kt,Dialog:()=>ve,FlagComponent:()=>M,FormLabel:()=>P,Input:()=>te,Loader:()=>q,OTPInput:()=>It,PasswordInput:()=>Fe,PhoneInput:()=>Be,Popover:()=>ue,PopoverContent:()=>W,PopoverRoot:()=>X,PopoverTrigger:()=>V,Select:()=>ht,Status:()=>Mt,Table:()=>Vt,Textarea:()=>Ee,buttonVariants:()=>ee,cn:()=>o});module.exports=_t(er);var $e=C(require("react"));var Ze=C(require("react")),Le=C(require("@radix-ui/react-label")),Xe=require("class-variance-authority");var ze=require("clsx"),_e=require("tailwind-merge");function o(...t){return(0,_e.twMerge)((0,ze.clsx)(t))}var Ke=require("react/jsx-runtime"),Zt=(0,Xe.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Se=Ze.forwardRef(({className:t,...e},r)=>(0,Ke.jsx)(Le.Root,{ref:r,className:o(Zt(),t),...e}));Se.displayName=Le.Root.displayName;var Q=require("react/jsx-runtime"),P=$e.default.forwardRef(({className:t,children:e,showAsterisk:r,error:n,...a},i)=>(0,Q.jsx)(Se,{ref:i,className:o(n&&"text-red-500",t),...a,children:r?(0,Q.jsxs)("p",{children:[e,(0,Q.jsx)("span",{className:"text-red-500",children:"*"})]}):e}));P.displayName="FormLabel";var Y=require("react/jsx-runtime"),q=({size:t=16,colour:e="primary"})=>(0,Y.jsxs)("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[(0,Y.jsx)("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),(0,Y.jsx)("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:e==="primary"?"#ffffff":"currentColor",className:"rounded"})]});var be=C(require("react")),Ue=require("@radix-ui/react-slot"),qe=require("class-variance-authority");var S=require("react/jsx-runtime"),ee=(0,qe.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] text-[0.75rem] leading-[1rem] font-medium rounded-lg",lg:"py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",md:"h-12 py-1 px-5 items-center","icon-sm":"h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",icon:"h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg","icon-lg":"h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"}},defaultVariants:{variant:"primary",size:"default"}}),j=be.forwardRef(({className:t,variant:e="primary",size:r,asChild:n=!1,isLoading:a=!1,leftNode:i,rightNode:c,LoaderSize:s,...g},p)=>{let m=n?Ue.Slot:"button",{children:l,disabled:b,...h}=g,L=be.useRef(null);return(0,S.jsx)(m,{className:o(ee({variant:e,size:r,className:t})),ref:L||p,disabled:b||a,...h,children:(0,S.jsx)("div",{className:"flex font-medium justify-center items-center gap-2",children:a?(0,S.jsx)(S.Fragment,{children:(0,S.jsx)("span",{className:"mx-auto",children:(0,S.jsx)(q,{size:s,colour:"secondary"})})}):(0,S.jsxs)(S.Fragment,{children:[i,l,c]})})})});j.displayName="Button";var he=require("class-variance-authority");var je=C(require("react")),Je=require("react/jsx-runtime"),I=je.default.forwardRef(({className:t,children:e,error:r,...n},a)=>{let i=r??e;return i?(0,Je.jsx)("p",{ref:a,className:o("text-xs font-normal text-[#F04248]",t),...n,children:i}):null});I.displayName="ErrorMessage";var Qe=C(require("react")),Ye=require("react/jsx-runtime"),T=Qe.default.forwardRef(({className:t,...e},r)=>(0,Ye.jsx)("div",{ref:r,className:o("text-sm text-[#8E98A8",t),...e}));T.displayName="FormDescription";var A=require("react/jsx-runtime"),Ie=(0,he.cva)("!p-0 flex h-full w-full !border-transparent !bg-transparent text-base focus-visible:bg-transparent focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",{variants:{status:{default:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",error:"placeholder:text-red-500 text-red-500",loading:"placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",prefilled:""}},defaultVariants:{status:"default"}}),tt=({className:t,status:e,type:r,ref:n,...a})=>(0,A.jsx)("input",{type:r,className:o(Ie({status:e}),t),ref:n,...a});tt.displayName="BaseInnerInput";var E=(0,he.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]"}},defaultVariants:{status:"default"}}),et=(0,he.cva)("top-0 flex justify-center items-center h-full min-w-[50px] max-w-[100px] dark:!bg-transparent transition px-3 py-2 text-base placeholder:text-[#79818C] focus-within:outline-0 focus-within:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:!border-[#9299A2]",{variants:{side:{left:"left-0 rounded-l-[8px] border-r",right:"right-0 rounded-r-[8px] border-l"},status:{default:"border-[#DEDEDE] dark:border-[#676767] bg-white text-[#191919] dark:!bg-transparent caret-primary-main focus-within:bg-white dark:focus-within:!bg-transparent dark:text-white focus-within:border-primary-main dark:focus-within:border-[#9299A2] dark:disabled:!border-[#9299A2]",error:"placeholder:text-red-500 bg-red-50 border-red-500 dark:!bg-red-50 text-red-500 focus-within:bg-red-50 focus-within:border-red-500",loading:"",prefilled:"bg-[#F6F6F6] border-[#DEDEDE] dark:!bg-transparent caret-[#DEDEDE] focus-within:bg-[#F6F6F6] focus-within:border-[#DEDEDE] dark:!border-[#9299A2] dark:focus-within:border-[#9299A2]"}},defaultVariants:{status:"default",side:"left"}}),te=({className:t,status:e="default",disabled:r,error:n,isLoading:a,sideNodeClassName:i,showAsterisk:c,label:s,description:g,ref:p,...m})=>{let l=e;return n&&(l="error"),a&&(l="loading"),r&&(l="prefilled"),(0,A.jsxs)("div",{className:"relative space-y-1 w-full",children:[(0,A.jsx)(P,{showAsterisk:c,error:n,children:s}),(0,A.jsxs)("div",{className:o(E({status:l}),m.leftNode?"pl-0":"",m.rightNode?"pr-0":"",t),children:[m.leftNode?(0,A.jsx)("div",{className:o(et({status:l,side:"left"}),i),children:m.leftNode}):null,(0,A.jsx)(tt,{ref:p,disabled:a||r,className:o({"!pl-3":m.leftNode,"!pr-3":m.rightNode}),...m}),m.rightNode?(0,A.jsx)("div",{className:o(et({status:l,side:"right"}),i),children:m.rightNode}):null]}),g&&(0,A.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:g}),(0,A.jsx)(I,{error:n})]})};te.displayName="Input";var ae=require("react");var re=require("react/jsx-runtime"),rt=()=>(0,re.jsxs)("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,re.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,re.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 oe=require("react/jsx-runtime"),ot=()=>(0,oe.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,oe.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,oe.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 Te=require("react/jsx-runtime"),at=()=>(0,Te.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Te.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 Ae=require("react/jsx-runtime"),nt=()=>(0,Ae.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ae.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 R=require("react/jsx-runtime"),it=[{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}],Fe=({onValidate:t,onChange:e,...r})=>{let[n,a]=(0,ae.useState)(!1),[i,c]=(0,ae.useState)(it),s=l=>it.map(b=>({...b,validated:b.RegExp.test(l)})),g=l=>{let b=s(l),h=b.every(L=>L.validated);return c(b),h},p=l=>{e&&e(l);let b=l?.target?.value,h=g(b);t&&t(h,b)},m=(0,ae.useMemo)(()=>(0,R.jsx)("div",{className:"flex items-center gap-2",children:i?.map(l=>(0,R.jsxs)("div",{className:o("text-xs flex items-center gap-0.5",{"text-[#62C554]":l?.validated,"text-[#8E98A8]":!l?.validated}),children:[(0,R.jsx)("span",{className:"",children:l?.validated?(0,R.jsx)(at,{}):(0,R.jsx)(nt,{})}),(0,R.jsx)("span",{className:"",children:l?.label})]},l?.key))}),[i]);return(0,R.jsx)(te,{sideNodeClassName:"!border-l-0",rightNode:n?(0,R.jsx)("button",{type:"button",onClick:()=>a(l=>!l),children:(0,R.jsx)(rt,{})}):(0,R.jsx)("button",{type:"button",onClick:()=>a(l=>!l),children:(0,R.jsx)(ot,{})}),type:n?"text":"password",onChange:p,description:m,...r})};Fe.displayName="PasswordInput";var st=require("class-variance-authority");var Z=require("react/jsx-runtime"),Br=(0,st.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]"}},defaultVariants:{status:"default"}}),Ee=({className:t,status:e="default",disabled:r,error:n,isLoading:a,showAsterisk:i,label:c,description:s,...g})=>{let p=e;return n&&(p="error"),a&&(p="loading"),r&&(p="prefilled"),(0,Z.jsxs)("div",{className:"relative space-y-1",children:[(0,Z.jsx)(P,{showAsterisk:i,error:n,children:c}),(0,Z.jsx)("textarea",{className:o("min-h-[80px]",E({status:p}),t),disabled:a||r,...g}),(0,Z.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:s}),(0,Z.jsx)(I,{error:n})]})};Ee.displayName="Textarea";var K=C(require("react"));var B=C(require("react")),N=require("cmdk"),gt=require("lucide-react");var ie=C(require("react")),f=C(require("@radix-ui/react-dialog"));var ne=require("react/jsx-runtime"),lt=()=>(0,ne.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,ne.jsx)("path",{d:"M18 6 6 18"}),(0,ne.jsx)("path",{d:"m6 6 12 12"})]});var u=require("react/jsx-runtime"),Xt=f.Root,Kt=f.Trigger,ct=f.Portal,dt=ie.forwardRef(({className:t,...e},r)=>(0,u.jsx)(f.Overlay,{ref:r,className:o("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));dt.displayName=f.Overlay.displayName;var Ve=ie.forwardRef(({className:t,hideCloseButton:e,children:r,...n},a)=>(0,u.jsxs)(ct,{children:[(0,u.jsx)(dt,{}),(0,u.jsxs)(f.Content,{ref:a,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",t),...n,children:[r,!e&&(0,u.jsxs)(f.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,u.jsx)(lt,{}),(0,u.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ve.displayName=f.Content.displayName;var pt=({className:t,...e})=>(0,u.jsx)("div",{className:o("flex flex-col space-y-1.5 text-left",t),...e});pt.displayName="DialogHeader";var mt=({className:t,...e})=>(0,u.jsx)("div",{className:o("flex flex-row justify-end sm:space-x-2",t),...e});mt.displayName="DialogFooter";var ut=ie.forwardRef(({className:t,...e},r)=>(0,u.jsx)(f.Title,{ref:r,className:o("text-xl font-semibold leading-none tracking-tight",t),...e}));ut.displayName=f.Title.displayName;var ft=ie.forwardRef(({className:t,...e},r)=>(0,u.jsx)(f.Description,{ref:r,className:o("text-sm text-gray-500",t),...e}));ft.displayName=f.Description.displayName;var ve=({trigger:t=void 0,children:e,open:r,onOpenChange:n,hideCloseButton:a,footer:i,title:c,description:s,contentClassName:g,headerClassName:p,titleClassName:m,descriptionClassName:l,footerClassName:b,asChild:h=!0,onOpenAutoFocus:L,onCloseAutoFocus:Re,onEscapeKeyDown:ye,onInteractOutside:$,onPointerDownOutside:ke,...De})=>(0,u.jsxs)(Xt,{...De,open:r,onOpenChange:n,children:[(0,u.jsx)(Kt,{asChild:h,children:t}),(0,u.jsx)(ct,{children:(0,u.jsxs)(Ve,{className:g,hideCloseButton:a,onOpenAutoFocus:L,onCloseAutoFocus:Re,onEscapeKeyDown:ye,onPointerDownOutside:ke,onInteractOutside:$,children:[c||s?(0,u.jsxs)(pt,{className:p,children:[c&&(0,u.jsx)(ut,{className:m,children:c}),s&&(0,u.jsx)(ft,{className:l,children:s})]}):(0,u.jsx)(u.Fragment,{}),e,i&&(0,u.jsx)(mt,{className:b,children:i})]})})]});ve.displayName=f.Dialog.displayName;var w=require("react/jsx-runtime"),se=B.forwardRef(({className:t,...e},r)=>(0,w.jsx)(N.Command,{ref:r,className:o("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));se.displayName=N.Command.displayName;var le=B.forwardRef(({className:t,CommandInputContainerClassName:e,loading:r,...n},a)=>(0,w.jsxs)("div",{className:o("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[r?(0,w.jsx)(q,{size:16,colour:"secondary"}):(0,w.jsx)(gt.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,w.jsx)(N.Command.Input,{ref:a,className:o("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:r,...n})]}));le.displayName=N.Command.Input.displayName;var ce=B.forwardRef(({className:t,...e},r)=>(0,w.jsx)(N.Command.List,{ref:r,className:o("overflow-y-auto overflow-x-hidden",t),...e}));ce.displayName=N.Command.List.displayName;var de=B.forwardRef((t,e)=>(0,w.jsx)(N.Command.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));de.displayName=N.Command.Empty.displayName;var pe=B.forwardRef(({className:t,...e},r)=>(0,w.jsx)(N.Command.Group,{ref:r,className:o("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));pe.displayName=N.Command.Group.displayName;var $t=B.forwardRef(({className:t,...e},r)=>(0,w.jsx)(N.Command.Separator,{ref:r,className:o("-mx-1 h-px bg-border",t),...e}));$t.displayName=N.Command.Separator.displayName;var me=B.forwardRef(({className:t,...e},r)=>(0,w.jsx)(N.Command.Item,{ref:r,className:o("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));me.displayName=N.Command.Item.displayName;var Ut=({className:t,...e})=>(0,w.jsx)("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});Ut.displayName="CommandShortcut";var yt=C(require("react")),F=C(require("@radix-ui/react-popover"));var H=require("react/jsx-runtime"),X=F.Root,V=F.Trigger,W=yt.forwardRef(({className:t,align:e="center",sideOffset:r=4,portal:n=!0,...a},i)=>n?(0,H.jsx)(F.Portal,{children:(0,H.jsx)(F.Content,{ref:i,align:e,sideOffset:r,className:o("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):(0,H.jsx)(F.Content,{ref:i,align:e,sideOffset:r,className:o("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));W.displayName=F.Content.displayName;var ue=({trigger:t,children:e,open:r,onOpenChange:n,contentClassName:a,asChild:i=!0,align:c,side:s,alignOffset:g,triggerClassName:p,sideOffset:m,onOpenAutoFocus:l,onCloseAutoFocus:b,portal:h=!0,...L})=>(0,H.jsxs)(X,{...L,open:r,onOpenChange:n,children:[(0,H.jsx)(V,{asChild:i,className:p,children:t}),(0,H.jsx)(W,{alignOffset:g,sideOffset:m,side:s,align:c,className:a,onOpenAutoFocus:l,onCloseAutoFocus:b,portal:h,children:e})]});ue.displayName=F.Root.displayName;var Me=C(require("react")),k=C(require("@radix-ui/react-scroll-area"));var G=require("react/jsx-runtime"),fe=Me.forwardRef(({className:t,viewPortClassName:e,children:r,...n},a)=>(0,G.jsxs)(k.Root,{ref:a,className:o("relative overflow-hidden",t),...n,children:[(0,G.jsx)(k.Viewport,{className:o("h-full w-full rounded-[inherit]",e),children:r}),(0,G.jsx)(Ct,{}),(0,G.jsx)(k.Corner,{})]}));fe.displayName=k.Root.displayName;var Ct=Me.forwardRef(({className:t,orientation:e="vertical",...r},n)=>(0,G.jsx)(k.ScrollAreaScrollbar,{ref:n,orientation:e,className:o("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:(0,G.jsx)(k.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));Ct.displayName=k.ScrollAreaScrollbar.displayName;var x=require("react/jsx-runtime"),bt=({className:t,value:e,placeholder:r="",status:n,disabled:a})=>(0,x.jsx)(V,{asChild:!0,disabled:a,children:(0,x.jsxs)("button",{disabled:a,className:o(E({status:n}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e??r??"Select options...",(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"})})]})}),xe=({options:t=[],value:e,onChange:r,containerClassName:n,placeholder:a,disabled:i,loading:c,optionComponent:s,children:g,modal:p=!1,hideSearch:m,className:l,inputValue:b,onValueChange:h,onInputValueChange:L})=>{let[Re,ye]=K.useState(!1),$=K.useRef(null),[ke,De]=K.useState(void 0);return K.useLayoutEffect(()=>{$.current&&De($.current.clientWidth)},[$.current]),(0,x.jsxs)(X,{modal:p,open:Re,onOpenChange:ye,children:[(0,x.jsx)("div",{className:o("w-full",l),ref:$,children:g}),(0,x.jsx)(W,{portal:!p,className:"p-0 min-w-[200px]",style:{width:ke},children:(0,x.jsxs)(se,{className:o("relative max-h-[270px]",{"mt-2":!m}),children:[!m&&(0,x.jsx)(le,{loading:c,placeholder:a??"Search options...",onValueChange:L,value:b,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),(0,x.jsx)(fe,{viewPortClassName:"max-h-[225px]",className:o("w-full px-0 h-full overflow-y-auto",n),children:(0,x.jsxs)(ce,{children:[!m&&(0,x.jsx)(de,{children:"No result found."}),(0,x.jsx)(pe,{className:"w-full",children:t?.map(U=>(0,x.jsx)(me,{defaultValue:e?.label,value:U.label,disabled:i,onSelect:()=>{r(U),ye(!1),h?.(U?.value)},children:s?s(U):U.label},U.value))})]})})]})})]})};var z=require("react/jsx-runtime"),ht=({showAsterisk:t,label:e,description:r,error:n,hideSearch:a=!0,status:i,...c})=>(0,z.jsxs)("div",{className:"relative space-y-1",children:[(0,z.jsx)(P,{showAsterisk:t,error:n,children:e}),(0,z.jsx)(xe,{hideSearch:a,...c,containerClassName:"h-full",children:(0,z.jsx)(bt,{disabled:c?.disabled,placeholder:"Select or search email",status:i,value:c?.value?.label??c?.value?.value})}),(0,z.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:r}),(0,z.jsx)(I,{error:n})]});var Oe=[{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"}],vt=()=>{let t={};return Oe?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};var ge=C(require("react")),Nt=C(require("react-phone-number-input")),wt=C(require("react-phone-number-input")),Pt=C(require("react-phone-number-input/flags"));var _=require("react/jsx-runtime"),qt=t=>(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...t,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"})]}),xt=qt;var d=require("react/jsx-runtime"),Be=ge.forwardRef(({className:t,onChange:e,value:r,modal:n,showAsterisk:a,label:i,description:c,error:s,defaultCountry:g="NG",...p},m)=>{let l=h=>(0,d.jsx)(jt,{...h,status:p.status,modal:n,onChange:L=>h.onChange(L)}),b=r;return(0,d.jsxs)("div",{className:"relative space-y-1",children:[(0,d.jsx)(P,{showAsterisk:a,error:s,children:i}),(0,d.jsx)(wt.default,{ref:m,className:o("flex",t),flagComponent:M,countrySelectComponent:l,focusInputOnCountrySelection:!0,countryCallingCodeEditable:!0,enableLongNumber:!0,addInternationalOption:!0,international:!0,inputComponent:Rt,defaultCountry:g,containerComponent:({children:h})=>(0,d.jsx)("div",{className:o(E({status:p?.status}),"p-0 gap-1"),children:h}),...p,onChange:h=>{e&&e(h)},value:b}),(0,d.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:c}),(0,d.jsx)(I,{error:s})]})});Be.displayName="PhoneInput";var Rt=ge.forwardRef(({className:t,...e},r)=>(0,d.jsx)("input",{className:o(Ie({status:e?.status})," h-full !-mt-0 border-0 rounded-l-none !flex-1 !block !w-full",t),...e,ref:r}));Rt.displayName="InputComponent";var jt=({disabled:t,value:e,onChange:r,options:n,status:a,modal:i})=>{let c=ge.useCallback(s=>{console.log(s),r(s)},[r]);return(0,d.jsxs)(X,{modal:i,children:[(0,d.jsx)(V,{disabled:t,children:(0,d.jsxs)("div",{className:o(E({status:a}),"!border-0 transition justify-center items-center disabled:text-base-500 flex gap-3 h-full rounded-e-none pl-2 pr-2"),children:[(0,d.jsx)(M,{country:e,countryName:e}),(0,d.jsx)("svg",{className:o("-mr-2 h-4 w-4 opacity-50",t?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(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)(W,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:(0,d.jsx)(se,{children:(0,d.jsx)(ce,{children:(0,d.jsxs)(fe,{className:"h-72",children:[(0,d.jsx)(le,{placeholder:"Search country..."}),(0,d.jsx)(de,{children:"No country found."}),(0,d.jsx)(pe,{children:n.filter(s=>s.value).map(s=>(0,d.jsxs)(me,{className:"gap-2",onSelect:()=>c(s.value),children:[(0,d.jsx)(M,{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:`+${Nt.getCountryCallingCode(s.value)}`}),(0,d.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:o("ml-auto",s.value===e?"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}`))})]})})})})]})},M=({country:t,countryName:e,className:r})=>{let n=Pt.default[t];return t==="GLOBAL"?(0,d.jsx)("span",{className:o("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:(0,d.jsx)(xt,{className:"w-full h-[90%]"})}):(0,d.jsx)("span",{className:o("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:n&&(0,d.jsx)(n,{title:e})})};M.displayName="FlagComponent";var v=require("react/jsx-runtime"),Jt=vt(),Qt=({className:t,value:e,placeholder:r="",status:n,disabled:a})=>(0,v.jsx)(V,{asChild:!0,disabled:a,children:(0,v.jsxs)("button",{disabled:a,className:o(E({status:n}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e?(0,v.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,v.jsx)(M,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),(0,v.jsxs)("span",{className:"",children:[" ",Jt[e]]})]}):r??"Select options...",(0,v.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,v.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"})})]})}),kt=({hideSearch:t=!0,showAsterisk:e,label:r,description:n,error:a,...i})=>{let c=Oe?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return(0,v.jsxs)("div",{className:"relative space-y-1",children:[(0,v.jsx)(P,{showAsterisk:e,error:a,children:r}),(0,v.jsx)(xe,{options:c,hideSearch:t,optionComponent:s=>(0,v.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,v.jsx)(M,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),(0,v.jsx)("span",{className:"flex-1 text-sm",children:s?.label})]}),...i,children:(0,v.jsx)(Qt,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),(0,v.jsx)(T,{className:"text-gray-400 text-sm !font-normal",children:n}),(0,v.jsx)(I,{error:a})]})};var Dt=C(require("react-otp-input"));var Lt=require("class-variance-authority"),St=require("react"),He=require("react/jsx-runtime"),Yt=(0,Lt.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"}}),It=({numInputs:t=4,inputStyle:e,containerStyle:r,placeholder:n="-",status:a,...i})=>{let c=(0,St.useMemo)(()=>n||new Array(t).fill("").reduce((p,m)=>p+=m,""),[t,n]);return(0,He.jsx)(Dt.default,{numInputs:t,placeholder:c,containerStyle:o("w-full",r),inputStyle:o(Yt({status:a}),e),renderInput:s=>(0,He.jsx)("input",{...s}),...i})};var At=require("react"),Ne=require("lucide-react"),we=require("framer-motion"),O=require("react/jsx-runtime"),Ft=({text:t,onCopy:e,iconsPosition:r="right",clampText:n=!0})=>{let[a,i]=(0,At.useState)(!1),c=()=>{navigator.clipboard.writeText(t).then(()=>{i(!0),e?.(),setTimeout(()=>i(!1),2e3)})},s=a?Ne.CheckIcon:Ne.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)(Tt,{Icon:s,onClick:c,copied:a}),(0,O.jsx)("span",{className:`${n?"truncate max-w-[100px]":""}`,children:t}),r==="right"&&(0,O.jsx)(Tt,{Icon:s,onClick:c,copied:a})]})},Tt=({Icon:t,onClick:e,copied:r})=>(0,O.jsx)(we.AnimatePresence,{mode:"wait",children:(0,O.jsx)(we.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:e,children:(0,O.jsx)(t,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});var J=require("lucide-react");var We=require("@tanstack/react-table");var D=require("react/jsx-runtime"),Et=({table:t,isMobile:e,onRowClick:r,id:n})=>(0,D.jsx)("div",{className:o("relative w-full rounded-b border-0",{}),children:(0,D.jsxs)("table",{id:n??"table",className:"w-full overflow-x-scroll",children:[(0,D.jsx)("thead",{children:t.getHeaderGroups().map(a=>(0,D.jsx)("tr",{className:o(" rounded text-black border-b- bg-gray-100",{}),children:a.headers.map(i=>(0,D.jsx)("th",{className:"relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-medium capitalize",colSpan:i.colSpan,style:{width:i.getSize()},children:i.isPlaceholder?null:(0,D.jsx)("div",{className:o("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:(0,We.flexRender)(i.column.columnDef.header,i.getContext())})},i.id))},a.id))}),(0,D.jsx)("tbody",{children:t?.getFilteredRowModel().rows.map(a=>(0,D.jsx)("tr",{className:o("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!e},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(a):{},children:a.getVisibleCells().map(i=>(0,D.jsx)("td",{className:o("",{}),children:(0,D.jsx)("div",{className:o("",{"w-max p-4 pl-0 text-gray-500 text-sm":!0}),children:(0,We.flexRender)(i.column.columnDef.cell,i.getContext())})},i.id))},a.id))})]})});var y=require("react/jsx-runtime"),Vt=({table:t,isMobile:e=!1,onRowClick:r,id:n,onRefetch:a,isRefetching:i,FilterMenu:c,ExtraNode:s,onExport:g,onSearch:p})=>{let m=()=>{try{a?.()}catch(l){console.error("Error while refetching data",l)}};return(0,y.jsxs)("div",{className:o("relative w-full rounded-b border-0 overflow-x-auto"),children:[(a||p||c||s||g)&&(0,y.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,y.jsx)("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:p&&(0,y.jsxs)("div",{className:"relative w-full sm:w-56",children:[(0,y.jsx)(J.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),(0,y.jsx)("input",{type:"text",placeholder:"Search...",className:o("pl-10 pr-3 py-1 border rounded-full text-sm w-full h-8 focus:outline-none focus:ring-2 focus:ring-blue-500 bg-blue-50"),onChange:l=>p?.(l.target.value)})]})}),(0,y.jsx)("div",{className:"flex items-start flex-col gap-2 justify-start",children:(0,y.jsxs)("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:[(0,y.jsxs)("div",{className:" flex gap-2",children:[a&&(0,y.jsx)(j,{onClick:m,title:"Refetch Data",disabled:i,variant:"outlined",className:"!border-gray-400 shadow-2xl !text-gray-600",size:"icon-sm",children:(0,y.jsx)(J.RotateCw,{className:o("w-4 h-4",{"animate-spin":i}),size:5})}),c&&(0,y.jsx)(ue,{trigger:(0,y.jsx)("button",{title:"Filter",className:o("!border-gray-400 shadow-2xl !text-gray-600",ee({variant:"outlined",size:"icon-sm"})),children:(0,y.jsx)(J.ListFilter,{className:"w-4 h-4",size:5})}),children:c})]}),(0,y.jsxs)("div",{className:"flex gap-2",children:[s&&s,g&&(0,y.jsx)(j,{variant:"primary",onClick:g,size:"sm",children:"Export"})]})]})})]}),(0,y.jsx)("main",{className:"w-full overflow-x-auto mt-5",children:(0,y.jsx)(Et,{table:t,isMobile:e,onRowClick:r,id:n})})]})};var Pe=require("react/jsx-runtime"),Mt=({status:t,variant:e,className:r})=>(0,Pe.jsx)("div",{children:(0,Pe.jsx)("div",{className:o("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":e==="success"},{"bg-gray-500/20 text-white":e==="abandoned"},{"bg-red-500/20 text-red-500":e==="failed"},{"bg-yellow-500/20 text-yellow-500":e==="pending"},r),children:(0,Pe.jsx)("p",{children:t.replace("-"," ")})})});0&&(module.exports={Button,CopyableLabel,Country,Dialog,FlagComponent,FormLabel,Input,Loader,OTPInput,PasswordInput,PhoneInput,Popover,PopoverContent,PopoverRoot,PopoverTrigger,Select,Status,Table,Textarea,buttonVariants,cn});
1
+ "use strict";var Gt=Object.create;var be=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var _t=Object.getOwnPropertyNames;var Zt=Object.getPrototypeOf,Xt=Object.prototype.hasOwnProperty;var Kt=(t,e)=>{for(var r in e)be(t,r,{get:e[r],enumerable:!0})},Ze=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of _t(e))!Xt.call(t,a)&&a!==r&&be(t,a,{get:()=>e[a],enumerable:!(n=zt(e,a))||n.enumerable});return t};var h=(t,e,r)=>(r=t!=null?Gt(Zt(t)):{},Ze(e||!t||!t.__esModule?be(r,"default",{value:t,enumerable:!0}):r,t)),$t=t=>Ze(be({},"__esModule",{value:!0}),t);var ar={};Kt(ar,{Button:()=>j,CopyableLabel:()=>Vt,Country:()=>Lt,DebouncedInput:()=>Re,Dialog:()=>xe,FlagComponent:()=>V,FormLabel:()=>R,Input:()=>Z,Loader:()=>J,OTPInput:()=>At,PasswordInput:()=>Me,PhoneInput:()=>We,Popover:()=>ue,PopoverContent:()=>W,PopoverRoot:()=>K,PopoverTrigger:()=>M,Select:()=>St,Status:()=>Bt,Table:()=>Wt,Textarea:()=>Ve,buttonVariants:()=>te,cn:()=>o});module.exports=$t(ar);var Je=h(require("react"));var $e=h(require("react")),Ie=h(require("@radix-ui/react-label")),Ue=require("class-variance-authority");var Xe=require("clsx"),Ke=require("tailwind-merge");function o(...t){return(0,Ke.twMerge)((0,Xe.clsx)(t))}var qe=require("react/jsx-runtime"),Ut=(0,Ue.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ee=$e.forwardRef(({className:t,...e},r)=>(0,qe.jsx)(Ie.Root,{ref:r,className:o(Ut(),t),...e}));Ee.displayName=Ie.Root.displayName;var Y=require("react/jsx-runtime"),R=Je.default.forwardRef(({className:t,children:e,showAsterisk:r,error:n,...a},i)=>(0,Y.jsx)(Ee,{ref:i,className:o(n&&"text-red-500",t),...a,children:r?(0,Y.jsxs)("p",{children:[e,(0,Y.jsx)("span",{className:"text-red-500",children:"*"})]}):e}));R.displayName="FormLabel";var ee=require("react/jsx-runtime"),J=({size:t=16,colour:e="primary"})=>(0,ee.jsxs)("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[(0,ee.jsx)("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),(0,ee.jsx)("path",{d:"M10 0.595792C10 0.266746 10.267 -0.00185055 10.5954 0.0177417C11.9786 0.100242 13.3318 0.469461 14.5682 1.1044C15.9816 1.83021 17.2016 2.88235 18.1273 4.17366C19.0531 5.46496 19.6578 6.95826 19.8913 8.52984C20.1249 10.1014 19.9807 11.706 19.4705 13.2108C18.9604 14.7155 18.0991 16.077 16.9579 17.1825C15.8167 18.288 14.4285 19.1056 12.9084 19.5677C11.3882 20.0298 9.77982 20.123 8.21646 19.8397C6.84883 19.5918 5.55009 19.0619 4.40196 18.2863C4.12931 18.1021 4.08072 17.7265 4.28083 17.4653C4.48094 17.2041 4.85388 17.1564 5.12801 17.3384C6.12474 18.0001 7.24768 18.4531 8.42898 18.6672C9.80606 18.9168 11.2228 18.8347 12.5618 18.4276C13.9008 18.0206 15.1236 17.3004 16.1288 16.3266C17.134 15.3528 17.8927 14.1536 18.342 12.8282C18.7914 11.5027 18.9185 10.0893 18.7127 8.70502C18.507 7.32071 17.9743 6.00535 17.1589 4.86792C16.3435 3.73048 15.2688 2.80371 14.0238 2.16439C12.9559 1.61596 11.789 1.29259 10.5954 1.21173C10.2671 1.18949 10 0.92484 10 0.595792Z",fill:e==="primary"?"#ffffff":"currentColor",className:"rounded"})]});var he=h(require("react")),je=require("@radix-ui/react-slot"),Qe=require("class-variance-authority");var S=require("react/jsx-runtime"),te=(0,Qe.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"}}),j=he.forwardRef(({className:t,variant:e="primary",size:r,asChild:n=!1,isLoading:a=!1,leftNode:i,rightNode:l,LoaderSize:s,...u},d)=>{let p=n?je.Slot:"button",{children:y,disabled:m,...g}=u,w=he.useRef(null);return(0,S.jsx)(p,{className:o(te({variant:e,size:r,className:t})),ref:w||d,disabled:m||a,...g,children:(0,S.jsx)("div",{className:"flex font-medium justify-center items-center gap-2",children:a?(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,y,l]})})})});j.displayName="Button";var ve=require("class-variance-authority");var Ye=h(require("react")),et=require("react/jsx-runtime"),I=Ye.default.forwardRef(({className:t,children:e,error:r,...n},a)=>{let i=r??e;return i?(0,et.jsx)("p",{ref:a,className:o("text-xs font-normal text-[#F04248]",t),...n,children:i}):null});I.displayName="ErrorMessage";var tt=h(require("react")),rt=require("react/jsx-runtime"),E=tt.default.forwardRef(({className:t,...e},r)=>(0,rt.jsx)("div",{ref:r,className:o("text-sm text-[#8E98A8",t),...e}));E.displayName="FormDescription";var T=require("react/jsx-runtime"),Te=(0,ve.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"}}),at=({className:t,status:e,type:r,ref:n,...a})=>(0,T.jsx)("input",{type:r,className:o(Te({status:e}),t),ref:n,...a});at.displayName="BaseInnerInput";var F=(0,ve.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"}}),ot=(0,ve.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"}}),Z=({className:t,status:e="default",disabled:r,error:n,isLoading:a,sideNodeClassName:i,showAsterisk:l,label:s,description:u,ref:d,...p})=>{let y=e;return n&&(y="error"),a&&(y="loading"),r&&(y="prefilled"),(0,T.jsxs)("div",{className:"relative space-y-1 w-full",children:[s&&(0,T.jsx)(R,{showAsterisk:l,error:n,children:s}),(0,T.jsxs)("div",{className:o(F({status:y}),p.leftNode?"pl-0":"",p.rightNode?"pr-0":"",t),children:[p.leftNode?(0,T.jsx)("div",{className:o(ot({status:y,side:"left"}),i),children:p.leftNode}):null,(0,T.jsx)(at,{ref:d,disabled:a||r,className:o({"!pl-3":p.leftNode&&e!=="neutral","!pr-3":p.rightNode&&e!=="neutral"}),...p}),p.rightNode?(0,T.jsx)("div",{className:o(ot({status:y,side:"right"}),i),children:p.rightNode}):null]}),u&&(0,T.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:u}),(0,T.jsx)(I,{error:n})]})};Z.displayName="Input";var ae=require("react");var re=require("react/jsx-runtime"),nt=()=>(0,re.jsxs)("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,re.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,re.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 oe=require("react/jsx-runtime"),it=()=>(0,oe.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,oe.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,oe.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 Ae=require("react/jsx-runtime"),st=()=>(0,Ae.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ae.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 Fe=require("react/jsx-runtime"),lt=()=>(0,Fe.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Fe.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"),ct=[{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}],Me=({onValidate:t,onChange:e,disableValidation:r,...n})=>{let[a,i]=(0,ae.useState)(!1),[l,s]=(0,ae.useState)(ct),u=m=>ct.map(g=>({...g,validated:g.RegExp.test(m)})),d=m=>{let g=u(m),w=g.every(Q=>Q.validated);return s(g),w},p=m=>{if(e&&e(m),r)return;let g=m?.target?.value,w=d(g);t&&t(w,g)},y=(0,ae.useMemo)(()=>(0,D.jsx)("div",{className:"flex items-center gap-2",children:l?.map(m=>(0,D.jsxs)("div",{className:o("text-xs flex items-center gap-0.5",{"text-[#62C554]":m?.validated,"text-[#8E98A8]":!m?.validated}),children:[(0,D.jsx)("span",{className:"",children:m?.validated?(0,D.jsx)(st,{}):(0,D.jsx)(lt,{})}),(0,D.jsx)("span",{className:"",children:m?.label})]},m?.key))}),[l]);return(0,D.jsx)(Z,{sideNodeClassName:"!border-l-0",rightNode:a?(0,D.jsx)("button",{type:"button",onClick:()=>i(m=>!m),children:(0,D.jsx)(nt,{})}):(0,D.jsx)("button",{type:"button",onClick:()=>i(m=>!m),children:(0,D.jsx)(it,{})}),type:a?"text":"password",onChange:p,description:!r&&y,...n})};Me.displayName="PasswordInput";var dt=require("class-variance-authority");var X=require("react/jsx-runtime"),zr=(0,dt.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"}}),Ve=({className:t,status:e="default",disabled:r,error:n,isLoading:a,showAsterisk:i,label:l,description:s,...u})=>{let d=e;return n&&(d="error"),a&&(d="loading"),r&&(d="prefilled"),(0,X.jsxs)("div",{className:"relative space-y-1",children:[(0,X.jsx)(R,{showAsterisk:i,error:n,children:l}),(0,X.jsx)("textarea",{className:o("min-h-[80px]",F({status:d}),t),disabled:a||r,...u}),(0,X.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:s}),(0,X.jsx)(I,{error:n})]})};Ve.displayName="Textarea";var $=h(require("react"));var B=h(require("react")),N=require("cmdk"),bt=require("lucide-react");var ie=h(require("react")),C=h(require("@radix-ui/react-dialog"));var ne=require("react/jsx-runtime"),pt=()=>(0,ne.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,ne.jsx)("path",{d:"M18 6 6 18"}),(0,ne.jsx)("path",{d:"m6 6 12 12"})]});var f=require("react/jsx-runtime"),qt=C.Root,Jt=C.Trigger,mt=C.Portal,ut=ie.forwardRef(({className:t,...e},r)=>(0,f.jsx)(C.Overlay,{ref:r,className:o("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));ut.displayName=C.Overlay.displayName;var Oe=ie.forwardRef(({className:t,hideCloseButton:e,children:r,...n},a)=>(0,f.jsxs)(mt,{children:[(0,f.jsx)(ut,{}),(0,f.jsxs)(C.Content,{ref:a,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",t),...n,children:[r,!e&&(0,f.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,f.jsx)(pt,{}),(0,f.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Oe.displayName=C.Content.displayName;var ft=({className:t,...e})=>(0,f.jsx)("div",{className:o("flex flex-col space-y-1.5 text-left",t),...e});ft.displayName="DialogHeader";var gt=({className:t,...e})=>(0,f.jsx)("div",{className:o("flex flex-row justify-end sm:space-x-2",t),...e});gt.displayName="DialogFooter";var yt=ie.forwardRef(({className:t,...e},r)=>(0,f.jsx)(C.Title,{ref:r,className:o("text-xl font-semibold leading-none tracking-tight",t),...e}));yt.displayName=C.Title.displayName;var Ct=ie.forwardRef(({className:t,...e},r)=>(0,f.jsx)(C.Description,{ref:r,className:o("text-sm text-gray-500",t),...e}));Ct.displayName=C.Description.displayName;var xe=({trigger:t=void 0,children:e,open:r,onOpenChange:n,hideCloseButton:a,footer:i,title:l,description:s,contentClassName:u,headerClassName:d,titleClassName:p,descriptionClassName:y,footerClassName:m,asChild:g=!0,onOpenAutoFocus:w,onCloseAutoFocus:Q,onEscapeKeyDown:Ce,onInteractOutside:U,onPointerDownOutside:Le,...Se})=>(0,f.jsxs)(qt,{...Se,open:r,onOpenChange:n,children:[(0,f.jsx)(Jt,{asChild:g,children:t}),(0,f.jsx)(mt,{children:(0,f.jsxs)(Oe,{className:u,hideCloseButton:a,onOpenAutoFocus:w,onCloseAutoFocus:Q,onEscapeKeyDown:Ce,onPointerDownOutside:Le,onInteractOutside:U,children:[l||s?(0,f.jsxs)(ft,{className:d,children:[l&&(0,f.jsx)(yt,{className:p,children:l}),s&&(0,f.jsx)(Ct,{className:y,children:s})]}):(0,f.jsx)(f.Fragment,{}),e,i&&(0,f.jsx)(gt,{className:m,children:i})]})})]});xe.displayName=C.Dialog.displayName;var P=require("react/jsx-runtime"),se=B.forwardRef(({className:t,...e},r)=>(0,P.jsx)(N.Command,{ref:r,className:o("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));se.displayName=N.Command.displayName;var le=B.forwardRef(({className:t,CommandInputContainerClassName:e,loading:r,...n},a)=>(0,P.jsxs)("div",{className:o("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[r?(0,P.jsx)(J,{size:16,colour:"secondary"}):(0,P.jsx)(bt.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,P.jsx)(N.Command.Input,{ref:a,className:o("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:r,...n})]}));le.displayName=N.Command.Input.displayName;var ce=B.forwardRef(({className:t,...e},r)=>(0,P.jsx)(N.Command.List,{ref:r,className:o("overflow-y-auto overflow-x-hidden",t),...e}));ce.displayName=N.Command.List.displayName;var de=B.forwardRef((t,e)=>(0,P.jsx)(N.Command.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));de.displayName=N.Command.Empty.displayName;var pe=B.forwardRef(({className:t,...e},r)=>(0,P.jsx)(N.Command.Group,{ref:r,className:o("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));pe.displayName=N.Command.Group.displayName;var jt=B.forwardRef(({className:t,...e},r)=>(0,P.jsx)(N.Command.Separator,{ref:r,className:o("-mx-1 h-px bg-border",t),...e}));jt.displayName=N.Command.Separator.displayName;var me=B.forwardRef(({className:t,...e},r)=>(0,P.jsx)(N.Command.Item,{ref:r,className:o("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));me.displayName=N.Command.Item.displayName;var Qt=({className:t,...e})=>(0,P.jsx)("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});Qt.displayName="CommandShortcut";var ht=h(require("react")),A=h(require("@radix-ui/react-popover"));var H=require("react/jsx-runtime"),K=A.Root,M=A.Trigger,W=ht.forwardRef(({className:t,align:e="center",sideOffset:r=4,portal:n=!0,...a},i)=>n?(0,H.jsx)(A.Portal,{children:(0,H.jsx)(A.Content,{ref:i,align:e,sideOffset:r,className:o("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a})}):(0,H.jsx)(A.Content,{ref:i,align:e,sideOffset:r,className:o("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:a.onOpenAutoFocus,onCloseAutoFocus:a.onCloseAutoFocus,...a}));W.displayName=A.Content.displayName;var ue=({trigger:t,children:e,open:r,onOpenChange:n,contentClassName:a,asChild:i=!0,align:l,side:s,alignOffset:u,triggerClassName:d,sideOffset:p,onOpenAutoFocus:y,onCloseAutoFocus:m,portal:g=!0,...w})=>(0,H.jsxs)(K,{...w,open:r,onOpenChange:n,children:[(0,H.jsx)(M,{asChild:i,className:d,children:t}),(0,H.jsx)(W,{alignOffset:u,sideOffset:p,side:s,align:l,className:a,onOpenAutoFocus:y,onCloseAutoFocus:m,portal:g,children:e})]});ue.displayName=A.Root.displayName;var Be=h(require("react")),k=h(require("@radix-ui/react-scroll-area"));var G=require("react/jsx-runtime"),fe=Be.forwardRef(({className:t,viewPortClassName:e,children:r,...n},a)=>(0,G.jsxs)(k.Root,{ref:a,className:o("relative overflow-hidden",t),...n,children:[(0,G.jsx)(k.Viewport,{className:o("h-full w-full rounded-[inherit]",e),children:r}),(0,G.jsx)(vt,{}),(0,G.jsx)(k.Corner,{})]}));fe.displayName=k.Root.displayName;var vt=Be.forwardRef(({className:t,orientation:e="vertical",...r},n)=>(0,G.jsx)(k.ScrollAreaScrollbar,{ref:n,orientation:e,className:o("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:(0,G.jsx)(k.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));vt.displayName=k.ScrollAreaScrollbar.displayName;var x=require("react/jsx-runtime"),xt=({className:t,value:e,placeholder:r="",status:n,disabled:a})=>(0,x.jsx)(M,{asChild:!0,disabled:a,children:(0,x.jsxs)("button",{disabled:a,className:o(F({status:n}),"[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e??r??"Select options...",(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"})})]})}),Ne=({options:t=[],value:e,onChange:r,containerClassName:n,placeholder:a,disabled:i,loading:l,optionComponent:s,children:u,modal:d=!1,hideSearch:p,className:y,inputValue:m,onValueChange:g,onInputValueChange:w})=>{let[Q,Ce]=$.useState(!1),U=$.useRef(null),[Le,Se]=$.useState(void 0);return $.useLayoutEffect(()=>{U.current&&Se(U.current.clientWidth)},[U.current]),(0,x.jsxs)(K,{modal:d,open:Q,onOpenChange:Ce,children:[(0,x.jsx)("div",{className:o("w-full",y),ref:U,children:u}),(0,x.jsx)(W,{portal:!d,className:"p-0 min-w-[200px]",style:{width:Le},children:(0,x.jsxs)(se,{className:o("relative max-h-[270px]",{"mt-2":!p}),children:[!p&&(0,x.jsx)(le,{loading:l,placeholder:a??"Search options...",onValueChange:w,value:m,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),(0,x.jsx)(fe,{viewPortClassName:"max-h-[225px]",className:o("w-full px-0 h-full overflow-y-auto",n),children:(0,x.jsxs)(ce,{children:[!p&&(0,x.jsx)(de,{children:"No result found."}),(0,x.jsx)(pe,{className:"w-full",children:t?.map(q=>(0,x.jsx)(me,{defaultValue:e?.label,value:q.label,disabled:i,onSelect:()=>{r(q),Ce(!1),g?.(q?.value)},children:s?s(q):q.label},q.value))})]})})]})})]})};var He=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],Nt=()=>{let t={};return He?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};var ge=h(require("react")),wt=h(require("react-phone-number-input")),Rt=h(require("react-phone-number-input")),Dt=h(require("react-phone-number-input/flags"));var z=require("react/jsx-runtime"),Yt=t=>(0,z.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...t,children:[(0,z.jsx)("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",(0,z.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,z.jsx)("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),(0,z.jsx)("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),(0,z.jsx)("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Pt=Yt;var c=require("react/jsx-runtime"),We=ge.forwardRef(({className:t,onChange:e,value:r,modal:n,showAsterisk:a,label:i,description:l,error:s,defaultCountry:u="NG",...d},p)=>{let y=g=>(0,c.jsx)(er,{...g,status:d.status,modal:n,onChange:w=>g.onChange(w)}),m=r;return(0,c.jsxs)("div",{className:"relative space-y-1",children:[(0,c.jsx)(R,{showAsterisk:a,error:s,children:i}),(0,c.jsx)(Rt.default,{ref:p,className:o("flex",t),flagComponent:V,countrySelectComponent:y,focusInputOnCountrySelection:!0,countryCallingCodeEditable:!0,enableLongNumber:!0,addInternationalOption:!0,international:!0,inputComponent:kt,defaultCountry:u,containerComponent:({children:g})=>(0,c.jsx)("div",{className:o(F({status:d?.status}),"p-0 gap-1"),children:g}),...d,onChange:g=>{e&&e(g)},value:m}),(0,c.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:l}),(0,c.jsx)(I,{error:s})]})});We.displayName="PhoneInput";var kt=ge.forwardRef(({className:t,...e},r)=>(0,c.jsx)("input",{className:o(Te({status:e?.status})," h-full !-mt-0 border-0 rounded-l-none !flex-1 !block !w-full",t),...e,ref:r}));kt.displayName="InputComponent";var er=({disabled:t,value:e,onChange:r,options:n,status:a,modal:i})=>{let l=ge.useCallback(s=>{console.log(s),r(s)},[r]);return(0,c.jsxs)(K,{modal:i,children:[(0,c.jsx)(M,{disabled:t,children:(0,c.jsxs)("div",{className:o(F({status:a}),"!border-0 transition justify-center items-center disabled:text-base-500 flex gap-3 h-full rounded-e-none pl-2 pr-2"),children:[(0,c.jsx)(V,{country:e,countryName:e}),(0,c.jsx)("svg",{className:o("-mr-2 h-4 w-4 opacity-50",t?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,c.jsx)("path",{d:"M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",stroke:"#959595",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),(0,c.jsx)(W,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:(0,c.jsx)(se,{children:(0,c.jsx)(ce,{children:(0,c.jsxs)(fe,{className:"h-72",children:[(0,c.jsx)(le,{placeholder:"Search country..."}),(0,c.jsx)(de,{children:"No country found."}),(0,c.jsx)(pe,{children:n.filter(s=>s.value).map(s=>(0,c.jsxs)(me,{className:"gap-2",onSelect:()=>l(s.value),children:[(0,c.jsx)(V,{country:s.value,countryName:s.label}),(0,c.jsx)("span",{className:"flex-1 text-sm",children:s.label}),s.value&&(0,c.jsx)("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${wt.getCountryCallingCode(s.value)}`}),(0,c.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:o("ml-auto",s.value===e?"opacity-100":"opacity-0"),children:(0,c.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:t,countryName:e,className:r})=>{let n=Dt.default[t];return t==="GLOBAL"?(0,c.jsx)("span",{className:o("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:(0,c.jsx)(Pt,{className:"w-full h-[90%]"})}):(0,c.jsx)("span",{className:o("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:n&&(0,c.jsx)(n,{title:e})})};V.displayName="FlagComponent";var v=require("react/jsx-runtime"),tr=Nt(),rr=({className:t,value:e,placeholder:r="",status:n,disabled:a})=>(0,v.jsx)(M,{asChild:!0,disabled:a,children:(0,v.jsxs)("button",{disabled:a,className:o(F({status:n}),"[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",e?"":"text-[#79818C]",t),children:[e?(0,v.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,v.jsx)(V,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),(0,v.jsxs)("span",{className:"",children:[" ",tr[e]]})]}):r??"Select options...",(0,v.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,v.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"})})]})}),Lt=({hideSearch:t=!0,showAsterisk:e,label:r,description:n,error:a,...i})=>{let l=He?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return(0,v.jsxs)("div",{className:"relative space-y-1",children:[(0,v.jsx)(R,{showAsterisk:e,error:a,children:r}),(0,v.jsx)(Ne,{options:l,hideSearch:t,optionComponent:s=>(0,v.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,v.jsx)(V,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),(0,v.jsx)("span",{className:"flex-1 text-sm",children:s?.label})]}),...i,children:(0,v.jsx)(rr,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),(0,v.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:n}),(0,v.jsx)(I,{error:a})]})};var _=require("react/jsx-runtime"),St=({showAsterisk:t,label:e,description:r,error:n,hideSearch:a=!0,status:i,...l})=>(0,_.jsxs)("div",{className:"relative space-y-1",children:[(0,_.jsx)(R,{showAsterisk:t,error:n,children:e}),(0,_.jsx)(Ne,{hideSearch:a,...l,containerClassName:"h-full",children:(0,_.jsx)(xt,{disabled:l?.disabled,placeholder:"Select or search email",status:i,value:l?.value?.label??l?.value?.value})}),(0,_.jsx)(E,{className:"text-gray-400 text-sm !font-normal",children:r}),(0,_.jsx)(I,{error:n})]});var It=h(require("react-otp-input"));var Et=require("class-variance-authority"),Tt=require("react"),Ge=require("react/jsx-runtime"),or=(0,Et.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"}}),At=({numInputs:t=4,inputStyle:e,containerStyle:r,placeholder:n="-",status:a,...i})=>{let l=(0,Tt.useMemo)(()=>n||new Array(t).fill("").reduce((d,p)=>d+=p,""),[t,n]);return(0,Ge.jsx)(It.default,{numInputs:t,placeholder:l,containerStyle:o("w-full",r),inputStyle:o(or({status:a}),e),renderInput:s=>(0,Ge.jsx)("input",{...s}),...i})};var Mt=require("react"),Pe=require("lucide-react"),we=require("framer-motion"),O=require("react/jsx-runtime"),Vt=({text:t,onCopy:e,iconsPosition:r="right",clampText:n=!0})=>{let[a,i]=(0,Mt.useState)(!1),l=()=>{navigator.clipboard.writeText(t).then(()=>{i(!0),e?.(),setTimeout(()=>i(!1),2e3)})},s=a?Pe.CheckIcon:Pe.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)(Ft,{Icon:s,onClick:l,copied:a}),(0,O.jsx)("span",{className:`${n?"truncate max-w-[100px]":""}`,children:t}),r==="right"&&(0,O.jsx)(Ft,{Icon:s,onClick:l,copied:a})]})},Ft=({Icon:t,onClick:e,copied:r})=>(0,O.jsx)(we.AnimatePresence,{mode:"wait",children:(0,O.jsx)(we.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:e,children:(0,O.jsx)(t,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});var ye=require("react");var Ot=require("lucide-react"),ze=require("react/jsx-runtime"),Re=({value:t,onChange:e,debounce:r=500,addon:n,...a})=>{let[i,l]=(0,ye.useState)(t??""),s=u=>l(u.target.value);return(0,ye.useEffect)(()=>{t&&l(t)},[t]),(0,ye.useEffect)(()=>{let u=setTimeout(()=>{e(i)},r);return()=>clearTimeout(u)},[i,r,e]),(0,ze.jsx)(Z,{leftNode:n??(0,ze.jsx)(Ot.Search,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...a,className:o("!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",a?.className),onChange:s,value:i})};var De=require("react/jsx-runtime"),Bt=({status:t,variant:e,className:r})=>(0,De.jsx)("div",{children:(0,De.jsx)("div",{className:o("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":e==="success"},{"bg-gray-500/20 text-white":e==="abandoned"},{"bg-red-500/20 text-red-500":e==="failed"},{"bg-yellow-500/20 text-yellow-500":e==="pending"},r),children:(0,De.jsx)("p",{children:t.replace("-"," ")})})});var ke=require("lucide-react");var _e=require("@tanstack/react-table");var L=require("react/jsx-runtime"),Ht=({table:t,isMobile:e,onRowClick:r,id:n})=>(0,L.jsx)("div",{className:o("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:t.getHeaderGroups().map(a=>(0,L.jsx)("tr",{className:o(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:a.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:o("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:(0,_e.flexRender)(i.column.columnDef.header,i.getContext())})},i.id))},a.id))}),(0,L.jsx)("tbody",{className:" pl-2.5",children:t?.getFilteredRowModel().rows.map(a=>(0,L.jsx)("tr",{className:o("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!e},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(a):{},children:a.getVisibleCells().map(i=>(0,L.jsx)("td",{className:o("",{}),children:(0,L.jsx)("div",{className:o("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:(0,_e.flexRender)(i.column.columnDef.cell,i.getContext())})},i.id))},a.id))})]})});var b=require("react/jsx-runtime"),Wt=({table:t,isMobile:e=!1,onRowClick:r,id:n,onRefetch:a,isRefetching:i,FilterMenu:l,ExtraNode:s,onExport:u,search:d={enabled:!1,debounceRate:700}})=>{let p=()=>{try{a?.()}catch(y){console.error("Error while refetching data",y)}};return(0,b.jsxs)("div",{className:o("relative w-full rounded-b border-0 overflow-x-auto"),children:[(a||d?.enabled||l||s||u)&&(0,b.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,b.jsx)("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:d?.enabled&&(0,b.jsxs)("div",{className:" w-full flex gap-x-3",children:[(0,b.jsx)("section",{className:"sm:w-56",children:(0,b.jsx)(Re,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:y=>d?.onSearch?.(y),debounce:d?.debounceRate})}),(0,b.jsxs)("div",{className:" flex gap-2",children:[a&&(0,b.jsx)(j,{onClick:p,title:"Refetch Data",disabled:i,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:(0,b.jsx)(ke.RotateCw,{className:o("w-4 h-4",{"animate-spin":i}),size:5})}),l&&(0,b.jsx)(ue,{trigger:(0,b.jsx)("button",{title:"Filter",className:o("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",te({variant:"outlined",size:"sm"})),children:(0,b.jsx)(ke.ListFilter,{className:"w-4 h-4",size:5})}),children:l})]})]})}),(0,b.jsx)("div",{className:"flex items-start flex-col gap-2 justify-center",children:(0,b.jsx)("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:(0,b.jsxs)("div",{className:"flex gap-2",children:[s&&s,u&&(0,b.jsx)(j,{variant:"primary",onClick:u,size:"sm",children:"Export"})]})})})]}),(0,b.jsx)("main",{className:"w-full overflow-x-auto mt-5",children:(0,b.jsx)(Ht,{table:t,isMobile:e,onRowClick:r,id:n})})]})};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