@algorithm-shift/design-system 1.2.93 → 1.2.95

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
@@ -26915,7 +26915,7 @@ var TextInput = ({ className, style, ...props }) => {
26915
26915
  }
26916
26916
  }, []);
26917
26917
  const handleChange = (e) => {
26918
- props.onChange?.(e, e.target.name || "");
26918
+ props.onChange?.(e, props?.name || "");
26919
26919
  };
26920
26920
  return /* @__PURE__ */ jsxs7(Fragment3, { children: [
26921
26921
  /* @__PURE__ */ jsx20(
@@ -26957,7 +26957,7 @@ var NumberInput = ({ className, style, ...props }) => {
26957
26957
  }
26958
26958
  }, []);
26959
26959
  const handleChange = (e) => {
26960
- props.onChange?.(e, e.target.name || "");
26960
+ props.onChange?.(e, props.name || "");
26961
26961
  };
26962
26962
  return /* @__PURE__ */ jsxs8(Fragment4, { children: [
26963
26963
  /* @__PURE__ */ jsx21("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx21(
@@ -27000,7 +27000,7 @@ var EmailInput = ({ className, style, ...props }) => {
27000
27000
  }
27001
27001
  }, []);
27002
27002
  const handleChange = (e) => {
27003
- props.onChange?.(e, props.name || "");
27003
+ props.onChange?.(e, props?.name || "");
27004
27004
  };
27005
27005
  return /* @__PURE__ */ jsxs9(Fragment5, { children: [
27006
27006
  /* @__PURE__ */ jsx22("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx22(
@@ -27042,7 +27042,7 @@ var PasswordInput = ({ className, style, ...props }) => {
27042
27042
  }
27043
27043
  }, []);
27044
27044
  const handleChange = (e) => {
27045
- props.onChange?.(e, e.target.name || "");
27045
+ props.onChange?.(e, props?.name || "");
27046
27046
  };
27047
27047
  return /* @__PURE__ */ jsxs10(Fragment6, { children: [
27048
27048
  /* @__PURE__ */ jsx23("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx23(
@@ -27103,7 +27103,7 @@ var Textarea2 = ({ className, style, ...props }) => {
27103
27103
  }
27104
27104
  }, []);
27105
27105
  const handleChange = (e) => {
27106
- props.onChange?.(e, e.target.name || "");
27106
+ props.onChange?.(e, props?.name || "");
27107
27107
  };
27108
27108
  return /* @__PURE__ */ jsxs11(Fragment7, { children: [
27109
27109
  /* @__PURE__ */ jsx25(
@@ -27145,7 +27145,7 @@ var UrlInput = ({ className, style, ...props }) => {
27145
27145
  }
27146
27146
  }, []);
27147
27147
  const handleChange = (e) => {
27148
- props.onChange?.(e, e.target.name || "");
27148
+ props.onChange?.(e, props?.name || "");
27149
27149
  };
27150
27150
  return /* @__PURE__ */ jsxs12(Fragment8, { children: [
27151
27151
  /* @__PURE__ */ jsxs12("div", { className: "flex justify-start items-center relative", children: [
@@ -27238,7 +27238,7 @@ var CheckboxInput = ({ className, style, ...props }) => {
27238
27238
  }
27239
27239
  }, []);
27240
27240
  const handleChange = (value) => {
27241
- props.onChange?.(value, props.name || "");
27241
+ props.onChange?.(value, props?.name || "");
27242
27242
  };
27243
27243
  return /* @__PURE__ */ jsxs13(Fragment9, { children: [
27244
27244
  /* @__PURE__ */ jsx29("div", { className, style, children: /* @__PURE__ */ jsxs13("div", { className: "flex items-center space-x-2", children: [
@@ -27325,7 +27325,7 @@ var RadioInput = ({
27325
27325
  }
27326
27326
  }, []);
27327
27327
  const handleChange = (value) => {
27328
- onChange?.(value, props.name || "");
27328
+ onChange?.(value, props?.name || "");
27329
27329
  };
27330
27330
  const resolvedDefaultValue = (typeof defaultValue === "string" ? defaultValue : void 0) ?? options[0]?.value;
27331
27331
  return /* @__PURE__ */ jsxs14(Fragment10, { children: [
@@ -27371,14 +27371,14 @@ var MultiCheckbox = ({
27371
27371
  }));
27372
27372
  useEffect11(() => {
27373
27373
  if (propValue !== void 0) {
27374
- onChange?.(propValue, props.name || "");
27374
+ onChange?.(propValue, props?.name || "");
27375
27375
  }
27376
27376
  }, []);
27377
27377
  const handleChange = useCallback(
27378
27378
  (key, checked) => {
27379
27379
  setValue((prev) => {
27380
27380
  const newValue = { ...prev, [key]: checked };
27381
- onChange?.(newValue, props.name || "");
27381
+ onChange?.(newValue, props?.name || "");
27382
27382
  return newValue;
27383
27383
  });
27384
27384
  },
@@ -27492,7 +27492,7 @@ function RichText({ className, style, ...props }) {
27492
27492
  }
27493
27493
  }, []);
27494
27494
  const handleChange = (content) => {
27495
- props.onChange?.(content, props.name || "");
27495
+ props.onChange?.(content, props?.name || "");
27496
27496
  };
27497
27497
  return /* @__PURE__ */ jsxs16(
27498
27498
  "div",
@@ -27947,7 +27947,7 @@ var Dropdown = ({ className, style, ...props }) => {
27947
27947
  }
27948
27948
  }, []);
27949
27949
  const handleChange = (value) => {
27950
- props.onChange?.(value, props.name ?? "");
27950
+ props.onChange?.(value, props?.name ?? "");
27951
27951
  };
27952
27952
  const dataKey = props.dataKey || "value";
27953
27953
  const dataLabel = props.dataLabel || "label";
@@ -28042,7 +28042,7 @@ var SwitchToggle = ({ className, style, ...props }) => {
28042
28042
  }
28043
28043
  }, []);
28044
28044
  const handleChange = (value) => {
28045
- props.onChange?.(value, props.name || "");
28045
+ props.onChange?.(value, props?.name || "");
28046
28046
  };
28047
28047
  return /* @__PURE__ */ jsxs20(Fragment13, { children: [
28048
28048
  /* @__PURE__ */ jsx39("div", { className, style, children: /* @__PURE__ */ jsxs20("div", { className: "flex items-center space-x-2 mb-2", children: [
@@ -28077,7 +28077,7 @@ var PhoneInput = ({ className, style, ...props }) => {
28077
28077
  }
28078
28078
  }, []);
28079
28079
  const handleChange = (val) => {
28080
- props.onChange?.(val, props.name || "");
28080
+ props.onChange?.(val, props?.name || "");
28081
28081
  };
28082
28082
  return /* @__PURE__ */ jsxs21(Fragment14, { children: [
28083
28083
  /* @__PURE__ */ jsx40(
@@ -28125,7 +28125,7 @@ var SearchInput = ({ className, style, ...props }) => {
28125
28125
  }
28126
28126
  }, []);
28127
28127
  const handleChange = (e) => {
28128
- props.onChange?.(e, e.target.name || "");
28128
+ props.onChange?.(e, props?.name || "");
28129
28129
  };
28130
28130
  return /* @__PURE__ */ jsxs22(Fragment15, { children: [
28131
28131
  /* @__PURE__ */ jsx41("div", { className: "flex justify-start items-center relative", children: /* @__PURE__ */ jsx41(
@@ -28164,7 +28164,7 @@ var FileInput2 = ({ className, style, ...props }) => {
28164
28164
  }
28165
28165
  }, []);
28166
28166
  const handleChange = (e) => {
28167
- props.onChange?.(e, props.name || "");
28167
+ props.onChange?.(e, props?.name || "");
28168
28168
  };
28169
28169
  return /* @__PURE__ */ jsxs23("div", { className: "d-flex items-center relative align-middle", children: [
28170
28170
  /* @__PURE__ */ jsx42(
@@ -28222,7 +28222,7 @@ function DatePicker({ className, style, ...props }) {
28222
28222
  }
28223
28223
  }, []);
28224
28224
  const handleChange = (e) => {
28225
- props.onChange?.(e, e.target.name || "");
28225
+ props.onChange?.(e, props?.name || "");
28226
28226
  };
28227
28227
  const toDateInputValue = (value) => {
28228
28228
  if (!value) return "";
@@ -28495,7 +28495,7 @@ var DateRange = ({ className, style, ...props }) => {
28495
28495
  const handleChange = (value) => {
28496
28496
  setDate(value);
28497
28497
  if (value) {
28498
- props.onChange?.(value, props.name || "");
28498
+ props.onChange?.(value, props?.name || "");
28499
28499
  }
28500
28500
  };
28501
28501
  return /* @__PURE__ */ jsxs25(Fragment17, { children: [
@@ -28549,7 +28549,7 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
28549
28549
  }
28550
28550
  }, []);
28551
28551
  const handleChange = (e) => {
28552
- props.onChange?.(e, e.target.name || "");
28552
+ props.onChange?.(e, props?.name || "");
28553
28553
  };
28554
28554
  return /* @__PURE__ */ jsxs26(Fragment18, { children: [
28555
28555
  /* @__PURE__ */ jsxs26(
@@ -28836,13 +28836,13 @@ var MultiSelect = ({
28836
28836
  const [open, setOpen] = React8.useState(false);
28837
28837
  React8.useEffect(() => {
28838
28838
  if (value) {
28839
- onChange(value, props.name || "");
28839
+ onChange(value, props?.name || "");
28840
28840
  }
28841
28841
  }, []);
28842
28842
  const toggleOption = (val) => {
28843
28843
  onChange(
28844
28844
  value?.includes(val) ? value.filter((v) => v !== val) : [...value || [], val],
28845
- props.name || ""
28845
+ props?.name || ""
28846
28846
  );
28847
28847
  };
28848
28848
  const selectedLabels = React8.useMemo(