@algorithm-shift/design-system 1.3.102 → 1.3.104

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.js CHANGED
@@ -983,7 +983,7 @@ var TextInput = ({ className, style, ...props }) => {
983
983
  const isAutocomplete = props.isAutocomplete ?? false;
984
984
  (0, import_react9.useEffect)(() => {
985
985
  if (props.value !== void 0) {
986
- const e = { target: { value: props.value } };
986
+ const e = { target: { value: props.value }, type: "change" };
987
987
  handleChange?.(e);
988
988
  }
989
989
  }, []);
@@ -1033,7 +1033,7 @@ var NumberInput = ({ className, style, ...props }) => {
1033
1033
  const isAutocomplete = props.isAutocomplete ?? false;
1034
1034
  (0, import_react10.useEffect)(() => {
1035
1035
  if (props.value !== void 0) {
1036
- const e = { target: { value: props.value } };
1036
+ const e = { target: { value: props.value }, type: "change" };
1037
1037
  handleChange?.(e);
1038
1038
  }
1039
1039
  }, []);
@@ -1083,7 +1083,7 @@ var EmailInput = ({ className, style, ...props }) => {
1083
1083
  const isAutocomplete = props.isAutocomplete ?? false;
1084
1084
  (0, import_react11.useEffect)(() => {
1085
1085
  if (props.value !== void 0) {
1086
- const e = { target: { value: props.value } };
1086
+ const e = { target: { value: props.value }, type: "change" };
1087
1087
  handleChange?.(e);
1088
1088
  }
1089
1089
  }, []);
@@ -1133,7 +1133,7 @@ var PasswordInput = ({ className, style, ...props }) => {
1133
1133
  const isAutocomplete = props.isAutocomplete ?? false;
1134
1134
  (0, import_react12.useEffect)(() => {
1135
1135
  if (props.value !== void 0) {
1136
- const e = { target: { value: props.value } };
1136
+ const e = { target: { value: props.value }, type: "change" };
1137
1137
  handleChange?.(e);
1138
1138
  }
1139
1139
  }, []);
@@ -1201,7 +1201,7 @@ var Textarea2 = ({ className, style, ...props }) => {
1201
1201
  const isAutocomplete = props.isAutocomplete ?? false;
1202
1202
  (0, import_react13.useEffect)(() => {
1203
1203
  if (props.value !== void 0) {
1204
- const e = { target: { value: props.value } };
1204
+ const e = { target: { value: props.value }, type: "change" };
1205
1205
  handleChange?.(e);
1206
1206
  }
1207
1207
  }, []);
@@ -1243,7 +1243,7 @@ var UrlInput = ({ className, style, ...props }) => {
1243
1243
  const isAutocomplete = props.isAutocomplete ?? false;
1244
1244
  (0, import_react14.useEffect)(() => {
1245
1245
  if (props.value !== void 0) {
1246
- const e = { target: { value: props.value } };
1246
+ const e = { target: { value: props.value }, type: "change" };
1247
1247
  handleChange?.(e);
1248
1248
  }
1249
1249
  }, []);
@@ -1876,6 +1876,11 @@ function useLazyDropdown(config) {
1876
1876
  const allDataRef = (0, import_react20.useRef)([]);
1877
1877
  const configRef = (0, import_react20.useRef)(config);
1878
1878
  const PAGE_SIZE = config.pageSize || 10;
1879
+ (0, import_react20.useEffect)(() => {
1880
+ setOptions([]);
1881
+ setPage(1);
1882
+ setHasMore(true);
1883
+ }, [config.apiUrl]);
1879
1884
  const uniqueOptions = (items) => {
1880
1885
  const seen = /* @__PURE__ */ new Set();
1881
1886
  return items.filter((item) => {
@@ -2506,7 +2511,7 @@ var SearchInput = ({ className, style, ...props }) => {
2506
2511
  const isAutocomplete = props.isAutocomplete ?? false;
2507
2512
  (0, import_react25.useEffect)(() => {
2508
2513
  if (props.value !== void 0) {
2509
- const e = { target: { value: props.value } };
2514
+ const e = { target: { value: props.value }, type: "change" };
2510
2515
  handleChange?.(e);
2511
2516
  }
2512
2517
  }, []);
@@ -2552,7 +2557,7 @@ var FileInput = ({ className, style, ...props }) => {
2552
2557
  const placeholder = props.placeholder ?? "Placeholder text";
2553
2558
  (0, import_react26.useEffect)(() => {
2554
2559
  if (props.value !== void 0) {
2555
- const e = { target: { value: props.value } };
2560
+ const e = { target: { value: props.value }, type: "change" };
2556
2561
  handleChange?.(e);
2557
2562
  }
2558
2563
  }, []);
@@ -3209,7 +3214,7 @@ var TextInputGroup = ({ className, style, prepend, append, ...props }) => {
3209
3214
  const isAutocomplete = props.isAutocomplete ?? false;
3210
3215
  (0, import_react28.useEffect)(() => {
3211
3216
  if (props.value !== void 0) {
3212
- const e = { target: { value: props.value } };
3217
+ const e = { target: { value: props.value }, type: "change" };
3213
3218
  handleChange?.(e);
3214
3219
  }
3215
3220
  }, []);