@snmt-react-ui/async-select 1.13.0 → 1.13.1

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.
Files changed (2) hide show
  1. package/dist/async-select.js +337 -339
  2. package/package.json +3 -3
@@ -1,21 +1,21 @@
1
1
  import "./index.css";
2
2
  import { jsx as t, Fragment as F, jsxs as c } from "react/jsx-runtime";
3
- import { forwardRef as Q, useState as x, useRef as T, useEffect as D, useCallback as I, useContext as X, useImperativeHandle as l1, createContext as W1, useMemo as R1 } from "react";
4
- import { Select as b1, Tag as M1, Flex as y1, Checkbox as I1, Avatar as j1, Typography as a1, Popover as T1 } from "antd";
5
- import { COLORS as r, SNMTUiContext as s1 } from "@snmt-react-ui/core";
3
+ import { forwardRef as X, useState as Z, useRef as T, useEffect as B, useCallback as I, useContext as e1, useImperativeHandle as s1, createContext as W1, useMemo as R1 } from "react";
4
+ import { Select as b1, Tag as M1, Flex as y1, Checkbox as I1, Avatar as j1, Typography as d1, Popover as T1 } from "antd";
5
+ import { COLORS as r, SNMTUiContext as n1 } from "@snmt-react-ui/core";
6
6
  var O1 = Object.defineProperty, S1 = (o, i, e) => i in o ? O1(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e, F1 = (o, i, e) => S1(o, i + "", e), $1 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7
7
  function P1() {
8
8
  if (console && console.warn) {
9
9
  for (var o = arguments.length, i = new Array(o), e = 0; e < o; e++)
10
10
  i[e] = arguments[e];
11
- J(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), console.warn(...i);
11
+ Q(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), console.warn(...i);
12
12
  }
13
13
  }
14
14
  const x1 = {};
15
15
  function N1() {
16
16
  for (var o = arguments.length, i = new Array(o), e = 0; e < o; e++)
17
17
  i[e] = arguments[e];
18
- J(i[0]) && x1[i[0]] || (J(i[0]) && (x1[i[0]] = /* @__PURE__ */ new Date()), P1(...i));
18
+ Q(i[0]) && x1[i[0]] || (Q(i[0]) && (x1[i[0]] = /* @__PURE__ */ new Date()), P1(...i));
19
19
  }
20
20
  const E1 = (o, i) => () => {
21
21
  if (o.isInitialized)
@@ -31,7 +31,7 @@ const E1 = (o, i) => () => {
31
31
  }, Z1 = (o, i, e) => {
32
32
  o.loadNamespaces(i, E1(o, e));
33
33
  }, _1 = (o, i, e, l) => {
34
- J(e) && (e = [e]), e.forEach((s) => {
34
+ Q(e) && (e = [e]), e.forEach((s) => {
35
35
  o.options.ns.indexOf(s) < 0 && o.options.ns.push(s);
36
36
  }), o.loadLanguages(i, E1(o, l));
37
37
  }, z1 = function(o, i) {
@@ -51,7 +51,7 @@ const E1 = (o, i) => () => {
51
51
  if (e.bindI18n && e.bindI18n.indexOf("languageChanging") > -1 && l.services.backendConnector.backend && l.isLanguageChangingTo && !s(l.isLanguageChangingTo, o)) return !1;
52
52
  }
53
53
  }) : z1(o, i, e);
54
- }, J = (o) => typeof o == "string", q1 = (o) => typeof o == "object" && o !== null, J1 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Q1 = {
54
+ }, Q = (o) => typeof o == "string", q1 = (o) => typeof o == "object" && o !== null, J1 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Q1 = {
55
55
  "&amp;": "&",
56
56
  "&#38;": "&",
57
57
  "&lt;": "<",
@@ -98,7 +98,7 @@ class n2 {
98
98
  }
99
99
  const C2 = (o, i) => {
100
100
  const e = T();
101
- return D(() => {
101
+ return B(() => {
102
102
  e.current = o;
103
103
  }, [o, i]), e.current;
104
104
  }, D1 = (o, i, e, l) => o.getFixedT(i, e, l), h2 = (o, i, e, l) => I(D1(o, i, e, l), [o, i, e, l]), r2 = function(o) {
@@ -108,11 +108,11 @@ const C2 = (o, i) => {
108
108
  } = i, {
109
109
  i18n: l,
110
110
  defaultNS: s
111
- } = X(s2) || {}, a = e || l || l2();
111
+ } = e1(s2) || {}, a = e || l || l2();
112
112
  if (a && !a.reportNamespaces && (a.reportNamespaces = new n2()), !a) {
113
113
  N1("You will need to pass in an i18next instance by using initReactI18next");
114
- const V = (H, M) => J(M) ? M : q1(M) && J(M.defaultValue) ? M.defaultValue : Array.isArray(H) ? H[H.length - 1] : H, u = [V, {}, !1];
115
- return u.t = V, u.i18n = {}, u.ready = !1, u;
114
+ const V = (H, M) => Q(M) ? M : q1(M) && Q(M.defaultValue) ? M.defaultValue : Array.isArray(H) ? H[H.length - 1] : H, v = [V, {}, !1];
115
+ return v.t = V, v.i18n = {}, v.ready = !1, v;
116
116
  }
117
117
  a.options.react && a.options.react.wait !== void 0 && N1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
118
118
  const w = {
@@ -124,36 +124,36 @@ const C2 = (o, i) => {
124
124
  keyPrefix: h
125
125
  } = w;
126
126
  let n = o;
127
- n = J(n) ? [n] : n || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(n);
128
- const C = (a.isInitialized || a.initializedStoreOnce) && n.every((V) => U1(V, a, w)), Z = h2(a, i.lng || null, w.nsMode === "fallback" ? n : n[0], h), R = () => Z, L = () => D1(a, i.lng || null, w.nsMode === "fallback" ? n : n[0], h), [m, k] = x(R);
129
- let v = n.join();
130
- i.lng && (v = `${i.lng}${v}`);
131
- const p = C2(v), A = T(!0);
132
- D(() => {
127
+ n = Q(n) ? [n] : n || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(n);
128
+ const C = (a.isInitialized || a.initializedStoreOnce) && n.every((V) => U1(V, a, w)), _ = h2(a, i.lng || null, w.nsMode === "fallback" ? n : n[0], h), R = () => _, L = () => D1(a, i.lng || null, w.nsMode === "fallback" ? n : n[0], h), [u, k] = Z(R);
129
+ let f = n.join();
130
+ i.lng && (f = `${i.lng}${f}`);
131
+ const p = C2(f), E = T(!0);
132
+ B(() => {
133
133
  const {
134
134
  bindI18n: V,
135
- bindI18nStore: u
135
+ bindI18nStore: v
136
136
  } = w;
137
- A.current = !0, !C && !d && (i.lng ? _1(a, i.lng, n, () => {
138
- A.current && k(L);
137
+ E.current = !0, !C && !d && (i.lng ? _1(a, i.lng, n, () => {
138
+ E.current && k(L);
139
139
  }) : Z1(a, n, () => {
140
- A.current && k(L);
141
- })), C && p && p !== v && A.current && k(L);
140
+ E.current && k(L);
141
+ })), C && p && p !== f && E.current && k(L);
142
142
  const H = () => {
143
- A.current && k(L);
143
+ E.current && k(L);
144
144
  };
145
- return V && a && a.on(V, H), u && a && a.store.on(u, H), () => {
146
- A.current = !1, V && a && V.split(" ").forEach((M) => a.off(M, H)), u && a && u.split(" ").forEach((M) => a.store.off(M, H));
145
+ return V && a && a.on(V, H), v && a && a.store.on(v, H), () => {
146
+ E.current = !1, V && a && V.split(" ").forEach((M) => a.off(M, H)), v && a && v.split(" ").forEach((M) => a.store.off(M, H));
147
147
  };
148
- }, [a, v]), D(() => {
149
- A.current && C && k(R);
148
+ }, [a, f]), B(() => {
149
+ E.current && C && k(R);
150
150
  }, [a, h, C]);
151
- const O = [m, a, C];
152
- if (O.t = m, O.i18n = a, O.ready = C, C || !C && !d) return O;
151
+ const O = [u, a, C];
152
+ if (O.t = u, O.i18n = a, O.ready = C, C || !C && !d) return O;
153
153
  throw new Promise((V) => {
154
154
  i.lng ? _1(a, i.lng, n, () => V()) : Z1(a, n, () => V());
155
155
  });
156
- }, c1 = ({
156
+ }, a1 = ({
157
157
  children: o,
158
158
  direction: i = "row",
159
159
  flexWrap: e = "nowrap",
@@ -175,12 +175,12 @@ const C2 = (o, i) => {
175
175
  style: { padding: d },
176
176
  children: o
177
177
  }
178
- ), { Title: c2, Text: a2 } = a1, d2 = {
178
+ ), { Title: c2, Text: a2 } = d1, d2 = {
179
179
  h1: 1,
180
180
  h2: 2,
181
181
  h3: 3,
182
182
  h4: 4
183
- }, V1 = Q(
183
+ }, V1 = X(
184
184
  ({
185
185
  align: o = "inherit",
186
186
  variant: i = "body1",
@@ -193,16 +193,16 @@ const C2 = (o, i) => {
193
193
  trim: d = !1
194
194
  }, h) => {
195
195
  const n = T(null);
196
- l1(h, () => n.current);
197
- const [C, Z] = x(!1);
198
- D(() => {
196
+ s1(h, () => n.current);
197
+ const [C, _] = Z(!1);
198
+ B(() => {
199
199
  var k;
200
200
  if (!d) return;
201
- const v = () => {
202
- n.current && Z(n.current.scrollWidth > n.current.clientWidth);
201
+ const f = () => {
202
+ n.current && _(n.current.scrollWidth > n.current.clientWidth);
203
203
  };
204
- v();
205
- const p = new ResizeObserver(v);
204
+ f();
205
+ const p = new ResizeObserver(f);
206
206
  return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
207
207
  p.disconnect();
208
208
  };
@@ -210,7 +210,7 @@ const C2 = (o, i) => {
210
210
  const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
211
211
  let L = `snmt-typography snmt-typography-${i}`;
212
212
  o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
213
- const m = {
213
+ const u = {
214
214
  className: L,
215
215
  style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
216
216
  onClick: s,
@@ -222,7 +222,7 @@ const C2 = (o, i) => {
222
222
  }
223
223
  } : void 0
224
224
  };
225
- return R ? /* @__PURE__ */ t(c2, { level: d2[i], ...m, children: l }) : /* @__PURE__ */ t(a2, { ...m, children: l });
225
+ return R ? /* @__PURE__ */ t(c2, { level: d2[i], ...u, children: l }) : /* @__PURE__ */ t(a2, { ...u, children: l });
226
226
  }
227
227
  ), w2 = ({ label: o, variant: i = "small", src: e, fallbackText: l }) => {
228
228
  const s = e != null && e.trim() ? e : void 0, a = {
@@ -267,12 +267,12 @@ const C2 = (o, i) => {
267
267
  ]
268
268
  }
269
269
  );
270
- }, { Title: g2, Text: L2 } = a1, k2 = {
270
+ }, { Title: g2, Text: L2 } = d1, k2 = {
271
271
  h1: 1,
272
272
  h2: 2,
273
273
  h3: 3,
274
274
  h4: 4
275
- }, p2 = Q(
275
+ }, p2 = X(
276
276
  ({
277
277
  align: o = "inherit",
278
278
  variant: i = "body1",
@@ -285,16 +285,16 @@ const C2 = (o, i) => {
285
285
  trim: d = !1
286
286
  }, h) => {
287
287
  const n = T(null);
288
- l1(h, () => n.current);
289
- const [C, Z] = x(!1);
290
- D(() => {
288
+ s1(h, () => n.current);
289
+ const [C, _] = Z(!1);
290
+ B(() => {
291
291
  var k;
292
292
  if (!d) return;
293
- const v = () => {
294
- n.current && Z(n.current.scrollWidth > n.current.clientWidth);
293
+ const f = () => {
294
+ n.current && _(n.current.scrollWidth > n.current.clientWidth);
295
295
  };
296
- v();
297
- const p = new ResizeObserver(v);
296
+ f();
297
+ const p = new ResizeObserver(f);
298
298
  return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
299
299
  p.disconnect();
300
300
  };
@@ -302,7 +302,7 @@ const C2 = (o, i) => {
302
302
  const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
303
303
  let L = `snmt-typography snmt-typography-${i}`;
304
304
  o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
305
- const m = {
305
+ const u = {
306
306
  className: L,
307
307
  style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
308
308
  onClick: s,
@@ -314,7 +314,7 @@ const C2 = (o, i) => {
314
314
  }
315
315
  } : void 0
316
316
  };
317
- return R ? /* @__PURE__ */ t(g2, { level: k2[i], ...m, children: l }) : /* @__PURE__ */ t(L2, { ...m, children: l });
317
+ return R ? /* @__PURE__ */ t(g2, { level: k2[i], ...u, children: l }) : /* @__PURE__ */ t(L2, { ...u, children: l });
318
318
  }
319
319
  ), m2 = ({
320
320
  checked: o = !0,
@@ -324,19 +324,19 @@ const C2 = (o, i) => {
324
324
  disabled: s = !1,
325
325
  disableUncheck: a = !1
326
326
  }) => {
327
- const [w, d] = x(o), [h, n] = x(i);
328
- D(() => {
327
+ const [w, d] = Z(o), [h, n] = Z(i);
328
+ B(() => {
329
329
  d(o), n(i);
330
330
  }, [o, i]);
331
- const { theme: C } = X(s1);
331
+ const { theme: C } = e1(n1);
332
332
  return /* @__PURE__ */ t(
333
333
  I1,
334
334
  {
335
335
  className: `snmt-checkbox snmt-checkbox-${C}`,
336
336
  checked: w,
337
337
  indeterminate: h,
338
- onChange: (Z) => {
339
- a && w || (n(!1), d(Z.target.checked), l && l(Z));
338
+ onChange: (_) => {
339
+ a && w || (n(!1), d(_.target.checked), l && l(_));
340
340
  },
341
341
  disabled: s,
342
342
  children: e && /* @__PURE__ */ t(
@@ -820,7 +820,7 @@ const C2 = (o, i) => {
820
820
  )
821
821
  ]
822
822
  }
823
- ), B2 = ({
823
+ ), G2 = ({
824
824
  width: o = 20,
825
825
  height: i = 20,
826
826
  color: e = r.GREY_DARK_5,
@@ -860,7 +860,7 @@ const C2 = (o, i) => {
860
860
  )
861
861
  ]
862
862
  }
863
- ), G2 = ({
863
+ ), B2 = ({
864
864
  width: o = 20,
865
865
  height: i = 20,
866
866
  color: e = r.GREY_DARK_5,
@@ -2597,7 +2597,7 @@ const C2 = (o, i) => {
2597
2597
  }
2598
2598
  )
2599
2599
  }
2600
- ), r1 = ({
2600
+ ), c1 = ({
2601
2601
  name: o,
2602
2602
  width: i,
2603
2603
  height: e,
@@ -2606,7 +2606,7 @@ const C2 = (o, i) => {
2606
2606
  disabled: a = !1,
2607
2607
  onClick: w
2608
2608
  }) => {
2609
- const { theme: d } = X(s1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
2609
+ const { theme: d } = e1(n1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
2610
2610
  return /* @__PURE__ */ t(F, { children: (() => {
2611
2611
  switch (o) {
2612
2612
  case "nextIcon":
@@ -2634,9 +2634,9 @@ const C2 = (o, i) => {
2634
2634
  case "filter":
2635
2635
  return D2({ width: i, height: e, color: h, className: C, onClick: n });
2636
2636
  case "attention":
2637
- return B2({ width: i, height: e, color: h, className: C, onClick: n });
2638
- case "users":
2639
2637
  return G2({ width: i, height: e, color: h, className: C, onClick: n });
2638
+ case "users":
2639
+ return B2({ width: i, height: e, color: h, className: C, onClick: n });
2640
2640
  case "mySkillsMatrix":
2641
2641
  return K2({
2642
2642
  width: i,
@@ -2783,12 +2783,12 @@ const C2 = (o, i) => {
2783
2783
  return /* @__PURE__ */ t(F, { children: "No Icon provided" });
2784
2784
  }
2785
2785
  })() });
2786
- }, { Title: H5, Text: A5 } = a1, E5 = {
2786
+ }, { Title: H5, Text: A5 } = d1, E5 = {
2787
2787
  h1: 1,
2788
2788
  h2: 2,
2789
2789
  h3: 3,
2790
2790
  h4: 4
2791
- }, D5 = Q(
2791
+ }, D5 = X(
2792
2792
  ({
2793
2793
  align: o = "inherit",
2794
2794
  variant: i = "body1",
@@ -2801,16 +2801,16 @@ const C2 = (o, i) => {
2801
2801
  trim: d = !1
2802
2802
  }, h) => {
2803
2803
  const n = T(null);
2804
- l1(h, () => n.current);
2805
- const [C, Z] = x(!1);
2806
- D(() => {
2804
+ s1(h, () => n.current);
2805
+ const [C, _] = Z(!1);
2806
+ B(() => {
2807
2807
  var k;
2808
2808
  if (!d) return;
2809
- const v = () => {
2810
- n.current && Z(n.current.scrollWidth > n.current.clientWidth);
2809
+ const f = () => {
2810
+ n.current && _(n.current.scrollWidth > n.current.clientWidth);
2811
2811
  };
2812
- v();
2813
- const p = new ResizeObserver(v);
2812
+ f();
2813
+ const p = new ResizeObserver(f);
2814
2814
  return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
2815
2815
  p.disconnect();
2816
2816
  };
@@ -2818,7 +2818,7 @@ const C2 = (o, i) => {
2818
2818
  const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
2819
2819
  let L = `snmt-typography snmt-typography-${i}`;
2820
2820
  o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
2821
- const m = {
2821
+ const u = {
2822
2822
  className: L,
2823
2823
  style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
2824
2824
  onClick: s,
@@ -2830,9 +2830,9 @@ const C2 = (o, i) => {
2830
2830
  }
2831
2831
  } : void 0
2832
2832
  };
2833
- return R ? /* @__PURE__ */ t(H5, { level: E5[i], ...m, children: l }) : /* @__PURE__ */ t(A5, { ...m, children: l });
2833
+ return R ? /* @__PURE__ */ t(H5, { level: E5[i], ...u, children: l }) : /* @__PURE__ */ t(A5, { ...u, children: l });
2834
2834
  }
2835
- ), B5 = ({
2835
+ ), G5 = ({
2836
2836
  width: o = 20,
2837
2837
  height: i = 20,
2838
2838
  color: e = "#001E52",
@@ -2859,7 +2859,7 @@ const C2 = (o, i) => {
2859
2859
  }
2860
2860
  )
2861
2861
  }
2862
- ), G5 = ({
2862
+ ), B5 = ({
2863
2863
  width: o = 20,
2864
2864
  height: i = 20,
2865
2865
  color: e = r.GREY_DARK_5,
@@ -4776,7 +4776,7 @@ const C2 = (o, i) => {
4776
4776
  )
4777
4777
  ]
4778
4778
  }
4779
- ), B7 = ({
4779
+ ), G7 = ({
4780
4780
  className: o,
4781
4781
  color: i = r.GREY_DARK_5,
4782
4782
  height: e = 24,
@@ -4803,7 +4803,7 @@ const C2 = (o, i) => {
4803
4803
  }
4804
4804
  )
4805
4805
  }
4806
- ), G7 = ({
4806
+ ), B7 = ({
4807
4807
  className: o,
4808
4808
  color: i = r.GREY_DARK_5,
4809
4809
  height: e = 20,
@@ -5089,7 +5089,7 @@ const C2 = (o, i) => {
5089
5089
  disabled: a = !1,
5090
5090
  onClick: w
5091
5091
  }) => {
5092
- const { theme: d } = X(s1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
5092
+ const { theme: d } = e1(n1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
5093
5093
  return /* @__PURE__ */ t(F, { children: (() => {
5094
5094
  switch (o) {
5095
5095
  case "nextIcon":
@@ -5097,9 +5097,9 @@ const C2 = (o, i) => {
5097
5097
  case "prevIcon":
5098
5098
  return g7({ width: i, height: e, color: h, className: C, onClick: n });
5099
5099
  case "arrowDown":
5100
- return B5({ width: i, height: e, color: h, className: C, onClick: n });
5101
- case "info":
5102
5100
  return G5({ width: i, height: e, color: h, className: C, onClick: n });
5101
+ case "info":
5102
+ return B5({ width: i, height: e, color: h, className: C, onClick: n });
5103
5103
  case "arrowRight":
5104
5104
  return K5({ width: i, height: e, color: h, className: C, onClick: n });
5105
5105
  case "calendar":
@@ -5243,9 +5243,9 @@ const C2 = (o, i) => {
5243
5243
  case "image":
5244
5244
  return D7({ width: i, height: e, color: h, className: C, onClick: n });
5245
5245
  case "edit":
5246
- return B7({ width: i, height: e, color: h, className: C, onClick: n });
5247
- case "filledArrowRight":
5248
5246
  return G7({ width: i, height: e, color: h, className: C, onClick: n });
5247
+ case "filledArrowRight":
5248
+ return B7({ width: i, height: e, color: h, className: C, onClick: n });
5249
5249
  case "burgerMenu":
5250
5250
  return K7({ width: i, height: e, color: h, className: C, onClick: n });
5251
5251
  case "refresh":
@@ -5266,7 +5266,7 @@ const C2 = (o, i) => {
5266
5266
  return /* @__PURE__ */ t(F, { children: "No Icon provided" });
5267
5267
  }
5268
5268
  })() });
5269
- }, B1 = ({
5269
+ }, G1 = ({
5270
5270
  children: o,
5271
5271
  width: i,
5272
5272
  size: e = "small",
@@ -5304,12 +5304,12 @@ const C2 = (o, i) => {
5304
5304
  ) : o
5305
5305
  }
5306
5306
  );
5307
- }, { Title: S7, Text: F7 } = a1, $7 = {
5307
+ }, { Title: S7, Text: F7 } = d1, $7 = {
5308
5308
  h1: 1,
5309
5309
  h2: 2,
5310
5310
  h3: 3,
5311
5311
  h4: 4
5312
- }, P7 = Q(
5312
+ }, P7 = X(
5313
5313
  ({
5314
5314
  align: o = "inherit",
5315
5315
  variant: i = "body1",
@@ -5322,16 +5322,16 @@ const C2 = (o, i) => {
5322
5322
  trim: d = !1
5323
5323
  }, h) => {
5324
5324
  const n = T(null);
5325
- l1(h, () => n.current);
5326
- const [C, Z] = x(!1);
5327
- D(() => {
5325
+ s1(h, () => n.current);
5326
+ const [C, _] = Z(!1);
5327
+ B(() => {
5328
5328
  var k;
5329
5329
  if (!d) return;
5330
- const v = () => {
5331
- n.current && Z(n.current.scrollWidth > n.current.clientWidth);
5330
+ const f = () => {
5331
+ n.current && _(n.current.scrollWidth > n.current.clientWidth);
5332
5332
  };
5333
- v();
5334
- const p = new ResizeObserver(v);
5333
+ f();
5334
+ const p = new ResizeObserver(f);
5335
5335
  return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
5336
5336
  p.disconnect();
5337
5337
  };
@@ -5339,7 +5339,7 @@ const C2 = (o, i) => {
5339
5339
  const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
5340
5340
  let L = `snmt-typography snmt-typography-${i}`;
5341
5341
  o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
5342
- const m = {
5342
+ const u = {
5343
5343
  className: L,
5344
5344
  style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
5345
5345
  onClick: s,
@@ -5351,7 +5351,7 @@ const C2 = (o, i) => {
5351
5351
  }
5352
5352
  } : void 0
5353
5353
  };
5354
- return R ? /* @__PURE__ */ t(S7, { level: $7[i], ...m, children: l }) : /* @__PURE__ */ t(F7, { ...m, children: l });
5354
+ return R ? /* @__PURE__ */ t(S7, { level: $7[i], ...u, children: l }) : /* @__PURE__ */ t(F7, { ...u, children: l });
5355
5355
  }
5356
5356
  ), z7 = ({
5357
5357
  children: o,
@@ -5362,7 +5362,7 @@ const C2 = (o, i) => {
5362
5362
  noPadding: a = !1,
5363
5363
  trigger: w = "click"
5364
5364
  }) => {
5365
- const [d, h] = x(!1);
5365
+ const [d, h] = Z(!1);
5366
5366
  return /* @__PURE__ */ t(
5367
5367
  T1,
5368
5368
  {
@@ -5378,12 +5378,12 @@ const C2 = (o, i) => {
5378
5378
  children: /* @__PURE__ */ t("div", { className: "wrapper", children: o })
5379
5379
  }
5380
5380
  );
5381
- }, { Title: U7, Text: q7 } = a1, J7 = {
5381
+ }, { Title: U7, Text: q7 } = d1, J7 = {
5382
5382
  h1: 1,
5383
5383
  h2: 2,
5384
5384
  h3: 3,
5385
5385
  h4: 4
5386
- }, G1 = Q(
5386
+ }, B1 = X(
5387
5387
  ({
5388
5388
  align: o = "inherit",
5389
5389
  variant: i = "body1",
@@ -5396,16 +5396,16 @@ const C2 = (o, i) => {
5396
5396
  trim: d = !1
5397
5397
  }, h) => {
5398
5398
  const n = T(null);
5399
- l1(h, () => n.current);
5400
- const [C, Z] = x(!1);
5401
- D(() => {
5399
+ s1(h, () => n.current);
5400
+ const [C, _] = Z(!1);
5401
+ B(() => {
5402
5402
  var k;
5403
5403
  if (!d) return;
5404
- const v = () => {
5405
- n.current && Z(n.current.scrollWidth > n.current.clientWidth);
5404
+ const f = () => {
5405
+ n.current && _(n.current.scrollWidth > n.current.clientWidth);
5406
5406
  };
5407
- v();
5408
- const p = new ResizeObserver(v);
5407
+ f();
5408
+ const p = new ResizeObserver(f);
5409
5409
  return n.current && p.observe(n.current), (k = n.current) != null && k.parentElement && p.observe(n.current.parentElement), () => {
5410
5410
  p.disconnect();
5411
5411
  };
@@ -5413,7 +5413,7 @@ const C2 = (o, i) => {
5413
5413
  const R = i === "h1" || i === "h2" || i === "h3" || i === "h4";
5414
5414
  let L = `snmt-typography snmt-typography-${i}`;
5415
5415
  o && o !== "inherit" && (L += ` snmt-typography-align-${o}`), a && (L += " collapsed");
5416
- const m = {
5416
+ const u = {
5417
5417
  className: L,
5418
5418
  style: { color: e, whiteSpace: d ? "nowrap" : w, display: d ? "block" : "" },
5419
5419
  onClick: s,
@@ -5425,7 +5425,7 @@ const C2 = (o, i) => {
5425
5425
  }
5426
5426
  } : void 0
5427
5427
  };
5428
- return R ? /* @__PURE__ */ t(U7, { level: J7[i], ...m, children: l }) : /* @__PURE__ */ t(q7, { ...m, children: l });
5428
+ return R ? /* @__PURE__ */ t(U7, { level: J7[i], ...u, children: l }) : /* @__PURE__ */ t(q7, { ...u, children: l });
5429
5429
  }
5430
5430
  ), Q7 = ({
5431
5431
  width: o = 20,
@@ -6635,7 +6635,7 @@ const C2 = (o, i) => {
6635
6635
  }
6636
6636
  )
6637
6637
  }
6638
- ), B0 = ({
6638
+ ), G0 = ({
6639
6639
  className: o,
6640
6640
  color: i = r.GREY_DARK_5,
6641
6641
  height: e = 20,
@@ -6662,7 +6662,7 @@ const C2 = (o, i) => {
6662
6662
  }
6663
6663
  )
6664
6664
  }
6665
- ), G0 = ({
6665
+ ), B0 = ({
6666
6666
  className: o,
6667
6667
  color: i = r.GREY_DARK_5,
6668
6668
  height: e = 5,
@@ -7675,7 +7675,7 @@ const C2 = (o, i) => {
7675
7675
  }
7676
7676
  )
7677
7677
  }
7678
- ), u1 = ({
7678
+ ), v1 = ({
7679
7679
  name: o,
7680
7680
  width: i,
7681
7681
  height: e,
@@ -7684,13 +7684,13 @@ const C2 = (o, i) => {
7684
7684
  disabled: a = !1,
7685
7685
  onClick: w
7686
7686
  }) => {
7687
- const { theme: d } = X(s1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
7687
+ const { theme: d } = e1(n1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
7688
7688
  return /* @__PURE__ */ t(F, { children: (() => {
7689
7689
  switch (o) {
7690
7690
  case "nextIcon":
7691
7691
  return D0({ width: i, height: e, color: h, className: C, onClick: n });
7692
7692
  case "prevIcon":
7693
- return B0({ width: i, height: e, color: h, className: C, onClick: n });
7693
+ return G0({ width: i, height: e, color: h, className: C, onClick: n });
7694
7694
  case "arrowDown":
7695
7695
  return Q7({ width: i, height: e, color: h, className: C, onClick: n });
7696
7696
  case "info":
@@ -7796,7 +7796,7 @@ const C2 = (o, i) => {
7796
7796
  case "arrowUpFilled":
7797
7797
  return K0({ width: i, height: e, color: h, className: C, onClick: n });
7798
7798
  case "arrowDownFilled":
7799
- return G0({ width: i, height: e, color: h, className: C, onClick: n });
7799
+ return B0({ width: i, height: e, color: h, className: C, onClick: n });
7800
7800
  case "arrow2Up":
7801
7801
  return i0({ width: i, height: e, color: h, className: C, onClick: n });
7802
7802
  case "arrow2Right":
@@ -7884,7 +7884,7 @@ const C2 = (o, i) => {
7884
7884
  background: w[a],
7885
7885
  width: l ?? "fit-content"
7886
7886
  },
7887
- children: /* @__PURE__ */ t(G1, { variant: s, color: r.GREY_DARK_4, children: o })
7887
+ children: /* @__PURE__ */ t(B1, { variant: s, color: r.GREY_DARK_4, children: o })
7888
7888
  }
7889
7889
  );
7890
7890
  }, r9 = ({
@@ -7895,7 +7895,7 @@ const C2 = (o, i) => {
7895
7895
  }) => {
7896
7896
  const s = {
7897
7897
  approved: /* @__PURE__ */ t(
7898
- u1,
7898
+ v1,
7899
7899
  {
7900
7900
  name: "checkCircle",
7901
7901
  width: 14,
@@ -7903,9 +7903,9 @@ const C2 = (o, i) => {
7903
7903
  color: r.NOTIFICATION_SUCCESS_DARK
7904
7904
  }
7905
7905
  ),
7906
- pending: /* @__PURE__ */ t(u1, { name: "history", width: 14, height: 14, color: r.NOTIFICATION_WARNING_DARK }),
7906
+ pending: /* @__PURE__ */ t(v1, { name: "history", width: 14, height: 14, color: r.NOTIFICATION_WARNING_DARK }),
7907
7907
  rejected: /* @__PURE__ */ t(
7908
- u1,
7908
+ v1,
7909
7909
  {
7910
7910
  name: "cancelCircle",
7911
7911
  width: 14,
@@ -7913,7 +7913,7 @@ const C2 = (o, i) => {
7913
7913
  color: r.NOTIFICATION_ERROR_DARK
7914
7914
  }
7915
7915
  ),
7916
- canceled: /* @__PURE__ */ t(u1, { name: "cancelCircle", width: 14, height: 14, color: r.GREY_DARK_2 })
7916
+ canceled: /* @__PURE__ */ t(v1, { name: "cancelCircle", width: 14, height: 14, color: r.GREY_DARK_2 })
7917
7917
  }, a = {
7918
7918
  approved: r.NOTIFICATION_SUCCESS_LIGHT,
7919
7919
  pending: r.NOTIFICATION_WARNING_LIGHT,
@@ -7932,7 +7932,7 @@ const C2 = (o, i) => {
7932
7932
  style: { background: a[i], width: l ?? "fit-content" },
7933
7933
  children: [
7934
7934
  e && s[i],
7935
- /* @__PURE__ */ t(G1, { variant: "body4", color: w[i], children: o })
7935
+ /* @__PURE__ */ t(B1, { variant: "body4", color: w[i], children: o })
7936
7936
  ]
7937
7937
  }
7938
7938
  );
@@ -7958,22 +7958,22 @@ const a9 = ({
7958
7958
  extraOptions: w,
7959
7959
  selectedItemVariant: d = "default"
7960
7960
  }) => {
7961
- const { locale: h } = X(s1), { t: n } = r2("common", { lng: h }), [C, Z] = x(!1);
7962
- if (D(() => {
7963
- o.length || Z(!1);
7961
+ const { locale: h } = e1(n1), { t: n } = r2("common", { lng: h }), [C, _] = Z(!1);
7962
+ if (B(() => {
7963
+ o.length || _(!1);
7964
7964
  }, [o]), !o.length)
7965
7965
  return null;
7966
7966
  const R = (L) => {
7967
- var m, k;
7968
- return ((m = a == null ? void 0 : a.find((p) => p.value === L)) == null ? void 0 : m.label) || ((k = w == null ? void 0 : w.find((p) => p.value === L)) == null ? void 0 : k.label) || L;
7967
+ var u, k;
7968
+ return ((u = a == null ? void 0 : a.find((p) => p.value === L)) == null ? void 0 : u.label) || ((k = w == null ? void 0 : w.find((p) => p.value === L)) == null ? void 0 : k.label) || L;
7969
7969
  };
7970
7970
  return /* @__PURE__ */ c(
7971
7971
  z7,
7972
7972
  {
7973
7973
  content: (
7974
7974
  // 90: paddings + margins + gaps and so on
7975
- /* @__PURE__ */ t("div", { style: { maxWidth: e - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ t(c1, { gap: 6, flexWrap: "wrap", children: o.map(({ value: L }) => {
7976
- const m = d === "badge" && a.find(
7975
+ /* @__PURE__ */ t("div", { style: { maxWidth: e - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ t(a1, { gap: 6, flexWrap: "wrap", children: o.map(({ value: L }) => {
7976
+ const u = d === "badge" && a.find(
7977
7977
  (k) => k.label === R(L)
7978
7978
  );
7979
7979
  return d === "badge" ? /* @__PURE__ */ t(
@@ -7981,12 +7981,12 @@ const a9 = ({
7981
7981
  {
7982
7982
  variant: "regular",
7983
7983
  size: "small",
7984
- color: m ? m.color : void 0,
7984
+ color: u ? u.color : void 0,
7985
7985
  text: R(L)
7986
7986
  },
7987
7987
  L
7988
7988
  ) : /* @__PURE__ */ t(
7989
- B1,
7989
+ G1,
7990
7990
  {
7991
7991
  onClose: () => i(L),
7992
7992
  closable: l,
@@ -7999,7 +7999,7 @@ const a9 = ({
7999
7999
  ),
8000
8000
  placement: "bottomRight",
8001
8001
  isOpen: C,
8002
- setIsOpen: Z,
8002
+ setIsOpen: _,
8003
8003
  children: [
8004
8004
  o.length,
8005
8005
  " ",
@@ -8744,7 +8744,7 @@ const a9 = ({
8744
8744
  )
8745
8745
  ]
8746
8746
  }
8747
- ), B9 = ({
8747
+ ), G9 = ({
8748
8748
  width: o = 20,
8749
8749
  height: i = 20,
8750
8750
  color: e = r.GREY_DARK_5,
@@ -8777,7 +8777,7 @@ const a9 = ({
8777
8777
  )
8778
8778
  ]
8779
8779
  }
8780
- ), G9 = ({
8780
+ ), B9 = ({
8781
8781
  width: o = 20,
8782
8782
  height: i = 20,
8783
8783
  color: e = r.GREY_DARK_5,
@@ -10276,7 +10276,7 @@ const a9 = ({
10276
10276
  disabled: a = !1,
10277
10277
  onClick: w
10278
10278
  }) => {
10279
- const { theme: d } = X(s1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
10279
+ const { theme: d } = e1(n1), h = a ? d && d === "dark" ? r.GREY_LIGHT_4 : r.GREY_DARK_1 : l, n = a ? void 0 : w, C = w && !a ? `${s || ""} clickable` : s;
10280
10280
  return /* @__PURE__ */ t(F, { children: (() => {
10281
10281
  switch (o) {
10282
10282
  case "nextIcon":
@@ -10328,9 +10328,9 @@ const a9 = ({
10328
10328
  case "history":
10329
10329
  return D9({ width: i, height: e, color: h, className: C, onClick: n });
10330
10330
  case "logOut":
10331
- return B9({ width: i, height: e, color: h, className: C, onClick: n });
10332
- case "settings":
10333
10331
  return G9({ width: i, height: e, color: h, className: C, onClick: n });
10332
+ case "settings":
10333
+ return B9({ width: i, height: e, color: h, className: C, onClick: n });
10334
10334
  case "trash":
10335
10335
  return K9({ width: i, height: e, color: h, className: C, onClick: n });
10336
10336
  case "settings2":
@@ -10484,7 +10484,7 @@ function x4(o, i) {
10484
10484
  function Z4(o, i) {
10485
10485
  return i ? r.GREY_DARK_2 : o ? r.GREY_LIGHT_0 : r.GREY_DARK_4;
10486
10486
  }
10487
- const _4 = Q((o, i) => {
10487
+ const _4 = X((o, i) => {
10488
10488
  const {
10489
10489
  value: e,
10490
10490
  onChange: l,
@@ -10495,49 +10495,49 @@ const _4 = Q((o, i) => {
10495
10495
  width: h,
10496
10496
  disabled: n = !1,
10497
10497
  required: C = !1,
10498
- clearable: Z = !0,
10498
+ clearable: _ = !0,
10499
10499
  scrollThresholdValue: R = 50,
10500
10500
  onSearchChange: L,
10501
- onDropdownVisibleChange: m,
10501
+ onDropdownVisibleChange: u,
10502
10502
  onScrollToEnd: k,
10503
- onPopupScroll: v,
10503
+ onPopupScroll: f,
10504
10504
  id: p,
10505
- extraOptions: A,
10505
+ extraOptions: E,
10506
10506
  dropdownRender: O,
10507
10507
  optionRender: V,
10508
- isLoading: u,
10508
+ isLoading: v,
10509
10509
  readOnly: H,
10510
10510
  error: M,
10511
- selectedItemVariant: B = "default",
10512
- variant: K = "outlined"
10511
+ selectedItemVariant: D = "default",
10512
+ variant: Y = "outlined"
10513
10513
  } = o;
10514
- let e1;
10515
- a && a !== "single" && (e1 = o.overflowBehaviour ?? "responsive");
10516
- const [b, P] = x(!1), [z, d1] = x(!1), [S, n1] = x(!1), [C1, i1] = x(!0), [_, U] = x(e), h1 = T(null);
10517
- D(() => {
10514
+ let i1;
10515
+ a && a !== "single" && (i1 = o.overflowBehaviour ?? "responsive");
10516
+ const [b, P] = Z(!1), [z, w1] = Z(!1), [S, C1] = Z(!1), [h1, t1] = Z(!0), [x, U] = Z(e), r1 = T(null);
10517
+ B(() => {
10518
10518
  U(e);
10519
10519
  }, [e]);
10520
- const w1 = (g) => {
10521
- P(g), m && m(g);
10522
- }, g1 = (g, N) => {
10523
- var W;
10524
- return !!((W = N == null ? void 0 : N.label) != null && W.toString().toLowerCase().includes(g.toLowerCase()));
10525
- }, L1 = () => {
10526
- d1(!0);
10520
+ const g1 = (g) => {
10521
+ P(g), u && u(g);
10522
+ }, L1 = (g, m) => {
10523
+ var A;
10524
+ return !!((A = m == null ? void 0 : m.label) != null && A.toString().toLowerCase().includes(g.toLowerCase()));
10527
10525
  }, k1 = () => {
10528
- d1(!1);
10526
+ w1(!0);
10527
+ }, p1 = () => {
10528
+ w1(!1);
10529
10529
  }, $ = I(
10530
10530
  (g) => {
10531
10531
  if (U(g), a && a !== "single") {
10532
- const W = g;
10533
- l == null || l(W);
10532
+ const A = g;
10533
+ l == null || l(A);
10534
10534
  return;
10535
10535
  }
10536
- let N = null;
10537
- Array.isArray(g) && B === "badge" ? N = g.length > 0 ? g[0] : null : Array.isArray(g) || (N = g || null), l == null || l(N);
10536
+ let m = null;
10537
+ Array.isArray(g) && D === "badge" ? m = g.length > 0 ? g[0] : null : Array.isArray(g) || (m = g || null), l == null || l(m);
10538
10538
  },
10539
- [a, l, B]
10540
- ), p1 = I(() => {
10539
+ [a, l, D]
10540
+ ), m1 = I(() => {
10541
10541
  if (!(H || n)) {
10542
10542
  if (a) {
10543
10543
  $([]);
@@ -10545,71 +10545,71 @@ const _4 = Q((o, i) => {
10545
10545
  }
10546
10546
  $("");
10547
10547
  }
10548
- }, [n, $, a, H]), q = I(
10548
+ }, [n, $, a, H]), J = I(
10549
10549
  (g) => {
10550
- const N = _.filter((W) => W !== g);
10551
- $(N), U(N);
10550
+ const m = x.filter((A) => A !== g);
10551
+ $(m), U(m);
10552
10552
  },
10553
- [$, _]
10554
- ), m1 = I(
10555
- (g) => (_ == null ? void 0 : _.indexOf(g)) === 0 ? (
10553
+ [$, x]
10554
+ ), u1 = I(
10555
+ (g) => (x == null ? void 0 : x.indexOf(g)) === 0 ? (
10556
10556
  // if the search input is empty
10557
10557
  // then display the placeholder, else do not display it
10558
- /* @__PURE__ */ t("span", { className: "custom-placeholder", children: C1 ? s : "" })
10558
+ /* @__PURE__ */ t("span", { className: "custom-placeholder", children: h1 ? s : "" })
10559
10559
  ) : /* @__PURE__ */ t(F, {}),
10560
- [C1, _, s]
10561
- ), f = (g) => {
10560
+ [h1, x, s]
10561
+ ), N = (g) => {
10562
10562
  g.preventDefault(), g.stopPropagation();
10563
- }, E = async (g) => {
10564
- const { target: N } = g;
10565
- N.scrollTop + N.offsetHeight >= N.scrollHeight - R && (k == null || k(!0)), v && await v(g);
10563
+ }, G = async (g) => {
10564
+ const { target: m } = g;
10565
+ m.scrollTop + m.offsetHeight >= m.scrollHeight - R && (k == null || k(!0)), f && await f(g);
10566
10566
  }, j = I(
10567
10567
  (g) => {
10568
- var N, W;
10569
- return ((N = d.find((t1) => t1.value === g)) == null ? void 0 : N.label) || ((W = A == null ? void 0 : A.find((t1) => t1.value === g)) == null ? void 0 : W.label) || g;
10568
+ var m, A;
10569
+ return ((m = d.find((q) => q.value === g)) == null ? void 0 : m.label) || ((A = E == null ? void 0 : E.find((q) => q.value === g)) == null ? void 0 : A.label) || g;
10570
10570
  },
10571
- [A, d]
10572
- ), G = I(
10573
- (g, N = "default") => {
10574
- var W;
10571
+ [E, d]
10572
+ ), K = I(
10573
+ (g, m = "default") => {
10574
+ var A;
10575
10575
  return /* @__PURE__ */ t(
10576
10576
  a9,
10577
10577
  {
10578
10578
  values: g,
10579
- onTagClose: q,
10580
- maxWidth: ((W = h1.current) == null ? void 0 : W.clientWidth) || 0,
10579
+ onTagClose: J,
10580
+ maxWidth: ((A = r1.current) == null ? void 0 : A.clientWidth) || 0,
10581
10581
  disabled: n,
10582
10582
  closable: !H,
10583
10583
  options: d,
10584
- extraOptions: A,
10585
- selectedItemVariant: N
10584
+ extraOptions: E,
10585
+ selectedItemVariant: m
10586
10586
  }
10587
10587
  );
10588
10588
  },
10589
- [n, A, q, d, H]
10590
- ), Y = I(
10591
- ({ label: g, value: N, mode: W }) => {
10592
- if (W === "filter")
10593
- return m1(N);
10589
+ [n, E, J, d, H]
10590
+ ), W = I(
10591
+ ({ label: g, value: m, mode: A }) => {
10592
+ if (A === "filter")
10593
+ return u1(m);
10594
10594
  {
10595
- const v1 = B === "badge" && d.find((Y1) => Y1.label === g), t1 = typeof g == "object" ? g : j(N);
10596
- return /* @__PURE__ */ t("div", { onMouseDown: f, className: "tag-wrapper", children: B === "badge" ? /* @__PURE__ */ t(
10595
+ const o1 = D === "badge" && d.find((Y1) => Y1.label === g), q = typeof g == "object" ? g : j(m);
10596
+ return /* @__PURE__ */ t("div", { onMouseDown: N, className: "tag-wrapper", children: D === "badge" ? /* @__PURE__ */ t(
10597
10597
  K1,
10598
10598
  {
10599
10599
  variant: "regular",
10600
10600
  size: "small",
10601
- color: v1 ? v1.color : "cyan",
10602
- text: t1
10601
+ color: o1 ? o1.color : "cyan",
10602
+ text: q
10603
10603
  }
10604
- ) : /* @__PURE__ */ t(B1, { onClose: () => q(N), disabled: n, children: t1 }) });
10604
+ ) : /* @__PURE__ */ t(G1, { onClose: () => J(m), disabled: n, children: q }) });
10605
10605
  }
10606
10606
  },
10607
- [n, j, q, m1, B, d]
10608
- ), y = Array.isArray(_) && _.length > 0 || !!_ && typeof _ == "string" && _.trim() !== "";
10607
+ [n, j, J, u1, D, d]
10608
+ ), y = Array.isArray(x) && x.length > 0 || !!x && typeof x == "string" && x.trim() !== "";
10609
10609
  return /* @__PURE__ */ c(
10610
10610
  "div",
10611
10611
  {
10612
- className: `snmt-select-container ${K === "borderless" ? "snmt-select-container-borderless" : ""}`,
10612
+ className: `snmt-select-container ${Y === "borderless" ? "snmt-select-container-borderless" : ""}`,
10613
10613
  children: [
10614
10614
  /* @__PURE__ */ c(
10615
10615
  "div",
@@ -10617,9 +10617,9 @@ const _4 = Q((o, i) => {
10617
10617
  className: `snmt-select ${z ? "snmt-select-focused" : ""}
10618
10618
  ${a ? "" : "snmt-select-single"}
10619
10619
  ${H ? "snmt-select-read-only" : ""}
10620
- ${e1 === "static" ? "snmt-select-static" : ""}
10621
- ${K === "borderless" ? "snmt-select-borderless" : ""}`,
10622
- ref: h1,
10620
+ ${i1 === "static" ? "snmt-select-static" : ""}
10621
+ ${Y === "borderless" ? "snmt-select-borderless" : ""}`,
10622
+ ref: r1,
10623
10623
  style: { width: h },
10624
10624
  children: [
10625
10625
  /* @__PURE__ */ t(
@@ -10630,42 +10630,42 @@ const _4 = Q((o, i) => {
10630
10630
  id: p,
10631
10631
  ref: i,
10632
10632
  showSearch: !!w,
10633
- filterOption: w && g1,
10634
- onDropdownVisibleChange: w1,
10633
+ filterOption: w && L1,
10634
+ onDropdownVisibleChange: g1,
10635
10635
  disabled: n,
10636
- value: _ || void 0,
10636
+ value: x || void 0,
10637
10637
  labelRender: (g) => {
10638
- const N = j(g.value);
10639
- return n ? /* @__PURE__ */ t("span", { style: { color: r.GREY_DARK_1 }, children: N }) : N;
10638
+ const m = j(g.value);
10639
+ return n ? /* @__PURE__ */ t("span", { style: { color: r.GREY_DARK_1 }, children: m }) : m;
10640
10640
  },
10641
- mode: V4(a, B),
10642
- variant: K,
10641
+ mode: V4(a, D),
10642
+ variant: Y,
10643
10643
  onChange: $,
10644
- onFocus: L1,
10645
- onBlur: k1,
10646
- onMouseEnter: () => n1(!0),
10647
- onMouseLeave: () => n1(!1),
10644
+ onFocus: k1,
10645
+ onBlur: p1,
10646
+ onMouseEnter: () => C1(!0),
10647
+ onMouseLeave: () => C1(!1),
10648
10648
  onSearch: (g) => {
10649
- i1(!g), L && L(g);
10649
+ t1(!g), L && L(g);
10650
10650
  },
10651
- onSelect: () => i1(!0),
10652
- onDeselect: () => i1(!0),
10653
- tagRender: (g) => Y({ ...g, mode: a }),
10654
- maxTagCount: e1 === "responsive" ? "responsive" : void 0,
10655
- maxCount: a === "single" && B === "badge" ? 1 : void 0,
10656
- maxTagPlaceholder: (g) => G(g, B),
10657
- onPopupScroll: E,
10658
- prefix: u && /* @__PURE__ */ t(H1, { size: "small" }),
10651
+ onSelect: () => t1(!0),
10652
+ onDeselect: () => t1(!0),
10653
+ tagRender: (g) => W({ ...g, mode: a }),
10654
+ maxTagCount: i1 === "responsive" ? "responsive" : void 0,
10655
+ maxCount: a === "single" && D === "badge" ? 1 : void 0,
10656
+ maxTagPlaceholder: (g) => K(g, D),
10657
+ onPopupScroll: G,
10658
+ prefix: v && /* @__PURE__ */ t(H1, { size: "small" }),
10659
10659
  suffixIcon: /* @__PURE__ */ t("div", { className: "wrapper-suffix-icon", children: a !== "filter" && /* @__PURE__ */ c(F, { children: [
10660
- _ && !!_.length && Z && /* @__PURE__ */ t(
10660
+ x && !!x.length && _ && /* @__PURE__ */ t(
10661
10661
  "div",
10662
10662
  {
10663
- onClick: p1,
10663
+ onClick: m1,
10664
10664
  style: {
10665
10665
  cursor: n ? "not-allowed" : "pointer"
10666
10666
  },
10667
10667
  children: /* @__PURE__ */ t(
10668
- r1,
10668
+ c1,
10669
10669
  {
10670
10670
  name: "cancel",
10671
10671
  color: n ? r.GREY_DARK_1 : r.GREY_DARK_2
@@ -10673,15 +10673,15 @@ const _4 = Q((o, i) => {
10673
10673
  )
10674
10674
  }
10675
10675
  ),
10676
- K === "borderless" && (S || z) && /* @__PURE__ */ t(
10676
+ Y === "borderless" && (S || z) && /* @__PURE__ */ t(
10677
10677
  R4,
10678
10678
  {
10679
10679
  isActive: b,
10680
10680
  onClick: () => P(!b)
10681
10681
  }
10682
10682
  ),
10683
- K === "outlined" && /* @__PURE__ */ t(
10684
- r1,
10683
+ Y === "outlined" && /* @__PURE__ */ t(
10684
+ c1,
10685
10685
  {
10686
10686
  name: "selectArrowIcon",
10687
10687
  color: n ? r.GREY_DARK_1 : r.GREY_DARK_5,
@@ -10690,40 +10690,38 @@ const _4 = Q((o, i) => {
10690
10690
  }
10691
10691
  )
10692
10692
  ] }) }),
10693
- removeIcon: /* @__PURE__ */ t(r1, { name: "cancelCircle", color: r.GREY_DARK_1 }),
10693
+ removeIcon: /* @__PURE__ */ t(c1, { name: "cancelCircle", color: r.GREY_DARK_1 }),
10694
10694
  options: d,
10695
- optionRender: (g) => V ? V(g.data) : /* @__PURE__ */ c(c1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
10696
- /* @__PURE__ */ c(c1, { alignItems: "center", gap: 12, children: [
10697
- a && /* @__PURE__ */ t(
10698
- m2,
10699
- {
10700
- checked: !!(_ != null && _.includes(g.value))
10701
- }
10702
- ),
10703
- /* @__PURE__ */ c(c1, { alignItems: "center", gap: 8, children: [
10704
- g.data.image !== void 0 && /* @__PURE__ */ t(
10705
- w2,
10706
- {
10707
- src: g.data.image,
10708
- variant: "xsmall",
10709
- fallbackText: g.data.imageFallbackText ? g.data.imageFallbackText : ""
10710
- }
10711
- ),
10712
- /* @__PURE__ */ t("span", { children: g.label })
10713
- ] })
10714
- ] }),
10715
- !a && _ === g.value && /* @__PURE__ */ t(r1, { name: "check", color: r.BLUE_DARK_1 })
10716
- ] }),
10695
+ optionRender: (g) => {
10696
+ const m = a === "single" && D === "badge", A = Array.isArray(x) ? !!(x != null && x.includes(g.value)) : x === g.value, o1 = m ? x : void 0, q = m ? ((o1 == null ? void 0 : o1.length) || 0) > 0 : !1;
10697
+ return V ? V(g.data) : /* @__PURE__ */ c(a1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
10698
+ /* @__PURE__ */ c(a1, { alignItems: "center", gap: 12, children: [
10699
+ a && a !== "single" || m ? /* @__PURE__ */ t(m2, { checked: A, disabled: m && q && !A }) : null,
10700
+ /* @__PURE__ */ c(a1, { alignItems: "center", gap: 8, children: [
10701
+ g.data.image !== void 0 && /* @__PURE__ */ t(
10702
+ w2,
10703
+ {
10704
+ src: g.data.image,
10705
+ variant: "xsmall",
10706
+ fallbackText: g.data.imageFallbackText ? g.data.imageFallbackText : ""
10707
+ }
10708
+ ),
10709
+ /* @__PURE__ */ t("span", { children: g.label })
10710
+ ] })
10711
+ ] }),
10712
+ !a && x === g.value && /* @__PURE__ */ t(c1, { name: "check", color: r.BLUE_DARK_1 })
10713
+ ] });
10714
+ },
10717
10715
  dropdownRender: (g) => /* @__PURE__ */ c("div", { className: "dropdown-container", children: [
10718
10716
  /* @__PURE__ */ t("div", { className: "dropdown-menu", children: O ? O(g) : g }),
10719
- u && /* @__PURE__ */ t("div", { className: "loading-overlay", children: /* @__PURE__ */ t(H1, {}) })
10717
+ v && /* @__PURE__ */ t("div", { className: "loading-overlay", children: /* @__PURE__ */ t(H1, {}) })
10720
10718
  ] })
10721
10719
  }
10722
10720
  ),
10723
- s && K !== "borderless" && /* @__PURE__ */ t(
10721
+ s && Y !== "borderless" && /* @__PURE__ */ t(
10724
10722
  "label",
10725
10723
  {
10726
- className: `${z || y ? "label-floating" : ""} ${n ? "label-disabled" : ""} ${z ? "label-focused" : ""} ${u ? "label-loading" : ""} ${M ? "label-error" : ""}`,
10724
+ className: `${z || y ? "label-floating" : ""} ${n ? "label-disabled" : ""} ${z ? "label-focused" : ""} ${v ? "label-loading" : ""} ${M ? "label-error" : ""}`,
10727
10725
  children: C ? `${s}*` : s
10728
10726
  }
10729
10727
  ),
@@ -10732,15 +10730,15 @@ const _4 = Q((o, i) => {
10732
10730
  {
10733
10731
  className: `${z ? "fieldset-focused" : ""} ${n ? "fieldset-disabled" : ""} ${y ? "fieldset-filled" : ""} ${M ? "fieldset-error" : ""}
10734
10732
  ${S ? "fieldset-hovered" : ""}`,
10735
- children: /* @__PURE__ */ t("legend", { children: s && K !== "borderless" && /* @__PURE__ */ t("span", { children: C ? `${s}*` : s }) })
10733
+ children: /* @__PURE__ */ t("legend", { children: s && Y !== "borderless" && /* @__PURE__ */ t("span", { children: C ? `${s}*` : s }) })
10736
10734
  }
10737
10735
  )
10738
10736
  ]
10739
10737
  }
10740
10738
  ),
10741
- M && /* @__PURE__ */ c(c1, { justifyContent: "flex-start", gap: 6, children: [
10739
+ M && /* @__PURE__ */ c(a1, { justifyContent: "flex-start", gap: 6, children: [
10742
10740
  /* @__PURE__ */ t(
10743
- r1,
10741
+ c1,
10744
10742
  {
10745
10743
  name: "attention",
10746
10744
  color: r.NOTIFICATION_ERROR_DARK,
@@ -10759,7 +10757,7 @@ function V4(o, i) {
10759
10757
  }
10760
10758
  function H4(o, i = 500) {
10761
10759
  const e = T();
10762
- return D(() => () => {
10760
+ return B(() => () => {
10763
10761
  e.current && clearTimeout(e.current);
10764
10762
  }, []), (...s) => {
10765
10763
  const a = setTimeout(() => {
@@ -10770,13 +10768,13 @@ function H4(o, i = 500) {
10770
10768
  }
10771
10769
  function A1(o) {
10772
10770
  const i = T(o);
10773
- return D(() => {
10771
+ return B(() => {
10774
10772
  i.current = o;
10775
10773
  }, [o]), i.current;
10776
10774
  }
10777
- const f1 = 100, o1 = {
10775
+ const f1 = 100, l1 = {
10778
10776
  offset: 0
10779
- }, K4 = Q((o, i) => {
10777
+ }, K4 = X((o, i) => {
10780
10778
  const {
10781
10779
  loadOptions: e,
10782
10780
  width: l,
@@ -10787,165 +10785,165 @@ const f1 = 100, o1 = {
10787
10785
  placeholder: h,
10788
10786
  mode: n,
10789
10787
  loadOnClosedState: C,
10790
- preloadOptions: Z,
10788
+ preloadOptions: _,
10791
10789
  extraOptions: R,
10792
10790
  onDropdownVisibleChange: L,
10793
- optionRender: m,
10791
+ optionRender: u,
10794
10792
  dropdownRender: k,
10795
- readOnly: v,
10793
+ readOnly: f,
10796
10794
  clearable: p = !0,
10797
- required: A = !1,
10795
+ required: E = !1,
10798
10796
  error: O,
10799
10797
  variant: V = "outlined"
10800
- } = o, [u, H] = x(), [M, B] = x(o1), [K, e1] = x(!1), [b, P] = x(), [z, d1] = x(!1), [S, n1] = x(
10798
+ } = o, [v, H] = Z(), [M, D] = Z(l1), [Y, i1] = Z(!1), [b, P] = Z(), [z, w1] = Z(!1), [S, C1] = Z(
10801
10799
  R ?? []
10802
- ), C1 = A1(M.offset), i1 = A1(b), [_, U] = x(!1), h1 = T(!1), w1 = I(
10800
+ ), h1 = A1(M.offset), t1 = A1(b), [x, U] = Z(!1), r1 = T(!1), g1 = I(
10803
10801
  async ({
10804
- limit: f = f1,
10805
- offset: E,
10802
+ limit: N = f1,
10803
+ offset: G,
10806
10804
  search: j
10807
10805
  }) => {
10808
- e1(!0);
10806
+ i1(!0);
10809
10807
  try {
10810
- const G = await e({
10811
- limit: f,
10812
- offset: E,
10808
+ const K = await e({
10809
+ limit: N,
10810
+ offset: G,
10813
10811
  search: j
10814
10812
  });
10815
10813
  H(
10816
- (Y) => E === 0 ? G.options : [...Y ?? [], ...G.options]
10817
- ), B((Y) => ({
10818
- ...Y,
10819
- count: G.count
10814
+ (W) => G === 0 ? K.options : [...W ?? [], ...K.options]
10815
+ ), D((W) => ({
10816
+ ...W,
10817
+ count: K.count
10820
10818
  }));
10821
- } catch (G) {
10822
- return console.error("AsyncSelect. fetchOptions error", G), [];
10819
+ } catch (K) {
10820
+ return console.error("AsyncSelect. fetchOptions error", K), [];
10823
10821
  } finally {
10824
- e1(!1);
10822
+ i1(!1);
10825
10823
  }
10826
10824
  },
10827
10825
  [e]
10828
- ), g1 = H4((f) => {
10829
- P(f), f || B(o1);
10830
- }), L1 = I(
10831
- (f) => g1(f),
10832
- [g1]
10833
- ), k1 = I(
10834
- async (f) => {
10835
- K || f && M.count && M.count > ((u == null ? void 0 : u.length) ?? 0) && B((E) => ({
10836
- ...E,
10837
- offset: E.offset + f1
10826
+ ), L1 = H4((N) => {
10827
+ P(N), N || D(l1);
10828
+ }), k1 = I(
10829
+ (N) => L1(N),
10830
+ [L1]
10831
+ ), p1 = I(
10832
+ async (N) => {
10833
+ Y || N && M.count && M.count > ((v == null ? void 0 : v.length) ?? 0) && D((G) => ({
10834
+ ...G,
10835
+ offset: G.offset + f1
10838
10836
  }));
10839
10837
  },
10840
- [K, u == null ? void 0 : u.length, M.count]
10838
+ [Y, v == null ? void 0 : v.length, M.count]
10841
10839
  ), $ = I(
10842
- (f) => {
10843
- d1(f), !f && b && (P(void 0), B(o1), U(!0)), L == null || L(f);
10840
+ (N) => {
10841
+ w1(N), !N && b && (P(void 0), D(l1), U(!0)), L == null || L(N);
10844
10842
  },
10845
10843
  [L, b]
10846
10844
  );
10847
- D(() => {
10848
- if (!h1.current || K) return;
10849
- (_ || z && (C1 !== M.offset || i1 !== b || !u)) && (w1({ offset: M.offset, limit: f1, search: b }), _ && U(!1));
10850
- }, [_, z, M.offset, b, C1, i1, u, K]), D(() => {
10851
- (C || Z) && w1(o1), h1.current = !0;
10852
- }, []), D(() => {
10853
- R && n1((f) => {
10854
- const E = R.filter(
10855
- (j) => !f.some((G) => G.value === j.value)
10845
+ B(() => {
10846
+ if (!r1.current || Y) return;
10847
+ (x || z && (h1 !== M.offset || t1 !== b || !v)) && (g1({ offset: M.offset, limit: f1, search: b }), x && U(!1));
10848
+ }, [x, z, M.offset, b, h1, t1, v, Y]), B(() => {
10849
+ (C || _) && g1(l1), r1.current = !0;
10850
+ }, []), B(() => {
10851
+ R && C1((N) => {
10852
+ const G = R.filter(
10853
+ (j) => !N.some((K) => K.value === j.value)
10856
10854
  );
10857
- return [...f, ...E];
10855
+ return [...N, ...G];
10858
10856
  });
10859
10857
  }, [R]);
10860
- const p1 = I(
10861
- (f) => {
10862
- s && s(f);
10863
- let E = [];
10864
- if (n ? E = Array.isArray(f) ? f : [] : E = f ? [f] : [], b) {
10865
- const j = E.filter(
10866
- (G) => !(S != null && S.some((Y) => Y.value === G))
10858
+ const m1 = I(
10859
+ (N) => {
10860
+ s && s(N);
10861
+ let G = [];
10862
+ if (n ? G = Array.isArray(N) ? N : [] : G = N ? [N] : [], b) {
10863
+ const j = G.filter(
10864
+ (K) => !(S != null && S.some((W) => W.value === K))
10867
10865
  );
10868
- j.length > 0 && n1((G = []) => [
10869
- ...G,
10870
- ...j.map((Y) => {
10871
- const y = u == null ? void 0 : u.find((g) => g.value === Y);
10866
+ j.length > 0 && C1((K = []) => [
10867
+ ...K,
10868
+ ...j.map((W) => {
10869
+ const y = v == null ? void 0 : v.find((g) => g.value === W);
10872
10870
  return {
10873
- value: Y,
10874
- label: (y == null ? void 0 : y.label) ?? Y,
10871
+ value: W,
10872
+ label: (y == null ? void 0 : y.label) ?? W,
10875
10873
  imageFallbackText: (y == null ? void 0 : y.imageFallbackText) ?? "",
10876
10874
  image: (y == null ? void 0 : y.image) ?? void 0
10877
10875
  };
10878
10876
  })
10879
- ]), P(void 0), B(o1), U(!0);
10877
+ ]), P(void 0), D(l1), U(!0);
10880
10878
  }
10881
10879
  },
10882
- [s, b, n, u, S]
10883
- ), q = R1(
10880
+ [s, b, n, v, S]
10881
+ ), J = R1(
10884
10882
  () => ({
10885
10883
  id: a,
10886
10884
  width: l,
10887
- onChange: p1,
10885
+ onChange: m1,
10888
10886
  ref: i,
10889
10887
  placeholder: h,
10890
10888
  search: !0,
10891
- onSearchChange: L1,
10889
+ onSearchChange: k1,
10892
10890
  onDropdownVisibleChange: $,
10893
10891
  scrollThresholdValue: d,
10894
- onScrollToEnd: k1,
10892
+ onScrollToEnd: p1,
10895
10893
  disabled: w,
10896
- isLoading: K,
10897
- optionRender: m,
10894
+ isLoading: Y,
10895
+ optionRender: u,
10898
10896
  dropdownRender: k,
10899
- readOnly: v,
10897
+ readOnly: f,
10900
10898
  clearable: p,
10901
- required: A,
10899
+ required: E,
10902
10900
  error: O,
10903
10901
  variant: V
10904
10902
  }),
10905
10903
  [
10906
10904
  a,
10907
10905
  l,
10908
- p1,
10906
+ m1,
10909
10907
  i,
10910
10908
  h,
10911
- L1,
10909
+ k1,
10912
10910
  $,
10913
10911
  d,
10914
- k1,
10912
+ p1,
10915
10913
  w,
10916
- K,
10917
- m,
10914
+ Y,
10915
+ u,
10918
10916
  k,
10919
- v,
10917
+ f,
10920
10918
  p,
10921
- A,
10919
+ E,
10922
10920
  O,
10923
10921
  V
10924
10922
  ]
10925
10923
  );
10926
- l1(i, () => ({
10924
+ s1(i, () => ({
10927
10925
  refetchOptions: async () => {
10928
- B(o1), P(void 0), U(!0);
10926
+ D(l1), P(void 0), U(!0);
10929
10927
  }
10930
10928
  }));
10931
- const m1 = R1(() => {
10932
- const f = n && n !== "single", E = o.selectedItemVariant === "badge", j = E ? u || [] : u || [], G = S, Y = o, g = f ? {
10929
+ const u1 = R1(() => {
10930
+ const N = n && n !== "single", G = o.selectedItemVariant === "badge", j = G ? v || [] : v || [], K = S, W = o, g = N ? {
10933
10931
  mode: n,
10934
- overflowBehaviour: Y.overflowBehaviour,
10935
- value: Y.value
10932
+ overflowBehaviour: W.overflowBehaviour,
10933
+ value: W.value
10936
10934
  } : {
10937
10935
  mode: n,
10938
10936
  value: o.value
10939
10937
  };
10940
10938
  return {
10941
- ...q,
10939
+ ...J,
10942
10940
  ...g,
10943
10941
  selectedItemVariant: o.selectedItemVariant,
10944
10942
  options: j,
10945
- extraOptions: G
10943
+ extraOptions: K
10946
10944
  };
10947
- }, [n, o, q, S, u]);
10948
- return /* @__PURE__ */ t("div", { className: "snmt-async-select", children: /* @__PURE__ */ t(_4, { ...m1 }) });
10945
+ }, [n, o, J, S, v]);
10946
+ return /* @__PURE__ */ t("div", { className: "snmt-async-select", children: /* @__PURE__ */ t(_4, { ...u1 }) });
10949
10947
  });
10950
10948
  export {
10951
10949
  K4 as AsyncSelect