@6thbridge/hexa 0.0.39 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2814 +1,2 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
31
-
32
- // src/index.ts
33
- var index_exports = {};
34
- __export(index_exports, {
35
- AmountAction: () => AmountAction,
36
- Banner: () => Banner,
37
- Button: () => Button,
38
- CopyableLabel: () => CopyableLabel,
39
- Country: () => Country,
40
- CurrencySymbolMap: () => CurrencySymbolMap,
41
- DateAction: () => DateAction,
42
- DebouncedInput: () => DebouncedInput,
43
- DevBanner: () => DevBanner,
44
- Dialog: () => Dialog2,
45
- FlagComponent: () => FlagComponent,
46
- FormLabel: () => FormLabel,
47
- Input: () => Input,
48
- Loader: () => Loader,
49
- OTPInput: () => OTPInput,
50
- PasswordInput: () => PasswordInput,
51
- PhoneInput: () => PhoneInput,
52
- Popover: () => Popover,
53
- PopoverContent: () => PopoverContent,
54
- PopoverRoot: () => PopoverRoot,
55
- PopoverTrigger: () => PopoverTrigger,
56
- Select: () => Select,
57
- Status: () => Status,
58
- Table: () => Table,
59
- Textarea: () => Textarea,
60
- buttonVariants: () => buttonVariants,
61
- cn: () => cn
62
- });
63
- module.exports = __toCommonJS(index_exports);
64
-
65
- // src/components/label/FormLabel.tsx
66
- var import_react = __toESM(require("react"));
67
-
68
- // src/components/label/index.tsx
69
- var React = __toESM(require("react"));
70
- var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
71
- var import_class_variance_authority = require("class-variance-authority");
72
-
73
- // src/utils/index.ts
74
- var import_clsx = require("clsx");
75
- var import_tailwind_merge = require("tailwind-merge");
76
- function cn(...inputs) {
77
- return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
78
- }
79
-
80
- // src/components/label/index.tsx
81
- var import_jsx_runtime = require("react/jsx-runtime");
82
- var labelVariants = (0, import_class_variance_authority.cva)(
83
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
84
- );
85
- var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
- LabelPrimitive.Root,
87
- {
88
- ref,
89
- className: cn(labelVariants(), className),
90
- ...props
91
- }
92
- ));
93
- Label.displayName = LabelPrimitive.Root.displayName;
94
-
95
- // src/components/label/FormLabel.tsx
96
- var import_jsx_runtime2 = require("react/jsx-runtime");
97
- var FormLabel = import_react.default.forwardRef(({ className, children, showAsterisk, error, ...props }, ref) => {
98
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
99
- Label,
100
- {
101
- ref,
102
- className: cn(error && "text-red-500", className),
103
- ...props,
104
- children: showAsterisk ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("p", { children: [
105
- children,
106
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500", children: "*" })
107
- ] }) : children
108
- }
109
- );
110
- });
111
- FormLabel.displayName = "FormLabel";
112
-
113
- // src/components/loader/index.tsx
114
- var import_jsx_runtime3 = require("react/jsx-runtime");
115
- var Loader = ({
116
- size = 16,
117
- colour = "primary"
118
- }) => {
119
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
120
- "svg",
121
- {
122
- className: "animate-spin",
123
- width: size,
124
- height: size,
125
- viewBox: "0 0 20 20",
126
- fill: "none",
127
- children: [
128
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "10", cy: "10", r: "9.25", stroke: "transparent", strokeWidth: "1.5" }),
129
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
130
- "path",
131
- {
132
- 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",
133
- fill: colour === "primary" ? "#ffffff" : "currentColor",
134
- className: "rounded"
135
- }
136
- )
137
- ]
138
- }
139
- );
140
- };
141
-
142
- // src/components/button/index.tsx
143
- var React3 = __toESM(require("react"));
144
- var import_react_slot = require("@radix-ui/react-slot");
145
- var import_class_variance_authority2 = require("class-variance-authority");
146
- var import_jsx_runtime4 = require("react/jsx-runtime");
147
- var buttonVariants = (0, import_class_variance_authority2.cva)(
148
- "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",
149
- {
150
- variants: {
151
- variant: {
152
- primary: "border-primary-main bg-primary-main hover:bg-primary-main/70 disabled:bg-primary-main/70 text-white font-bold",
153
- danger: "border-red-600 bg-red-600 hover:bg-red-600/70 disabled:bg-red-600/70 text-white font-bold",
154
- neutral: "!border-0 bg-transparent text-primary-main hover:opacity-80 disabled:opacity-60",
155
- outlined: "border border-primary-main text-primary-main hover:opacity-80 disabled:opacity-60",
156
- "danger-outlined": "border border-red-600 text-red-600 hover:opacity-80 disabled:opacity-60",
157
- "light-outlined": "border-white text-white hover:opacity-80 disabled:opacity-60",
158
- "dark-text": "border-transparent bg-transparent hover:bg-opacity-70 disabled:bg-opacity-70 text-black font-medium",
159
- light: "border-white bg-white hover:bg-opacity-70 disabled:bg-opacity-70 text-primary-main font-semibold"
160
- },
161
- size: {
162
- // lg: "h-15 px-8 items-center",
163
- // sm: "h-10 px-3.5 items-center text-sm",
164
- default: "py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg",
165
- sm: "py-[0.375rem] px-[1rem] leading-[1rem] font-normal text-sm rounded-lg",
166
- lg: "py-[0.75rem] px-[1.5rem] text-[1rem] leading-[1.5rem] font-medium rounded-lg",
167
- md: "h-12 py-1 px-5 items-center",
168
- "icon-sm": "h-[1.75rem] w-[1.75rem] flex justify-center items-center font-medium rounded-lg",
169
- icon: "h-[2.5rem] w-[2.75rem] flex justify-center items-center font-medium rounded-lg",
170
- "icon-lg": "h-[3rem] w-[3rem] flex justify-center items-center font-medium rounded-lg"
171
- }
172
- },
173
- defaultVariants: {
174
- variant: "primary",
175
- size: "default"
176
- }
177
- }
178
- );
179
- var Button = React3.forwardRef(
180
- ({
181
- className,
182
- variant = "primary",
183
- size,
184
- asChild = false,
185
- isLoading = false,
186
- leftNode,
187
- rightNode,
188
- LoaderSize,
189
- // ref,
190
- ...props
191
- }, ref) => {
192
- const Component = asChild ? import_react_slot.Slot : "button";
193
- const { children, disabled, ...rest } = props;
194
- const reference = React3.useRef(null);
195
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
196
- Component,
197
- {
198
- className: cn(buttonVariants({ variant, size, className })),
199
- ref: reference || ref,
200
- disabled: disabled || isLoading,
201
- ...rest,
202
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex font-medium justify-center items-center gap-2", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "mx-auto", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Loader, { size: LoaderSize, colour: "secondary" }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
203
- leftNode,
204
- children,
205
- rightNode
206
- ] }) })
207
- }
208
- );
209
- }
210
- );
211
- Button.displayName = "Button";
212
-
213
- // src/components/input/index.tsx
214
- var React6 = __toESM(require("react"));
215
- var import_class_variance_authority3 = require("class-variance-authority");
216
-
217
- // src/components/form/ErrorMessage.tsx
218
- var import_react2 = __toESM(require("react"));
219
- var import_jsx_runtime5 = require("react/jsx-runtime");
220
- var ErrorMessage = import_react2.default.forwardRef(({ className, children, error, ...props }, ref) => {
221
- const body = error ?? children;
222
- if (!body) {
223
- return null;
224
- }
225
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
226
- "p",
227
- {
228
- ref,
229
- className: cn("text-xs font-normal text-[#F04248]", className),
230
- ...props,
231
- children: body
232
- }
233
- );
234
- });
235
- ErrorMessage.displayName = "ErrorMessage";
236
-
237
- // src/components/form/FormDescription.tsx
238
- var import_react3 = __toESM(require("react"));
239
- var import_jsx_runtime6 = require("react/jsx-runtime");
240
- var FormDescription = import_react3.default.forwardRef(({ className, ...props }, ref) => {
241
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
242
- "div",
243
- {
244
- ref,
245
- className: cn("text-sm text-[#8E98A8", className),
246
- ...props
247
- }
248
- );
249
- });
250
- FormDescription.displayName = "FormDescription";
251
-
252
- // src/components/input/index.tsx
253
- var import_jsx_runtime7 = require("react/jsx-runtime");
254
- var inputVariants = (0, import_class_variance_authority3.cva)(
255
- "!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",
256
- {
257
- variants: {
258
- status: {
259
- default: "placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",
260
- error: "placeholder:text-red-500 text-red-500",
261
- loading: "placeholder:text-[#C4C4C4] dark:placeholder:text-[#9299A2]",
262
- prefilled: "",
263
- neutral: ""
264
- }
265
- },
266
- defaultVariants: {
267
- status: "default"
268
- }
269
- }
270
- );
271
- var BaseInnerInput = React6.forwardRef(
272
- ({ className, status, type, ...props }, ref) => {
273
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
274
- "input",
275
- {
276
- type,
277
- className: cn(inputVariants({ status }), className),
278
- ref,
279
- ...props
280
- }
281
- );
282
- }
283
- );
284
- BaseInnerInput.displayName = "BaseInnerInput";
285
- var inputContainerVariants = (0, import_class_variance_authority3.cva)(
286
- "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]",
287
- {
288
- variants: {
289
- status: {
290
- 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]",
291
- 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",
292
- loading: "",
293
- 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]",
294
- 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]"
295
- }
296
- },
297
- defaultVariants: {
298
- status: "default"
299
- }
300
- }
301
- );
302
- var sideVariants = (0, import_class_variance_authority3.cva)(
303
- "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]",
304
- {
305
- variants: {
306
- side: {
307
- left: "left-0 rounded-l-[8px] border-r",
308
- right: "right-0 rounded-r-[8px] border-l"
309
- },
310
- status: {
311
- 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]",
312
- 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",
313
- loading: "",
314
- 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]",
315
- neutral: "bg-transparent border-0 caret-[#DEDEDE] !px-0"
316
- }
317
- },
318
- defaultVariants: {
319
- status: "default",
320
- side: "left"
321
- }
322
- }
323
- );
324
- var Input = React6.forwardRef(
325
- ({
326
- className,
327
- status = "default",
328
- disabled,
329
- error,
330
- isLoading,
331
- sideNodeClassName,
332
- showAsterisk,
333
- label,
334
- description,
335
- ...props
336
- }, ref) => {
337
- let containerStatus = status;
338
- if (error) containerStatus = "error";
339
- if (isLoading) containerStatus = "loading";
340
- if (disabled) containerStatus = "prefilled";
341
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative space-y-1 w-full", children: [
342
- label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FormLabel, { showAsterisk, error, children: label }),
343
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
344
- "div",
345
- {
346
- className: cn(
347
- inputContainerVariants({ status: containerStatus }),
348
- props.leftNode ? "pl-0" : "",
349
- props.rightNode ? "pr-0" : "",
350
- className
351
- ),
352
- children: [
353
- props.leftNode ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
354
- "div",
355
- {
356
- className: cn(
357
- sideVariants({
358
- status: containerStatus,
359
- side: "left"
360
- }),
361
- sideNodeClassName
362
- ),
363
- children: props.leftNode
364
- }
365
- ) : null,
366
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
367
- BaseInnerInput,
368
- {
369
- ref,
370
- disabled: isLoading || disabled,
371
- className: cn({
372
- "!pl-3": props.leftNode && status !== "neutral",
373
- "!pr-3": props.rightNode && status !== "neutral"
374
- }),
375
- ...props
376
- }
377
- ),
378
- props.rightNode ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
379
- "div",
380
- {
381
- className: cn(
382
- sideVariants({
383
- status: containerStatus,
384
- side: "right"
385
- }),
386
- sideNodeClassName
387
- ),
388
- children: props.rightNode
389
- }
390
- ) : null
391
- ]
392
- }
393
- ),
394
- description && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
395
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ErrorMessage, { error })
396
- ] });
397
- }
398
- );
399
- Input.displayName = "Input";
400
-
401
- // src/components/password-input/index.tsx
402
- var import_react4 = require("react");
403
-
404
- // src/components/password-input/icons/Eye.tsx
405
- var import_jsx_runtime8 = require("react/jsx-runtime");
406
- var Eye = () => {
407
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
408
- "svg",
409
- {
410
- width: "18",
411
- height: "14",
412
- viewBox: "0 0 18 14",
413
- fill: "none",
414
- xmlns: "http://www.w3.org/2000/svg",
415
- children: [
416
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
417
- "path",
418
- {
419
- 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",
420
- stroke: "#8E98A8",
421
- strokeWidth: "2",
422
- strokeLinecap: "round",
423
- strokeLinejoin: "round"
424
- }
425
- ),
426
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
427
- "path",
428
- {
429
- 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",
430
- stroke: "#8E98A8",
431
- strokeWidth: "2",
432
- strokeLinecap: "round",
433
- strokeLinejoin: "round"
434
- }
435
- )
436
- ]
437
- }
438
- );
439
- };
440
-
441
- // src/components/password-input/icons/EyeOff.tsx
442
- var import_jsx_runtime9 = require("react/jsx-runtime");
443
- var EyeOff = () => {
444
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
445
- "svg",
446
- {
447
- width: "18",
448
- height: "18",
449
- viewBox: "0 0 18 18",
450
- fill: "none",
451
- xmlns: "http://www.w3.org/2000/svg",
452
- children: [
453
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
454
- "path",
455
- {
456
- 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",
457
- stroke: "#8E98A8",
458
- strokeWidth: "1.5",
459
- strokeLinecap: "round",
460
- strokeLinejoin: "round"
461
- }
462
- ),
463
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
464
- "path",
465
- {
466
- 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",
467
- stroke: "#8E98A8",
468
- strokeWidth: "1.5",
469
- strokeLinecap: "round",
470
- strokeLinejoin: "round"
471
- }
472
- )
473
- ]
474
- }
475
- );
476
- };
477
-
478
- // src/components/password-input/icons/Check.tsx
479
- var import_jsx_runtime10 = require("react/jsx-runtime");
480
- var Check = () => {
481
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
482
- "svg",
483
- {
484
- width: "12",
485
- height: "12",
486
- viewBox: "0 0 12 12",
487
- fill: "none",
488
- xmlns: "http://www.w3.org/2000/svg",
489
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
490
- "path",
491
- {
492
- d: "M8.89802 2.93408L9.70202 3.49808L6.21602 8.52608H5.41202L3.46802 5.80208L4.27202 5.05208L5.81402 6.49208L8.89802 2.93408Z",
493
- fill: "currentColor"
494
- }
495
- )
496
- }
497
- );
498
- };
499
-
500
- // src/components/password-input/icons/Fail.tsx
501
- var import_jsx_runtime11 = require("react/jsx-runtime");
502
- var Fail = () => {
503
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
504
- "svg",
505
- {
506
- width: "12",
507
- height: "12",
508
- viewBox: "0 0 12 12",
509
- fill: "none",
510
- xmlns: "http://www.w3.org/2000/svg",
511
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
512
- "path",
513
- {
514
- d: "M3.37891 8.62142L6.00041 5.99992L8.62191 8.62142M8.62191 3.37842L5.99991 5.99992L3.37891 3.37842",
515
- stroke: "currentColor",
516
- strokeWidth: "1.5",
517
- strokeLinecap: "round",
518
- strokeLinejoin: "round"
519
- }
520
- )
521
- }
522
- );
523
- };
524
-
525
- // src/components/password-input/index.tsx
526
- var import_jsx_runtime12 = require("react/jsx-runtime");
527
- var validationOptions = [
528
- {
529
- label: "Uppercase",
530
- key: "uppercase",
531
- RegExp: /[A-Z]/,
532
- validated: false
533
- },
534
- {
535
- label: "Lowercase",
536
- key: "lowercase",
537
- RegExp: /[a-z]/,
538
- validated: false
539
- },
540
- {
541
- label: "Number",
542
- key: "number",
543
- RegExp: /\d/,
544
- validated: false
545
- },
546
- {
547
- label: "8 Characters",
548
- key: "eight-chars",
549
- RegExp: /.{8}/,
550
- validated: false
551
- }
552
- ];
553
- var PasswordInput = ({
554
- onValidate,
555
- onChange,
556
- disableValidation,
557
- ...props
558
- }) => {
559
- const [passwordVisible, setPasswordVisible] = (0, import_react4.useState)(false);
560
- const [validatedValues, setValidatedValues] = (0, import_react4.useState)(validationOptions);
561
- const validatePassword = (value) => {
562
- return validationOptions.map((option) => ({
563
- ...option,
564
- validated: option.RegExp.test(value)
565
- }));
566
- };
567
- const checkPasswordStrength = (value) => {
568
- const validatedOptions = validatePassword(value);
569
- const allValidated = validatedOptions.every((option) => option.validated);
570
- setValidatedValues(validatedOptions);
571
- return allValidated;
572
- };
573
- const handlePaswordInputChange = (e) => {
574
- if (onChange) onChange(e);
575
- if (disableValidation) return;
576
- const value = e?.target?.value;
577
- const validated = checkPasswordStrength(value);
578
- if (onValidate) onValidate(validated, value);
579
- };
580
- const ValidateComp = (0, import_react4.useMemo)(() => {
581
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex items-center gap-2", children: validatedValues?.map((value) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
582
- "div",
583
- {
584
- className: cn("text-xs flex items-center gap-0.5", {
585
- "text-[#62C554]": value?.validated,
586
- "text-[#8E98A8]": !value?.validated
587
- }),
588
- children: [
589
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "", children: value?.validated ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Check, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Fail, {}) }),
590
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "", children: value?.label })
591
- ]
592
- },
593
- value?.key
594
- )) });
595
- }, [validatedValues]);
596
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
597
- Input,
598
- {
599
- sideNodeClassName: "!border-l-0",
600
- rightNode: passwordVisible ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
601
- "button",
602
- {
603
- type: "button",
604
- onClick: () => setPasswordVisible((val) => !val),
605
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Eye, {})
606
- }
607
- ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
608
- "button",
609
- {
610
- type: "button",
611
- onClick: () => setPasswordVisible((val) => !val),
612
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EyeOff, {})
613
- }
614
- ),
615
- type: passwordVisible ? "text" : "password",
616
- onChange: handlePaswordInputChange,
617
- description: !disableValidation && ValidateComp,
618
- ...props
619
- }
620
- );
621
- };
622
- PasswordInput.displayName = "PasswordInput";
623
-
624
- // src/components/textarea/index.tsx
625
- var import_class_variance_authority4 = require("class-variance-authority");
626
- var import_jsx_runtime13 = require("react/jsx-runtime");
627
- var textareaContainerVariants = (0, import_class_variance_authority4.cva)(
628
- "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",
629
- {
630
- variants: {
631
- status: {
632
- 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]",
633
- 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",
634
- loading: "placeholder:text-[#C4C4C4]",
635
- 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]",
636
- neutral: ""
637
- }
638
- },
639
- defaultVariants: {
640
- status: "default"
641
- }
642
- }
643
- );
644
- var Textarea = ({
645
- className,
646
- status = "default",
647
- disabled,
648
- error,
649
- isLoading,
650
- showAsterisk,
651
- label,
652
- description,
653
- ...props
654
- }) => {
655
- let containerStatus = status;
656
- if (error) containerStatus = "error";
657
- if (isLoading) containerStatus = "loading";
658
- if (disabled) containerStatus = "prefilled";
659
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative space-y-1", children: [
660
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FormLabel, { showAsterisk, error, children: label }),
661
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
662
- "textarea",
663
- {
664
- className: cn(
665
- "min-h-[80px]",
666
- inputContainerVariants({ status: containerStatus }),
667
- className
668
- ),
669
- disabled: isLoading || disabled,
670
- ...props
671
- }
672
- ),
673
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
674
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ErrorMessage, { error })
675
- ] });
676
- };
677
- Textarea.displayName = "Textarea";
678
-
679
- // src/components/searcheable/index.tsx
680
- var React11 = __toESM(require("react"));
681
-
682
- // src/components/command/index.tsx
683
- var React8 = __toESM(require("react"));
684
- var import_cmdk = require("cmdk");
685
- var import_lucide_react = require("lucide-react");
686
-
687
- // src/components/dialog/index.tsx
688
- var React7 = __toESM(require("react"));
689
- var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
690
-
691
- // src/components/dialog/icon/CloseIcon.tsx
692
- var import_jsx_runtime14 = require("react/jsx-runtime");
693
- var CloseIcon = () => {
694
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
695
- "svg",
696
- {
697
- xmlns: "http://www.w3.org/2000/svg",
698
- width: "24",
699
- height: "24",
700
- viewBox: "0 0 24 24",
701
- fill: "none",
702
- stroke: "currentColor",
703
- strokeWidth: "2",
704
- strokeLinecap: "round",
705
- strokeLinejoin: "round",
706
- className: "lucide lucide-x",
707
- children: [
708
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M18 6 6 18" }),
709
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "m6 6 12 12" })
710
- ]
711
- }
712
- );
713
- };
714
-
715
- // src/components/dialog/index.tsx
716
- var import_jsx_runtime15 = require("react/jsx-runtime");
717
- var DialogRoot = DialogPrimitive.Root;
718
- var DialogTrigger = DialogPrimitive.Trigger;
719
- var DialogPortal = DialogPrimitive.Portal;
720
- var DialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
721
- DialogPrimitive.Overlay,
722
- {
723
- ref,
724
- className: cn(
725
- "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",
726
- className
727
- ),
728
- ...props
729
- }
730
- ));
731
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
732
- var DialogContent = React7.forwardRef(({ className, hideCloseButton, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPortal, { children: [
733
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogOverlay, {}),
734
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
735
- DialogPrimitive.Content,
736
- {
737
- ref,
738
- className: cn(
739
- "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",
740
- className
741
- ),
742
- ...props,
743
- children: [
744
- children,
745
- !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
746
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CloseIcon, {}),
747
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: "Close" })
748
- ] })
749
- ]
750
- }
751
- )
752
- ] }));
753
- DialogContent.displayName = DialogPrimitive.Content.displayName;
754
- var DialogHeader = ({
755
- className,
756
- ...props
757
- }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
758
- "div",
759
- {
760
- className: cn("flex flex-col space-y-1.5 text-left", className),
761
- ...props
762
- }
763
- );
764
- DialogHeader.displayName = "DialogHeader";
765
- var DialogFooter = ({
766
- className,
767
- ...props
768
- }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
769
- "div",
770
- {
771
- className: cn("flex flex-row justify-end sm:space-x-2", className),
772
- ...props
773
- }
774
- );
775
- DialogFooter.displayName = "DialogFooter";
776
- var DialogTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
777
- DialogPrimitive.Title,
778
- {
779
- ref,
780
- className: cn(
781
- "text-xl font-semibold leading-none tracking-tight",
782
- className
783
- ),
784
- ...props
785
- }
786
- ));
787
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
788
- var DialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
789
- DialogPrimitive.Description,
790
- {
791
- ref,
792
- className: cn("text-sm text-gray-500", className),
793
- ...props
794
- }
795
- ));
796
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
797
- var Dialog2 = ({
798
- trigger = void 0,
799
- children,
800
- open,
801
- onOpenChange,
802
- hideCloseButton,
803
- footer,
804
- title,
805
- description,
806
- contentClassName,
807
- headerClassName,
808
- titleClassName,
809
- descriptionClassName,
810
- footerClassName,
811
- asChild = true,
812
- onOpenAutoFocus,
813
- onCloseAutoFocus,
814
- onEscapeKeyDown,
815
- onInteractOutside,
816
- onPointerDownOutside,
817
- ...props
818
- }) => {
819
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogRoot, { ...props, open, onOpenChange, children: [
820
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogTrigger, { asChild, children: trigger }),
821
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
822
- DialogContent,
823
- {
824
- className: contentClassName,
825
- hideCloseButton,
826
- onOpenAutoFocus,
827
- onCloseAutoFocus,
828
- onEscapeKeyDown,
829
- onPointerDownOutside,
830
- onInteractOutside,
831
- children: [
832
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogHeader, { className: headerClassName, children: [
833
- title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogTitle, { className: titleClassName, children: title }),
834
- description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogDescription, { className: descriptionClassName, children: description })
835
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, {}),
836
- children,
837
- footer && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogFooter, { className: footerClassName, children: footer })
838
- ]
839
- }
840
- ) })
841
- ] });
842
- };
843
- Dialog2.displayName = DialogPrimitive.Dialog.displayName;
844
-
845
- // src/components/command/index.tsx
846
- var import_jsx_runtime16 = require("react/jsx-runtime");
847
- var Command = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
848
- import_cmdk.Command,
849
- {
850
- ref,
851
- className: cn(
852
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
853
- className
854
- ),
855
- ...props
856
- }
857
- ));
858
- Command.displayName = import_cmdk.Command.displayName;
859
- var CommandInput = React8.forwardRef(({ className, CommandInputContainerClassName, loading, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
860
- "div",
861
- {
862
- className: cn(
863
- "flex items-center border-0 px-3 gap-2",
864
- CommandInputContainerClassName
865
- ),
866
- "cmdk-input-wrapper": "",
867
- children: [
868
- loading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Loader, { size: 16, colour: "secondary" }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
869
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
870
- import_cmdk.Command.Input,
871
- {
872
- ref,
873
- className: cn(
874
- "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",
875
- className
876
- ),
877
- disabled: loading,
878
- ...props
879
- }
880
- )
881
- ]
882
- }
883
- ));
884
- CommandInput.displayName = import_cmdk.Command.Input.displayName;
885
- var CommandList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
886
- import_cmdk.Command.List,
887
- {
888
- ref,
889
- className: cn("overflow-y-auto overflow-x-hidden", className),
890
- ...props
891
- }
892
- ));
893
- CommandList.displayName = import_cmdk.Command.List.displayName;
894
- var CommandEmpty = React8.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
895
- import_cmdk.Command.Empty,
896
- {
897
- ref,
898
- className: "py-6 text-center text-sm",
899
- ...props
900
- }
901
- ));
902
- CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
903
- var CommandGroup = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
904
- import_cmdk.Command.Group,
905
- {
906
- ref,
907
- className: cn(
908
- "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",
909
- className
910
- ),
911
- ...props
912
- }
913
- ));
914
- CommandGroup.displayName = import_cmdk.Command.Group.displayName;
915
- var CommandSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
916
- import_cmdk.Command.Separator,
917
- {
918
- ref,
919
- className: cn("-mx-1 h-px bg-border", className),
920
- ...props
921
- }
922
- ));
923
- CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
924
- var CommandItem = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
925
- import_cmdk.Command.Item,
926
- {
927
- ref,
928
- className: cn(
929
- "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",
930
- className
931
- ),
932
- ...props
933
- }
934
- ));
935
- CommandItem.displayName = import_cmdk.Command.Item.displayName;
936
- var CommandShortcut = ({
937
- className,
938
- ...props
939
- }) => {
940
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
941
- "span",
942
- {
943
- className: cn(
944
- "ml-auto text-xs tracking-widest text-muted-foreground",
945
- className
946
- ),
947
- ...props
948
- }
949
- );
950
- };
951
- CommandShortcut.displayName = "CommandShortcut";
952
-
953
- // src/components/popover/index.tsx
954
- var React9 = __toESM(require("react"));
955
- var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
956
- var import_jsx_runtime17 = require("react/jsx-runtime");
957
- var PopoverRoot = PopoverPrimitive.Root;
958
- var PopoverTrigger = PopoverPrimitive.Trigger;
959
- var PopoverContent = React9.forwardRef(
960
- ({ className, align = "center", sideOffset = 4, portal = true, ...props }, ref) => portal ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
961
- PopoverPrimitive.Content,
962
- {
963
- ref,
964
- align,
965
- sideOffset,
966
- className: cn(
967
- "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",
968
- className
969
- ),
970
- onOpenAutoFocus: props.onOpenAutoFocus,
971
- onCloseAutoFocus: props.onCloseAutoFocus,
972
- ...props
973
- }
974
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
975
- PopoverPrimitive.Content,
976
- {
977
- ref,
978
- align,
979
- sideOffset,
980
- className: cn(
981
- "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",
982
- className
983
- ),
984
- onOpenAutoFocus: props.onOpenAutoFocus,
985
- onCloseAutoFocus: props.onCloseAutoFocus,
986
- ...props
987
- }
988
- )
989
- );
990
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
991
- var Popover = ({
992
- trigger,
993
- children,
994
- open,
995
- onOpenChange,
996
- contentClassName,
997
- asChild = true,
998
- align,
999
- side,
1000
- alignOffset,
1001
- triggerClassName,
1002
- sideOffset,
1003
- onOpenAutoFocus,
1004
- onCloseAutoFocus,
1005
- portal = true,
1006
- ...props
1007
- }) => {
1008
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(PopoverRoot, { ...props, open, onOpenChange, children: [
1009
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverTrigger, { asChild, className: triggerClassName, children: trigger }),
1010
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1011
- PopoverContent,
1012
- {
1013
- alignOffset,
1014
- sideOffset,
1015
- side,
1016
- align,
1017
- className: contentClassName,
1018
- onOpenAutoFocus,
1019
- onCloseAutoFocus,
1020
- portal,
1021
- children
1022
- }
1023
- )
1024
- ] });
1025
- };
1026
- Popover.displayName = PopoverPrimitive.Root.displayName;
1027
-
1028
- // src/components/scroll-area/index.tsx
1029
- var React10 = __toESM(require("react"));
1030
- var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"));
1031
- var import_jsx_runtime18 = require("react/jsx-runtime");
1032
- var ScrollArea = React10.forwardRef(({ className, viewPortClassName, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1033
- ScrollAreaPrimitive.Root,
1034
- {
1035
- ref,
1036
- className: cn("relative overflow-hidden", className),
1037
- ...props,
1038
- children: [
1039
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1040
- ScrollAreaPrimitive.Viewport,
1041
- {
1042
- className: cn("h-full w-full rounded-[inherit]", viewPortClassName),
1043
- children
1044
- }
1045
- ),
1046
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ScrollBar, {}),
1047
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ScrollAreaPrimitive.Corner, {})
1048
- ]
1049
- }
1050
- ));
1051
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
1052
- var ScrollBar = React10.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1053
- ScrollAreaPrimitive.ScrollAreaScrollbar,
1054
- {
1055
- ref,
1056
- orientation,
1057
- className: cn(
1058
- "flex touch-none select-none transition-colors",
1059
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
1060
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
1061
- className
1062
- ),
1063
- ...props,
1064
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]" })
1065
- }
1066
- ));
1067
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
1068
-
1069
- // src/components/searcheable/index.tsx
1070
- var import_jsx_runtime19 = require("react/jsx-runtime");
1071
- var SearchableTrigger = ({
1072
- className,
1073
- value,
1074
- placeholder = "",
1075
- status,
1076
- disabled
1077
- }) => {
1078
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1079
- "button",
1080
- {
1081
- disabled,
1082
- className: cn(
1083
- inputContainerVariants({ status }),
1084
- "[&>span]:justify-start [&>span]:items-center gap-2 flex h-12 w-full items-center justify-between goup",
1085
- value ? "" : "text-[#79818C]",
1086
- className
1087
- ),
1088
- children: [
1089
- value ?? placeholder ?? "Select options...",
1090
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1091
- "svg",
1092
- {
1093
- width: "20",
1094
- height: "20",
1095
- viewBox: "0 0 20 20",
1096
- fill: "none",
1097
- className: " data-[state=open]:goup-rotate-180",
1098
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1099
- "path",
1100
- {
1101
- d: "M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",
1102
- stroke: "currentColor",
1103
- strokeWidth: "1.5",
1104
- strokeMiterlimit: "10",
1105
- strokeLinecap: "round",
1106
- strokeLinejoin: "round"
1107
- }
1108
- )
1109
- }
1110
- )
1111
- ]
1112
- }
1113
- ) });
1114
- };
1115
- var Searchable = ({
1116
- options = [],
1117
- value,
1118
- onChange,
1119
- containerClassName,
1120
- placeholder,
1121
- disabled,
1122
- loading,
1123
- optionComponent,
1124
- children,
1125
- modal = false,
1126
- hideSearch,
1127
- className,
1128
- inputValue,
1129
- onValueChange,
1130
- onInputValueChange
1131
- }) => {
1132
- const [open, setOpen] = React11.useState(false);
1133
- const triggerRef = React11.useRef(null);
1134
- const [width, setWidth] = React11.useState(void 0);
1135
- React11.useLayoutEffect(() => {
1136
- if (triggerRef.current) {
1137
- setWidth(triggerRef.current.clientWidth);
1138
- }
1139
- }, [triggerRef.current]);
1140
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(PopoverRoot, { modal, open, onOpenChange: setOpen, children: [
1141
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("w-full", className), ref: triggerRef, children }),
1142
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1143
- PopoverContent,
1144
- {
1145
- portal: !modal,
1146
- className: "p-0 min-w-[200px]",
1147
- style: { width },
1148
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1149
- Command,
1150
- {
1151
- className: cn("relative max-h-[270px]", {
1152
- "mt-2": !hideSearch
1153
- }),
1154
- children: [
1155
- !hideSearch && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1156
- CommandInput,
1157
- {
1158
- loading,
1159
- placeholder: placeholder ?? "Search options...",
1160
- onValueChange: onInputValueChange,
1161
- value: inputValue,
1162
- CommandInputContainerClassName: "mx-2 border rounded-md border-[#DEDEDE]"
1163
- }
1164
- ),
1165
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1166
- ScrollArea,
1167
- {
1168
- viewPortClassName: "max-h-[225px]",
1169
- className: cn(
1170
- "w-full px-0 h-full overflow-y-auto",
1171
- containerClassName
1172
- ),
1173
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CommandList, { children: [
1174
- !hideSearch && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandEmpty, { children: "No result found." }),
1175
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandGroup, { className: "w-full", children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1176
- CommandItem,
1177
- {
1178
- defaultValue: value?.label,
1179
- value: option.label,
1180
- disabled,
1181
- onSelect: () => {
1182
- onChange(option);
1183
- setOpen(false);
1184
- onValueChange?.(option?.value);
1185
- },
1186
- children: !optionComponent ? option.label : optionComponent(option)
1187
- },
1188
- option.value
1189
- )) })
1190
- ] })
1191
- }
1192
- )
1193
- ]
1194
- }
1195
- )
1196
- }
1197
- )
1198
- ] });
1199
- };
1200
-
1201
- // src/components/country/data.ts
1202
- var countryData = [
1203
- {
1204
- countryCode: "GLOBAL",
1205
- countryName: "Global",
1206
- currency: "Dollars",
1207
- currencyCode: "USD",
1208
- internetCountryCode: "GLOBAL"
1209
- },
1210
- {
1211
- countryName: "Benin",
1212
- countryCode: "+229",
1213
- currency: "West African CFA franc",
1214
- currencyCode: "XOF",
1215
- currencyIcon: "Fr",
1216
- internetCountryCode: "BJ"
1217
- },
1218
- {
1219
- countryName: "Burkina Faso",
1220
- countryCode: "+226",
1221
- currency: "West African CFA franc",
1222
- currencyCode: "XOF",
1223
- currencyIcon: "Fr",
1224
- internetCountryCode: "BF"
1225
- },
1226
- {
1227
- countryName: "Cameroon",
1228
- countryCode: "+237",
1229
- currency: "Central African CFA franc",
1230
- currencyCode: "XAF",
1231
- currencyIcon: "Fr",
1232
- internetCountryCode: "CM"
1233
- },
1234
- {
1235
- countryName: "Chad",
1236
- countryCode: "+235",
1237
- currency: "Central African CFA franc",
1238
- currencyCode: "XAF",
1239
- currencyIcon: "Fr",
1240
- internetCountryCode: "TD"
1241
- },
1242
- {
1243
- countryName: "DR Congo",
1244
- countryCode: "+243",
1245
- currency: "Congolese franc",
1246
- currencyCode: "CDF",
1247
- currencyIcon: "FC",
1248
- internetCountryCode: "CD"
1249
- },
1250
- {
1251
- countryName: "Eswatini",
1252
- countryCode: "+268",
1253
- currency: "Swazi lilangeni",
1254
- currencyCode: "SZL",
1255
- currencyIcon: "L",
1256
- internetCountryCode: "SZ"
1257
- },
1258
- {
1259
- countryName: "Gabon",
1260
- countryCode: "+241",
1261
- currency: "Central African CFA franc",
1262
- currencyCode: "XAF",
1263
- currencyIcon: "Fr",
1264
- internetCountryCode: "GA"
1265
- },
1266
- {
1267
- countryName: "Ghana",
1268
- countryCode: "+233",
1269
- currency: "Ghanaian cedi",
1270
- currencyCode: "GHS",
1271
- currencyIcon: "\u20B5",
1272
- internetCountryCode: "GH"
1273
- },
1274
- {
1275
- countryName: "Guinea",
1276
- countryCode: "+224",
1277
- currency: "Guinean franc",
1278
- currencyCode: "GNF",
1279
- currencyIcon: "Fr",
1280
- internetCountryCode: "GN"
1281
- },
1282
- {
1283
- countryName: "Ivory Coast",
1284
- countryCode: "+225",
1285
- currency: "West African CFA franc",
1286
- currencyCode: "XOF",
1287
- currencyIcon: "Fr",
1288
- internetCountryCode: "CI"
1289
- },
1290
- {
1291
- countryName: "Kenya",
1292
- countryCode: "+254",
1293
- currency: "Kenyan shilling",
1294
- currencyCode: "KES",
1295
- currencyIcon: "Sh",
1296
- internetCountryCode: "KE"
1297
- },
1298
- {
1299
- countryName: "Lesotho",
1300
- countryCode: "+266",
1301
- currency: "Lesotho loti",
1302
- currencyCode: "LSL",
1303
- currencyIcon: "L",
1304
- internetCountryCode: "LS"
1305
- },
1306
- {
1307
- countryName: "Liberia",
1308
- countryCode: "+231",
1309
- currency: "Liberian dollar",
1310
- currencyCode: "LRD",
1311
- currencyIcon: "$",
1312
- internetCountryCode: "LR"
1313
- },
1314
- {
1315
- countryName: "Madagascar",
1316
- countryCode: "+261",
1317
- currency: "Malagasy ariary",
1318
- currencyCode: "MGA",
1319
- currencyIcon: "Ar",
1320
- internetCountryCode: "MG"
1321
- },
1322
- {
1323
- countryName: "Malawi",
1324
- countryCode: "+265",
1325
- currency: "Malawian kwacha",
1326
- currencyCode: "MWK",
1327
- currencyIcon: "MK",
1328
- internetCountryCode: "MW"
1329
- },
1330
- {
1331
- countryName: "Mali",
1332
- countryCode: "+223",
1333
- currency: "West African CFA franc",
1334
- currencyCode: "XOF",
1335
- currencyIcon: "Fr",
1336
- internetCountryCode: "ML"
1337
- },
1338
- {
1339
- countryName: "Mozambique",
1340
- countryCode: "+258",
1341
- currency: "Mozambican metical",
1342
- currencyCode: "MZN",
1343
- currencyIcon: "MT",
1344
- internetCountryCode: "MZ"
1345
- },
1346
- {
1347
- countryName: "Namibia",
1348
- countryCode: "+264",
1349
- currency: "Namibian dollar",
1350
- currencyCode: "NAD",
1351
- currencyIcon: "$",
1352
- internetCountryCode: "NA"
1353
- },
1354
- {
1355
- countryName: "Niger",
1356
- countryCode: "+227",
1357
- currency: "West African CFA franc",
1358
- currencyCode: "XOF",
1359
- currencyIcon: "Fr",
1360
- internetCountryCode: "NE"
1361
- },
1362
- {
1363
- countryName: "Nigeria",
1364
- countryCode: "+234",
1365
- currency: "Nigerian naira",
1366
- currencyCode: "NGN",
1367
- currencyIcon: "\u20A6",
1368
- internetCountryCode: "NG"
1369
- },
1370
- {
1371
- countryName: "Republic of the Congo",
1372
- countryCode: "+242",
1373
- currency: "Central African CFA franc",
1374
- currencyCode: "XAF",
1375
- currencyIcon: "Fr",
1376
- internetCountryCode: "CG"
1377
- },
1378
- {
1379
- countryName: "Rwanda",
1380
- countryCode: "+250",
1381
- currency: "Rwandan franc",
1382
- currencyCode: "RWF",
1383
- currencyIcon: "Fr",
1384
- internetCountryCode: "RW"
1385
- },
1386
- {
1387
- countryName: "Senegal",
1388
- countryCode: "+221",
1389
- currency: "West African CFA franc",
1390
- currencyCode: "XOF",
1391
- currencyIcon: "Fr",
1392
- internetCountryCode: "SN"
1393
- },
1394
- {
1395
- countryName: "Seychelles",
1396
- countryCode: "+248",
1397
- currency: "Seychellois rupee",
1398
- currencyCode: "SCR",
1399
- currencyIcon: "\u20A8",
1400
- internetCountryCode: "SC"
1401
- },
1402
- {
1403
- countryName: "South Africa",
1404
- countryCode: "+27",
1405
- currency: "South African rand",
1406
- currencyCode: "ZAR",
1407
- currencyIcon: "R",
1408
- internetCountryCode: "ZA"
1409
- },
1410
- {
1411
- countryName: "South Sudan",
1412
- countryCode: "+211",
1413
- currency: "South Sudanese pound",
1414
- currencyCode: "SSP",
1415
- currencyIcon: "\xA3",
1416
- internetCountryCode: "SS"
1417
- },
1418
- {
1419
- countryName: "Tanzania",
1420
- countryCode: "+255",
1421
- currency: "Tanzanian shilling",
1422
- currencyCode: "TZS",
1423
- currencyIcon: "Sh",
1424
- internetCountryCode: "TZ"
1425
- },
1426
- {
1427
- countryName: "Togo",
1428
- countryCode: "+228",
1429
- currency: "West African CFA franc",
1430
- currencyCode: "XOF",
1431
- currencyIcon: "Fr",
1432
- internetCountryCode: "TG"
1433
- },
1434
- {
1435
- countryName: "Uganda",
1436
- countryCode: "+256",
1437
- currency: "Ugandan shilling",
1438
- currencyCode: "UGX",
1439
- currencyIcon: "Sh",
1440
- internetCountryCode: "UG"
1441
- },
1442
- {
1443
- countryName: "Zambia",
1444
- countryCode: "+260",
1445
- currency: "Zambian kwacha",
1446
- currencyCode: "ZMW",
1447
- currencyIcon: "ZK",
1448
- internetCountryCode: "ZM"
1449
- }
1450
- ];
1451
- var getCountryDataMap = () => {
1452
- const frequency = {};
1453
- countryData?.forEach((country) => {
1454
- frequency[country?.internetCountryCode] = country?.countryName;
1455
- });
1456
- return frequency;
1457
- };
1458
-
1459
- // src/components/phone-input/index.tsx
1460
- var React12 = __toESM(require("react"));
1461
- var RPNInput = __toESM(require("react-phone-number-input"));
1462
- var import_flags = __toESM(require("react-phone-number-input/flags"));
1463
-
1464
- // src/components/phone-input/Flag.tsx
1465
- var import_jsx_runtime20 = require("react/jsx-runtime");
1466
- var FlatGlobeIcon = (props) => {
1467
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1468
- "svg",
1469
- {
1470
- xmlns: "http://www.w3.org/2000/svg",
1471
- viewBox: "0 0 32 32",
1472
- fill: "none",
1473
- ...props,
1474
- children: [
1475
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { width: "32", height: "32", fill: "#60A5FA" }),
1476
- " ",
1477
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1478
- "path",
1479
- {
1480
- 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",
1481
- fill: "#34D399"
1482
- }
1483
- ),
1484
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "2", y: "28", width: "28", height: "3", fill: "#D1D5DB" }),
1485
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1486
- "path",
1487
- {
1488
- d: "M0 16H32M8 0V32M16 0V32M24 0V32",
1489
- stroke: "#2563EB",
1490
- strokeWidth: "0.5",
1491
- vectorEffect: "non-scaling-stroke"
1492
- }
1493
- ),
1494
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1495
- "path",
1496
- {
1497
- d: "M0 16H32",
1498
- stroke: "#2563EB",
1499
- strokeWidth: "1",
1500
- vectorEffect: "non-scaling-stroke"
1501
- }
1502
- )
1503
- ]
1504
- }
1505
- );
1506
- };
1507
- var Flag_default = FlatGlobeIcon;
1508
-
1509
- // src/components/phone-input/index.tsx
1510
- var import_jsx_runtime21 = require("react/jsx-runtime");
1511
- var PhoneInput = React12.forwardRef(
1512
- ({
1513
- className,
1514
- onChange,
1515
- defaultCountry = "NG",
1516
- modal,
1517
- showAsterisk,
1518
- label,
1519
- description,
1520
- error,
1521
- ...props
1522
- }, ref) => {
1523
- const CountrySelectWrapper = (innerProps) => {
1524
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CountrySelect, { ...innerProps, status: props.status, modal });
1525
- };
1526
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative space-y-1", children: [
1527
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormLabel, { showAsterisk, error, children: label }),
1528
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1529
- RPNInput.default,
1530
- {
1531
- ref,
1532
- className: cn("flex", className),
1533
- flagComponent: FlagComponent,
1534
- countrySelectComponent: CountrySelectWrapper,
1535
- inputComponent: InputComponent,
1536
- defaultCountry,
1537
- onChange: (value) => {
1538
- if (onChange) {
1539
- onChange?.(value);
1540
- }
1541
- },
1542
- ...props
1543
- }
1544
- ),
1545
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
1546
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorMessage, { error })
1547
- ] });
1548
- }
1549
- );
1550
- PhoneInput.displayName = "PhoneInput";
1551
- var InputComponent = React12.forwardRef(
1552
- ({ className, ...props }, ref) => {
1553
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1554
- Input,
1555
- {
1556
- className: cn("!rounded-s-none h-10", className),
1557
- ...props,
1558
- ref
1559
- }
1560
- );
1561
- }
1562
- );
1563
- InputComponent.displayName = "InputComponent";
1564
- var CountrySelect = ({
1565
- disabled,
1566
- value,
1567
- onChange,
1568
- options,
1569
- status,
1570
- modal
1571
- }) => {
1572
- const handleSelect = React12.useCallback(
1573
- (country) => {
1574
- onChange(country);
1575
- },
1576
- [onChange]
1577
- );
1578
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(PopoverRoot, { modal, children: [
1579
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PopoverTrigger, { disabled, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1580
- "div",
1581
- {
1582
- className: cn(
1583
- inputContainerVariants({ status }),
1584
- "transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"
1585
- ),
1586
- children: [
1587
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FlagComponent, { country: value, countryName: value }),
1588
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1589
- "svg",
1590
- {
1591
- className: cn(
1592
- "mr-0.5 h-4 w-4 opacity-50",
1593
- disabled ? "hidden" : "opacity-100"
1594
- ),
1595
- width: "20",
1596
- height: "20",
1597
- viewBox: "0 0 20 20",
1598
- fill: "none",
1599
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1600
- "path",
1601
- {
1602
- d: "M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",
1603
- stroke: "#959595",
1604
- strokeWidth: "1.5",
1605
- strokeMiterlimit: "10",
1606
- strokeLinecap: "round",
1607
- strokeLinejoin: "round"
1608
- }
1609
- )
1610
- }
1611
- )
1612
- ]
1613
- }
1614
- ) }),
1615
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PopoverContent, { portal: !modal, className: "w-[200px] md:w-[300px] p-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Command, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CommandList, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ScrollArea, { className: "h-72", children: [
1616
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CommandInput, { placeholder: "Search country..." }),
1617
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CommandEmpty, { children: "No country found." }),
1618
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CommandGroup, { children: options.filter((x) => x.value).map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1619
- CommandItem,
1620
- {
1621
- className: "gap-2",
1622
- onSelect: () => handleSelect(option.value),
1623
- children: [
1624
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1625
- FlagComponent,
1626
- {
1627
- country: option.value,
1628
- countryName: option.label
1629
- }
1630
- ),
1631
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "flex-1 text-sm", children: option.label }),
1632
- option.value && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[#191919]/50 text-sm dark:text-white", children: `+${RPNInput.getCountryCallingCode(option.value)}` }),
1633
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1634
- "svg",
1635
- {
1636
- width: "16",
1637
- height: "16",
1638
- viewBox: "0 0 16 16",
1639
- fill: "none",
1640
- className: cn(
1641
- "ml-auto",
1642
- option.value === value ? "opacity-100" : "opacity-0"
1643
- ),
1644
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1645
- "path",
1646
- {
1647
- d: "M4 8.00008L6.66353 10.6636L12 5.33655",
1648
- stroke: "#959595",
1649
- strokeWidth: "1.06667",
1650
- strokeLinecap: "round",
1651
- strokeLinejoin: "round"
1652
- }
1653
- )
1654
- }
1655
- )
1656
- ]
1657
- },
1658
- `${option.value}-${option.label}`
1659
- )) })
1660
- ] }) }) }) })
1661
- ] });
1662
- };
1663
- var FlagComponent = ({
1664
- country,
1665
- countryName,
1666
- className
1667
- }) => {
1668
- const Flag = import_flags.default[country];
1669
- if (country === "GLOBAL")
1670
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1671
- "span",
1672
- {
1673
- className: cn(
1674
- "bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",
1675
- className
1676
- ),
1677
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Flag_default, { className: "w-full h-[90%]" })
1678
- }
1679
- );
1680
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1681
- "span",
1682
- {
1683
- className: cn(
1684
- "bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",
1685
- className
1686
- ),
1687
- children: Flag && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Flag, { title: countryName })
1688
- }
1689
- );
1690
- };
1691
- FlagComponent.displayName = "FlagComponent";
1692
-
1693
- // src/components/country/index.tsx
1694
- var import_jsx_runtime22 = require("react/jsx-runtime");
1695
- var countryMap = getCountryDataMap();
1696
- var CountryTrigger = ({
1697
- className,
1698
- value,
1699
- placeholder = "",
1700
- status,
1701
- disabled
1702
- }) => {
1703
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1704
- "button",
1705
- {
1706
- disabled,
1707
- className: cn(
1708
- inputContainerVariants({ status }),
1709
- "[&>span]:justify-start [&>span]:items-center gap-2 flex w-full items-center justify-between goup",
1710
- value ? "" : "text-[#79818C]",
1711
- className
1712
- ),
1713
- children: [
1714
- value ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex gap-2 items-center", children: [
1715
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1716
- FlagComponent,
1717
- {
1718
- country: value,
1719
- countryName: value,
1720
- className: "ml-1 !w-6 h-5"
1721
- }
1722
- ),
1723
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "", children: [
1724
- " ",
1725
- countryMap[value]
1726
- ] })
1727
- ] }) : placeholder ?? "Select options...",
1728
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1729
- "svg",
1730
- {
1731
- width: "20",
1732
- height: "20",
1733
- viewBox: "0 0 20 20",
1734
- fill: "none",
1735
- className: " data-[state=open]:goup-rotate-180",
1736
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1737
- "path",
1738
- {
1739
- d: "M16.5999 7.45825L11.1666 12.8916C10.5249 13.5333 9.4749 13.5333 8.83324 12.8916L3.3999 7.45825",
1740
- stroke: "currentColor",
1741
- strokeWidth: "1.5",
1742
- strokeMiterlimit: "10",
1743
- strokeLinecap: "round",
1744
- strokeLinejoin: "round"
1745
- }
1746
- )
1747
- }
1748
- )
1749
- ]
1750
- }
1751
- ) });
1752
- };
1753
- var Country = ({
1754
- hideSearch = true,
1755
- showAsterisk,
1756
- label,
1757
- description,
1758
- error,
1759
- ...props
1760
- }) => {
1761
- const options = countryData?.map((country) => ({
1762
- value: country?.internetCountryCode,
1763
- label: country?.countryName,
1764
- ...country
1765
- }));
1766
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "relative space-y-1", children: [
1767
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormLabel, { showAsterisk, error, children: label }),
1768
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1769
- Searchable,
1770
- {
1771
- options,
1772
- hideSearch,
1773
- optionComponent: (arg) => {
1774
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "w-full flex items-center gap-2", children: [
1775
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1776
- FlagComponent,
1777
- {
1778
- country: arg?.internetCountryCode,
1779
- countryName: arg?.label,
1780
- className: "ml-2 !w-6 !h-5"
1781
- }
1782
- ),
1783
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "flex-1 text-sm", children: arg?.label })
1784
- ] });
1785
- },
1786
- ...props,
1787
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1788
- CountryTrigger,
1789
- {
1790
- value: props?.value?.value,
1791
- status: props?.status,
1792
- placeholder: props?.placeholder ?? " Select Country"
1793
- }
1794
- )
1795
- }
1796
- ),
1797
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
1798
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ErrorMessage, { error })
1799
- ] });
1800
- };
1801
-
1802
- // src/components/select/index.tsx
1803
- var import_jsx_runtime23 = require("react/jsx-runtime");
1804
- var Select = ({
1805
- showAsterisk,
1806
- label,
1807
- description,
1808
- error,
1809
- hideSearch = true,
1810
- status,
1811
- ...props
1812
- }) => {
1813
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "relative space-y-1", children: [
1814
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FormLabel, { showAsterisk, error, children: label }),
1815
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1816
- Searchable,
1817
- {
1818
- hideSearch,
1819
- ...props,
1820
- containerClassName: "h-full",
1821
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1822
- SearchableTrigger,
1823
- {
1824
- disabled: props?.disabled,
1825
- placeholder: "Select or search email",
1826
- status,
1827
- value: props?.value?.label ?? props?.value?.value
1828
- }
1829
- )
1830
- }
1831
- ),
1832
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FormDescription, { className: "text-gray-400 text-sm !font-normal", children: description }),
1833
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ErrorMessage, { error })
1834
- ] });
1835
- };
1836
-
1837
- // src/components/otp/index.tsx
1838
- var import_react_otp_input = __toESM(require("react-otp-input"));
1839
- var import_class_variance_authority5 = require("class-variance-authority");
1840
- var import_react5 = require("react");
1841
- var import_jsx_runtime24 = require("react/jsx-runtime");
1842
- var otpInputVariants = (0, import_class_variance_authority5.cva)(
1843
- "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",
1844
- {
1845
- variants: {
1846
- status: {
1847
- 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]",
1848
- error: "placeholder:text-red-600 bg-red-50 border-red-600 text-red-600 focus-within:bg-red-50 focus-within:border-red-600",
1849
- loading: "placeholder:text-[#C4C4C4]"
1850
- }
1851
- },
1852
- defaultVariants: {
1853
- status: "default"
1854
- }
1855
- }
1856
- );
1857
- var OTPInput = ({
1858
- numInputs = 4,
1859
- inputStyle,
1860
- containerStyle,
1861
- placeholder = "-",
1862
- status,
1863
- ...props
1864
- }) => {
1865
- const placeholderValue = (0, import_react5.useMemo)(() => {
1866
- if (placeholder) return placeholder;
1867
- const numInputArr = new Array(numInputs).fill("");
1868
- const result = numInputArr.reduce((accumulator, currentValue) => {
1869
- return accumulator += currentValue;
1870
- }, "");
1871
- return result;
1872
- }, [numInputs, placeholder]);
1873
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1874
- import_react_otp_input.default,
1875
- {
1876
- numInputs,
1877
- placeholder: placeholderValue,
1878
- containerStyle: cn("w-full", containerStyle),
1879
- inputStyle: cn(otpInputVariants({ status }), inputStyle),
1880
- renderInput: (props2) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { ...props2 }),
1881
- ...props
1882
- }
1883
- );
1884
- };
1885
-
1886
- // src/components/copyable-label/index.tsx
1887
- var import_react6 = require("react");
1888
- var import_lucide_react2 = require("lucide-react");
1889
- var import_framer_motion = require("framer-motion");
1890
- var import_jsx_runtime25 = require("react/jsx-runtime");
1891
- var CopyableLabel = ({
1892
- text,
1893
- onCopy,
1894
- iconsPosition = "right",
1895
- clampText = true
1896
- }) => {
1897
- const [copied, setCopied] = (0, import_react6.useState)(false);
1898
- const copyToClipboard = () => {
1899
- navigator.clipboard.writeText(text).then(() => {
1900
- setCopied(true);
1901
- onCopy?.();
1902
- setTimeout(() => setCopied(false), 2e3);
1903
- });
1904
- };
1905
- const Icon2 = copied ? import_lucide_react2.CheckIcon : import_lucide_react2.Copy;
1906
- return /* @__PURE__ */ (0, import_jsx_runtime25.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: [
1907
- iconsPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AnimatedIcon, { Icon: Icon2, onClick: copyToClipboard, copied }),
1908
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: `${clampText ? "truncate max-w-[100px]" : ""}`, children: text }),
1909
- iconsPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AnimatedIcon, { Icon: Icon2, onClick: copyToClipboard, copied })
1910
- ] });
1911
- };
1912
- var AnimatedIcon = ({ Icon: Icon2, onClick, copied }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1913
- import_framer_motion.motion.div,
1914
- {
1915
- initial: { opacity: 0, scale: 0.8 },
1916
- animate: { opacity: 1, scale: 1 },
1917
- exit: { opacity: 0, scale: 0.8 },
1918
- transition: { duration: 0.2 },
1919
- onClick,
1920
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1921
- Icon2,
1922
- {
1923
- className: `w-5 h-5 ${copied ? "text-green-500" : "text-gray-500 hover:text-gray-700 transition"}`
1924
- }
1925
- )
1926
- },
1927
- copied ? "check" : "copy"
1928
- ) });
1929
-
1930
- // src/components/debounced-input/index.tsx
1931
- var import_react7 = require("react");
1932
- var import_lucide_react3 = require("lucide-react");
1933
- var import_jsx_runtime26 = require("react/jsx-runtime");
1934
- var DebouncedInput = ({
1935
- value: initialValue,
1936
- onChange,
1937
- debounce = 500,
1938
- addon,
1939
- ...props
1940
- }) => {
1941
- const [value, setValue] = (0, import_react7.useState)(initialValue ?? "");
1942
- const handleInputChange = (event) => setValue(event.target.value);
1943
- (0, import_react7.useEffect)(() => {
1944
- if (!initialValue) return;
1945
- setValue(initialValue);
1946
- }, [initialValue]);
1947
- (0, import_react7.useEffect)(() => {
1948
- const timeout = setTimeout(() => {
1949
- onChange(value);
1950
- }, debounce);
1951
- return () => clearTimeout(timeout);
1952
- }, [value, debounce, onChange]);
1953
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1954
- Input,
1955
- {
1956
- leftNode: addon ?? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react3.Search, { className: " w-4 h-4 text-gray-400" }),
1957
- sideNodeClassName: "bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",
1958
- ...props,
1959
- className: cn(
1960
- "!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",
1961
- props?.className
1962
- ),
1963
- onChange: handleInputChange,
1964
- value
1965
- }
1966
- );
1967
- };
1968
-
1969
- // src/components/status/index.tsx
1970
- var import_jsx_runtime27 = require("react/jsx-runtime");
1971
- var Status = ({
1972
- status,
1973
- variant,
1974
- className
1975
- }) => {
1976
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1977
- "div",
1978
- {
1979
- className: cn(
1980
- "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",
1981
- {
1982
- "bg-green-500/20 text-green-500": variant === "success"
1983
- },
1984
- {
1985
- "bg-gray-500/20 text-white": variant === "abandoned"
1986
- },
1987
- {
1988
- "bg-red-500/20 text-red-500": variant === "failed"
1989
- },
1990
- {
1991
- "bg-yellow-500/20 text-yellow-500": variant === "pending"
1992
- },
1993
- className
1994
- ),
1995
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { children: status.replace("-", " ") })
1996
- }
1997
- ) });
1998
- };
1999
-
2000
- // src/components/table/index.tsx
2001
- var import_lucide_react5 = require("lucide-react");
2002
-
2003
- // src/components/table/pagination/index.tsx
2004
- var import_lucide_react4 = require("lucide-react");
2005
-
2006
- // src/components/table/pagination/utils.tsx
2007
- var import_jsx_runtime28 = require("react/jsx-runtime");
2008
- var PageButton = ({
2009
- page,
2010
- currentPage,
2011
- onClick
2012
- }) => {
2013
- if (typeof page === "string") {
2014
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500", children: page });
2015
- }
2016
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2017
- "button",
2018
- {
2019
- onClick,
2020
- className: `p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${page === currentPage ? "bg-primary-main text-white" : "text-[#717171] hover:bg-primary-main/10"}`,
2021
- children: page
2022
- }
2023
- );
2024
- };
2025
- var renderPageNumbers = ({
2026
- totalPages,
2027
- currentPage,
2028
- handlePageClick
2029
- }) => {
2030
- const maxVisiblePages = 3;
2031
- const getWindowBounds = () => {
2032
- const halfWindow = Math.floor(maxVisiblePages / 2);
2033
- let start2 = Math.max(1, currentPage - halfWindow);
2034
- let end2 = Math.min(totalPages, start2 + maxVisiblePages - 1);
2035
- if (end2 > totalPages) {
2036
- start2 = Math.max(1, totalPages - maxVisiblePages + 1);
2037
- end2 = totalPages;
2038
- }
2039
- return { start: start2, end: end2 };
2040
- };
2041
- const { start, end } = getWindowBounds();
2042
- const pages = [];
2043
- if (start > 1) pages.push(1);
2044
- if (start > 2) pages.push("...");
2045
- pages.push(...Array.from({ length: end - start + 1 }, (_, i) => start + i));
2046
- if (end < totalPages - 1) pages.push("...");
2047
- if (end < totalPages) pages.push(totalPages);
2048
- return pages.map((page, idx) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2049
- PageButton,
2050
- {
2051
- page,
2052
- currentPage,
2053
- onClick: typeof page === "number" ? () => handlePageClick(page) : void 0
2054
- },
2055
- idx
2056
- ));
2057
- };
2058
-
2059
- // src/components/table/pagination/index.tsx
2060
- var import_jsx_runtime29 = require("react/jsx-runtime");
2061
- var Pagination = ({
2062
- currentPage = 1,
2063
- totalPages = 1,
2064
- onPageChange,
2065
- itemsPerPage = 0,
2066
- totalItems = 0
2067
- }) => {
2068
- const handlePageClick = (page) => {
2069
- if (page >= 1 && page <= totalPages) {
2070
- onPageChange?.(page);
2071
- }
2072
- };
2073
- const visibleRangeStart = itemsPerPage === 0 ? 1 : itemsPerPage * (currentPage - 1) + 1;
2074
- const visibleRangeEnd = currentPage === totalPages ? totalItems : Math.min(visibleRangeStart + itemsPerPage - 1, totalItems);
2075
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0", children: [
2076
- totalItems && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("section", { className: "text-[#717171] text-[12px]", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("p", { className: "", children: [
2077
- "Showing ",
2078
- visibleRangeStart,
2079
- " - ",
2080
- visibleRangeEnd,
2081
- " of ",
2082
- totalItems
2083
- ] }) }),
2084
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex items-center justify-center sm:justify-end ", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("nav", { className: " inline-flex gap-x-1 sm:gap-x-[10px] items-center", children: [
2085
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2086
- "button",
2087
- {
2088
- onClick: () => handlePageClick(currentPage - 1),
2089
- disabled: currentPage === 1,
2090
- className: "text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",
2091
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react4.ChevronLeftIcon, { className: "size-5" })
2092
- }
2093
- ),
2094
- renderPageNumbers({ currentPage, totalPages, handlePageClick }),
2095
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2096
- "button",
2097
- {
2098
- onClick: () => handlePageClick(currentPage + 1),
2099
- disabled: currentPage === totalPages,
2100
- className: "text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",
2101
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react4.ChevronRightIcon, { className: "size-5" })
2102
- }
2103
- )
2104
- ] }) })
2105
- ] });
2106
- };
2107
-
2108
- // src/components/table/TableBody.tsx
2109
- var import_react_table = require("@tanstack/react-table");
2110
- var import_jsx_runtime30 = require("react/jsx-runtime");
2111
- var TableBody = ({
2112
- table,
2113
- isMobile,
2114
- onRowClick,
2115
- id
2116
- }) => {
2117
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("relative w-full rounded-b border-0", {}), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("table", { id: id ?? "table", className: "w-full overflow-x-scroll", children: [
2118
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2119
- "tr",
2120
- {
2121
- className: cn(
2122
- " rounded text-[#717171] border-b- bg-[#FCFCFC]",
2123
- {}
2124
- ),
2125
- children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2126
- "th",
2127
- {
2128
- className: "relative py-3 text-base whitespace-nowrap pl-2.5 text-left font-normal capitalize",
2129
- colSpan: header.colSpan,
2130
- style: {
2131
- width: header.getSize()
2132
- },
2133
- children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2134
- "div",
2135
- {
2136
- className: cn("flex items-center", {
2137
- "cursor-pointer select-none": header.column.getCanSort()
2138
- }),
2139
- onClick: header.column.getToggleSortingHandler(),
2140
- children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
2141
- header.column.columnDef.header,
2142
- header.getContext()
2143
- )
2144
- }
2145
- )
2146
- },
2147
- header.id
2148
- ))
2149
- },
2150
- headerGroup.id
2151
- )) }),
2152
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tbody", { className: " pl-2.5", children: table?.getFilteredRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2153
- "tr",
2154
- {
2155
- className: cn(
2156
- "first-letter border-b border-zinc-100",
2157
- {
2158
- "hover:bg-gray-50": !isMobile
2159
- },
2160
- {
2161
- "hover:bg-gray-50 hover:cursor-pointer": onRowClick
2162
- }
2163
- ),
2164
- onClick: () => onRowClick ? onRowClick(row) : {},
2165
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2166
- "td",
2167
- {
2168
- className: cn("", {
2169
- // block: false,
2170
- }),
2171
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2172
- "div",
2173
- {
2174
- className: cn("", {
2175
- "w-max p-4 pl-2.5 text-black text-sm": true
2176
- }),
2177
- children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
2178
- }
2179
- )
2180
- },
2181
- cell.id
2182
- ))
2183
- },
2184
- row.id
2185
- )) })
2186
- ] }) });
2187
- };
2188
-
2189
- // src/components/table/index.tsx
2190
- var import_jsx_runtime31 = require("react/jsx-runtime");
2191
- var Table = ({
2192
- table,
2193
- isMobile = false,
2194
- onRowClick,
2195
- id,
2196
- onRefetch,
2197
- isRefetching,
2198
- FilterMenu,
2199
- ExtraNode,
2200
- //deprecated: onExport - use download
2201
- onExport,
2202
- search = {
2203
- enabled: false,
2204
- debounceRate: 700
2205
- },
2206
- download = {
2207
- enabled: false,
2208
- buttonId: "download_button",
2209
- buttonText: "Export"
2210
- },
2211
- isLoading,
2212
- pagination
2213
- }) => {
2214
- const handleRefetch = () => {
2215
- try {
2216
- onRefetch?.();
2217
- } catch (e) {
2218
- console.error("Error while refetching data", e);
2219
- }
2220
- };
2221
- const handleSearch = (e) => {
2222
- search?.onSearch?.(e);
2223
- };
2224
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("relative w-full rounded-b border-0 overflow-x-auto"), children: [
2225
- (onRefetch || search?.enabled || FilterMenu || ExtraNode || onExport) && /* @__PURE__ */ (0, import_jsx_runtime31.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: [
2226
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: " w-full flex gap-x-3", children: [
2227
- search?.enabled && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("section", { className: "sm:w-56", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2228
- DebouncedInput,
2229
- {
2230
- type: "text",
2231
- placeholder: "Enter search here...",
2232
- className: "h-9",
2233
- onChange: handleSearch,
2234
- debounce: search?.debounceRate
2235
- }
2236
- ) }),
2237
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: " flex gap-2", children: [
2238
- onRefetch && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2239
- Button,
2240
- {
2241
- onClick: handleRefetch,
2242
- title: "Refetch Data",
2243
- disabled: isRefetching,
2244
- variant: "outlined",
2245
- className: "!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",
2246
- size: "sm",
2247
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2248
- import_lucide_react5.RotateCw,
2249
- {
2250
- className: cn("w-4 h-4", {
2251
- "animate-spin": isRefetching
2252
- }),
2253
- size: 5
2254
- }
2255
- )
2256
- }
2257
- ),
2258
- FilterMenu && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2259
- Popover,
2260
- {
2261
- trigger: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2262
- "button",
2263
- {
2264
- title: "Filter",
2265
- className: cn(
2266
- "!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",
2267
- buttonVariants({
2268
- variant: "outlined",
2269
- size: "sm"
2270
- })
2271
- ),
2272
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react5.ListFilter, { className: "w-4 h-4", size: 5 })
2273
- }
2274
- ),
2275
- children: FilterMenu
2276
- }
2277
- )
2278
- ] })
2279
- ] }) }),
2280
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-start flex-col gap-2 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("section", { className: "flex flex-col-reverse sm:flex-row gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-2", children: [
2281
- ExtraNode && ExtraNode,
2282
- onExport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { variant: "primary", onClick: onExport, size: "sm", children: "Export" }),
2283
- download?.enabled && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2284
- Button,
2285
- {
2286
- variant: "primary",
2287
- leftNode: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2288
- import_lucide_react5.Download,
2289
- {
2290
- className: cn("w-4 h-4", {
2291
- "animate-spin": isRefetching
2292
- }),
2293
- size: 5
2294
- }
2295
- ),
2296
- onClick: download?.onDownload,
2297
- id: download.buttonId,
2298
- size: "sm",
2299
- children: download?.buttonText
2300
- }
2301
- )
2302
- ] }) }) })
2303
- ] }),
2304
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("main", { className: "w-full overflow-x-auto mt-5", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "py-10 flex flex-col justify-center w-full items-center space-x-2", children: [
2305
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react5.Loader, { size: 20, className: "animate-spin" }),
2306
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse", children: "Loading..." })
2307
- ] }) : table.getRowModel().rows.length < 1 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "py-10 flex flex-col justify-center w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-center text-gray-600 text-sm opacity-70", children: "No data available" }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2308
- TableBody,
2309
- {
2310
- table,
2311
- isMobile,
2312
- onRowClick,
2313
- id
2314
- }
2315
- ) }) }),
2316
- !isLoading && pagination?.enabled && table.getRowModel().rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2317
- Pagination,
2318
- {
2319
- ...pagination,
2320
- currentPage: pagination?.currentPage ?? 1,
2321
- totalPages: pagination?.totalPages ?? Math.ceil(
2322
- (pagination?.totalItems ?? 0) / Math.max(pagination?.itemsPerPage ?? 1, 1)
2323
- ) ?? 1,
2324
- onPageChange: (page) => pagination?.onPageChange?.(page)
2325
- }
2326
- )
2327
- ] });
2328
- };
2329
-
2330
- // src/components/dev-banner/index.tsx
2331
- var import_react8 = require("react");
2332
- var import_lucide_react6 = require("lucide-react");
2333
- var import_jsx_runtime32 = require("react/jsx-runtime");
2334
- var DevBanner = (props) => {
2335
- const {
2336
- environment,
2337
- branch,
2338
- version,
2339
- deployTime,
2340
- showBanner,
2341
- onClose,
2342
- initDefault,
2343
- removeFromStorage,
2344
- syncLocalStorageToState
2345
- } = props;
2346
- const currentEnv = environment || process.env.NEXT_PUBLIC_NODE_ENV;
2347
- if (currentEnv !== "staging" && currentEnv !== "sandbox") {
2348
- (0, import_react8.useEffect)(() => {
2349
- console.log({ environment, branch, version, deployTime });
2350
- }, []);
2351
- return null;
2352
- }
2353
- (0, import_react8.useEffect)(() => {
2354
- syncLocalStorageToState();
2355
- }, []);
2356
- (0, import_react8.useEffect)(() => {
2357
- let interval;
2358
- const currentEnv2 = environment || process.env.NEXT_PUBLIC_NODE_ENV;
2359
- if (currentEnv2 === "staging" || currentEnv2 === "sandbox") {
2360
- interval = setInterval(
2361
- () => {
2362
- removeFromStorage();
2363
- initDefault();
2364
- },
2365
- 5 * 60 * 1e3
2366
- );
2367
- }
2368
- return () => {
2369
- if (interval) {
2370
- clearInterval(interval);
2371
- }
2372
- };
2373
- }, [showBanner, environment, onClose]);
2374
- if (!showBanner) return null;
2375
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96", children: [
2376
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("button", { onClick: onClose, className: "absolute top-2 right-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react6.X, {}) }),
2377
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "space-y-2 text-sm", children: [
2378
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex gap-2", children: [
2379
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "font-medium", children: "Environment:" }),
2380
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-blue-600 capitalize", children: environment || process.env.NEXT_PUBLIC_NODE_ENV })
2381
- ] }),
2382
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex gap-2", children: [
2383
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "font-medium", children: "Branch:" }),
2384
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-green-600 capitalize", children: branch || process.env.NEXT_PUBLIC_DEPLOY_BRANCH })
2385
- ] }),
2386
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex gap-2", children: [
2387
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "font-medium", children: "Version:" }),
2388
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-purple-600", children: version || process.env.NEXT_PUBLIC_DEPLOY_VERSION })
2389
- ] }),
2390
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex gap-2", children: [
2391
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "font-medium", children: "Deploy Time:" }),
2392
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-orange-600", children: deployTime || process.env.NEXT_PUBLIC_DEPLOY_TIME })
2393
- ] })
2394
- ] })
2395
- ] });
2396
- };
2397
-
2398
- // src/components/banner/index.tsx
2399
- var import_react9 = require("react");
2400
- var import_jsx_runtime33 = require("react/jsx-runtime");
2401
- var Icon = ({ type }) => {
2402
- if (type === "gray") {
2403
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2404
- "svg",
2405
- {
2406
- width: "20",
2407
- height: "20",
2408
- viewBox: "0 0 20 20",
2409
- fill: "none",
2410
- xmlns: "http://www.w3.org/2000/svg",
2411
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2412
- "path",
2413
- {
2414
- d: "M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",
2415
- fill: "#79818C"
2416
- }
2417
- )
2418
- }
2419
- );
2420
- } else if (type === "info") {
2421
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2422
- "svg",
2423
- {
2424
- width: "24",
2425
- height: "24",
2426
- viewBox: "0 0 24 24",
2427
- fill: "none",
2428
- xmlns: "http://www.w3.org/2000/svg",
2429
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2430
- "path",
2431
- {
2432
- d: "M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",
2433
- fill: "#70B6F6"
2434
- }
2435
- )
2436
- }
2437
- );
2438
- } else if (type === "warning") {
2439
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2440
- "svg",
2441
- {
2442
- width: "20",
2443
- height: "20",
2444
- viewBox: "0 0 20 20",
2445
- fill: "none",
2446
- xmlns: "http://www.w3.org/2000/svg",
2447
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2448
- "path",
2449
- {
2450
- d: "M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",
2451
- fill: "#FFC700"
2452
- }
2453
- )
2454
- }
2455
- );
2456
- } else if (type === "success") {
2457
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2458
- "svg",
2459
- {
2460
- width: "24",
2461
- height: "24",
2462
- viewBox: "0 0 24 24",
2463
- fill: "none",
2464
- xmlns: "http://www.w3.org/2000/svg",
2465
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2466
- "path",
2467
- {
2468
- d: "M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",
2469
- fill: "#00D488"
2470
- }
2471
- )
2472
- }
2473
- );
2474
- } else {
2475
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2476
- "svg",
2477
- {
2478
- width: "20",
2479
- height: "20",
2480
- viewBox: "0 0 20 20",
2481
- fill: "none",
2482
- xmlns: "http://www.w3.org/2000/svg",
2483
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2484
- "path",
2485
- {
2486
- d: "M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",
2487
- fill: "#F04248"
2488
- }
2489
- )
2490
- }
2491
- );
2492
- }
2493
- };
2494
- var Banner = ({
2495
- type = "info",
2496
- title,
2497
- description,
2498
- open,
2499
- showCloseButton,
2500
- bottomNode,
2501
- sideNode,
2502
- onClose,
2503
- showIcon = true
2504
- }) => {
2505
- const [isOpen, setIsOpen] = (0, import_react9.useState)(open);
2506
- (0, import_react9.useEffect)(() => {
2507
- setIsOpen(open);
2508
- }, [open]);
2509
- let bgColor = "";
2510
- let stripeColor = "";
2511
- switch (type) {
2512
- case "gray":
2513
- bgColor = "#eeeef0";
2514
- stripeColor = "#79818c";
2515
- break;
2516
- case "info":
2517
- bgColor = "#ebf5fd";
2518
- stripeColor = "#70B6F6";
2519
- break;
2520
- case "warning":
2521
- bgColor = "#fff8df";
2522
- stripeColor = "#ffc700";
2523
- break;
2524
- case "success":
2525
- bgColor = "#e0f9f0";
2526
- stripeColor = "#49e0aa";
2527
- break;
2528
- case "danger":
2529
- bgColor = "#fde8e9";
2530
- stripeColor = "#f3777c";
2531
- break;
2532
- default:
2533
- bgColor = "#eeeef0";
2534
- stripeColor = "#79818c";
2535
- break;
2536
- }
2537
- function handleClose() {
2538
- setIsOpen(false);
2539
- if (onClose) {
2540
- onClose();
2541
- }
2542
- }
2543
- if (!isOpen) {
2544
- return null;
2545
- }
2546
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2547
- "div",
2548
- {
2549
- className: "w-full shadow-lg transform flex items-center rounded-md",
2550
- style: {
2551
- background: bgColor || "#ebf5fd"
2552
- },
2553
- children: [
2554
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2555
- "div",
2556
- {
2557
- className: "flex-none absolute rounded-l-[4px] rounded-l-4px w-[4px] h-full",
2558
- style: {
2559
- background: stripeColor || "#70B6F6"
2560
- }
2561
- }
2562
- ),
2563
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full gap-3 h-full flex flex-row justify-between px-4 md:px-5 py-4 md:py-5", children: [
2564
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-row gap-2.5 items-start w-full h-full", children: [
2565
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-full flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { type }) }),
2566
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between", children: [
2567
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex-1 gap-3 h-full flex flex-col items-start justify-between", children: [
2568
- (title || description) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
2569
- title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-sm font-bold text-[#191919]", children: title }),
2570
- description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-sm font-normal text-[#5D5D5D] mt-1", children: description })
2571
- ] }),
2572
- bottomNode
2573
- ] }),
2574
- sideNode
2575
- ] })
2576
- ] }),
2577
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-1/10 h-full flex flex-col justify-start items-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { onClick: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2578
- "svg",
2579
- {
2580
- width: "16",
2581
- height: "16",
2582
- viewBox: "0 0 16 16",
2583
- fill: "none",
2584
- xmlns: "http://www.w3.org/2000/svg",
2585
- children: [
2586
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2587
- "path",
2588
- {
2589
- d: "M3.3335 3.33337L12.6662 12.6661",
2590
- stroke: "#191919",
2591
- strokeWidth: "1.5",
2592
- strokeLinecap: "round",
2593
- strokeLinejoin: "round"
2594
- }
2595
- ),
2596
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2597
- "path",
2598
- {
2599
- d: "M3.33429 12.6661L12.667 3.33337",
2600
- stroke: "#191919",
2601
- strokeWidth: "1.5",
2602
- strokeLinecap: "round",
2603
- strokeLinejoin: "round"
2604
- }
2605
- )
2606
- ]
2607
- }
2608
- ) }) })
2609
- ] })
2610
- ]
2611
- }
2612
- );
2613
- };
2614
-
2615
- // src/actions/amount.action.ts
2616
- var CurrencySymbolMap = {
2617
- USD: "$",
2618
- CAD: "CA$",
2619
- EUR: "\u20AC",
2620
- AED: "AED",
2621
- AFN: "Af",
2622
- ALL: "ALL",
2623
- AMD: "AMD",
2624
- ARS: "AR$",
2625
- AUD: "AU$",
2626
- AZN: "man.",
2627
- BAM: "KM",
2628
- BDT: "Tk",
2629
- BGN: "BGN",
2630
- BHD: "BD",
2631
- BIF: "FBu",
2632
- BND: "BN$",
2633
- BOB: "Bs",
2634
- BRL: "R$",
2635
- BWP: "BWP",
2636
- BYN: "Br",
2637
- BZD: "BZ$",
2638
- CDF: "CDF",
2639
- CHF: "CHF",
2640
- CLP: "CL$",
2641
- CNY: "CN\xA5",
2642
- COP: "CO$",
2643
- CRC: "\u20A1",
2644
- CVE: "CV$",
2645
- CZK: "K\u010D",
2646
- DJF: "Fdj",
2647
- DKK: "Dkr",
2648
- DOP: "RD$",
2649
- DZD: "DA",
2650
- EEK: "Ekr",
2651
- EGP: "EGP",
2652
- ERN: "Nfk",
2653
- ETB: "Br",
2654
- GBP: "\xA3",
2655
- GEL: "GEL",
2656
- GHS: "GH\u20B5",
2657
- GNF: "FG",
2658
- GTQ: "GTQ",
2659
- HKD: "HK$",
2660
- HNL: "HNL",
2661
- HRK: "kn",
2662
- HUF: "Ft",
2663
- IDR: "Rp",
2664
- ILS: "\u20AA",
2665
- INR: "\u20B9",
2666
- IQD: "IQD",
2667
- IRR: "IRR",
2668
- ISK: "Ikr",
2669
- JMD: "J$",
2670
- JOD: "JD",
2671
- JPY: "\xA5",
2672
- KES: "Ksh",
2673
- KHR: "KHR",
2674
- KMF: "CF",
2675
- KRW: "\u20A9",
2676
- KWD: "KD",
2677
- KZT: "KZT",
2678
- LBP: "L.L.",
2679
- LKR: "SLRs",
2680
- LTL: "Lt",
2681
- LVL: "Ls",
2682
- LYD: "LD",
2683
- MAD: "MAD",
2684
- MDL: "MDL",
2685
- MGA: "MGA",
2686
- MKD: "MKD",
2687
- MMK: "MMK",
2688
- MOP: "MOP$",
2689
- MUR: "MURs",
2690
- MXN: "MX$",
2691
- MYR: "RM",
2692
- MZN: "MTn",
2693
- NAD: "N$",
2694
- NGN: "\u20A6",
2695
- NIO: "C$",
2696
- NOK: "Nkr",
2697
- NPR: "NPRs",
2698
- NZD: "NZ$",
2699
- OMR: "OMR",
2700
- PAB: "B/.",
2701
- PEN: "S/.",
2702
- PHP: "\u20B1",
2703
- PKR: "PKRs",
2704
- PLN: "z\u0142",
2705
- PYG: "\u20B2",
2706
- QAR: "QR",
2707
- RON: "RON",
2708
- RSD: "din.",
2709
- RUB: "RUB",
2710
- RWF: "RWF",
2711
- SAR: "SR",
2712
- SDG: "SDG",
2713
- SEK: "Skr",
2714
- SGD: "S$",
2715
- SOS: "Ssh",
2716
- SYP: "SY\xA3",
2717
- THB: "\u0E3F",
2718
- TND: "DT",
2719
- TOP: "T$",
2720
- TRY: "TL",
2721
- TTD: "TT$",
2722
- TWD: "NT$",
2723
- TZS: "TSh",
2724
- UAH: "\u20B4",
2725
- UGX: "USh",
2726
- UYU: "$U",
2727
- UZS: "UZS",
2728
- VEF: "Bs.F.",
2729
- VND: "\u20AB",
2730
- XAF: "F CFA",
2731
- XOF: "CFA",
2732
- YER: "YR",
2733
- ZAR: "R",
2734
- ZMK: "ZK",
2735
- ZWL: "ZWL$"
2736
- };
2737
- var _AmountAction = class _AmountAction {
2738
- static getCurrencyLocaleMap(currency) {
2739
- const localeMap = {
2740
- XOF: "fr",
2741
- XAF: "fr"
2742
- };
2743
- return localeMap[currency] || "en";
2744
- }
2745
- static koboToNaira(amount) {
2746
- return +amount / 100;
2747
- }
2748
- static nairaToKobo(amount) {
2749
- return +amount * 100;
2750
- }
2751
- static getCurrencySymbol(currency) {
2752
- return CurrencySymbolMap[currency] || currency;
2753
- }
2754
- };
2755
- __publicField(_AmountAction, "formatAmountAndCurrency", (currency, value, options) => {
2756
- const formatted = new Intl.NumberFormat(
2757
- options?.locale || _AmountAction.getCurrencyLocaleMap(currency),
2758
- {
2759
- maximumFractionDigits: 3,
2760
- style: "currency",
2761
- currency,
2762
- currencyDisplay: "symbol"
2763
- }
2764
- ).format(
2765
- options?.convertToMajorCurrency ? _AmountAction.koboToNaira(Number(value)) : Number(value)
2766
- ).replace(/^(\D+)/, "$1 ").replace("\u202F", " ").replace(/\s+/, "");
2767
- const customSymbol = CurrencySymbolMap[currency] || currency;
2768
- return formatted.replace(currency, customSymbol);
2769
- });
2770
- var AmountAction = _AmountAction;
2771
-
2772
- // src/actions/date.action.ts
2773
- var dayjs = __toESM(require("dayjs"));
2774
- var DateAction = class {
2775
- static getDateLibrary() {
2776
- return dayjs();
2777
- }
2778
- static formatTimestampToDate(timestamp, dateFormat) {
2779
- return dayjs.unix(timestamp).format(dateFormat || "ddd, MMM, YYYY | HH:mm:ss");
2780
- }
2781
- static formatDateToTimestamp(date) {
2782
- return dayjs(date).unix();
2783
- }
2784
- };
2785
- // Annotate the CommonJS export names for ESM import in node:
2786
- 0 && (module.exports = {
2787
- AmountAction,
2788
- Banner,
2789
- Button,
2790
- CopyableLabel,
2791
- Country,
2792
- CurrencySymbolMap,
2793
- DateAction,
2794
- DebouncedInput,
2795
- DevBanner,
2796
- Dialog,
2797
- FlagComponent,
2798
- FormLabel,
2799
- Input,
2800
- Loader,
2801
- OTPInput,
2802
- PasswordInput,
2803
- PhoneInput,
2804
- Popover,
2805
- PopoverContent,
2806
- PopoverRoot,
2807
- PopoverTrigger,
2808
- Select,
2809
- Status,
2810
- Table,
2811
- Textarea,
2812
- buttonVariants,
2813
- cn
2814
- });
1
+ "use strict";var ar=Object.create;var oe=Object.defineProperty;var nr=Object.getOwnPropertyDescriptor;var ir=Object.getOwnPropertyNames;var sr=Object.getPrototypeOf,lr=Object.prototype.hasOwnProperty;var cr=(t,e,r)=>e in t?oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var dr=(t,e)=>{for(var r in e)oe(t,r,{get:e[r],enumerable:!0})},ot=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ir(e))!lr.call(t,o)&&o!==r&&oe(t,o,{get:()=>e[o],enumerable:!(n=nr(e,o))||n.enumerable});return t};var v=(t,e,r)=>(r=t!=null?ar(sr(t)):{},ot(e||!t||!t.__esModule?oe(r,"default",{value:t,enumerable:!0}):r,t)),pr=t=>ot(oe({},"__esModule",{value:!0}),t);var at=(t,e,r)=>cr(t,typeof e!="symbol"?e+"":e,r);var Rr={};dr(Rr,{AmountAction:()=>tt,Banner:()=>or,Button:()=>j,CopyableLabel:()=>Xt,Country:()=>Gt,CurrencySymbolMap:()=>et,DateAction:()=>rt,DebouncedInput:()=>Ie,DevBanner:()=>rr,Dialog:()=>De,FlagComponent:()=>W,FormLabel:()=>k,Input:()=>H,Loader:()=>re,OTPInput:()=>_t,PasswordInput:()=>Ke,PhoneInput:()=>Ye,Popover:()=>be,PopoverContent:()=>_,PopoverRoot:()=>Q,PopoverTrigger:()=>G,Select:()=>Wt,Status:()=>jt,Table:()=>er,Textarea:()=>_e,buttonVariants:()=>ie,cn:()=>a});module.exports=pr(Rr);var dt=v(require("react"));var st=v(require("react")),He=v(require("@radix-ui/react-label")),lt=require("class-variance-authority");var nt=require("clsx"),it=require("tailwind-merge");function a(...t){return(0,it.twMerge)((0,nt.clsx)(t))}var ct=require("react/jsx-runtime"),mr=(0,lt.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ge=st.forwardRef(({className:t,...e},r)=>(0,ct.jsx)(He.Root,{ref:r,className:a(mr(),t),...e}));Ge.displayName=He.Root.displayName;var ae=require("react/jsx-runtime"),k=dt.default.forwardRef(({className:t,children:e,showAsterisk:r,error:n,...o},i)=>(0,ae.jsx)(Ge,{ref:i,className:a(n&&"text-red-500",t),...o,children:r?(0,ae.jsxs)("p",{children:[e,(0,ae.jsx)("span",{className:"text-red-500",children:"*"})]}):e}));k.displayName="FormLabel";var ne=require("react/jsx-runtime"),re=({size:t=16,colour:e="primary"})=>(0,ne.jsxs)("svg",{className:"animate-spin",width:t,height:t,viewBox:"0 0 20 20",fill:"none",children:[(0,ne.jsx)("circle",{cx:"10",cy:"10",r:"9.25",stroke:"transparent",strokeWidth:"1.5"}),(0,ne.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 Pe=v(require("react")),pt=require("@radix-ui/react-slot"),mt=require("class-variance-authority");var E=require("react/jsx-runtime"),ie=(0,mt.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:"py-[0.625rem] px-[1.5rem] text-[0.875rem] leading-[1.25rem] font-medium rounded-lg","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=Pe.forwardRef(({className:t,variant:e="primary",size:r,asChild:n=!1,isLoading:o=!1,leftNode:i,rightNode:l,LoaderSize:s,...d},c)=>{let m=n?pt.Slot:"button",{children:u,disabled:p,...h}=d,D=Pe.useRef(null);return(0,E.jsx)(m,{className:a(ie({variant:e,size:r,className:t})),ref:D||c,disabled:p||o,...h,children:(0,E.jsx)("div",{className:"flex font-medium justify-center items-center gap-2",children:o?(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("span",{className:"mx-auto",children:(0,E.jsx)(re,{size:s,colour:"secondary"})})}):(0,E.jsxs)(E.Fragment,{children:[i,u,l]})})})});j.displayName="Button";var We=v(require("react"));var Re=require("class-variance-authority");var ut=v(require("react")),ft=require("react/jsx-runtime"),F=ut.default.forwardRef(({className:t,children:e,error:r,...n},o)=>{let i=r??e;return i?(0,ft.jsx)("p",{ref:o,className:a("text-xs font-normal text-[#F04248]",t),...n,children:i}):null});F.displayName="ErrorMessage";var gt=v(require("react")),yt=require("react/jsx-runtime"),A=gt.default.forwardRef(({className:t,...e},r)=>(0,yt.jsx)("div",{ref:r,className:a("text-sm text-[#8E98A8",t),...e}));A.displayName="FormDescription";var M=require("react/jsx-runtime"),ur=(0,Re.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"}}),bt=We.forwardRef(({className:t,status:e,type:r,...n},o)=>(0,M.jsx)("input",{type:r,className:a(ur({status:e}),t),ref:o,...n}));bt.displayName="BaseInnerInput";var O=(0,Re.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"}}),Ct=(0,Re.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"}}),H=We.forwardRef(({className:t,status:e="default",disabled:r,error:n,isLoading:o,sideNodeClassName:i,showAsterisk:l,label:s,description:d,...c},m)=>{let u=e;return n&&(u="error"),o&&(u="loading"),r&&(u="prefilled"),(0,M.jsxs)("div",{className:"relative space-y-1 w-full",children:[s&&(0,M.jsx)(k,{showAsterisk:l,error:n,children:s}),(0,M.jsxs)("div",{className:a(O({status:u}),c.leftNode?"pl-0":"",c.rightNode?"pr-0":"",t),children:[c.leftNode?(0,M.jsx)("div",{className:a(Ct({status:u,side:"left"}),i),children:c.leftNode}):null,(0,M.jsx)(bt,{ref:m,disabled:o||r,className:a({"!pl-3":c.leftNode&&e!=="neutral","!pr-3":c.rightNode&&e!=="neutral"}),...c}),c.rightNode?(0,M.jsx)("div",{className:a(Ct({status:u,side:"right"}),i),children:c.rightNode}):null]}),d&&(0,M.jsx)(A,{className:"text-gray-400 text-sm !font-normal",children:d}),(0,M.jsx)(F,{error:n})]})});H.displayName="Input";var ce=require("react");var se=require("react/jsx-runtime"),ht=()=>(0,se.jsxs)("svg",{width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,se.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,se.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 le=require("react/jsx-runtime"),vt=()=>(0,le.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,le.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,le.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 Ze=require("react/jsx-runtime"),xt=()=>(0,Ze.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ze.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 ze=require("react/jsx-runtime"),Nt=()=>(0,ze.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ze.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 L=require("react/jsx-runtime"),wt=[{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}],Ke=({onValidate:t,onChange:e,disableValidation:r,...n})=>{let[o,i]=(0,ce.useState)(!1),[l,s]=(0,ce.useState)(wt),d=p=>wt.map(h=>({...h,validated:h.RegExp.test(p)})),c=p=>{let h=d(p),D=h.every(I=>I.validated);return s(h),D},m=p=>{if(e&&e(p),r)return;let h=p?.target?.value,D=c(h);t&&t(D,h)},u=(0,ce.useMemo)(()=>(0,L.jsx)("div",{className:"flex items-center gap-2",children:l?.map(p=>(0,L.jsxs)("div",{className:a("text-xs flex items-center gap-0.5",{"text-[#62C554]":p?.validated,"text-[#8E98A8]":!p?.validated}),children:[(0,L.jsx)("span",{className:"",children:p?.validated?(0,L.jsx)(xt,{}):(0,L.jsx)(Nt,{})}),(0,L.jsx)("span",{className:"",children:p?.label})]},p?.key))}),[l]);return(0,L.jsx)(H,{sideNodeClassName:"!border-l-0",rightNode:o?(0,L.jsx)("button",{type:"button",onClick:()=>i(p=>!p),children:(0,L.jsx)(ht,{})}):(0,L.jsx)("button",{type:"button",onClick:()=>i(p=>!p),children:(0,L.jsx)(vt,{})}),type:o?"text":"password",onChange:m,description:!r&&u,...n})};Ke.displayName="PasswordInput";var Pt=require("class-variance-authority");var J=require("react/jsx-runtime"),co=(0,Pt.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"}}),_e=({className:t,status:e="default",disabled:r,error:n,isLoading:o,showAsterisk:i,label:l,description:s,...d})=>{let c=e;return n&&(c="error"),o&&(c="loading"),r&&(c="prefilled"),(0,J.jsxs)("div",{className:"relative space-y-1",children:[(0,J.jsx)(k,{showAsterisk:i,error:n,children:l}),(0,J.jsx)("textarea",{className:a("min-h-[80px]",O({status:c}),t),disabled:o||r,...d}),(0,J.jsx)(A,{className:"text-gray-400 text-sm !font-normal",children:s}),(0,J.jsx)(F,{error:n})]})};_e.displayName="Textarea";var q=v(require("react"));var z=v(require("react")),P=require("cmdk"),Et=require("lucide-react");var pe=v(require("react")),b=v(require("@radix-ui/react-dialog"));var de=require("react/jsx-runtime"),Rt=()=>(0,de.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,de.jsx)("path",{d:"M18 6 6 18"}),(0,de.jsx)("path",{d:"m6 6 12 12"})]});var C=require("react/jsx-runtime"),fr=b.Root,gr=b.Trigger,Dt=b.Portal,kt=pe.forwardRef(({className:t,...e},r)=>(0,C.jsx)(b.Overlay,{ref:r,className:a("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));kt.displayName=b.Overlay.displayName;var $e=pe.forwardRef(({className:t,hideCloseButton:e,children:r,...n},o)=>(0,C.jsxs)(Dt,{children:[(0,C.jsx)(kt,{}),(0,C.jsxs)(b.Content,{ref:o,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-transparent bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",t),...n,children:[r,!e&&(0,C.jsxs)(b.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,C.jsx)(Rt,{}),(0,C.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));$e.displayName=b.Content.displayName;var Lt=({className:t,...e})=>(0,C.jsx)("div",{className:a("flex flex-col space-y-1.5 text-left",t),...e});Lt.displayName="DialogHeader";var St=({className:t,...e})=>(0,C.jsx)("div",{className:a("flex flex-row justify-end sm:space-x-2",t),...e});St.displayName="DialogFooter";var Tt=pe.forwardRef(({className:t,...e},r)=>(0,C.jsx)(b.Title,{ref:r,className:a("text-xl font-semibold leading-none tracking-tight",t),...e}));Tt.displayName=b.Title.displayName;var It=pe.forwardRef(({className:t,...e},r)=>(0,C.jsx)(b.Description,{ref:r,className:a("text-sm text-gray-500",t),...e}));It.displayName=b.Description.displayName;var De=({trigger:t=void 0,children:e,open:r,onOpenChange:n,hideCloseButton:o,footer:i,title:l,description:s,contentClassName:d,headerClassName:c,titleClassName:m,descriptionClassName:u,footerClassName:p,asChild:h=!0,onOpenAutoFocus:D,onCloseAutoFocus:I,onEscapeKeyDown:we,onInteractOutside:ee,onPointerDownOutside:Be,...Oe})=>(0,C.jsxs)(fr,{...Oe,open:r,onOpenChange:n,children:[(0,C.jsx)(gr,{asChild:h,children:t}),(0,C.jsx)(Dt,{children:(0,C.jsxs)($e,{className:d,hideCloseButton:o,onOpenAutoFocus:D,onCloseAutoFocus:I,onEscapeKeyDown:we,onPointerDownOutside:Be,onInteractOutside:ee,children:[l||s?(0,C.jsxs)(Lt,{className:c,children:[l&&(0,C.jsx)(Tt,{className:m,children:l}),s&&(0,C.jsx)(It,{className:u,children:s})]}):(0,C.jsx)(C.Fragment,{}),e,i&&(0,C.jsx)(St,{className:p,children:i})]})})]});De.displayName=b.Dialog.displayName;var R=require("react/jsx-runtime"),me=z.forwardRef(({className:t,...e},r)=>(0,R.jsx)(P.Command,{ref:r,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));me.displayName=P.Command.displayName;var ue=z.forwardRef(({className:t,CommandInputContainerClassName:e,loading:r,...n},o)=>(0,R.jsxs)("div",{className:a("flex items-center border-0 px-3 gap-2",e),"cmdk-input-wrapper":"",children:[r?(0,R.jsx)(re,{size:16,colour:"secondary"}):(0,R.jsx)(Et.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,R.jsx)(P.Command.Input,{ref:o,className:a("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:r,...n})]}));ue.displayName=P.Command.Input.displayName;var fe=z.forwardRef(({className:t,...e},r)=>(0,R.jsx)(P.Command.List,{ref:r,className:a("overflow-y-auto overflow-x-hidden",t),...e}));fe.displayName=P.Command.List.displayName;var ge=z.forwardRef((t,e)=>(0,R.jsx)(P.Command.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));ge.displayName=P.Command.Empty.displayName;var ye=z.forwardRef(({className:t,...e},r)=>(0,R.jsx)(P.Command.Group,{ref:r,className:a("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));ye.displayName=P.Command.Group.displayName;var yr=z.forwardRef(({className:t,...e},r)=>(0,R.jsx)(P.Command.Separator,{ref:r,className:a("-mx-1 h-px bg-border",t),...e}));yr.displayName=P.Command.Separator.displayName;var Ce=z.forwardRef(({className:t,...e},r)=>(0,R.jsx)(P.Command.Item,{ref:r,className:a("relative text=[#222222] flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));Ce.displayName=P.Command.Item.displayName;var Cr=({className:t,...e})=>(0,R.jsx)("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});Cr.displayName="CommandShortcut";var Ft=v(require("react")),V=v(require("@radix-ui/react-popover"));var K=require("react/jsx-runtime"),Q=V.Root,G=V.Trigger,_=Ft.forwardRef(({className:t,align:e="center",sideOffset:r=4,portal:n=!0,...o},i)=>n?(0,K.jsx)(V.Portal,{children:(0,K.jsx)(V.Content,{ref:i,align:e,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o})}):(0,K.jsx)(V.Content,{ref:i,align:e,sideOffset:r,className:a("pointer-events-auto z-50 w-72 rounded-md border border-transparent bg-white p-4 text-[#191919] shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),onOpenAutoFocus:o.onOpenAutoFocus,onCloseAutoFocus:o.onCloseAutoFocus,...o}));_.displayName=V.Content.displayName;var be=({trigger:t,children:e,open:r,onOpenChange:n,contentClassName:o,asChild:i=!0,align:l,side:s,alignOffset:d,triggerClassName:c,sideOffset:m,onOpenAutoFocus:u,onCloseAutoFocus:p,portal:h=!0,...D})=>(0,K.jsxs)(Q,{...D,open:r,onOpenChange:n,children:[(0,K.jsx)(G,{asChild:i,className:c,children:t}),(0,K.jsx)(_,{alignOffset:d,sideOffset:m,side:s,align:l,className:o,onOpenAutoFocus:u,onCloseAutoFocus:p,portal:h,children:e})]});be.displayName=V.Root.displayName;var Ue=v(require("react")),S=v(require("@radix-ui/react-scroll-area"));var $=require("react/jsx-runtime"),he=Ue.forwardRef(({className:t,viewPortClassName:e,children:r,...n},o)=>(0,$.jsxs)(S.Root,{ref:o,className:a("relative overflow-hidden",t),...n,children:[(0,$.jsx)(S.Viewport,{className:a("h-full w-full rounded-[inherit]",e),children:r}),(0,$.jsx)(At,{}),(0,$.jsx)(S.Corner,{})]}));he.displayName=S.Root.displayName;var At=Ue.forwardRef(({className:t,orientation:e="vertical",...r},n)=>(0,$.jsx)(S.ScrollAreaScrollbar,{ref:n,orientation:e,className:a("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:(0,$.jsx)(S.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-[#959595] transition hover:bg-[#808080]"})}));At.displayName=S.ScrollAreaScrollbar.displayName;var w=require("react/jsx-runtime"),Mt=({className:t,value:e,placeholder:r="",status:n,disabled:o})=>(0,w.jsx)(G,{asChild:!0,disabled:o,children:(0,w.jsxs)("button",{disabled:o,className:a(O({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,w.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:" data-[state=open]:goup-rotate-180",children:(0,w.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"})})]})}),ke=({options:t=[],value:e,onChange:r,containerClassName:n,placeholder:o,disabled:i,loading:l,optionComponent:s,children:d,modal:c=!1,hideSearch:m,className:u,inputValue:p,onValueChange:h,onInputValueChange:D})=>{let[I,we]=q.useState(!1),ee=q.useRef(null),[Be,Oe]=q.useState(void 0);return q.useLayoutEffect(()=>{ee.current&&Oe(ee.current.clientWidth)},[ee.current]),(0,w.jsxs)(Q,{modal:c,open:I,onOpenChange:we,children:[(0,w.jsx)("div",{className:a("w-full",u),ref:ee,children:d}),(0,w.jsx)(_,{portal:!c,className:"p-0 min-w-[200px]",style:{width:Be},children:(0,w.jsxs)(me,{className:a("relative max-h-[270px]",{"mt-2":!m}),children:[!m&&(0,w.jsx)(ue,{loading:l,placeholder:o??"Search options...",onValueChange:D,value:p,CommandInputContainerClassName:"mx-2 border rounded-md border-[#DEDEDE]"}),(0,w.jsx)(he,{viewPortClassName:"max-h-[225px]",className:a("w-full px-0 h-full overflow-y-auto",n),children:(0,w.jsxs)(fe,{children:[!m&&(0,w.jsx)(ge,{children:"No result found."}),(0,w.jsx)(ye,{className:"w-full",children:t?.map(te=>(0,w.jsx)(Ce,{defaultValue:e?.label,value:te.label,disabled:i,onSelect:()=>{r(te),we(!1),h?.(te?.value)},children:s?s(te):te.label},te.value))})]})})]})})]})};var Xe=[{countryCode:"GLOBAL",countryName:"Global",currency:"Dollars",currencyCode:"USD",internetCountryCode:"GLOBAL"},{countryName:"Benin",countryCode:"+229",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BJ"},{countryName:"Burkina Faso",countryCode:"+226",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"BF"},{countryName:"Cameroon",countryCode:"+237",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CM"},{countryName:"Chad",countryCode:"+235",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"TD"},{countryName:"DR Congo",countryCode:"+243",currency:"Congolese franc",currencyCode:"CDF",currencyIcon:"FC",internetCountryCode:"CD"},{countryName:"Eswatini",countryCode:"+268",currency:"Swazi lilangeni",currencyCode:"SZL",currencyIcon:"L",internetCountryCode:"SZ"},{countryName:"Gabon",countryCode:"+241",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"GA"},{countryName:"Ghana",countryCode:"+233",currency:"Ghanaian cedi",currencyCode:"GHS",currencyIcon:"\u20B5",internetCountryCode:"GH"},{countryName:"Guinea",countryCode:"+224",currency:"Guinean franc",currencyCode:"GNF",currencyIcon:"Fr",internetCountryCode:"GN"},{countryName:"Ivory Coast",countryCode:"+225",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"CI"},{countryName:"Kenya",countryCode:"+254",currency:"Kenyan shilling",currencyCode:"KES",currencyIcon:"Sh",internetCountryCode:"KE"},{countryName:"Lesotho",countryCode:"+266",currency:"Lesotho loti",currencyCode:"LSL",currencyIcon:"L",internetCountryCode:"LS"},{countryName:"Liberia",countryCode:"+231",currency:"Liberian dollar",currencyCode:"LRD",currencyIcon:"$",internetCountryCode:"LR"},{countryName:"Madagascar",countryCode:"+261",currency:"Malagasy ariary",currencyCode:"MGA",currencyIcon:"Ar",internetCountryCode:"MG"},{countryName:"Malawi",countryCode:"+265",currency:"Malawian kwacha",currencyCode:"MWK",currencyIcon:"MK",internetCountryCode:"MW"},{countryName:"Mali",countryCode:"+223",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"ML"},{countryName:"Mozambique",countryCode:"+258",currency:"Mozambican metical",currencyCode:"MZN",currencyIcon:"MT",internetCountryCode:"MZ"},{countryName:"Namibia",countryCode:"+264",currency:"Namibian dollar",currencyCode:"NAD",currencyIcon:"$",internetCountryCode:"NA"},{countryName:"Niger",countryCode:"+227",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"NE"},{countryName:"Nigeria",countryCode:"+234",currency:"Nigerian naira",currencyCode:"NGN",currencyIcon:"\u20A6",internetCountryCode:"NG"},{countryName:"Republic of the Congo",countryCode:"+242",currency:"Central African CFA franc",currencyCode:"XAF",currencyIcon:"Fr",internetCountryCode:"CG"},{countryName:"Rwanda",countryCode:"+250",currency:"Rwandan franc",currencyCode:"RWF",currencyIcon:"Fr",internetCountryCode:"RW"},{countryName:"Senegal",countryCode:"+221",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"SN"},{countryName:"Seychelles",countryCode:"+248",currency:"Seychellois rupee",currencyCode:"SCR",currencyIcon:"\u20A8",internetCountryCode:"SC"},{countryName:"South Africa",countryCode:"+27",currency:"South African rand",currencyCode:"ZAR",currencyIcon:"R",internetCountryCode:"ZA"},{countryName:"South Sudan",countryCode:"+211",currency:"South Sudanese pound",currencyCode:"SSP",currencyIcon:"\xA3",internetCountryCode:"SS"},{countryName:"Tanzania",countryCode:"+255",currency:"Tanzanian shilling",currencyCode:"TZS",currencyIcon:"Sh",internetCountryCode:"TZ"},{countryName:"Togo",countryCode:"+228",currency:"West African CFA franc",currencyCode:"XOF",currencyIcon:"Fr",internetCountryCode:"TG"},{countryName:"Uganda",countryCode:"+256",currency:"Ugandan shilling",currencyCode:"UGX",currencyIcon:"Sh",internetCountryCode:"UG"},{countryName:"Zambia",countryCode:"+260",currency:"Zambian kwacha",currencyCode:"ZMW",currencyIcon:"ZK",internetCountryCode:"ZM"}],Vt=()=>{let t={};return Xe?.forEach(e=>{t[e?.internetCountryCode]=e?.countryName}),t};var ve=v(require("react")),Le=v(require("react-phone-number-input")),Ot=v(require("react-phone-number-input/flags"));var U=require("react/jsx-runtime"),br=t=>(0,U.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",...t,children:[(0,U.jsx)("rect",{width:"32",height:"32",fill:"#60A5FA"})," ",(0,U.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,U.jsx)("rect",{x:"2",y:"28",width:"28",height:"3",fill:"#D1D5DB"}),(0,U.jsx)("path",{d:"M0 16H32M8 0V32M16 0V32M24 0V32",stroke:"#2563EB",strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),(0,U.jsx)("path",{d:"M0 16H32",stroke:"#2563EB",strokeWidth:"1",vectorEffect:"non-scaling-stroke"})]}),Bt=br;var f=require("react/jsx-runtime"),Ye=ve.forwardRef(({className:t,onChange:e,defaultCountry:r="NG",modal:n,showAsterisk:o,label:i,description:l,error:s,...d},c)=>{let m=u=>(0,f.jsx)(hr,{...u,status:d.status,modal:n});return(0,f.jsxs)("div",{className:"relative space-y-1",children:[(0,f.jsx)(k,{showAsterisk:o,error:s,children:i}),(0,f.jsx)(Le.default,{ref:c,className:a("flex",t),flagComponent:W,countrySelectComponent:m,inputComponent:Ht,defaultCountry:r,onChange:u=>{e&&e?.(u)},...d}),(0,f.jsx)(A,{className:"text-gray-400 text-sm !font-normal",children:l}),(0,f.jsx)(F,{error:s})]})});Ye.displayName="PhoneInput";var Ht=ve.forwardRef(({className:t,...e},r)=>(0,f.jsx)(H,{className:a("!rounded-s-none h-10",t),...e,ref:r}));Ht.displayName="InputComponent";var hr=({disabled:t,value:e,onChange:r,options:n,status:o,modal:i})=>{let l=ve.useCallback(s=>{r(s)},[r]);return(0,f.jsxs)(Q,{modal:i,children:[(0,f.jsx)(G,{disabled:t,children:(0,f.jsxs)("div",{className:a(O({status:o}),"transition justify-center items-center disabled:text-base-500 flex gap-3 h-10 rounded-e-none border-e-0 pl-2 pr-2"),children:[(0,f.jsx)(W,{country:e,countryName:e}),(0,f.jsx)("svg",{className:a("mr-0.5 h-4 w-4 opacity-50",t?"hidden":"opacity-100"),width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,f.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,f.jsx)(_,{portal:!i,className:"w-[200px] md:w-[300px] p-0",children:(0,f.jsx)(me,{children:(0,f.jsx)(fe,{children:(0,f.jsxs)(he,{className:"h-72",children:[(0,f.jsx)(ue,{placeholder:"Search country..."}),(0,f.jsx)(ge,{children:"No country found."}),(0,f.jsx)(ye,{children:n.filter(s=>s.value).map(s=>(0,f.jsxs)(Ce,{className:"gap-2",onSelect:()=>l(s.value),children:[(0,f.jsx)(W,{country:s.value,countryName:s.label}),(0,f.jsx)("span",{className:"flex-1 text-sm",children:s.label}),s.value&&(0,f.jsx)("span",{className:"text-[#191919]/50 text-sm dark:text-white",children:`+${Le.getCountryCallingCode(s.value)}`}),(0,f.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:a("ml-auto",s.value===e?"opacity-100":"opacity-0"),children:(0,f.jsx)("path",{d:"M4 8.00008L6.66353 10.6636L12 5.33655",stroke:"#959595",strokeWidth:"1.06667",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${s.value}-${s.label}`))})]})})})})]})},W=({country:t,countryName:e,className:r})=>{let n=Ot.default[t];return t==="GLOBAL"?(0,f.jsx)("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:(0,f.jsx)(Bt,{className:"w-full h-[90%]"})}):(0,f.jsx)("span",{className:a("bg-white/20 flex h-4 w-6 overflow-hidden rounded-sm",r),children:n&&(0,f.jsx)(n,{title:e})})};W.displayName="FlagComponent";var x=require("react/jsx-runtime"),vr=Vt(),xr=({className:t,value:e,placeholder:r="",status:n,disabled:o})=>(0,x.jsx)(G,{asChild:!0,disabled:o,children:(0,x.jsxs)("button",{disabled:o,className:a(O({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,x.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,x.jsx)(W,{country:e,countryName:e,className:"ml-1 !w-6 h-5"}),(0,x.jsxs)("span",{className:"",children:[" ",vr[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"})})]})}),Gt=({hideSearch:t=!0,showAsterisk:e,label:r,description:n,error:o,...i})=>{let l=Xe?.map(s=>({value:s?.internetCountryCode,label:s?.countryName,...s}));return(0,x.jsxs)("div",{className:"relative space-y-1",children:[(0,x.jsx)(k,{showAsterisk:e,error:o,children:r}),(0,x.jsx)(ke,{options:l,hideSearch:t,optionComponent:s=>(0,x.jsxs)("div",{className:"w-full flex items-center gap-2",children:[(0,x.jsx)(W,{country:s?.internetCountryCode,countryName:s?.label,className:"ml-2 !w-6 !h-5"}),(0,x.jsx)("span",{className:"flex-1 text-sm",children:s?.label})]}),...i,children:(0,x.jsx)(xr,{value:i?.value?.value,status:i?.status,placeholder:i?.placeholder??" Select Country"})}),(0,x.jsx)(A,{className:"text-gray-400 text-sm !font-normal",children:n}),(0,x.jsx)(F,{error:o})]})};var X=require("react/jsx-runtime"),Wt=({showAsterisk:t,label:e,description:r,error:n,hideSearch:o=!0,status:i,...l})=>(0,X.jsxs)("div",{className:"relative space-y-1",children:[(0,X.jsx)(k,{showAsterisk:t,error:n,children:e}),(0,X.jsx)(ke,{hideSearch:o,...l,containerClassName:"h-full",children:(0,X.jsx)(Mt,{disabled:l?.disabled,placeholder:"Select or search email",status:i,value:l?.value?.label??l?.value?.value})}),(0,X.jsx)(A,{className:"text-gray-400 text-sm !font-normal",children:r}),(0,X.jsx)(F,{error:n})]});var Zt=v(require("react-otp-input"));var zt=require("class-variance-authority"),Kt=require("react"),je=require("react/jsx-runtime"),Nr=(0,zt.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"}}),_t=({numInputs:t=4,inputStyle:e,containerStyle:r,placeholder:n="-",status:o,...i})=>{let l=(0,Kt.useMemo)(()=>n||new Array(t).fill("").reduce((c,m)=>c+=m,""),[t,n]);return(0,je.jsx)(Zt.default,{numInputs:t,placeholder:l,containerStyle:a("w-full",r),inputStyle:a(Nr({status:o}),e),renderInput:s=>(0,je.jsx)("input",{...s}),...i})};var Ut=require("react"),Se=require("lucide-react"),Te=require("framer-motion");var Z=require("react/jsx-runtime"),Xt=({text:t,textToCopy:e,onCopy:r,iconsPosition:n="right",clampText:o=!0,textClassName:i})=>{let[l,s]=(0,Ut.useState)(!1),d=()=>{navigator.clipboard.writeText(e??t).then(()=>{s(!0),r?.(),setTimeout(()=>s(!1),2e3)})},c=l?Se.CheckIcon:Se.Copy;return(0,Z.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:[n==="left"&&(0,Z.jsx)($t,{Icon:c,onClick:d,copied:l}),(0,Z.jsx)("span",{className:a({"truncate max-w-[100px]":o},i),children:t}),n==="right"&&(0,Z.jsx)($t,{Icon:c,onClick:d,copied:l})]})},$t=({Icon:t,onClick:e,copied:r})=>(0,Z.jsx)(Te.AnimatePresence,{mode:"wait",children:(0,Z.jsx)(Te.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:e,children:(0,Z.jsx)(t,{className:`w-5 h-5 ${r?"text-green-500":"text-gray-500 hover:text-gray-700 transition"}`})},r?"check":"copy")});var xe=require("react");var Yt=require("lucide-react"),Je=require("react/jsx-runtime"),Ie=({value:t,onChange:e,debounce:r=500,addon:n,...o})=>{let[i,l]=(0,xe.useState)(t??""),s=d=>l(d.target.value);return(0,xe.useEffect)(()=>{t&&l(t)},[t]),(0,xe.useEffect)(()=>{let d=setTimeout(()=>{e(i)},r);return()=>clearTimeout(d)},[i,r,e]),(0,Je.jsx)(H,{leftNode:n??(0,Je.jsx)(Yt.Search,{className:" w-4 h-4 text-gray-400"}),sideNodeClassName:"bg-transparent !pr-0 !w-4 border-0 !min-w-[40px]",...o,className:a("!pl-0 py-1 border-[.5px] border-[#E9EBF8] rounded-xl text-sm w-full h-8 focus:outline-none focus:placeholder:hidden focus:!ring-2 !focus:ring-primary-main bg-[#F5F8FF] focus-within:!bg-transparent placeholder:text-xs",o?.className),onChange:s,value:i})};var Ee=require("react/jsx-runtime"),jt=({status:t,variant:e,className:r})=>(0,Ee.jsx)("div",{children:(0,Ee.jsx)("div",{className:a("order-first max-w-max flex-none rounded-full px-2 py-1 text-xs font-medium ring-1 ring-inset ring-current sm:order-none text-[14px] capitalize",{"bg-green-500/20 text-green-500":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,Ee.jsx)("p",{children:t.replace("-"," ")})})});var Y=require("lucide-react");var Ae=require("lucide-react");var Fe=require("react/jsx-runtime"),wr=({page:t,currentPage:e,onClick:r})=>typeof t=="string"?(0,Fe.jsx)("span",{className:"px-3 py-1 sm:px-4 sm:py-2 text-xs sm:text-sm font-semibold text-gray-500",children:t}):(0,Fe.jsx)("button",{onClick:r,className:`p-1 w-8 h-8 text-xs sm:text-sm rounded-full ${t===e?"bg-primary-main text-white":"text-[#717171] hover:bg-primary-main/10"}`,children:t}),Jt=({totalPages:t,currentPage:e,handlePageClick:r})=>{let o=()=>{let d=Math.floor(1.5),c=Math.max(1,e-d),m=Math.min(t,c+3-1);return m>t&&(c=Math.max(1,t-3+1),m=t),{start:c,end:m}},{start:i,end:l}=o(),s=[];return i>1&&s.push(1),i>2&&s.push("..."),s.push(...Array.from({length:l-i+1},(d,c)=>i+c)),l<t-1&&s.push("..."),l<t&&s.push(t),s.map((d,c)=>(0,Fe.jsx)(wr,{page:d,currentPage:e,onClick:typeof d=="number"?()=>r(d):void 0},c))};var B=require("react/jsx-runtime"),Qt=({currentPage:t=1,totalPages:e=1,onPageChange:r,itemsPerPage:n=0,totalItems:o=0})=>{let i=d=>{d>=1&&d<=e&&r?.(d)},l=n===0?1:n*(t-1)+1,s=t===e?o:Math.min(l+n-1,o);return(0,B.jsxs)("div",{className:"flex items-center justify-between border-t border-gray-200 px-4 py-3 sm:px-6 w-full flex-wrap gap-y-10 sm:gap-y-0",children:[o&&(0,B.jsx)("section",{className:"text-[#717171] text-[12px]",children:(0,B.jsxs)("p",{className:"",children:["Showing ",l," - ",s," of ",o]})}),(0,B.jsx)("div",{className:"flex items-center justify-center sm:justify-end ",children:(0,B.jsxs)("nav",{className:" inline-flex gap-x-1 sm:gap-x-[10px] items-center",children:[(0,B.jsx)("button",{onClick:()=>i(t-1),disabled:t===1,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:(0,B.jsx)(Ae.ChevronLeftIcon,{className:"size-5"})}),Jt({currentPage:t,totalPages:e,handlePageClick:i}),(0,B.jsx)("button",{onClick:()=>i(t+1),disabled:t===e,className:"text-xs text-[#222222] hover:bg-primary-main/10 disabled:text-[#D9D9D9] disabled:cursor-not-allowed sm:flex hidden",children:(0,B.jsx)(Ae.ChevronRightIcon,{className:"size-5"})})]})})]})};var Qe=require("@tanstack/react-table");var T=require("react/jsx-runtime"),qt=({table:t,isMobile:e,onRowClick:r,id:n})=>(0,T.jsx)("div",{className:a("relative w-full rounded-b border-0",{}),children:(0,T.jsxs)("table",{id:n??"table",className:"w-full overflow-x-scroll",children:[(0,T.jsx)("thead",{children:t.getHeaderGroups().map(o=>(0,T.jsx)("tr",{className:a(" rounded text-[#717171] border-b- bg-[#FCFCFC]",{}),children:o.headers.map(i=>(0,T.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,T.jsx)("div",{className:a("flex items-center",{"cursor-pointer select-none":i.column.getCanSort()}),onClick:i.column.getToggleSortingHandler(),children:i.isPlaceholder?null:(0,Qe.flexRender)(i.column.columnDef.header,i.getContext())})},i.id))},o.id))}),(0,T.jsx)("tbody",{className:" pl-2.5",children:t?.getFilteredRowModel().rows.map(o=>(0,T.jsx)("tr",{className:a("first-letter border-b border-zinc-100",{"hover:bg-gray-50":!e},{"hover:bg-gray-50 hover:cursor-pointer":r}),onClick:()=>r?r(o):{},children:o.getVisibleCells().map(i=>(0,T.jsx)("td",{className:a("",{}),children:(0,T.jsx)("div",{className:a("",{"w-max p-4 pl-2.5 text-black text-sm":!0}),children:(0,Qe.flexRender)(i.column.columnDef.cell,i.getContext())})},i.id))},o.id))})]})});var g=require("react/jsx-runtime"),er=({table:t,isMobile:e=!1,onRowClick:r,id:n,onRefetch:o,isRefetching:i,FilterMenu:l,ExtraNode:s,onExport:d,search:c={enabled:!1,debounceRate:700},download:m={enabled:!1,buttonId:"download_button",buttonText:"Export"},isLoading:u,pagination:p})=>{let h=()=>{try{o?.()}catch(I){console.error("Error while refetching data",I)}},D=I=>{c?.onSearch?.(I)};return(0,g.jsxs)("div",{className:a("relative w-full rounded-b border-0 overflow-x-auto"),children:[(o||c?.enabled||l||s||d)&&(0,g.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,g.jsx)("div",{className:"flex flex-1 flex-col sm:flex-row items-center gap-2 justify-start",children:(0,g.jsxs)("div",{className:" w-full flex gap-x-3",children:[c?.enabled&&(0,g.jsx)("section",{className:"sm:w-56",children:(0,g.jsx)(Ie,{type:"text",placeholder:"Enter search here...",className:"h-9",onChange:D,debounce:c?.debounceRate})}),(0,g.jsxs)("div",{className:" flex gap-2",children:[o&&(0,g.jsx)(j,{onClick:h,title:"Refetch Data",disabled:i,variant:"outlined",className:"!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px] ",size:"sm",children:(0,g.jsx)(Y.RotateCw,{className:a("w-4 h-4",{"animate-spin":i}),size:5})}),l&&(0,g.jsx)(be,{trigger:(0,g.jsx)("button",{title:"Filter",className:a("!border-[#DEDEDE] !text-gray-800 !px-[10px] !py-[8px]",ie({variant:"outlined",size:"sm"})),children:(0,g.jsx)(Y.ListFilter,{className:"w-4 h-4",size:5})}),children:l})]})]})}),(0,g.jsx)("div",{className:"flex items-start flex-col gap-2 justify-center",children:(0,g.jsx)("section",{className:"flex flex-col-reverse sm:flex-row gap-2",children:(0,g.jsxs)("div",{className:"flex gap-2",children:[s&&s,d&&(0,g.jsx)(j,{variant:"primary",onClick:d,size:"sm",children:"Export"}),m?.enabled&&(0,g.jsx)(j,{variant:"primary",leftNode:(0,g.jsx)(Y.Download,{className:a("w-4 h-4",{"animate-spin":i}),size:5}),onClick:m?.onDownload,id:m.buttonId,size:"sm",children:m?.buttonText})]})})})]}),(0,g.jsx)("main",{className:"w-full overflow-x-auto mt-5",children:u?(0,g.jsxs)("div",{className:"py-10 flex flex-col justify-center w-full items-center space-x-2",children:[(0,g.jsx)(Y.Loader,{size:20,className:"animate-spin"}),(0,g.jsx)("p",{className:"mt-3 text-center text-gray-600 text-sm opacity-70 animate-pulse",children:"Loading..."})]}):t.getRowModel().rows.length<1?(0,g.jsx)("div",{className:"py-10 flex flex-col justify-center w-full items-center",children:(0,g.jsx)("p",{className:"text-center text-gray-600 text-sm opacity-70",children:"No data available"})}):(0,g.jsx)("div",{className:"flex flex-col gap-2",children:(0,g.jsx)(qt,{table:t,isMobile:e,onRowClick:r,id:n})})}),!u&&p?.enabled&&t.getRowModel().rows.length>0&&(0,g.jsx)(Qt,{...p,currentPage:p?.currentPage??1,totalPages:p?.totalPages??Math.ceil((p?.totalItems??0)/Math.max(p?.itemsPerPage??1,1))??1,onPageChange:I=>p?.onPageChange?.(I)})]})};var qe=require("react"),tr=require("lucide-react"),N=require("react/jsx-runtime"),rr=t=>{let{environment:e,branch:r,version:n,deployTime:o,showBanner:i,onClose:l,initDefault:s,removeFromStorage:d,syncLocalStorageToState:c}=t,m=e||process.env.NEXT_PUBLIC_NODE_ENV;return m!=="staging"&&m!=="sandbox"||((0,qe.useEffect)(()=>{c()},[c]),(0,qe.useEffect)(()=>{let u;return(m==="staging"||m==="sandbox")&&(u=setInterval(()=>{d(),s()},5*60*1e3)),()=>{u&&clearInterval(u)}},[i,e,l,d,s,m]),!i)?null:(0,N.jsxs)("div",{className:"w-fit p-4 border shadow-md bg-white rounded-md z-[99999] absolute top-2 right-2 min-w-96",children:[(0,N.jsx)("button",{onClick:l,className:"absolute top-2 right-2",children:(0,N.jsx)(tr.X,{})}),(0,N.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Environment:"}),(0,N.jsx)("span",{className:"text-blue-600 capitalize",children:m})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Branch:"}),(0,N.jsx)("span",{className:"text-green-600 capitalize",children:r||process.env.NEXT_PUBLIC_DEPLOY_BRANCH})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Version:"}),(0,N.jsx)("span",{className:"text-purple-600",children:n||process.env.NEXT_PUBLIC_DEPLOY_VERSION})]}),(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)("span",{className:"font-medium",children:"Deploy Time:"}),(0,N.jsx)("span",{className:"text-orange-600",children:o||process.env.NEXT_PUBLIC_DEPLOY_TIME})]})]})]})};var Me=require("react"),y=require("react/jsx-runtime"),Pr=({type:t})=>t==="gray"?(0,y.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)("path",{d:"M10 0C4.49 0 0 4.49 0 10C0 15.51 4.49 20 10 20C15.51 20 20 15.51 20 10C20 4.49 15.51 0 10 0ZM14.78 7.7L9.11 13.37C8.97 13.51 8.78 13.59 8.58 13.59C8.38 13.59 8.19 13.51 8.05 13.37L5.22 10.54C4.93 10.25 4.93 9.77 5.22 9.48C5.51 9.19 5.99 9.19 6.28 9.48L8.58 11.78L13.72 6.64C14.01 6.35 14.49 6.35 14.78 6.64C15.07 6.93 15.07 7.4 14.78 7.7Z",fill:"#79818C"})}):t==="info"?(0,y.jsx)("svg",{stroke:"#70B6F6",fill:"#70B6F6","stroke-width":"0",viewBox:"0 0 16 16",height:"24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})}):t==="warning"?(0,y.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#FFC700"})}):t==="success"?(0,y.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)("path",{d:"M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z",fill:"#00D488"})}):(0,y.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,y.jsx)("path",{d:"M9.99984 1.66663C5.40817 1.66663 1.6665 5.40829 1.6665 9.99996C1.6665 14.5916 5.40817 18.3333 9.99984 18.3333C14.5915 18.3333 18.3332 14.5916 18.3332 9.99996C18.3332 5.40829 14.5915 1.66663 9.99984 1.66663ZM9.37484 6.66663C9.37484 6.32496 9.65817 6.04163 9.99984 6.04163C10.3415 6.04163 10.6248 6.32496 10.6248 6.66663V10.8333C10.6248 11.175 10.3415 11.4583 9.99984 11.4583C9.65817 11.4583 9.37484 11.175 9.37484 10.8333V6.66663ZM10.7665 13.65C10.7248 13.7583 10.6665 13.8416 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1416 10.1082 14.1666 9.99984 14.1666C9.8915 14.1666 9.78317 14.1416 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8416 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4416 9.1665 13.3333C9.1665 13.225 9.1915 13.1166 9.23317 13.0166C9.27484 12.9166 9.33317 12.825 9.40817 12.7416C9.4915 12.6666 9.58317 12.6083 9.68317 12.5666C9.88317 12.4833 10.1165 12.4833 10.3165 12.5666C10.4165 12.6083 10.5082 12.6666 10.5915 12.7416C10.6665 12.825 10.7248 12.9166 10.7665 13.0166C10.8082 13.1166 10.8332 13.225 10.8332 13.3333C10.8332 13.4416 10.8082 13.55 10.7665 13.65Z",fill:"#F04248"})}),or=({type:t="info",title:e,description:r,open:n,showCloseButton:o,bottomNode:i,sideNode:l,onClose:s,showIcon:d=!0})=>{let[c,m]=(0,Me.useState)(n);(0,Me.useEffect)(()=>{m(n)},[n]);let u="",p="";switch(t){case"gray":u="#eeeef0",p="#79818c";break;case"info":u="#ebf5fd",p="#70B6F6";break;case"warning":u="#fff8df",p="#ffc700";break;case"success":u="#e0f9f0",p="#49e0aa";break;case"danger":u="#fde8e9",p="#f3777c";break;default:u="#eeeef0",p="#79818c";break}function h(){m(!1),s&&s()}return c?(0,y.jsxs)("div",{className:"w-full shadow-lg transform flex items-center rounded-md",style:{background:u||"#ebf5fd"},children:[(0,y.jsx)("div",{className:"flex-none absolute rounded-l-[2px] rounded-l-4px h-[4px] w-full top-0",style:{background:p||"#70B6F6"}}),(0,y.jsxs)("div",{className:"w-full gap-3 h-full flex flex-row justify-between px-4 md:px-4 py-3 md:py-4",children:[(0,y.jsxs)("div",{className:"flex flex-row gap-2.5 items-start w-full h-full",children:[d&&(0,y.jsx)("div",{className:"h-full flex justify-end",children:(0,y.jsx)(Pr,{type:t})}),(0,y.jsxs)("div",{className:"w-full gap-3 h-full flex flex-col md:flex-row items-start justify-between",children:[(0,y.jsxs)("div",{className:"flex-1 gap-3 h-full flex flex-col items-start justify-between",children:[(e||r)&&(0,y.jsxs)("div",{children:[e&&(0,y.jsx)("div",{className:"text-sm font-bold text-[#191919]",children:e}),r&&(0,y.jsx)("div",{className:"text-sm font-normal text-[#5D5D5D] mt-1",children:r})]}),i]}),l]})]}),o&&(0,y.jsx)("div",{className:"w-1/10 h-full flex flex-col justify-start items-center",children:(0,y.jsx)("button",{onClick:h,children:(0,y.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,y.jsx)("path",{d:"M3.3335 3.33337L12.6662 12.6661",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,y.jsx)("path",{d:"M3.33429 12.6661L12.667 3.33337",stroke:"#191919",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]})]}):null};var et={USD:"$",CAD:"CA$",EUR:"\u20AC",AED:"AED",AFN:"Af",ALL:"ALL",AMD:"AMD",ARS:"AR$",AUD:"AU$",AZN:"man.",BAM:"KM",BDT:"Tk",BGN:"BGN",BHD:"BD",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"BWP",BYN:"Br",BZD:"BZ$",CDF:"CDF",CHF:"CHF",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"Dkr",DOP:"RD$",DZD:"DA",EEK:"Ekr",EGP:"EGP",ERN:"Nfk",ETB:"Br",GBP:"\xA3",GEL:"GEL",GHS:"GH\u20B5",GNF:"FG",GTQ:"GTQ",HKD:"HK$",HNL:"HNL",HRK:"kn",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",INR:"\u20B9",IQD:"IQD",IRR:"IRR",ISK:"Ikr",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"Ksh",KHR:"KHR",KMF:"CF",KRW:"\u20A9",KWD:"KD",KZT:"KZT",LBP:"L.L.",LKR:"SLRs",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"MDL",MGA:"MGA",MKD:"MKD",MMK:"MMK",MOP:"MOP$",MUR:"MURs",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"Nkr",NPR:"NPRs",NZD:"NZ$",OMR:"OMR",PAB:"B/.",PEN:"S/.",PHP:"\u20B1",PKR:"PKRs",PLN:"z\u0142",PYG:"\u20B2",QAR:"QR",RON:"RON",RSD:"din.",RUB:"RUB",RWF:"RWF",SAR:"SR",SDG:"SDG",SEK:"Skr",SGD:"S$",SOS:"Ssh",SYP:"SY\xA3",THB:"\u0E3F",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",UYU:"$U",UZS:"UZS",VEF:"Bs.F.",VND:"\u20AB",XAF:"F CFA",XOF:"CFA",YER:"YR",ZAR:"R",ZMK:"ZK",ZWL:"ZWL$"},Ne=class Ne{static getCurrencyLocaleMap(e){return{XOF:"fr",XAF:"fr"}[e]||"en"}static koboToNaira(e){return+e/100}static nairaToKobo(e){return+e*100}static getCurrencySymbol(e){return et[e]||e}};at(Ne,"formatAmountAndCurrency",(e,r,n)=>{let o=new Intl.NumberFormat(n?.locale||Ne.getCurrencyLocaleMap(e),{maximumFractionDigits:3,style:"currency",currency:e,currencyDisplay:"symbol"}).format(n?.convertToMajorCurrency?Ne.koboToNaira(Number(r)):Number(r)).replace(/^(\D+)/,"$1 ").replace("\u202F"," ").replace(/\s+/,""),i=et[e]||e;return o.replace(e,i)});var tt=Ne;var Ve=v(require("dayjs")),rt=class{static getDateLibrary(){return(0,Ve.default)()}static formatTimestampToDate(e,r){return Ve.default.unix(e).format(r||"ddd, MMM, YYYY | HH:mm:ss")}static formatDateToTimestamp(e){return(0,Ve.default)(e).unix()}};0&&(module.exports={AmountAction,Banner,Button,CopyableLabel,Country,CurrencySymbolMap,DateAction,DebouncedInput,DevBanner,Dialog,FlagComponent,FormLabel,Input,Loader,OTPInput,PasswordInput,PhoneInput,Popover,PopoverContent,PopoverRoot,PopoverTrigger,Select,Status,Table,Textarea,buttonVariants,cn});
2
+ //# sourceMappingURL=index.js.map