@algorithm-shift/design-system 1.2.25 → 1.2.27

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.mjs CHANGED
@@ -119,18 +119,16 @@ import { jsx as jsx6 } from "react/jsx-runtime";
119
119
  var ButtonComponent = ({
120
120
  className,
121
121
  style,
122
- textContent = "Button"
122
+ textContent = "Button",
123
+ type = "button",
124
+ ...props
123
125
  }) => {
124
- const classNames = cn(
125
- "inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium",
126
- "bg-[#000000] text-white transition-colors disabled:opacity-50",
127
- className
128
- );
129
126
  return /* @__PURE__ */ jsx6(
130
127
  Button,
131
128
  {
132
- type: "button",
133
- className: classNames,
129
+ ...props,
130
+ type,
131
+ className,
134
132
  style,
135
133
  children: textContent
136
134
  }
@@ -239,7 +237,15 @@ var TextInput = ({ className, style, ...props }) => {
239
237
  const isAutocomplete = props.isAutocomplete ?? false;
240
238
  const [value, setValue] = React2.useState("");
241
239
  const [error, setError] = React2.useState(null);
240
+ React2.useEffect(() => {
241
+ if (!props.validateOnMount) return;
242
+ setError(props.errorMessage || null);
243
+ }, [props.errorMessage, props.validateOnMount]);
242
244
  const handleChange = (e) => {
245
+ if (props.hasFormContainer) {
246
+ props.onChange?.(e);
247
+ return;
248
+ }
243
249
  const val = e.target.value;
244
250
  if (val.length > noOfCharacters) return;
245
251
  setValue(val);
@@ -256,9 +262,13 @@ var TextInput = ({ className, style, ...props }) => {
256
262
  Input,
257
263
  {
258
264
  type: "text",
259
- className,
260
- style,
261
- value,
265
+ name: props.name,
266
+ className: cn(className, error ? "border-red-500" : ""),
267
+ style: {
268
+ ...style,
269
+ borderColor: error ? "#f87171" : style?.borderColor
270
+ },
271
+ value: props.value || value,
262
272
  autoComplete: isAutocomplete ? "on" : "off",
263
273
  placeholder,
264
274
  onChange: handleChange,
@@ -475,6 +485,7 @@ var __iconNode14 = [
475
485
  var Search = createLucideIcon("search", __iconNode14);
476
486
 
477
487
  // src/components/Inputs/NumberInput/NumberInput.tsx
488
+ import { useEffect as useEffect2 } from "react";
478
489
  import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
479
490
  var NumberInput = ({ className, style, ...props }) => {
480
491
  const placeholder = props.placeholder ?? "Placeholder text";
@@ -488,7 +499,15 @@ var NumberInput = ({ className, style, ...props }) => {
488
499
  const isAutocomplete = props.isAutocomplete ?? false;
489
500
  const [value, setValue] = React3.useState("");
490
501
  const [error, setError] = React3.useState(null);
502
+ useEffect2(() => {
503
+ if (!props.validateOnMount) return;
504
+ setError(props.errorMessage || null);
505
+ }, [props.errorMessage, props.validateOnMount]);
491
506
  const handleChange = (e) => {
507
+ if (props.hasFormContainer) {
508
+ props.onChange?.(e);
509
+ return;
510
+ }
492
511
  const val = e.target.value;
493
512
  if (val.length > noOfCharacters) return;
494
513
  setValue(val);
@@ -508,9 +527,13 @@ var NumberInput = ({ className, style, ...props }) => {
508
527
  {
509
528
  type: "number",
510
529
  id: "number-field",
511
- value,
512
- className,
513
- style,
530
+ name: props.name,
531
+ value: props.value || value,
532
+ className: cn(className, error ? "border-red-500" : ""),
533
+ style: {
534
+ ...style,
535
+ borderColor: error ? "#f87171" : style?.borderColor
536
+ },
514
537
  autoComplete: isAutocomplete ? "on" : "off",
515
538
  placeholder,
516
539
  onChange: handleChange,
@@ -542,7 +565,15 @@ var EmailInput = ({ className, style, ...props }) => {
542
565
  const isAutocomplete = props.isAutocomplete ?? false;
543
566
  const [value, setValue] = React4.useState("");
544
567
  const [error, setError] = React4.useState(null);
568
+ React4.useEffect(() => {
569
+ if (!props.validateOnMount) return;
570
+ setError(props.errorMessage || null);
571
+ }, [props.errorMessage, props.validateOnMount]);
545
572
  const handleChange = (e) => {
573
+ if (props.hasFormContainer) {
574
+ props.onChange?.(e);
575
+ return;
576
+ }
546
577
  const val = e.target.value;
547
578
  if (val.length > noOfCharacters) return;
548
579
  setValue(val);
@@ -561,9 +592,13 @@ var EmailInput = ({ className, style, ...props }) => {
561
592
  Input,
562
593
  {
563
594
  type: "email",
564
- value,
565
- className,
566
- style,
595
+ name: props.name,
596
+ value: props.value || value,
597
+ className: cn(className, error ? "border-red-500" : ""),
598
+ style: {
599
+ ...style,
600
+ borderColor: error ? "#f87171" : style?.borderColor
601
+ },
567
602
  autoComplete: isAutocomplete ? "on" : "off",
568
603
  placeholder,
569
604
  onChange: handleChange,
@@ -595,7 +630,15 @@ var PasswordInput = ({ className, style, ...props }) => {
595
630
  const isAutocomplete = props.isAutocomplete ?? false;
596
631
  const [value, setValue] = React5.useState("");
597
632
  const [error, setError] = React5.useState(null);
633
+ React5.useEffect(() => {
634
+ if (!props.validateOnMount) return;
635
+ setError(props.errorMessage || null);
636
+ }, [props.errorMessage, props.validateOnMount]);
598
637
  const handleChange = (e) => {
638
+ if (props.hasFormContainer) {
639
+ props.onChange?.(e);
640
+ return;
641
+ }
599
642
  const val = e.target.value;
600
643
  if (val.length > noOfCharacters) return;
601
644
  setValue(val);
@@ -615,9 +658,13 @@ var PasswordInput = ({ className, style, ...props }) => {
615
658
  {
616
659
  type: "password",
617
660
  id: "password-field",
618
- className,
619
- style,
620
- value,
661
+ name: props.name,
662
+ value: props.value || value,
663
+ className: cn(className, error ? "border-red-500" : ""),
664
+ style: {
665
+ ...style,
666
+ borderColor: error ? "#f87171" : style?.borderColor
667
+ },
621
668
  autoComplete: isAutocomplete ? "on" : "off",
622
669
  placeholder,
623
670
  onChange: handleChange,
@@ -667,7 +714,15 @@ var Textarea2 = ({ className, style, ...props }) => {
667
714
  const isAutocomplete = props.isAutocomplete ?? false;
668
715
  const [value, setValue] = React6.useState("");
669
716
  const [error, setError] = React6.useState(null);
717
+ React6.useEffect(() => {
718
+ if (!props.validateOnMount) return;
719
+ setError(props.errorMessage || null);
720
+ }, [props.errorMessage, props.validateOnMount]);
670
721
  const handleChange = (e) => {
722
+ if (props.hasFormContainer) {
723
+ props.onChange?.(e);
724
+ return;
725
+ }
671
726
  const val = e.target.value;
672
727
  if (val.length > noOfCharacters) return;
673
728
  setValue(val);
@@ -684,9 +739,13 @@ var Textarea2 = ({ className, style, ...props }) => {
684
739
  Textarea,
685
740
  {
686
741
  id: "textarea-field",
687
- className,
688
- style,
689
- value,
742
+ name: props.name,
743
+ value: props.value || value,
744
+ className: cn(className, error ? "border-red-500" : ""),
745
+ style: {
746
+ ...style,
747
+ borderColor: error ? "#f87171" : style?.borderColor
748
+ },
690
749
  autoComplete: isAutocomplete ? "on" : "off",
691
750
  placeholder,
692
751
  onChange: handleChange,
@@ -716,7 +775,15 @@ var UrlInput = ({ className, style, ...props }) => {
716
775
  const isAutocomplete = props.isAutocomplete ?? false;
717
776
  const [value, setValue] = React7.useState("");
718
777
  const [error, setError] = React7.useState(null);
778
+ React7.useEffect(() => {
779
+ if (!props.validateOnMount) return;
780
+ setError(props.errorMessage || null);
781
+ }, [props.errorMessage, props.validateOnMount]);
719
782
  const handleChange = (e) => {
783
+ if (props.hasFormContainer) {
784
+ props.onChange?.(e);
785
+ return;
786
+ }
720
787
  const val = e.target.value;
721
788
  if (val.length > noOfCharacters) return;
722
789
  setValue(val);
@@ -734,11 +801,15 @@ var UrlInput = ({ className, style, ...props }) => {
734
801
  /* @__PURE__ */ jsx16(
735
802
  Input,
736
803
  {
737
- type: "url",
738
- className,
739
- style,
740
804
  id: "url-field",
741
- value,
805
+ type: "url",
806
+ name: props.name,
807
+ value: props.value || value,
808
+ className: cn(className, error ? "border-red-500" : ""),
809
+ style: {
810
+ ...style,
811
+ borderColor: error ? "#f87171" : style?.borderColor
812
+ },
742
813
  autoComplete: isAutocomplete ? "on" : "off",
743
814
  placeholder,
744
815
  onChange: handleChange,
@@ -885,6 +956,9 @@ var MultiCheckbox = ({ className, style, ...props }) => {
885
956
  };
886
957
  var MultiCheckbox_default = MultiCheckbox;
887
958
 
959
+ // src/components/Inputs/RichText/RichText.tsx
960
+ import { useEffect as useEffect7, useState as useState7 } from "react";
961
+
888
962
  // src/components/Global/TinyMceEditor.tsx
889
963
  import { useMemo, useRef } from "react";
890
964
  import { Editor } from "@tinymce/tinymce-react";
@@ -957,9 +1031,27 @@ function MyEditor({
957
1031
  }
958
1032
 
959
1033
  // src/components/Inputs/RichText/RichText.tsx
960
- import { jsx as jsx24 } from "react/jsx-runtime";
961
- function RichText({ className, style }) {
962
- return /* @__PURE__ */ jsx24("div", { className, style, children: /* @__PURE__ */ jsx24(MyEditor, { isDefault: true }) });
1034
+ import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
1035
+ function RichText({ className, style, ...props }) {
1036
+ const [error, setError] = useState7(null);
1037
+ useEffect7(() => {
1038
+ if (!props.validateOnMount) return;
1039
+ setError(props.errorMessage || null);
1040
+ }, [props.errorMessage, props.validateOnMount]);
1041
+ return /* @__PURE__ */ jsxs11(
1042
+ "div",
1043
+ {
1044
+ className: cn(className, error ? "border-red-500" : ""),
1045
+ style: {
1046
+ ...style,
1047
+ borderColor: error ? "#f87171" : style?.borderColor
1048
+ },
1049
+ children: [
1050
+ /* @__PURE__ */ jsx24(MyEditor, { onChange: (content) => props.onChange?.(content), value: props.value, isDefault: true }),
1051
+ error && /* @__PURE__ */ jsx24("p", { className: "mt-1 text-xs text-red-500", children: error })
1052
+ ]
1053
+ }
1054
+ );
963
1055
  }
964
1056
 
965
1057
  // src/components/Inputs/Dropdown/Dropdown.tsx
@@ -967,7 +1059,7 @@ import * as React8 from "react";
967
1059
 
968
1060
  // src/components/ui/select.tsx
969
1061
  import * as SelectPrimitive from "@radix-ui/react-select";
970
- import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
1062
+ import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
971
1063
  function Select({
972
1064
  ...props
973
1065
  }) {
@@ -984,7 +1076,7 @@ function SelectTrigger({
984
1076
  children,
985
1077
  ...props
986
1078
  }) {
987
- return /* @__PURE__ */ jsxs11(
1079
+ return /* @__PURE__ */ jsxs12(
988
1080
  SelectPrimitive.Trigger,
989
1081
  {
990
1082
  "data-slot": "select-trigger",
@@ -1007,7 +1099,7 @@ function SelectContent({
1007
1099
  position = "popper",
1008
1100
  ...props
1009
1101
  }) {
1010
- return /* @__PURE__ */ jsx25(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs11(
1102
+ return /* @__PURE__ */ jsx25(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs12(
1011
1103
  SelectPrimitive.Content,
1012
1104
  {
1013
1105
  "data-slot": "select-content",
@@ -1040,7 +1132,7 @@ function SelectItem({
1040
1132
  children,
1041
1133
  ...props
1042
1134
  }) {
1043
- return /* @__PURE__ */ jsxs11(
1135
+ return /* @__PURE__ */ jsxs12(
1044
1136
  SelectPrimitive.Item,
1045
1137
  {
1046
1138
  "data-slot": "select-item",
@@ -1092,7 +1184,7 @@ function SelectScrollDownButton({
1092
1184
  }
1093
1185
 
1094
1186
  // src/components/Global/SelectDropdown.tsx
1095
- import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
1187
+ import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
1096
1188
  function SelectDropdown({
1097
1189
  options,
1098
1190
  placeholder = "Select an option",
@@ -1102,9 +1194,10 @@ function SelectDropdown({
1102
1194
  id,
1103
1195
  disabled,
1104
1196
  readOnly,
1105
- style
1197
+ style,
1198
+ name
1106
1199
  }) {
1107
- return /* @__PURE__ */ jsxs12(Select, { value, onValueChange: onChange, disabled, children: [
1200
+ return /* @__PURE__ */ jsxs13(Select, { name, value, onValueChange: onChange, disabled, children: [
1108
1201
  /* @__PURE__ */ jsx26(
1109
1202
  SelectTrigger,
1110
1203
  {
@@ -1120,7 +1213,7 @@ function SelectDropdown({
1120
1213
  }
1121
1214
 
1122
1215
  // src/components/Inputs/Dropdown/Dropdown.tsx
1123
- import { Fragment as Fragment7, jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
1216
+ import { Fragment as Fragment7, jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
1124
1217
  var Dropdown = ({ className, style, ...props }) => {
1125
1218
  const text = Array.isArray(props.text) ? props.text : [props.text ?? "Default"];
1126
1219
  const placeholder = props.placeholder ? props.placeholder : "Placeholder text";
@@ -1137,7 +1230,15 @@ var Dropdown = ({ className, style, ...props }) => {
1137
1230
  const isAutocomplete = props.isAutocomplete ?? false;
1138
1231
  const [value, setValue] = React8.useState("");
1139
1232
  const [error, setError] = React8.useState(null);
1233
+ React8.useEffect(() => {
1234
+ if (!props.validateOnMount) return;
1235
+ setError(props.errorMessage || null);
1236
+ }, [props.errorMessage, props.validateOnMount]);
1140
1237
  const handleChange = (val) => {
1238
+ if (props.hasFormContainer) {
1239
+ props.onChange?.(val);
1240
+ return;
1241
+ }
1141
1242
  setValue(val);
1142
1243
  if (isRequired && val.trim() === "") {
1143
1244
  setError(errorMessage);
@@ -1147,16 +1248,20 @@ var Dropdown = ({ className, style, ...props }) => {
1147
1248
  setError(null);
1148
1249
  }
1149
1250
  };
1150
- return /* @__PURE__ */ jsxs13(Fragment7, { children: [
1251
+ return /* @__PURE__ */ jsxs14(Fragment7, { children: [
1151
1252
  /* @__PURE__ */ jsx27("div", { className: "flex gap-3 flex-col", children: /* @__PURE__ */ jsx27(
1152
1253
  SelectDropdown,
1153
1254
  {
1154
1255
  options: formatList,
1155
1256
  placeholder,
1156
1257
  id: "select-field",
1157
- value,
1158
- className,
1159
- style,
1258
+ name: props.name,
1259
+ value: props.value || value,
1260
+ className: cn(className, error ? "border-red-500" : ""),
1261
+ style: {
1262
+ ...style,
1263
+ borderColor: error ? "#f87171" : style?.borderColor
1264
+ },
1160
1265
  autoComplete: isAutocomplete ? "on" : "off",
1161
1266
  onChange: handleChange,
1162
1267
  disabled: isDisabled || !isEditable,
@@ -1200,10 +1305,10 @@ function Switch({
1200
1305
  }
1201
1306
 
1202
1307
  // src/components/Inputs/SwitchToggle/SwitchToggle.tsx
1203
- import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
1308
+ import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
1204
1309
  var SwitchToggle = ({ className, style, ...props }) => {
1205
1310
  const text = Array.isArray(props.text) ? props.text : [props.text ?? "Subscribe"];
1206
- return /* @__PURE__ */ jsx29("div", { className, style, children: text?.map((item, index) => /* @__PURE__ */ jsxs14("div", { className: "flex items-center space-x-2 mb-2", children: [
1311
+ return /* @__PURE__ */ jsx29("div", { className, style, children: text?.map((item, index) => /* @__PURE__ */ jsxs15("div", { className: "flex items-center space-x-2 mb-2", children: [
1207
1312
  /* @__PURE__ */ jsx29(Switch, { id: `switch-${index}` }),
1208
1313
  /* @__PURE__ */ jsx29(Label, { htmlFor: `switch-${index}`, children: item })
1209
1314
  ] }, index)) });
@@ -1214,7 +1319,7 @@ var SwitchToggle_default = SwitchToggle;
1214
1319
  import * as React9 from "react";
1215
1320
  import { PhoneInput as PhoneInputField } from "react-international-phone";
1216
1321
  import "react-international-phone/style.css";
1217
- import { Fragment as Fragment8, jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
1322
+ import { Fragment as Fragment8, jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
1218
1323
  var PhoneInput = ({ className, style, ...props }) => {
1219
1324
  const placeholder = props.placeholder ?? "Enter phone number";
1220
1325
  const [value, setValue] = React9.useState("");
@@ -1225,7 +1330,15 @@ var PhoneInput = ({ className, style, ...props }) => {
1225
1330
  const isEditable = props.isEditable ?? true;
1226
1331
  const isDisabled = props.isDisabled ?? false;
1227
1332
  const [error, setError] = React9.useState(null);
1333
+ React9.useEffect(() => {
1334
+ if (!props.validateOnMount) return;
1335
+ setError(props.errorMessage || null);
1336
+ }, [props.errorMessage, props.validateOnMount]);
1228
1337
  const handleChange = (val) => {
1338
+ if (props.hasFormContainer) {
1339
+ props.onChange?.(val);
1340
+ return;
1341
+ }
1229
1342
  if (val.length > noOfCharacters) return;
1230
1343
  setValue(val);
1231
1344
  if (isRequired && val.trim() === "") {
@@ -1236,12 +1349,18 @@ var PhoneInput = ({ className, style, ...props }) => {
1236
1349
  setError(null);
1237
1350
  }
1238
1351
  };
1239
- return /* @__PURE__ */ jsxs15(Fragment8, { children: [
1352
+ return /* @__PURE__ */ jsxs16(Fragment8, { children: [
1240
1353
  /* @__PURE__ */ jsx30(
1241
1354
  PhoneInputField,
1242
1355
  {
1243
1356
  defaultCountry: "in",
1244
- value,
1357
+ name: props.name,
1358
+ value: props.value || value,
1359
+ className: cn(className, error ? "border-red-500" : ""),
1360
+ style: {
1361
+ ...style,
1362
+ borderColor: error ? "#f87171" : style?.borderColor
1363
+ },
1245
1364
  onChange: (phone) => handleChange(phone),
1246
1365
  inputProps: {
1247
1366
  id: "phone-field",
@@ -1249,9 +1368,7 @@ var PhoneInput = ({ className, style, ...props }) => {
1249
1368
  },
1250
1369
  placeholder,
1251
1370
  disabled: isDisabled || !isEditable,
1252
- required: isRequired,
1253
- className,
1254
- style
1371
+ required: isRequired
1255
1372
  }
1256
1373
  ),
1257
1374
  error && /* @__PURE__ */ jsx30("p", { className: "mt-1 text-xs text-red-500", children: error })
@@ -1261,7 +1378,7 @@ var PhoneInput_default = PhoneInput;
1261
1378
 
1262
1379
  // src/components/Inputs/SearchInput/SearchInput.tsx
1263
1380
  import * as React10 from "react";
1264
- import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
1381
+ import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
1265
1382
  var SearchInput = ({ className, style, ...props }) => {
1266
1383
  const placeholder = props.placeholder ?? "Placeholder text";
1267
1384
  const regexPattern = props.regexPattern ?? "";
@@ -1274,7 +1391,15 @@ var SearchInput = ({ className, style, ...props }) => {
1274
1391
  const isAutocomplete = props.isAutocomplete ?? false;
1275
1392
  const [value, setValue] = React10.useState("");
1276
1393
  const [error, setError] = React10.useState(null);
1394
+ React10.useEffect(() => {
1395
+ if (!props.validateOnMount) return;
1396
+ setError(props.errorMessage || null);
1397
+ }, [props.errorMessage, props.validateOnMount]);
1277
1398
  const handleChange = (e) => {
1399
+ if (props.hasFormContainer) {
1400
+ props.onChange?.(e);
1401
+ return;
1402
+ }
1278
1403
  const val = e.target.value;
1279
1404
  if (val.length > noOfCharacters) return;
1280
1405
  setValue(val);
@@ -1286,17 +1411,21 @@ var SearchInput = ({ className, style, ...props }) => {
1286
1411
  setError(null);
1287
1412
  }
1288
1413
  };
1289
- return /* @__PURE__ */ jsxs16(Fragment9, { children: [
1290
- /* @__PURE__ */ jsxs16("div", { className: "flex justify-start items-center relative", children: [
1414
+ return /* @__PURE__ */ jsxs17(Fragment9, { children: [
1415
+ /* @__PURE__ */ jsxs17("div", { className: "flex justify-start items-center relative", children: [
1291
1416
  /* @__PURE__ */ jsx31(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
1292
1417
  /* @__PURE__ */ jsx31(
1293
1418
  Input,
1294
1419
  {
1295
1420
  type: "text",
1296
1421
  id: "text-field",
1297
- className,
1298
- style,
1299
- value,
1422
+ name: props.name,
1423
+ value: props.value || value,
1424
+ className: cn(className, error ? "border-red-500" : ""),
1425
+ style: {
1426
+ ...style,
1427
+ borderColor: error ? "#f87171" : style?.borderColor
1428
+ },
1300
1429
  autoComplete: isAutocomplete ? "on" : "off",
1301
1430
  placeholder,
1302
1431
  onChange: handleChange,
@@ -1314,29 +1443,46 @@ var SearchInput = ({ className, style, ...props }) => {
1314
1443
  var SearchInput_default = SearchInput;
1315
1444
 
1316
1445
  // src/components/Inputs/FileInput/FileInput.tsx
1317
- import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
1446
+ import { useEffect as useEffect11, useState as useState11 } from "react";
1447
+ import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
1318
1448
  var FileInput = ({ className, style, ...props }) => {
1319
1449
  const placeholder = props.placeholder ?? "Placeholder text";
1320
- return /* @__PURE__ */ jsxs17("div", { className: "d-flex items-center relative align-middle", children: [
1321
- /* @__PURE__ */ jsx32("div", { className: "bg-[#E9E9E9] absolute px-10 text-center top-1/2 h-full justify-center items-center flex w-10 -translate-y-1/2 text-[#383838] font-[500] text-[11px]", children: "Browse" }),
1450
+ const [error, setError] = useState11(null);
1451
+ useEffect11(() => {
1452
+ if (!props.validateOnMount) return;
1453
+ setError(props.errorMessage || null);
1454
+ }, [props.errorMessage, props.validateOnMount]);
1455
+ return /* @__PURE__ */ jsxs18("div", { className: "d-flex items-center relative align-middle", children: [
1322
1456
  /* @__PURE__ */ jsx32(
1323
1457
  Input,
1324
1458
  {
1325
1459
  type: "file",
1326
1460
  id: "file",
1461
+ name: props.name,
1462
+ value: props.value,
1463
+ className: cn(className, error ? "border-red-500" : ""),
1464
+ style: {
1465
+ ...style,
1466
+ borderColor: error ? "#f87171" : style?.borderColor
1467
+ },
1327
1468
  autoComplete: "off",
1328
1469
  placeholder,
1329
- className,
1330
- style
1470
+ onChange: (e) => {
1471
+ if (props.hasFormContainer) {
1472
+ props.onChange?.(e);
1473
+ return;
1474
+ }
1475
+ }
1331
1476
  }
1332
- )
1477
+ ),
1478
+ error && /* @__PURE__ */ jsx32("p", { className: "mt-1 text-xs text-red-500", children: error })
1333
1479
  ] });
1334
1480
  };
1335
1481
  var FileInput_default = FileInput;
1336
1482
 
1337
1483
  // src/components/Inputs/DatePicker/DatePicker.tsx
1338
- import React11 from "react";
1339
- import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
1484
+ import React11, { useEffect as useEffect12 } from "react";
1485
+ import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
1340
1486
  function DatePicker({ className, style, ...props }) {
1341
1487
  const placeholder = props.placeholder ?? "Placeholder text";
1342
1488
  const minimumDate = props.minimumDate ?? "none";
@@ -1365,7 +1511,15 @@ function DatePicker({ className, style, ...props }) {
1365
1511
  };
1366
1512
  const minDate = resolveDate(minimumDate, customMinimumDate);
1367
1513
  const maxDate = resolveDate(maximumDate, customMaximumDate);
1514
+ useEffect12(() => {
1515
+ if (!props.validateOnMount) return;
1516
+ setError(props.errorMessage || null);
1517
+ }, [props.errorMessage, props.validateOnMount]);
1368
1518
  const handleChange = (e) => {
1519
+ if (props.hasFormContainer) {
1520
+ props.onChange?.(e);
1521
+ return;
1522
+ }
1369
1523
  const val = e.target.value;
1370
1524
  setValue(val);
1371
1525
  if (isRequired && val.trim() === "") {
@@ -1374,8 +1528,8 @@ function DatePicker({ className, style, ...props }) {
1374
1528
  setError(null);
1375
1529
  }
1376
1530
  };
1377
- return /* @__PURE__ */ jsxs18(Fragment10, { children: [
1378
- /* @__PURE__ */ jsxs18("div", { className: "flex justify-start items-center relative", children: [
1531
+ return /* @__PURE__ */ jsxs19(Fragment10, { children: [
1532
+ /* @__PURE__ */ jsxs19("div", { className: "flex justify-start items-center relative", children: [
1379
1533
  /* @__PURE__ */ jsx33(Calendar, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#BDBDBD]" }),
1380
1534
  /* @__PURE__ */ jsx33(
1381
1535
  Input,
@@ -1385,14 +1539,18 @@ function DatePicker({ className, style, ...props }) {
1385
1539
  autoComplete: isAutocomplete ? "on" : "off",
1386
1540
  onChange: handleChange,
1387
1541
  disabled: isDisabled || !isEditable,
1388
- value,
1542
+ name: props.name,
1543
+ value: props.value || value,
1544
+ className: cn(className, error ? "border-red-500" : ""),
1545
+ style: {
1546
+ ...style,
1547
+ borderColor: error ? "#f87171" : style?.borderColor
1548
+ },
1389
1549
  readOnly: isReadonly,
1390
1550
  required: isRequired,
1391
1551
  placeholder,
1392
1552
  min: minDate,
1393
- max: maxDate,
1394
- className,
1395
- style
1553
+ max: maxDate
1396
1554
  }
1397
1555
  )
1398
1556
  ] }),
@@ -1620,13 +1778,13 @@ function PopoverContent({
1620
1778
  }
1621
1779
 
1622
1780
  // src/components/Inputs/DateRange/DateRange.tsx
1623
- import { Fragment as Fragment11, jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
1781
+ import { Fragment as Fragment11, jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
1624
1782
  var DateRange = ({ className, style }) => {
1625
1783
  const [date, setDate] = React13.useState({
1626
1784
  from: /* @__PURE__ */ new Date(),
1627
1785
  to: addDays(/* @__PURE__ */ new Date(), 7)
1628
1786
  });
1629
- return /* @__PURE__ */ jsx36("div", { className, style, children: /* @__PURE__ */ jsxs19(Popover, { children: [
1787
+ return /* @__PURE__ */ jsx36("div", { className, style, children: /* @__PURE__ */ jsxs20(Popover, { children: [
1630
1788
  /* @__PURE__ */ jsx36(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx36(
1631
1789
  Button,
1632
1790
  {
@@ -1636,7 +1794,7 @@ var DateRange = ({ className, style }) => {
1636
1794
  "w-[300px] justify-start text-left font-normal text-[11px]",
1637
1795
  !date && "text-muted-foreground"
1638
1796
  ),
1639
- children: date?.from ? date.to ? /* @__PURE__ */ jsxs19(Fragment11, { children: [
1797
+ children: date?.from ? date.to ? /* @__PURE__ */ jsxs20(Fragment11, { children: [
1640
1798
  format(date.from, "LLL dd, y"),
1641
1799
  " -",
1642
1800
  " ",
@@ -1751,7 +1909,7 @@ function TableCell({ className, ...props }) {
1751
1909
  }
1752
1910
 
1753
1911
  // src/components/ui/data-table.tsx
1754
- import { Fragment as Fragment12, jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
1912
+ import { Fragment as Fragment12, jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
1755
1913
  function DataTable({
1756
1914
  columns,
1757
1915
  rowActions,
@@ -1776,14 +1934,14 @@ function DataTable({
1776
1934
  onCellClick(rowData, columnId);
1777
1935
  }
1778
1936
  };
1779
- return /* @__PURE__ */ jsx38("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ jsxs20(Table, { children: [
1937
+ return /* @__PURE__ */ jsx38("div", { className: "overflow-hidden rounded-md border w-full", children: /* @__PURE__ */ jsxs21(Table, { children: [
1780
1938
  /* @__PURE__ */ jsx38(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx38(TableRow, { children: headerGroup.headers.map((header) => {
1781
1939
  return /* @__PURE__ */ jsx38(TableHead, { children: header.isPlaceholder ? null : flexRender(
1782
1940
  header.column.columnDef.header,
1783
1941
  header.getContext()
1784
1942
  ) }, header.id);
1785
1943
  }) }, headerGroup.id)) }),
1786
- /* @__PURE__ */ jsx38(TableBody, { children: loading ? /* @__PURE__ */ jsx38(TableRow, { children: /* @__PURE__ */ jsx38(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ jsx38(Fragment12, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxs20(
1944
+ /* @__PURE__ */ jsx38(TableBody, { children: loading ? /* @__PURE__ */ jsx38(TableRow, { children: /* @__PURE__ */ jsx38(TableCell, { colSpan: columns.length, className: "h-24 text-center", children: "Loading..." }) }) : /* @__PURE__ */ jsx38(Fragment12, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxs21(
1787
1945
  TableRow,
1788
1946
  {
1789
1947
  "data-state": row.getIsSelected() && "selected",
@@ -1817,7 +1975,7 @@ function DataTable({
1817
1975
  }
1818
1976
 
1819
1977
  // src/components/ui/pagination.tsx
1820
- import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
1978
+ import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
1821
1979
  function Pagination({ className, ...props }) {
1822
1980
  return /* @__PURE__ */ jsx39(
1823
1981
  "nav",
@@ -1873,7 +2031,7 @@ function PaginationPrevious({
1873
2031
  className,
1874
2032
  ...props
1875
2033
  }) {
1876
- return /* @__PURE__ */ jsxs21(
2034
+ return /* @__PURE__ */ jsxs22(
1877
2035
  PaginationLink,
1878
2036
  {
1879
2037
  "aria-label": "Go to previous page",
@@ -1891,7 +2049,7 @@ function PaginationNext({
1891
2049
  className,
1892
2050
  ...props
1893
2051
  }) {
1894
- return /* @__PURE__ */ jsxs21(
2052
+ return /* @__PURE__ */ jsxs22(
1895
2053
  PaginationLink,
1896
2054
  {
1897
2055
  "aria-label": "Go to next page",
@@ -1909,7 +2067,7 @@ function PaginationEllipsis({
1909
2067
  className,
1910
2068
  ...props
1911
2069
  }) {
1912
- return /* @__PURE__ */ jsxs21(
2070
+ return /* @__PURE__ */ jsxs22(
1913
2071
  "span",
1914
2072
  {
1915
2073
  "aria-hidden": true,
@@ -1925,7 +2083,7 @@ function PaginationEllipsis({
1925
2083
  }
1926
2084
 
1927
2085
  // src/components/DataDisplay/Pagination/Pagination.tsx
1928
- import { jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
2086
+ import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
1929
2087
  var CustomPagination = ({
1930
2088
  totalPages,
1931
2089
  currentPage,
@@ -1967,7 +2125,7 @@ var CustomPagination = ({
1967
2125
  }
1968
2126
  };
1969
2127
  const pageNumbers = getPageNumbers();
1970
- return /* @__PURE__ */ jsx40(Pagination, { children: /* @__PURE__ */ jsxs22(PaginationContent, { children: [
2128
+ return /* @__PURE__ */ jsx40(Pagination, { children: /* @__PURE__ */ jsxs23(PaginationContent, { children: [
1971
2129
  /* @__PURE__ */ jsx40(PaginationItem, { children: /* @__PURE__ */ jsx40(
1972
2130
  PaginationPrevious,
1973
2131
  {
@@ -1996,20 +2154,20 @@ var CustomPagination = ({
1996
2154
  var Pagination_default = CustomPagination;
1997
2155
 
1998
2156
  // src/components/DataDisplay/Table/Table.tsx
1999
- import { useState as useState11 } from "react";
2000
- import { jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
2157
+ import { useState as useState13 } from "react";
2158
+ import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
2001
2159
  var Table2 = ({ columns, data, rowActions, className, style, pagination = false, itemsPerPage = 10, onPageChange }) => {
2002
2160
  const rawColumns = Array.isArray(columns) ? columns : [];
2003
2161
  const rawData = Array.isArray(data) ? data : [];
2004
2162
  const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
2005
- const [currentPage, setCurrentPage] = useState11(1);
2163
+ const [currentPage, setCurrentPage] = useState13(1);
2006
2164
  const enablePagination = pagination && rawData.length > itemsPerPage;
2007
2165
  const handlePageChange = (page) => {
2008
2166
  setCurrentPage(page);
2009
2167
  onPageChange?.(page);
2010
2168
  };
2011
2169
  const paginatedData = enablePagination ? rawData.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage) : rawData;
2012
- return /* @__PURE__ */ jsxs23("div", { className: `${className} space-y-3`, style, children: [
2170
+ return /* @__PURE__ */ jsxs24("div", { className: `${className} space-y-3`, style, children: [
2013
2171
  /* @__PURE__ */ jsx41(DataTable, { columns: rawColumns, data: paginatedData, rowActions: rawRowActions }),
2014
2172
  enablePagination && /* @__PURE__ */ jsx41(
2015
2173
  Pagination_default,
@@ -2025,7 +2183,7 @@ var Table_default = Table2;
2025
2183
 
2026
2184
  // src/components/ui/dropdown-menu.tsx
2027
2185
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
2028
- import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
2186
+ import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
2029
2187
  function DropdownMenu({
2030
2188
  ...props
2031
2189
  }) {
@@ -2113,7 +2271,7 @@ function DropdownMenuSeparator({
2113
2271
  }
2114
2272
 
2115
2273
  // src/components/Navigation/Tabs/Tabs.tsx
2116
- import { jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
2274
+ import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
2117
2275
  var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
2118
2276
  const rawTabs = Array.isArray(tabs) ? tabs : [];
2119
2277
  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 ";
@@ -2131,8 +2289,8 @@ var Tabs = ({ tabs, className, style, pathname, LinkComponent }) => {
2131
2289
  ].join(" ");
2132
2290
  const hasDropdown = Array.isArray(tab.children) && tab.children.length > 0 && tab.isDropDown;
2133
2291
  if (hasDropdown) {
2134
- return /* @__PURE__ */ jsxs25(DropdownMenu, { children: [
2135
- /* @__PURE__ */ jsxs25(
2292
+ return /* @__PURE__ */ jsxs26(DropdownMenu, { children: [
2293
+ /* @__PURE__ */ jsxs26(
2136
2294
  DropdownMenuTrigger,
2137
2295
  {
2138
2296
  className: `${finalClasses} inline-flex items-center gap-1`,
@@ -2168,11 +2326,11 @@ var Tabs_default = Tabs;
2168
2326
 
2169
2327
  // src/components/Navigation/Stages/Stages.tsx
2170
2328
  import React14 from "react";
2171
- import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
2329
+ import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
2172
2330
  var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
2173
- return /* @__PURE__ */ jsx44("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: [
2331
+ return /* @__PURE__ */ jsx44("div", { className, style, children: /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between bg-gray-50 p-2 rounded-lg border border-gray-200 w-full", children: [
2174
2332
  /* @__PURE__ */ jsx44("div", { className: "flex items-center", children: /* @__PURE__ */ jsx44("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ jsx44("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx44("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
2175
- /* @__PURE__ */ jsx44("div", { className: "flex items-center flex-1 px-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ jsxs26(React14.Fragment, { children: [
2333
+ /* @__PURE__ */ jsx44("div", { className: "flex items-center flex-1 px-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ jsxs27(React14.Fragment, { children: [
2176
2334
  /* @__PURE__ */ jsx44(
2177
2335
  "button",
2178
2336
  {
@@ -2196,9 +2354,9 @@ var Spacer = ({ className, style }) => {
2196
2354
  var Spacer_default = Spacer;
2197
2355
 
2198
2356
  // src/components/Navigation/Profile/Profile.tsx
2199
- import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
2357
+ import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
2200
2358
  var Profile = ({ profileType, showName, userName, className, style }) => {
2201
- return /* @__PURE__ */ jsx46("div", { className, style, children: /* @__PURE__ */ jsxs27("div", { className: "flex gap-2 items-center justify-between w-30 cursor-pointer", children: [
2359
+ return /* @__PURE__ */ jsx46("div", { className, style, children: /* @__PURE__ */ jsxs28("div", { className: "flex gap-2 items-center justify-between w-30 cursor-pointer", children: [
2202
2360
  showName && /* @__PURE__ */ jsx46("h4", { className: "text-[#000000] dark:text-[#fff] text-[13px] font-[500] mb-0", children: userName }),
2203
2361
  profileType === "avatar" ? /* @__PURE__ */ jsx46(
2204
2362
  "img",
@@ -2214,9 +2372,9 @@ var Profile = ({ profileType, showName, userName, className, style }) => {
2214
2372
  var Profile_default = Profile;
2215
2373
 
2216
2374
  // src/components/Navigation/Notification/Notification.tsx
2217
- import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
2375
+ import { jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
2218
2376
  var Notification = ({ className, style, badgeType, badgeCount = 0, hideBadgeWhenZero }) => {
2219
- return /* @__PURE__ */ jsx47("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: [
2377
+ return /* @__PURE__ */ jsx47("div", { className, style, children: /* @__PURE__ */ jsxs29("div", { className: "w-[34px] h-[34px] bg-[#E9E9E9] rounded-md text-center flex items-center justify-center relative", children: [
2220
2378
  /* @__PURE__ */ jsx47(
2221
2379
  "img",
2222
2380
  {
@@ -2298,7 +2456,7 @@ var AvatarFallback = React15.forwardRef(({ className, ...props }, ref) => /* @__
2298
2456
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
2299
2457
 
2300
2458
  // src/components/Navigation/Navbar/Navbar.tsx
2301
- import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
2459
+ import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs30 } from "react/jsx-runtime";
2302
2460
  function Navbar({
2303
2461
  style,
2304
2462
  badgeType,
@@ -2313,10 +2471,10 @@ function Navbar({
2313
2471
  ImageComponent
2314
2472
  }) {
2315
2473
  const isMobileView = canvasMode === "mobile" || canvasMode === "tablet";
2316
- return /* @__PURE__ */ jsx50("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: [
2474
+ return /* @__PURE__ */ jsx50("nav", { className: "w-full border-b bg-white shadow-sm", style, children: /* @__PURE__ */ jsxs30("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 py-2", children: [
2317
2475
  LinkComponent && ImageComponent ? /* @__PURE__ */ jsx50(LinkComponent, { href: "/", className: "flex items-center space-x-2", children: imageUrl ? /* @__PURE__ */ jsx50(ImageComponent, { src: imageUrl, alt: altText, width: 200, height: 200 }) : /* @__PURE__ */ jsx50("span", { className: "font-semibold text-blue-700", children: "Logo" }) }) : /* @__PURE__ */ jsx50("span", { className: "font-semibold text-blue-700", children: "Logo" }),
2318
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center space-x-3", children: [
2319
- !isMobileView ? /* @__PURE__ */ jsx50("div", { className: "flex-1 px-6", children: /* @__PURE__ */ jsxs29("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
2476
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-3", children: [
2477
+ !isMobileView ? /* @__PURE__ */ jsx50("div", { className: "flex-1 px-6", children: /* @__PURE__ */ jsxs30("div", { className: "relative w-full max-w-md border border-gray-300 rounded-md", children: [
2320
2478
  /* @__PURE__ */ jsx50(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }),
2321
2479
  /* @__PURE__ */ jsx50(Input, { placeholder: "Search", className: "pl-9 text-gray-400" })
2322
2480
  ] }) }) : /* @__PURE__ */ jsx50(
@@ -2328,14 +2486,14 @@ function Navbar({
2328
2486
  children: /* @__PURE__ */ jsx50(Search, { className: "h-5 w-5 text-gray-400" })
2329
2487
  }
2330
2488
  ),
2331
- /* @__PURE__ */ jsxs29("div", { className: "relative bg-[#E9E9E9] rounded-md", children: [
2489
+ /* @__PURE__ */ jsxs30("div", { className: "relative bg-[#E9E9E9] rounded-md", children: [
2332
2490
  /* @__PURE__ */ jsx50(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsx50(Bell, { className: "h-5 w-5 text-[#1C1B1F]" }) }),
2333
2491
  badgeType === "number" && !(hideBadgeWhenZero && badgeCount === 0) && badgeCount > 0 ? /* @__PURE__ */ jsx50("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__ */ jsx50("span", { className: "absolute -top-1 -right-1 flex h-2 w-2 items-center justify-center rounded-full bg-red-500" })
2334
2492
  ] }),
2335
- /* @__PURE__ */ jsxs29(DropdownMenu, { children: [
2336
- /* @__PURE__ */ jsx50(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center space-x-2", children: [
2493
+ /* @__PURE__ */ jsxs30(DropdownMenu, { children: [
2494
+ /* @__PURE__ */ jsx50(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-2", children: [
2337
2495
  !isMobileView && showName && /* @__PURE__ */ jsx50("h4", { className: "text-[#000000] text-[13px] font-[500] mb-0", children: "Akbar Sheriff" }),
2338
- !isMobileView ? /* @__PURE__ */ jsxs29(Fragment13, { children: [
2496
+ !isMobileView ? /* @__PURE__ */ jsxs30(Fragment13, { children: [
2339
2497
  /* @__PURE__ */ jsx50(Avatar, { className: "cursor-pointer h-8 w-8 text-gray-900", children: profileType === "avatar" ? /* @__PURE__ */ jsx50(
2340
2498
  AvatarImage,
2341
2499
  {
@@ -2362,7 +2520,7 @@ function Navbar({
2362
2520
  }
2363
2521
  )
2364
2522
  ] }) }),
2365
- /* @__PURE__ */ jsxs29(DropdownMenuContent, { align: "end", className: "bg-white", children: [
2523
+ /* @__PURE__ */ jsxs30(DropdownMenuContent, { align: "end", className: "bg-white", children: [
2366
2524
  /* @__PURE__ */ jsx50(DropdownMenuLabel, { className: "text-black", children: "My Account" }),
2367
2525
  /* @__PURE__ */ jsx50(DropdownMenuSeparator, {}),
2368
2526
  /* @__PURE__ */ jsx50(DropdownMenuItem, { className: "text-black", children: "Profile" }),
@@ -2376,20 +2534,20 @@ function Navbar({
2376
2534
 
2377
2535
  // src/components/Chart/BarChart.tsx
2378
2536
  import { BarChart, Bar, Area, AreaChart, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend } from "recharts";
2379
- import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
2537
+ import { jsx as jsx51, jsxs as jsxs31 } from "react/jsx-runtime";
2380
2538
  var ChartComponent = ({ className, style, ...props }) => {
2381
2539
  const data = Array.isArray(props?.data) ? props.data : [];
2382
2540
  const chartType = props.chartType || "bar";
2383
2541
  const legendsPosition = props.legendsPosition === "middle" || props.legendsPosition === "bottom" ? props.legendsPosition : "top";
2384
- return /* @__PURE__ */ jsx51("div", { className: `${className} h-[400px]`, style, children: data.length > 0 && /* @__PURE__ */ jsx51(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs30(BarChart, { data, children: [
2542
+ return /* @__PURE__ */ jsx51("div", { className: `${className} h-[400px]`, style, children: data.length > 0 && /* @__PURE__ */ jsx51(ResponsiveContainer, { width: "100%", height: "100%", children: chartType === "bar" ? /* @__PURE__ */ jsxs31(BarChart, { data, children: [
2385
2543
  /* @__PURE__ */ jsx51(CartesianGrid, { strokeDasharray: "3 3" }),
2386
2544
  /* @__PURE__ */ jsx51(XAxis, { dataKey: "name" }),
2387
2545
  /* @__PURE__ */ jsx51(YAxis, {}),
2388
2546
  /* @__PURE__ */ jsx51(Tooltip, {}),
2389
2547
  /* @__PURE__ */ jsx51(Legend, { verticalAlign: legendsPosition, align: "center" }),
2390
2548
  /* @__PURE__ */ jsx51(Bar, { dataKey: "value", fill: "#00695C" })
2391
- ] }) : /* @__PURE__ */ jsxs30(AreaChart, { data, children: [
2392
- /* @__PURE__ */ jsx51("defs", { children: /* @__PURE__ */ jsxs30("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
2549
+ ] }) : /* @__PURE__ */ jsxs31(AreaChart, { data, children: [
2550
+ /* @__PURE__ */ jsx51("defs", { children: /* @__PURE__ */ jsxs31("linearGradient", { id: "colorCount", x1: "0", y1: "0", x2: "0", y2: "1", children: [
2393
2551
  /* @__PURE__ */ jsx51("stop", { offset: "5%", stopColor: "#00695C", stopOpacity: 0.8 }),
2394
2552
  /* @__PURE__ */ jsx51("stop", { offset: "95%", stopColor: "#00695C", stopOpacity: 0 })
2395
2553
  ] }) }),
@@ -2413,7 +2571,7 @@ var BarChart_default = ChartComponent;
2413
2571
 
2414
2572
  // src/components/Chart/PieChart.tsx
2415
2573
  import { PieChart, Pie, Cell, ResponsiveContainer as ResponsiveContainer2, Tooltip as Tooltip2, LabelList } from "recharts";
2416
- import { Fragment as Fragment14, jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
2574
+ import { Fragment as Fragment14, jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
2417
2575
  var DonutChart = ({ className, style, ...props }) => {
2418
2576
  const data = Array.isArray(props?.data) ? props.data : [];
2419
2577
  const total = data.reduce((sum, d) => sum + d.value, 0);
@@ -2424,7 +2582,7 @@ var DonutChart = ({ className, style, ...props }) => {
2424
2582
  const renderLabel = ({ value, x, y }) => {
2425
2583
  if (value == null) return null;
2426
2584
  const percentage = (Number(value) / total * 100).toFixed(0);
2427
- return /* @__PURE__ */ jsxs31(
2585
+ return /* @__PURE__ */ jsxs32(
2428
2586
  "text",
2429
2587
  {
2430
2588
  x,
@@ -2446,7 +2604,7 @@ var DonutChart = ({ className, style, ...props }) => {
2446
2604
  const wrapperClass = canvasMode ? forceDesktop ? "flex-row" : "flex-col" : "flex-col md:flex-row";
2447
2605
  const renderLegends = () => {
2448
2606
  if (!showLegends) return null;
2449
- return /* @__PURE__ */ jsx52(Fragment14, { children: data.map((d) => /* @__PURE__ */ jsxs31(
2607
+ return /* @__PURE__ */ jsx52(Fragment14, { children: data.map((d) => /* @__PURE__ */ jsxs32(
2450
2608
  "div",
2451
2609
  {
2452
2610
  className: "flex items-center space-x-2 rounded-md border border-gray-200 px-3 py-2 w-[48%] md:w-auto",
@@ -2464,15 +2622,15 @@ var DonutChart = ({ className, style, ...props }) => {
2464
2622
  d.name
2465
2623
  )) });
2466
2624
  };
2467
- return /* @__PURE__ */ jsxs31(
2625
+ return /* @__PURE__ */ jsxs32(
2468
2626
  "div",
2469
2627
  {
2470
2628
  className: `relative flex items-center ${wrapperClass} ${className}`,
2471
2629
  style,
2472
2630
  children: [
2473
- /* @__PURE__ */ jsxs31("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
2474
- data.length > 0 && /* @__PURE__ */ jsx52(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs31(PieChart, { children: [
2475
- /* @__PURE__ */ jsxs31(
2631
+ /* @__PURE__ */ jsxs32("div", { className: "relative w-full md:w-[70%] h-[300px] md:h-[400px] flex items-center justify-center", children: [
2632
+ data.length > 0 && /* @__PURE__ */ jsx52(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs32(PieChart, { children: [
2633
+ /* @__PURE__ */ jsxs32(
2476
2634
  Pie,
2477
2635
  {
2478
2636
  data,
@@ -2498,7 +2656,7 @@ var DonutChart = ({ className, style, ...props }) => {
2498
2656
  ),
2499
2657
  /* @__PURE__ */ jsx52(Tooltip2, { formatter: (value, name) => [`${value}k`, name] })
2500
2658
  ] }) }),
2501
- /* @__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: [
2659
+ /* @__PURE__ */ jsxs32("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: [
2502
2660
  total,
2503
2661
  "k"
2504
2662
  ] })
@@ -2512,9 +2670,9 @@ var DonutChart = ({ className, style, ...props }) => {
2512
2670
  var PieChart_default = DonutChart;
2513
2671
 
2514
2672
  // src/components/Blocks/EmailComposer.tsx
2515
- import { jsx as jsx53, jsxs as jsxs32 } from "react/jsx-runtime";
2673
+ import { jsx as jsx53, jsxs as jsxs33 } from "react/jsx-runtime";
2516
2674
  function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc, setShowBcc, cc, setCc, bcc, setBcc, subject, setSubject, body, setBody }) {
2517
- return /* @__PURE__ */ jsx53("div", { className, style, children: /* @__PURE__ */ jsxs32("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
2675
+ return /* @__PURE__ */ jsx53("div", { className, style, children: /* @__PURE__ */ jsxs33("div", { className: "border rounded-md shadow bg-[#fff] p-4 mx-auto z-[50] relative", children: [
2518
2676
  /* @__PURE__ */ jsx53("div", { className: "mb-3", children: /* @__PURE__ */ jsx53(
2519
2677
  "input",
2520
2678
  {
@@ -2524,7 +2682,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
2524
2682
  required: true
2525
2683
  }
2526
2684
  ) }),
2527
- /* @__PURE__ */ jsx53("div", { className: "mb-3", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
2685
+ /* @__PURE__ */ jsx53("div", { className: "mb-3", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
2528
2686
  /* @__PURE__ */ jsx53(
2529
2687
  "input",
2530
2688
  {
@@ -2584,7 +2742,7 @@ function EmailComposer({ className, style, to, setTo, showCc, setShowCc, showBcc
2584
2742
  }
2585
2743
  ) }),
2586
2744
  /* @__PURE__ */ jsx53("div", { className: "mb-4", children: /* @__PURE__ */ jsx53(MyEditor, { value: body, onChange: setBody }) }),
2587
- /* @__PURE__ */ jsxs32("div", { className: "flex justify-end gap-2", children: [
2745
+ /* @__PURE__ */ jsxs33("div", { className: "flex justify-end gap-2", children: [
2588
2746
  /* @__PURE__ */ jsx53("button", { className: "px-4 py-2 rounded-md text-gray-600 hover:bg-gray-100", children: "Discard" }),
2589
2747
  /* @__PURE__ */ jsx53("button", { className: "px-4 py-2 rounded-md border text-[#12715B] border-[#12715B]", children: "Reset" }),
2590
2748
  /* @__PURE__ */ jsx53("button", { className: "px-4 py-2 rounded-md bg-[#12715B] text-white", children: "Send" })
@@ -2599,8 +2757,8 @@ export {
2599
2757
  DatePicker,
2600
2758
  DateRange_default as DateRange,
2601
2759
  Dropdown_default as Dropdown,
2760
+ EmailInput_default as Email,
2602
2761
  EmailComposer,
2603
- EmailInput_default as EmailInput,
2604
2762
  FileInput_default as FileInput,
2605
2763
  Flex_default as FlexLayout,
2606
2764
  Grid_default as GridLayout,
@@ -2612,23 +2770,23 @@ export {
2612
2770
  Notification_default as Notification,
2613
2771
  NumberInput_default as NumberInput,
2614
2772
  Pagination_default as Pagination,
2615
- PasswordInput_default as PasswordInput,
2616
- PhoneInput_default as PhoneInput,
2773
+ PasswordInput_default as Password,
2774
+ PhoneInput_default as Phone,
2617
2775
  PieChart_default as PieChart,
2618
2776
  Profile_default as Profile,
2619
- RadioInput_default as RadioInput,
2777
+ RadioInput_default as RadioGroup,
2620
2778
  RichText,
2621
- SearchInput_default as SearchInput,
2779
+ SearchInput_default as Search,
2622
2780
  Shape_default as Shape,
2623
2781
  Spacer_default as Spacer,
2624
2782
  Stages_default as Stages,
2625
2783
  SwitchToggle_default as SwitchToggle,
2626
2784
  Table_default as Table,
2627
2785
  Tabs_default as Tabs,
2628
- TextInput_default as TextInput,
2786
+ TextInput_default as Text,
2629
2787
  Textarea_default as Textarea,
2630
2788
  Typography_default as Typography,
2631
- UrlInput_default as UrlInput,
2789
+ UrlInput_default as URL,
2632
2790
  cn
2633
2791
  };
2634
2792
  /*! Bundled license information: