@reportportal/ui-kit 0.0.1-alpha.222 → 0.0.1-alpha.223

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 E, forwardRef as G, useRef as V } from "react";
3
3
  import v from "react-datepicker/dist/es/index.js";
4
4
  import { c as L } from "./bind-06a7ff84.js";
5
5
  import { F as W } from "./fieldText-1749da7a.js";
6
- import { D as x } from "./dropdown-b1592a49.js";
6
+ import { D as x } from "./dropdown-110ce4a5.js";
7
7
  import { S as I } from "./calendarArrow-44c7e60e.js";
8
8
  import { registerLocale as q } from "react-datepicker";
9
9
  const De = (t, n) => {
@@ -1,5 +1,5 @@
1
- import { D as t } from "./datePicker-7325f41a.js";
2
- import { r as E } from "./datePicker-7325f41a.js";
1
+ import { D as t } from "./datePicker-ab9411c0.js";
2
+ import { r as E } from "./datePicker-ab9411c0.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-b1592a49.js";
14
+ import "./dropdown-110ce4a5.js";
15
15
  import "react-dom";
16
16
  import "@floating-ui/react-dom";
17
17
  import "downshift";
@@ -1,9 +1,9 @@
1
- import { jsxs as R, jsx as u, Fragment as Ve } from "react/jsx-runtime";
2
- import { forwardRef as Er, useState as ge, useRef as k, useMemo as w, useCallback as v, useLayoutEffect as Se, useEffect as B } from "react";
1
+ import { jsxs as R, jsx as u, Fragment as Se } from "react/jsx-runtime";
2
+ import { forwardRef as Er, useState as we, useRef as k, useMemo as w, useCallback as v, useLayoutEffect as He, useEffect as B } from "react";
3
3
  import { createPortal as yr } from "react-dom";
4
- import { c as Me } from "./bind-06a7ff84.js";
4
+ import { c as We } from "./bind-06a7ff84.js";
5
5
  import { useFloating as Cr, offset as Ar, flip as Or, size as Dr, autoUpdate as br } from "@floating-ui/react-dom";
6
- import { useSelect as we } from "downshift";
6
+ import { useSelect as Ee } from "downshift";
7
7
  import { Scrollbars as Nr } from "rc-scrollbars";
8
8
  import { K as p } from "./keyCodes-f63c0e11.js";
9
9
  import { B as vr } from "./baseIconButton-251479f7.js";
@@ -15,7 +15,7 @@ import "react-dnd";
15
15
  import "react-dnd-html5-backend";
16
16
  import { u as xr } from "./useEllipsisTitle-462fa254.js";
17
17
  import { C as kr } from "./checkbox-76aa8f97.js";
18
- import { i as te } from "./isEmpty-ccacb5ff.js";
18
+ import { i as ne } from "./isEmpty-ccacb5ff.js";
19
19
  const Rr = (n) => {
20
20
  const r = {}, c = {};
21
21
  return Object.entries(n).forEach(([o, f]) => {
@@ -35,45 +35,44 @@ const Rr = (n) => {
35
35
  selected: Sr,
36
36
  "single-option": "_single-option_100r3_47",
37
37
  "sub-option": "_sub-option_100r3_54"
38
- }, He = Me.bind(Hr), $e = Er(
38
+ }, $e = We.bind(Hr), Me = Er(
39
39
  (n, r) => {
40
40
  const {
41
- option: { value: c, disabled: o, hidden: f, label: m, title: C, groupRef: A },
41
+ option: { value: c, disabled: o, hidden: f, label: m, title: E, groupRef: A },
42
42
  selected: F,
43
43
  onChange: S,
44
44
  render: U,
45
45
  highlightHovered: j,
46
- onMouseEnter: ne,
46
+ onMouseEnter: se,
47
47
  multiSelect: O,
48
48
  isPartiallyChecked: q = !1,
49
49
  depth: Z = 0,
50
- hasChildren: se = !1
51
- } = n, oe = (ae) => {
52
- const H = ae.target;
53
- H.closest("label") && !(H instanceof HTMLInputElement || H instanceof HTMLDivElement) || S == null || S(c);
54
- };
55
- return /* @__PURE__ */ R(
50
+ hasChildren: oe = !1
51
+ } = n, ae = (ie) => {
52
+ const H = ie.target;
53
+ o || H.closest("label") && !(H instanceof HTMLInputElement || H instanceof HTMLDivElement) || S == null || S(c);
54
+ }, G = /* @__PURE__ */ R(
56
55
  "div",
57
56
  {
58
- className: He("dropdown-option", {
57
+ className: $e("dropdown-option", {
59
58
  selected: F,
60
59
  disabled: o,
61
60
  hidden: f,
62
61
  hover: j,
63
62
  "multi-select": O,
64
- "has-children": se,
63
+ "has-children": oe,
65
64
  [`depth-${Z}`]: Z > 0
66
65
  }),
67
- title: C,
68
- onClick: oe,
66
+ title: o ? void 0 : E,
67
+ onClick: ae,
69
68
  ref: r,
70
- onMouseEnter: ne,
69
+ onMouseEnter: se,
71
70
  children: [
72
71
  O && /* @__PURE__ */ u(kr, { value: !!F, partiallyChecked: q }),
73
72
  /* @__PURE__ */ u(
74
73
  "div",
75
74
  {
76
- className: He("single-option", {
75
+ className: $e("single-option", {
77
76
  "sub-option": !!A
78
77
  }),
79
78
  children: U ? U(n) : m
@@ -82,6 +81,7 @@ const Rr = (n) => {
82
81
  ]
83
82
  }
84
83
  );
84
+ return o && E ? /* @__PURE__ */ u("div", { title: E, children: G }) : G;
85
85
  }
86
86
  ), $r = [
87
87
  p.ENTER_KEY_CODE,
@@ -92,27 +92,27 @@ var V = /* @__PURE__ */ ((n) => (n.ON_KEY_DOWN = "onKeyDown", n.ON_CLICK = "onCl
92
92
  const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
93
93
  const c = Array.isArray(r) ? r : [r];
94
94
  return n.findIndex(({ value: o }) => c.includes(o));
95
- }, Ur = (n, r) => (n % r + r) % r, Ee = (n, r = 0, c = 1) => {
95
+ }, Ur = (n, r) => (n % r + r) % r, ye = (n, r = 0, c = 1) => {
96
96
  var f;
97
97
  if (n.length === 0)
98
98
  return 0;
99
99
  if (!((f = n[r]) != null && f.disabled))
100
100
  return r;
101
101
  const o = n.length;
102
- return Ee(
102
+ return ye(
103
103
  n,
104
104
  Ur(r + c, o),
105
105
  c
106
106
  );
107
- }, jr = (n, r) => Ee(n, r), qr = (n, r) => Ee(n, r, -1), We = (n, r = 0, c) => !n || n.length === 0 ? [] : n.reduce((o, f) => {
107
+ }, jr = (n, r) => ye(n, r), qr = (n, r) => ye(n, r, -1), ze = (n, r = 0, c) => !n || n.length === 0 ? [] : n.reduce((o, f) => {
108
108
  var m;
109
- return f && (o.push({ option: f, depth: r, parent: c }), (m = f.children) != null && m.length && o.push(...We(f.children, r + 1, f))), o;
110
- }, []), ze = (n) => !n || n.length === 0 ? [] : n.reduce((r, c) => {
109
+ return f && (o.push({ option: f, depth: r, parent: c }), (m = f.children) != null && m.length && o.push(...ze(f.children, r + 1, f))), o;
110
+ }, []), Be = (n) => !n || n.length === 0 ? [] : n.reduce((r, c) => {
111
111
  var o;
112
- return c && ((o = c.children) != null && o.length ? r.push(...ze(c.children)) : r.push(c)), r;
113
- }, []), Be = (n) => {
112
+ return c && ((o = c.children) != null && o.length ? r.push(...Be(c.children)) : r.push(c)), r;
113
+ }, []), Fe = (n) => {
114
114
  var r;
115
- return n ? (r = n.children) != null && r.length ? n.children.reduce((c, o) => (o && c.push(...Be(o)), c), []) : [n.value] : [];
115
+ return n ? (r = n.children) != null && r.length ? n.children.reduce((c, o) => (o && c.push(...Fe(o)), c), []) : [n.value] : [];
116
116
  }, Zr = "_container_sth8o_1", Gr = "_icon_sth8o_7", Xr = "_arrow_sth8o_15", Jr = "_dropdown_sth8o_33", Qr = "_disabled_sth8o_53", et = "_value_sth8o_60", rt = "_error_sth8o_63", tt = "_touched_sth8o_63", nt = "_opened_sth8o_67", st = "_placeholder_sth8o_101", ot = "_ghost_sth8o_184", at = "_divider_sth8o_202", it = {
117
117
  container: Zr,
118
118
  icon: Gr,
@@ -138,46 +138,46 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
138
138
  "empty-list-message": "_empty-list-message_sth8o_172",
139
139
  ghost: ot,
140
140
  divider: at
141
- }, _ = Me.bind(it), vt = ({
141
+ }, _ = We.bind(it), vt = ({
142
142
  multiSelect: n = !1,
143
143
  value: r = n ? [] : "",
144
144
  options: c = [],
145
145
  disabled: o = !1,
146
146
  error: f,
147
147
  onChange: m,
148
- onFocus: C,
148
+ onFocus: E,
149
149
  onBlur: A,
150
150
  mobileDisabled: F,
151
151
  title: S,
152
152
  touched: U = !1,
153
153
  icon: j,
154
- variant: ne,
154
+ variant: se,
155
155
  placeholder: O = "",
156
156
  label: q = "",
157
157
  renderOption: Z,
158
- transparentBackground: se = !1,
159
- className: oe,
160
- toggleButtonClassName: ae,
161
- selectListClassName: H,
162
- isListWidthLimited: Fe = !1,
163
- optionAll: ie = { value: "all", label: "All" },
164
- isOptionAllVisible: ye = !1,
158
+ transparentBackground: oe = !1,
159
+ className: ae,
160
+ toggleButtonClassName: G,
161
+ selectListClassName: ie,
162
+ isListWidthLimited: H = !1,
163
+ optionAll: le = { value: "all", label: "All" },
164
+ isOptionAllVisible: Ce = !1,
165
165
  onSelectAll: Ue = () => {
166
166
  },
167
- formatDisplayedValue: le,
167
+ formatDisplayedValue: ce,
168
168
  notScrollable: $ = !1,
169
- footer: G,
170
- includeGroupValue: Ce = !1,
169
+ footer: X,
170
+ includeGroupValue: Ae = !1,
171
171
  clearable: je = !1,
172
- onClear: Ae = () => {
172
+ onClear: Oe = () => {
173
173
  },
174
174
  clearButtonAriaLabel: qe = "Clear selection",
175
- menuPortalRoot: E,
175
+ menuPortalRoot: y,
176
176
  isMultiSelectWithTags: D = !1,
177
177
  noMatchesMessage: Ze = "No matches found",
178
178
  ...Ge
179
179
  }) => {
180
- const { transformed: Xe, remaining: Je } = Rr(Ge), [l, X] = ge(!1), [I, Oe] = ge(""), De = k(null), be = k(null), M = k(null), ce = k(0), de = k(null), ue = k(""), [Qe, J] = ge(null), K = k(null), W = w(() => We(c), [c]), L = w(() => {
180
+ const { transformed: Xe, remaining: Je } = Rr(Ge), [l, J] = we(!1), [I, De] = we(""), be = k(null), Ne = k(null), M = k(null), de = k(0), ue = k(null), he = k(""), [Qe, Q] = we(null), K = k(null), W = w(() => ze(c), [c]), L = w(() => {
181
181
  if (!D || !I.trim())
182
182
  return W;
183
183
  const e = I.toLowerCase();
@@ -187,44 +187,44 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
187
187
  }, [W, I, D]), g = w(
188
188
  () => L.map(({ option: e }) => e),
189
189
  [L]
190
- ), Ne = w(
190
+ ), ve = w(
191
191
  () => W.map(({ option: e }) => e),
192
192
  [W]
193
- ), Q = w(() => L.filter(({ option: e }) => {
193
+ ), ee = w(() => L.filter(({ option: e }) => {
194
194
  var t;
195
195
  return (t = e.children) == null ? void 0 : t.length;
196
- }).map(({ option: e }) => e), [L]), ve = w(() => ze(c), [c]), b = w(
197
- () => ve.map(({ value: e }) => e),
198
- [ve]
199
- ), ee = w(() => {
196
+ }).map(({ option: e }) => e), [L]), Ie = w(() => Be(c), [c]), b = w(
197
+ () => Ie.map(({ value: e }) => e),
198
+ [Ie]
199
+ ), re = w(() => {
200
200
  const e = /* @__PURE__ */ new Map();
201
- return Q.forEach((t) => {
202
- e.set(t.value, Be(t));
201
+ return ee.forEach((t) => {
202
+ e.set(t.value, Fe(t));
203
203
  }), e;
204
- }, [Q]), z = v(
205
- (e) => (Q.forEach((t) => {
206
- const s = ee.get(t.value) ?? [], i = s.length > 0 && s.every((d) => e.has(d));
207
- Ce && i ? e.add(t.value) : e.delete(t.value);
204
+ }, [ee]), z = v(
205
+ (e) => (ee.forEach((t) => {
206
+ const s = re.get(t.value) ?? [], i = s.length > 0 && s.every((d) => e.has(d));
207
+ Ae && i ? e.add(t.value) : e.delete(t.value);
208
208
  }), e),
209
- [Q, Ce, ee]
210
- ), T = w(() => !n || !Array.isArray(r) ? /* @__PURE__ */ new Set() : z(new Set(r)), [n, r, z]), he = w(() => n ? Array.isArray(r) && r.length > 0 : g.some((e) => e.value === r) || r === !1 || r === 0 || !!r, [n, r, g]), er = je && he && !o, rr = v((e) => {
211
- ce.current = e.scrollTop;
209
+ [ee, Ae, re]
210
+ ), T = w(() => !n || !Array.isArray(r) ? /* @__PURE__ */ new Set() : z(new Set(r)), [n, r, z]), fe = w(() => n ? Array.isArray(r) && r.length > 0 : g.some((e) => e.value === r) || r === !1 || r === 0 || !!r, [n, r, g]), er = je && fe && !o, rr = v((e) => {
211
+ de.current = e.scrollTop;
212
212
  }, []);
213
- Se(() => {
214
- l && !$ && M.current && !(n && K.current !== null) && M.current.scrollTop(ce.current);
213
+ He(() => {
214
+ l && !$ && M.current && !(n && K.current !== null) && M.current.scrollTop(de.current);
215
215
  }, [l, $, r, n]);
216
- const { refs: P, floatingStyles: Ie } = Cr({
216
+ const { refs: P, floatingStyles: Ke } = Cr({
217
217
  placement: "bottom-start",
218
218
  middleware: [
219
219
  Ar(5),
220
220
  Or({
221
221
  fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
222
- ...E && {
222
+ ...y && {
223
223
  boundary: document.documentElement,
224
224
  rootBoundary: "viewport"
225
225
  }
226
226
  }),
227
- E ? Dr({
227
+ y ? Dr({
228
228
  apply({ rects: e, elements: t }) {
229
229
  const s = e.reference.width;
230
230
  Object.assign(t.floating.style, {
@@ -239,7 +239,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
239
239
  animationFrame: !0
240
240
  }) : void 0
241
241
  }), tr = () => {
242
- if (!ye)
242
+ if (!Ce)
243
243
  return;
244
244
  const e = Array.isArray(r) ? r : [], t = new Set(e), s = b.some((d) => !t.has(d));
245
245
  b.forEach((d) => {
@@ -247,23 +247,23 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
247
247
  });
248
248
  const i = z(t);
249
249
  m(Array.from(i)), Ue();
250
- }, re = v(() => {
251
- l || (X(!0), C == null || C());
252
- }, [l, C]), y = v(() => {
253
- X(!1), Oe(""), ue.current = "", A == null || A();
254
- }, [A]), fe = v(() => {
250
+ }, te = v(() => {
251
+ l || (J(!0), E == null || E());
252
+ }, [l, E]), C = v(() => {
253
+ J(!1), De(""), he.current = "", A == null || A();
254
+ }, [A]), _e = v(() => {
255
255
  if (o)
256
256
  return;
257
- m(n ? [] : ""), Ae(), y(), requestAnimationFrame(() => {
257
+ m(n ? [] : ""), Oe(), C(), requestAnimationFrame(() => {
258
258
  const t = P.reference.current;
259
259
  t && t instanceof HTMLElement && t.focus();
260
260
  });
261
- }, [o, n, m, Ae, y, P]), nr = v(
261
+ }, [o, n, m, Oe, C, P]), nr = v(
262
262
  (e) => {
263
- e.preventDefault(), e.stopPropagation(), fe();
263
+ e.preventDefault(), e.stopPropagation(), _e();
264
264
  },
265
- [fe]
266
- ), Ke = v(
265
+ [_e]
266
+ ), Le = v(
267
267
  (e) => {
268
268
  var d, a;
269
269
  if (!l)
@@ -271,28 +271,28 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
271
271
  const t = e == null ? void 0 : e.target;
272
272
  if (!t)
273
273
  return;
274
- const s = (d = De.current) == null ? void 0 : d.contains(t), i = (a = be.current) == null ? void 0 : a.contains(t);
275
- !s && !i && y();
274
+ const s = (d = be.current) == null ? void 0 : d.contains(t), i = (a = Ne.current) == null ? void 0 : a.contains(t);
275
+ !s && !i && C();
276
276
  },
277
- [l, y]
277
+ [l, C]
278
278
  );
279
279
  B(() => {
280
280
  if (!l)
281
281
  return;
282
282
  const e = (t) => {
283
- Ke(t);
283
+ Le(t);
284
284
  };
285
285
  return document.addEventListener("pointerdown", e), () => {
286
286
  document.removeEventListener("pointerdown", e);
287
287
  };
288
- }, [l, Ke]);
289
- const Le = (e) => {
288
+ }, [l, Le]);
289
+ const Te = (e) => {
290
290
  var t;
291
291
  if (!e.disabled) {
292
292
  if (n) {
293
293
  const s = Array.isArray(r) ? r : [], i = new Set(s);
294
294
  if ((t = e.children) != null && t.length) {
295
- const a = ee.get(e.value) ?? [], h = a.some((N) => !i.has(N));
295
+ const a = re.get(e.value) ?? [], h = a.some((N) => !i.has(N));
296
296
  a.forEach((N) => {
297
297
  h ? i.add(N) : i.delete(N);
298
298
  });
@@ -302,62 +302,62 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
302
302
  m(Array.from(d));
303
303
  } else
304
304
  m(e.value);
305
- X((s) => n || !s);
305
+ J((s) => n || !s);
306
306
  }
307
- }, sr = () => g.find(({ value: e }) => e === r), Te = Fr(g, r), {
307
+ }, sr = () => g.find(({ value: e }) => e === r), xe = Fr(g, r), {
308
308
  getToggleButtonProps: or,
309
309
  getLabelProps: ar,
310
- getMenuProps: xe,
310
+ getMenuProps: ke,
311
311
  getItemProps: ir,
312
312
  setHighlightedIndex: x,
313
- highlightedIndex: _e
314
- } = we({
313
+ highlightedIndex: pe
314
+ } = Ee({
315
315
  items: g,
316
316
  itemToString: (e) => (e != null && e.label ? String(e.label) : O) || "",
317
317
  selectedItem: sr(),
318
318
  isOpen: l,
319
319
  circularNavigation: !0,
320
- defaultHighlightedIndex: Te,
320
+ defaultHighlightedIndex: xe,
321
321
  onHighlightedIndexChange: (e) => {
322
322
  switch (e.type) {
323
- case we.stateChangeTypes.MenuKeyDownArrowUp:
324
- return J(V.ON_KEY_DOWN), x(qr(g, e.highlightedIndex)), e;
325
- case we.stateChangeTypes.MenuKeyDownArrowDown:
326
- return J(V.ON_KEY_DOWN), x(jr(g, e.highlightedIndex)), e;
323
+ case Ee.stateChangeTypes.MenuKeyDownArrowUp:
324
+ return Q(V.ON_KEY_DOWN), x(qr(g, e.highlightedIndex)), e;
325
+ case Ee.stateChangeTypes.MenuKeyDownArrowDown:
326
+ return Q(V.ON_KEY_DOWN), x(jr(g, e.highlightedIndex)), e;
327
327
  default:
328
328
  return e;
329
329
  }
330
330
  }
331
- }), ke = v(
331
+ }), Re = v(
332
332
  (e) => {
333
- be.current = e, P.setFloating(e);
333
+ Ne.current = e, P.setFloating(e);
334
334
  },
335
335
  [P]
336
336
  ), lr = v(
337
337
  (e = {}) => {
338
- const t = xe(e), s = t.ref;
338
+ const t = ke(e), s = t.ref;
339
339
  return {
340
340
  ...t,
341
341
  ref: (i) => {
342
- ke(i), typeof s == "function" ? s(i) : s && (s.current = i);
342
+ Re(i), typeof s == "function" ? s(i) : s && (s.current = i);
343
343
  }
344
344
  };
345
345
  },
346
- [xe, ke]
346
+ [ke, Re]
347
347
  );
348
348
  B(() => {
349
349
  n && l && K.current !== null && K.current >= 0 && K.current < g.length && (x(K.current), K.current = null, requestAnimationFrame(() => {
350
- M.current && !$ && M.current.scrollTop(ce.current);
350
+ M.current && !$ && M.current.scrollTop(de.current);
351
351
  }));
352
352
  }, [n, l, r, g.length, x, $]), B(() => {
353
353
  l && D && requestAnimationFrame(() => {
354
354
  var e;
355
- (e = de.current) == null || e.focus();
355
+ (e = ue.current) == null || e.focus();
356
356
  });
357
357
  }, [l, D]), B(() => {
358
- D && l && I !== ue.current && (ue.current = I, I && x(0));
359
- }, [I, D, l]), Se(() => {
360
- if (!l || !E)
358
+ D && l && I !== he.current && (he.current = I, I && x(0));
359
+ }, [I, D, l]), He(() => {
360
+ if (!l || !y)
361
361
  return;
362
362
  let e = window.scrollY, t = !0;
363
363
  const s = 300, i = () => {
@@ -376,21 +376,21 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
376
376
  return () => {
377
377
  clearTimeout(a), window.removeEventListener("scroll", d, { capture: !0 });
378
378
  };
379
- }, [l, E]), B(() => {
380
- if (!l || !E)
379
+ }, [l, y]), B(() => {
380
+ if (!l || !y)
381
381
  return;
382
382
  const e = () => {
383
- y();
383
+ C();
384
384
  };
385
385
  return window.addEventListener("resize", e), () => {
386
386
  window.removeEventListener("resize", e);
387
387
  };
388
- }, [l, E, y]);
389
- const Re = () => {
390
- o || (X((e) => !e), l ? A == null || A() : C == null || C(), J(V.ON_CLICK));
391
- }, pe = w(() => {
388
+ }, [l, y, C]);
389
+ const Pe = () => {
390
+ o || (J((e) => !e), l ? A == null || A() : E == null || E(), Q(V.ON_CLICK));
391
+ }, me = w(() => {
392
392
  if (n && Array.isArray(r) && b.length > 0 && b.every((t) => T.has(t)))
393
- return ie.label;
393
+ return le.label;
394
394
  const e = g.reduce((t, s) => ((Array.isArray(r) && r.includes(s.value) || s.value === r) && t.push(s.label), t), []);
395
395
  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;
396
396
  }, [
@@ -398,28 +398,28 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
398
398
  r,
399
399
  b,
400
400
  T,
401
- ie.label,
401
+ le.label,
402
402
  g,
403
403
  O
404
- ]), me = w(() => le ? le(pe) : pe, [le, pe]), cr = he && me ? me : void 0, { ref: dr, title: ur } = xr(cr), hr = (e) => {
404
+ ]), ge = w(() => ce ? ce(me) : me, [ce, me]), cr = fe && ge ? ge : void 0, { ref: dr, title: ur } = xr(cr), hr = (e) => {
405
405
  const { keyCode: t } = e;
406
- $r.includes(t) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !l && (x(Te), re(), J(V.ON_KEY_DOWN)));
406
+ $r.includes(t) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !l && (x(xe), te(), Q(V.ON_KEY_DOWN)));
407
407
  }, fr = (e) => {
408
408
  const { keyCode: t } = e;
409
409
  if (t === p.ENTER_KEY_CODE || t === p.SPACE_KEY_CODE) {
410
- const s = g[_e];
411
- if (!s)
410
+ const s = g[pe];
411
+ if (!s || s.disabled)
412
412
  return;
413
- n && (K.current = _e), Le(s), n || y();
413
+ n && (K.current = pe), Te(s), n || C();
414
414
  return;
415
415
  }
416
- Mr.includes(t) && (e.stopPropagation(), y());
417
- }, Pe = () => /* @__PURE__ */ R("div", { className: _("options-container"), children: [
418
- n && ye && !te(L) && /* @__PURE__ */ R(Ve, { children: [
416
+ Mr.includes(t) && (e.stopPropagation(), C());
417
+ }, Ye = () => /* @__PURE__ */ R("div", { className: _("options-container"), children: [
418
+ n && Ce && !ne(L) && /* @__PURE__ */ R(Se, { children: [
419
419
  /* @__PURE__ */ u(
420
- $e,
420
+ Me,
421
421
  {
422
- option: ie,
422
+ option: le,
423
423
  selected: Array.isArray(r) && b.length > 0 && b.every((e) => T.has(e)),
424
424
  onChange: tr,
425
425
  multiSelect: n,
@@ -429,11 +429,11 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
429
429
  /* @__PURE__ */ u("div", { className: _("divider") }),
430
430
  " "
431
431
  ] }),
432
- te(L) ? /* @__PURE__ */ u("div", { className: _("empty-list-message"), children: Ze }) : L.map(({ option: e, depth: t }, s) => {
432
+ ne(L) ? /* @__PURE__ */ u("div", { className: _("empty-list-message"), children: Ze }) : L.map(({ option: e, depth: t }, s) => {
433
433
  var h, N;
434
- const i = ee.get(e.value) ?? [e.value], d = n && i.every((Y) => T.has(Y)), a = n && ((h = e.children) == null ? void 0 : h.length) && i.some((Y) => T.has(Y)) && !d;
434
+ const i = re.get(e.value) ?? [e.value], d = n && i.every((Y) => T.has(Y)), a = n && ((h = e.children) == null ? void 0 : h.length) && i.some((Y) => T.has(Y)) && !d;
435
435
  return /* @__PURE__ */ u(
436
- $e,
436
+ Me,
437
437
  {
438
438
  ...ir({
439
439
  item: e,
@@ -442,9 +442,9 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
442
442
  multiSelect: n,
443
443
  selected: n ? d : e.value === r,
444
444
  option: { title: e.label, ...e },
445
- highlightHovered: _e === s && Qe !== V.ON_CLICK,
445
+ highlightHovered: pe === s && Qe !== V.ON_CLICK,
446
446
  render: Z,
447
- onChange: e.disabled ? null : () => Le(e),
447
+ onChange: e.disabled ? null : () => Te(e),
448
448
  onMouseEnter: () => x(s),
449
449
  depth: t,
450
450
  hasChildren: !!((N = e.children) != null && N.length),
@@ -453,13 +453,13 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
453
453
  e.value
454
454
  );
455
455
  }),
456
- G && /* @__PURE__ */ R(Ve, { children: [
456
+ X && /* @__PURE__ */ R(Se, { children: [
457
457
  /* @__PURE__ */ u("div", { className: _("divider") }),
458
- typeof G == "function" ? G(y) : G
458
+ typeof X == "function" ? X(C) : X
459
459
  ] })
460
460
  ] }), _r = () => {
461
- const e = Ne.reduce((a, h) => (Array.isArray(r) && r.includes(h.value) && a.push(h.label), a), []), t = (a) => {
462
- const h = Ne.find(
461
+ const e = ve.reduce((a, h) => (Array.isArray(r) && r.includes(h.value) && a.push(h.label), a), []), t = (a) => {
462
+ const h = ve.find(
463
463
  ({ label: wr }) => wr === a
464
464
  );
465
465
  if (!h)
@@ -470,32 +470,32 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
470
470
  m(Array.from(gr));
471
471
  }, s = (a) => {
472
472
  const h = a.target;
473
- Oe(h.value), l || (re(), requestAnimationFrame(() => {
473
+ De(h.value), l || (te(), requestAnimationFrame(() => {
474
474
  h.focus();
475
475
  }));
476
476
  }, i = (a) => {
477
477
  if (a.keyCode === p.ESCAPE_KEY_CODE) {
478
- a.stopPropagation(), y();
478
+ a.stopPropagation(), C();
479
479
  return;
480
480
  }
481
- a.keyCode === p.ENTER_KEY_CODE || a.keyCode === p.SPACE_KEY_CODE || (a.keyCode === p.ARROW_DOWN_KEY_CODE || a.keyCode === p.ARROW_UP_KEY_CODE) && (a.preventDefault(), re());
481
+ a.keyCode === p.ENTER_KEY_CODE || a.keyCode === p.SPACE_KEY_CODE || (a.keyCode === p.ARROW_DOWN_KEY_CODE || a.keyCode === p.ARROW_UP_KEY_CODE) && (a.preventDefault(), te());
482
482
  }, d = /* @__PURE__ */ u(
483
483
  "input",
484
484
  {
485
- ref: de,
485
+ ref: ue,
486
486
  type: "text",
487
487
  className: _("search-input"),
488
488
  value: I,
489
489
  onChange: s,
490
490
  onKeyDown: i,
491
491
  onClick: (a) => {
492
- a.stopPropagation(), re();
492
+ a.stopPropagation(), te();
493
493
  },
494
- placeholder: te(e) ? O : "",
494
+ placeholder: ne(e) ? O : "",
495
495
  autoComplete: "off"
496
496
  }
497
497
  );
498
- return te(e) ? /* @__PURE__ */ u("div", { className: _("tags-wrapper", "with-search"), children: d }) : /* @__PURE__ */ R("div", { className: _("tags-wrapper", "with-search"), children: [
498
+ return ne(e) ? /* @__PURE__ */ u("div", { className: _("tags-wrapper", "with-search"), children: d }) : /* @__PURE__ */ R("div", { className: _("tags-wrapper", "with-search"), children: [
499
499
  /* @__PURE__ */ u(
500
500
  Tr,
501
501
  {
@@ -512,14 +512,14 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
512
512
  {
513
513
  ref: dr,
514
514
  className: _("value", {
515
- placeholder: !he
515
+ placeholder: !fe
516
516
  }),
517
517
  title: ur,
518
- children: me
518
+ children: ge
519
519
  }
520
520
  ), mr = or({
521
- className: _("dropdown", ne, ae, {
522
- "transparent-background": se,
521
+ className: _("dropdown", se, G, {
522
+ "transparent-background": oe,
523
523
  opened: l,
524
524
  disabled: o,
525
525
  error: f,
@@ -527,15 +527,15 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
527
527
  "mobile-disabled": F,
528
528
  "multi-select-with-tags": D
529
529
  }),
530
- onClick: Re,
530
+ onClick: Pe,
531
531
  onKeyDown: hr,
532
532
  ref: P.setReference
533
- }), { type: lt, ...Ye } = mr;
533
+ }), { type: lt, ...Ve } = mr;
534
534
  return /* @__PURE__ */ R(
535
535
  "div",
536
536
  {
537
- ref: De,
538
- className: _("container", oe),
537
+ ref: be,
538
+ className: _("container", ae),
539
539
  title: S,
540
540
  ...Je,
541
541
  ...Xe,
@@ -544,7 +544,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
544
544
  Lr,
545
545
  {
546
546
  ...ar(),
547
- onClick: () => !o && Re(),
547
+ onClick: () => !o && Pe(),
548
548
  style: { cursor: o ? "default" : "pointer" },
549
549
  children: q
550
550
  }
@@ -552,10 +552,10 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
552
552
  /* @__PURE__ */ R(
553
553
  "div",
554
554
  {
555
- ...Ye,
555
+ ...Ve,
556
556
  role: "button",
557
557
  "aria-disabled": o,
558
- tabIndex: o ? -1 : Ye.tabIndex ?? 0,
558
+ tabIndex: o ? -1 : Ve.tabIndex ?? 0,
559
559
  children: [
560
560
  j && /* @__PURE__ */ u("span", { className: _("icon"), children: j }),
561
561
  /* @__PURE__ */ u("div", { className: _("value-wrapper"), children: pr() }),
@@ -566,7 +566,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
566
566
  onClick: nr,
567
567
  onKeyDown: (e) => {
568
568
  const { keyCode: t } = e;
569
- (t === p.ENTER_KEY_CODE || t === p.SPACE_KEY_CODE) && (e.preventDefault(), e.stopPropagation(), fe());
569
+ (t === p.ENTER_KEY_CODE || t === p.SPACE_KEY_CODE) && (e.preventDefault(), e.stopPropagation(), _e());
570
570
  },
571
571
  "aria-label": qe,
572
572
  children: /* @__PURE__ */ u(Ir, {})
@@ -578,12 +578,12 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
578
578
  ),
579
579
  l && (() => {
580
580
  var i;
581
- const e = (i = P.reference.current) == null ? void 0 : i.getBoundingClientRect().width, t = E && e ? {
582
- ...Ie,
581
+ const e = (i = P.reference.current) == null ? void 0 : i.getBoundingClientRect().width, t = y && e ? {
582
+ ...Ke,
583
583
  width: `${e}px`,
584
584
  minWidth: `${e}px`,
585
585
  maxWidth: `${e}px`
586
- } : Ie, s = /* @__PURE__ */ u(
586
+ } : Ke, s = /* @__PURE__ */ u(
587
587
  "div",
588
588
  {
589
589
  style: t,
@@ -591,22 +591,22 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
591
591
  "select-list",
592
592
  {
593
593
  opened: l,
594
- "limited-width": Fe
594
+ "limited-width": H
595
595
  },
596
- H
596
+ ie
597
597
  ),
598
- ...E && { [zr]: "" },
598
+ ...y && { [zr]: "" },
599
599
  ...lr({
600
600
  onKeyDown: fr,
601
601
  ...D && {
602
602
  tabIndex: -1,
603
603
  onFocus: (d) => {
604
604
  var a;
605
- d.preventDefault(), (a = de.current) == null || a.focus();
605
+ d.preventDefault(), (a = ue.current) == null || a.focus();
606
606
  }
607
607
  }
608
608
  }),
609
- children: $ ? Pe() : /* @__PURE__ */ u(
609
+ children: $ ? Ye() : /* @__PURE__ */ u(
610
610
  Nr,
611
611
  {
612
612
  autoHeight: !0,
@@ -616,12 +616,12 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Br = 10, Fr = (n, r) => {
616
616
  M.current = d;
617
617
  },
618
618
  onScrollFrame: rr,
619
- children: Pe()
619
+ children: Ye()
620
620
  }
621
621
  )
622
622
  }
623
623
  );
624
- return E ? yr(s, E) : s;
624
+ return y ? yr(s, y) : s;
625
625
  })()
626
626
  ]
627
627
  }
package/dist/dropdown.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as r } from "./dropdown-b1592a49.js";
2
- import { a as E } from "./dropdown-b1592a49.js";
1
+ import { D as r } from "./dropdown-110ce4a5.js";
2
+ import { a as E } from "./dropdown-110ce4a5.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-7325f41a.js";
12
+ import { D as Q } from "./datePicker-ab9411c0.js";
13
13
  import "react-datepicker";
14
- import { D as Z } from "./dropdown-b1592a49.js";
14
+ import { D as Z } from "./dropdown-110ce4a5.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 ao } 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-b1592a49.js";
11
+ import { a as V } from "./dropdown-110ce4a5.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";
package/dist/sidePanel.js CHANGED
@@ -5,7 +5,7 @@ import { K as B } from "./keyCodes-f63c0e11.js";
5
5
  import { u as L } from "./useOnClickOutside-8f7d68a1.js";
6
6
  import "react-dnd";
7
7
  import "react-dnd-html5-backend";
8
- import { a as O } from "./dropdown-b1592a49.js";
8
+ import { a as O } from "./dropdown-110ce4a5.js";
9
9
  import { S as T } from "./close-4d480ef7.js";
10
10
  import { B as j } from "./baseIconButton-251479f7.js";
11
11
  import "react-dom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportportal/ui-kit",
3
- "version": "0.0.1-alpha.222",
3
+ "version": "0.0.1-alpha.223",
4
4
  "description": "The UI-kit library for ReportPortal Design System.",
5
5
  "type": "module",
6
6
  "scripts": {