@reportportal/ui-kit 0.0.1-alpha.211 → 0.0.1-alpha.213

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,5 +1,6 @@
1
1
  import { KeyCodes } from '../../common/constants/keyCodes';
2
2
 
3
3
  export declare const DEFAULT_WIDTH_CH = 5;
4
- export declare const MAX_WIDTH_CH = 16;
4
+ export declare const SAFARI_CLIP_FIX_CH = 0.4;
5
+ export declare const MAX_WIDTH_CH: number;
5
6
  export declare const ALLOWED_KEY_CODES: KeyCodes[];
@@ -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-0b931e15.js";
6
+ import { D as x } from "./dropdown-aed51f14.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-6085b8d0.js";
2
- import { r as E } from "./datePicker-6085b8d0.js";
1
+ import { D as t } from "./datePicker-6edddb0b.js";
2
+ import { r as E } from "./datePicker-6edddb0b.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-0b931e15.js";
14
+ import "./dropdown-aed51f14.js";
15
15
  import "react-dom";
16
16
  import "@floating-ui/react-dom";
17
17
  import "downshift";
@@ -1,5 +1,5 @@
1
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 g, useCallback as v, useLayoutEffect as Se, useEffect as F } from "react";
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";
3
3
  import { createPortal as yr } from "react-dom";
4
4
  import { c as Me } from "./bind-06a7ff84.js";
5
5
  import { useFloating as Cr, offset as Ar, flip as Or, size as br, autoUpdate as Dr } from "@floating-ui/react-dom";
@@ -39,9 +39,9 @@ const Rr = (n) => {
39
39
  (n, r) => {
40
40
  const {
41
41
  option: { value: c, disabled: o, hidden: f, label: m, title: C, groupRef: A },
42
- selected: U,
42
+ selected: F,
43
43
  onChange: S,
44
- render: B,
44
+ render: U,
45
45
  highlightHovered: j,
46
46
  onMouseEnter: ne,
47
47
  multiSelect: O,
@@ -56,7 +56,7 @@ const Rr = (n) => {
56
56
  "div",
57
57
  {
58
58
  className: He("dropdown-option", {
59
- selected: U,
59
+ selected: F,
60
60
  disabled: o,
61
61
  hidden: f,
62
62
  hover: j,
@@ -69,14 +69,14 @@ const Rr = (n) => {
69
69
  ref: r,
70
70
  onMouseEnter: ne,
71
71
  children: [
72
- O && /* @__PURE__ */ u(kr, { value: !!U, partiallyChecked: q }),
72
+ O && /* @__PURE__ */ u(kr, { value: !!F, partiallyChecked: q }),
73
73
  /* @__PURE__ */ u(
74
74
  "div",
75
75
  {
76
76
  className: He("single-option", {
77
77
  "sub-option": !!A
78
78
  }),
79
- children: B ? B(n) : m
79
+ children: U ? U(n) : m
80
80
  }
81
81
  )
82
82
  ]
@@ -89,10 +89,10 @@ const Rr = (n) => {
89
89
  p.ARROW_DOWN_KEY_CODE
90
90
  ], Mr = [p.ESCAPE_KEY_CODE, p.TAB_KEY_CODE];
91
91
  var V = /* @__PURE__ */ ((n) => (n.ON_KEY_DOWN = "onKeyDown", n.ON_CLICK = "onClick", n))(V || {});
92
- const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
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
- }, Br = (n, r) => (n % r + r) % r, Ee = (n, r = 0, c = 1) => {
95
+ }, Ur = (n, r) => (n % r + r) % r, Ee = (n, r = 0, c = 1) => {
96
96
  var f;
97
97
  if (n.length === 0)
98
98
  return 0;
@@ -101,7 +101,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
101
101
  const o = n.length;
102
102
  return Ee(
103
103
  n,
104
- Br(r + c, o),
104
+ Ur(r + c, o),
105
105
  c
106
106
  );
107
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) => {
@@ -110,9 +110,9 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
110
110
  }, []), ze = (n) => !n || n.length === 0 ? [] : n.reduce((r, c) => {
111
111
  var o;
112
112
  return c && ((o = c.children) != null && o.length ? r.push(...ze(c.children)) : r.push(c)), r;
113
- }, []), Fe = (n) => {
113
+ }, []), Be = (n) => {
114
114
  var r;
115
- return n ? (r = n.children) != null && r.length ? n.children.reduce((c, o) => (o && c.push(...Fe(o)), c), []) : [n.value] : [];
115
+ return n ? (r = n.children) != null && r.length ? n.children.reduce((c, o) => (o && c.push(...Be(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,
@@ -147,9 +147,9 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
147
147
  onChange: m,
148
148
  onFocus: C,
149
149
  onBlur: A,
150
- mobileDisabled: U,
150
+ mobileDisabled: F,
151
151
  title: S,
152
- touched: B = !1,
152
+ touched: U = !1,
153
153
  icon: j,
154
154
  variant: ne,
155
155
  placeholder: O = "",
@@ -159,10 +159,10 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
159
159
  className: oe,
160
160
  toggleButtonClassName: ae,
161
161
  selectListClassName: H,
162
- isListWidthLimited: Ue = !1,
162
+ isListWidthLimited: Fe = !1,
163
163
  optionAll: ie = { value: "all", label: "All" },
164
164
  isOptionAllVisible: ye = !1,
165
- onSelectAll: Be = () => {
165
+ onSelectAll: Ue = () => {
166
166
  },
167
167
  formatDisplayedValue: le,
168
168
  notScrollable: $ = !1,
@@ -172,34 +172,34 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
172
172
  onClear: Ae = () => {
173
173
  },
174
174
  clearButtonAriaLabel: qe = "Clear selection",
175
- menuPortalRoot: w,
175
+ menuPortalRoot: E,
176
176
  isMultiSelectWithTags: b = !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(""), be = k(null), De = k(null), M = k(null), ce = k(0), de = k(null), ue = k(""), [Qe, J] = ge(null), K = k(null), W = g(() => We(c), [c]), L = g(() => {
180
+ const { transformed: Xe, remaining: Je } = Rr(Ge), [l, X] = ge(!1), [I, Oe] = ge(""), be = k(null), De = 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(() => {
181
181
  if (!b || !I.trim())
182
182
  return W;
183
183
  const e = I.toLowerCase();
184
184
  return W.filter(
185
185
  ({ option: t }) => t.label.toLowerCase().includes(e)
186
186
  );
187
- }, [W, I, b]), E = g(
187
+ }, [W, I, b]), g = w(
188
188
  () => L.map(({ option: e }) => e),
189
189
  [L]
190
- ), Ne = g(
190
+ ), Ne = w(
191
191
  () => W.map(({ option: e }) => e),
192
192
  [W]
193
- ), Q = g(() => L.filter(({ option: e }) => {
193
+ ), Q = 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 = g(() => ze(c), [c]), D = g(
196
+ }).map(({ option: e }) => e), [L]), ve = w(() => ze(c), [c]), D = w(
197
197
  () => ve.map(({ value: e }) => e),
198
198
  [ve]
199
- ), ee = g(() => {
199
+ ), ee = w(() => {
200
200
  const e = /* @__PURE__ */ new Map();
201
201
  return Q.forEach((t) => {
202
- e.set(t.value, Fe(t));
202
+ e.set(t.value, Be(t));
203
203
  }), e;
204
204
  }, [Q]), z = v(
205
205
  (e) => (Q.forEach((t) => {
@@ -207,7 +207,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
207
207
  Ce && i ? e.add(t.value) : e.delete(t.value);
208
208
  }), e),
209
209
  [Q, Ce, ee]
210
- ), T = g(() => !n || !Array.isArray(r) ? /* @__PURE__ */ new Set() : z(new Set(r)), [n, r, z]), he = n ? Array.isArray(r) && r.length > 0 : r || r === !1 || r === 0, er = je && he && !o, rr = v((e) => {
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
211
  ce.current = e.scrollTop;
212
212
  }, []);
213
213
  Se(() => {
@@ -219,12 +219,12 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
219
219
  Ar(5),
220
220
  Or({
221
221
  fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
222
- ...w && {
222
+ ...E && {
223
223
  boundary: document.documentElement,
224
224
  rootBoundary: "viewport"
225
225
  }
226
226
  }),
227
- w ? br({
227
+ E ? br({
228
228
  apply({ rects: e, elements: t }) {
229
229
  const s = e.reference.width;
230
230
  Object.assign(t.floating.style, {
@@ -246,7 +246,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
246
246
  s ? t.add(d) : t.delete(d);
247
247
  });
248
248
  const i = z(t);
249
- m(Array.from(i)), Be();
249
+ m(Array.from(i)), Ue();
250
250
  }, re = v(() => {
251
251
  l || (X(!0), C == null || C());
252
252
  }, [l, C]), y = v(() => {
@@ -276,7 +276,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
276
276
  },
277
277
  [l, y]
278
278
  );
279
- F(() => {
279
+ B(() => {
280
280
  if (!l)
281
281
  return;
282
282
  const e = (t) => {
@@ -304,7 +304,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
304
304
  m(e.value);
305
305
  X((s) => n || !s);
306
306
  }
307
- }, sr = () => E.find(({ value: e }) => e === r), Te = Ur(E, r), {
307
+ }, sr = () => g.find(({ value: e }) => e === r), Te = Fr(g, r), {
308
308
  getToggleButtonProps: or,
309
309
  getLabelProps: ar,
310
310
  getMenuProps: xe,
@@ -312,7 +312,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
312
312
  setHighlightedIndex: x,
313
313
  highlightedIndex: _e
314
314
  } = we({
315
- items: E,
315
+ items: g,
316
316
  itemToString: (e) => (e != null && e.label ? String(e.label) : O) || "",
317
317
  selectedItem: sr(),
318
318
  isOpen: l,
@@ -321,9 +321,9 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
321
321
  onHighlightedIndexChange: (e) => {
322
322
  switch (e.type) {
323
323
  case we.stateChangeTypes.MenuKeyDownArrowUp:
324
- return J(V.ON_KEY_DOWN), x(qr(E, e.highlightedIndex)), e;
324
+ return J(V.ON_KEY_DOWN), x(qr(g, e.highlightedIndex)), e;
325
325
  case we.stateChangeTypes.MenuKeyDownArrowDown:
326
- return J(V.ON_KEY_DOWN), x(jr(E, e.highlightedIndex)), e;
326
+ return J(V.ON_KEY_DOWN), x(jr(g, e.highlightedIndex)), e;
327
327
  default:
328
328
  return e;
329
329
  }
@@ -345,19 +345,19 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
345
345
  },
346
346
  [xe, ke]
347
347
  );
348
- F(() => {
349
- n && l && K.current !== null && K.current >= 0 && K.current < E.length && (x(K.current), K.current = null, requestAnimationFrame(() => {
348
+ B(() => {
349
+ n && l && K.current !== null && K.current >= 0 && K.current < g.length && (x(K.current), K.current = null, requestAnimationFrame(() => {
350
350
  M.current && !$ && M.current.scrollTop(ce.current);
351
351
  }));
352
- }, [n, l, r, E.length, x, $]), F(() => {
352
+ }, [n, l, r, g.length, x, $]), B(() => {
353
353
  l && b && requestAnimationFrame(() => {
354
354
  var e;
355
355
  (e = de.current) == null || e.focus();
356
356
  });
357
- }, [l, b]), F(() => {
357
+ }, [l, b]), B(() => {
358
358
  b && l && I !== ue.current && (ue.current = I, I && x(0));
359
359
  }, [I, b, l]), Se(() => {
360
- if (!l || !w)
360
+ if (!l || !E)
361
361
  return;
362
362
  let e = window.scrollY, t = !0;
363
363
  const s = 300, i = () => {
@@ -376,8 +376,8 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
376
376
  return () => {
377
377
  clearTimeout(a), window.removeEventListener("scroll", d, { capture: !0 });
378
378
  };
379
- }, [l, w]), F(() => {
380
- if (!l || !w)
379
+ }, [l, E]), B(() => {
380
+ if (!l || !E)
381
381
  return;
382
382
  const e = () => {
383
383
  y();
@@ -385,13 +385,13 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
385
385
  return window.addEventListener("resize", e), () => {
386
386
  window.removeEventListener("resize", e);
387
387
  };
388
- }, [l, w, y]);
388
+ }, [l, E, y]);
389
389
  const Re = () => {
390
390
  o || (X((e) => !e), l ? A == null || A() : C == null || C(), J(V.ON_CLICK));
391
- }, pe = g(() => {
391
+ }, pe = w(() => {
392
392
  if (n && Array.isArray(r) && D.length > 0 && D.every((t) => T.has(t)))
393
393
  return ie.label;
394
- const e = E.reduce((t, s) => ((Array.isArray(r) && r.includes(s.value) || s.value === r) && t.push(s.label), t), []);
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
  }, [
397
397
  n,
@@ -399,15 +399,15 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
399
399
  D,
400
400
  T,
401
401
  ie.label,
402
- E,
402
+ g,
403
403
  O
404
- ]), me = g(() => le ? le(pe) : pe, [le, pe]), cr = he && me ? me : void 0, { ref: dr, title: ur } = xr(cr), hr = (e) => {
404
+ ]), me = w(() => le ? le(pe) : pe, [le, pe]), cr = he && me ? me : void 0, { ref: dr, title: ur } = xr(cr), hr = (e) => {
405
405
  const { keyCode: t } = e;
406
406
  $r.includes(t) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !l && (x(Te), re(), J(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 = E[_e];
410
+ const s = g[_e];
411
411
  if (!s)
412
412
  return;
413
413
  n && (K.current = _e), Le(s), n || y();
@@ -502,7 +502,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
502
502
  tags: e,
503
503
  onRemoveTag: t,
504
504
  isShowAllView: !0,
505
- defaultVisibleLines: Fr
505
+ defaultVisibleLines: Br
506
506
  }
507
507
  ),
508
508
  d
@@ -523,8 +523,8 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
523
523
  opened: l,
524
524
  disabled: o,
525
525
  error: f,
526
- touched: B,
527
- "mobile-disabled": U,
526
+ touched: U,
527
+ "mobile-disabled": F,
528
528
  "multi-select-with-tags": b
529
529
  }),
530
530
  onClick: Re,
@@ -578,7 +578,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (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 = w && e ? {
581
+ const e = (i = P.reference.current) == null ? void 0 : i.getBoundingClientRect().width, t = E && e ? {
582
582
  ...Ie,
583
583
  width: `${e}px`,
584
584
  minWidth: `${e}px`,
@@ -591,11 +591,11 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
591
591
  "select-list",
592
592
  {
593
593
  opened: l,
594
- "limited-width": Ue
594
+ "limited-width": Fe
595
595
  },
596
596
  H
597
597
  ),
598
- ...w && { [zr]: "" },
598
+ ...E && { [zr]: "" },
599
599
  ...lr({
600
600
  onKeyDown: fr,
601
601
  ...b && {
@@ -621,7 +621,7 @@ const Wr = 240, zr = "data-dropdown-portal-menu", Fr = 10, Ur = (n, r) => {
621
621
  )
622
622
  }
623
623
  );
624
- return w ? yr(s, w) : s;
624
+ return E ? yr(s, E) : s;
625
625
  })()
626
626
  ]
627
627
  }
package/dist/dropdown.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as r } from "./dropdown-0b931e15.js";
2
- import { a as E } from "./dropdown-0b931e15.js";
1
+ import { D as r } from "./dropdown-aed51f14.js";
2
+ import { a as E } from "./dropdown-aed51f14.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-dom";
@@ -1,12 +1,12 @@
1
- import { jsxs as a, Fragment as V, jsx as r } from "react/jsx-runtime";
2
- import { useRef as W, useId as y, useMemo as B } from "react";
3
- import { c as w } from "./bind-06a7ff84.js";
1
+ import { jsxs as a, Fragment as W, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as y, useId as B, useMemo as w } from "react";
3
+ import { c as v } from "./bind-06a7ff84.js";
4
4
  import { K as e } from "./keyCodes-f63c0e11.js";
5
5
  import { B as D } from "./baseIconButton-251479f7.js";
6
- import { S as v } from "./minus-2857540f.js";
6
+ import { S as H } from "./minus-2857540f.js";
7
7
  import { S as k } from "./plus-199fb2a8.js";
8
- import { FieldLabel as H } from "./fieldLabel.js";
9
- const b = 5, Y = 16, P = [
8
+ import { FieldLabel as P } from "./fieldLabel.js";
9
+ const b = 5, I = 0.4, Y = 16 + I, G = [
10
10
  e.TAB_KEY_CODE,
11
11
  e.BACKSPACE_KEY_CODE,
12
12
  e.ARROW_LEFT_KEY_CODE,
@@ -24,33 +24,33 @@ const b = 5, Y = 16, P = [
24
24
  e.NUM_LOCK_7_KEY_CODE,
25
25
  e.NUM_LOCK_8_KEY_CODE,
26
26
  e.NUM_LOCK_9_KEY_CODE
27
- ], G = "_sign_3v3h5_7", j = "_error_3v3h5_22", z = "_disabled_3v3h5_27", X = "_input_3v3h5_12", $ = {
27
+ ], X = "_sign_3v3h5_7", $ = "_error_3v3h5_22", j = "_disabled_3v3h5_27", z = "_input_3v3h5_12", q = {
28
28
  "field-number": "_field-number_3v3h5_1",
29
- sign: G,
29
+ sign: X,
30
30
  "input-container": "_input-container_3v3h5_12",
31
- error: j,
32
- disabled: z,
31
+ error: $,
32
+ disabled: j,
33
33
  "input-field": "_input-field_3v3h5_38",
34
- input: X,
34
+ input: z,
35
35
  "additional-content": "_additional-content_3v3h5_84",
36
36
  "error-text": "_error-text_3v3h5_88"
37
- }, c = w.bind($), tn = ({
37
+ }, c = v.bind(q), rn = ({
38
38
  value: i = "",
39
- placeholder: I = "0",
39
+ placeholder: L = "0",
40
40
  disabled: t = !1,
41
41
  onChange: l,
42
42
  onFocus: d,
43
43
  onBlur: N,
44
- label: m,
44
+ label: f,
45
45
  postfix: E = "",
46
46
  min: s = 0,
47
47
  max: o = Number.MAX_SAFE_INTEGER,
48
- title: L,
48
+ title: A,
49
49
  error: C,
50
50
  id: h,
51
51
  ...M
52
52
  }) => {
53
- const u = W(null), p = y(), O = (n) => Number.isNaN(n) ? s : n === Number.POSITIVE_INFINITY ? o : n === Number.NEGATIVE_INFINITY || n < s ? s : n > o ? o : n, R = (n) => {
53
+ const u = y(null), m = B(), O = (n) => Number.isNaN(n) ? s : n === Number.POSITIVE_INFINITY ? o : n === Number.NEGATIVE_INFINITY || n < s ? s : n > o ? o : n, R = (n) => {
54
54
  const _ = n.target.value.replace(/^0(?=\d+|^\d)/g, "");
55
55
  if (_ === "") {
56
56
  l("");
@@ -59,26 +59,26 @@ const b = 5, Y = 16, P = [
59
59
  l(+_);
60
60
  }, T = (n) => {
61
61
  N && N(n);
62
- const _ = +n.currentTarget.value, f = O(_);
63
- f !== _ && l(f);
64
- }, A = (n) => {
62
+ const _ = +n.currentTarget.value, p = O(_);
63
+ p !== _ && l(p);
64
+ }, U = (n) => {
65
65
  const { keyCode: _ } = n;
66
- P.includes(_) || (_ < e.NUMBER_START_KEY_CODE || _ > e.NUMBER_END_KEY_CODE || n.shiftKey) && n.preventDefault();
67
- }, U = () => {
66
+ G.includes(_) || (_ < e.NUMBER_START_KEY_CODE || _ > e.NUMBER_END_KEY_CODE || n.shiftKey) && n.preventDefault();
67
+ }, F = () => {
68
68
  const _ = O(+i) - 1;
69
69
  _ >= s && _ <= o && l(_);
70
70
  }, g = () => {
71
71
  const _ = O(+i) + 1;
72
72
  _ >= s && _ <= o && l(_);
73
- }, K = I + E, F = B(() => {
73
+ }, K = L + E, S = w(() => {
74
74
  let n = (String(i) || K).length;
75
- return E && !i && (n += 1), n > Y ? `${Y}ch` : `${n || b}ch`;
76
- }, [K, E, i]), S = () => {
75
+ return E && !i && (n += 1), n ? n > Y ? `${Y}ch` : `${n + I}ch` : `${b}ch`;
76
+ }, [K, E, i]), V = () => {
77
77
  u && u.current && u.current.focus(), d && d();
78
78
  };
79
- return /* @__PURE__ */ a(V, { children: [
79
+ return /* @__PURE__ */ a(W, { children: [
80
80
  /* @__PURE__ */ a("div", { className: c("field-number", { disabled: t }), children: [
81
- m && /* @__PURE__ */ r(H, { htmlFor: h ?? p, children: m }),
81
+ f && /* @__PURE__ */ r(P, { htmlFor: h ?? m, children: f }),
82
82
  /* @__PURE__ */ a(
83
83
  "div",
84
84
  {
@@ -86,22 +86,22 @@ const b = 5, Y = 16, P = [
86
86
  error: C,
87
87
  disabled: t
88
88
  }),
89
- title: L,
89
+ title: A,
90
90
  children: [
91
91
  /* @__PURE__ */ r(
92
92
  D,
93
93
  {
94
94
  className: c("sign", "minus"),
95
95
  disabled: t,
96
- onClick: U,
97
- children: /* @__PURE__ */ r(v, {})
96
+ onClick: F,
97
+ children: /* @__PURE__ */ r(H, {})
98
98
  }
99
99
  ),
100
- /* @__PURE__ */ a("span", { className: c("input-field", { disabled: t }), onClick: S, children: [
100
+ /* @__PURE__ */ a("span", { className: c("input-field", { disabled: t }), onClick: V, children: [
101
101
  /* @__PURE__ */ r(
102
102
  "input",
103
103
  {
104
- id: h ?? p,
104
+ id: h ?? m,
105
105
  ref: u,
106
106
  className: c("input"),
107
107
  type: "number",
@@ -110,11 +110,11 @@ const b = 5, Y = 16, P = [
110
110
  disabled: t,
111
111
  min: s,
112
112
  max: o,
113
- onKeyDown: t ? void 0 : A,
113
+ onKeyDown: t ? void 0 : U,
114
114
  onChange: t ? void 0 : R,
115
115
  onFocus: t ? void 0 : d,
116
116
  onBlur: t ? void 0 : T,
117
- style: { width: F },
117
+ style: { width: S },
118
118
  ...M
119
119
  }
120
120
  ),
@@ -137,5 +137,5 @@ const b = 5, Y = 16, P = [
137
137
  ] });
138
138
  };
139
139
  export {
140
- tn as F
140
+ rn as F
141
141
  };
@@ -1,4 +1,4 @@
1
- import { F as m } from "./fieldNumber-dd8e6902.js";
1
+ import { F as m } from "./fieldNumber-b4aa4d7e.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
package/dist/index.js CHANGED
@@ -9,11 +9,11 @@ import { BulkPanel as H } from "./bulkPanel.js";
9
9
  import { B as V } from "./button-7ab874f3.js";
10
10
  import { C as W } from "./checkbox-76aa8f97.js";
11
11
  import { Chip as j } from "./chip.js";
12
- import { D as K } from "./datePicker-6085b8d0.js";
12
+ import { D as K } from "./datePicker-6edddb0b.js";
13
13
  import "react-datepicker";
14
- import { D as Y } from "./dropdown-0b931e15.js";
14
+ import { D as Y } from "./dropdown-aed51f14.js";
15
15
  import { FieldLabel as $ } from "./fieldLabel.js";
16
- import { F as ro } from "./fieldNumber-dd8e6902.js";
16
+ import { F as ro } from "./fieldNumber-b4aa4d7e.js";
17
17
  import { F as to } from "./fieldText-1749da7a.js";
18
18
  import { F as no } from "./fieldTextFlex-2f51c173.js";
19
19
  import { FileDropArea as mo } from "./fileDropArea.js";
package/dist/modal.js CHANGED
@@ -7,7 +7,7 @@ import { u as q } from "./useOnClickOutside-8f7d68a1.js";
7
7
  import "react-dnd";
8
8
  import "react-dnd-html5-backend";
9
9
  import { u as J } from "./useWindowResize-a7e1ac92.js";
10
- import { a as Q } from "./dropdown-0b931e15.js";
10
+ import { a as Q } from "./dropdown-aed51f14.js";
11
11
  import { K as V } from "./keyCodes-f63c0e11.js";
12
12
  import { B as C } from "./button-7ab874f3.js";
13
13
  import { Tooltip as Z } 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-0b931e15.js";
8
+ import { a as O } from "./dropdown-aed51f14.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.211",
3
+ "version": "0.0.1-alpha.213",
4
4
  "description": "The UI-kit library for ReportPortal Design System.",
5
5
  "type": "module",
6
6
  "scripts": {