@algorithm-shift/design-system 1.2.60 → 1.2.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -120,6 +120,8 @@ interface StagesProps extends ElementProps {
120
120
 
121
121
  type ButtonProps = ElementProps & React.ComponentProps<"button"> & {
122
122
  textContent?: string;
123
+ loading?: boolean;
124
+ loadingText?: string;
123
125
  type?: 'button' | 'submit' | 'reset';
124
126
  }
125
127
 
@@ -223,7 +225,7 @@ declare function TabList({ children, style, className, activeTab, tabId }: TabLi
223
225
 
224
226
  declare function TabGroupComponent({ children, style, className, list, activeTab, onTabChange, }: TabGroupProps): react_jsx_runtime.JSX.Element;
225
227
 
226
- declare const ButtonWrapper: ({ className, style, textContent, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
228
+ declare const ButtonWrapper: ({ className, style, textContent, loadingText, loading, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
227
229
 
228
230
  declare const ImageControl: ({ className, style, imageUrl, imageUrlExternal, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
229
231
 
package/dist/index.d.ts CHANGED
@@ -120,6 +120,8 @@ interface StagesProps extends ElementProps {
120
120
 
121
121
  type ButtonProps = ElementProps & React.ComponentProps<"button"> & {
122
122
  textContent?: string;
123
+ loading?: boolean;
124
+ loadingText?: string;
123
125
  type?: 'button' | 'submit' | 'reset';
124
126
  }
125
127
 
@@ -223,7 +225,7 @@ declare function TabList({ children, style, className, activeTab, tabId }: TabLi
223
225
 
224
226
  declare function TabGroupComponent({ children, style, className, list, activeTab, onTabChange, }: TabGroupProps): react_jsx_runtime.JSX.Element;
225
227
 
226
- declare const ButtonWrapper: ({ className, style, textContent, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
228
+ declare const ButtonWrapper: ({ className, style, textContent, loadingText, loading, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
227
229
 
228
230
  declare const ImageControl: ({ className, style, imageUrl, imageUrlExternal, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
229
231
 
package/dist/index.js CHANGED
@@ -333,6 +333,8 @@ var ButtonWrapper = ({
333
333
  className,
334
334
  style,
335
335
  textContent = "Button",
336
+ loadingText = "Loading...",
337
+ loading = false,
336
338
  ...props
337
339
  }) => {
338
340
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
@@ -341,7 +343,8 @@ var ButtonWrapper = ({
341
343
  ...props,
342
344
  className,
343
345
  style,
344
- children: textContent
346
+ disabled: props.disabled || loading,
347
+ children: loading ? loadingText : textContent
345
348
  }
346
349
  );
347
350
  };
@@ -26910,6 +26913,9 @@ var Icon2 = ({ iconType = "fontawesome", name = "Envelope", className, fontSize
26910
26913
  };
26911
26914
  var Icon_default = Icon2;
26912
26915
 
26916
+ // src/components/Inputs/TextInput/TextInput.tsx
26917
+ var import_react7 = require("react");
26918
+
26913
26919
  // src/components/ui/input.tsx
26914
26920
  var import_jsx_runtime18 = require("react/jsx-runtime");
26915
26921
  function Input({ className, type, ...props }) {
@@ -26937,6 +26943,12 @@ var TextInput = ({ className, style, ...props }) => {
26937
26943
  const isDisabled = props.isDisabled ?? false;
26938
26944
  const isReadonly = props.isReadonly ?? false;
26939
26945
  const isAutocomplete = props.isAutocomplete ?? false;
26946
+ (0, import_react7.useEffect)(() => {
26947
+ if (props.value !== void 0) {
26948
+ const e = { target: { value: props.value } };
26949
+ handleChange?.(e);
26950
+ }
26951
+ }, []);
26940
26952
  const handleChange = (e) => {
26941
26953
  props.onChange?.(e);
26942
26954
  };
@@ -26965,6 +26977,7 @@ var TextInput = ({ className, style, ...props }) => {
26965
26977
  var TextInput_default = TextInput;
26966
26978
 
26967
26979
  // src/components/Inputs/NumberInput/NumberInput.tsx
26980
+ var import_react8 = require("react");
26968
26981
  var import_jsx_runtime20 = require("react/jsx-runtime");
26969
26982
  var NumberInput = ({ className, style, ...props }) => {
26970
26983
  const placeholder = props.placeholder ?? "Placeholder text";
@@ -26972,6 +26985,12 @@ var NumberInput = ({ className, style, ...props }) => {
26972
26985
  const isDisabled = props.isDisabled ?? false;
26973
26986
  const isReadonly = props.isReadonly ?? false;
26974
26987
  const isAutocomplete = props.isAutocomplete ?? false;
26988
+ (0, import_react8.useEffect)(() => {
26989
+ if (props.value !== void 0) {
26990
+ const e = { target: { value: props.value } };
26991
+ handleChange?.(e);
26992
+ }
26993
+ }, []);
26975
26994
  const handleChange = (e) => {
26976
26995
  props.onChange?.(e);
26977
26996
  };
@@ -27004,6 +27023,7 @@ var NumberInput = ({ className, style, ...props }) => {
27004
27023
  var NumberInput_default = NumberInput;
27005
27024
 
27006
27025
  // src/components/Inputs/EmailInput/EmailInput.tsx
27026
+ var import_react9 = require("react");
27007
27027
  var import_jsx_runtime21 = require("react/jsx-runtime");
27008
27028
  var EmailInput = ({ className, style, ...props }) => {
27009
27029
  const placeholder = props.placeholder ?? "Placeholder text";
@@ -27011,6 +27031,12 @@ var EmailInput = ({ className, style, ...props }) => {
27011
27031
  const isDisabled = props.isDisabled ?? false;
27012
27032
  const isReadonly = props.isReadonly ?? false;
27013
27033
  const isAutocomplete = props.isAutocomplete ?? false;
27034
+ (0, import_react9.useEffect)(() => {
27035
+ if (props.value !== void 0) {
27036
+ const e = { target: { value: props.value } };
27037
+ handleChange?.(e);
27038
+ }
27039
+ }, []);
27014
27040
  const handleChange = (e) => {
27015
27041
  props.onChange?.(e);
27016
27042
  };
@@ -27042,6 +27068,7 @@ var EmailInput = ({ className, style, ...props }) => {
27042
27068
  var EmailInput_default = EmailInput;
27043
27069
 
27044
27070
  // src/components/Inputs/PasswordInput/PasswordInput.tsx
27071
+ var import_react10 = require("react");
27045
27072
  var import_jsx_runtime22 = require("react/jsx-runtime");
27046
27073
  var PasswordInput = ({ className, style, ...props }) => {
27047
27074
  const placeholder = props.placeholder ?? "Placeholder text";
@@ -27049,6 +27076,12 @@ var PasswordInput = ({ className, style, ...props }) => {
27049
27076
  const isDisabled = props.isDisabled ?? false;
27050
27077
  const isReadonly = props.isReadonly ?? false;
27051
27078
  const isAutocomplete = props.isAutocomplete ?? false;
27079
+ (0, import_react10.useEffect)(() => {
27080
+ if (props.value !== void 0) {
27081
+ const e = { target: { value: props.value } };
27082
+ handleChange?.(e);
27083
+ }
27084
+ }, []);
27052
27085
  const handleChange = (e) => {
27053
27086
  props.onChange?.(e);
27054
27087
  };
@@ -27080,6 +27113,9 @@ var PasswordInput = ({ className, style, ...props }) => {
27080
27113
  };
27081
27114
  var PasswordInput_default = PasswordInput;
27082
27115
 
27116
+ // src/components/Inputs/Textarea/Textarea.tsx
27117
+ var import_react11 = require("react");
27118
+
27083
27119
  // src/components/ui/textarea.tsx
27084
27120
  var import_jsx_runtime23 = require("react/jsx-runtime");
27085
27121
  function Textarea({ className, ...props }) {
@@ -27104,6 +27140,12 @@ var Textarea2 = ({ className, style, ...props }) => {
27104
27140
  const isDisabled = props.isDisabled ?? false;
27105
27141
  const isReadonly = props.isReadonly ?? false;
27106
27142
  const isAutocomplete = props.isAutocomplete ?? false;
27143
+ (0, import_react11.useEffect)(() => {
27144
+ if (props.value !== void 0) {
27145
+ const e = { target: { value: props.value } };
27146
+ handleChange?.(e);
27147
+ }
27148
+ }, []);
27107
27149
  const handleChange = (e) => {
27108
27150
  props.onChange?.(e);
27109
27151
  };
@@ -27132,6 +27174,7 @@ var Textarea2 = ({ className, style, ...props }) => {
27132
27174
  var Textarea_default = Textarea2;
27133
27175
 
27134
27176
  // src/components/Inputs/UrlInput/UrlInput.tsx
27177
+ var import_react12 = require("react");
27135
27178
  var import_jsx_runtime25 = require("react/jsx-runtime");
27136
27179
  var UrlInput = ({ className, style, ...props }) => {
27137
27180
  const placeholder = props.placeholder ?? "Placeholder text";
@@ -27139,6 +27182,12 @@ var UrlInput = ({ className, style, ...props }) => {
27139
27182
  const isDisabled = props.isDisabled ?? false;
27140
27183
  const isReadonly = props.isReadonly ?? false;
27141
27184
  const isAutocomplete = props.isAutocomplete ?? false;
27185
+ (0, import_react12.useEffect)(() => {
27186
+ if (props.value !== void 0) {
27187
+ const e = { target: { value: props.value } };
27188
+ handleChange?.(e);
27189
+ }
27190
+ }, []);
27142
27191
  const handleChange = (e) => {
27143
27192
  props.onChange?.(e);
27144
27193
  };
@@ -27170,6 +27219,9 @@ var UrlInput = ({ className, style, ...props }) => {
27170
27219
  };
27171
27220
  var UrlInput_default = UrlInput;
27172
27221
 
27222
+ // src/components/Inputs/Checkbox/Checkbox.tsx
27223
+ var import_react13 = require("react");
27224
+
27173
27225
  // src/components/ui/checkbox.tsx
27174
27226
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
27175
27227
  var import_jsx_runtime26 = require("react/jsx-runtime");
@@ -27224,6 +27276,11 @@ var CheckboxInput = ({ className, style, ...props }) => {
27224
27276
  const isEditable = props.isEditable ?? true;
27225
27277
  const isDisabled = props.isDisabled ?? false;
27226
27278
  const text = props.text ? props.text : "Subscribe";
27279
+ (0, import_react13.useEffect)(() => {
27280
+ if (props.value) {
27281
+ handleChange(props.value);
27282
+ }
27283
+ }, []);
27227
27284
  const handleChange = (value) => {
27228
27285
  props.onChange?.(value);
27229
27286
  };
@@ -27245,6 +27302,9 @@ var CheckboxInput = ({ className, style, ...props }) => {
27245
27302
  };
27246
27303
  var Checkbox_default = CheckboxInput;
27247
27304
 
27305
+ // src/components/Inputs/RadioInput/RadioInput.tsx
27306
+ var import_react14 = require("react");
27307
+
27248
27308
  // src/components/ui/radio-group.tsx
27249
27309
  var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
27250
27310
  var import_jsx_runtime29 = require("react/jsx-runtime");
@@ -27303,6 +27363,11 @@ var RadioInput = ({
27303
27363
  value: item[dataKey || "value"],
27304
27364
  label: item[dataLabel || "label"]
27305
27365
  }));
27366
+ (0, import_react14.useEffect)(() => {
27367
+ if (props.value !== void 0) {
27368
+ handleChange?.(props.value);
27369
+ }
27370
+ }, []);
27306
27371
  const handleChange = (value) => {
27307
27372
  onChange?.(value);
27308
27373
  };
@@ -27328,7 +27393,7 @@ var RadioInput = ({
27328
27393
  var RadioInput_default = RadioInput;
27329
27394
 
27330
27395
  // src/components/Inputs/MultiCheckbox/MultiCheckbox.tsx
27331
- var import_react7 = require("react");
27396
+ var import_react15 = require("react");
27332
27397
  var import_jsx_runtime31 = require("react/jsx-runtime");
27333
27398
  var MultiCheckbox = ({
27334
27399
  className,
@@ -27342,12 +27407,17 @@ var MultiCheckbox = ({
27342
27407
  isDisabled = false
27343
27408
  }) => {
27344
27409
  const list = Array.isArray(data) ? data : [];
27345
- const [value, setValue] = (0, import_react7.useState)(propValue);
27410
+ const [value, setValue] = (0, import_react15.useState)(propValue);
27346
27411
  const options = (list || []).map((item) => ({
27347
27412
  value: item[dataKey || "value"],
27348
27413
  label: item[dataLabel || "label"]
27349
27414
  }));
27350
- const handleChange = (0, import_react7.useCallback)(
27415
+ (0, import_react15.useEffect)(() => {
27416
+ if (propValue !== void 0) {
27417
+ onChange?.(propValue);
27418
+ }
27419
+ }, []);
27420
+ const handleChange = (0, import_react15.useCallback)(
27351
27421
  (key, checked) => {
27352
27422
  setValue((prev) => {
27353
27423
  const newValue = { ...prev, [key]: checked };
@@ -27382,8 +27452,11 @@ var MultiCheckbox = ({
27382
27452
  };
27383
27453
  var MultiCheckbox_default = MultiCheckbox;
27384
27454
 
27455
+ // src/components/Inputs/RichText/RichText.tsx
27456
+ var import_react17 = require("react");
27457
+
27385
27458
  // src/components/Global/TinyMceEditor.tsx
27386
- var import_react8 = require("react");
27459
+ var import_react16 = require("react");
27387
27460
  var import_tinymce_react = require("@tinymce/tinymce-react");
27388
27461
  var import_jsx_runtime32 = require("react/jsx-runtime");
27389
27462
  function MyEditor({
@@ -27391,7 +27464,7 @@ function MyEditor({
27391
27464
  onChange,
27392
27465
  isDefault
27393
27466
  }) {
27394
- const editorRef = (0, import_react8.useRef)(null);
27467
+ const editorRef = (0, import_react16.useRef)(null);
27395
27468
  function stripOuterP(html) {
27396
27469
  const trimmedHtml = html.trim();
27397
27470
  if (!trimmedHtml) return "";
@@ -27403,7 +27476,7 @@ function MyEditor({
27403
27476
  }
27404
27477
  return trimmedHtml;
27405
27478
  }
27406
- const isDefaultToolbar = (0, import_react8.useMemo)(() => {
27479
+ const isDefaultToolbar = (0, import_react16.useMemo)(() => {
27407
27480
  let toolbar = "undo redo | formatselect | bold italic forecolor";
27408
27481
  if (isDefault) {
27409
27482
  toolbar = "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help";
@@ -27456,6 +27529,14 @@ function MyEditor({
27456
27529
  // src/components/Inputs/RichText/RichText.tsx
27457
27530
  var import_jsx_runtime33 = require("react/jsx-runtime");
27458
27531
  function RichText({ className, style, ...props }) {
27532
+ (0, import_react17.useEffect)(() => {
27533
+ if (props.value !== void 0) {
27534
+ handleChange?.(props.value);
27535
+ }
27536
+ }, []);
27537
+ const handleChange = (content) => {
27538
+ props.onChange?.(content);
27539
+ };
27459
27540
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
27460
27541
  "div",
27461
27542
  {
@@ -27465,13 +27546,16 @@ function RichText({ className, style, ...props }) {
27465
27546
  borderColor: props.errorMessage ? "#f87171" : style?.borderColor
27466
27547
  },
27467
27548
  children: [
27468
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MyEditor, { onChange: (content) => props.onChange?.(content), value: props.value || "", isDefault: true }),
27549
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MyEditor, { onChange: handleChange, value: props.value || "", isDefault: true }),
27469
27550
  props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
27470
27551
  ]
27471
27552
  }
27472
27553
  );
27473
27554
  }
27474
27555
 
27556
+ // src/components/Inputs/Dropdown/Dropdown.tsx
27557
+ var import_react18 = require("react");
27558
+
27475
27559
  // src/components/ui/select.tsx
27476
27560
  var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
27477
27561
  var import_jsx_runtime34 = require("react/jsx-runtime");
@@ -27606,6 +27690,11 @@ var Dropdown = ({ className, style, ...props }) => {
27606
27690
  const isEditable = props.isEditable ?? true;
27607
27691
  const isDisabled = props.isDisabled ?? false;
27608
27692
  const isReadonly = props.isReadonly ?? false;
27693
+ (0, import_react18.useEffect)(() => {
27694
+ if (props.value !== void 0) {
27695
+ handleChange(props.value);
27696
+ }
27697
+ }, []);
27609
27698
  const handleChange = (value) => {
27610
27699
  props.onChange?.(value);
27611
27700
  };
@@ -27641,6 +27730,9 @@ var Dropdown = ({ className, style, ...props }) => {
27641
27730
  };
27642
27731
  var Dropdown_default = Dropdown;
27643
27732
 
27733
+ // src/components/Inputs/SwitchToggle/SwitchToggle.tsx
27734
+ var import_react19 = require("react");
27735
+
27644
27736
  // src/components/ui/switch.tsx
27645
27737
  var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
27646
27738
  var import_jsx_runtime36 = require("react/jsx-runtime");
@@ -27675,6 +27767,11 @@ var import_jsx_runtime37 = require("react/jsx-runtime");
27675
27767
  var SwitchToggle = ({ className, style, ...props }) => {
27676
27768
  const isEditable = props.isEditable ?? true;
27677
27769
  const isDisabled = props.isDisabled ?? false;
27770
+ (0, import_react19.useEffect)(() => {
27771
+ if (props.value !== void 0) {
27772
+ handleChange?.(props.value);
27773
+ }
27774
+ }, []);
27678
27775
  const handleChange = (value) => {
27679
27776
  props.onChange?.(value);
27680
27777
  };
@@ -27697,6 +27794,7 @@ var SwitchToggle = ({ className, style, ...props }) => {
27697
27794
  var SwitchToggle_default = SwitchToggle;
27698
27795
 
27699
27796
  // src/components/Inputs/PhoneInput/PhoneInput.tsx
27797
+ var import_react20 = require("react");
27700
27798
  var import_react_international_phone = require("react-international-phone");
27701
27799
  var import_style = require("react-international-phone/style.css");
27702
27800
  var import_jsx_runtime38 = require("react/jsx-runtime");
@@ -27704,6 +27802,11 @@ var PhoneInput = ({ className, style, ...props }) => {
27704
27802
  const placeholder = props.placeholder ?? "Enter phone number";
27705
27803
  const isEditable = props.isEditable ?? true;
27706
27804
  const isDisabled = props.isDisabled ?? false;
27805
+ (0, import_react20.useEffect)(() => {
27806
+ if (props.value !== void 0) {
27807
+ handleChange?.(props.value);
27808
+ }
27809
+ }, []);
27707
27810
  const handleChange = (val) => {
27708
27811
  props.onChange?.(val);
27709
27812
  };
@@ -27738,6 +27841,7 @@ var PhoneInput = ({ className, style, ...props }) => {
27738
27841
  var PhoneInput_default = PhoneInput;
27739
27842
 
27740
27843
  // src/components/Inputs/SearchInput/SearchInput.tsx
27844
+ var import_react21 = require("react");
27741
27845
  var import_jsx_runtime39 = require("react/jsx-runtime");
27742
27846
  var SearchInput = ({ className, style, ...props }) => {
27743
27847
  const placeholder = props.placeholder ?? "Placeholder text";
@@ -27745,6 +27849,12 @@ var SearchInput = ({ className, style, ...props }) => {
27745
27849
  const isDisabled = props.isDisabled ?? false;
27746
27850
  const isReadonly = props.isReadonly ?? false;
27747
27851
  const isAutocomplete = props.isAutocomplete ?? false;
27852
+ (0, import_react21.useEffect)(() => {
27853
+ if (props.value !== void 0) {
27854
+ const e = { target: { value: props.value } };
27855
+ handleChange?.(e);
27856
+ }
27857
+ }, []);
27748
27858
  const handleChange = (e) => {
27749
27859
  props.onChange?.(e);
27750
27860
  };
@@ -27777,9 +27887,19 @@ var SearchInput = ({ className, style, ...props }) => {
27777
27887
  var SearchInput_default = SearchInput;
27778
27888
 
27779
27889
  // src/components/Inputs/FileInput/FileInput.tsx
27890
+ var import_react22 = require("react");
27780
27891
  var import_jsx_runtime40 = require("react/jsx-runtime");
27781
27892
  var FileInput2 = ({ className, style, ...props }) => {
27782
27893
  const placeholder = props.placeholder ?? "Placeholder text";
27894
+ (0, import_react22.useEffect)(() => {
27895
+ if (props.value !== void 0) {
27896
+ const e = { target: { value: props.value } };
27897
+ handleChange?.(e);
27898
+ }
27899
+ }, []);
27900
+ const handleChange = (e) => {
27901
+ props.onChange?.(e);
27902
+ };
27783
27903
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "d-flex items-center relative align-middle", children: [
27784
27904
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
27785
27905
  Input,
@@ -27795,9 +27915,7 @@ var FileInput2 = ({ className, style, ...props }) => {
27795
27915
  },
27796
27916
  autoComplete: "off",
27797
27917
  placeholder,
27798
- onChange: (e) => {
27799
- props.onChange?.(e);
27800
- }
27918
+ onChange: handleChange
27801
27919
  }
27802
27920
  ),
27803
27921
  props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "mt-1 text-xs text-red-500", children: props.errorMessage })
@@ -27806,6 +27924,7 @@ var FileInput2 = ({ className, style, ...props }) => {
27806
27924
  var FileInput_default = FileInput2;
27807
27925
 
27808
27926
  // src/components/Inputs/DatePicker/DatePicker.tsx
27927
+ var import_react23 = require("react");
27809
27928
  var import_jsx_runtime41 = require("react/jsx-runtime");
27810
27929
  function DatePicker({ className, style, ...props }) {
27811
27930
  const placeholder = props.placeholder ?? "Placeholder text";
@@ -27831,6 +27950,11 @@ function DatePicker({ className, style, ...props }) {
27831
27950
  };
27832
27951
  const minDate = resolveDate(minimumDate, customMinimumDate);
27833
27952
  const maxDate = resolveDate(maximumDate, customMaximumDate);
27953
+ (0, import_react23.useEffect)(() => {
27954
+ if (props.value !== void 0) {
27955
+ handleChange(props.value);
27956
+ }
27957
+ }, []);
27834
27958
  const handleChange = (e) => {
27835
27959
  props.onChange?.(e);
27836
27960
  };
@@ -27868,11 +27992,11 @@ function DatePicker({ className, style, ...props }) {
27868
27992
  }
27869
27993
 
27870
27994
  // src/components/Inputs/DateRange/DateRange.tsx
27871
- var React4 = __toESM(require("react"));
27995
+ var import_react24 = __toESM(require("react"));
27872
27996
  var import_date_fns = require("date-fns");
27873
27997
 
27874
27998
  // src/components/ui/calendar.tsx
27875
- var React3 = __toESM(require("react"));
27999
+ var React4 = __toESM(require("react"));
27876
28000
  var import_react_day_picker = require("react-day-picker");
27877
28001
  var import_jsx_runtime42 = require("react/jsx-runtime");
27878
28002
  function Calendar2({
@@ -28027,8 +28151,8 @@ function CalendarDayButton({
28027
28151
  ...props
28028
28152
  }) {
28029
28153
  const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
28030
- const ref = React3.useRef(null);
28031
- React3.useEffect(() => {
28154
+ const ref = React4.useRef(null);
28155
+ React4.useEffect(() => {
28032
28156
  if (modifiers.focused) ref.current?.focus();
28033
28157
  }, [modifiers.focused]);
28034
28158
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
@@ -28090,12 +28214,17 @@ function PopoverContent({
28090
28214
  var import_jsx_runtime44 = require("react/jsx-runtime");
28091
28215
  var DateRange = ({ className, style, ...props }) => {
28092
28216
  const isDateRange = (val) => !!val && val.from instanceof Date;
28093
- const [date, setDate] = React4.useState(
28217
+ const [date, setDate] = import_react24.default.useState(
28094
28218
  isDateRange(props.value) ? props.value : {
28095
28219
  from: /* @__PURE__ */ new Date(),
28096
28220
  to: (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 7)
28097
28221
  }
28098
28222
  );
28223
+ (0, import_react24.useEffect)(() => {
28224
+ if (props.value && isDateRange(props.value)) {
28225
+ handleChange?.(props.value);
28226
+ }
28227
+ }, []);
28099
28228
  const handleChange = (value) => {
28100
28229
  setDate(value);
28101
28230
  if (value) {
@@ -28138,6 +28267,7 @@ var DateRange = ({ className, style, ...props }) => {
28138
28267
  var DateRange_default = DateRange;
28139
28268
 
28140
28269
  // src/components/Inputs/TextInputGroup/TextInputGroup.tsx
28270
+ var import_react25 = require("react");
28141
28271
  var import_jsx_runtime45 = require("react/jsx-runtime");
28142
28272
  var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
28143
28273
  const placeholder = props.placeholder ?? "Placeholder text";
@@ -28145,6 +28275,12 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
28145
28275
  const isDisabled = props.isDisabled ?? false;
28146
28276
  const isReadonly = props.isReadonly ?? false;
28147
28277
  const isAutocomplete = props.isAutocomplete ?? false;
28278
+ (0, import_react25.useEffect)(() => {
28279
+ if (props.value !== void 0) {
28280
+ const e = { target: { value: props.value } };
28281
+ handleChange?.(e);
28282
+ }
28283
+ }, []);
28148
28284
  const handleChange = (e) => {
28149
28285
  props.onChange?.(e);
28150
28286
  };
@@ -28192,7 +28328,7 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
28192
28328
  var TextInputGroup_default = TextInputGroup;
28193
28329
 
28194
28330
  // src/components/DataDisplay/Table/Table.tsx
28195
- var import_react9 = require("react");
28331
+ var import_react26 = require("react");
28196
28332
 
28197
28333
  // src/components/ui/data-table.tsx
28198
28334
  var import_react_table = require("@tanstack/react-table");
@@ -28575,9 +28711,9 @@ var Table4 = ({
28575
28711
  const rawData = Array.isArray(data) ? data : [];
28576
28712
  const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
28577
28713
  const isControlled = typeof page === "number";
28578
- const [internalPage, setInternalPage] = (0, import_react9.useState)(1);
28714
+ const [internalPage, setInternalPage] = (0, import_react26.useState)(1);
28579
28715
  const currentPage = isControlled ? page : internalPage;
28580
- (0, import_react9.useEffect)(() => {
28716
+ (0, import_react26.useEffect)(() => {
28581
28717
  if (isControlled) return;
28582
28718
  if (currentPage > 1 && !pagination) setInternalPage(1);
28583
28719
  }, [pagination, isControlled]);
@@ -28718,12 +28854,12 @@ var Tabs = ({ className, style, tabs, verticalMenu, pathname, canvasMode }) => {
28718
28854
  var Tabs_default = Tabs;
28719
28855
 
28720
28856
  // src/components/Navigation/Stages/Stages.tsx
28721
- var import_react10 = __toESM(require("react"));
28857
+ var import_react27 = __toESM(require("react"));
28722
28858
  var import_jsx_runtime52 = require("react/jsx-runtime");
28723
28859
  var StagesComponent = ({ stages, isShowBtn, buttonText, className, style }) => {
28724
28860
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center justify-between bg-red p-2 rounded-lg border border-gray-200 w-full", children: [
28725
28861
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("button", { className: "p-2 hover:bg-gray-100 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { className: "w-4 h-4 text-gray-600", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) }) }),
28726
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react10.default.Fragment, { children: [
28862
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center flex-1 px-2 flex-wrap gap-2", children: stages?.length > 0 && stages?.map((stage, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react27.default.Fragment, { children: [
28727
28863
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
28728
28864
  "button",
28729
28865
  {
@@ -28755,10 +28891,10 @@ var import_jsx_runtime55 = require("react/jsx-runtime");
28755
28891
  var import_jsx_runtime56 = require("react/jsx-runtime");
28756
28892
 
28757
28893
  // src/components/ui/avatar.tsx
28758
- var React6 = __toESM(require("react"));
28894
+ var React7 = __toESM(require("react"));
28759
28895
  var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
28760
28896
  var import_jsx_runtime57 = require("react/jsx-runtime");
28761
- var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
28897
+ var Avatar = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
28762
28898
  AvatarPrimitive.Root,
28763
28899
  {
28764
28900
  ref,
@@ -28770,7 +28906,7 @@ var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
28770
28906
  }
28771
28907
  ));
28772
28908
  Avatar.displayName = AvatarPrimitive.Root.displayName;
28773
- var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
28909
+ var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
28774
28910
  AvatarPrimitive.Image,
28775
28911
  {
28776
28912
  ref,
@@ -28779,7 +28915,7 @@ var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
28779
28915
  }
28780
28916
  ));
28781
28917
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
28782
- var AvatarFallback = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
28918
+ var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
28783
28919
  AvatarPrimitive.Fallback,
28784
28920
  {
28785
28921
  ref,