@algorithm-shift/design-system 1.2.5 → 1.2.6
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.d.mts +44 -15
- package/dist/index.d.ts +44 -15
- package/dist/index.js +557 -206
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +547 -203
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,18 +32,25 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
Button: () => Button,
|
|
34
34
|
CheckboxInput: () => CheckboxInput,
|
|
35
|
-
|
|
35
|
+
DatePicker: () => DatePicker,
|
|
36
|
+
DateRange: () => DateRange_default,
|
|
36
37
|
Dropdown: () => Dropdown,
|
|
37
38
|
EmailInput: () => EmailInput,
|
|
39
|
+
FileInput: () => FileInput,
|
|
38
40
|
FlexLayout: () => Flex_default,
|
|
39
41
|
GridLayout: () => Grid_default,
|
|
42
|
+
Image: () => Image_default,
|
|
40
43
|
Logo: () => Logo_default,
|
|
41
44
|
MultiCheckbox: () => MultiCheckbox,
|
|
42
45
|
Notification: () => Notification_default,
|
|
46
|
+
NumberInput: () => NumberInput,
|
|
43
47
|
PasswordInput: () => PasswordInput,
|
|
44
48
|
PhoneInput: () => PhoneInput,
|
|
45
49
|
Profile: () => Profile_default,
|
|
46
50
|
RadioInput: () => RadioInput,
|
|
51
|
+
RichText: () => RichText,
|
|
52
|
+
SearchInput: () => SearchInput,
|
|
53
|
+
Shape: () => Shape_default,
|
|
47
54
|
Spacer: () => Spacer_default,
|
|
48
55
|
Stages: () => Stages_default,
|
|
49
56
|
SwitchToggle: () => SwitchToggle,
|
|
@@ -164,14 +171,59 @@ var Typography_default = Typography;
|
|
|
164
171
|
|
|
165
172
|
// src/components/Basic/Shape/Shape.tsx
|
|
166
173
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
174
|
+
var Shape = ({
|
|
175
|
+
children,
|
|
176
|
+
className,
|
|
177
|
+
style
|
|
178
|
+
}) => {
|
|
179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className, style, children });
|
|
180
|
+
};
|
|
181
|
+
var Shape_default = Shape;
|
|
182
|
+
|
|
183
|
+
// src/components/Basic/Image/Image.tsx
|
|
184
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
185
|
+
var ImageControl = ({
|
|
186
|
+
className,
|
|
187
|
+
style,
|
|
188
|
+
imageUrl,
|
|
189
|
+
altText = "Preview"
|
|
190
|
+
}) => {
|
|
191
|
+
const imageClass = cn(
|
|
192
|
+
"relative group",
|
|
193
|
+
"h-[200px] w-[200px] border-1",
|
|
194
|
+
"border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition",
|
|
195
|
+
className
|
|
196
|
+
);
|
|
197
|
+
const defaultImgClass = cn(
|
|
198
|
+
"w-full h-full",
|
|
199
|
+
className
|
|
200
|
+
);
|
|
201
|
+
let src;
|
|
202
|
+
let extraProps;
|
|
203
|
+
if (imageUrl) {
|
|
204
|
+
src = imageUrl;
|
|
205
|
+
extraProps = {
|
|
206
|
+
className: defaultImgClass
|
|
207
|
+
};
|
|
208
|
+
} else {
|
|
209
|
+
src = "./image-placeholder.png";
|
|
210
|
+
extraProps = {
|
|
211
|
+
width: 50,
|
|
212
|
+
height: 50,
|
|
213
|
+
className: "opacity-50"
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: imageClass, style, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src, alt: altText, ...extraProps }) });
|
|
217
|
+
};
|
|
218
|
+
var Image_default = ImageControl;
|
|
167
219
|
|
|
168
220
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
169
221
|
var React2 = __toESM(require("react"));
|
|
170
222
|
|
|
171
223
|
// src/components/ui/input.tsx
|
|
172
|
-
var
|
|
224
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
173
225
|
function Input({ className, type, ...props }) {
|
|
174
|
-
return /* @__PURE__ */ (0,
|
|
226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
175
227
|
"input",
|
|
176
228
|
{
|
|
177
229
|
type,
|
|
@@ -188,7 +240,7 @@ function Input({ className, type, ...props }) {
|
|
|
188
240
|
}
|
|
189
241
|
|
|
190
242
|
// src/components/Inputs/TextInput/TextInput.tsx
|
|
191
|
-
var
|
|
243
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
192
244
|
var TextInput = ({ className, style, ...props }) => {
|
|
193
245
|
const placeholder = props.placeholder || "Placeholder text";
|
|
194
246
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -213,8 +265,8 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
213
265
|
setError(null);
|
|
214
266
|
}
|
|
215
267
|
};
|
|
216
|
-
return /* @__PURE__ */ (0,
|
|
217
|
-
/* @__PURE__ */ (0,
|
|
268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
269
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
218
270
|
Input,
|
|
219
271
|
{
|
|
220
272
|
type: "text",
|
|
@@ -231,11 +283,11 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
231
283
|
pattern: regexPattern || void 0
|
|
232
284
|
}
|
|
233
285
|
),
|
|
234
|
-
error && /* @__PURE__ */ (0,
|
|
286
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
235
287
|
] });
|
|
236
288
|
};
|
|
237
289
|
|
|
238
|
-
// src/components/Inputs/
|
|
290
|
+
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
239
291
|
var React3 = __toESM(require("react"));
|
|
240
292
|
|
|
241
293
|
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
@@ -327,39 +379,63 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
|
327
379
|
return Component;
|
|
328
380
|
};
|
|
329
381
|
|
|
382
|
+
// node_modules/lucide-react/dist/esm/icons/calculator.js
|
|
383
|
+
var __iconNode = [
|
|
384
|
+
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", key: "1nb95v" }],
|
|
385
|
+
["line", { x1: "8", x2: "16", y1: "6", y2: "6", key: "x4nwl0" }],
|
|
386
|
+
["line", { x1: "16", x2: "16", y1: "14", y2: "18", key: "wjye3r" }],
|
|
387
|
+
["path", { d: "M16 10h.01", key: "1m94wz" }],
|
|
388
|
+
["path", { d: "M12 10h.01", key: "1nrarc" }],
|
|
389
|
+
["path", { d: "M8 10h.01", key: "19clt8" }],
|
|
390
|
+
["path", { d: "M12 14h.01", key: "1etili" }],
|
|
391
|
+
["path", { d: "M8 14h.01", key: "6423bh" }],
|
|
392
|
+
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
393
|
+
["path", { d: "M8 18h.01", key: "lrp35t" }]
|
|
394
|
+
];
|
|
395
|
+
var Calculator = createLucideIcon("calculator", __iconNode);
|
|
396
|
+
|
|
397
|
+
// node_modules/lucide-react/dist/esm/icons/calendar.js
|
|
398
|
+
var __iconNode2 = [
|
|
399
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
400
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
401
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
402
|
+
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
403
|
+
];
|
|
404
|
+
var Calendar = createLucideIcon("calendar", __iconNode2);
|
|
405
|
+
|
|
330
406
|
// node_modules/lucide-react/dist/esm/icons/check.js
|
|
331
|
-
var
|
|
332
|
-
var Check = createLucideIcon("check",
|
|
407
|
+
var __iconNode3 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
408
|
+
var Check = createLucideIcon("check", __iconNode3);
|
|
333
409
|
|
|
334
410
|
// node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
335
|
-
var
|
|
336
|
-
var ChevronDown = createLucideIcon("chevron-down",
|
|
411
|
+
var __iconNode4 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
412
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode4);
|
|
337
413
|
|
|
338
414
|
// node_modules/lucide-react/dist/esm/icons/chevron-left.js
|
|
339
|
-
var
|
|
340
|
-
var ChevronLeft = createLucideIcon("chevron-left",
|
|
415
|
+
var __iconNode5 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
416
|
+
var ChevronLeft = createLucideIcon("chevron-left", __iconNode5);
|
|
341
417
|
|
|
342
418
|
// node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
343
|
-
var
|
|
344
|
-
var ChevronRight = createLucideIcon("chevron-right",
|
|
419
|
+
var __iconNode6 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
420
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode6);
|
|
345
421
|
|
|
346
422
|
// node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
347
|
-
var
|
|
348
|
-
var ChevronUp = createLucideIcon("chevron-up",
|
|
423
|
+
var __iconNode7 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
424
|
+
var ChevronUp = createLucideIcon("chevron-up", __iconNode7);
|
|
349
425
|
|
|
350
426
|
// node_modules/lucide-react/dist/esm/icons/circle.js
|
|
351
|
-
var
|
|
352
|
-
var Circle = createLucideIcon("circle",
|
|
427
|
+
var __iconNode8 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
428
|
+
var Circle = createLucideIcon("circle", __iconNode8);
|
|
353
429
|
|
|
354
430
|
// node_modules/lucide-react/dist/esm/icons/mail.js
|
|
355
|
-
var
|
|
431
|
+
var __iconNode9 = [
|
|
356
432
|
["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
|
|
357
433
|
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
|
|
358
434
|
];
|
|
359
|
-
var Mail = createLucideIcon("mail",
|
|
435
|
+
var Mail = createLucideIcon("mail", __iconNode9);
|
|
360
436
|
|
|
361
437
|
// node_modules/lucide-react/dist/esm/icons/scan-eye.js
|
|
362
|
-
var
|
|
438
|
+
var __iconNode10 = [
|
|
363
439
|
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
|
|
364
440
|
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
|
|
365
441
|
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
|
|
@@ -373,11 +449,18 @@ var __iconNode8 = [
|
|
|
373
449
|
}
|
|
374
450
|
]
|
|
375
451
|
];
|
|
376
|
-
var ScanEye = createLucideIcon("scan-eye",
|
|
452
|
+
var ScanEye = createLucideIcon("scan-eye", __iconNode10);
|
|
377
453
|
|
|
378
|
-
//
|
|
379
|
-
var
|
|
380
|
-
|
|
454
|
+
// node_modules/lucide-react/dist/esm/icons/search.js
|
|
455
|
+
var __iconNode11 = [
|
|
456
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
457
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
458
|
+
];
|
|
459
|
+
var Search = createLucideIcon("search", __iconNode11);
|
|
460
|
+
|
|
461
|
+
// src/components/Inputs/NumberInput/NumberInput.tsx
|
|
462
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
463
|
+
var NumberInput = ({ className, style, ...props }) => {
|
|
381
464
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
382
465
|
const regexPattern = props.regexPattern ?? "";
|
|
383
466
|
const errorMessage = props.errorMessage ?? "Required";
|
|
@@ -401,13 +484,14 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
401
484
|
setError(null);
|
|
402
485
|
}
|
|
403
486
|
};
|
|
404
|
-
return /* @__PURE__ */ (0,
|
|
405
|
-
/* @__PURE__ */ (0,
|
|
406
|
-
/* @__PURE__ */ (0,
|
|
407
|
-
/* @__PURE__ */ (0,
|
|
487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
488
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
489
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Calculator, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
408
491
|
Input,
|
|
409
492
|
{
|
|
410
|
-
type: "
|
|
493
|
+
type: "number",
|
|
494
|
+
id: "number-field",
|
|
411
495
|
value,
|
|
412
496
|
className,
|
|
413
497
|
style,
|
|
@@ -422,14 +506,14 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
422
506
|
}
|
|
423
507
|
)
|
|
424
508
|
] }),
|
|
425
|
-
error && /* @__PURE__ */ (0,
|
|
509
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
426
510
|
] });
|
|
427
511
|
};
|
|
428
512
|
|
|
429
|
-
// src/components/Inputs/
|
|
513
|
+
// src/components/Inputs/EmailInput/EmailInput.tsx
|
|
430
514
|
var React4 = __toESM(require("react"));
|
|
431
|
-
var
|
|
432
|
-
var
|
|
515
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
516
|
+
var EmailInput = ({ className, style, ...props }) => {
|
|
433
517
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
434
518
|
const regexPattern = props.regexPattern ?? "";
|
|
435
519
|
const errorMessage = props.errorMessage ?? "Required";
|
|
@@ -453,10 +537,62 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
453
537
|
setError(null);
|
|
454
538
|
}
|
|
455
539
|
};
|
|
456
|
-
return /* @__PURE__ */ (0,
|
|
457
|
-
/* @__PURE__ */ (0,
|
|
458
|
-
/* @__PURE__ */ (0,
|
|
459
|
-
/* @__PURE__ */ (0,
|
|
540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
541
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
542
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Mail, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
543
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
544
|
+
Input,
|
|
545
|
+
{
|
|
546
|
+
type: "email",
|
|
547
|
+
value,
|
|
548
|
+
className,
|
|
549
|
+
style,
|
|
550
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
551
|
+
placeholder,
|
|
552
|
+
onChange: handleChange,
|
|
553
|
+
disabled: isDisabled || !isEditable,
|
|
554
|
+
readOnly: isReadonly,
|
|
555
|
+
required: isRequired,
|
|
556
|
+
maxLength: noOfCharacters,
|
|
557
|
+
pattern: regexPattern || void 0
|
|
558
|
+
}
|
|
559
|
+
)
|
|
560
|
+
] }),
|
|
561
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
562
|
+
] });
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
// src/components/Inputs/PasswordInput/PasswordInput.tsx
|
|
566
|
+
var React5 = __toESM(require("react"));
|
|
567
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
568
|
+
var PasswordInput = ({ className, style, ...props }) => {
|
|
569
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
570
|
+
const regexPattern = props.regexPattern ?? "";
|
|
571
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
572
|
+
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
573
|
+
const isRequired = props.isRequired ?? false;
|
|
574
|
+
const isEditable = props.isEditable ?? true;
|
|
575
|
+
const isDisabled = props.isDisabled ?? false;
|
|
576
|
+
const isReadonly = props.isReadonly ?? false;
|
|
577
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
578
|
+
const [value, setValue] = React5.useState("");
|
|
579
|
+
const [error, setError] = React5.useState(null);
|
|
580
|
+
const handleChange = (e) => {
|
|
581
|
+
const val = e.target.value;
|
|
582
|
+
if (val.length > noOfCharacters) return;
|
|
583
|
+
setValue(val);
|
|
584
|
+
if (isRequired && val.trim() === "") {
|
|
585
|
+
setError(errorMessage);
|
|
586
|
+
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
587
|
+
setError(errorMessage);
|
|
588
|
+
} else {
|
|
589
|
+
setError(null);
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
593
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
594
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ScanEye, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
595
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
460
596
|
Input,
|
|
461
597
|
{
|
|
462
598
|
type: "password",
|
|
@@ -475,17 +611,17 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
475
611
|
}
|
|
476
612
|
)
|
|
477
613
|
] }),
|
|
478
|
-
error && /* @__PURE__ */ (0,
|
|
614
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
479
615
|
] });
|
|
480
616
|
};
|
|
481
617
|
|
|
482
618
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
483
|
-
var
|
|
619
|
+
var React6 = __toESM(require("react"));
|
|
484
620
|
|
|
485
621
|
// src/components/ui/textarea.tsx
|
|
486
|
-
var
|
|
622
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
487
623
|
function Textarea({ className, ...props }) {
|
|
488
|
-
return /* @__PURE__ */ (0,
|
|
624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
489
625
|
"textarea",
|
|
490
626
|
{
|
|
491
627
|
"data-slot": "textarea",
|
|
@@ -499,7 +635,7 @@ function Textarea({ className, ...props }) {
|
|
|
499
635
|
}
|
|
500
636
|
|
|
501
637
|
// src/components/Inputs/Textarea/Textarea.tsx
|
|
502
|
-
var
|
|
638
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
503
639
|
var Textarea2 = ({ className, style, ...props }) => {
|
|
504
640
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
505
641
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -510,8 +646,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
510
646
|
const isDisabled = props.isDisabled ?? false;
|
|
511
647
|
const isReadonly = props.isReadonly ?? false;
|
|
512
648
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
513
|
-
const [value, setValue] =
|
|
514
|
-
const [error, setError] =
|
|
649
|
+
const [value, setValue] = React6.useState("");
|
|
650
|
+
const [error, setError] = React6.useState(null);
|
|
515
651
|
const handleChange = (e) => {
|
|
516
652
|
const val = e.target.value;
|
|
517
653
|
if (val.length > noOfCharacters) return;
|
|
@@ -524,8 +660,8 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
524
660
|
setError(null);
|
|
525
661
|
}
|
|
526
662
|
};
|
|
527
|
-
return /* @__PURE__ */ (0,
|
|
528
|
-
/* @__PURE__ */ (0,
|
|
663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
664
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
529
665
|
Textarea,
|
|
530
666
|
{
|
|
531
667
|
id: "textarea-field",
|
|
@@ -541,13 +677,13 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
541
677
|
maxLength: noOfCharacters
|
|
542
678
|
}
|
|
543
679
|
),
|
|
544
|
-
error && /* @__PURE__ */ (0,
|
|
680
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
545
681
|
] });
|
|
546
682
|
};
|
|
547
683
|
|
|
548
684
|
// src/components/Inputs/UrlInput/UrlInput.tsx
|
|
549
|
-
var
|
|
550
|
-
var
|
|
685
|
+
var React7 = __toESM(require("react"));
|
|
686
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
551
687
|
var UrlInput = ({ className, style, ...props }) => {
|
|
552
688
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
553
689
|
const regexPattern = props.regexPattern ?? "";
|
|
@@ -558,8 +694,8 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
558
694
|
const isDisabled = props.isDisabled ?? false;
|
|
559
695
|
const isReadonly = props.isReadonly ?? false;
|
|
560
696
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
561
|
-
const [value, setValue] =
|
|
562
|
-
const [error, setError] =
|
|
697
|
+
const [value, setValue] = React7.useState("");
|
|
698
|
+
const [error, setError] = React7.useState(null);
|
|
563
699
|
const handleChange = (e) => {
|
|
564
700
|
const val = e.target.value;
|
|
565
701
|
if (val.length > noOfCharacters) return;
|
|
@@ -572,10 +708,10 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
572
708
|
setError(null);
|
|
573
709
|
}
|
|
574
710
|
};
|
|
575
|
-
return /* @__PURE__ */ (0,
|
|
576
|
-
/* @__PURE__ */ (0,
|
|
577
|
-
/* @__PURE__ */ (0,
|
|
578
|
-
/* @__PURE__ */ (0,
|
|
711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
712
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
713
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[12px]", children: "https://" }),
|
|
714
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
579
715
|
Input,
|
|
580
716
|
{
|
|
581
717
|
type: "url",
|
|
@@ -594,18 +730,18 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
594
730
|
}
|
|
595
731
|
)
|
|
596
732
|
] }),
|
|
597
|
-
error && /* @__PURE__ */ (0,
|
|
733
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
598
734
|
] });
|
|
599
735
|
};
|
|
600
736
|
|
|
601
737
|
// src/components/ui/checkbox.tsx
|
|
602
738
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
603
|
-
var
|
|
739
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
604
740
|
function Checkbox({
|
|
605
741
|
className,
|
|
606
742
|
...props
|
|
607
743
|
}) {
|
|
608
|
-
return /* @__PURE__ */ (0,
|
|
744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
609
745
|
CheckboxPrimitive.Root,
|
|
610
746
|
{
|
|
611
747
|
"data-slot": "checkbox",
|
|
@@ -614,12 +750,12 @@ function Checkbox({
|
|
|
614
750
|
className
|
|
615
751
|
),
|
|
616
752
|
...props,
|
|
617
|
-
children: /* @__PURE__ */ (0,
|
|
753
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
618
754
|
CheckboxPrimitive.Indicator,
|
|
619
755
|
{
|
|
620
756
|
"data-slot": "checkbox-indicator",
|
|
621
757
|
className: "flex items-center justify-center text-current transition-none",
|
|
622
|
-
children: /* @__PURE__ */ (0,
|
|
758
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Check, { className: "size-3.5" })
|
|
623
759
|
}
|
|
624
760
|
)
|
|
625
761
|
}
|
|
@@ -628,12 +764,12 @@ function Checkbox({
|
|
|
628
764
|
|
|
629
765
|
// src/components/ui/label.tsx
|
|
630
766
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
631
|
-
var
|
|
767
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
632
768
|
function Label({
|
|
633
769
|
className,
|
|
634
770
|
...props
|
|
635
771
|
}) {
|
|
636
|
-
return /* @__PURE__ */ (0,
|
|
772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
637
773
|
LabelPrimitive.Root,
|
|
638
774
|
{
|
|
639
775
|
"data-slot": "label",
|
|
@@ -647,23 +783,23 @@ function Label({
|
|
|
647
783
|
}
|
|
648
784
|
|
|
649
785
|
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
650
|
-
var
|
|
786
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
651
787
|
var CheckboxInput = ({ className, style, ...props }) => {
|
|
652
788
|
const text = props.text ? props.text : "Subscribe";
|
|
653
|
-
return /* @__PURE__ */ (0,
|
|
654
|
-
/* @__PURE__ */ (0,
|
|
655
|
-
/* @__PURE__ */ (0,
|
|
789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
790
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Checkbox, { id: "newsletter" }),
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Label, { htmlFor: "newsletter", children: text })
|
|
656
792
|
] }) });
|
|
657
793
|
};
|
|
658
794
|
|
|
659
795
|
// src/components/ui/radio-group.tsx
|
|
660
796
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
661
|
-
var
|
|
797
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
662
798
|
function RadioGroup({
|
|
663
799
|
className,
|
|
664
800
|
...props
|
|
665
801
|
}) {
|
|
666
|
-
return /* @__PURE__ */ (0,
|
|
802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
667
803
|
RadioGroupPrimitive.Root,
|
|
668
804
|
{
|
|
669
805
|
"data-slot": "radio-group",
|
|
@@ -676,7 +812,7 @@ function RadioGroupItem({
|
|
|
676
812
|
className,
|
|
677
813
|
...props
|
|
678
814
|
}) {
|
|
679
|
-
return /* @__PURE__ */ (0,
|
|
815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
680
816
|
RadioGroupPrimitive.Item,
|
|
681
817
|
{
|
|
682
818
|
"data-slot": "radio-group-item",
|
|
@@ -685,12 +821,12 @@ function RadioGroupItem({
|
|
|
685
821
|
className
|
|
686
822
|
),
|
|
687
823
|
...props,
|
|
688
|
-
children: /* @__PURE__ */ (0,
|
|
824
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
689
825
|
RadioGroupPrimitive.Indicator,
|
|
690
826
|
{
|
|
691
827
|
"data-slot": "radio-group-indicator",
|
|
692
828
|
className: "relative flex items-center justify-center",
|
|
693
|
-
children: /* @__PURE__ */ (0,
|
|
829
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
694
830
|
}
|
|
695
831
|
)
|
|
696
832
|
}
|
|
@@ -698,48 +834,117 @@ function RadioGroupItem({
|
|
|
698
834
|
}
|
|
699
835
|
|
|
700
836
|
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
701
|
-
var
|
|
837
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
702
838
|
var RadioInput = ({ className, style, ...props }) => {
|
|
703
839
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
704
|
-
return /* @__PURE__ */ (0,
|
|
705
|
-
/* @__PURE__ */ (0,
|
|
706
|
-
/* @__PURE__ */ (0,
|
|
840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadioGroup, { defaultValue: "option-1", children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
841
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadioGroupItem, { value: item, id: `r${index}` }),
|
|
842
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label, { htmlFor: `r${index}`, children: item })
|
|
707
843
|
] }, index)) }) });
|
|
708
844
|
};
|
|
709
845
|
|
|
710
846
|
// src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
|
|
711
|
-
var
|
|
847
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
712
848
|
var MultiCheckbox = ({ className, style, ...props }) => {
|
|
713
849
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
715
|
-
/* @__PURE__ */ (0,
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex gap-3 flex-col", children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Checkbox, { id: `newsletter-${index}` }),
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Label, { htmlFor: `newsletter-${index}`, children: item })
|
|
717
853
|
] }, index)) }) });
|
|
718
854
|
};
|
|
719
855
|
|
|
720
856
|
// src/components/Global/TinyMceEditor.tsx
|
|
721
857
|
var import_react4 = require("react");
|
|
722
858
|
var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
723
|
-
var
|
|
859
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
860
|
+
function MyEditor({
|
|
861
|
+
value,
|
|
862
|
+
onChange,
|
|
863
|
+
isDefault
|
|
864
|
+
}) {
|
|
865
|
+
const editorRef = (0, import_react4.useRef)(null);
|
|
866
|
+
function stripOuterP(html) {
|
|
867
|
+
const trimmedHtml = html.trim();
|
|
868
|
+
if (!trimmedHtml) return "";
|
|
869
|
+
const div = document.createElement("div");
|
|
870
|
+
div.innerHTML = trimmedHtml;
|
|
871
|
+
const firstChild = div.firstElementChild;
|
|
872
|
+
if (div.childElementCount === 1 && firstChild?.tagName === "P") {
|
|
873
|
+
return firstChild.innerHTML;
|
|
874
|
+
}
|
|
875
|
+
return trimmedHtml;
|
|
876
|
+
}
|
|
877
|
+
const isDefaultToolbar = (0, import_react4.useMemo)(() => {
|
|
878
|
+
let toolbar = "undo redo | formatselect | bold italic forecolor";
|
|
879
|
+
if (isDefault) {
|
|
880
|
+
toolbar = "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help";
|
|
881
|
+
}
|
|
882
|
+
return toolbar;
|
|
883
|
+
}, [isDefault]);
|
|
884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
885
|
+
import_tinymce_react.Editor,
|
|
886
|
+
{
|
|
887
|
+
apiKey: process.env.NEXT_PUBLIC_TINYMCE_API_KEY,
|
|
888
|
+
tinymceScriptSrc: process.env.NEXT_PUBLIC_TINYMCE_SCRIPT_SRC,
|
|
889
|
+
onInit: (_evt, editor) => editorRef.current = editor,
|
|
890
|
+
value,
|
|
891
|
+
licenseKey: "gpl",
|
|
892
|
+
init: {
|
|
893
|
+
height: 300,
|
|
894
|
+
menubar: false,
|
|
895
|
+
forced_root_block: false,
|
|
896
|
+
plugins: [
|
|
897
|
+
"advlist",
|
|
898
|
+
"autolink",
|
|
899
|
+
"lists",
|
|
900
|
+
"link",
|
|
901
|
+
"image",
|
|
902
|
+
"charmap",
|
|
903
|
+
"preview",
|
|
904
|
+
"anchor",
|
|
905
|
+
"searchreplace",
|
|
906
|
+
"visualblocks",
|
|
907
|
+
"code",
|
|
908
|
+
"fullscreen",
|
|
909
|
+
"insertdatetime",
|
|
910
|
+
"media",
|
|
911
|
+
"table",
|
|
912
|
+
"help",
|
|
913
|
+
"wordcount"
|
|
914
|
+
],
|
|
915
|
+
toolbar: isDefaultToolbar,
|
|
916
|
+
content_style: `
|
|
917
|
+
body {
|
|
918
|
+
outline: none;
|
|
919
|
+
}
|
|
920
|
+
`
|
|
921
|
+
},
|
|
922
|
+
onEditorChange: (content) => onChange?.(stripOuterP(content))
|
|
923
|
+
}
|
|
924
|
+
);
|
|
925
|
+
}
|
|
724
926
|
|
|
725
927
|
// src/components/Inputs/RichText/RichText.tsx
|
|
726
|
-
var
|
|
928
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
929
|
+
function RichText({ className, style }) {
|
|
930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MyEditor, { isDefault: true }) });
|
|
931
|
+
}
|
|
727
932
|
|
|
728
933
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
729
|
-
var
|
|
934
|
+
var React8 = __toESM(require("react"));
|
|
730
935
|
|
|
731
936
|
// src/components/ui/select.tsx
|
|
732
937
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
733
|
-
var
|
|
938
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
734
939
|
function Select({
|
|
735
940
|
...props
|
|
736
941
|
}) {
|
|
737
|
-
return /* @__PURE__ */ (0,
|
|
942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
738
943
|
}
|
|
739
944
|
function SelectValue({
|
|
740
945
|
...props
|
|
741
946
|
}) {
|
|
742
|
-
return /* @__PURE__ */ (0,
|
|
947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
743
948
|
}
|
|
744
949
|
function SelectTrigger({
|
|
745
950
|
className,
|
|
@@ -747,7 +952,7 @@ function SelectTrigger({
|
|
|
747
952
|
children,
|
|
748
953
|
...props
|
|
749
954
|
}) {
|
|
750
|
-
return /* @__PURE__ */ (0,
|
|
955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
751
956
|
SelectPrimitive.Trigger,
|
|
752
957
|
{
|
|
753
958
|
"data-slot": "select-trigger",
|
|
@@ -759,7 +964,7 @@ function SelectTrigger({
|
|
|
759
964
|
...props,
|
|
760
965
|
children: [
|
|
761
966
|
children,
|
|
762
|
-
/* @__PURE__ */ (0,
|
|
967
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronDown, { className: "size-4 opacity-50" }) })
|
|
763
968
|
]
|
|
764
969
|
}
|
|
765
970
|
);
|
|
@@ -770,7 +975,7 @@ function SelectContent({
|
|
|
770
975
|
position = "popper",
|
|
771
976
|
...props
|
|
772
977
|
}) {
|
|
773
|
-
return /* @__PURE__ */ (0,
|
|
978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
774
979
|
SelectPrimitive.Content,
|
|
775
980
|
{
|
|
776
981
|
"data-slot": "select-content",
|
|
@@ -782,8 +987,8 @@ function SelectContent({
|
|
|
782
987
|
position,
|
|
783
988
|
...props,
|
|
784
989
|
children: [
|
|
785
|
-
/* @__PURE__ */ (0,
|
|
786
|
-
/* @__PURE__ */ (0,
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectScrollUpButton, {}),
|
|
991
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
787
992
|
SelectPrimitive.Viewport,
|
|
788
993
|
{
|
|
789
994
|
className: cn(
|
|
@@ -793,7 +998,7 @@ function SelectContent({
|
|
|
793
998
|
children
|
|
794
999
|
}
|
|
795
1000
|
),
|
|
796
|
-
/* @__PURE__ */ (0,
|
|
1001
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectScrollDownButton, {})
|
|
797
1002
|
]
|
|
798
1003
|
}
|
|
799
1004
|
) });
|
|
@@ -803,7 +1008,7 @@ function SelectItem({
|
|
|
803
1008
|
children,
|
|
804
1009
|
...props
|
|
805
1010
|
}) {
|
|
806
|
-
return /* @__PURE__ */ (0,
|
|
1011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
807
1012
|
SelectPrimitive.Item,
|
|
808
1013
|
{
|
|
809
1014
|
"data-slot": "select-item",
|
|
@@ -813,8 +1018,8 @@ function SelectItem({
|
|
|
813
1018
|
),
|
|
814
1019
|
...props,
|
|
815
1020
|
children: [
|
|
816
|
-
/* @__PURE__ */ (0,
|
|
817
|
-
/* @__PURE__ */ (0,
|
|
1021
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Check, { className: "size-4" }) }) }),
|
|
1022
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SelectPrimitive.ItemText, { children })
|
|
818
1023
|
]
|
|
819
1024
|
}
|
|
820
1025
|
);
|
|
@@ -823,7 +1028,7 @@ function SelectScrollUpButton({
|
|
|
823
1028
|
className,
|
|
824
1029
|
...props
|
|
825
1030
|
}) {
|
|
826
|
-
return /* @__PURE__ */ (0,
|
|
1031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
827
1032
|
SelectPrimitive.ScrollUpButton,
|
|
828
1033
|
{
|
|
829
1034
|
"data-slot": "select-scroll-up-button",
|
|
@@ -832,7 +1037,7 @@ function SelectScrollUpButton({
|
|
|
832
1037
|
className
|
|
833
1038
|
),
|
|
834
1039
|
...props,
|
|
835
|
-
children: /* @__PURE__ */ (0,
|
|
1040
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronUp, { className: "size-4" })
|
|
836
1041
|
}
|
|
837
1042
|
);
|
|
838
1043
|
}
|
|
@@ -840,7 +1045,7 @@ function SelectScrollDownButton({
|
|
|
840
1045
|
className,
|
|
841
1046
|
...props
|
|
842
1047
|
}) {
|
|
843
|
-
return /* @__PURE__ */ (0,
|
|
1048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
844
1049
|
SelectPrimitive.ScrollDownButton,
|
|
845
1050
|
{
|
|
846
1051
|
"data-slot": "select-scroll-down-button",
|
|
@@ -849,13 +1054,13 @@ function SelectScrollDownButton({
|
|
|
849
1054
|
className
|
|
850
1055
|
),
|
|
851
1056
|
...props,
|
|
852
|
-
children: /* @__PURE__ */ (0,
|
|
1057
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronDown, { className: "size-4" })
|
|
853
1058
|
}
|
|
854
1059
|
);
|
|
855
1060
|
}
|
|
856
1061
|
|
|
857
1062
|
// src/components/Global/SelectDropdown.tsx
|
|
858
|
-
var
|
|
1063
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
859
1064
|
function SelectDropdown({
|
|
860
1065
|
options,
|
|
861
1066
|
placeholder = "Select an option",
|
|
@@ -867,23 +1072,23 @@ function SelectDropdown({
|
|
|
867
1072
|
readOnly,
|
|
868
1073
|
style
|
|
869
1074
|
}) {
|
|
870
|
-
return /* @__PURE__ */ (0,
|
|
871
|
-
/* @__PURE__ */ (0,
|
|
1075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Select, { value, onValueChange: onChange, disabled, children: [
|
|
1076
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
872
1077
|
SelectTrigger,
|
|
873
1078
|
{
|
|
874
1079
|
id,
|
|
875
1080
|
className,
|
|
876
1081
|
style: style ?? {},
|
|
877
1082
|
"aria-readonly": readOnly,
|
|
878
|
-
children: /* @__PURE__ */ (0,
|
|
1083
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectValue, { placeholder })
|
|
879
1084
|
}
|
|
880
1085
|
),
|
|
881
|
-
/* @__PURE__ */ (0,
|
|
1086
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectContent, { children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
882
1087
|
] });
|
|
883
1088
|
}
|
|
884
1089
|
|
|
885
1090
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
886
|
-
var
|
|
1091
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
887
1092
|
var Dropdown = ({ className, style, ...props }) => {
|
|
888
1093
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Default"];
|
|
889
1094
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
@@ -898,8 +1103,8 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
898
1103
|
const isDisabled = props.isDisabled ?? false;
|
|
899
1104
|
const isReadonly = props.isReadonly ?? false;
|
|
900
1105
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
901
|
-
const [value, setValue] =
|
|
902
|
-
const [error, setError] =
|
|
1106
|
+
const [value, setValue] = React8.useState("");
|
|
1107
|
+
const [error, setError] = React8.useState(null);
|
|
903
1108
|
const handleChange = (val) => {
|
|
904
1109
|
setValue(val);
|
|
905
1110
|
if (isRequired && val.trim() === "") {
|
|
@@ -910,8 +1115,8 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
910
1115
|
setError(null);
|
|
911
1116
|
}
|
|
912
1117
|
};
|
|
913
|
-
return /* @__PURE__ */ (0,
|
|
914
|
-
/* @__PURE__ */ (0,
|
|
1118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1119
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex gap-3 flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
915
1120
|
SelectDropdown,
|
|
916
1121
|
{
|
|
917
1122
|
options: formatList,
|
|
@@ -928,18 +1133,18 @@ var Dropdown = ({ className, style, ...props }) => {
|
|
|
928
1133
|
pattern: regexPattern || void 0
|
|
929
1134
|
}
|
|
930
1135
|
) }),
|
|
931
|
-
error && /* @__PURE__ */ (0,
|
|
1136
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
932
1137
|
] });
|
|
933
1138
|
};
|
|
934
1139
|
|
|
935
1140
|
// src/components/ui/switch.tsx
|
|
936
1141
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
|
|
937
|
-
var
|
|
1142
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
938
1143
|
function Switch({
|
|
939
1144
|
className,
|
|
940
1145
|
...props
|
|
941
1146
|
}) {
|
|
942
|
-
return /* @__PURE__ */ (0,
|
|
1147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
943
1148
|
SwitchPrimitive.Root,
|
|
944
1149
|
{
|
|
945
1150
|
"data-slot": "switch",
|
|
@@ -948,7 +1153,7 @@ function Switch({
|
|
|
948
1153
|
className
|
|
949
1154
|
),
|
|
950
1155
|
...props,
|
|
951
|
-
children: /* @__PURE__ */ (0,
|
|
1156
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
952
1157
|
SwitchPrimitive.Thumb,
|
|
953
1158
|
{
|
|
954
1159
|
"data-slot": "switch-thumb",
|
|
@@ -962,30 +1167,30 @@ function Switch({
|
|
|
962
1167
|
}
|
|
963
1168
|
|
|
964
1169
|
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
965
|
-
var
|
|
1170
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
966
1171
|
var SwitchToggle = ({ className, style, ...props }) => {
|
|
967
1172
|
const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
|
|
968
|
-
return /* @__PURE__ */ (0,
|
|
969
|
-
/* @__PURE__ */ (0,
|
|
970
|
-
/* @__PURE__ */ (0,
|
|
1173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className, style, children: text?.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center space-x-2 mb-2", children: [
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Switch, { id: `switch-${index}` }),
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Label, { htmlFor: `switch-${index}`, children: item })
|
|
971
1176
|
] }, index)) });
|
|
972
1177
|
};
|
|
973
1178
|
|
|
974
1179
|
// src/components/Inputs/PhoneInput/PhoneInput.tsx
|
|
975
|
-
var
|
|
1180
|
+
var React9 = __toESM(require("react"));
|
|
976
1181
|
var import_react_international_phone = require("react-international-phone");
|
|
977
1182
|
var import_style = require("react-international-phone/style.css");
|
|
978
|
-
var
|
|
1183
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
979
1184
|
var PhoneInput = ({ className, style, ...props }) => {
|
|
980
1185
|
const placeholder = props.placeholder ?? "Enter phone number";
|
|
981
|
-
const [value, setValue] =
|
|
1186
|
+
const [value, setValue] = React9.useState("");
|
|
982
1187
|
const regexPattern = props.regexPattern ?? "";
|
|
983
1188
|
const errorMessage = props.errorMessage ?? "Required";
|
|
984
1189
|
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
985
1190
|
const isRequired = props.isRequired ?? false;
|
|
986
1191
|
const isEditable = props.isEditable ?? true;
|
|
987
1192
|
const isDisabled = props.isDisabled ?? false;
|
|
988
|
-
const [error, setError] =
|
|
1193
|
+
const [error, setError] = React9.useState(null);
|
|
989
1194
|
const handleChange = (val) => {
|
|
990
1195
|
if (val.length > noOfCharacters) return;
|
|
991
1196
|
setValue(val);
|
|
@@ -997,8 +1202,8 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
997
1202
|
setError(null);
|
|
998
1203
|
}
|
|
999
1204
|
};
|
|
1000
|
-
return /* @__PURE__ */ (0,
|
|
1001
|
-
/* @__PURE__ */ (0,
|
|
1205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1206
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1002
1207
|
import_react_international_phone.PhoneInput,
|
|
1003
1208
|
{
|
|
1004
1209
|
defaultCountry: "in",
|
|
@@ -1015,23 +1220,158 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
1015
1220
|
style
|
|
1016
1221
|
}
|
|
1017
1222
|
),
|
|
1018
|
-
error && /* @__PURE__ */ (0,
|
|
1223
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1224
|
+
] });
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
// src/components/Inputs/SearchInput/SearchInput.tsx
|
|
1228
|
+
var React10 = __toESM(require("react"));
|
|
1229
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1230
|
+
var SearchInput = ({ className, style, ...props }) => {
|
|
1231
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1232
|
+
const regexPattern = props.regexPattern ?? "";
|
|
1233
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
1234
|
+
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
1235
|
+
const isRequired = props.isRequired ?? false;
|
|
1236
|
+
const isEditable = props.isEditable ?? true;
|
|
1237
|
+
const isDisabled = props.isDisabled ?? false;
|
|
1238
|
+
const isReadonly = props.isReadonly ?? false;
|
|
1239
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1240
|
+
const [value, setValue] = React10.useState("");
|
|
1241
|
+
const [error, setError] = React10.useState(null);
|
|
1242
|
+
const handleChange = (e) => {
|
|
1243
|
+
const val = e.target.value;
|
|
1244
|
+
if (val.length > noOfCharacters) return;
|
|
1245
|
+
setValue(val);
|
|
1246
|
+
if (isRequired && val.trim() === "") {
|
|
1247
|
+
setError(errorMessage);
|
|
1248
|
+
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
1249
|
+
setError(errorMessage);
|
|
1250
|
+
} else {
|
|
1251
|
+
setError(null);
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1258
|
+
Input,
|
|
1259
|
+
{
|
|
1260
|
+
type: "text",
|
|
1261
|
+
id: "text-field",
|
|
1262
|
+
className,
|
|
1263
|
+
style,
|
|
1264
|
+
value,
|
|
1265
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
1266
|
+
placeholder,
|
|
1267
|
+
onChange: handleChange,
|
|
1268
|
+
disabled: isDisabled || !isEditable,
|
|
1269
|
+
readOnly: isReadonly,
|
|
1270
|
+
required: isRequired,
|
|
1271
|
+
maxLength: noOfCharacters,
|
|
1272
|
+
pattern: regexPattern || void 0
|
|
1273
|
+
}
|
|
1274
|
+
)
|
|
1275
|
+
] }),
|
|
1276
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1277
|
+
] });
|
|
1278
|
+
};
|
|
1279
|
+
|
|
1280
|
+
// src/components/Inputs/FileInput/FileInput.tsx
|
|
1281
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1282
|
+
var FileInput = ({ className, style, ...props }) => {
|
|
1283
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "d-flex items-center relative align-middle", children: [
|
|
1285
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[11px]", children: "Browse" }),
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1287
|
+
Input,
|
|
1288
|
+
{
|
|
1289
|
+
type: "file",
|
|
1290
|
+
id: "file",
|
|
1291
|
+
autoComplete: "off",
|
|
1292
|
+
placeholder,
|
|
1293
|
+
className,
|
|
1294
|
+
style
|
|
1295
|
+
}
|
|
1296
|
+
)
|
|
1019
1297
|
] });
|
|
1020
1298
|
};
|
|
1021
1299
|
|
|
1022
1300
|
// src/components/Inputs/DatePicker/DatePicker.tsx
|
|
1023
1301
|
var import_react5 = __toESM(require("react"));
|
|
1024
|
-
var
|
|
1302
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1303
|
+
function DatePicker({ className, style, ...props }) {
|
|
1304
|
+
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1305
|
+
const minimumDate = props.minimumDate ?? "none";
|
|
1306
|
+
const customMinimumDate = props.customMinimumDate ?? "";
|
|
1307
|
+
const maximumDate = props.maximumDate ?? "none";
|
|
1308
|
+
const customMaximumDate = props.customMaximumDate ?? "";
|
|
1309
|
+
const errorMessage = props.errorMessage ?? "Required";
|
|
1310
|
+
const isRequired = props.isRequired ?? false;
|
|
1311
|
+
const isEditable = props.isEditable ?? true;
|
|
1312
|
+
const isDisabled = props.isDisabled ?? false;
|
|
1313
|
+
const isReadonly = props.isReadonly ?? false;
|
|
1314
|
+
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1315
|
+
const [value, setValue] = import_react5.default.useState("");
|
|
1316
|
+
const [error, setError] = import_react5.default.useState(null);
|
|
1317
|
+
const resolveDate = (option, customOption) => {
|
|
1318
|
+
if (!option) return void 0;
|
|
1319
|
+
switch (option) {
|
|
1320
|
+
case "today":
|
|
1321
|
+
return (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
1322
|
+
case "custom":
|
|
1323
|
+
return customOption ?? void 0;
|
|
1324
|
+
case "none":
|
|
1325
|
+
default:
|
|
1326
|
+
return void 0;
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
const minDate = resolveDate(minimumDate, customMinimumDate);
|
|
1330
|
+
const maxDate = resolveDate(maximumDate, customMaximumDate);
|
|
1331
|
+
const handleChange = (e) => {
|
|
1332
|
+
const val = e.target.value;
|
|
1333
|
+
setValue(val);
|
|
1334
|
+
if (isRequired && val.trim() === "") {
|
|
1335
|
+
setError(errorMessage);
|
|
1336
|
+
} else {
|
|
1337
|
+
setError(null);
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1341
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex justify-start items-center relative", children: [
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1343
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1344
|
+
Input,
|
|
1345
|
+
{
|
|
1346
|
+
type: "date",
|
|
1347
|
+
id: "date",
|
|
1348
|
+
autoComplete: isAutocomplete ? "on" : "off",
|
|
1349
|
+
onChange: handleChange,
|
|
1350
|
+
disabled: isDisabled || !isEditable,
|
|
1351
|
+
value,
|
|
1352
|
+
readOnly: isReadonly,
|
|
1353
|
+
required: isRequired,
|
|
1354
|
+
placeholder,
|
|
1355
|
+
min: minDate,
|
|
1356
|
+
max: maxDate,
|
|
1357
|
+
className,
|
|
1358
|
+
style
|
|
1359
|
+
}
|
|
1360
|
+
)
|
|
1361
|
+
] }),
|
|
1362
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1363
|
+
] });
|
|
1364
|
+
}
|
|
1025
1365
|
|
|
1026
1366
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
1027
|
-
var
|
|
1367
|
+
var React13 = __toESM(require("react"));
|
|
1028
1368
|
var import_date_fns = require("date-fns");
|
|
1029
1369
|
|
|
1030
1370
|
// src/components/ui/calendar.tsx
|
|
1031
|
-
var
|
|
1371
|
+
var React12 = __toESM(require("react"));
|
|
1032
1372
|
var import_react_day_picker = require("react-day-picker");
|
|
1033
|
-
var
|
|
1034
|
-
function
|
|
1373
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1374
|
+
function Calendar2({
|
|
1035
1375
|
className,
|
|
1036
1376
|
classNames,
|
|
1037
1377
|
showOutsideDays = true,
|
|
@@ -1042,7 +1382,7 @@ function Calendar({
|
|
|
1042
1382
|
...props
|
|
1043
1383
|
}) {
|
|
1044
1384
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1046
1386
|
import_react_day_picker.DayPicker,
|
|
1047
1387
|
{
|
|
1048
1388
|
showOutsideDays,
|
|
@@ -1141,7 +1481,7 @@ function Calendar({
|
|
|
1141
1481
|
},
|
|
1142
1482
|
components: {
|
|
1143
1483
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
1144
|
-
return /* @__PURE__ */ (0,
|
|
1484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1145
1485
|
"div",
|
|
1146
1486
|
{
|
|
1147
1487
|
"data-slot": "calendar",
|
|
@@ -1153,10 +1493,10 @@ function Calendar({
|
|
|
1153
1493
|
},
|
|
1154
1494
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
1155
1495
|
if (orientation === "left") {
|
|
1156
|
-
return /* @__PURE__ */ (0,
|
|
1496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ChevronLeft, { className: cn("size-4", className2), ...props2 });
|
|
1157
1497
|
}
|
|
1158
1498
|
if (orientation === "right") {
|
|
1159
|
-
return /* @__PURE__ */ (0,
|
|
1499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1160
1500
|
ChevronRight,
|
|
1161
1501
|
{
|
|
1162
1502
|
className: cn("size-4", className2),
|
|
@@ -1164,11 +1504,11 @@ function Calendar({
|
|
|
1164
1504
|
}
|
|
1165
1505
|
);
|
|
1166
1506
|
}
|
|
1167
|
-
return /* @__PURE__ */ (0,
|
|
1507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ChevronDown, { className: cn("size-4", className2), ...props2 });
|
|
1168
1508
|
},
|
|
1169
1509
|
DayButton: CalendarDayButton,
|
|
1170
1510
|
WeekNumber: ({ children, ...props2 }) => {
|
|
1171
|
-
return /* @__PURE__ */ (0,
|
|
1511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("td", { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
1172
1512
|
},
|
|
1173
1513
|
...components
|
|
1174
1514
|
},
|
|
@@ -1183,11 +1523,11 @@ function CalendarDayButton({
|
|
|
1183
1523
|
...props
|
|
1184
1524
|
}) {
|
|
1185
1525
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1186
|
-
const ref =
|
|
1187
|
-
|
|
1526
|
+
const ref = React12.useRef(null);
|
|
1527
|
+
React12.useEffect(() => {
|
|
1188
1528
|
if (modifiers.focused) ref.current?.focus();
|
|
1189
1529
|
}, [modifiers.focused]);
|
|
1190
|
-
return /* @__PURE__ */ (0,
|
|
1530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1191
1531
|
Button,
|
|
1192
1532
|
{
|
|
1193
1533
|
ref,
|
|
@@ -1210,16 +1550,16 @@ function CalendarDayButton({
|
|
|
1210
1550
|
|
|
1211
1551
|
// src/components/ui/popover.tsx
|
|
1212
1552
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
1213
|
-
var
|
|
1553
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1214
1554
|
function Popover({
|
|
1215
1555
|
...props
|
|
1216
1556
|
}) {
|
|
1217
|
-
return /* @__PURE__ */ (0,
|
|
1557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1218
1558
|
}
|
|
1219
1559
|
function PopoverTrigger({
|
|
1220
1560
|
...props
|
|
1221
1561
|
}) {
|
|
1222
|
-
return /* @__PURE__ */ (0,
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1223
1563
|
}
|
|
1224
1564
|
function PopoverContent({
|
|
1225
1565
|
className,
|
|
@@ -1227,7 +1567,7 @@ function PopoverContent({
|
|
|
1227
1567
|
sideOffset = 4,
|
|
1228
1568
|
...props
|
|
1229
1569
|
}) {
|
|
1230
|
-
return /* @__PURE__ */ (0,
|
|
1570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1231
1571
|
PopoverPrimitive.Content,
|
|
1232
1572
|
{
|
|
1233
1573
|
"data-slot": "popover-content",
|
|
@@ -1243,14 +1583,14 @@ function PopoverContent({
|
|
|
1243
1583
|
}
|
|
1244
1584
|
|
|
1245
1585
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
1246
|
-
var
|
|
1586
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1247
1587
|
var DateRange = ({ className, style }) => {
|
|
1248
|
-
const [date, setDate] =
|
|
1588
|
+
const [date, setDate] = React13.useState({
|
|
1249
1589
|
from: /* @__PURE__ */ new Date(),
|
|
1250
1590
|
to: (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 7)
|
|
1251
1591
|
});
|
|
1252
|
-
return /* @__PURE__ */ (0,
|
|
1253
|
-
/* @__PURE__ */ (0,
|
|
1592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Popover, { children: [
|
|
1593
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1254
1594
|
Button,
|
|
1255
1595
|
{
|
|
1256
1596
|
id: "date",
|
|
@@ -1259,16 +1599,16 @@ var DateRange = ({ className, style }) => {
|
|
|
1259
1599
|
"w-[300px] justify-start text-left font-normal text-[11px]",
|
|
1260
1600
|
!date && "text-muted-foreground"
|
|
1261
1601
|
),
|
|
1262
|
-
children: date?.from ? date.to ? /* @__PURE__ */ (0,
|
|
1602
|
+
children: date?.from ? date.to ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
1263
1603
|
(0, import_date_fns.format)(date.from, "LLL dd, y"),
|
|
1264
1604
|
" -",
|
|
1265
1605
|
" ",
|
|
1266
1606
|
(0, import_date_fns.format)(date.to, "LLL dd, y")
|
|
1267
|
-
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0,
|
|
1607
|
+
] }) : (0, import_date_fns.format)(date.from, "LLL dd, y") : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: "Pick a date range" })
|
|
1268
1608
|
}
|
|
1269
1609
|
) }),
|
|
1270
|
-
/* @__PURE__ */ (0,
|
|
1271
|
-
|
|
1610
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1611
|
+
Calendar2,
|
|
1272
1612
|
{
|
|
1273
1613
|
mode: "range",
|
|
1274
1614
|
defaultMonth: date?.from,
|
|
@@ -1279,19 +1619,20 @@ var DateRange = ({ className, style }) => {
|
|
|
1279
1619
|
) })
|
|
1280
1620
|
] }) });
|
|
1281
1621
|
};
|
|
1622
|
+
var DateRange_default = DateRange;
|
|
1282
1623
|
|
|
1283
1624
|
// src/components/ui/data-table.tsx
|
|
1284
1625
|
var import_react_table = require("@tanstack/react-table");
|
|
1285
1626
|
|
|
1286
1627
|
// src/components/ui/table.tsx
|
|
1287
|
-
var
|
|
1628
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1288
1629
|
function Table({ className, ...props }) {
|
|
1289
|
-
return /* @__PURE__ */ (0,
|
|
1630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1290
1631
|
"div",
|
|
1291
1632
|
{
|
|
1292
1633
|
"data-slot": "table-container",
|
|
1293
1634
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
1294
|
-
children: /* @__PURE__ */ (0,
|
|
1635
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1295
1636
|
"table",
|
|
1296
1637
|
{
|
|
1297
1638
|
"data-slot": "table",
|
|
@@ -1303,7 +1644,7 @@ function Table({ className, ...props }) {
|
|
|
1303
1644
|
);
|
|
1304
1645
|
}
|
|
1305
1646
|
function TableHeader({ className, ...props }) {
|
|
1306
|
-
return /* @__PURE__ */ (0,
|
|
1647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1307
1648
|
"thead",
|
|
1308
1649
|
{
|
|
1309
1650
|
"data-slot": "table-header",
|
|
@@ -1316,7 +1657,7 @@ function TableHeader({ className, ...props }) {
|
|
|
1316
1657
|
);
|
|
1317
1658
|
}
|
|
1318
1659
|
function TableBody({ className, ...props }) {
|
|
1319
|
-
return /* @__PURE__ */ (0,
|
|
1660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1320
1661
|
"tbody",
|
|
1321
1662
|
{
|
|
1322
1663
|
"data-slot": "table-body",
|
|
@@ -1329,7 +1670,7 @@ function TableBody({ className, ...props }) {
|
|
|
1329
1670
|
);
|
|
1330
1671
|
}
|
|
1331
1672
|
function TableRow({ className, ...props }) {
|
|
1332
|
-
return /* @__PURE__ */ (0,
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1333
1674
|
"tr",
|
|
1334
1675
|
{
|
|
1335
1676
|
"data-slot": "table-row",
|
|
@@ -1342,7 +1683,7 @@ function TableRow({ className, ...props }) {
|
|
|
1342
1683
|
);
|
|
1343
1684
|
}
|
|
1344
1685
|
function TableHead({ className, ...props }) {
|
|
1345
|
-
return /* @__PURE__ */ (0,
|
|
1686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1346
1687
|
"th",
|
|
1347
1688
|
{
|
|
1348
1689
|
"data-slot": "table-head",
|
|
@@ -1355,7 +1696,7 @@ function TableHead({ className, ...props }) {
|
|
|
1355
1696
|
);
|
|
1356
1697
|
}
|
|
1357
1698
|
function TableCell({ className, ...props }) {
|
|
1358
|
-
return /* @__PURE__ */ (0,
|
|
1699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1359
1700
|
"td",
|
|
1360
1701
|
{
|
|
1361
1702
|
"data-slot": "table-cell",
|
|
@@ -1369,7 +1710,7 @@ function TableCell({ className, ...props }) {
|
|
|
1369
1710
|
}
|
|
1370
1711
|
|
|
1371
1712
|
// src/components/ui/data-table.tsx
|
|
1372
|
-
var
|
|
1713
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1373
1714
|
function DataTable({
|
|
1374
1715
|
columns,
|
|
1375
1716
|
rowActions,
|
|
@@ -1394,14 +1735,14 @@ function DataTable({
|
|
|
1394
1735
|
onCellClick(rowData, columnId);
|
|
1395
1736
|
}
|
|
1396
1737
|
};
|
|
1397
|
-
return /* @__PURE__ */ (0,
|
|
1398
|
-
/* @__PURE__ */ (0,
|
|
1399
|
-
return /* @__PURE__ */ (0,
|
|
1738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Table, { children: [
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { children: headerGroup.headers.map((header) => {
|
|
1740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
1400
1741
|
header.column.columnDef.header,
|
|
1401
1742
|
header.getContext()
|
|
1402
1743
|
) }, header.id);
|
|
1403
1744
|
}) }, headerGroup.id)) }),
|
|
1404
|
-
/* @__PURE__ */ (0,
|
|
1745
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1405
1746
|
TableRow,
|
|
1406
1747
|
{
|
|
1407
1748
|
"data-state": row.getIsSelected() && "selected",
|
|
@@ -1411,7 +1752,7 @@ function DataTable({
|
|
|
1411
1752
|
const isCellClickable = cellClickEnabled(row.original, cell.column.id);
|
|
1412
1753
|
const dynamicClass = cell.column.columnDef.meta?.cellClass || "";
|
|
1413
1754
|
const dynamicStyle = cell.column.columnDef.meta?.cellStyle || {};
|
|
1414
|
-
return /* @__PURE__ */ (0,
|
|
1755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1415
1756
|
TableCell,
|
|
1416
1757
|
{
|
|
1417
1758
|
className: `${dynamicClass} ${isCellClickable ? "underline cursor-pointer" : ""}`,
|
|
@@ -1426,36 +1767,36 @@ function DataTable({
|
|
|
1426
1767
|
cell.id
|
|
1427
1768
|
);
|
|
1428
1769
|
}),
|
|
1429
|
-
rowActions.length > 0 && /* @__PURE__ */ (0,
|
|
1770
|
+
rowActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "absolute top-0 right-0 bg-white py-3 min-w-[100px] z-50 shadow-md flex items-center justify-center gap-3 p-2 opacity-0 group-hover:opacity-100 duration-300 h-full", children: rowActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-[#383838] text-[12px] cursor-pointer font-[400]", children: action.header }, index)) })
|
|
1430
1771
|
]
|
|
1431
1772
|
},
|
|
1432
1773
|
row.id
|
|
1433
|
-
)) : /* @__PURE__ */ (0,
|
|
1774
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) }) })
|
|
1434
1775
|
] }) });
|
|
1435
1776
|
}
|
|
1436
1777
|
|
|
1437
1778
|
// src/components/DataDisplay/Table/Table.tsx
|
|
1438
|
-
var
|
|
1779
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1439
1780
|
var Table2 = ({ columns, data, rowActions }) => {
|
|
1440
1781
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
1441
1782
|
const rawData = Array.isArray(data) ? data : [];
|
|
1442
1783
|
const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
|
|
1443
|
-
return /* @__PURE__ */ (0,
|
|
1784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DataTable, { columns: rawColumns, data: rawData, rowActions: rawRowActions });
|
|
1444
1785
|
};
|
|
1445
1786
|
var Table_default = Table2;
|
|
1446
1787
|
|
|
1447
1788
|
// src/components/ui/dropdown-menu.tsx
|
|
1448
1789
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1449
|
-
var
|
|
1790
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1450
1791
|
function DropdownMenu({
|
|
1451
1792
|
...props
|
|
1452
1793
|
}) {
|
|
1453
|
-
return /* @__PURE__ */ (0,
|
|
1794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1454
1795
|
}
|
|
1455
1796
|
function DropdownMenuTrigger({
|
|
1456
1797
|
...props
|
|
1457
1798
|
}) {
|
|
1458
|
-
return /* @__PURE__ */ (0,
|
|
1799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1459
1800
|
DropdownMenuPrimitive.Trigger,
|
|
1460
1801
|
{
|
|
1461
1802
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -1468,7 +1809,7 @@ function DropdownMenuContent({
|
|
|
1468
1809
|
sideOffset = 4,
|
|
1469
1810
|
...props
|
|
1470
1811
|
}) {
|
|
1471
|
-
return /* @__PURE__ */ (0,
|
|
1812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1472
1813
|
DropdownMenuPrimitive.Content,
|
|
1473
1814
|
{
|
|
1474
1815
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1487,7 +1828,7 @@ function DropdownMenuItem({
|
|
|
1487
1828
|
variant = "default",
|
|
1488
1829
|
...props
|
|
1489
1830
|
}) {
|
|
1490
|
-
return /* @__PURE__ */ (0,
|
|
1831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1491
1832
|
DropdownMenuPrimitive.Item,
|
|
1492
1833
|
{
|
|
1493
1834
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1503,13 +1844,13 @@ function DropdownMenuItem({
|
|
|
1503
1844
|
}
|
|
1504
1845
|
|
|
1505
1846
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
1506
|
-
var
|
|
1847
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1507
1848
|
var Tabs = ({ tabs, className, style }) => {
|
|
1508
1849
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
1509
1850
|
const baseClasses = "text-[12px] text-[#E9E9E9] p-2 text-center rounded-md transition-colors border-none outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 cursor-pointer select-none ";
|
|
1510
1851
|
const activeClasses = "bg-white/10 text-white";
|
|
1511
1852
|
const hoverClasses = "hover:bg-white/5";
|
|
1512
|
-
return /* @__PURE__ */ (0,
|
|
1853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className, style, children: rawTabs.map((tab, index) => {
|
|
1513
1854
|
const finalClasses = [
|
|
1514
1855
|
baseClasses,
|
|
1515
1856
|
tab.isActive ? activeClasses : hoverClasses,
|
|
@@ -1517,24 +1858,24 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1517
1858
|
].join(" ");
|
|
1518
1859
|
const hasDropdown = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
1519
1860
|
if (hasDropdown) {
|
|
1520
|
-
return /* @__PURE__ */ (0,
|
|
1521
|
-
/* @__PURE__ */ (0,
|
|
1861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(DropdownMenu, { children: [
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1522
1863
|
DropdownMenuTrigger,
|
|
1523
1864
|
{
|
|
1524
1865
|
className: `${finalClasses} inline-flex items-center gap-1`,
|
|
1525
1866
|
children: [
|
|
1526
1867
|
tab.header,
|
|
1527
|
-
/* @__PURE__ */ (0,
|
|
1868
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
1528
1869
|
]
|
|
1529
1870
|
}
|
|
1530
1871
|
),
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
1872
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1532
1873
|
DropdownMenuContent,
|
|
1533
1874
|
{
|
|
1534
1875
|
align: "start",
|
|
1535
1876
|
sideOffset: 6,
|
|
1536
1877
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
1537
|
-
children: tab.children.map((item) => /* @__PURE__ */ (0,
|
|
1878
|
+
children: tab.children.map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1538
1879
|
DropdownMenuItem,
|
|
1539
1880
|
{
|
|
1540
1881
|
asChild: true,
|
|
@@ -1547,19 +1888,19 @@ var Tabs = ({ tabs, className, style }) => {
|
|
|
1547
1888
|
)
|
|
1548
1889
|
] }, index);
|
|
1549
1890
|
}
|
|
1550
|
-
return /* @__PURE__ */ (0,
|
|
1891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: finalClasses, style: { backgroundColor: "transparent", border: "none", ...tab.style }, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
1551
1892
|
}) });
|
|
1552
1893
|
};
|
|
1553
1894
|
var Tabs_default = Tabs;
|
|
1554
1895
|
|
|
1555
1896
|
// src/components/Navigation/Stages/Stages.tsx
|
|
1556
1897
|
var import_react6 = __toESM(require("react"));
|
|
1557
|
-
var
|
|
1898
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1558
1899
|
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
1559
|
-
return /* @__PURE__ */ (0,
|
|
1560
|
-
/* @__PURE__ */ (0,
|
|
1561
|
-
/* @__PURE__ */ (0,
|
|
1562
|
-
/* @__PURE__ */ (0,
|
|
1900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between bg-gray-50 p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
1901
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center flex-1 px-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react6.default.Fragment, { children: [
|
|
1903
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1563
1904
|
"button",
|
|
1564
1905
|
{
|
|
1565
1906
|
className: `
|
|
@@ -1567,26 +1908,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
|
1567
1908
|
children: stage.header
|
|
1568
1909
|
}
|
|
1569
1910
|
),
|
|
1570
|
-
index < stages.length - 1 && /* @__PURE__ */ (0,
|
|
1911
|
+
index < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
1571
1912
|
] }, stage.id)) }),
|
|
1572
|
-
isShowBtn && /* @__PURE__ */ (0,
|
|
1913
|
+
isShowBtn && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm", children: buttonText }) })
|
|
1573
1914
|
] }) });
|
|
1574
1915
|
};
|
|
1575
1916
|
var Stages_default = StagesComponent;
|
|
1576
1917
|
|
|
1577
1918
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
1578
|
-
var
|
|
1919
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1579
1920
|
var Spacer = ({ className, style }) => {
|
|
1580
|
-
return /* @__PURE__ */ (0,
|
|
1921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: `${className}`, style });
|
|
1581
1922
|
};
|
|
1582
1923
|
var Spacer_default = Spacer;
|
|
1583
1924
|
|
|
1584
1925
|
// src/components/Navigation/Profile/Profile.tsx
|
|
1585
|
-
var
|
|
1926
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1586
1927
|
var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
1587
|
-
return /* @__PURE__ */ (0,
|
|
1588
|
-
showName && /* @__PURE__ */ (0,
|
|
1589
|
-
profileType === "avatar" ? /* @__PURE__ */ (0,
|
|
1928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex gap-2 items-center justify-between w-30 cursor-pointer", children: [
|
|
1929
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h4", { className: "text-[#000000] dark:text-[#fff] text-[13px] font-[500] mb-0", children: userName }),
|
|
1930
|
+
profileType === "avatar" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1590
1931
|
"img",
|
|
1591
1932
|
{
|
|
1592
1933
|
src: "https://builder.development.algorithmshift.ai/images/toolset/profile.svg",
|
|
@@ -1594,16 +1935,16 @@ var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
|
1594
1935
|
width: 24,
|
|
1595
1936
|
height: 24
|
|
1596
1937
|
}
|
|
1597
|
-
) : /* @__PURE__ */ (0,
|
|
1938
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-6 h-6 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: "A" })
|
|
1598
1939
|
] }) });
|
|
1599
1940
|
};
|
|
1600
1941
|
var Profile_default = Profile;
|
|
1601
1942
|
|
|
1602
1943
|
// src/components/Navigation/Notification/Notification.tsx
|
|
1603
|
-
var
|
|
1604
|
-
var Notification = ({ className, style, badgeType, badgeCount, hideBadgeWhenZero }) => {
|
|
1605
|
-
return /* @__PURE__ */ (0,
|
|
1606
|
-
/* @__PURE__ */ (0,
|
|
1944
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1945
|
+
var Notification = ({ className, style, badgeType, badgeCount = 0, hideBadgeWhenZero }) => {
|
|
1946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "w-[34px] h-[34px] bg-[#E9E9E9] rounded-md text-center flex items-center justify-center relative", children: [
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1607
1948
|
"img",
|
|
1608
1949
|
{
|
|
1609
1950
|
src: "https://builder.development.algorithmshift.ai/images/toolset/notification.svg",
|
|
@@ -1612,14 +1953,14 @@ var Notification = ({ className, style, badgeType, badgeCount, hideBadgeWhenZero
|
|
|
1612
1953
|
height: 18
|
|
1613
1954
|
}
|
|
1614
1955
|
),
|
|
1615
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0,
|
|
1956
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-[10px] text-[#fff] bg-[#FF4A4A] w-[20px] h-[20px] rounded-full absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 leading-[20px]", children: badgeCount }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "bg-[#FF4A4A] w-[10px] h-[10px] rounded-full absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 leading-[20px]" })
|
|
1616
1957
|
] }) });
|
|
1617
1958
|
};
|
|
1618
1959
|
var Notification_default = Notification;
|
|
1619
1960
|
|
|
1620
1961
|
// src/components/Navigation/Logo/Logo.tsx
|
|
1621
|
-
var
|
|
1622
|
-
var
|
|
1962
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1963
|
+
var ImageControl2 = ({
|
|
1623
1964
|
className,
|
|
1624
1965
|
style,
|
|
1625
1966
|
imageUrl
|
|
@@ -1639,25 +1980,32 @@ var ImageControl = ({
|
|
|
1639
1980
|
className: "opacity-50"
|
|
1640
1981
|
};
|
|
1641
1982
|
}
|
|
1642
|
-
return /* @__PURE__ */ (0,
|
|
1983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src, alt: "Preview", sizes: "100vw", ...extraProps }) });
|
|
1643
1984
|
};
|
|
1644
|
-
var Logo_default =
|
|
1985
|
+
var Logo_default = ImageControl2;
|
|
1645
1986
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1646
1987
|
0 && (module.exports = {
|
|
1647
1988
|
Button,
|
|
1648
1989
|
CheckboxInput,
|
|
1990
|
+
DatePicker,
|
|
1649
1991
|
DateRange,
|
|
1650
1992
|
Dropdown,
|
|
1651
1993
|
EmailInput,
|
|
1994
|
+
FileInput,
|
|
1652
1995
|
FlexLayout,
|
|
1653
1996
|
GridLayout,
|
|
1997
|
+
Image,
|
|
1654
1998
|
Logo,
|
|
1655
1999
|
MultiCheckbox,
|
|
1656
2000
|
Notification,
|
|
2001
|
+
NumberInput,
|
|
1657
2002
|
PasswordInput,
|
|
1658
2003
|
PhoneInput,
|
|
1659
2004
|
Profile,
|
|
1660
2005
|
RadioInput,
|
|
2006
|
+
RichText,
|
|
2007
|
+
SearchInput,
|
|
2008
|
+
Shape,
|
|
1661
2009
|
Spacer,
|
|
1662
2010
|
Stages,
|
|
1663
2011
|
SwitchToggle,
|
|
@@ -1676,6 +2024,8 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
|
1676
2024
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
1677
2025
|
lucide-react/dist/esm/Icon.js:
|
|
1678
2026
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
2027
|
+
lucide-react/dist/esm/icons/calculator.js:
|
|
2028
|
+
lucide-react/dist/esm/icons/calendar.js:
|
|
1679
2029
|
lucide-react/dist/esm/icons/check.js:
|
|
1680
2030
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
1681
2031
|
lucide-react/dist/esm/icons/chevron-left.js:
|
|
@@ -1684,6 +2034,7 @@ lucide-react/dist/esm/icons/chevron-up.js:
|
|
|
1684
2034
|
lucide-react/dist/esm/icons/circle.js:
|
|
1685
2035
|
lucide-react/dist/esm/icons/mail.js:
|
|
1686
2036
|
lucide-react/dist/esm/icons/scan-eye.js:
|
|
2037
|
+
lucide-react/dist/esm/icons/search.js:
|
|
1687
2038
|
lucide-react/dist/esm/lucide-react.js:
|
|
1688
2039
|
(**
|
|
1689
2040
|
* @license lucide-react v0.542.0 - ISC
|