@algorithm-shift/design-system 1.2.31 → 1.2.33
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.css +30 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +41 -14
- package/dist/index.d.ts +41 -14
- package/dist/index.js +468 -558
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +465 -555
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -225,35 +225,17 @@ function Input({ className, type, ...props }) {
|
|
|
225
225
|
import { Fragment, jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
226
226
|
var TextInput = ({ className, style, ...props }) => {
|
|
227
227
|
const placeholder = props.placeholder || "Placeholder text";
|
|
228
|
-
const regexPattern = props.regexPattern ?? "";
|
|
229
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
230
|
-
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
231
|
-
const isRequired = props.isRequired ?? false;
|
|
232
228
|
const isEditable = props.isEditable ?? true;
|
|
233
229
|
const isDisabled = props.isDisabled ?? false;
|
|
234
230
|
const isReadonly = props.isReadonly ?? false;
|
|
235
231
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
236
|
-
const [value, setValue] = React2.useState("");
|
|
237
232
|
const [error, setError] = React2.useState(null);
|
|
238
233
|
React2.useEffect(() => {
|
|
239
234
|
if (!props.validateOnMount) return;
|
|
240
235
|
setError(props.errorMessage || null);
|
|
241
236
|
}, [props.errorMessage, props.validateOnMount]);
|
|
242
237
|
const handleChange = (e) => {
|
|
243
|
-
|
|
244
|
-
props.onChange?.(e);
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
const val = e.target.value;
|
|
248
|
-
if (val.length > noOfCharacters) return;
|
|
249
|
-
setValue(val);
|
|
250
|
-
if (isRequired && val.trim() === "") {
|
|
251
|
-
setError(errorMessage);
|
|
252
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
253
|
-
setError(errorMessage);
|
|
254
|
-
} else {
|
|
255
|
-
setError(null);
|
|
256
|
-
}
|
|
238
|
+
props.onChange?.(e);
|
|
257
239
|
};
|
|
258
240
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
259
241
|
/* @__PURE__ */ jsx10(
|
|
@@ -266,15 +248,12 @@ var TextInput = ({ className, style, ...props }) => {
|
|
|
266
248
|
...style,
|
|
267
249
|
borderColor: error ? "#f87171" : style?.borderColor
|
|
268
250
|
},
|
|
269
|
-
value: props.value
|
|
251
|
+
value: props.value,
|
|
270
252
|
autoComplete: isAutocomplete ? "on" : "off",
|
|
271
253
|
placeholder,
|
|
272
254
|
onChange: handleChange,
|
|
273
255
|
disabled: isDisabled || !isEditable,
|
|
274
|
-
readOnly: isReadonly
|
|
275
|
-
required: isRequired,
|
|
276
|
-
maxLength: noOfCharacters,
|
|
277
|
-
pattern: regexPattern || void 0
|
|
256
|
+
readOnly: isReadonly
|
|
278
257
|
}
|
|
279
258
|
),
|
|
280
259
|
error && /* @__PURE__ */ jsx10("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
@@ -487,35 +466,17 @@ import { useEffect as useEffect2 } from "react";
|
|
|
487
466
|
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
488
467
|
var NumberInput = ({ className, style, ...props }) => {
|
|
489
468
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
490
|
-
const regexPattern = props.regexPattern ?? "";
|
|
491
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
492
|
-
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
493
|
-
const isRequired = props.isRequired ?? false;
|
|
494
469
|
const isEditable = props.isEditable ?? true;
|
|
495
470
|
const isDisabled = props.isDisabled ?? false;
|
|
496
471
|
const isReadonly = props.isReadonly ?? false;
|
|
497
472
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
498
|
-
const [value, setValue] = React3.useState("");
|
|
499
473
|
const [error, setError] = React3.useState(null);
|
|
500
474
|
useEffect2(() => {
|
|
501
475
|
if (!props.validateOnMount) return;
|
|
502
476
|
setError(props.errorMessage || null);
|
|
503
477
|
}, [props.errorMessage, props.validateOnMount]);
|
|
504
478
|
const handleChange = (e) => {
|
|
505
|
-
|
|
506
|
-
props.onChange?.(e);
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
const val = e.target.value;
|
|
510
|
-
if (val.length > noOfCharacters) return;
|
|
511
|
-
setValue(val);
|
|
512
|
-
if (isRequired && val.trim() === "") {
|
|
513
|
-
setError(errorMessage);
|
|
514
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
515
|
-
setError(errorMessage);
|
|
516
|
-
} else {
|
|
517
|
-
setError(null);
|
|
518
|
-
}
|
|
479
|
+
props.onChange?.(e);
|
|
519
480
|
};
|
|
520
481
|
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
521
482
|
/* @__PURE__ */ jsxs3("div", { className: "flex justify-start items-center relative", children: [
|
|
@@ -524,9 +485,9 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
524
485
|
Input,
|
|
525
486
|
{
|
|
526
487
|
type: "number",
|
|
527
|
-
id: "number-field",
|
|
488
|
+
id: props.name || "number-field",
|
|
528
489
|
name: props.name,
|
|
529
|
-
value: props.value
|
|
490
|
+
value: props.value,
|
|
530
491
|
className: cn(className, error ? "border-red-500" : ""),
|
|
531
492
|
style: {
|
|
532
493
|
...style,
|
|
@@ -536,10 +497,7 @@ var NumberInput = ({ className, style, ...props }) => {
|
|
|
536
497
|
placeholder,
|
|
537
498
|
onChange: handleChange,
|
|
538
499
|
disabled: isDisabled || !isEditable,
|
|
539
|
-
readOnly: isReadonly
|
|
540
|
-
required: isRequired,
|
|
541
|
-
maxLength: noOfCharacters,
|
|
542
|
-
pattern: regexPattern || void 0
|
|
500
|
+
readOnly: isReadonly
|
|
543
501
|
}
|
|
544
502
|
)
|
|
545
503
|
] }),
|
|
@@ -553,35 +511,17 @@ import * as React4 from "react";
|
|
|
553
511
|
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
554
512
|
var EmailInput = ({ className, style, ...props }) => {
|
|
555
513
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
556
|
-
const regexPattern = props.regexPattern ?? "";
|
|
557
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
558
|
-
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
559
|
-
const isRequired = props.isRequired ?? false;
|
|
560
514
|
const isEditable = props.isEditable ?? true;
|
|
561
515
|
const isDisabled = props.isDisabled ?? false;
|
|
562
516
|
const isReadonly = props.isReadonly ?? false;
|
|
563
517
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
564
|
-
const [value, setValue] = React4.useState("");
|
|
565
518
|
const [error, setError] = React4.useState(null);
|
|
566
519
|
React4.useEffect(() => {
|
|
567
520
|
if (!props.validateOnMount) return;
|
|
568
521
|
setError(props.errorMessage || null);
|
|
569
522
|
}, [props.errorMessage, props.validateOnMount]);
|
|
570
523
|
const handleChange = (e) => {
|
|
571
|
-
|
|
572
|
-
props.onChange?.(e);
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
const val = e.target.value;
|
|
576
|
-
if (val.length > noOfCharacters) return;
|
|
577
|
-
setValue(val);
|
|
578
|
-
if (isRequired && val.trim() === "") {
|
|
579
|
-
setError(errorMessage);
|
|
580
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
581
|
-
setError(errorMessage);
|
|
582
|
-
} else {
|
|
583
|
-
setError(null);
|
|
584
|
-
}
|
|
524
|
+
props.onChange?.(e);
|
|
585
525
|
};
|
|
586
526
|
return /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
587
527
|
/* @__PURE__ */ jsxs4("div", { className: "flex justify-start items-center relative", children: [
|
|
@@ -591,7 +531,7 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
591
531
|
{
|
|
592
532
|
type: "email",
|
|
593
533
|
name: props.name,
|
|
594
|
-
value: props.value
|
|
534
|
+
value: props.value,
|
|
595
535
|
className: cn(className, error ? "border-red-500" : ""),
|
|
596
536
|
style: {
|
|
597
537
|
...style,
|
|
@@ -601,10 +541,7 @@ var EmailInput = ({ className, style, ...props }) => {
|
|
|
601
541
|
placeholder,
|
|
602
542
|
onChange: handleChange,
|
|
603
543
|
disabled: isDisabled || !isEditable,
|
|
604
|
-
readOnly: isReadonly
|
|
605
|
-
required: isRequired,
|
|
606
|
-
maxLength: noOfCharacters,
|
|
607
|
-
pattern: regexPattern || void 0
|
|
544
|
+
readOnly: isReadonly
|
|
608
545
|
}
|
|
609
546
|
)
|
|
610
547
|
] }),
|
|
@@ -618,35 +555,17 @@ import * as React5 from "react";
|
|
|
618
555
|
import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
619
556
|
var PasswordInput = ({ className, style, ...props }) => {
|
|
620
557
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
621
|
-
const regexPattern = props.regexPattern ?? "";
|
|
622
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
623
|
-
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
624
|
-
const isRequired = props.isRequired ?? false;
|
|
625
558
|
const isEditable = props.isEditable ?? true;
|
|
626
559
|
const isDisabled = props.isDisabled ?? false;
|
|
627
560
|
const isReadonly = props.isReadonly ?? false;
|
|
628
561
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
629
|
-
const [value, setValue] = React5.useState("");
|
|
630
562
|
const [error, setError] = React5.useState(null);
|
|
631
563
|
React5.useEffect(() => {
|
|
632
564
|
if (!props.validateOnMount) return;
|
|
633
565
|
setError(props.errorMessage || null);
|
|
634
566
|
}, [props.errorMessage, props.validateOnMount]);
|
|
635
567
|
const handleChange = (e) => {
|
|
636
|
-
|
|
637
|
-
props.onChange?.(e);
|
|
638
|
-
return;
|
|
639
|
-
}
|
|
640
|
-
const val = e.target.value;
|
|
641
|
-
if (val.length > noOfCharacters) return;
|
|
642
|
-
setValue(val);
|
|
643
|
-
if (isRequired && val.trim() === "") {
|
|
644
|
-
setError(errorMessage);
|
|
645
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
646
|
-
setError(errorMessage);
|
|
647
|
-
} else {
|
|
648
|
-
setError(null);
|
|
649
|
-
}
|
|
568
|
+
props.onChange?.(e);
|
|
650
569
|
};
|
|
651
570
|
return /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
652
571
|
/* @__PURE__ */ jsxs5("div", { className: "flex justify-start items-center relative", children: [
|
|
@@ -655,9 +574,9 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
655
574
|
Input,
|
|
656
575
|
{
|
|
657
576
|
type: "password",
|
|
658
|
-
id: "password-field",
|
|
577
|
+
id: props.name || "password-field",
|
|
659
578
|
name: props.name,
|
|
660
|
-
value: props.value
|
|
579
|
+
value: props.value,
|
|
661
580
|
className: cn(className, error ? "border-red-500" : ""),
|
|
662
581
|
style: {
|
|
663
582
|
...style,
|
|
@@ -667,10 +586,7 @@ var PasswordInput = ({ className, style, ...props }) => {
|
|
|
667
586
|
placeholder,
|
|
668
587
|
onChange: handleChange,
|
|
669
588
|
disabled: isDisabled || !isEditable,
|
|
670
|
-
readOnly: isReadonly
|
|
671
|
-
required: isRequired,
|
|
672
|
-
maxLength: noOfCharacters,
|
|
673
|
-
pattern: regexPattern || void 0
|
|
589
|
+
readOnly: isReadonly
|
|
674
590
|
}
|
|
675
591
|
)
|
|
676
592
|
] }),
|
|
@@ -702,35 +618,17 @@ function Textarea({ className, ...props }) {
|
|
|
702
618
|
import { Fragment as Fragment5, jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
703
619
|
var Textarea2 = ({ className, style, ...props }) => {
|
|
704
620
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
705
|
-
const regexPattern = props.regexPattern ?? "";
|
|
706
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
707
|
-
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
708
|
-
const isRequired = props.isRequired ?? false;
|
|
709
621
|
const isEditable = props.isEditable ?? true;
|
|
710
622
|
const isDisabled = props.isDisabled ?? false;
|
|
711
623
|
const isReadonly = props.isReadonly ?? false;
|
|
712
624
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
713
|
-
const [value, setValue] = React6.useState("");
|
|
714
625
|
const [error, setError] = React6.useState(null);
|
|
715
626
|
React6.useEffect(() => {
|
|
716
627
|
if (!props.validateOnMount) return;
|
|
717
628
|
setError(props.errorMessage || null);
|
|
718
629
|
}, [props.errorMessage, props.validateOnMount]);
|
|
719
630
|
const handleChange = (e) => {
|
|
720
|
-
|
|
721
|
-
props.onChange?.(e);
|
|
722
|
-
return;
|
|
723
|
-
}
|
|
724
|
-
const val = e.target.value;
|
|
725
|
-
if (val.length > noOfCharacters) return;
|
|
726
|
-
setValue(val);
|
|
727
|
-
if (isRequired && val.trim() === "") {
|
|
728
|
-
setError(errorMessage);
|
|
729
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
730
|
-
setError(errorMessage);
|
|
731
|
-
} else {
|
|
732
|
-
setError(null);
|
|
733
|
-
}
|
|
631
|
+
props.onChange?.(e);
|
|
734
632
|
};
|
|
735
633
|
return /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
736
634
|
/* @__PURE__ */ jsx15(
|
|
@@ -738,7 +636,7 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
738
636
|
{
|
|
739
637
|
id: "textarea-field",
|
|
740
638
|
name: props.name,
|
|
741
|
-
value: props.value
|
|
639
|
+
value: props.value,
|
|
742
640
|
className: cn(className, error ? "border-red-500" : ""),
|
|
743
641
|
style: {
|
|
744
642
|
...style,
|
|
@@ -748,9 +646,7 @@ var Textarea2 = ({ className, style, ...props }) => {
|
|
|
748
646
|
placeholder,
|
|
749
647
|
onChange: handleChange,
|
|
750
648
|
disabled: isDisabled || !isEditable,
|
|
751
|
-
readOnly: isReadonly
|
|
752
|
-
required: isRequired,
|
|
753
|
-
maxLength: noOfCharacters
|
|
649
|
+
readOnly: isReadonly
|
|
754
650
|
}
|
|
755
651
|
),
|
|
756
652
|
error && /* @__PURE__ */ jsx15("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
@@ -763,35 +659,17 @@ import * as React7 from "react";
|
|
|
763
659
|
import { Fragment as Fragment6, jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
764
660
|
var UrlInput = ({ className, style, ...props }) => {
|
|
765
661
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
766
|
-
const regexPattern = props.regexPattern ?? "";
|
|
767
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
768
|
-
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
769
|
-
const isRequired = props.isRequired ?? false;
|
|
770
662
|
const isEditable = props.isEditable ?? true;
|
|
771
663
|
const isDisabled = props.isDisabled ?? false;
|
|
772
664
|
const isReadonly = props.isReadonly ?? false;
|
|
773
665
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
774
|
-
const [value, setValue] = React7.useState("");
|
|
775
666
|
const [error, setError] = React7.useState(null);
|
|
776
667
|
React7.useEffect(() => {
|
|
777
668
|
if (!props.validateOnMount) return;
|
|
778
669
|
setError(props.errorMessage || null);
|
|
779
670
|
}, [props.errorMessage, props.validateOnMount]);
|
|
780
671
|
const handleChange = (e) => {
|
|
781
|
-
|
|
782
|
-
props.onChange?.(e);
|
|
783
|
-
return;
|
|
784
|
-
}
|
|
785
|
-
const val = e.target.value;
|
|
786
|
-
if (val.length > noOfCharacters) return;
|
|
787
|
-
setValue(val);
|
|
788
|
-
if (isRequired && val.trim() === "") {
|
|
789
|
-
setError(errorMessage);
|
|
790
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
791
|
-
setError(errorMessage);
|
|
792
|
-
} else {
|
|
793
|
-
setError(null);
|
|
794
|
-
}
|
|
672
|
+
props.onChange?.(e);
|
|
795
673
|
};
|
|
796
674
|
return /* @__PURE__ */ jsxs7(Fragment6, { children: [
|
|
797
675
|
/* @__PURE__ */ jsxs7("div", { className: "flex justify-start items-center relative", children: [
|
|
@@ -802,7 +680,7 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
802
680
|
id: "url-field",
|
|
803
681
|
type: "url",
|
|
804
682
|
name: props.name,
|
|
805
|
-
value: props.value
|
|
683
|
+
value: props.value,
|
|
806
684
|
className: cn(className, error ? "border-red-500" : ""),
|
|
807
685
|
style: {
|
|
808
686
|
...style,
|
|
@@ -812,10 +690,7 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
812
690
|
placeholder,
|
|
813
691
|
onChange: handleChange,
|
|
814
692
|
disabled: isDisabled || !isEditable,
|
|
815
|
-
readOnly: isReadonly
|
|
816
|
-
required: isRequired,
|
|
817
|
-
maxLength: noOfCharacters,
|
|
818
|
-
pattern: regexPattern || void 0
|
|
693
|
+
readOnly: isReadonly
|
|
819
694
|
}
|
|
820
695
|
)
|
|
821
696
|
] }),
|
|
@@ -824,6 +699,9 @@ var UrlInput = ({ className, style, ...props }) => {
|
|
|
824
699
|
};
|
|
825
700
|
var UrlInput_default = UrlInput;
|
|
826
701
|
|
|
702
|
+
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
703
|
+
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
704
|
+
|
|
827
705
|
// src/components/ui/checkbox.tsx
|
|
828
706
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
829
707
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
@@ -873,16 +751,40 @@ function Label({
|
|
|
873
751
|
}
|
|
874
752
|
|
|
875
753
|
// src/components/Inputs/Checkbox/Checkbox.tsx
|
|
876
|
-
import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
754
|
+
import { Fragment as Fragment7, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
877
755
|
var CheckboxInput = ({ className, style, ...props }) => {
|
|
756
|
+
const isEditable = props.isEditable ?? true;
|
|
757
|
+
const isDisabled = props.isDisabled ?? false;
|
|
878
758
|
const text = props.text ? props.text : "Subscribe";
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
759
|
+
const [error, setError] = useState7(null);
|
|
760
|
+
useEffect7(() => {
|
|
761
|
+
if (!props.validateOnMount) return;
|
|
762
|
+
setError(props.errorMessage || null);
|
|
763
|
+
}, [props.errorMessage, props.validateOnMount]);
|
|
764
|
+
const handleChange = (value) => {
|
|
765
|
+
props.onChange?.(value);
|
|
766
|
+
};
|
|
767
|
+
return /* @__PURE__ */ jsxs8(Fragment7, { children: [
|
|
768
|
+
/* @__PURE__ */ jsx19("div", { className, style, children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center space-x-2", children: [
|
|
769
|
+
/* @__PURE__ */ jsx19(
|
|
770
|
+
Checkbox,
|
|
771
|
+
{
|
|
772
|
+
id: props.name || "checkbox",
|
|
773
|
+
checked: !!props.value,
|
|
774
|
+
onCheckedChange: handleChange,
|
|
775
|
+
disabled: !isEditable || isDisabled
|
|
776
|
+
}
|
|
777
|
+
),
|
|
778
|
+
/* @__PURE__ */ jsx19(Label, { htmlFor: props.name || "checkbox", children: text })
|
|
779
|
+
] }) }),
|
|
780
|
+
error && /* @__PURE__ */ jsx19("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
781
|
+
] });
|
|
883
782
|
};
|
|
884
783
|
var Checkbox_default = CheckboxInput;
|
|
885
784
|
|
|
785
|
+
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
786
|
+
import { useEffect as useEffect8, useState as useState8 } from "react";
|
|
787
|
+
|
|
886
788
|
// src/components/ui/radio-group.tsx
|
|
887
789
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
888
790
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
@@ -925,37 +827,106 @@ function RadioGroupItem({
|
|
|
925
827
|
}
|
|
926
828
|
|
|
927
829
|
// src/components/Inputs/RadioInput/RadioInput.tsx
|
|
928
|
-
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
929
|
-
var RadioInput = ({
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
830
|
+
import { Fragment as Fragment8, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
831
|
+
var RadioInput = ({
|
|
832
|
+
className,
|
|
833
|
+
style,
|
|
834
|
+
defaultValue,
|
|
835
|
+
onChange,
|
|
836
|
+
data = [],
|
|
837
|
+
dataKey,
|
|
838
|
+
dataLabel,
|
|
839
|
+
...props
|
|
840
|
+
}) => {
|
|
841
|
+
const [error, setError] = useState8(null);
|
|
842
|
+
useEffect8(() => {
|
|
843
|
+
if (!props.validateOnMount) return;
|
|
844
|
+
setError(props.errorMessage || null);
|
|
845
|
+
}, [props.errorMessage, props.validateOnMount]);
|
|
846
|
+
const options = (data || []).map((item) => ({
|
|
847
|
+
value: item[dataKey || "value"],
|
|
848
|
+
label: item[dataLabel || "label"]
|
|
934
849
|
}));
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
850
|
+
const handleChange = (value) => {
|
|
851
|
+
onChange?.(value);
|
|
852
|
+
};
|
|
853
|
+
const resolvedDefaultValue = (typeof defaultValue === "string" ? defaultValue : void 0) ?? options[0]?.value;
|
|
854
|
+
return /* @__PURE__ */ jsxs9(Fragment8, { children: [
|
|
855
|
+
/* @__PURE__ */ jsx21("div", { className, style, children: /* @__PURE__ */ jsxs9(
|
|
856
|
+
RadioGroup,
|
|
857
|
+
{
|
|
858
|
+
defaultValue: resolvedDefaultValue,
|
|
859
|
+
onValueChange: handleChange,
|
|
860
|
+
children: [
|
|
861
|
+
options.length === 0 && /* @__PURE__ */ jsx21("div", { className: "text-sm text-gray-500", children: "No options available" }),
|
|
862
|
+
options.map((item) => /* @__PURE__ */ jsxs9("div", { className: "flex items-center space-x-2", children: [
|
|
863
|
+
/* @__PURE__ */ jsx21(RadioGroupItem, { value: item.value, id: `radio-${item.value}` }),
|
|
864
|
+
/* @__PURE__ */ jsx21(Label, { htmlFor: `radio-${item.value}`, children: item.label })
|
|
865
|
+
] }, item.value))
|
|
866
|
+
]
|
|
867
|
+
}
|
|
868
|
+
) }),
|
|
869
|
+
error && /* @__PURE__ */ jsx21("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
870
|
+
] });
|
|
939
871
|
};
|
|
940
872
|
var RadioInput_default = RadioInput;
|
|
941
873
|
|
|
942
874
|
// src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
|
|
875
|
+
import { useCallback, useState as useState9 } from "react";
|
|
943
876
|
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
944
|
-
var MultiCheckbox = ({
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
877
|
+
var MultiCheckbox = ({
|
|
878
|
+
className,
|
|
879
|
+
style,
|
|
880
|
+
data = [],
|
|
881
|
+
dataKey = "value",
|
|
882
|
+
dataLabel = "label",
|
|
883
|
+
value: propValue = {},
|
|
884
|
+
onChange,
|
|
885
|
+
isEditable = true,
|
|
886
|
+
isDisabled = false
|
|
887
|
+
}) => {
|
|
888
|
+
const [value, setValue] = useState9(propValue);
|
|
889
|
+
const options = (data || []).map((item) => ({
|
|
890
|
+
value: item[dataKey || "value"],
|
|
891
|
+
label: item[dataLabel || "label"]
|
|
949
892
|
}));
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
893
|
+
const handleChange = useCallback(
|
|
894
|
+
(key, checked) => {
|
|
895
|
+
setValue((prev) => {
|
|
896
|
+
const newValue = { ...prev, [key]: checked };
|
|
897
|
+
onChange?.(newValue);
|
|
898
|
+
return newValue;
|
|
899
|
+
});
|
|
900
|
+
},
|
|
901
|
+
[onChange]
|
|
902
|
+
);
|
|
903
|
+
return /* @__PURE__ */ jsxs10(
|
|
904
|
+
"div",
|
|
905
|
+
{
|
|
906
|
+
className: cn("flex flex-col gap-3", className),
|
|
907
|
+
style,
|
|
908
|
+
children: [
|
|
909
|
+
options.length === 0 && /* @__PURE__ */ jsx22("p", { className: "text-sm text-gray-500", children: "No options available." }),
|
|
910
|
+
options.map((opt) => /* @__PURE__ */ jsxs10("div", { className: "flex items-center space-x-2", children: [
|
|
911
|
+
/* @__PURE__ */ jsx22(
|
|
912
|
+
Checkbox,
|
|
913
|
+
{
|
|
914
|
+
id: opt.value,
|
|
915
|
+
checked: !!value[opt.value],
|
|
916
|
+
onCheckedChange: (checked) => handleChange(opt.value, checked === true),
|
|
917
|
+
disabled: !isEditable || isDisabled
|
|
918
|
+
}
|
|
919
|
+
),
|
|
920
|
+
/* @__PURE__ */ jsx22(Label, { htmlFor: opt.value, children: opt.label })
|
|
921
|
+
] }, opt.value))
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
);
|
|
954
925
|
};
|
|
955
926
|
var MultiCheckbox_default = MultiCheckbox;
|
|
956
927
|
|
|
957
928
|
// src/components/Inputs/RichText/RichText.tsx
|
|
958
|
-
import { useEffect as
|
|
929
|
+
import { useEffect as useEffect9, useState as useState10 } from "react";
|
|
959
930
|
|
|
960
931
|
// src/components/Global/TinyMceEditor.tsx
|
|
961
932
|
import { useMemo, useRef } from "react";
|
|
@@ -1031,8 +1002,8 @@ function MyEditor({
|
|
|
1031
1002
|
// src/components/Inputs/RichText/RichText.tsx
|
|
1032
1003
|
import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1033
1004
|
function RichText({ className, style, ...props }) {
|
|
1034
|
-
const [error, setError] =
|
|
1035
|
-
|
|
1005
|
+
const [error, setError] = useState10(null);
|
|
1006
|
+
useEffect9(() => {
|
|
1036
1007
|
if (!props.validateOnMount) return;
|
|
1037
1008
|
setError(props.errorMessage || null);
|
|
1038
1009
|
}, [props.errorMessage, props.validateOnMount]);
|
|
@@ -1181,106 +1152,61 @@ function SelectScrollDownButton({
|
|
|
1181
1152
|
);
|
|
1182
1153
|
}
|
|
1183
1154
|
|
|
1184
|
-
// src/components/Global/SelectDropdown.tsx
|
|
1185
|
-
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1186
|
-
function SelectDropdown({
|
|
1187
|
-
options,
|
|
1188
|
-
placeholder = "Select an option",
|
|
1189
|
-
value,
|
|
1190
|
-
onChange,
|
|
1191
|
-
className,
|
|
1192
|
-
id,
|
|
1193
|
-
disabled,
|
|
1194
|
-
readOnly,
|
|
1195
|
-
style,
|
|
1196
|
-
name
|
|
1197
|
-
}) {
|
|
1198
|
-
return /* @__PURE__ */ jsxs13(Select, { name, value, onValueChange: onChange, disabled, children: [
|
|
1199
|
-
/* @__PURE__ */ jsx26(
|
|
1200
|
-
SelectTrigger,
|
|
1201
|
-
{
|
|
1202
|
-
id,
|
|
1203
|
-
className,
|
|
1204
|
-
style: style ?? {},
|
|
1205
|
-
"aria-readonly": readOnly,
|
|
1206
|
-
children: /* @__PURE__ */ jsx26(SelectValue, { placeholder })
|
|
1207
|
-
}
|
|
1208
|
-
),
|
|
1209
|
-
/* @__PURE__ */ jsx26(SelectContent, { children: options.map((opt) => /* @__PURE__ */ jsx26(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1210
|
-
] });
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
1155
|
// src/components/Inputs/Dropdown/Dropdown.tsx
|
|
1214
|
-
import { Fragment as
|
|
1156
|
+
import { Fragment as Fragment9, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1215
1157
|
var Dropdown = ({ className, style, ...props }) => {
|
|
1216
|
-
const
|
|
1158
|
+
const list = props.data || [];
|
|
1217
1159
|
const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
|
|
1218
|
-
const formatList = text.filter((i) => i.value && i.label).map((item) => ({
|
|
1219
|
-
label: item.label,
|
|
1220
|
-
value: item.value
|
|
1221
|
-
}));
|
|
1222
|
-
const regexPattern = props.regexPattern ?? "";
|
|
1223
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
1224
|
-
const isRequired = props.isRequired ?? false;
|
|
1225
1160
|
const isEditable = props.isEditable ?? true;
|
|
1226
1161
|
const isDisabled = props.isDisabled ?? false;
|
|
1227
1162
|
const isReadonly = props.isReadonly ?? false;
|
|
1228
|
-
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1229
|
-
const [value, setValue] = React8.useState("");
|
|
1230
1163
|
const [error, setError] = React8.useState(null);
|
|
1231
1164
|
React8.useEffect(() => {
|
|
1232
1165
|
if (!props.validateOnMount) return;
|
|
1233
1166
|
setError(props.errorMessage || null);
|
|
1234
1167
|
}, [props.errorMessage, props.validateOnMount]);
|
|
1235
|
-
const handleChange = (
|
|
1236
|
-
|
|
1237
|
-
props.onChange?.(val);
|
|
1238
|
-
return;
|
|
1239
|
-
}
|
|
1240
|
-
setValue(val);
|
|
1241
|
-
if (isRequired && val.trim() === "") {
|
|
1242
|
-
setError(errorMessage);
|
|
1243
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
1244
|
-
setError(errorMessage);
|
|
1245
|
-
} else {
|
|
1246
|
-
setError(null);
|
|
1247
|
-
}
|
|
1168
|
+
const handleChange = (value) => {
|
|
1169
|
+
props.onChange?.(value);
|
|
1248
1170
|
};
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1171
|
+
const dataKey = props.dataKey || "value";
|
|
1172
|
+
const dataLabel = props.dataLabel || "label";
|
|
1173
|
+
const options = list.map((item) => ({
|
|
1174
|
+
value: item[dataKey],
|
|
1175
|
+
label: item[dataLabel]
|
|
1176
|
+
}));
|
|
1177
|
+
return /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
1178
|
+
/* @__PURE__ */ jsxs13(Select, { name: props.name, value: props.value, onValueChange: handleChange, disabled: isDisabled || !isEditable, children: [
|
|
1179
|
+
/* @__PURE__ */ jsx26(
|
|
1180
|
+
SelectTrigger,
|
|
1181
|
+
{
|
|
1182
|
+
id: props.name || "select-field",
|
|
1183
|
+
className: cn(className, error ? "border-red-500" : ""),
|
|
1184
|
+
style: {
|
|
1185
|
+
...style,
|
|
1186
|
+
borderColor: error ? "#f87171" : style?.borderColor
|
|
1187
|
+
},
|
|
1188
|
+
"aria-readonly": isReadonly,
|
|
1189
|
+
children: /* @__PURE__ */ jsx26(SelectValue, { placeholder })
|
|
1190
|
+
}
|
|
1191
|
+
),
|
|
1192
|
+
/* @__PURE__ */ jsx26(SelectContent, { children: options.map((opt) => /* @__PURE__ */ jsx26(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1193
|
+
] }),
|
|
1194
|
+
error && /* @__PURE__ */ jsx26("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1272
1195
|
] });
|
|
1273
1196
|
};
|
|
1274
1197
|
var Dropdown_default = Dropdown;
|
|
1275
1198
|
|
|
1199
|
+
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
1200
|
+
import { useEffect as useEffect11, useState as useState12 } from "react";
|
|
1201
|
+
|
|
1276
1202
|
// src/components/ui/switch.tsx
|
|
1277
1203
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
1278
|
-
import { jsx as
|
|
1204
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1279
1205
|
function Switch({
|
|
1280
1206
|
className,
|
|
1281
1207
|
...props
|
|
1282
1208
|
}) {
|
|
1283
|
-
return /* @__PURE__ */
|
|
1209
|
+
return /* @__PURE__ */ jsx27(
|
|
1284
1210
|
SwitchPrimitive.Root,
|
|
1285
1211
|
{
|
|
1286
1212
|
"data-slot": "switch",
|
|
@@ -1289,7 +1215,7 @@ function Switch({
|
|
|
1289
1215
|
className
|
|
1290
1216
|
),
|
|
1291
1217
|
...props,
|
|
1292
|
-
children: /* @__PURE__ */
|
|
1218
|
+
children: /* @__PURE__ */ jsx27(
|
|
1293
1219
|
SwitchPrimitive.Thumb,
|
|
1294
1220
|
{
|
|
1295
1221
|
"data-slot": "switch-thumb",
|
|
@@ -1303,13 +1229,33 @@ function Switch({
|
|
|
1303
1229
|
}
|
|
1304
1230
|
|
|
1305
1231
|
// src/components/Inputs/SwitchToggle/SwitchToggle.tsx
|
|
1306
|
-
import { jsx as
|
|
1232
|
+
import { Fragment as Fragment10, jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1307
1233
|
var SwitchToggle = ({ className, style, ...props }) => {
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1234
|
+
const isEditable = props.isEditable ?? true;
|
|
1235
|
+
const isDisabled = props.isDisabled ?? false;
|
|
1236
|
+
const [error, setError] = useState12(null);
|
|
1237
|
+
useEffect11(() => {
|
|
1238
|
+
if (!props.validateOnMount) return;
|
|
1239
|
+
setError(props.errorMessage || null);
|
|
1240
|
+
}, [props.errorMessage, props.validateOnMount]);
|
|
1241
|
+
const handleChange = (value) => {
|
|
1242
|
+
props.onChange?.(value);
|
|
1243
|
+
};
|
|
1244
|
+
return /* @__PURE__ */ jsxs14(Fragment10, { children: [
|
|
1245
|
+
/* @__PURE__ */ jsx28("div", { className, style, children: /* @__PURE__ */ jsxs14("div", { className: "flex items-center space-x-2 mb-2", children: [
|
|
1246
|
+
/* @__PURE__ */ jsx28(
|
|
1247
|
+
Switch,
|
|
1248
|
+
{
|
|
1249
|
+
id: props.name || "switch",
|
|
1250
|
+
checked: !!props.value,
|
|
1251
|
+
onCheckedChange: handleChange,
|
|
1252
|
+
disabled: isDisabled || !isEditable
|
|
1253
|
+
}
|
|
1254
|
+
),
|
|
1255
|
+
/* @__PURE__ */ jsx28(Label, { htmlFor: props.name || "switch", children: props.text })
|
|
1256
|
+
] }) }),
|
|
1257
|
+
error && /* @__PURE__ */ jsx28("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1258
|
+
] });
|
|
1313
1259
|
};
|
|
1314
1260
|
var SwitchToggle_default = SwitchToggle;
|
|
1315
1261
|
|
|
@@ -1317,14 +1263,9 @@ var SwitchToggle_default = SwitchToggle;
|
|
|
1317
1263
|
import * as React9 from "react";
|
|
1318
1264
|
import { PhoneInput as PhoneInputField } from "react-international-phone";
|
|
1319
1265
|
import "react-international-phone/style.css";
|
|
1320
|
-
import { Fragment as
|
|
1266
|
+
import { Fragment as Fragment11, jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1321
1267
|
var PhoneInput = ({ className, style, ...props }) => {
|
|
1322
1268
|
const placeholder = props.placeholder ?? "Enter phone number";
|
|
1323
|
-
const [value, setValue] = React9.useState("");
|
|
1324
|
-
const regexPattern = props.regexPattern ?? "";
|
|
1325
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
1326
|
-
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
1327
|
-
const isRequired = props.isRequired ?? false;
|
|
1328
1269
|
const isEditable = props.isEditable ?? true;
|
|
1329
1270
|
const isDisabled = props.isDisabled ?? false;
|
|
1330
1271
|
const [error, setError] = React9.useState(null);
|
|
@@ -1333,27 +1274,15 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
1333
1274
|
setError(props.errorMessage || null);
|
|
1334
1275
|
}, [props.errorMessage, props.validateOnMount]);
|
|
1335
1276
|
const handleChange = (val) => {
|
|
1336
|
-
|
|
1337
|
-
props.onChange?.(val);
|
|
1338
|
-
return;
|
|
1339
|
-
}
|
|
1340
|
-
if (val.length > noOfCharacters) return;
|
|
1341
|
-
setValue(val);
|
|
1342
|
-
if (isRequired && val.trim() === "") {
|
|
1343
|
-
setError(errorMessage);
|
|
1344
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
1345
|
-
setError(errorMessage);
|
|
1346
|
-
} else {
|
|
1347
|
-
setError(null);
|
|
1348
|
-
}
|
|
1277
|
+
props.onChange?.(val);
|
|
1349
1278
|
};
|
|
1350
|
-
return /* @__PURE__ */
|
|
1351
|
-
/* @__PURE__ */
|
|
1279
|
+
return /* @__PURE__ */ jsxs15(Fragment11, { children: [
|
|
1280
|
+
/* @__PURE__ */ jsx29(
|
|
1352
1281
|
PhoneInputField,
|
|
1353
1282
|
{
|
|
1354
1283
|
defaultCountry: "in",
|
|
1355
1284
|
name: props.name,
|
|
1356
|
-
value: props.value
|
|
1285
|
+
value: props.value,
|
|
1357
1286
|
className: cn(className, error ? "border-red-500" : ""),
|
|
1358
1287
|
style: {
|
|
1359
1288
|
...style,
|
|
@@ -1361,64 +1290,44 @@ var PhoneInput = ({ className, style, ...props }) => {
|
|
|
1361
1290
|
},
|
|
1362
1291
|
onChange: (phone) => handleChange(phone),
|
|
1363
1292
|
inputProps: {
|
|
1364
|
-
id: "phone-field"
|
|
1365
|
-
required: isRequired
|
|
1293
|
+
id: "phone-field"
|
|
1366
1294
|
},
|
|
1367
1295
|
placeholder,
|
|
1368
|
-
disabled: isDisabled || !isEditable
|
|
1369
|
-
required: isRequired
|
|
1296
|
+
disabled: isDisabled || !isEditable
|
|
1370
1297
|
}
|
|
1371
1298
|
),
|
|
1372
|
-
error && /* @__PURE__ */
|
|
1299
|
+
error && /* @__PURE__ */ jsx29("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1373
1300
|
] });
|
|
1374
1301
|
};
|
|
1375
1302
|
var PhoneInput_default = PhoneInput;
|
|
1376
1303
|
|
|
1377
1304
|
// src/components/Inputs/SearchInput/SearchInput.tsx
|
|
1378
1305
|
import * as React10 from "react";
|
|
1379
|
-
import { Fragment as
|
|
1306
|
+
import { Fragment as Fragment12, jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1380
1307
|
var SearchInput = ({ className, style, ...props }) => {
|
|
1381
1308
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1382
|
-
const regexPattern = props.regexPattern ?? "";
|
|
1383
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
1384
|
-
const noOfCharacters = props.noOfCharacters ?? 100;
|
|
1385
|
-
const isRequired = props.isRequired ?? false;
|
|
1386
1309
|
const isEditable = props.isEditable ?? true;
|
|
1387
1310
|
const isDisabled = props.isDisabled ?? false;
|
|
1388
1311
|
const isReadonly = props.isReadonly ?? false;
|
|
1389
1312
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1390
|
-
const [value, setValue] = React10.useState("");
|
|
1391
1313
|
const [error, setError] = React10.useState(null);
|
|
1392
1314
|
React10.useEffect(() => {
|
|
1393
1315
|
if (!props.validateOnMount) return;
|
|
1394
1316
|
setError(props.errorMessage || null);
|
|
1395
1317
|
}, [props.errorMessage, props.validateOnMount]);
|
|
1396
1318
|
const handleChange = (e) => {
|
|
1397
|
-
|
|
1398
|
-
props.onChange?.(e);
|
|
1399
|
-
return;
|
|
1400
|
-
}
|
|
1401
|
-
const val = e.target.value;
|
|
1402
|
-
if (val.length > noOfCharacters) return;
|
|
1403
|
-
setValue(val);
|
|
1404
|
-
if (isRequired && val.trim() === "") {
|
|
1405
|
-
setError(errorMessage);
|
|
1406
|
-
} else if (regexPattern && !new RegExp(regexPattern).test(val)) {
|
|
1407
|
-
setError(errorMessage);
|
|
1408
|
-
} else {
|
|
1409
|
-
setError(null);
|
|
1410
|
-
}
|
|
1319
|
+
props.onChange?.(e);
|
|
1411
1320
|
};
|
|
1412
|
-
return /* @__PURE__ */
|
|
1413
|
-
/* @__PURE__ */
|
|
1414
|
-
/* @__PURE__ */
|
|
1415
|
-
/* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ jsxs16(Fragment12, { children: [
|
|
1322
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex justify-start items-center relative", children: [
|
|
1323
|
+
/* @__PURE__ */ jsx30(Search, { className: "left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1324
|
+
/* @__PURE__ */ jsx30(
|
|
1416
1325
|
Input,
|
|
1417
1326
|
{
|
|
1418
1327
|
type: "text",
|
|
1419
|
-
id: "text-field",
|
|
1328
|
+
id: props.name || "text-field",
|
|
1420
1329
|
name: props.name,
|
|
1421
|
-
value: props.value
|
|
1330
|
+
value: props.value,
|
|
1422
1331
|
className: cn(className, error ? "border-red-500" : ""),
|
|
1423
1332
|
style: {
|
|
1424
1333
|
...style,
|
|
@@ -1428,30 +1337,27 @@ var SearchInput = ({ className, style, ...props }) => {
|
|
|
1428
1337
|
placeholder,
|
|
1429
1338
|
onChange: handleChange,
|
|
1430
1339
|
disabled: isDisabled || !isEditable,
|
|
1431
|
-
readOnly: isReadonly
|
|
1432
|
-
required: isRequired,
|
|
1433
|
-
maxLength: noOfCharacters,
|
|
1434
|
-
pattern: regexPattern || void 0
|
|
1340
|
+
readOnly: isReadonly
|
|
1435
1341
|
}
|
|
1436
1342
|
)
|
|
1437
1343
|
] }),
|
|
1438
|
-
error && /* @__PURE__ */
|
|
1344
|
+
error && /* @__PURE__ */ jsx30("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1439
1345
|
] });
|
|
1440
1346
|
};
|
|
1441
1347
|
var SearchInput_default = SearchInput;
|
|
1442
1348
|
|
|
1443
1349
|
// src/components/Inputs/FileInput/FileInput.tsx
|
|
1444
|
-
import { useEffect as
|
|
1445
|
-
import { jsx as
|
|
1350
|
+
import { useEffect as useEffect14, useState as useState15 } from "react";
|
|
1351
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1446
1352
|
var FileInput = ({ className, style, ...props }) => {
|
|
1447
1353
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1448
|
-
const [error, setError] =
|
|
1449
|
-
|
|
1354
|
+
const [error, setError] = useState15(null);
|
|
1355
|
+
useEffect14(() => {
|
|
1450
1356
|
if (!props.validateOnMount) return;
|
|
1451
1357
|
setError(props.errorMessage || null);
|
|
1452
1358
|
}, [props.errorMessage, props.validateOnMount]);
|
|
1453
|
-
return /* @__PURE__ */
|
|
1454
|
-
/* @__PURE__ */
|
|
1359
|
+
return /* @__PURE__ */ jsxs17("div", { className: "d-flex items-center relative align-middle", children: [
|
|
1360
|
+
/* @__PURE__ */ jsx31(
|
|
1455
1361
|
Input,
|
|
1456
1362
|
{
|
|
1457
1363
|
type: "file",
|
|
@@ -1466,34 +1372,28 @@ var FileInput = ({ className, style, ...props }) => {
|
|
|
1466
1372
|
autoComplete: "off",
|
|
1467
1373
|
placeholder,
|
|
1468
1374
|
onChange: (e) => {
|
|
1469
|
-
|
|
1470
|
-
props.onChange?.(e);
|
|
1471
|
-
return;
|
|
1472
|
-
}
|
|
1375
|
+
props.onChange?.(e);
|
|
1473
1376
|
}
|
|
1474
1377
|
}
|
|
1475
1378
|
),
|
|
1476
|
-
error && /* @__PURE__ */
|
|
1379
|
+
error && /* @__PURE__ */ jsx31("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1477
1380
|
] });
|
|
1478
1381
|
};
|
|
1479
1382
|
var FileInput_default = FileInput;
|
|
1480
1383
|
|
|
1481
1384
|
// src/components/Inputs/DatePicker/DatePicker.tsx
|
|
1482
|
-
import React11, { useEffect as
|
|
1483
|
-
import { Fragment as
|
|
1385
|
+
import React11, { useEffect as useEffect15 } from "react";
|
|
1386
|
+
import { Fragment as Fragment13, jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1484
1387
|
function DatePicker({ className, style, ...props }) {
|
|
1485
1388
|
const placeholder = props.placeholder ?? "Placeholder text";
|
|
1486
1389
|
const minimumDate = props.minimumDate ?? "none";
|
|
1487
1390
|
const customMinimumDate = props.customMinimumDate ?? "";
|
|
1488
1391
|
const maximumDate = props.maximumDate ?? "none";
|
|
1489
1392
|
const customMaximumDate = props.customMaximumDate ?? "";
|
|
1490
|
-
const errorMessage = props.errorMessage ?? "Required";
|
|
1491
|
-
const isRequired = props.isRequired ?? false;
|
|
1492
1393
|
const isEditable = props.isEditable ?? true;
|
|
1493
1394
|
const isDisabled = props.isDisabled ?? false;
|
|
1494
1395
|
const isReadonly = props.isReadonly ?? false;
|
|
1495
1396
|
const isAutocomplete = props.isAutocomplete ?? false;
|
|
1496
|
-
const [value, setValue] = React11.useState("");
|
|
1497
1397
|
const [error, setError] = React11.useState(null);
|
|
1498
1398
|
const resolveDate = (option, customOption) => {
|
|
1499
1399
|
if (!option) return void 0;
|
|
@@ -1509,27 +1409,17 @@ function DatePicker({ className, style, ...props }) {
|
|
|
1509
1409
|
};
|
|
1510
1410
|
const minDate = resolveDate(minimumDate, customMinimumDate);
|
|
1511
1411
|
const maxDate = resolveDate(maximumDate, customMaximumDate);
|
|
1512
|
-
|
|
1412
|
+
useEffect15(() => {
|
|
1513
1413
|
if (!props.validateOnMount) return;
|
|
1514
1414
|
setError(props.errorMessage || null);
|
|
1515
1415
|
}, [props.errorMessage, props.validateOnMount]);
|
|
1516
1416
|
const handleChange = (e) => {
|
|
1517
|
-
|
|
1518
|
-
props.onChange?.(e);
|
|
1519
|
-
return;
|
|
1520
|
-
}
|
|
1521
|
-
const val = e.target.value;
|
|
1522
|
-
setValue(val);
|
|
1523
|
-
if (isRequired && val.trim() === "") {
|
|
1524
|
-
setError(errorMessage);
|
|
1525
|
-
} else {
|
|
1526
|
-
setError(null);
|
|
1527
|
-
}
|
|
1417
|
+
props.onChange?.(e);
|
|
1528
1418
|
};
|
|
1529
|
-
return /* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */
|
|
1531
|
-
/* @__PURE__ */
|
|
1532
|
-
/* @__PURE__ */
|
|
1419
|
+
return /* @__PURE__ */ jsxs18(Fragment13, { children: [
|
|
1420
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex justify-start items-center relative", children: [
|
|
1421
|
+
/* @__PURE__ */ jsx32(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
|
|
1422
|
+
/* @__PURE__ */ jsx32(
|
|
1533
1423
|
Input,
|
|
1534
1424
|
{
|
|
1535
1425
|
type: "date",
|
|
@@ -1538,21 +1428,24 @@ function DatePicker({ className, style, ...props }) {
|
|
|
1538
1428
|
onChange: handleChange,
|
|
1539
1429
|
disabled: isDisabled || !isEditable,
|
|
1540
1430
|
name: props.name,
|
|
1541
|
-
value: props.value
|
|
1542
|
-
className: cn(
|
|
1431
|
+
value: props.value,
|
|
1432
|
+
className: cn(
|
|
1433
|
+
className,
|
|
1434
|
+
error ? "border-red-500" : "",
|
|
1435
|
+
"appearance-auto"
|
|
1436
|
+
),
|
|
1543
1437
|
style: {
|
|
1544
1438
|
...style,
|
|
1545
1439
|
borderColor: error ? "#f87171" : style?.borderColor
|
|
1546
1440
|
},
|
|
1547
1441
|
readOnly: isReadonly,
|
|
1548
|
-
required: isRequired,
|
|
1549
1442
|
placeholder,
|
|
1550
1443
|
min: minDate,
|
|
1551
1444
|
max: maxDate
|
|
1552
1445
|
}
|
|
1553
1446
|
)
|
|
1554
1447
|
] }),
|
|
1555
|
-
error && /* @__PURE__ */
|
|
1448
|
+
error && /* @__PURE__ */ jsx32("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1556
1449
|
] });
|
|
1557
1450
|
}
|
|
1558
1451
|
|
|
@@ -1563,7 +1456,7 @@ import { addDays, format } from "date-fns";
|
|
|
1563
1456
|
// src/components/ui/calendar.tsx
|
|
1564
1457
|
import * as React12 from "react";
|
|
1565
1458
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
1566
|
-
import { jsx as
|
|
1459
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1567
1460
|
function Calendar2({
|
|
1568
1461
|
className,
|
|
1569
1462
|
classNames,
|
|
@@ -1575,7 +1468,7 @@ function Calendar2({
|
|
|
1575
1468
|
...props
|
|
1576
1469
|
}) {
|
|
1577
1470
|
const defaultClassNames = getDefaultClassNames();
|
|
1578
|
-
return /* @__PURE__ */
|
|
1471
|
+
return /* @__PURE__ */ jsx33(
|
|
1579
1472
|
DayPicker,
|
|
1580
1473
|
{
|
|
1581
1474
|
showOutsideDays,
|
|
@@ -1674,7 +1567,7 @@ function Calendar2({
|
|
|
1674
1567
|
},
|
|
1675
1568
|
components: {
|
|
1676
1569
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
1677
|
-
return /* @__PURE__ */
|
|
1570
|
+
return /* @__PURE__ */ jsx33(
|
|
1678
1571
|
"div",
|
|
1679
1572
|
{
|
|
1680
1573
|
"data-slot": "calendar",
|
|
@@ -1686,10 +1579,10 @@ function Calendar2({
|
|
|
1686
1579
|
},
|
|
1687
1580
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
1688
1581
|
if (orientation === "left") {
|
|
1689
|
-
return /* @__PURE__ */
|
|
1582
|
+
return /* @__PURE__ */ jsx33(ChevronLeft, { className: cn("size-4", className2), ...props2 });
|
|
1690
1583
|
}
|
|
1691
1584
|
if (orientation === "right") {
|
|
1692
|
-
return /* @__PURE__ */
|
|
1585
|
+
return /* @__PURE__ */ jsx33(
|
|
1693
1586
|
ChevronRight,
|
|
1694
1587
|
{
|
|
1695
1588
|
className: cn("size-4", className2),
|
|
@@ -1697,11 +1590,11 @@ function Calendar2({
|
|
|
1697
1590
|
}
|
|
1698
1591
|
);
|
|
1699
1592
|
}
|
|
1700
|
-
return /* @__PURE__ */
|
|
1593
|
+
return /* @__PURE__ */ jsx33(ChevronDown, { className: cn("size-4", className2), ...props2 });
|
|
1701
1594
|
},
|
|
1702
1595
|
DayButton: CalendarDayButton,
|
|
1703
1596
|
WeekNumber: ({ children, ...props2 }) => {
|
|
1704
|
-
return /* @__PURE__ */
|
|
1597
|
+
return /* @__PURE__ */ jsx33("td", { ...props2, children: /* @__PURE__ */ jsx33("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
1705
1598
|
},
|
|
1706
1599
|
...components
|
|
1707
1600
|
},
|
|
@@ -1720,7 +1613,7 @@ function CalendarDayButton({
|
|
|
1720
1613
|
React12.useEffect(() => {
|
|
1721
1614
|
if (modifiers.focused) ref.current?.focus();
|
|
1722
1615
|
}, [modifiers.focused]);
|
|
1723
|
-
return /* @__PURE__ */
|
|
1616
|
+
return /* @__PURE__ */ jsx33(
|
|
1724
1617
|
Button,
|
|
1725
1618
|
{
|
|
1726
1619
|
ref,
|
|
@@ -1743,16 +1636,16 @@ function CalendarDayButton({
|
|
|
1743
1636
|
|
|
1744
1637
|
// src/components/ui/popover.tsx
|
|
1745
1638
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1746
|
-
import { jsx as
|
|
1639
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1747
1640
|
function Popover({
|
|
1748
1641
|
...props
|
|
1749
1642
|
}) {
|
|
1750
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ jsx34(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1751
1644
|
}
|
|
1752
1645
|
function PopoverTrigger({
|
|
1753
1646
|
...props
|
|
1754
1647
|
}) {
|
|
1755
|
-
return /* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ jsx34(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1756
1649
|
}
|
|
1757
1650
|
function PopoverContent({
|
|
1758
1651
|
className,
|
|
@@ -1760,7 +1653,7 @@ function PopoverContent({
|
|
|
1760
1653
|
sideOffset = 4,
|
|
1761
1654
|
...props
|
|
1762
1655
|
}) {
|
|
1763
|
-
return /* @__PURE__ */
|
|
1656
|
+
return /* @__PURE__ */ jsx34(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx34(
|
|
1764
1657
|
PopoverPrimitive.Content,
|
|
1765
1658
|
{
|
|
1766
1659
|
"data-slot": "popover-content",
|
|
@@ -1776,41 +1669,58 @@ function PopoverContent({
|
|
|
1776
1669
|
}
|
|
1777
1670
|
|
|
1778
1671
|
// src/components/Inputs/DateRange/DateRange.tsx
|
|
1779
|
-
import { Fragment as
|
|
1780
|
-
var DateRange = ({ className, style }) => {
|
|
1781
|
-
const [
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1672
|
+
import { Fragment as Fragment14, jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1673
|
+
var DateRange = ({ className, style, ...props }) => {
|
|
1674
|
+
const [error, setError] = React13.useState(null);
|
|
1675
|
+
const isDateRange = (val) => !!val && val.from instanceof Date;
|
|
1676
|
+
const [date, setDate] = React13.useState(
|
|
1677
|
+
isDateRange(props.value) ? props.value : {
|
|
1678
|
+
from: /* @__PURE__ */ new Date(),
|
|
1679
|
+
to: addDays(/* @__PURE__ */ new Date(), 7)
|
|
1680
|
+
}
|
|
1681
|
+
);
|
|
1682
|
+
React13.useEffect(() => {
|
|
1683
|
+
if (!props.validateOnMount) return;
|
|
1684
|
+
setError(props.errorMessage || null);
|
|
1685
|
+
}, [props.errorMessage, props.validateOnMount]);
|
|
1686
|
+
const handleChange = (value) => {
|
|
1687
|
+
setDate(value);
|
|
1688
|
+
if (value) {
|
|
1689
|
+
props.onChange?.(value);
|
|
1690
|
+
}
|
|
1691
|
+
};
|
|
1692
|
+
return /* @__PURE__ */ jsxs19(Fragment14, { children: [
|
|
1693
|
+
/* @__PURE__ */ jsx35("div", { className, style, children: /* @__PURE__ */ jsxs19(Popover, { children: [
|
|
1694
|
+
/* @__PURE__ */ jsx35(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx35(
|
|
1695
|
+
Button,
|
|
1696
|
+
{
|
|
1697
|
+
id: "date",
|
|
1698
|
+
variant: "outline",
|
|
1699
|
+
className: cn(
|
|
1700
|
+
"w-[300px] justify-start text-left font-normal text-[11px]",
|
|
1701
|
+
!date && "text-muted-foreground"
|
|
1702
|
+
),
|
|
1703
|
+
children: date?.from ? date.to ? /* @__PURE__ */ jsxs19(Fragment14, { children: [
|
|
1704
|
+
format(date.from, "LLL dd, y"),
|
|
1705
|
+
" -",
|
|
1706
|
+
" ",
|
|
1707
|
+
format(date.to, "LLL dd, y")
|
|
1708
|
+
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx35("span", { children: "Pick a date range" })
|
|
1709
|
+
}
|
|
1710
|
+
) }),
|
|
1711
|
+
/* @__PURE__ */ jsx35(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx35(
|
|
1712
|
+
Calendar2,
|
|
1713
|
+
{
|
|
1714
|
+
mode: "range",
|
|
1715
|
+
defaultMonth: date?.from,
|
|
1716
|
+
selected: date,
|
|
1717
|
+
onSelect: handleChange,
|
|
1718
|
+
numberOfMonths: 2
|
|
1719
|
+
}
|
|
1720
|
+
) })
|
|
1721
|
+
] }) }),
|
|
1722
|
+
error && /* @__PURE__ */ jsx35("p", { className: "mt-1 text-xs text-red-500", children: error })
|
|
1723
|
+
] });
|
|
1814
1724
|
};
|
|
1815
1725
|
var DateRange_default = DateRange;
|
|
1816
1726
|
|
|
@@ -1822,14 +1732,14 @@ import {
|
|
|
1822
1732
|
} from "@tanstack/react-table";
|
|
1823
1733
|
|
|
1824
1734
|
// src/components/ui/table.tsx
|
|
1825
|
-
import { jsx as
|
|
1735
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1826
1736
|
function Table({ className, ...props }) {
|
|
1827
|
-
return /* @__PURE__ */
|
|
1737
|
+
return /* @__PURE__ */ jsx36(
|
|
1828
1738
|
"div",
|
|
1829
1739
|
{
|
|
1830
1740
|
"data-slot": "table-container",
|
|
1831
1741
|
className: "relative w-full overflow-x-auto rounded-md border border-gray-200 bg-white",
|
|
1832
|
-
children: /* @__PURE__ */
|
|
1742
|
+
children: /* @__PURE__ */ jsx36(
|
|
1833
1743
|
"table",
|
|
1834
1744
|
{
|
|
1835
1745
|
"data-slot": "table",
|
|
@@ -1841,7 +1751,7 @@ function Table({ className, ...props }) {
|
|
|
1841
1751
|
);
|
|
1842
1752
|
}
|
|
1843
1753
|
function TableHeader({ className, ...props }) {
|
|
1844
|
-
return /* @__PURE__ */
|
|
1754
|
+
return /* @__PURE__ */ jsx36(
|
|
1845
1755
|
"thead",
|
|
1846
1756
|
{
|
|
1847
1757
|
"data-slot": "table-header",
|
|
@@ -1854,7 +1764,7 @@ function TableHeader({ className, ...props }) {
|
|
|
1854
1764
|
);
|
|
1855
1765
|
}
|
|
1856
1766
|
function TableBody({ className, ...props }) {
|
|
1857
|
-
return /* @__PURE__ */
|
|
1767
|
+
return /* @__PURE__ */ jsx36(
|
|
1858
1768
|
"tbody",
|
|
1859
1769
|
{
|
|
1860
1770
|
"data-slot": "table-body",
|
|
@@ -1867,7 +1777,7 @@ function TableBody({ className, ...props }) {
|
|
|
1867
1777
|
);
|
|
1868
1778
|
}
|
|
1869
1779
|
function TableRow({ className, ...props }) {
|
|
1870
|
-
return /* @__PURE__ */
|
|
1780
|
+
return /* @__PURE__ */ jsx36(
|
|
1871
1781
|
"tr",
|
|
1872
1782
|
{
|
|
1873
1783
|
"data-slot": "table-row",
|
|
@@ -1880,7 +1790,7 @@ function TableRow({ className, ...props }) {
|
|
|
1880
1790
|
);
|
|
1881
1791
|
}
|
|
1882
1792
|
function TableHead({ className, ...props }) {
|
|
1883
|
-
return /* @__PURE__ */
|
|
1793
|
+
return /* @__PURE__ */ jsx36(
|
|
1884
1794
|
"th",
|
|
1885
1795
|
{
|
|
1886
1796
|
"data-slot": "table-head",
|
|
@@ -1893,7 +1803,7 @@ function TableHead({ className, ...props }) {
|
|
|
1893
1803
|
);
|
|
1894
1804
|
}
|
|
1895
1805
|
function TableCell({ className, ...props }) {
|
|
1896
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ jsx36(
|
|
1897
1807
|
"td",
|
|
1898
1808
|
{
|
|
1899
1809
|
"data-slot": "table-cell",
|
|
@@ -1907,7 +1817,7 @@ function TableCell({ className, ...props }) {
|
|
|
1907
1817
|
}
|
|
1908
1818
|
|
|
1909
1819
|
// src/components/ui/data-table.tsx
|
|
1910
|
-
import { Fragment as
|
|
1820
|
+
import { Fragment as Fragment15, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1911
1821
|
function DataTable({
|
|
1912
1822
|
columns,
|
|
1913
1823
|
rowActions,
|
|
@@ -1932,14 +1842,14 @@ function DataTable({
|
|
|
1932
1842
|
onCellClick(rowData, columnId);
|
|
1933
1843
|
}
|
|
1934
1844
|
};
|
|
1935
|
-
return /* @__PURE__ */
|
|
1936
|
-
/* @__PURE__ */
|
|
1937
|
-
return /* @__PURE__ */
|
|
1845
|
+
return /* @__PURE__ */ jsx37("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ jsxs20(Table, { children: [
|
|
1846
|
+
/* @__PURE__ */ jsx37(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx37(TableRow, { children: headerGroup.headers.map((header) => {
|
|
1847
|
+
return /* @__PURE__ */ jsx37(TableHead, { children: header.isPlaceholder ? null : flexRender(
|
|
1938
1848
|
header.column.columnDef.header,
|
|
1939
1849
|
header.getContext()
|
|
1940
1850
|
) }, header.id);
|
|
1941
1851
|
}) }, headerGroup.id)) }),
|
|
1942
|
-
/* @__PURE__ */
|
|
1852
|
+
/* @__PURE__ */ jsx37(TableBody, { children: loading ? /* @__PURE__ */ jsx37(TableRow, { children: /* @__PURE__ */ jsx37(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ jsx37(Fragment15, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxs20(
|
|
1943
1853
|
TableRow,
|
|
1944
1854
|
{
|
|
1945
1855
|
"data-state": row.getIsSelected() && "selected",
|
|
@@ -1949,7 +1859,7 @@ function DataTable({
|
|
|
1949
1859
|
const isCellClickable = cellClickEnabled(row.original, cell.column.id);
|
|
1950
1860
|
const dynamicClass = cell.column.columnDef.meta?.cellClass || "";
|
|
1951
1861
|
const dynamicStyle = cell.column.columnDef.meta?.cellStyle || {};
|
|
1952
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ jsx37(
|
|
1953
1863
|
TableCell,
|
|
1954
1864
|
{
|
|
1955
1865
|
className: `${dynamicClass} ${isCellClickable ? "underline cursor-pointer" : ""}`,
|
|
@@ -1964,18 +1874,18 @@ function DataTable({
|
|
|
1964
1874
|
cell.id
|
|
1965
1875
|
);
|
|
1966
1876
|
}),
|
|
1967
|
-
rowActions.length > 0 && /* @__PURE__ */
|
|
1877
|
+
rowActions.length > 0 && /* @__PURE__ */ jsx37("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__ */ jsx37("p", { className: "text-[#383838] text-[12px] cursor-pointer font-[400]", children: action.header }, index)) })
|
|
1968
1878
|
]
|
|
1969
1879
|
},
|
|
1970
1880
|
row.id
|
|
1971
|
-
)) : /* @__PURE__ */
|
|
1881
|
+
)) : /* @__PURE__ */ jsx37(TableRow, { children: /* @__PURE__ */ jsx37(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "No results." }) }) }) })
|
|
1972
1882
|
] }) });
|
|
1973
1883
|
}
|
|
1974
1884
|
|
|
1975
1885
|
// src/components/ui/pagination.tsx
|
|
1976
|
-
import { jsx as
|
|
1886
|
+
import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1977
1887
|
function Pagination({ className, ...props }) {
|
|
1978
|
-
return /* @__PURE__ */
|
|
1888
|
+
return /* @__PURE__ */ jsx38(
|
|
1979
1889
|
"nav",
|
|
1980
1890
|
{
|
|
1981
1891
|
role: "navigation",
|
|
@@ -1990,7 +1900,7 @@ function PaginationContent({
|
|
|
1990
1900
|
className,
|
|
1991
1901
|
...props
|
|
1992
1902
|
}) {
|
|
1993
|
-
return /* @__PURE__ */
|
|
1903
|
+
return /* @__PURE__ */ jsx38(
|
|
1994
1904
|
"ul",
|
|
1995
1905
|
{
|
|
1996
1906
|
"data-slot": "pagination-content",
|
|
@@ -2000,7 +1910,7 @@ function PaginationContent({
|
|
|
2000
1910
|
);
|
|
2001
1911
|
}
|
|
2002
1912
|
function PaginationItem({ ...props }) {
|
|
2003
|
-
return /* @__PURE__ */
|
|
1913
|
+
return /* @__PURE__ */ jsx38("li", { "data-slot": "pagination-item", ...props });
|
|
2004
1914
|
}
|
|
2005
1915
|
function PaginationLink({
|
|
2006
1916
|
className,
|
|
@@ -2008,7 +1918,7 @@ function PaginationLink({
|
|
|
2008
1918
|
size = "icon",
|
|
2009
1919
|
...props
|
|
2010
1920
|
}) {
|
|
2011
|
-
return /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ jsx38(
|
|
2012
1922
|
"a",
|
|
2013
1923
|
{
|
|
2014
1924
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -2029,7 +1939,7 @@ function PaginationPrevious({
|
|
|
2029
1939
|
className,
|
|
2030
1940
|
...props
|
|
2031
1941
|
}) {
|
|
2032
|
-
return /* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ jsxs21(
|
|
2033
1943
|
PaginationLink,
|
|
2034
1944
|
{
|
|
2035
1945
|
"aria-label": "Go to previous page",
|
|
@@ -2037,8 +1947,8 @@ function PaginationPrevious({
|
|
|
2037
1947
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
2038
1948
|
...props,
|
|
2039
1949
|
children: [
|
|
2040
|
-
/* @__PURE__ */
|
|
2041
|
-
/* @__PURE__ */
|
|
1950
|
+
/* @__PURE__ */ jsx38(ChevronLeft, {}),
|
|
1951
|
+
/* @__PURE__ */ jsx38("span", { className: "hidden sm:block", children: "Previous" })
|
|
2042
1952
|
]
|
|
2043
1953
|
}
|
|
2044
1954
|
);
|
|
@@ -2047,7 +1957,7 @@ function PaginationNext({
|
|
|
2047
1957
|
className,
|
|
2048
1958
|
...props
|
|
2049
1959
|
}) {
|
|
2050
|
-
return /* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ jsxs21(
|
|
2051
1961
|
PaginationLink,
|
|
2052
1962
|
{
|
|
2053
1963
|
"aria-label": "Go to next page",
|
|
@@ -2055,8 +1965,8 @@ function PaginationNext({
|
|
|
2055
1965
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
2056
1966
|
...props,
|
|
2057
1967
|
children: [
|
|
2058
|
-
/* @__PURE__ */
|
|
2059
|
-
/* @__PURE__ */
|
|
1968
|
+
/* @__PURE__ */ jsx38("span", { className: "hidden sm:block", children: "Next" }),
|
|
1969
|
+
/* @__PURE__ */ jsx38(ChevronRight, {})
|
|
2060
1970
|
]
|
|
2061
1971
|
}
|
|
2062
1972
|
);
|
|
@@ -2065,7 +1975,7 @@ function PaginationEllipsis({
|
|
|
2065
1975
|
className,
|
|
2066
1976
|
...props
|
|
2067
1977
|
}) {
|
|
2068
|
-
return /* @__PURE__ */
|
|
1978
|
+
return /* @__PURE__ */ jsxs21(
|
|
2069
1979
|
"span",
|
|
2070
1980
|
{
|
|
2071
1981
|
"aria-hidden": true,
|
|
@@ -2073,15 +1983,15 @@ function PaginationEllipsis({
|
|
|
2073
1983
|
className: cn("flex size-9 items-center justify-center", className),
|
|
2074
1984
|
...props,
|
|
2075
1985
|
children: [
|
|
2076
|
-
/* @__PURE__ */
|
|
2077
|
-
/* @__PURE__ */
|
|
1986
|
+
/* @__PURE__ */ jsx38(Ellipsis, { className: "size-4" }),
|
|
1987
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "More pages" })
|
|
2078
1988
|
]
|
|
2079
1989
|
}
|
|
2080
1990
|
);
|
|
2081
1991
|
}
|
|
2082
1992
|
|
|
2083
1993
|
// src/components/DataDisplay/Pagination/Pagination.tsx
|
|
2084
|
-
import { jsx as
|
|
1994
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2085
1995
|
var CustomPagination = ({
|
|
2086
1996
|
totalPages,
|
|
2087
1997
|
currentPage,
|
|
@@ -2123,15 +2033,15 @@ var CustomPagination = ({
|
|
|
2123
2033
|
}
|
|
2124
2034
|
};
|
|
2125
2035
|
const pageNumbers = getPageNumbers();
|
|
2126
|
-
return /* @__PURE__ */
|
|
2127
|
-
/* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ jsx39(Pagination, { children: /* @__PURE__ */ jsxs22(PaginationContent, { children: [
|
|
2037
|
+
/* @__PURE__ */ jsx39(PaginationItem, { children: /* @__PURE__ */ jsx39(
|
|
2128
2038
|
PaginationPrevious,
|
|
2129
2039
|
{
|
|
2130
2040
|
onClick: () => handlePageChange(currentPage - 1),
|
|
2131
2041
|
className: currentPage === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
|
|
2132
2042
|
}
|
|
2133
2043
|
) }),
|
|
2134
|
-
pageNumbers.map((pageNumber, index) => /* @__PURE__ */
|
|
2044
|
+
pageNumbers.map((pageNumber, index) => /* @__PURE__ */ jsx39(PaginationItem, { children: pageNumber === "..." ? /* @__PURE__ */ jsx39(PaginationEllipsis, {}) : /* @__PURE__ */ jsx39(
|
|
2135
2045
|
PaginationLink,
|
|
2136
2046
|
{
|
|
2137
2047
|
onClick: () => handlePageChange(pageNumber),
|
|
@@ -2140,7 +2050,7 @@ var CustomPagination = ({
|
|
|
2140
2050
|
children: pageNumber
|
|
2141
2051
|
}
|
|
2142
2052
|
) }, index)),
|
|
2143
|
-
/* @__PURE__ */
|
|
2053
|
+
/* @__PURE__ */ jsx39(PaginationItem, { children: /* @__PURE__ */ jsx39(
|
|
2144
2054
|
PaginationNext,
|
|
2145
2055
|
{
|
|
2146
2056
|
onClick: () => handlePageChange(currentPage + 1),
|
|
@@ -2152,22 +2062,22 @@ var CustomPagination = ({
|
|
|
2152
2062
|
var Pagination_default = CustomPagination;
|
|
2153
2063
|
|
|
2154
2064
|
// src/components/DataDisplay/Table/Table.tsx
|
|
2155
|
-
import { useState as
|
|
2156
|
-
import { jsx as
|
|
2065
|
+
import { useState as useState17 } from "react";
|
|
2066
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2157
2067
|
var Table2 = ({ columns, data, rowActions, className, style, pagination = false, itemsPerPage = 10, onPageChange, loading = false }) => {
|
|
2158
2068
|
const rawColumns = Array.isArray(columns) ? columns : [];
|
|
2159
2069
|
const rawData = Array.isArray(data) ? data : [];
|
|
2160
2070
|
const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
|
|
2161
|
-
const [currentPage, setCurrentPage] =
|
|
2071
|
+
const [currentPage, setCurrentPage] = useState17(1);
|
|
2162
2072
|
const enablePagination = pagination && rawData.length > itemsPerPage;
|
|
2163
2073
|
const handlePageChange = (page) => {
|
|
2164
2074
|
setCurrentPage(page);
|
|
2165
2075
|
onPageChange?.(page);
|
|
2166
2076
|
};
|
|
2167
2077
|
const paginatedData = enablePagination ? rawData.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage) : rawData;
|
|
2168
|
-
return /* @__PURE__ */
|
|
2169
|
-
/* @__PURE__ */
|
|
2170
|
-
enablePagination && /* @__PURE__ */
|
|
2078
|
+
return /* @__PURE__ */ jsxs23("div", { className: `${className} space-y-3`, style, children: [
|
|
2079
|
+
/* @__PURE__ */ jsx40(DataTable, { columns: rawColumns, data: paginatedData, rowActions: rawRowActions, loading }),
|
|
2080
|
+
enablePagination && /* @__PURE__ */ jsx40(
|
|
2171
2081
|
Pagination_default,
|
|
2172
2082
|
{
|
|
2173
2083
|
totalPages: Math.ceil(rawData.length / itemsPerPage),
|
|
@@ -2181,16 +2091,16 @@ var Table_default = Table2;
|
|
|
2181
2091
|
|
|
2182
2092
|
// src/components/ui/dropdown-menu.tsx
|
|
2183
2093
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2184
|
-
import { jsx as
|
|
2094
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2185
2095
|
function DropdownMenu({
|
|
2186
2096
|
...props
|
|
2187
2097
|
}) {
|
|
2188
|
-
return /* @__PURE__ */
|
|
2098
|
+
return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
2189
2099
|
}
|
|
2190
2100
|
function DropdownMenuTrigger({
|
|
2191
2101
|
...props
|
|
2192
2102
|
}) {
|
|
2193
|
-
return /* @__PURE__ */
|
|
2103
|
+
return /* @__PURE__ */ jsx41(
|
|
2194
2104
|
DropdownMenuPrimitive.Trigger,
|
|
2195
2105
|
{
|
|
2196
2106
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -2203,7 +2113,7 @@ function DropdownMenuContent({
|
|
|
2203
2113
|
sideOffset = 4,
|
|
2204
2114
|
...props
|
|
2205
2115
|
}) {
|
|
2206
|
-
return /* @__PURE__ */
|
|
2116
|
+
return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx41(
|
|
2207
2117
|
DropdownMenuPrimitive.Content,
|
|
2208
2118
|
{
|
|
2209
2119
|
"data-slot": "dropdown-menu-content",
|
|
@@ -2222,7 +2132,7 @@ function DropdownMenuItem({
|
|
|
2222
2132
|
variant = "default",
|
|
2223
2133
|
...props
|
|
2224
2134
|
}) {
|
|
2225
|
-
return /* @__PURE__ */
|
|
2135
|
+
return /* @__PURE__ */ jsx41(
|
|
2226
2136
|
DropdownMenuPrimitive.Item,
|
|
2227
2137
|
{
|
|
2228
2138
|
"data-slot": "dropdown-menu-item",
|
|
@@ -2241,7 +2151,7 @@ function DropdownMenuLabel({
|
|
|
2241
2151
|
inset,
|
|
2242
2152
|
...props
|
|
2243
2153
|
}) {
|
|
2244
|
-
return /* @__PURE__ */
|
|
2154
|
+
return /* @__PURE__ */ jsx41(
|
|
2245
2155
|
DropdownMenuPrimitive.Label,
|
|
2246
2156
|
{
|
|
2247
2157
|
"data-slot": "dropdown-menu-label",
|
|
@@ -2258,7 +2168,7 @@ function DropdownMenuSeparator({
|
|
|
2258
2168
|
className,
|
|
2259
2169
|
...props
|
|
2260
2170
|
}) {
|
|
2261
|
-
return /* @__PURE__ */
|
|
2171
|
+
return /* @__PURE__ */ jsx41(
|
|
2262
2172
|
DropdownMenuPrimitive.Separator,
|
|
2263
2173
|
{
|
|
2264
2174
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -2269,7 +2179,7 @@ function DropdownMenuSeparator({
|
|
|
2269
2179
|
}
|
|
2270
2180
|
|
|
2271
2181
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
2272
|
-
import { jsx as
|
|
2182
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2273
2183
|
var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
|
|
2274
2184
|
const rawTabs = Array.isArray(tabs) ? tabs : [];
|
|
2275
2185
|
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 ";
|
|
@@ -2279,7 +2189,7 @@ var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
|
|
|
2279
2189
|
if (!path) return false;
|
|
2280
2190
|
return pathname === path || path !== "/" && pathname?.startsWith(path);
|
|
2281
2191
|
};
|
|
2282
|
-
return /* @__PURE__ */
|
|
2192
|
+
return /* @__PURE__ */ jsx42("div", { className, style, children: rawTabs.map((tab, index) => {
|
|
2283
2193
|
const finalClasses = [
|
|
2284
2194
|
baseClasses,
|
|
2285
2195
|
isActive(tab.href) ? activeClasses : hoverClasses,
|
|
@@ -2287,29 +2197,29 @@ var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
|
|
|
2287
2197
|
].join(" ");
|
|
2288
2198
|
const hasDropdown = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
|
|
2289
2199
|
if (hasDropdown) {
|
|
2290
|
-
return /* @__PURE__ */
|
|
2291
|
-
/* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ jsxs25(DropdownMenu, { children: [
|
|
2201
|
+
/* @__PURE__ */ jsxs25(
|
|
2292
2202
|
DropdownMenuTrigger,
|
|
2293
2203
|
{
|
|
2294
2204
|
className: `${finalClasses} inline-flex items-center gap-1`,
|
|
2295
2205
|
children: [
|
|
2296
2206
|
tab.header,
|
|
2297
|
-
/* @__PURE__ */
|
|
2207
|
+
/* @__PURE__ */ jsx42(ChevronDown, { className: "h-4 w-4 opacity-80" })
|
|
2298
2208
|
]
|
|
2299
2209
|
}
|
|
2300
2210
|
),
|
|
2301
|
-
/* @__PURE__ */
|
|
2211
|
+
/* @__PURE__ */ jsx42(
|
|
2302
2212
|
DropdownMenuContent,
|
|
2303
2213
|
{
|
|
2304
2214
|
align: "start",
|
|
2305
2215
|
sideOffset: 6,
|
|
2306
2216
|
className: "z-50 min-w-[160px] rounded-md border border-gray-200 bg-white p-1 shadow-lg",
|
|
2307
|
-
children: tab.children.map((item) => /* @__PURE__ */
|
|
2217
|
+
children: tab.children.map((item) => /* @__PURE__ */ jsx42(
|
|
2308
2218
|
DropdownMenuItem,
|
|
2309
2219
|
{
|
|
2310
2220
|
asChild: true,
|
|
2311
2221
|
className: "cursor-pointer rounded-sm px-3 py-2 text-[12px] text-gray-800 hover:bg-gray-100 focus:bg-gray-100",
|
|
2312
|
-
children: LinkComponent ? /* @__PURE__ */
|
|
2222
|
+
children: LinkComponent ? /* @__PURE__ */ jsx42(LinkComponent, { href: item.href || "#", children: item.header }) : item.header
|
|
2313
2223
|
},
|
|
2314
2224
|
item.id
|
|
2315
2225
|
))
|
|
@@ -2317,19 +2227,19 @@ var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
|
|
|
2317
2227
|
)
|
|
2318
2228
|
] }, index);
|
|
2319
2229
|
}
|
|
2320
|
-
return tab.url && LinkComponent ? /* @__PURE__ */
|
|
2230
|
+
return tab.url && LinkComponent ? /* @__PURE__ */ jsx42(LinkComponent, { href: tab.url, className: finalClasses, style: tab.style, children: tab.header }, index) : /* @__PURE__ */ jsx42("div", { className: finalClasses, style: tab.style, role: "button", tabIndex: 0, children: tab.header }, index);
|
|
2321
2231
|
}) });
|
|
2322
2232
|
};
|
|
2323
2233
|
var Tabs_default = Tabs;
|
|
2324
2234
|
|
|
2325
2235
|
// src/components/Navigation/Stages/Stages.tsx
|
|
2326
2236
|
import React14 from "react";
|
|
2327
|
-
import { jsx as
|
|
2237
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2328
2238
|
var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
2329
|
-
return /* @__PURE__ */
|
|
2330
|
-
/* @__PURE__ */
|
|
2331
|
-
/* @__PURE__ */
|
|
2332
|
-
/* @__PURE__ */
|
|
2239
|
+
return /* @__PURE__ */ jsx43("div", { className, style, children: /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between bg-gray-50 p-2 rounded-lg border border-gray-200 w-full", children: [
|
|
2240
|
+
/* @__PURE__ */ jsx43("div", { className: "flex items-center", children: /* @__PURE__ */ jsx43("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ jsx43("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx43("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
|
|
2241
|
+
/* @__PURE__ */ jsx43("div", { className: "flex items-center flex-1 px-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ jsxs26(React14.Fragment, { children: [
|
|
2242
|
+
/* @__PURE__ */ jsx43(
|
|
2333
2243
|
"button",
|
|
2334
2244
|
{
|
|
2335
2245
|
className: `
|
|
@@ -2337,26 +2247,26 @@ var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
|
|
|
2337
2247
|
children: stage.header
|
|
2338
2248
|
}
|
|
2339
2249
|
),
|
|
2340
|
-
index < stages.length - 1 && /* @__PURE__ */
|
|
2250
|
+
index < stages.length - 1 && /* @__PURE__ */ jsx43("div", { className: "flex-shrink-0 w-3 h-px bg-gray-300" })
|
|
2341
2251
|
] }, stage.id)) }),
|
|
2342
|
-
isShowBtn && /* @__PURE__ */
|
|
2252
|
+
isShowBtn && /* @__PURE__ */ jsx43("div", { className: "flex items-center", children: /* @__PURE__ */ jsx43("button", { className: "bg-[#034486] text-white px-6 py-2 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm", children: buttonText }) })
|
|
2343
2253
|
] }) });
|
|
2344
2254
|
};
|
|
2345
2255
|
var Stages_default = StagesComponent;
|
|
2346
2256
|
|
|
2347
2257
|
// src/components/Navigation/Spacer/Spacer.tsx
|
|
2348
|
-
import { jsx as
|
|
2258
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2349
2259
|
var Spacer = ({ className, style }) => {
|
|
2350
|
-
return /* @__PURE__ */
|
|
2260
|
+
return /* @__PURE__ */ jsx44("div", { className: `${className}`, style });
|
|
2351
2261
|
};
|
|
2352
2262
|
var Spacer_default = Spacer;
|
|
2353
2263
|
|
|
2354
2264
|
// src/components/Navigation/Profile/Profile.tsx
|
|
2355
|
-
import { jsx as
|
|
2265
|
+
import { jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2356
2266
|
var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
2357
|
-
return /* @__PURE__ */
|
|
2358
|
-
showName && /* @__PURE__ */
|
|
2359
|
-
profileType === "avatar" ? /* @__PURE__ */
|
|
2267
|
+
return /* @__PURE__ */ jsx45("div", { className, style, children: /* @__PURE__ */ jsxs27("div", { className: "flex gap-2 items-center justify-between w-30 cursor-pointer", children: [
|
|
2268
|
+
showName && /* @__PURE__ */ jsx45("h4", { className: "text-[#000000] dark:text-[#fff] text-[13px] font-[500] mb-0", children: userName }),
|
|
2269
|
+
profileType === "avatar" ? /* @__PURE__ */ jsx45(
|
|
2360
2270
|
"img",
|
|
2361
2271
|
{
|
|
2362
2272
|
src: "https://builder.development.algorithmshift.ai/images/toolset/profile.svg",
|
|
@@ -2364,16 +2274,16 @@ var Profile = ({ profileType, showName, userName, className, style }) => {
|
|
|
2364
2274
|
width: 24,
|
|
2365
2275
|
height: 24
|
|
2366
2276
|
}
|
|
2367
|
-
) : /* @__PURE__ */
|
|
2277
|
+
) : /* @__PURE__ */ jsx45("div", { className: "w-6 h-6 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: "A" })
|
|
2368
2278
|
] }) });
|
|
2369
2279
|
};
|
|
2370
2280
|
var Profile_default = Profile;
|
|
2371
2281
|
|
|
2372
2282
|
// src/components/Navigation/Notification/Notification.tsx
|
|
2373
|
-
import { jsx as
|
|
2283
|
+
import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2374
2284
|
var Notification = ({ className, style, badgeType, badgeCount = 0, hideBadgeWhenZero }) => {
|
|
2375
|
-
return /* @__PURE__ */
|
|
2376
|
-
/* @__PURE__ */
|
|
2285
|
+
return /* @__PURE__ */ jsx46("div", { className, style, children: /* @__PURE__ */ jsxs28("div", { className: "w-[34px] h-[34px] bg-[#E9E9E9] rounded-md text-center flex items-center justify-center relative", children: [
|
|
2286
|
+
/* @__PURE__ */ jsx46(
|
|
2377
2287
|
"img",
|
|
2378
2288
|
{
|
|
2379
2289
|
src: "https://builder.development.algorithmshift.ai/images/toolset/notification.svg",
|
|
@@ -2382,7 +2292,7 @@ var Notification = ({ className, style, badgeType, badgeCount = 0, hideBadgeWhen
|
|
|
2382
2292
|
height: 18
|
|
2383
2293
|
}
|
|
2384
2294
|
),
|
|
2385
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */
|
|
2295
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ jsx46("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__ */ jsx46("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]" })
|
|
2386
2296
|
] }) });
|
|
2387
2297
|
};
|
|
2388
2298
|
var Notification_default = Notification;
|
|
@@ -2391,7 +2301,7 @@ var Notification_default = Notification;
|
|
|
2391
2301
|
var logo_placeholder_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAGPCAYAAAC552DlAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nO3d6X+V5Z0/8G8WEhIgSBKWkLCECFIJAoILdRRU3NsBtXVrq+PymmkfzuN5MP0L5pmvdtpqX3aqti5V61jrVm2p24AKggqKRHYQCEsgQNbfA176U8tyQu6Tkwve74fknO/1PbmuHM79Ofd93UU//elPewMAAAAgYcWFbgAAAACgvwQcAAAAQPIEHAAAAEDyBBwAAABA8gQcAAAAQPIEHAAAAEDyBBwAAABA8gQcAAAAQPIEHAAAAEDyBBwAAABA8gQcAAAA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JqqioiFtuuSUmT55c6FaOq7q6Ou6666546KGHYs+ePYVu55jKy8vj+9///pe3ki408wpw1OCInIHT3syZM+P2229P4gD0qy644IK47bbbBuRD7JIlSwZNuPGF0tLSuPHGGwfdt4FfZW1BbkaMGBH33HPPoD4I/sLIkSPjRz/60aDbtPML119/fYwcObLQbUSEeQX4KgEHkHdz5syJG2+8MW93Acm3adOmxR133JHX/hcuXBgzZ87MW/3+KC8vj+uvv77QbRyTtQW5qaqqinvvvXdQh5XfNGrUqPje9743YHdAytWkSZPivPPOK3QbEWFeAb5JwAHk1bnnnhvf+c53kv8g09jYGDfffHNeXkdjY2NcdtllmdfN0mDc08LagtxUVFTEnXfeOWjOOOiLxsbGuOKKKwrdxpdKSkriuuuuK3QbEWFeAY5FwAHkTV1dXSxevHjQbMDWX9/61rfiqquuyrRmZWVlLFmyxMFtH1lbkJvi4uK49dZbo6amptCtnLJvf/vbUVdXV+g2IuLo2Qdjx44tdBvmFeA4To9PhsCgU15eHt/73veirKys0K1kav78+XHuuedmVu/qq6+OqqqqzOqdCawtyN1VV10VkyZNKnQb/VJcXBzf/e53BcFfYV4Bjs3OZkBeXHvttVFdXV3oNvLihhtuiM8++yza29v7VaehoWHQXMedEmsLcjNp0qS46KKLMq3Z29sbGzZsiE8//TS2bdsWu3btis7OzoiIGD58eIwfPz6amppi2rRpmYaQdXV1MWfOnHj33Xczq5kq8wpwfAIOIHONjY0xe/bsQreRN5WVlXHdddfFk08+2a8611xzjW+u+sjagtyUlJRk/u346tWr49VXX43W1tZj/ry9vT0+//zzWLFiRVRWVsaCBQti3rx5mV1K9k//9E/x3nvvndG3VjavACfmEhUgU0VFRXHDDTcUuo28a25ujqamplN+fmNjYzQ0NGTY0enP2oLcXXrppZntz7B///546KGH4sknnzzuQfA3tbe3x/PPPx+//e1v4/Dhw5n0MWrUqJg1a1YmtVJlXgFOzBkcQKbmzJmT103PDh06FOvXr4/NmzfHjh07Ys+ePdHR0RERR6/nraqqipqammhoaIjJkyfHm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ACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5Ag4AAAAgeQIOAAAAIHkCDgAAACB5/w8RG1j/1Z36RAAAAABJRU5ErkJggg==";
|
|
2392
2302
|
|
|
2393
2303
|
// src/components/Navigation/Logo/Logo.tsx
|
|
2394
|
-
import { jsx as
|
|
2304
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2395
2305
|
var Logo = ({
|
|
2396
2306
|
className,
|
|
2397
2307
|
style,
|
|
@@ -2399,7 +2309,7 @@ var Logo = ({
|
|
|
2399
2309
|
altText = "Preview"
|
|
2400
2310
|
}) => {
|
|
2401
2311
|
if (!imageUrl) {
|
|
2402
|
-
return /* @__PURE__ */
|
|
2312
|
+
return /* @__PURE__ */ jsx47(
|
|
2403
2313
|
"div",
|
|
2404
2314
|
{
|
|
2405
2315
|
className: cn(
|
|
@@ -2407,19 +2317,19 @@ var Logo = ({
|
|
|
2407
2317
|
"p-0"
|
|
2408
2318
|
),
|
|
2409
2319
|
style,
|
|
2410
|
-
children: /* @__PURE__ */
|
|
2320
|
+
children: /* @__PURE__ */ jsx47("img", { src: logo_placeholder_default, alt: altText, className: "opacity-50", width: 150, height: 80 })
|
|
2411
2321
|
}
|
|
2412
2322
|
);
|
|
2413
2323
|
}
|
|
2414
|
-
return /* @__PURE__ */
|
|
2324
|
+
return /* @__PURE__ */ jsx47("img", { src: imageUrl, alt: altText, className, style });
|
|
2415
2325
|
};
|
|
2416
2326
|
var Logo_default = Logo;
|
|
2417
2327
|
|
|
2418
2328
|
// src/components/ui/avatar.tsx
|
|
2419
2329
|
import * as React15 from "react";
|
|
2420
2330
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
2421
|
-
import { jsx as
|
|
2422
|
-
var Avatar = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
2331
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2332
|
+
var Avatar = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
2423
2333
|
AvatarPrimitive.Root,
|
|
2424
2334
|
{
|
|
2425
2335
|
ref,
|
|
@@ -2431,7 +2341,7 @@ var Avatar = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
2431
2341
|
}
|
|
2432
2342
|
));
|
|
2433
2343
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
2434
|
-
var AvatarImage = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
2344
|
+
var AvatarImage = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
2435
2345
|
AvatarPrimitive.Image,
|
|
2436
2346
|
{
|
|
2437
2347
|
ref,
|
|
@@ -2440,7 +2350,7 @@ var AvatarImage = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2440
2350
|
}
|
|
2441
2351
|
));
|
|
2442
2352
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
2443
|
-
var AvatarFallback = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
2353
|
+
var AvatarFallback = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
2444
2354
|
AvatarPrimitive.Fallback,
|
|
2445
2355
|
{
|
|
2446
2356
|
ref,
|
|
@@ -2454,7 +2364,7 @@ var AvatarFallback = React15.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2454
2364
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
2455
2365
|
|
|
2456
2366
|
// src/components/Navigation/Navbar/Navbar.tsx
|
|
2457
|
-
import { Fragment as
|
|
2367
|
+
import { Fragment as Fragment16, jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2458
2368
|
function Navbar({
|
|
2459
2369
|
style,
|
|
2460
2370
|
badgeType,
|
|
@@ -2469,61 +2379,61 @@ function Navbar({
|
|
|
2469
2379
|
ImageComponent
|
|
2470
2380
|
}) {
|
|
2471
2381
|
const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
|
|
2472
|
-
return /* @__PURE__ */
|
|
2473
|
-
LinkComponent && ImageComponent ? /* @__PURE__ */
|
|
2474
|
-
/* @__PURE__ */
|
|
2475
|
-
!isMobileView ? /* @__PURE__ */
|
|
2476
|
-
/* @__PURE__ */
|
|
2477
|
-
/* @__PURE__ */
|
|
2478
|
-
] }) }) : /* @__PURE__ */
|
|
2382
|
+
return /* @__PURE__ */ jsx49("nav", { className: "w-full border-b bg-white shadow-sm", style, children: /* @__PURE__ */ jsxs29("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 py-2", children: [
|
|
2383
|
+
LinkComponent && ImageComponent ? /* @__PURE__ */ jsx49(LinkComponent, { href: "/", className: "flex items-center space-x-2", children: imageUrl ? /* @__PURE__ */ jsx49(ImageComponent, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ jsx49("span", { className: "font-semibold text-blue-700", children: "Logo" }) }) : /* @__PURE__ */ jsx49("span", { className: "font-semibold text-blue-700", children: "Logo" }),
|
|
2384
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center space-x-3", children: [
|
|
2385
|
+
!isMobileView ? /* @__PURE__ */ jsx49("div", { className: "flex-1 px-6", children: /* @__PURE__ */ jsxs29("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
|
|
2386
|
+
/* @__PURE__ */ jsx49(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
2387
|
+
/* @__PURE__ */ jsx49(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
|
|
2388
|
+
] }) }) : /* @__PURE__ */ jsx49(
|
|
2479
2389
|
Button,
|
|
2480
2390
|
{
|
|
2481
2391
|
variant: "ghost",
|
|
2482
2392
|
size: "icon",
|
|
2483
2393
|
className: "border border-gray-400",
|
|
2484
|
-
children: /* @__PURE__ */
|
|
2394
|
+
children: /* @__PURE__ */ jsx49(Search, { className: "h-5 w-5 text-gray-400" })
|
|
2485
2395
|
}
|
|
2486
2396
|
),
|
|
2487
|
-
/* @__PURE__ */
|
|
2488
|
-
/* @__PURE__ */
|
|
2489
|
-
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ jsxs29("div", { className: "relative bg-[#E9E9E9] rounded-md", children: [
|
|
2398
|
+
/* @__PURE__ */ jsx49(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx49(Bell, { className: "h-5 w-5 text-[#1C1B1F]" }) }),
|
|
2399
|
+
badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ jsx49("span", { className: "absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-red-500 text-[10px] text-white leading-8", children: badgeCount }) : /* @__PURE__ */ jsx49("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
|
|
2490
2400
|
] }),
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
/* @__PURE__ */
|
|
2493
|
-
!isMobileView && showName && /* @__PURE__ */
|
|
2494
|
-
!isMobileView ? /* @__PURE__ */
|
|
2495
|
-
/* @__PURE__ */
|
|
2401
|
+
/* @__PURE__ */ jsxs29(DropdownMenu, { children: [
|
|
2402
|
+
/* @__PURE__ */ jsx49(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center space-x-2", children: [
|
|
2403
|
+
!isMobileView && showName && /* @__PURE__ */ jsx49("h4", { className: "text-[#000000] text-[13px] font-[500] mb-0", children: "Akbar Sheriff" }),
|
|
2404
|
+
!isMobileView ? /* @__PURE__ */ jsxs29(Fragment16, { children: [
|
|
2405
|
+
/* @__PURE__ */ jsx49(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ jsx49(
|
|
2496
2406
|
AvatarImage,
|
|
2497
2407
|
{
|
|
2498
2408
|
src: "/images/appbuilder/toolset/profile.svg",
|
|
2499
2409
|
alt: "Akbar Sheriff"
|
|
2500
2410
|
}
|
|
2501
|
-
) : /* @__PURE__ */
|
|
2502
|
-
/* @__PURE__ */
|
|
2411
|
+
) : /* @__PURE__ */ jsx49("div", { className: "w-8 h-8 bg-[#12715b] rounded-full text-[#fff] text-center text-[11px] flex items-center justify-center", children: "AS" }) }),
|
|
2412
|
+
/* @__PURE__ */ jsx49(
|
|
2503
2413
|
Button,
|
|
2504
2414
|
{
|
|
2505
2415
|
variant: "ghost",
|
|
2506
2416
|
size: "icon",
|
|
2507
2417
|
className: "text-gray-900 md:hidden",
|
|
2508
|
-
children: /* @__PURE__ */
|
|
2418
|
+
children: /* @__PURE__ */ jsx49(Menu, { className: "h-6 w-6" })
|
|
2509
2419
|
}
|
|
2510
2420
|
)
|
|
2511
|
-
] }) : /* @__PURE__ */
|
|
2421
|
+
] }) : /* @__PURE__ */ jsx49(
|
|
2512
2422
|
Button,
|
|
2513
2423
|
{
|
|
2514
2424
|
variant: "ghost",
|
|
2515
2425
|
size: "icon",
|
|
2516
2426
|
className: "text-gray-900",
|
|
2517
|
-
children: /* @__PURE__ */
|
|
2427
|
+
children: /* @__PURE__ */ jsx49(Menu, { className: "h-6 w-6" })
|
|
2518
2428
|
}
|
|
2519
2429
|
)
|
|
2520
2430
|
] }) }),
|
|
2521
|
-
/* @__PURE__ */
|
|
2522
|
-
/* @__PURE__ */
|
|
2523
|
-
/* @__PURE__ */
|
|
2524
|
-
/* @__PURE__ */
|
|
2525
|
-
/* @__PURE__ */
|
|
2526
|
-
/* @__PURE__ */
|
|
2431
|
+
/* @__PURE__ */ jsxs29(DropdownMenuContent, { align: "end", className: "bg-white", children: [
|
|
2432
|
+
/* @__PURE__ */ jsx49(DropdownMenuLabel, { className: "text-black", children: "My Account" }),
|
|
2433
|
+
/* @__PURE__ */ jsx49(DropdownMenuSeparator, {}),
|
|
2434
|
+
/* @__PURE__ */ jsx49(DropdownMenuItem, { className: "text-black", children: "Profile" }),
|
|
2435
|
+
/* @__PURE__ */ jsx49(DropdownMenuItem, { className: "text-black", children: "Settings" }),
|
|
2436
|
+
/* @__PURE__ */ jsx49(DropdownMenuItem, { className: "text-black", children: "Logout" })
|
|
2527
2437
|
] })
|
|
2528
2438
|
] })
|
|
2529
2439
|
] })
|
|
@@ -2532,28 +2442,28 @@ function Navbar({
|
|
|
2532
2442
|
|
|
2533
2443
|
// src/components/Chart/BarChart.tsx
|
|
2534
2444
|
import { BarChart, Bar, Area, AreaChart, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend } from "recharts";
|
|
2535
|
-
import { jsx as
|
|
2445
|
+
import { jsx as jsx50, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2536
2446
|
var ChartComponent = ({ className, style, ...props }) => {
|
|
2537
2447
|
const data = Array.isArray(props?.data) ? props.data : [];
|
|
2538
2448
|
const chartType = props.chartType || "bar";
|
|
2539
2449
|
const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
|
|
2540
|
-
return /* @__PURE__ */
|
|
2541
|
-
/* @__PURE__ */
|
|
2542
|
-
/* @__PURE__ */
|
|
2543
|
-
/* @__PURE__ */
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
/* @__PURE__ */
|
|
2546
|
-
/* @__PURE__ */
|
|
2547
|
-
] }) : /* @__PURE__ */
|
|
2548
|
-
/* @__PURE__ */
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
/* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ jsx50("div", { className: `${className} h-[400px]`, style, children: data.length > 0 && /* @__PURE__ */ jsx50(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs30(BarChart, { data, children: [
|
|
2451
|
+
/* @__PURE__ */ jsx50(CartesianGrid, { strokeDasharray: "3 3" }),
|
|
2452
|
+
/* @__PURE__ */ jsx50(XAxis, { dataKey: "name" }),
|
|
2453
|
+
/* @__PURE__ */ jsx50(YAxis, {}),
|
|
2454
|
+
/* @__PURE__ */ jsx50(Tooltip, {}),
|
|
2455
|
+
/* @__PURE__ */ jsx50(Legend, { verticalAlign: legendsPosition, align: "center" }),
|
|
2456
|
+
/* @__PURE__ */ jsx50(Bar, { dataKey: "value", fill: "#00695C" })
|
|
2457
|
+
] }) : /* @__PURE__ */ jsxs30(AreaChart, { data, children: [
|
|
2458
|
+
/* @__PURE__ */ jsx50("defs", { children: /* @__PURE__ */ jsxs30("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
2459
|
+
/* @__PURE__ */ jsx50("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
|
|
2460
|
+
/* @__PURE__ */ jsx50("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
|
|
2551
2461
|
] }) }),
|
|
2552
|
-
/* @__PURE__ */
|
|
2553
|
-
/* @__PURE__ */
|
|
2554
|
-
/* @__PURE__ */
|
|
2555
|
-
/* @__PURE__ */
|
|
2556
|
-
/* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ jsx50(CartesianGrid, { strokeDasharray: "3 3" }),
|
|
2463
|
+
/* @__PURE__ */ jsx50(XAxis, { dataKey: "name" }),
|
|
2464
|
+
/* @__PURE__ */ jsx50(YAxis, {}),
|
|
2465
|
+
/* @__PURE__ */ jsx50(Tooltip, {}),
|
|
2466
|
+
/* @__PURE__ */ jsx50(
|
|
2557
2467
|
Area,
|
|
2558
2468
|
{
|
|
2559
2469
|
type: "monotone",
|
|
@@ -2569,7 +2479,7 @@ var BarChart_default = ChartComponent;
|
|
|
2569
2479
|
|
|
2570
2480
|
// src/components/Chart/PieChart.tsx
|
|
2571
2481
|
import { PieChart, Pie, Cell, ResponsiveContainer as ResponsiveContainer2, Tooltip as Tooltip2, LabelList } from "recharts";
|
|
2572
|
-
import { Fragment as
|
|
2482
|
+
import { Fragment as Fragment17, jsx as jsx51, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2573
2483
|
var DonutChart = ({ className, style, ...props }) => {
|
|
2574
2484
|
const data = Array.isArray(props?.data) ? props.data : [];
|
|
2575
2485
|
const total = data.reduce((sum, d) => sum + d.value, 0);
|
|
@@ -2580,7 +2490,7 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2580
2490
|
const renderLabel = ({ value, x, y }) => {
|
|
2581
2491
|
if (value == null) return null;
|
|
2582
2492
|
const percentage = (Number(value) / total * 100).toFixed(0);
|
|
2583
|
-
return /* @__PURE__ */
|
|
2493
|
+
return /* @__PURE__ */ jsxs31(
|
|
2584
2494
|
"text",
|
|
2585
2495
|
{
|
|
2586
2496
|
x,
|
|
@@ -2602,33 +2512,33 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2602
2512
|
const wrapperClass = canvasMode ? forceDesktop ? "flex-row" : "flex-col" : "flex-col md:flex-row";
|
|
2603
2513
|
const renderLegends = () => {
|
|
2604
2514
|
if (!showLegends) return null;
|
|
2605
|
-
return /* @__PURE__ */
|
|
2515
|
+
return /* @__PURE__ */ jsx51(Fragment17, { children: data.map((d) => /* @__PURE__ */ jsxs31(
|
|
2606
2516
|
"div",
|
|
2607
2517
|
{
|
|
2608
2518
|
className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
|
|
2609
2519
|
children: [
|
|
2610
|
-
/* @__PURE__ */
|
|
2520
|
+
/* @__PURE__ */ jsx51(
|
|
2611
2521
|
"span",
|
|
2612
2522
|
{
|
|
2613
2523
|
className: "inline-block w-[16px] h-[16px] rounded",
|
|
2614
2524
|
style: { backgroundColor: d.color }
|
|
2615
2525
|
}
|
|
2616
2526
|
),
|
|
2617
|
-
/* @__PURE__ */
|
|
2527
|
+
/* @__PURE__ */ jsx51("span", { className: "text-[#000000] text-[12px] md:text-[13px] font-[500]", children: d.name })
|
|
2618
2528
|
]
|
|
2619
2529
|
},
|
|
2620
2530
|
d.name
|
|
2621
2531
|
)) });
|
|
2622
2532
|
};
|
|
2623
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ jsxs31(
|
|
2624
2534
|
"div",
|
|
2625
2535
|
{
|
|
2626
2536
|
className: `relative flex items-center ${wrapperClass} ${className}`,
|
|
2627
2537
|
style,
|
|
2628
2538
|
children: [
|
|
2629
|
-
/* @__PURE__ */
|
|
2630
|
-
data.length > 0 && /* @__PURE__ */
|
|
2631
|
-
/* @__PURE__ */
|
|
2539
|
+
/* @__PURE__ */ jsxs31("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
|
|
2540
|
+
data.length > 0 && /* @__PURE__ */ jsx51(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs31(PieChart, { children: [
|
|
2541
|
+
/* @__PURE__ */ jsxs31(
|
|
2632
2542
|
Pie,
|
|
2633
2543
|
{
|
|
2634
2544
|
data,
|
|
@@ -2640,8 +2550,8 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2640
2550
|
labelLine: false,
|
|
2641
2551
|
isAnimationActive: false,
|
|
2642
2552
|
children: [
|
|
2643
|
-
data.map((entry, index) => /* @__PURE__ */
|
|
2644
|
-
/* @__PURE__ */
|
|
2553
|
+
data.map((entry, index) => /* @__PURE__ */ jsx51(Cell, { fill: entry.color }, `cell-${index}`)),
|
|
2554
|
+
/* @__PURE__ */ jsx51(
|
|
2645
2555
|
LabelList,
|
|
2646
2556
|
{
|
|
2647
2557
|
dataKey: "value",
|
|
@@ -2652,14 +2562,14 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2652
2562
|
]
|
|
2653
2563
|
}
|
|
2654
2564
|
),
|
|
2655
|
-
/* @__PURE__ */
|
|
2565
|
+
/* @__PURE__ */ jsx51(Tooltip2, { formatter: (value, name) => [`${value}k`, name] })
|
|
2656
2566
|
] }) }),
|
|
2657
|
-
/* @__PURE__ */
|
|
2567
|
+
/* @__PURE__ */ jsxs31("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-2xl md:text-4xl font-bold text-[#000]", children: [
|
|
2658
2568
|
total,
|
|
2659
2569
|
"k"
|
|
2660
2570
|
] })
|
|
2661
2571
|
] }),
|
|
2662
|
-
/* @__PURE__ */
|
|
2572
|
+
/* @__PURE__ */ jsx51("div", { className: `flex ${forceDesktop ? "flex-col ml-auto space-y-3" : "flex-wrap justify-center gap-2 mt-4"}
|
|
2663
2573
|
w-full md:w-auto`, children: renderLegends() })
|
|
2664
2574
|
]
|
|
2665
2575
|
}
|
|
@@ -2668,10 +2578,10 @@ var DonutChart = ({ className, style, ...props }) => {
|
|
|
2668
2578
|
var PieChart_default = DonutChart;
|
|
2669
2579
|
|
|
2670
2580
|
// src/components/Blocks/EmailComposer.tsx
|
|
2671
|
-
import { jsx as
|
|
2581
|
+
import { jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2672
2582
|
function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
|
|
2673
|
-
return /* @__PURE__ */
|
|
2674
|
-
/* @__PURE__ */
|
|
2583
|
+
return /* @__PURE__ */ jsx52("div", { className, style, children: /* @__PURE__ */ jsxs32("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
|
|
2584
|
+
/* @__PURE__ */ jsx52("div", { className: "mb-3", children: /* @__PURE__ */ jsx52(
|
|
2675
2585
|
"input",
|
|
2676
2586
|
{
|
|
2677
2587
|
type: "email",
|
|
@@ -2680,8 +2590,8 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2680
2590
|
required: true
|
|
2681
2591
|
}
|
|
2682
2592
|
) }),
|
|
2683
|
-
/* @__PURE__ */
|
|
2684
|
-
/* @__PURE__ */
|
|
2593
|
+
/* @__PURE__ */ jsx52("div", { className: "mb-3", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
2594
|
+
/* @__PURE__ */ jsx52(
|
|
2685
2595
|
"input",
|
|
2686
2596
|
{
|
|
2687
2597
|
type: "email",
|
|
@@ -2692,7 +2602,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2692
2602
|
required: true
|
|
2693
2603
|
}
|
|
2694
2604
|
),
|
|
2695
|
-
!showCc && /* @__PURE__ */
|
|
2605
|
+
!showCc && /* @__PURE__ */ jsx52(
|
|
2696
2606
|
"button",
|
|
2697
2607
|
{
|
|
2698
2608
|
onClick: () => setShowCc?.(true),
|
|
@@ -2700,7 +2610,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2700
2610
|
children: "Cc"
|
|
2701
2611
|
}
|
|
2702
2612
|
),
|
|
2703
|
-
!showBcc && /* @__PURE__ */
|
|
2613
|
+
!showBcc && /* @__PURE__ */ jsx52(
|
|
2704
2614
|
"button",
|
|
2705
2615
|
{
|
|
2706
2616
|
onClick: () => setShowBcc?.(true),
|
|
@@ -2709,7 +2619,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2709
2619
|
}
|
|
2710
2620
|
)
|
|
2711
2621
|
] }) }),
|
|
2712
|
-
showCc && /* @__PURE__ */
|
|
2622
|
+
showCc && /* @__PURE__ */ jsx52("div", { className: "mb-3", children: /* @__PURE__ */ jsx52(
|
|
2713
2623
|
"input",
|
|
2714
2624
|
{
|
|
2715
2625
|
type: "text",
|
|
@@ -2719,7 +2629,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2719
2629
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
2720
2630
|
}
|
|
2721
2631
|
) }),
|
|
2722
|
-
showBcc && /* @__PURE__ */
|
|
2632
|
+
showBcc && /* @__PURE__ */ jsx52("div", { className: "mb-3", children: /* @__PURE__ */ jsx52(
|
|
2723
2633
|
"input",
|
|
2724
2634
|
{
|
|
2725
2635
|
type: "text",
|
|
@@ -2729,7 +2639,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2729
2639
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
2730
2640
|
}
|
|
2731
2641
|
) }),
|
|
2732
|
-
/* @__PURE__ */
|
|
2642
|
+
/* @__PURE__ */ jsx52("div", { className: "mb-3", children: /* @__PURE__ */ jsx52(
|
|
2733
2643
|
"input",
|
|
2734
2644
|
{
|
|
2735
2645
|
type: "text",
|
|
@@ -2739,11 +2649,11 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
|
|
|
2739
2649
|
className: "w-full flex-1 border-2 rounded-md h-[40px] px-3 focus:outline-none border-[#E9E9E9] text-[#383838]"
|
|
2740
2650
|
}
|
|
2741
2651
|
) }),
|
|
2742
|
-
/* @__PURE__ */
|
|
2743
|
-
/* @__PURE__ */
|
|
2744
|
-
/* @__PURE__ */
|
|
2745
|
-
/* @__PURE__ */
|
|
2746
|
-
/* @__PURE__ */
|
|
2652
|
+
/* @__PURE__ */ jsx52("div", { className: "mb-4", children: /* @__PURE__ */ jsx52(MyEditor, { value: body, onChange: setBody }) }),
|
|
2653
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex justify-end gap-2", children: [
|
|
2654
|
+
/* @__PURE__ */ jsx52("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
|
|
2655
|
+
/* @__PURE__ */ jsx52("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
|
|
2656
|
+
/* @__PURE__ */ jsx52("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
|
|
2747
2657
|
] })
|
|
2748
2658
|
] }) });
|
|
2749
2659
|
}
|