indicator-ui 1.1.92 → 1.1.94

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
@@ -26068,7 +26068,7 @@ function Eu(r, e = []) {
26068
26068
  return P_(e, r).map((n) => R9(n) ? n : { value: n });
26069
26069
  }
26070
26070
  function A9(r, e) {
26071
- return r ? e ? r : [r] : [];
26071
+ return r == null ? [] : e ? r : [r];
26072
26072
  }
26073
26073
  function L_(r, e, t) {
26074
26074
  const n = A9(e, t), i = lm(r);
@@ -26128,22 +26128,22 @@ function BK(r) {
26128
26128
  }
26129
26129
  const VK = 1e3;
26130
26130
  function NK(r) {
26131
- const { search: e, setOptions: t, isOpenRef: n, curOptions: i } = r, [o, s] = Me(""), c = T((_) => {
26132
- n.current && s(_);
26133
- }, [s]), u = T(async () => {
26134
- if (!e) return;
26135
- const _ = await e({ search: o || "", curOptions: i });
26136
- _ != null && t(_);
26137
- }, [t, e, o, i]), [d, f] = $8(u), h = Io(d, VK);
26131
+ const { search: e, setOptions: t, isOpenRef: n, curOptions: i } = r, [o, s] = Me(""), [c, u] = Me(!0), d = T((y) => {
26132
+ n.current && s(y || void 0);
26133
+ }, [s]), f = T(async () => {
26134
+ if (!e || !c) return;
26135
+ const y = await e({ search: o || "", curOptions: i });
26136
+ y != null ? t(y) : u(!1);
26137
+ }, [t, u, c, e, o, i]), [h, p] = $8(f), _ = Io(h, VK);
26138
26138
  pe(() => {
26139
- h();
26139
+ _();
26140
26140
  }, [o]);
26141
- const p = U(() => e !== void 0, [e]);
26141
+ const g = U(() => e !== void 0, [e]);
26142
26142
  return {
26143
- onChangeSearchString: c,
26144
- canSearch: p,
26143
+ onChangeSearchString: d,
26144
+ canSearch: g,
26145
26145
  searchString: o,
26146
- isLoadingSearch: f
26146
+ isLoadingSearch: p
26147
26147
  };
26148
26148
  }
26149
26149
  const WK = 500;
@@ -26295,7 +26295,8 @@ function GK(r) {
26295
26295
  isLoading: ue,
26296
26296
  formFieldProps: p,
26297
26297
  onClickChevron: Y,
26298
- getItemLabel: h
26298
+ getItemLabel: h,
26299
+ error: f
26299
26300
  };
26300
26301
  }
26301
26302
  function ZK(r) {
@@ -26315,23 +26316,24 @@ function ZK(r) {
26315
26316
  isLoading: v,
26316
26317
  formFieldProps: C,
26317
26318
  onClickChevron: S,
26318
- getItemLabel: x
26319
- } = GK(r), E = T((F) => () => y(F), [y]), k = T((F, L) => {
26320
- const V = L_(F, e, t) !== void 0, { value: $, label: W, ...Z } = F;
26319
+ getItemLabel: x,
26320
+ error: E
26321
+ } = GK(r), k = T((L) => () => y(L), [y]), I = T((L, V) => {
26322
+ const $ = L_(L, e, t) !== void 0, { value: W, label: Z, ...K } = L;
26321
26323
  return /* @__PURE__ */ Es(
26322
26324
  L9,
26323
26325
  {
26324
- title: x(F),
26325
- selected: V,
26326
- onClick: E(F),
26327
- ...Z,
26328
- key: L
26326
+ title: x(L),
26327
+ selected: $,
26328
+ onClick: k(L),
26329
+ ...K,
26330
+ key: V
26329
26331
  }
26330
26332
  );
26331
- }, [E, x]), I = U(() => {
26333
+ }, [k, x]), M = U(() => {
26332
26334
  if (v)
26333
26335
  return /* @__PURE__ */ b(A_, { width: "fill", height: "hug" });
26334
- }, [v]), M = U(() => /* @__PURE__ */ b(M9, { open: f, onClick: S }), [S, f]), A = U(() => ({
26336
+ }, [v]), A = U(() => /* @__PURE__ */ b(M9, { open: f, onClick: S }), [S, f]), F = U(() => ({
26335
26337
  visibility: "hidden"
26336
26338
  }), []);
26337
26339
  return /* @__PURE__ */ se(
@@ -26346,6 +26348,7 @@ function ZK(r) {
26346
26348
  F_,
26347
26349
  {
26348
26350
  ...C,
26351
+ error: E,
26349
26352
  value: i,
26350
26353
  inputRef: c,
26351
26354
  ref: u,
@@ -26353,12 +26356,12 @@ function ZK(r) {
26353
26356
  disabled: n,
26354
26357
  onFocus: p,
26355
26358
  onChange: _,
26356
- dropdown: M
26359
+ dropdown: A
26357
26360
  }
26358
26361
  ),
26359
- /* @__PURE__ */ b(As, { register: h, children: /* @__PURE__ */ se(hQ, { style: A, className: Cp.dropdown, ref: o, children: [
26360
- s.map(k),
26361
- I
26362
+ /* @__PURE__ */ b(As, { register: h, children: /* @__PURE__ */ se(hQ, { style: F, className: Cp.dropdown, ref: o, children: [
26363
+ s.map(I),
26364
+ M
26362
26365
  ] }) })
26363
26366
  ]
26364
26367
  }
@@ -39,5 +39,6 @@ export declare function useSelectField<D, M extends boolean = false>(props: Prop
39
39
  };
40
40
  onClickChevron: () => void;
41
41
  getItemLabel: (item: OptionsExtendItemType<D>) => React.ReactNode;
42
+ error: import('../../../../hooks').FormErrorType | undefined;
42
43
  };
43
44
  export {};
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "react-components",
12
12
  "ui-kit"
13
13
  ],
14
- "version": "1.1.92",
14
+ "version": "1.1.94",
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/types/index.d.ts",