@reportportal/ui-kit 0.0.1-alpha.235 → 0.0.1-alpha.236

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.
@@ -3,7 +3,7 @@ import { useMemo as v, forwardRef as J, useRef as K } from "react";
3
3
  import I from "react-datepicker/dist/es/index.js";
4
4
  import { c as Y } from "./bind-06a7ff84.js";
5
5
  import { F as Q } from "./fieldText-1749da7a.js";
6
- import { D as L } from "./dropdown-33f2bf75.js";
6
+ import { D as L } from "./dropdown-d2a05471.js";
7
7
  import { S as B } from "./calendarArrow-44c7e60e.js";
8
8
  import { registerLocale as X } from "react-datepicker";
9
9
  function Z(e) {
@@ -1,5 +1,5 @@
1
- import { D as t } from "./datePicker-6c001a18.js";
2
- import { r as H } from "./datePicker-6c001a18.js";
1
+ import { D as t } from "./datePicker-b554cb9d.js";
2
+ import { r as H } from "./datePicker-b554cb9d.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-datepicker/dist/es/index.js";
@@ -11,7 +11,7 @@ import "./baseIconButton-251479f7.js";
11
11
  import "./spinLoader-c4a53718.js";
12
12
  import "./maxValueDisplay-9be01a75.js";
13
13
  import "./fieldLabel.js";
14
- import "./dropdown-33f2bf75.js";
14
+ import "./dropdown-d2a05471.js";
15
15
  import "react-dom";
16
16
  import "@floating-ui/react-dom";
17
17
  import "downshift";
@@ -1,51 +1,51 @@
1
1
  import { jsxs as R, jsx as u, Fragment as He } from "react/jsx-runtime";
2
- import { forwardRef as yr, useState as we, useRef as k, useMemo as w, useCallback as v, useLayoutEffect as $e, useEffect as F } from "react";
2
+ import { forwardRef as yr, useState as we, useRef as x, useMemo as w, useCallback as k, useLayoutEffect as $e, useEffect as F } from "react";
3
3
  import { createPortal as Cr } from "react-dom";
4
4
  import { c as ze } from "./bind-06a7ff84.js";
5
- import { useFloating as Ar, offset as Or, flip as br, size as Dr, autoUpdate as Nr } from "@floating-ui/react-dom";
5
+ import { useFloating as Ar, offset as br, flip as Or, size as Dr, autoUpdate as Nr } from "@floating-ui/react-dom";
6
6
  import { useSelect as Ee } from "downshift";
7
- import { Scrollbars as vr } from "rc-scrollbars";
7
+ import { Scrollbars as kr } from "rc-scrollbars";
8
8
  import { K as p } from "./keyCodes-f63c0e11.js";
9
- import { B as Ir } from "./baseIconButton-251479f7.js";
10
- import { S as Kr } from "./clear-53660571.js";
11
- import { S as Lr } from "./dropdown-0260bb66.js";
12
- import { FieldLabel as Tr } from "./fieldLabel.js";
13
- import { AdaptiveTagList as xr } from "./adaptiveTagList.js";
9
+ import { B as vr } from "./baseIconButton-251479f7.js";
10
+ import { S as Ir } from "./clear-53660571.js";
11
+ import { S as Kr } from "./dropdown-0260bb66.js";
12
+ import { FieldLabel as Lr } from "./fieldLabel.js";
13
+ import { AdaptiveTagList as Tr } from "./adaptiveTagList.js";
14
14
  import "react-dnd";
15
15
  import "react-dnd-html5-backend";
16
- import { u as kr } from "./useEllipsisTitle-462fa254.js";
16
+ import { u as xr } from "./useEllipsisTitle-462fa254.js";
17
17
  import { C as Rr } from "./checkbox-76aa8f97.js";
18
18
  import { Tooltip as Pr } from "./tooltip.js";
19
19
  import { i as ne } from "./isEmpty-ccacb5ff.js";
20
20
  const Yr = (t) => {
21
21
  const r = {}, c = {};
22
- return Object.entries(t).forEach(([o, h]) => {
22
+ return Object.entries(t).forEach(([o, f]) => {
23
23
  if (/^data[A-Z]/.test(o) || /^aria[A-Z]/.test(o)) {
24
24
  const m = o.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
25
- r[m] = h;
25
+ r[m] = f;
26
26
  } else
27
- c[o] = h;
27
+ c[o] = f;
28
28
  }), { transformed: r, remaining: c };
29
- }, Vr = "_disabled_100r3_12", Sr = "_hidden_100r3_17", Hr = "_hover_100r3_26", $r = "_selected_100r3_42", Mr = {
30
- "dropdown-option": "_dropdown-option_100r3_1",
29
+ }, Vr = "_disabled_1hbkk_12", Sr = "_hidden_1hbkk_17", Hr = "_hover_1hbkk_26", $r = "_selected_1hbkk_42", Mr = {
30
+ "dropdown-option": "_dropdown-option_1hbkk_1",
31
31
  disabled: Vr,
32
32
  hidden: Sr,
33
- "multi-select": "_multi-select_100r3_20",
33
+ "multi-select": "_multi-select_1hbkk_20",
34
34
  hover: Hr,
35
- "depth-1": "_depth-1_100r3_36",
35
+ "depth-1": "_depth-1_1hbkk_36",
36
36
  selected: $r,
37
- "single-option": "_single-option_100r3_47",
38
- "sub-option": "_sub-option_100r3_54"
37
+ "single-option": "_single-option_1hbkk_50",
38
+ "sub-option": "_sub-option_1hbkk_57"
39
39
  }, Me = ze.bind(Mr), We = yr(
40
40
  (t, r) => {
41
41
  const {
42
- option: { value: c, disabled: o, hidden: h, label: m, title: E, groupRef: A },
42
+ option: { value: c, disabled: o, hidden: f, label: m, title: E, groupRef: A },
43
43
  selected: B,
44
44
  onChange: S,
45
45
  render: U,
46
46
  highlightHovered: j,
47
47
  onMouseEnter: se,
48
- multiSelect: O,
48
+ multiSelect: b,
49
49
  isPartiallyChecked: q = !1,
50
50
  depth: Z = 0,
51
51
  hasChildren: oe = !1
@@ -58,9 +58,9 @@ const Yr = (t) => {
58
58
  className: Me("dropdown-option", {
59
59
  selected: B,
60
60
  disabled: o,
61
- hidden: h,
61
+ hidden: f,
62
62
  hover: j,
63
- "multi-select": O,
63
+ "multi-select": b,
64
64
  "has-children": oe,
65
65
  [`depth-${Z}`]: Z > 0
66
66
  }),
@@ -69,7 +69,7 @@ const Yr = (t) => {
69
69
  ref: r,
70
70
  onMouseEnter: se,
71
71
  children: [
72
- O && /* @__PURE__ */ u(Rr, { value: !!B, partiallyChecked: q }),
72
+ b && /* @__PURE__ */ u(Rr, { value: !!B, partiallyChecked: q }),
73
73
  /* @__PURE__ */ u(
74
74
  "div",
75
75
  {
@@ -104,10 +104,10 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
104
104
  const c = Array.isArray(r) ? r : [r];
105
105
  return t.findIndex(({ value: o }) => c.includes(o));
106
106
  }, qr = (t, r) => (t % r + r) % r, ye = (t, r = 0, c = 1) => {
107
- var h;
107
+ var f;
108
108
  if (t.length === 0)
109
109
  return 0;
110
- if (!((h = t[r]) != null && h.disabled))
110
+ if (!((f = t[r]) != null && f.disabled))
111
111
  return r;
112
112
  const o = t.length;
113
113
  return ye(
@@ -115,9 +115,9 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
115
115
  qr(r + c, o),
116
116
  c
117
117
  );
118
- }, Zr = (t, r) => ye(t, r), Gr = (t, r) => ye(t, r, -1), Fe = (t, r = 0, c) => !t || t.length === 0 ? [] : t.reduce((o, h) => {
118
+ }, Zr = (t, r) => ye(t, r), Gr = (t, r) => ye(t, r, -1), Fe = (t, r = 0, c) => !t || t.length === 0 ? [] : t.reduce((o, f) => {
119
119
  var m;
120
- return h && (o.push({ option: h, depth: r, parent: c }), (m = h.children) != null && m.length && o.push(...Fe(h.children, r + 1, h))), o;
120
+ return f && (o.push({ option: f, depth: r, parent: c }), (m = f.children) != null && m.length && o.push(...Fe(f.children, r + 1, f))), o;
121
121
  }, []), Be = (t) => !t || t.length === 0 ? [] : t.reduce((r, c) => {
122
122
  var o;
123
123
  return c && ((o = c.children) != null && o.length ? r.push(...Be(c.children)) : r.push(c)), r;
@@ -149,12 +149,12 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
149
149
  "empty-list-message": "_empty-list-message_sth8o_172",
150
150
  ghost: it,
151
151
  divider: lt
152
- }, _ = ze.bind(ct), Lt = ({
152
+ }, _ = ze.bind(ct), Kt = ({
153
153
  multiSelect: t = !1,
154
154
  value: r = t ? [] : "",
155
155
  options: c = [],
156
156
  disabled: o = !1,
157
- error: h,
157
+ error: f,
158
158
  onChange: m,
159
159
  onFocus: E,
160
160
  onBlur: A,
@@ -163,7 +163,7 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
163
163
  touched: U = !1,
164
164
  icon: j,
165
165
  variant: se,
166
- placeholder: O = "",
166
+ placeholder: b = "",
167
167
  label: q = "",
168
168
  renderOption: Z,
169
169
  transparentBackground: oe = !1,
@@ -180,56 +180,56 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
180
180
  footer: X,
181
181
  includeGroupValue: Ae = !1,
182
182
  clearable: qe = !1,
183
- onClear: Oe = () => {
183
+ onClear: be = () => {
184
184
  },
185
185
  clearButtonAriaLabel: Ze = "Clear selection",
186
186
  menuPortalRoot: y,
187
- disabledOptionTooltipPortalRoot: be,
188
- isMultiSelectWithTags: b = !1,
187
+ disabledOptionTooltipPortalRoot: Oe,
188
+ isMultiSelectWithTags: O = !1,
189
189
  noMatchesMessage: Ge = "No matches found",
190
190
  ...Xe
191
191
  }) => {
192
- const { transformed: Je, remaining: Qe } = Yr(Xe), [l, J] = we(!1), [I, De] = we(""), Ne = k(null), ve = k(null), M = k(null), de = k(0), ue = k(null), fe = k(""), [er, Q] = we(null), K = k(null), W = w(() => Fe(c), [c]), L = w(() => {
193
- if (!b || !I.trim())
192
+ const { transformed: Je, remaining: Qe } = Yr(Xe), [l, J] = we(!1), [v, De] = we(""), Ne = x(null), ke = x(null), M = x(null), de = x(0), ue = x(null), he = x(""), [er, Q] = we(null), I = x(null), W = w(() => Fe(c), [c]), K = w(() => {
193
+ if (!O || !v.trim())
194
194
  return W;
195
- const e = I.toLowerCase();
195
+ const e = v.toLowerCase();
196
196
  return W.filter(
197
197
  ({ option: n }) => n.label.toLowerCase().includes(e)
198
198
  );
199
- }, [W, I, b]), g = w(
200
- () => L.map(({ option: e }) => e),
201
- [L]
202
- ), Ie = w(
199
+ }, [W, v, O]), g = w(
200
+ () => K.map(({ option: e }) => e),
201
+ [K]
202
+ ), ve = w(
203
203
  () => W.map(({ option: e }) => e),
204
204
  [W]
205
- ), ee = w(() => L.filter(({ option: e }) => {
205
+ ), ee = w(() => K.filter(({ option: e }) => {
206
206
  var n;
207
207
  return (n = e.children) == null ? void 0 : n.length;
208
- }).map(({ option: e }) => e), [L]), Ke = w(() => Be(c), [c]), D = w(
209
- () => Ke.map(({ value: e }) => e),
210
- [Ke]
208
+ }).map(({ option: e }) => e), [K]), Ie = w(() => Be(c), [c]), D = w(
209
+ () => Ie.map(({ value: e }) => e),
210
+ [Ie]
211
211
  ), re = w(() => {
212
212
  const e = /* @__PURE__ */ new Map();
213
213
  return ee.forEach((n) => {
214
214
  e.set(n.value, Ue(n));
215
215
  }), e;
216
- }, [ee]), z = v(
216
+ }, [ee]), z = k(
217
217
  (e) => (ee.forEach((n) => {
218
218
  const s = re.get(n.value) ?? [], i = s.length > 0 && s.every((d) => e.has(d));
219
219
  Ae && i ? e.add(n.value) : e.delete(n.value);
220
220
  }), e),
221
221
  [ee, Ae, re]
222
- ), T = w(() => !t || !Array.isArray(r) ? /* @__PURE__ */ new Set() : z(new Set(r)), [t, r, z]), he = w(() => t ? Array.isArray(r) && r.length > 0 : g.some((e) => e.value === r) || r === !1 || r === 0 || !!r, [t, r, g]), rr = qe && he && !o, tr = v((e) => {
222
+ ), L = w(() => !t || !Array.isArray(r) ? /* @__PURE__ */ new Set() : z(new Set(r)), [t, r, z]), fe = w(() => t ? Array.isArray(r) && r.length > 0 : g.some((e) => e.value === r) || r === !1 || r === 0 || !!r, [t, r, g]), rr = qe && fe && !o, tr = k((e) => {
223
223
  de.current = e.scrollTop;
224
224
  }, []);
225
225
  $e(() => {
226
- l && !$ && M.current && !(t && K.current !== null) && M.current.scrollTop(de.current);
226
+ l && !$ && M.current && !(t && I.current !== null) && M.current.scrollTop(de.current);
227
227
  }, [l, $, r, t]);
228
- const { refs: P, floatingStyles: Le } = Ar({
228
+ const { refs: P, floatingStyles: Ke } = Ar({
229
229
  placement: "bottom-start",
230
230
  middleware: [
231
- Or(5),
232
- br({
231
+ br(5),
232
+ Or({
233
233
  fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
234
234
  ...y && {
235
235
  boundary: document.documentElement,
@@ -259,23 +259,23 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
259
259
  });
260
260
  const i = z(n);
261
261
  m(Array.from(i)), je();
262
- }, te = v(() => {
262
+ }, te = k(() => {
263
263
  l || (J(!0), E == null || E());
264
- }, [l, E]), C = v(() => {
265
- J(!1), De(""), fe.current = "", A == null || A();
266
- }, [A]), _e = v(() => {
264
+ }, [l, E]), C = k(() => {
265
+ J(!1), De(""), he.current = "", A == null || A();
266
+ }, [A]), _e = k(() => {
267
267
  if (o)
268
268
  return;
269
- m(t ? [] : ""), Oe(), C(), requestAnimationFrame(() => {
269
+ m(t ? [] : ""), be(), C(), requestAnimationFrame(() => {
270
270
  const n = P.reference.current;
271
271
  n && n instanceof HTMLElement && n.focus();
272
272
  });
273
- }, [o, t, m, Oe, C, P]), sr = v(
273
+ }, [o, t, m, be, C, P]), sr = k(
274
274
  (e) => {
275
275
  e.preventDefault(), e.stopPropagation(), _e();
276
276
  },
277
277
  [_e]
278
- ), Te = v(
278
+ ), Le = k(
279
279
  (e) => {
280
280
  var d, a;
281
281
  if (!l)
@@ -283,7 +283,7 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
283
283
  const n = e == null ? void 0 : e.target;
284
284
  if (!n)
285
285
  return;
286
- const s = (d = Ne.current) == null ? void 0 : d.contains(n), i = (a = ve.current) == null ? void 0 : a.contains(n);
286
+ const s = (d = Ne.current) == null ? void 0 : d.contains(n), i = (a = ke.current) == null ? void 0 : a.contains(n);
287
287
  !s && !i && C();
288
288
  },
289
289
  [l, C]
@@ -292,21 +292,21 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
292
292
  if (!l)
293
293
  return;
294
294
  const e = (n) => {
295
- Te(n);
295
+ Le(n);
296
296
  };
297
297
  return document.addEventListener("pointerdown", e), () => {
298
298
  document.removeEventListener("pointerdown", e);
299
299
  };
300
- }, [l, Te]);
301
- const xe = (e) => {
300
+ }, [l, Le]);
301
+ const Te = (e) => {
302
302
  var n;
303
303
  if (!e.disabled) {
304
304
  if (t) {
305
305
  const s = Array.isArray(r) ? r : [], i = new Set(s);
306
306
  if ((n = e.children) != null && n.length) {
307
- const a = re.get(e.value) ?? [], f = a.some((N) => !i.has(N));
307
+ const a = re.get(e.value) ?? [], h = a.some((N) => !i.has(N));
308
308
  a.forEach((N) => {
309
- f ? i.add(N) : i.delete(N);
309
+ h ? i.add(N) : i.delete(N);
310
310
  });
311
311
  } else
312
312
  i.has(e.value) ? i.delete(e.value) : i.add(e.value);
@@ -316,36 +316,36 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
316
316
  m(e.value);
317
317
  J((s) => t || !s);
318
318
  }
319
- }, or = () => g.find(({ value: e }) => e === r), ke = jr(g, r), {
319
+ }, or = () => g.find(({ value: e }) => e === r), xe = jr(g, r), {
320
320
  getToggleButtonProps: ar,
321
321
  getLabelProps: ir,
322
322
  getMenuProps: Re,
323
323
  getItemProps: lr,
324
- setHighlightedIndex: x,
324
+ setHighlightedIndex: T,
325
325
  highlightedIndex: pe
326
326
  } = Ee({
327
327
  items: g,
328
- itemToString: (e) => (e != null && e.label ? String(e.label) : O) || "",
328
+ itemToString: (e) => (e != null && e.label ? String(e.label) : b) || "",
329
329
  selectedItem: or(),
330
330
  isOpen: l,
331
331
  circularNavigation: !0,
332
- defaultHighlightedIndex: ke,
332
+ defaultHighlightedIndex: xe,
333
333
  onHighlightedIndexChange: (e) => {
334
334
  switch (e.type) {
335
335
  case Ee.stateChangeTypes.MenuKeyDownArrowUp:
336
- return Q(V.ON_KEY_DOWN), x(Gr(g, e.highlightedIndex)), e;
336
+ return Q(V.ON_KEY_DOWN), T(Gr(g, e.highlightedIndex)), e;
337
337
  case Ee.stateChangeTypes.MenuKeyDownArrowDown:
338
- return Q(V.ON_KEY_DOWN), x(Zr(g, e.highlightedIndex)), e;
338
+ return Q(V.ON_KEY_DOWN), T(Zr(g, e.highlightedIndex)), e;
339
339
  default:
340
340
  return e;
341
341
  }
342
342
  }
343
- }), Pe = v(
343
+ }), Pe = k(
344
344
  (e) => {
345
- ve.current = e, P.setFloating(e);
345
+ ke.current = e, P.setFloating(e);
346
346
  },
347
347
  [P]
348
- ), cr = v(
348
+ ), cr = k(
349
349
  (e = {}) => {
350
350
  const n = Re(e), s = n.ref;
351
351
  return {
@@ -358,17 +358,17 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
358
358
  [Re, Pe]
359
359
  );
360
360
  F(() => {
361
- t && l && K.current !== null && K.current >= 0 && K.current < g.length && (x(K.current), K.current = null, requestAnimationFrame(() => {
361
+ t && l && I.current !== null && I.current >= 0 && I.current < g.length && (T(I.current), I.current = null, requestAnimationFrame(() => {
362
362
  M.current && !$ && M.current.scrollTop(de.current);
363
363
  }));
364
- }, [t, l, r, g.length, x, $]), F(() => {
365
- l && b && requestAnimationFrame(() => {
364
+ }, [t, l, r, g.length, T, $]), F(() => {
365
+ l && O && requestAnimationFrame(() => {
366
366
  var e;
367
367
  (e = ue.current) == null || e.focus();
368
368
  });
369
- }, [l, b]), F(() => {
370
- b && l && I !== fe.current && (fe.current = I, I && x(0));
371
- }, [I, b, l]), $e(() => {
369
+ }, [l, O]), F(() => {
370
+ O && l && v !== he.current && (he.current = v, v && T(0));
371
+ }, [v, O, l]), $e(() => {
372
372
  if (!l || !y)
373
373
  return;
374
374
  let e = window.scrollY, n = !0;
@@ -376,8 +376,8 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
376
376
  if (!n)
377
377
  return;
378
378
  window.scrollY !== e && window.scrollTo(0, e);
379
- }, d = (f) => {
380
- n && (f.preventDefault(), f.stopImmediatePropagation(), i());
379
+ }, d = (h) => {
380
+ n && (h.preventDefault(), h.stopImmediatePropagation(), i());
381
381
  };
382
382
  e = window.scrollY, window.addEventListener("scroll", d, { passive: !1, capture: !0 }), requestAnimationFrame(() => {
383
383
  e = window.scrollY, i();
@@ -401,50 +401,50 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
401
401
  const Ye = () => {
402
402
  o || (J((e) => !e), l ? A == null || A() : E == null || E(), Q(V.ON_CLICK));
403
403
  }, me = w(() => {
404
- if (t && Array.isArray(r) && D.length > 0 && D.every((n) => T.has(n)))
404
+ if (t && Array.isArray(r) && D.length > 0 && D.every((n) => L.has(n)))
405
405
  return le.label;
406
406
  const e = g.reduce((n, s) => ((Array.isArray(r) && r.includes(s.value) || s.value === r) && n.push(s.label), n), []);
407
- return e.length > 0 ? e.join(", ") : !r && r !== !1 && r !== 0 || Array.isArray(r) && !r.length ? O : typeof r == "string" && r.length > 0 && !O ? r : O || void 0;
407
+ return e.length > 0 ? e.join(", ") : !r && r !== !1 && r !== 0 || Array.isArray(r) && !r.length ? b : typeof r == "string" && r.length > 0 && !b ? r : b || void 0;
408
408
  }, [
409
409
  t,
410
410
  r,
411
411
  D,
412
- T,
412
+ L,
413
413
  le.label,
414
414
  g,
415
- O
416
- ]), ge = w(() => ce ? ce(me) : me, [ce, me]), dr = he && ge ? ge : void 0, { ref: ur, title: fr } = kr(dr), hr = (e) => {
415
+ b
416
+ ]), ge = w(() => ce ? ce(me) : me, [ce, me]), dr = fe && ge ? ge : void 0, { ref: ur, title: hr } = xr(dr), fr = (e) => {
417
417
  const { keyCode: n } = e;
418
- Wr.includes(n) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !l && (x(ke), te(), Q(V.ON_KEY_DOWN)));
418
+ Wr.includes(n) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !l && (T(xe), te(), Q(V.ON_KEY_DOWN)));
419
419
  }, _r = (e) => {
420
420
  const { keyCode: n } = e;
421
421
  if (n === p.ENTER_KEY_CODE || n === p.SPACE_KEY_CODE) {
422
422
  const s = g[pe];
423
423
  if (!s || s.disabled)
424
424
  return;
425
- t && (K.current = pe), xe(s), t || C();
425
+ t && (I.current = pe), Te(s), t || C();
426
426
  return;
427
427
  }
428
428
  zr.includes(n) && (e.stopPropagation(), C());
429
429
  }, Ve = () => /* @__PURE__ */ R("div", { className: _("options-container"), children: [
430
- t && Ce && !ne(L) && /* @__PURE__ */ R(He, { children: [
430
+ t && Ce && !ne(K) && /* @__PURE__ */ R(He, { children: [
431
431
  /* @__PURE__ */ u(
432
432
  We,
433
433
  {
434
434
  option: le,
435
- selected: Array.isArray(r) && D.length > 0 && D.every((e) => T.has(e)),
435
+ selected: Array.isArray(r) && D.length > 0 && D.every((e) => L.has(e)),
436
436
  onChange: nr,
437
437
  multiSelect: t,
438
- isPartiallyChecked: D.some((e) => T.has(e)) && !D.every((e) => T.has(e)),
439
- disabledOptionTooltipPortalRoot: be
438
+ isPartiallyChecked: D.some((e) => L.has(e)) && !D.every((e) => L.has(e)),
439
+ disabledOptionTooltipPortalRoot: Oe
440
440
  }
441
441
  ),
442
442
  /* @__PURE__ */ u("div", { className: _("divider") }),
443
443
  " "
444
444
  ] }),
445
- ne(L) ? /* @__PURE__ */ u("div", { className: _("empty-list-message"), children: Ge }) : L.map(({ option: e, depth: n }, s) => {
446
- var f, N;
447
- const i = re.get(e.value) ?? [e.value], d = t && i.every((Y) => T.has(Y)), a = t && ((f = e.children) == null ? void 0 : f.length) && i.some((Y) => T.has(Y)) && !d;
445
+ ne(K) ? /* @__PURE__ */ u("div", { className: _("empty-list-message"), children: Ge }) : K.map(({ option: e, depth: n }, s) => {
446
+ var h, N;
447
+ const i = re.get(e.value) ?? [e.value], d = t && i.every((Y) => L.has(Y)), a = t && ((h = e.children) == null ? void 0 : h.length) && i.some((Y) => L.has(Y)) && !d;
448
448
  return /* @__PURE__ */ u(
449
449
  We,
450
450
  {
@@ -457,12 +457,12 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
457
457
  option: e,
458
458
  highlightHovered: pe === s && er !== V.ON_CLICK,
459
459
  render: Z,
460
- onChange: e.disabled ? null : () => xe(e),
461
- onMouseEnter: () => x(s),
460
+ onChange: e.disabled ? null : () => Te(e),
461
+ onMouseEnter: () => T(s),
462
462
  depth: n,
463
463
  hasChildren: !!((N = e.children) != null && N.length),
464
464
  isPartiallyChecked: a,
465
- disabledOptionTooltipPortalRoot: be
465
+ disabledOptionTooltipPortalRoot: Oe
466
466
  },
467
467
  e.value
468
468
  );
@@ -472,20 +472,20 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
472
472
  typeof X == "function" ? X(C) : X
473
473
  ] })
474
474
  ] }), pr = () => {
475
- const e = Ie.reduce((a, f) => (Array.isArray(r) && r.includes(f.value) && a.push(f.label), a), []), n = (a) => {
476
- const f = Ie.find(
475
+ const e = ve.reduce((a, h) => (Array.isArray(r) && r.includes(h.value) && a.push(h.label), a), []), n = (a) => {
476
+ const h = ve.find(
477
477
  ({ label: Er }) => Er === a
478
478
  );
479
- if (!f)
479
+ if (!h)
480
480
  return;
481
481
  const N = Array.isArray(r) ? r : [], Y = new Set(N);
482
- Y.delete(f.value);
482
+ Y.delete(h.value);
483
483
  const wr = z(Y);
484
484
  m(Array.from(wr));
485
485
  }, s = (a) => {
486
- const f = a.target;
487
- De(f.value), l || (te(), requestAnimationFrame(() => {
488
- f.focus();
486
+ const h = a.target;
487
+ De(h.value), l || (te(), requestAnimationFrame(() => {
488
+ h.focus();
489
489
  }));
490
490
  }, i = (a) => {
491
491
  if (a.keyCode === p.ESCAPE_KEY_CODE) {
@@ -499,19 +499,19 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
499
499
  ref: ue,
500
500
  type: "text",
501
501
  className: _("search-input"),
502
- value: I,
502
+ value: v,
503
503
  onChange: s,
504
504
  onKeyDown: i,
505
505
  onClick: (a) => {
506
506
  a.stopPropagation(), te();
507
507
  },
508
- placeholder: ne(e) ? O : "",
508
+ placeholder: ne(e) ? b : "",
509
509
  autoComplete: "off"
510
510
  }
511
511
  );
512
512
  return ne(e) ? /* @__PURE__ */ u("div", { className: _("tags-wrapper", "with-search"), children: d }) : /* @__PURE__ */ R("div", { className: _("tags-wrapper", "with-search"), children: [
513
513
  /* @__PURE__ */ u(
514
- xr,
514
+ Tr,
515
515
  {
516
516
  tags: e,
517
517
  onRemoveTag: n,
@@ -521,14 +521,14 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
521
521
  ),
522
522
  d
523
523
  ] });
524
- }, mr = () => b && t && Array.isArray(r) ? pr() : /* @__PURE__ */ u(
524
+ }, mr = () => O && t && Array.isArray(r) ? pr() : /* @__PURE__ */ u(
525
525
  "span",
526
526
  {
527
527
  ref: ur,
528
528
  className: _("value", {
529
- placeholder: !he
529
+ placeholder: !fe
530
530
  }),
531
- title: fr,
531
+ title: hr,
532
532
  children: ge
533
533
  }
534
534
  ), gr = ar({
@@ -536,13 +536,13 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
536
536
  "transparent-background": oe,
537
537
  opened: l,
538
538
  disabled: o,
539
- error: h,
539
+ error: f,
540
540
  touched: U,
541
541
  "mobile-disabled": B,
542
- "multi-select-with-tags": b
542
+ "multi-select-with-tags": O
543
543
  }),
544
544
  onClick: Ye,
545
- onKeyDown: hr,
545
+ onKeyDown: fr,
546
546
  ref: P.setReference
547
547
  }), { type: dt, ...Se } = gr;
548
548
  return /* @__PURE__ */ R(
@@ -555,7 +555,7 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
555
555
  ...Je,
556
556
  children: [
557
557
  q && /* @__PURE__ */ u(
558
- Tr,
558
+ Lr,
559
559
  {
560
560
  ...ir(),
561
561
  onClick: () => !o && Ye(),
@@ -574,7 +574,7 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
574
574
  j && /* @__PURE__ */ u("span", { className: _("icon"), children: j }),
575
575
  /* @__PURE__ */ u("div", { className: _("value-wrapper"), children: mr() }),
576
576
  rr && /* @__PURE__ */ u(
577
- Ir,
577
+ vr,
578
578
  {
579
579
  className: _("clear-button"),
580
580
  onClick: sr,
@@ -583,21 +583,21 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
583
583
  (n === p.ENTER_KEY_CODE || n === p.SPACE_KEY_CODE) && (e.preventDefault(), e.stopPropagation(), _e());
584
584
  },
585
585
  "aria-label": Ze,
586
- children: /* @__PURE__ */ u(Kr, {})
586
+ children: /* @__PURE__ */ u(Ir, {})
587
587
  }
588
588
  ),
589
- /* @__PURE__ */ u("span", { className: _("arrow"), "aria-hidden": "true", children: /* @__PURE__ */ u(Lr, {}) })
589
+ /* @__PURE__ */ u("span", { className: _("arrow"), "aria-hidden": "true", children: /* @__PURE__ */ u(Kr, {}) })
590
590
  ]
591
591
  }
592
592
  ),
593
593
  l && (() => {
594
594
  var i;
595
595
  const e = (i = P.reference.current) == null ? void 0 : i.getBoundingClientRect().width, n = y && e ? {
596
- ...Le,
596
+ ...Ke,
597
597
  width: `${e}px`,
598
598
  minWidth: `${e}px`,
599
599
  maxWidth: `${e}px`
600
- } : Le, s = /* @__PURE__ */ u(
600
+ } : Ke, s = /* @__PURE__ */ u(
601
601
  "div",
602
602
  {
603
603
  style: n,
@@ -612,7 +612,7 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
612
612
  ...y && { [Br]: "" },
613
613
  ...cr({
614
614
  onKeyDown: _r,
615
- ...b && {
615
+ ...O && {
616
616
  tabIndex: -1,
617
617
  onFocus: (d) => {
618
618
  var a;
@@ -621,7 +621,7 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
621
621
  }
622
622
  }),
623
623
  children: $ ? Ve() : /* @__PURE__ */ u(
624
- vr,
624
+ kr,
625
625
  {
626
626
  autoHeight: !0,
627
627
  autoHeightMax: Fr,
@@ -642,6 +642,6 @@ const Fr = 240, Br = "data-dropdown-portal-menu", Ur = 10, jr = (t, r) => {
642
642
  );
643
643
  };
644
644
  export {
645
- Lt as D,
645
+ Kt as D,
646
646
  Br as a
647
647
  };
package/dist/dropdown.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as r } from "./dropdown-33f2bf75.js";
2
- import { a as U } from "./dropdown-33f2bf75.js";
1
+ import { D as r } from "./dropdown-d2a05471.js";
2
+ import { a as U } from "./dropdown-d2a05471.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-dom";
package/dist/index.js CHANGED
@@ -9,9 +9,9 @@ import { BulkPanel as J } from "./bulkPanel.js";
9
9
  import { B as _ } from "./button-7ab874f3.js";
10
10
  import { C as X } from "./checkbox-76aa8f97.js";
11
11
  import { Chip as q } from "./chip.js";
12
- import { D as Q } from "./datePicker-6c001a18.js";
12
+ import { D as Q } from "./datePicker-b554cb9d.js";
13
13
  import "react-datepicker";
14
- import { D as Z } from "./dropdown-33f2bf75.js";
14
+ import { D as Z } from "./dropdown-d2a05471.js";
15
15
  import { FieldLabel as oo } from "./fieldLabel.js";
16
16
  import { F as eo } from "./fieldNumber-b4aa4d7e.js";
17
17
  import { F as no } from "./fieldText-1749da7a.js";
package/dist/modal.js CHANGED
@@ -8,7 +8,7 @@ import "react-dnd";
8
8
  import "react-dnd-html5-backend";
9
9
  import { u as J } from "./useWindowResize-a7e1ac92.js";
10
10
  import { A as Q } from "./constants-85822a6b.js";
11
- import { a as V } from "./dropdown-33f2bf75.js";
11
+ import { a as V } from "./dropdown-d2a05471.js";
12
12
  import { K as Z } from "./keyCodes-f63c0e11.js";
13
13
  import { B as C } from "./button-7ab874f3.js";
14
14
  import { Tooltip as ee } from "./tooltip.js";