@reportportal/ui-kit 0.0.1-alpha.158 → 0.0.1-alpha.159

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.
@@ -1,6 +1,6 @@
1
- import { jsx as o, jsxs as $, Fragment as ce } from "react/jsx-runtime";
2
- import { useState as re, useRef as xe, useEffect as ke, useCallback as V, forwardRef as Ae } from "react";
3
- import { c as G } from "./bind-06a7ff84.js";
1
+ import { jsx as o, jsxs as $, Fragment as ae } from "react/jsx-runtime";
2
+ import { useState as re, useRef as Ne, useEffect as ke, useCallback as V, forwardRef as Ae } from "react";
3
+ import { c as J } from "./bind-06a7ff84.js";
4
4
  import { Scrollbars as $e } from "rc-scrollbars";
5
5
  import { B as Pe } from "./bubblesLoader-f3ffa240.js";
6
6
  import { B as Oe } from "./button-97d9e587.js";
@@ -8,68 +8,68 @@ import { S as je } from "./plus-199fb2a8.js";
8
8
  import { i as he } from "./isEmpty-ccacb5ff.js";
9
9
  import le from "downshift";
10
10
  import { useFloating as Ie, autoUpdate as Ce } from "@floating-ui/react";
11
- import { F as ze } from "./fieldText-1749da7a.js";
11
+ import { F as He } from "./fieldText-1749da7a.js";
12
12
  import { S as Se } from "./dropdown-0260bb66.js";
13
- import { S as He } from "./close-4d480ef7.js";
14
- import { S as We } from "./clear-53660571.js";
13
+ import { S as We } from "./close-4d480ef7.js";
14
+ import { S as Le } from "./clear-53660571.js";
15
15
  import "./openEye-950159cb.js";
16
16
  import "./baseIconButton-251479f7.js";
17
17
  import "./spinLoader-c4a53718.js";
18
18
  import "./maxValueDisplay-9be01a75.js";
19
19
  import "./fieldLabel.js";
20
- const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
20
+ const Ke = "_disabled_1rpph_43", Te = "_input_1rpph_107", Ye = {
21
21
  "selected-item": "_selected-item_1rpph_16",
22
22
  "validation-error": "_validation-error_1rpph_35",
23
23
  "highlight-un-stored-item": "_highlight-un-stored-item_1rpph_40",
24
- disabled: Le,
24
+ disabled: Ke,
25
25
  "mobile-disabled": "_mobile-disabled_1rpph_48",
26
26
  "selected-item-text": "_selected-item-text_1rpph_54",
27
27
  "single-line": "_single-line_1rpph_58",
28
28
  "cross-icon": "_cross-icon_1rpph_64",
29
- input: Ke
30
- }, ne = G.bind(Te), Ye = (t) => t.scrollWidth > t.clientWidth, Xe = ({
29
+ input: Te
30
+ }, ne = J.bind(Ye), Xe = (t) => t.scrollWidth > t.clientWidth, Ge = ({
31
31
  item: t,
32
32
  onRemoveItem: e,
33
- disabled: c = !1,
33
+ disabled: a = !1,
34
34
  mobileDisabled: r = !1,
35
35
  parseValueToString: n,
36
36
  error: d = !1,
37
37
  editItem: v,
38
38
  editable: p = !1,
39
- getAdditionalCreationCondition: w = () => !0,
40
- storedOption: g = !0,
39
+ getAdditionalCreationCondition: y = () => !0,
40
+ storedOption: w = !0,
41
41
  highlightUnStoredItem: f = !1,
42
42
  variant: k = "light",
43
- getItemName: x,
43
+ getItemName: N,
44
44
  singleLine: u = !1,
45
45
  className: R,
46
46
  textClassName: I
47
47
  }) => {
48
- const [y, b] = re(!1), [C, B] = re(""), [l, a] = re(!1), s = xe(null), i = () => {
49
- !c && p && !g && (B((x == null ? void 0 : x(t)) || (n == null ? void 0 : n(t)) || ""), b(!0));
48
+ const [g, b] = re(!1), [C, z] = re(""), [l, c] = re(!1), s = Ne(null), i = () => {
49
+ !a && p && !w && (z((N == null ? void 0 : N(t)) || (n == null ? void 0 : n(t)) || ""), b(!0));
50
50
  }, _ = (S) => {
51
- B(S.target.value);
51
+ z(S.target.value);
52
52
  }, O = (S) => {
53
- const j = w(C);
54
- S.key === "Enter" && j && (v(t, C), b(!1), B(""));
55
- }, H = () => {
56
- b(!1), B("");
53
+ const j = y(C);
54
+ S.key === "Enter" && j && (v(t, C), b(!1), z(""));
55
+ }, W = () => {
56
+ b(!1), z("");
57
57
  }, P = (S) => {
58
58
  S.stopPropagation(), e(t);
59
- }, W = (n == null ? void 0 : n(t)) || "";
59
+ }, L = (n == null ? void 0 : n(t)) || "";
60
60
  ke(() => {
61
61
  if (s.current && u) {
62
62
  const S = () => {
63
- s.current && a(Ye(s.current));
63
+ s.current && c(Xe(s.current));
64
64
  };
65
65
  if (S(), typeof ResizeObserver < "u") {
66
66
  const j = new ResizeObserver(S);
67
67
  return j.observe(s.current), () => j.disconnect();
68
68
  }
69
69
  } else
70
- a(!1);
71
- }, [W, u]);
72
- const J = ne(
70
+ c(!1);
71
+ }, [L, u]);
72
+ const Q = ne(
73
73
  "selected-item-text",
74
74
  {
75
75
  "single-line": u
@@ -80,20 +80,20 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
80
80
  k,
81
81
  {
82
82
  [`validation-${d}`]: d,
83
- disabled: c,
83
+ disabled: a,
84
84
  "mobile-disabled": r,
85
- "highlight-un-stored-item": f && !g
85
+ "highlight-un-stored-item": f && !w
86
86
  },
87
87
  R
88
88
  );
89
- return y ? /* @__PURE__ */ o(
89
+ return g ? /* @__PURE__ */ o(
90
90
  "input",
91
91
  {
92
92
  autoFocus: !0,
93
93
  value: C,
94
94
  onChange: _,
95
95
  onKeyDown: O,
96
- onBlur: H,
96
+ onBlur: W,
97
97
  className: ne("input")
98
98
  }
99
99
  ) : /* @__PURE__ */ $("div", { className: te, onClick: i, children: [
@@ -101,75 +101,75 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
101
101
  "span",
102
102
  {
103
103
  ref: s,
104
- className: J,
105
- title: u && l ? W : void 0,
106
- children: W
104
+ className: Q,
105
+ title: u && l ? L : void 0,
106
+ children: L
107
107
  }
108
108
  ),
109
- !c && /* @__PURE__ */ o(
109
+ !a && /* @__PURE__ */ o(
110
110
  "button",
111
111
  {
112
112
  type: "button",
113
113
  className: ne("cross-icon", {
114
114
  [`validation-${d}`]: d,
115
115
  "mobile-disabled": r,
116
- disabled: c
116
+ disabled: a
117
117
  }),
118
118
  onClick: P,
119
- children: /* @__PURE__ */ o(He, {})
119
+ children: /* @__PURE__ */ o(We, {})
120
120
  }
121
121
  )
122
122
  ] });
123
- }, Ge = ({
123
+ }, Je = ({
124
124
  items: t = [],
125
125
  parseValueToString: e,
126
- getItemValidationErrorType: c,
126
+ getItemValidationErrorType: a,
127
127
  storedItemsMap: r = {},
128
128
  highlightUnStoredItem: n = !1,
129
129
  renderCustomSelectedItem: d,
130
130
  selectedItemSingleLine: v,
131
131
  selectedItemClassName: p,
132
- selectedItemTextClassName: w,
133
- ...g
132
+ selectedItemTextClassName: y,
133
+ ...w
134
134
  }) => t.map((f) => d ? d(f) : /* @__PURE__ */ o(
135
- Xe,
135
+ Ge,
136
136
  {
137
137
  parseValueToString: e,
138
- error: (c == null ? void 0 : c(f)) || "",
138
+ error: (a == null ? void 0 : a(f)) || "",
139
139
  item: f,
140
140
  storedOption: !!r[e(f)],
141
141
  highlightUnStoredItem: n,
142
142
  singleLine: v,
143
143
  className: p,
144
- textClassName: w,
145
- ...g
144
+ textClassName: y,
145
+ ...w
146
146
  },
147
147
  e == null ? void 0 : e(f)
148
- )), Je = "_prompt_1xfmd_16", Qe = {
149
- prompt: Je
150
- }, Ze = G.bind(Qe), Ue = ({ children: t = null }) => /* @__PURE__ */ o("div", { className: Ze("prompt"), children: t }), Ve = "_item_1qhaq_16", et = "_divider_1qhaq_24", tt = "_active_1qhaq_48", st = "_value_1qhaq_60", ot = "_tag_1qhaq_78", nt = "_disabled_1qhaq_89", rt = {
148
+ )), Qe = "_prompt_1xfmd_16", Ze = {
149
+ prompt: Qe
150
+ }, qe = J.bind(Ze), Ue = ({ children: t = null }) => /* @__PURE__ */ o("div", { className: qe("prompt"), children: t }), Ve = "_item_zw4ux_16", et = "_divider_zw4ux_24", tt = "_active_zw4ux_49", st = "_value_zw4ux_55", ot = "_tag_zw4ux_69", nt = "_disabled_zw4ux_80", rt = {
151
151
  item: Ve,
152
152
  divider: et,
153
- "new-item": "_new-item_1qhaq_31",
153
+ "new-item": "_new-item_zw4ux_31",
154
154
  active: tt,
155
155
  value: st,
156
- "key-variant": "_key-variant_1qhaq_75",
156
+ "key-variant": "_key-variant_zw4ux_66",
157
157
  tag: ot,
158
- "button-active": "_button-active_1qhaq_89",
158
+ "button-active": "_button-active_zw4ux_80",
159
159
  disabled: nt,
160
- "value-variant": "_value-variant_1qhaq_109"
161
- }, ee = G.bind(rt), ye = ({
160
+ "value-variant": "_value-variant_zw4ux_100"
161
+ }, ee = J.bind(rt), ge = ({
162
162
  isActive: t = !1,
163
163
  isSelected: e = !1,
164
- isNew: c = !1,
164
+ isNew: a = !1,
165
165
  children: r = null,
166
166
  disabled: n = !1,
167
167
  optionVariant: d = "",
168
168
  newItemButtonText: v = "",
169
169
  ...p
170
170
  }) => {
171
- const w = () => v || (d === "key-variant" ? "New key" : "New value");
172
- return c ? /* @__PURE__ */ $(ce, { children: [
171
+ const y = () => v || (d === "key-variant" ? "New key" : "New value");
172
+ return a ? /* @__PURE__ */ $(ae, { children: [
173
173
  /* @__PURE__ */ o("div", { className: ee("divider") }),
174
174
  /* @__PURE__ */ $(
175
175
  "li",
@@ -189,7 +189,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
189
189
  className: ee({ "button-active": t }),
190
190
  icon: /* @__PURE__ */ o(je, {}),
191
191
  variant: "text",
192
- children: w()
192
+ children: y()
193
193
  }
194
194
  )
195
195
  ]
@@ -207,79 +207,79 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
207
207
  children: /* @__PURE__ */ o("span", { className: ee("label", "tag"), children: r })
208
208
  }
209
209
  );
210
- }, lt = "_container_5088x_16", at = {
210
+ }, lt = "_container_5088x_16", ct = {
211
211
  container: lt,
212
212
  "empty-list-message": "_empty-list-message_5088x_20"
213
- }, _e = G.bind(at), ct = (t) => {
213
+ }, _e = J.bind(ct), at = (t) => {
214
214
  const {
215
215
  options: e,
216
- async: c,
216
+ async: a,
217
217
  inputValue: r,
218
218
  loading: n,
219
219
  createWithoutConfirmation: d,
220
220
  customEmptyListMessage: v,
221
221
  customNoMatchesMessage: p,
222
- optionVariant: w,
223
- newItemButtonText: g,
222
+ optionVariant: y,
223
+ newItemButtonText: w,
224
224
  renderOption: f,
225
225
  getUniqKey: k,
226
- getItemProps: x,
226
+ getItemProps: N,
227
227
  parseValueToString: u
228
228
  } = t, R = V(() => (e || []).filter((s) => u(s).toUpperCase().indexOf((r.toUpperCase() || "").trim()) > -1), [r, e, u]), I = V(
229
- (s, i, _ = !1) => f ? f(s, i, _, x) : /* @__PURE__ */ o(
230
- ye,
229
+ (s, i, _ = !1) => f ? f(s, i, _, N) : /* @__PURE__ */ o(
230
+ ge,
231
231
  {
232
- optionVariant: w,
233
- ...x({ item: s, index: i }),
232
+ optionVariant: y,
233
+ ...N({ item: s, index: i }),
234
234
  isNew: _,
235
- newItemButtonText: g,
235
+ newItemButtonText: w,
236
236
  children: u(s)
237
237
  },
238
238
  (k == null ? void 0 : k(s)) || u(s)
239
239
  ),
240
- [x, k, g, w, u, f]
241
- ), y = V(
240
+ [N, k, w, y, u, f]
241
+ ), g = V(
242
242
  (s) => s.length ? s.map((i, _) => I(i, _)) : "",
243
243
  [I]
244
244
  ), b = V(
245
245
  (s) => {
246
246
  const i = s.length;
247
247
  return /* @__PURE__ */ o("div", { className: _e({ container: !i }), children: /* @__PURE__ */ o(
248
- ye,
248
+ ge,
249
249
  {
250
- optionVariant: w,
250
+ optionVariant: y,
251
251
  isNew: !0,
252
- newItemButtonText: g,
253
- ...x({ item: r, index: i }),
252
+ newItemButtonText: w,
253
+ ...N({ item: r, index: i }),
254
254
  children: u(r)
255
255
  },
256
256
  u(r)
257
257
  ) });
258
258
  },
259
- [x, r, g, w, u]
259
+ [N, r, w, y, u]
260
260
  ), C = V(
261
- (s) => n ? /* @__PURE__ */ $(ce, { children: [
261
+ (s) => n ? /* @__PURE__ */ $(ae, { children: [
262
262
  /* @__PURE__ */ o(Ue, { children: /* @__PURE__ */ o(Pe, {}) }),
263
263
  !d && b(s)
264
264
  ] }) : "",
265
265
  [d, n, b]
266
- ), B = V(() => {
266
+ ), z = V(() => {
267
267
  const s = (e == null ? void 0 : e.length) === 0 ? v || "No available options" : p || "No matches found";
268
268
  return /* @__PURE__ */ o("div", { className: _e("empty-list-message"), children: s });
269
- }, [v, p, e == null ? void 0 : e.length]), l = c ? e : R(), a = C(e);
270
- return a || /* @__PURE__ */ $("div", { className: _e({ container: e.length }), children: [
271
- /* @__PURE__ */ o($e, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: he(l) ? B() : y(l) }),
269
+ }, [v, p, e == null ? void 0 : e.length]), l = a ? e : R(), c = C(e);
270
+ return c || /* @__PURE__ */ $("div", { className: _e({ container: e.length }), children: [
271
+ /* @__PURE__ */ o($e, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: he(l) ? z() : g(l) }),
272
272
  !d && b(l)
273
273
  ] });
274
274
  }, it = "_menu_f64z5_16", dt = "_opened_f64z5_34", ut = "_dark_f64z5_37", mt = {
275
275
  menu: it,
276
276
  opened: dt,
277
277
  dark: ut
278
- }, ft = G.bind(mt), pt = (t, e) => !t || t <= e.trim().length, Ee = Ae(
278
+ }, ft = J.bind(mt), pt = (t, e) => !t || t <= e.trim().length, Ee = Ae(
279
279
  ({
280
280
  isOpen: t = !1,
281
281
  style: e = {},
282
- minLength: c = 1,
282
+ minLength: a = 1,
283
283
  isDropdownMode: r,
284
284
  inputValue: n = "",
285
285
  className: d = "",
@@ -290,82 +290,82 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
290
290
  ref: p,
291
291
  className: ft(
292
292
  "menu",
293
- { opened: t && (r || pt(c, n)) },
293
+ { opened: t && (r || pt(a, n)) },
294
294
  d
295
295
  ),
296
296
  style: e,
297
- children: /* @__PURE__ */ o(ct, { inputValue: n, ...v })
297
+ children: /* @__PURE__ */ o(at, { inputValue: n, ...v })
298
298
  }
299
299
  )
300
- ), we = (t, e) => typeof t == "string" ? t : e ? String(t[e(t)]) : "", ae = (t, e) => {
300
+ ), ye = (t, e) => typeof t == "string" ? t : e ? String(t[e(t)]) : "", ce = (t, e) => {
301
301
  var r;
302
- return t === e ? !0 : !!(t && e && typeof t == "object" && typeof e == "object" && Object.keys(t).length === Object.keys(e).length && ((r = Object.entries(t)) != null && r.every(([n, d]) => ae(d, e[n]))));
303
- }, _t = (t, e, c) => typeof t == "string" ? t === e : c ? (() => {
304
- const r = c(t);
302
+ return t === e ? !0 : !!(t && e && typeof t == "object" && typeof e == "object" && Object.keys(t).length === Object.keys(e).length && ((r = Object.entries(t)) != null && r.every(([n, d]) => ce(d, e[n]))));
303
+ }, _t = (t, e, a) => typeof t == "string" ? t === e : a ? (() => {
304
+ const r = a(t);
305
305
  return t[r] === e[r];
306
306
  })() : !1, ht = ({
307
307
  options: t = [],
308
308
  onChange: e,
309
- selectedItems: c = [],
309
+ selectedItems: a = [],
310
310
  handleUnStoredItemCb: r = null,
311
311
  existingItemsMap: n = {},
312
312
  children: d,
313
313
  customizeNewSelectedValue: v = (f) => f,
314
314
  getOptionUniqKey: p,
315
- getOptionUniqKeyValue: w,
316
- ...g
315
+ getOptionUniqKeyValue: y,
316
+ ...w
317
317
  }) => {
318
- const [f, k] = re(n), x = (l, a) => {
318
+ const [f, k] = re(n), N = (l, c) => {
319
319
  const s = {
320
320
  ...f
321
321
  };
322
322
  l.forEach((i) => {
323
323
  if (t.find((_) => _t(_, i, p))) {
324
- const _ = we(i, p);
324
+ const _ = ye(i, p);
325
325
  s[_] = !0;
326
326
  }
327
- }), k(s), a(s);
328
- }, u = (l, a) => {
329
- const s = we(l, p);
327
+ }), k(s), c(s);
328
+ }, u = (l, c) => {
329
+ const s = ye(l, p);
330
330
  if (s in f) {
331
331
  const i = { ...f };
332
- delete i[s], k(i), a(i);
332
+ delete i[s], k(i), c(i);
333
333
  } else
334
- a(f);
335
- }, R = (l, a) => {
336
- const s = v(l), i = Array.isArray(s) ? s : [s], O = [...c.filter((P) => i.indexOf(P) < 0), ...i];
337
- e == null || e(O, a), x(i, (P) => r == null ? void 0 : r(O, P));
338
- }, I = (l, a) => {
339
- const s = c.indexOf(l), i = [...c];
340
- i.splice(s, 1, a), e == null || e(i, null);
341
- }, y = (l, a) => {
342
- const s = c.filter((_) => !ae(_, l));
343
- e == null || e(s, a), u(l, (_) => r == null ? void 0 : r(s, _));
344
- }, b = (l, a) => {
345
- l && R(l, a);
334
+ c(f);
335
+ }, R = (l, c) => {
336
+ const s = v(l), i = Array.isArray(s) ? s : [s], O = [...a.filter((P) => i.indexOf(P) < 0), ...i];
337
+ e == null || e(O, c), N(i, (P) => r == null ? void 0 : r(O, P));
338
+ }, I = (l, c) => {
339
+ const s = a.indexOf(l), i = [...a];
340
+ i.splice(s, 1, c), e == null || e(i, null);
341
+ }, g = (l, c) => {
342
+ const s = a.filter((_) => !ce(_, l));
343
+ e == null || e(s, c), u(l, (_) => r == null ? void 0 : r(s, _));
344
+ }, b = (l, c) => {
345
+ l && R(l, c);
346
346
  }, C = (l) => ({
347
- removeItem: y,
347
+ removeItem: g,
348
348
  editItem: I,
349
349
  handleChange: e,
350
- getOptionUniqKeyValue: w,
350
+ getOptionUniqKeyValue: y,
351
351
  storedItemsMap: f,
352
352
  ...l
353
353
  });
354
354
  return /* @__PURE__ */ o(
355
355
  le,
356
356
  {
357
- ...g,
358
- stateReducer: (l, a) => {
359
- switch (a.type) {
357
+ ...w,
358
+ stateReducer: (l, c) => {
359
+ switch (c.type) {
360
360
  case le.stateChangeTypes.keyDownEnter:
361
361
  case le.stateChangeTypes.clickItem:
362
362
  return {
363
- ...a,
363
+ ...c,
364
364
  highlightedIndex: l.highlightedIndex,
365
365
  inputValue: ""
366
366
  };
367
367
  default:
368
- return a;
368
+ return c;
369
369
  }
370
370
  },
371
371
  onChange: b,
@@ -373,102 +373,102 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
373
373
  children: (l) => d == null ? void 0 : d(C(l))
374
374
  }
375
375
  );
376
- }, Re = "Enter", bt = "Tab", vt = "_autocomplete_1so4a_16", gt = "_disabled_1so4a_32", yt = "_error_1so4a_35", wt = "_touched_1so4a_35", Nt = "_input_1so4a_77", xt = {
376
+ }, Re = "Enter", bt = "Tab", vt = "_autocomplete_1so4a_16", wt = "_disabled_1so4a_32", gt = "_error_1so4a_35", yt = "_touched_1so4a_35", xt = "_input_1so4a_77", Nt = {
377
377
  autocomplete: vt,
378
378
  "autocomplete-wrapper": "_autocomplete-wrapper_1so4a_28",
379
- disabled: gt,
380
- error: yt,
381
- touched: wt,
379
+ disabled: wt,
380
+ error: gt,
381
+ touched: yt,
382
382
  "clear-icon": "_clear-icon_1so4a_46",
383
383
  "clear-icon--disabled": "_clear-icon--disabled_1so4a_56",
384
384
  "autocomplete-input": "_autocomplete-input_1so4a_60",
385
385
  "single-line-mode": "_single-line-mode_1so4a_68",
386
386
  "mobile-disabled": "_mobile-disabled_1so4a_72",
387
- input: Nt,
387
+ input: xt,
388
388
  "type-number": "_type-number_1so4a_101",
389
389
  "error-text": "_error-text_1so4a_112",
390
390
  "dropdown-button": "_dropdown-button_1so4a_121",
391
391
  "icon-reversed": "_icon-reversed_1so4a_129"
392
- }, X = G.bind(xt), Yt = (t) => {
392
+ }, G = J.bind(Nt), Xt = (t) => {
393
393
  const {
394
394
  options: e = [],
395
- loading: c = !1,
395
+ loading: a = !1,
396
396
  onStateChange: r = () => {
397
397
  },
398
398
  value: n = [],
399
399
  placeholder: d = "",
400
400
  error: v = "",
401
401
  touched: p = !1,
402
- creatable: w = !1,
403
- editable: g = !1,
402
+ creatable: y = !1,
403
+ editable: w = !1,
404
404
  onChange: f = () => {
405
405
  },
406
406
  onFocus: k = () => {
407
407
  },
408
- onBlur: x = () => {
408
+ onBlur: N = () => {
409
409
  },
410
410
  disabled: u = !1,
411
411
  isDropdownMode: R = !1,
412
412
  mobileDisabled: I = !1,
413
- inputProps: y = {},
413
+ inputProps: g = {},
414
414
  parseValueToString: b = (h) => h == null ? "" : String(h),
415
415
  maxLength: C = null,
416
- async: B = !1,
416
+ async: z = !1,
417
417
  customClass: l = "",
418
- createWithoutConfirmation: a = !1,
418
+ createWithoutConfirmation: c = !1,
419
419
  getItemValidationErrorType: s = null,
420
420
  clearItemsError: i = () => {
421
421
  },
422
422
  getAdditionalCreationCondition: _ = () => !0,
423
423
  highlightUnStoredItem: O = !1,
424
- parseInputValueFn: H = null,
424
+ parseInputValueFn: W = null,
425
425
  handleUnStoredItemCb: P = null,
426
- dataAutomationId: W = "",
427
- existingItemsMap: J = {},
426
+ dataAutomationId: L = "",
427
+ existingItemsMap: Q = {},
428
428
  customizeNewSelectedValue: te = (h) => h,
429
429
  renderCustomSelectedItem: S,
430
430
  useFixedPositioning: j,
431
- newItemButtonText: D = "",
432
- menuClassName: L = "",
433
- selectedItemSingleLine: K,
434
- selectedItemClassName: T,
435
- selectedItemTextClassName: Q,
436
- ...M
437
- } = t, { refs: Z, floatingStyles: ie } = Ie({
431
+ newItemButtonText: B = "",
432
+ menuClassName: K = "",
433
+ selectedItemSingleLine: T,
434
+ selectedItemClassName: Y,
435
+ selectedItemTextClassName: Z,
436
+ ...F
437
+ } = t, { refs: q, floatingStyles: ie } = Ie({
438
438
  placement: "bottom-start",
439
439
  strategy: j ? "fixed" : "absolute",
440
440
  whileElementsMounted: Ce
441
- }), de = n.length === 0 && !u ? d : "", z = xe(null);
441
+ }), de = n.length === 0 && !u ? d : "", H = Ne(null);
442
442
  ke(() => {
443
443
  i();
444
444
  }, [i, n]);
445
- const oe = (h, N) => {
446
- f(h, N);
447
- }, ue = (h, N, E) => ({ item: m, index: q, ...A }) => h({
445
+ const oe = (h, x) => {
446
+ f(h, x);
447
+ }, ue = (h, x, E) => ({ item: m, index: M, ...A }) => h({
448
448
  item: m,
449
- index: q,
450
- isSelected: E.some((U) => ae(U, m)),
449
+ index: M,
450
+ isSelected: E.some((U) => ce(U, m)),
451
451
  ...A,
452
- isActive: N === q
452
+ isActive: x === M
453
453
  }), me = ({
454
454
  event: h,
455
- removeItem: N,
455
+ removeItem: x,
456
456
  inputValue: E
457
457
  }) => {
458
- h.key === "Backspace" && !E && n.length && N(n[n.length - 1], null);
459
- }, Y = ({
458
+ h.key === "Backspace" && !E && n.length && x(n[n.length - 1], null);
459
+ }, X = ({
460
460
  inputValue: h,
461
- selectItem: N,
461
+ selectItem: x,
462
462
  clearSelection: E
463
463
  }) => {
464
- if (H) {
465
- const m = H(h);
466
- (m.length ? m : [h]).forEach((A) => N(A)), E();
464
+ if (W) {
465
+ const m = W(h);
466
+ (m.length ? m : [h]).forEach((A) => x(A)), E();
467
467
  } else
468
- N(h), E();
469
- }, fe = (h) => (N) => {
470
- h(N, null), z.current && z.current.focus();
471
- }, pe = e.filter((h) => n.every((N) => !ae(N, h)));
468
+ x(h), E();
469
+ }, fe = (h) => (x) => {
470
+ h(x, null), H.current && H.current.focus();
471
+ }, pe = e.filter((h) => n.every((x) => !ce(x, h)));
472
472
  return /* @__PURE__ */ o(
473
473
  ht,
474
474
  {
@@ -477,34 +477,34 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
477
477
  selectedItems: n,
478
478
  onStateChange: r,
479
479
  options: e,
480
- existingItemsMap: J,
480
+ existingItemsMap: Q,
481
481
  handleUnStoredItemCb: P,
482
482
  customizeNewSelectedValue: te,
483
483
  children: ({
484
484
  getInputProps: h,
485
- getItemProps: N,
485
+ getItemProps: x,
486
486
  isOpen: E,
487
487
  inputValue: m = "",
488
- highlightedIndex: q,
488
+ highlightedIndex: M,
489
489
  removeItem: A,
490
490
  editItem: U,
491
491
  openMenu: se,
492
492
  selectItem: be,
493
493
  clearSelection: ve,
494
- toggleMenu: Be,
495
- storedItemsMap: De,
496
- getRootProps: Fe
494
+ toggleMenu: ze,
495
+ storedItemsMap: Be,
496
+ getRootProps: De
497
497
  }) => {
498
- const ge = Fe(void 0, { suppressRefError: !0 }), Me = {
499
- ...ge,
500
- ref: (F) => (Z.setReference(F), ge.ref(F))
501
- }, qe = m ?? "";
502
- return /* @__PURE__ */ $("div", { ...Me, className: X("autocomplete-wrapper"), children: [
503
- /* @__PURE__ */ $(ce, { children: [
498
+ const we = De(void 0, { suppressRefError: !0 }), Fe = {
499
+ ...we,
500
+ ref: (D) => (q.setReference(D), we.ref(D))
501
+ }, Me = m ?? "";
502
+ return /* @__PURE__ */ $("div", { ...Fe, className: G("autocomplete-wrapper"), children: [
503
+ /* @__PURE__ */ $(ae, { children: [
504
504
  /* @__PURE__ */ $(
505
505
  "div",
506
506
  {
507
- className: X("autocomplete", l, {
507
+ className: G("autocomplete", l, {
508
508
  "mobile-disabled": I,
509
509
  error: v,
510
510
  touched: p,
@@ -514,13 +514,13 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
514
514
  /* @__PURE__ */ $(
515
515
  "div",
516
516
  {
517
- className: X("autocomplete-input", {
517
+ className: G("autocomplete-input", {
518
518
  "mobile-disabled": I,
519
- "single-line-mode": K
519
+ "single-line-mode": T
520
520
  }),
521
521
  children: [
522
522
  /* @__PURE__ */ o(
523
- Ge,
523
+ Je,
524
524
  {
525
525
  items: n,
526
526
  onRemoveItem: fe(A),
@@ -530,68 +530,68 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
530
530
  getItemValidationErrorType: s,
531
531
  renderCustomSelectedItem: S,
532
532
  editItem: U,
533
- editable: g,
533
+ editable: w,
534
534
  getAdditionalCreationCondition: _,
535
- storedItemsMap: De,
535
+ storedItemsMap: Be,
536
536
  highlightUnStoredItem: O,
537
- selectedItemSingleLine: K,
538
- selectedItemClassName: T,
539
- selectedItemTextClassName: Q
537
+ selectedItemSingleLine: T,
538
+ selectedItemClassName: Y,
539
+ selectedItemTextClassName: Z
540
540
  }
541
541
  ),
542
542
  /* @__PURE__ */ o(
543
543
  "input",
544
544
  {
545
545
  ...h({
546
- ref: z,
546
+ ref: H,
547
547
  placeholder: de,
548
548
  maxLength: C,
549
549
  onFocus: () => {
550
550
  R && se(), k();
551
551
  },
552
- onKeyDown: (F) => {
553
- F.key === Re && m && w && _(m) && Y({
552
+ onKeyDown: (D) => {
553
+ D.key === Re && m && y && _(m) && X({
554
554
  inputValue: m,
555
555
  selectItem: be,
556
556
  clearSelection: ve
557
- }), me({ event: F, removeItem: A, inputValue: m });
557
+ }), me({ event: D, removeItem: A, inputValue: m });
558
558
  },
559
559
  onBlur: () => {
560
- x(), m && w && _(m) && Y({
560
+ N(), m && y && _(m) && X({
561
561
  inputValue: m,
562
562
  selectItem: be,
563
563
  clearSelection: ve
564
564
  });
565
565
  },
566
566
  disabled: u,
567
- ...y
567
+ ...g
568
568
  }),
569
- className: X("input", { disabled: u }, y.className),
570
- "data-automation-id": W
569
+ className: G("input", { disabled: u }, g.className),
570
+ "data-automation-id": L
571
571
  }
572
572
  )
573
573
  ]
574
574
  }
575
575
  ),
576
- (y == null ? void 0 : y.clearable) && !he(n) && /* @__PURE__ */ o(
576
+ (g == null ? void 0 : g.clearable) && !he(n) && /* @__PURE__ */ o(
577
577
  "button",
578
578
  {
579
579
  type: "button",
580
- className: X("clear-icon", { "clear-icon--disabled": u }),
580
+ className: G("clear-icon", { "clear-icon--disabled": u }),
581
581
  onClick: () => {
582
- var F;
583
- return !u && ((F = y == null ? void 0 : y.onClear) == null ? void 0 : F.call(y));
582
+ var D;
583
+ return !u && ((D = g == null ? void 0 : g.onClear) == null ? void 0 : D.call(g));
584
584
  },
585
- onMouseDown: (F) => F.preventDefault(),
586
- children: /* @__PURE__ */ o(We, {})
585
+ onMouseDown: (D) => D.preventDefault(),
586
+ children: /* @__PURE__ */ o(Le, {})
587
587
  }
588
588
  ),
589
589
  R && /* @__PURE__ */ o(
590
590
  "button",
591
591
  {
592
592
  type: "button",
593
- className: X("dropdown-button", { "icon-reversed": E }),
594
- onClick: () => Be(),
593
+ className: G("dropdown-button", { "icon-reversed": E }),
594
+ onClick: () => ze(),
595
595
  "aria-label": "Toggle dropdown",
596
596
  "aria-expanded": E,
597
597
  children: /* @__PURE__ */ o(Se, {})
@@ -600,25 +600,25 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
600
600
  ]
601
601
  }
602
602
  ),
603
- v && p && /* @__PURE__ */ o("span", { className: X("error-text"), children: v })
603
+ v && p && /* @__PURE__ */ o("span", { className: G("error-text"), children: v })
604
604
  ] }),
605
605
  /* @__PURE__ */ o(
606
606
  Ee,
607
607
  {
608
608
  isOpen: E,
609
- loading: c,
610
- async: B,
611
- ref: Z.setFloating,
612
- newItemButtonText: D,
609
+ loading: a,
610
+ async: z,
611
+ ref: q.setFloating,
612
+ newItemButtonText: B,
613
613
  isDropdownMode: R,
614
614
  style: ie,
615
- inputValue: qe.trim(),
616
- getItemProps: ue(N, q, n),
615
+ inputValue: Me.trim(),
616
+ getItemProps: ue(x, M, n),
617
617
  parseValueToString: b,
618
- createWithoutConfirmation: a,
618
+ createWithoutConfirmation: c,
619
619
  options: pe,
620
- className: L,
621
- ...M
620
+ className: K,
621
+ ...F
622
622
  }
623
623
  )
624
624
  ] });
@@ -629,10 +629,10 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
629
629
  "input-wrapper": "_input-wrapper_d9vma_1",
630
630
  "dropdown-button": "_dropdown-button_d9vma_6",
631
631
  "icon-reversed": "_icon-reversed_d9vma_14"
632
- }, Ne = G.bind(kt), It = 0, Xt = (t) => {
632
+ }, xe = J.bind(kt), It = 0, Gt = (t) => {
633
633
  const {
634
634
  options: e = [],
635
- value: c,
635
+ value: a,
636
636
  placeholder: r = "",
637
637
  onChange: n = () => {
638
638
  },
@@ -641,128 +641,128 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
641
641
  onBlur: v = () => {
642
642
  },
643
643
  disabled: p = !1,
644
- inputProps: w = {},
645
- parseValueToString: g = (D) => D === null ? "" : String(D),
644
+ inputProps: y = {},
645
+ parseValueToString: w = (B) => B === null ? "" : String(B),
646
646
  minLength: f = 1,
647
647
  skipOptionCreation: k = !1,
648
- maxLength: x = null,
648
+ maxLength: N = null,
649
649
  optionVariant: u = "",
650
650
  isRequired: R = !1,
651
651
  error: I = "",
652
- touched: y = !1,
652
+ touched: g = !1,
653
653
  setTouch: b = () => {
654
654
  },
655
655
  createWithoutConfirmation: C = !1,
656
- menuClassName: B = "",
656
+ menuClassName: z = "",
657
657
  icon: l,
658
- isDropdownMode: a = !1,
658
+ isDropdownMode: c = !1,
659
659
  isOptionUnique: s,
660
660
  refFunction: i,
661
661
  stateReducer: _,
662
662
  onStateChange: O,
663
- useFixedPositioning: H,
663
+ useFixedPositioning: W,
664
664
  newItemButtonText: P = "",
665
- ...W
666
- } = t, { refs: J, floatingStyles: te } = Ie({
665
+ ...L
666
+ } = t, { refs: Q, floatingStyles: te } = Ie({
667
667
  placement: "bottom-start",
668
- strategy: H ? "fixed" : "absolute",
668
+ strategy: W ? "fixed" : "absolute",
669
669
  whileElementsMounted: Ce
670
- }), S = (D, L, K) => ({ item: T, index: Q, ...M }) => D({
671
- item: T,
672
- index: Q,
673
- isSelected: K !== null && K === T,
674
- ...M,
675
- isActive: L === Q
676
- }), j = (D, L) => {
677
- D.key === bt && (D.preventDefault(), L(e.length));
670
+ }), S = (B, K, T) => ({ item: Y, index: Z, ...F }) => B({
671
+ item: Y,
672
+ index: Z,
673
+ isSelected: T !== null && T === Y,
674
+ ...F,
675
+ isActive: K === Z
676
+ }), j = (B, K) => {
677
+ B.key === bt && (B.preventDefault(), K(e.length));
678
678
  };
679
679
  return /* @__PURE__ */ o(
680
680
  le,
681
681
  {
682
682
  onChange: n,
683
- itemToString: g,
684
- selectedItem: c,
683
+ itemToString: w,
684
+ selectedItem: a,
685
685
  onStateChange: O,
686
686
  defaultHighlightedIndex: It,
687
687
  stateReducer: _,
688
688
  children: ({
689
- getInputProps: D,
690
- getItemProps: L,
691
- setHighlightedIndex: K,
692
- toggleMenu: T,
693
- openMenu: Q,
694
- isOpen: M,
695
- inputValue: Z,
689
+ getInputProps: B,
690
+ getItemProps: K,
691
+ setHighlightedIndex: T,
692
+ toggleMenu: Y,
693
+ openMenu: Z,
694
+ isOpen: F,
695
+ inputValue: q,
696
696
  highlightedIndex: ie,
697
697
  getRootProps: de,
698
- selectItem: z
698
+ selectItem: H
699
699
  }) => {
700
700
  const oe = de(void 0, { suppressRefError: !0 }), ue = {
701
701
  ...oe,
702
- ref: (m) => (J.setReference(m), oe.ref(m))
703
- }, me = Z ?? "", { onClear: Y, clearable: fe, ...pe } = w, N = fe && c !== null, E = (...m) => {
704
- z(null), Y == null || Y(...m);
702
+ ref: (m) => (Q.setReference(m), oe.ref(m))
703
+ }, me = q ?? "", { onClear: X, clearable: fe, ...pe } = y, x = fe && a !== null, E = (...m) => {
704
+ H(null), X == null || X(...m);
705
705
  };
706
- return /* @__PURE__ */ o(ce, { children: /* @__PURE__ */ $("div", { className: Ne("input-wrapper"), ...ue, children: [
706
+ return /* @__PURE__ */ o(ae, { children: /* @__PURE__ */ $("div", { className: xe("input-wrapper"), ...ue, children: [
707
707
  /* @__PURE__ */ o(
708
- ze,
708
+ He,
709
709
  {
710
- ...D({
710
+ ...B({
711
711
  placeholder: p ? "" : r,
712
- maxLength: x || void 0,
712
+ maxLength: N || void 0,
713
713
  onFocus: () => {
714
- a && !M && (Q(), b == null || b(!0)), d();
714
+ c && !F && (Z(), b == null || b(!0)), d();
715
715
  },
716
716
  ref: i,
717
717
  onKeyDown: (m) => {
718
- m.key === Re && m.preventDefault(), Z && M && j(m, K);
718
+ m.key === Re && m.preventDefault(), q && F && j(m, T);
719
719
  },
720
720
  onBlur: (m) => {
721
- const q = me.trim(), A = !he(q), U = A ? e.find((se) => g(se) === q) : void 0;
722
- z(U || (!k && C && A ? q : null)), v(m), s == null || s(
723
- A ? !e.some((se) => g(se) === q) : null
724
- ), a && M && T(), b == null || b(!0);
721
+ const M = me.trim(), A = !he(M), U = A ? e.find((se) => w(se) === M) : void 0;
722
+ H(U || (!k && C && A ? M : null)), v(m), s == null || s(
723
+ A ? !e.some((se) => w(se) === M) : null
724
+ ), c && F && Y(), b == null || b(!0);
725
725
  },
726
726
  disabled: p,
727
727
  defaultWidth: !1,
728
728
  isRequired: R,
729
- touched: y,
729
+ touched: g,
730
730
  error: I,
731
731
  ...pe,
732
- clearable: N,
733
- onClear: N ? E : Y,
734
- endIcon: a && !l ? /* @__PURE__ */ o(
732
+ clearable: x,
733
+ onClear: x ? E : X,
734
+ endIcon: c && !l ? /* @__PURE__ */ o(
735
735
  "button",
736
736
  {
737
737
  type: "button",
738
- className: Ne("dropdown-button", { "icon-reversed": M }),
739
- onClick: () => T(),
738
+ className: xe("dropdown-button", { "icon-reversed": F }),
739
+ onClick: () => Y(),
740
740
  "aria-label": "Toggle dropdown",
741
- "aria-expanded": M,
741
+ "aria-expanded": F,
742
742
  children: /* @__PURE__ */ o(Se, {})
743
743
  }
744
744
  ) : l,
745
- minLength: a ? 0 : f
745
+ minLength: c ? 0 : f
746
746
  })
747
747
  }
748
748
  ),
749
749
  /* @__PURE__ */ o(
750
750
  Ee,
751
751
  {
752
- isOpen: M,
753
- isDropdownMode: a,
752
+ isOpen: F,
753
+ isDropdownMode: c,
754
754
  style: te,
755
- ref: J.setFloating,
755
+ ref: Q.setFloating,
756
756
  minLength: f,
757
- inputValue: (Z || "").trim(),
758
- getItemProps: S(L, ie, c),
759
- parseValueToString: g,
757
+ inputValue: (q || "").trim(),
758
+ getItemProps: S(K, ie, a),
759
+ parseValueToString: w,
760
760
  optionVariant: u,
761
761
  createWithoutConfirmation: C,
762
- className: B,
762
+ className: z,
763
763
  options: e,
764
764
  newItemButtonText: P,
765
- ...W
765
+ ...L
766
766
  }
767
767
  )
768
768
  ] }) });
@@ -772,9 +772,9 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
772
772
  };
773
773
  export {
774
774
  Ee as AutocompleteMenu,
775
- ye as AutocompleteOption,
776
- ct as AutocompleteOptions,
775
+ ge as AutocompleteOption,
776
+ at as AutocompleteOptions,
777
777
  Ue as AutocompletePrompt,
778
- Yt as MultipleAutocomplete,
779
- Xt as SingleAutocomplete
778
+ Xt as MultipleAutocomplete,
779
+ Gt as SingleAutocomplete
780
780
  };