@reportportal/ui-kit 0.0.1-alpha.256 → 0.0.1-alpha.257

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.
package/dist/bulkPanel.js CHANGED
@@ -14,6 +14,7 @@ import { Tooltip as te } from "./tooltip.js";
14
14
  import { S as ie } from "./chevronDownDropdown-0260bb66.js";
15
15
  import { S as se } from "./warning-537ead32.js";
16
16
  import "./close-4d480ef7.js";
17
+ import "./useEllipsisTitle-462fa254.js";
17
18
  import "@floating-ui/react";
18
19
  import "./floatingUi-46f5b896.js";
19
20
  const ae = "_expanded_ue1t9_6", oe = "_header_ue1t9_32", ce = "_tabs_ue1t9_119", re = "_tab_ue1t9_119", de = "_active_ue1t9_146", me = "_item_ue1t9_99", pe = {
@@ -54,7 +55,7 @@ const ae = "_expanded_ue1t9_6", oe = "_header_ue1t9_32", ce = "_tabs_ue1t9_119",
54
55
  }, u = {
55
56
  ELIGIBLE: "eligible",
56
57
  INELIGIBLE: "ineligible"
57
- }, Ge = ({
58
+ }, Pe = ({
58
59
  items: t,
59
60
  actions: $ = [],
60
61
  captions: D,
@@ -221,5 +222,5 @@ const ae = "_expanded_ue1t9_6", oe = "_header_ue1t9_32", ce = "_tabs_ue1t9_119",
221
222
  return o && f ? J(y, f) : y;
222
223
  };
223
224
  export {
224
- Ge as BulkPanel
225
+ Pe as BulkPanel
225
226
  };
package/dist/chip.js CHANGED
@@ -1,72 +1,87 @@
1
- import { jsxs as k, Fragment as w, jsx as n } from "react/jsx-runtime";
2
- import { c as N } from "./bind-06a7ff84.js";
1
+ import { jsxs as D, Fragment as w, jsx as s } from "react/jsx-runtime";
2
+ import { c as j } from "./bind-06a7ff84.js";
3
3
  import "react";
4
- import { S as x } from "./close-4d480ef7.js";
5
- const D = "_chip_a59ru_16", j = "_clickable_a59ru_34", K = "_disabled_a59ru_40", S = "_label_a59ru_51", v = "_error_a59ru_82", E = "_warning_a59ru_87", F = "_link_a59ru_91", I = {
6
- chip: D,
7
- clickable: j,
8
- disabled: K,
9
- label: S,
4
+ import "react-dnd";
5
+ import "react-dnd-html5-backend";
6
+ import { u as E } from "./useEllipsisTitle-462fa254.js";
7
+ import { S as K } from "./close-4d480ef7.js";
8
+ const S = "_chip_a59ru_16", T = "_clickable_a59ru_34", v = "_disabled_a59ru_40", F = "_label_a59ru_51", I = "_error_a59ru_82", P = "_warning_a59ru_87", q = "_link_a59ru_91", z = {
9
+ chip: S,
10
+ clickable: T,
11
+ disabled: v,
12
+ label: F,
10
13
  "remove-button": "_remove-button_a59ru_57",
11
- error: v,
12
- warning: E,
13
- link: F
14
- }, c = N.bind(I), A = ({
15
- children: u,
16
- variant: b = "default",
17
- link: s,
14
+ error: I,
15
+ warning: P,
16
+ link: q
17
+ }, n = j.bind(z), Q = ({
18
+ children: b,
19
+ variant: f = "default",
20
+ link: l,
18
21
  onClick: t,
19
- onRemove: e,
20
- className: p,
21
- maxWidth: l,
22
- title: f,
23
- disabled: a = !1
22
+ onRemove: a,
23
+ className: m,
24
+ maxWidth: c,
25
+ title: o,
26
+ showTitleOnOverflow: i = !1,
27
+ disabled: e = !1
24
28
  }) => {
25
- const o = !!t && !a, h = o ? "button" : void 0, m = o ? 0 : void 0, i = c("chip", b, p, {
26
- disabled: a,
27
- clickable: !!t || !!s,
28
- removable: !!e
29
- }), d = (r) => {
30
- r.stopPropagation(), r.preventDefault(), e == null || e(r);
31
- }, g = (r) => {
32
- a || t == null || t(r);
33
- }, y = (r) => {
34
- a || (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click());
35
- }, _ = /* @__PURE__ */ k(w, { children: [
36
- /* @__PURE__ */ n("span", { className: c("label"), style: l ? { maxWidth: l } : void 0, title: f, children: u }),
37
- e && !a && /* @__PURE__ */ n(
29
+ const { ref: h, title: d } = E(
30
+ i ? o : void 0
31
+ ), _ = !!t && !e, g = _ ? "button" : void 0, y = _ ? 0 : void 0, u = n("chip", f, m, {
32
+ disabled: e,
33
+ clickable: !!t || !!l,
34
+ removable: !!a
35
+ }), k = (r) => {
36
+ r.stopPropagation(), r.preventDefault(), a == null || a(r);
37
+ }, N = (r) => {
38
+ e || t == null || t(r);
39
+ }, x = (r) => {
40
+ e || (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click());
41
+ }, p = /* @__PURE__ */ D(w, { children: [
42
+ /* @__PURE__ */ s(
43
+ "span",
44
+ {
45
+ ref: h,
46
+ className: n("label"),
47
+ style: c ? { maxWidth: c } : void 0,
48
+ title: i ? d : o,
49
+ children: b
50
+ }
51
+ ),
52
+ a && !e && /* @__PURE__ */ s(
38
53
  "button",
39
54
  {
40
55
  type: "button",
41
- className: c("remove-button"),
42
- onClick: d,
56
+ className: n("remove-button"),
57
+ onClick: k,
43
58
  "aria-label": "Remove",
44
- children: /* @__PURE__ */ n(x, {})
59
+ children: /* @__PURE__ */ s(K, {})
45
60
  }
46
61
  )
47
62
  ] });
48
- return s && !a ? /* @__PURE__ */ n(
63
+ return l && !e ? /* @__PURE__ */ s(
49
64
  "a",
50
65
  {
51
- href: s,
52
- className: i,
66
+ href: l,
67
+ className: u,
53
68
  onClick: t,
54
69
  target: "_blank",
55
70
  rel: "noopener noreferrer",
56
- children: _
71
+ children: p
57
72
  }
58
- ) : /* @__PURE__ */ n(
73
+ ) : /* @__PURE__ */ s(
59
74
  "span",
60
75
  {
61
- className: i,
62
- onClick: g,
63
- onKeyDown: y,
64
- role: h,
65
- tabIndex: m,
66
- children: _
76
+ className: u,
77
+ onClick: N,
78
+ onKeyDown: x,
79
+ role: g,
80
+ tabIndex: y,
81
+ children: p
67
82
  }
68
83
  );
69
84
  };
70
85
  export {
71
- A as Chip
86
+ Q as Chip
72
87
  };
@@ -10,6 +10,7 @@ export interface ChipProps {
10
10
  className?: string;
11
11
  maxWidth?: number;
12
12
  title?: string;
13
+ showTitleOnOverflow?: boolean;
13
14
  disabled?: boolean;
14
15
  }
15
- export declare const Chip: ({ children, variant, link, onClick, onRemove, className, maxWidth, title, disabled, }: ChipProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const Chip: ({ children, variant, link, onClick, onRemove, className, maxWidth, title, showTitleOnOverflow, disabled, }: ChipProps) => import("react/jsx-runtime").JSX.Element;
package/dist/issueList.js CHANGED
@@ -4,6 +4,9 @@ import { c as q } from "./bind-06a7ff84.js";
4
4
  import { Chip as F } from "./chip.js";
5
5
  import { Tooltip as B } from "./tooltip.js";
6
6
  import { i as J } from "./isEmpty-ccacb5ff.js";
7
+ import "react-dnd";
8
+ import "react-dnd-html5-backend";
9
+ import "./useEllipsisTitle-462fa254.js";
7
10
  import "./close-4d480ef7.js";
8
11
  import "react-dom";
9
12
  import "@floating-ui/react";
@@ -17,10 +20,10 @@ const K = 100, R = 8, Q = 32, X = 60, Z = 360, $ = "_expanded_ypfdt_25", C = "_i
17
20
  "tooltip-wrapper": "_tooltip-wrapper_ypfdt_50",
18
21
  hidden: et,
19
22
  ellipsis: nt
20
- }, a = q.bind(rt), ht = ({
23
+ }, a = q.bind(rt), yt = ({
21
24
  issues: n,
22
25
  isExpanded: W = !1,
23
- onIssueClick: i,
26
+ onIssueClick: s,
24
27
  onIssueRemove: T,
25
28
  onCounterClick: d,
26
29
  renderTooltip: L,
@@ -30,23 +33,23 @@ const K = 100, R = 8, Q = 32, X = 60, Z = 360, $ = "_expanded_ypfdt_25", C = "_i
30
33
  const p = v(null), x = v(null), O = v(/* @__PURE__ */ new Map()), D = v(/* @__PURE__ */ new Map()), [M, c] = E(n.length), [o, k] = E(W), [w, l] = E(!1), z = N((t, r) => {
31
34
  r && O.current.set(t, r);
32
35
  }, []), f = N(() => {
33
- var _;
36
+ var m;
34
37
  const t = p.current;
35
38
  if (!t || n.length === 0)
36
39
  return;
37
- const r = t.offsetWidth, u = ((_ = x.current) == null ? void 0 : _.offsetWidth) || Q, h = n.map((e, m) => {
40
+ const r = t.offsetWidth, u = ((m = x.current) == null ? void 0 : m.offsetWidth) || Q, h = n.map((e, _) => {
38
41
  const g = O.current.get(e.key);
39
42
  if (!g)
40
43
  return 0;
41
- const s = g.offsetWidth;
42
- return m === 0 && w ? D.current.get(e.key) || s : (D.current.set(e.key, s), s);
44
+ const i = g.offsetWidth;
45
+ return _ === 0 && w ? D.current.get(e.key) || i : (D.current.set(e.key, i), i);
43
46
  });
44
- if (h.reduce((e, m) => e + m, 0) + (n.length - 1) * R <= r) {
47
+ if (h.reduce((e, _) => e + _, 0) + (n.length - 1) * R <= r) {
45
48
  l(!1), c(n.length);
46
49
  return;
47
50
  }
48
51
  for (let e = n.length - 1; e >= 1; e--) {
49
- if (h.slice(0, e).reduce((s, Y) => s + Y, 0) + e * R + u <= r) {
52
+ if (h.slice(0, e).reduce((i, Y) => i + Y, 0) + e * R + u <= r) {
50
53
  c(e), l(!1);
51
54
  return;
52
55
  }
@@ -75,9 +78,9 @@ const K = 100, R = 8, Q = 32, X = 60, Z = 360, $ = "_expanded_ypfdt_25", C = "_i
75
78
  k(!0), c(n.length), l(!1), d == null || d();
76
79
  }, [n.length, d]), P = N(
77
80
  (t) => {
78
- i == null || i(t);
81
+ s == null || s(t);
79
82
  },
80
- [i]
83
+ [s]
81
84
  );
82
85
  if (J(n))
83
86
  return null;
@@ -87,11 +90,11 @@ const K = 100, R = 8, Q = 32, X = 60, Z = 360, $ = "_expanded_ypfdt_25", C = "_i
87
90
  {
88
91
  variant: "link",
89
92
  link: t.link,
90
- onClick: i ? () => P(t) : void 0,
93
+ onClick: s ? () => P(t) : void 0,
91
94
  onRemove: T ? () => T(t) : void 0,
92
95
  children: t.name
93
96
  }
94
- ), _ = L ? /* @__PURE__ */ y(
97
+ ), m = L ? /* @__PURE__ */ y(
95
98
  B,
96
99
  {
97
100
  content: L(t),
@@ -107,7 +110,7 @@ const K = 100, R = 8, Q = 32, X = 60, Z = 360, $ = "_expanded_ypfdt_25", C = "_i
107
110
  {
108
111
  ref: (e) => z(t.key, e),
109
112
  className: a("issue", { hidden: u, ellipsis: h }),
110
- children: _
113
+ children: m
111
114
  },
112
115
  t.key
113
116
  );
@@ -121,5 +124,5 @@ const K = 100, R = 8, Q = 32, X = 60, Z = 360, $ = "_expanded_ypfdt_25", C = "_i
121
124
  ] });
122
125
  };
123
126
  export {
124
- ht as IssueList
127
+ yt as IssueList
125
128
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportportal/ui-kit",
3
- "version": "0.0.1-alpha.256",
3
+ "version": "0.0.1-alpha.257",
4
4
  "description": "The UI-kit library for ReportPortal Design System.",
5
5
  "type": "module",
6
6
  "scripts": {