@reportportal/ui-kit 0.0.1-alpha.252 → 0.0.1-alpha.254

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/modal.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx as e, jsxs as d, Fragment as F } from "react/jsx-runtime";
2
- import { useState as y, useRef as G, useCallback as M, useEffect as x, useMemo as U } from "react";
1
+ import { jsx as e, jsxs as d, Fragment as W } from "react/jsx-runtime";
2
+ import { useState as T, useRef as j, useCallback as C, useEffect as M, useMemo as U } from "react";
3
3
  import { Scrollbars as X } from "rc-scrollbars";
4
4
  import { AnimatePresence as Y, motion as V } from "framer-motion";
5
5
  import { c as b } from "./bind-06a7ff84.js";
@@ -7,14 +7,18 @@ import { u as Z } from "./useOnClickOutside-8f7d68a1.js";
7
7
  import "react-dnd";
8
8
  import "react-dnd-html5-backend";
9
9
  import { u as q } from "./useWindowResize-a7e1ac92.js";
10
- import { A as J } from "./constants-85822a6b.js";
11
- import { a as Q } from "./dropdown-d2a05471.js";
12
- import { K as ee } from "./keyCodes-f63c0e11.js";
13
- import { B as R } from "./button-7ab874f3.js";
14
- import { Tooltip as te } from "./tooltip.js";
15
- import { B as oe } from "./baseIconButton-251479f7.js";
16
- import { S as ne } from "./close-4d480ef7.js";
10
+ import { K as J } from "./keyCodes-f63c0e11.js";
11
+ import { B as x } from "./button-7ab874f3.js";
12
+ import { Tooltip as Q } from "./tooltip.js";
13
+ import { B as ee } from "./baseIconButton-251479f7.js";
14
+ import { S as te } from "./close-4d480ef7.js";
15
+ import { M as oe } from "./constants-7319a394.js";
16
+ import { N as qe } from "./constants-7319a394.js";
17
17
  import "react-dom";
18
+ import "@floating-ui/react";
19
+ import "./floatingUi-46f5b896.js";
20
+ import "./constants-85822a6b.js";
21
+ import "./dropdown-d2a05471.js";
18
22
  import "@floating-ui/react-dom";
19
23
  import "downshift";
20
24
  import "./clear-53660571.js";
@@ -24,149 +28,147 @@ import "./adaptiveTagList.js";
24
28
  import "./isEmpty-ccacb5ff.js";
25
29
  import "./useEllipsisTitle-462fa254.js";
26
30
  import "./checkbox-76aa8f97.js";
27
- import "@floating-ui/react";
28
- import "./floatingUi-46f5b896.js";
29
- const ae = {
31
+ const ne = {
30
32
  "modal-content": "_modal-content_ppzcb_1"
31
- }, ie = b.bind(ae), C = ({ children: o }) => /* @__PURE__ */ e("div", { className: ie("modal-content"), children: o }), se = {
33
+ }, ae = b.bind(ne), I = ({ children: o }) => /* @__PURE__ */ e("div", { className: ae("modal-content"), children: o }), ie = {
32
34
  "buttons-block": "_buttons-block_1mwne_1",
33
35
  "button-container": "_button-container_1mwne_7",
34
36
  "modal-footer": "_modal-footer_1mwne_12",
35
37
  "with-extra-node": "_with-extra-node_1mwne_19",
36
38
  "size-small": "_size-small_1mwne_23"
37
- }, f = b.bind(se), le = ({
39
+ }, f = b.bind(ie), se = ({
38
40
  footerNode: o,
39
41
  closeHandler: n,
40
42
  okButton: i,
41
- cancelButton: u,
43
+ cancelButton: p,
42
44
  size: s
43
45
  }) => {
44
- const { tooltipNode: p, ...m } = i || {}, v = () => {
45
- const _ = /* @__PURE__ */ e(R, { adjustWidthOn: s === "small" ? "parent" : "min-width", ...m });
46
- return p ? /* @__PURE__ */ e(te, { content: p, placement: "top", width: 270, children: _ }) : _;
46
+ const { tooltipNode: u, ...m } = i || {}, O = () => {
47
+ const _ = /* @__PURE__ */ e(x, { adjustWidthOn: s === "small" ? "parent" : "min-width", ...m });
48
+ return u ? /* @__PURE__ */ e(Q, { content: u, placement: "top", width: 270, children: _ }) : _;
47
49
  };
48
50
  return /* @__PURE__ */ d("div", { className: f("modal-footer", { "with-extra-node": o, [`size-${s}`]: s }), children: [
49
51
  o && o,
50
52
  /* @__PURE__ */ d("div", { className: f("buttons-block"), children: [
51
- u && /* @__PURE__ */ e("div", { className: f("button-container"), children: /* @__PURE__ */ e(
52
- R,
53
+ p && /* @__PURE__ */ e("div", { className: f("button-container"), children: /* @__PURE__ */ e(
54
+ x,
53
55
  {
54
56
  variant: "ghost",
55
57
  adjustWidthOn: s === "small" ? "parent" : "min-width",
56
58
  onClick: n,
57
- ...u
59
+ ...p
58
60
  }
59
61
  ) }),
60
- i && /* @__PURE__ */ e("div", { className: f("button-container"), children: v() })
62
+ i && /* @__PURE__ */ e("div", { className: f("button-container"), children: O() })
61
63
  ] })
62
64
  ] });
63
- }, re = {
65
+ }, le = {
64
66
  "modal-header": "_modal-header_w4aaf_1",
65
67
  "width-description": "_width-description_w4aaf_10",
66
68
  "modal-header-content": "_modal-header-content_w4aaf_14",
67
69
  "modal-title": "_modal-title_w4aaf_20",
68
70
  "close-modal-icon": "_close-modal-icon_w4aaf_29"
69
- }, w = b.bind(re), ce = ({ title: o, onClose: n, withDescription: i = !1 }) => /* @__PURE__ */ d("div", { className: w("modal-header", { "width-description": i }), children: [
71
+ }, w = b.bind(le), re = ({ title: o, onClose: n, withDescription: i = !1 }) => /* @__PURE__ */ d("div", { className: w("modal-header", { "width-description": i }), children: [
70
72
  /* @__PURE__ */ e("div", { className: w("modal-header-content"), children: o && /* @__PURE__ */ e("div", { className: w("modal-title"), children: o }) }),
71
- /* @__PURE__ */ e(oe, { className: w("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(ne, {}) })
72
- ] }), de = "_modal_35896_1", me = "_description_35896_43", _e = {
73
- modal: de,
73
+ /* @__PURE__ */ e(ee, { className: w("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(te, {}) })
74
+ ] }), ce = "_modal_35896_1", de = "_description_35896_43", me = {
75
+ modal: ce,
74
76
  "overlay-default": "_overlay-default_35896_12",
75
77
  "overlay-light-cyan": "_overlay-light-cyan_35896_16",
76
78
  "scrolling-content": "_scrolling-content_35896_20",
77
79
  "modal-window": "_modal-window_35896_26",
78
- description: me,
80
+ description: de,
79
81
  "scrollable-wrapper": "_scrollable-wrapper_35896_54",
80
82
  "scrollable-content": "_scrollable-content_35896_58",
81
83
  "size-default": "_size-default_35896_62",
82
84
  "size-small": "_size-small_35896_74",
83
85
  "size-large": "_size-large_35896_86"
84
- }, c = b.bind(_e), ue = 0.9, pe = 32 + 24, he = 32 + 8, fe = 36 + 16, we = 32 * 2, be = "auto", k = ({ style: o, ...n }) => /* @__PURE__ */ e("div", { ...n, style: { ...o, zIndex: be } }), Ye = ({
86
+ }, c = b.bind(me), _e = 0.9, pe = 32 + 24, ue = 32 + 8, he = 36 + 16, fe = 32 * 2, we = "auto", R = ({ style: o, ...n }) => /* @__PURE__ */ e("div", { ...n, style: { ...o, zIndex: we } }), Ye = ({
85
87
  title: o,
86
88
  children: n,
87
89
  footerNode: i,
88
- okButton: u,
90
+ okButton: p,
89
91
  cancelButton: s,
90
- className: p,
92
+ className: u,
91
93
  size: m = "default",
92
- onClose: v = () => {
94
+ onClose: O = () => {
93
95
  },
94
96
  overlay: _ = "default",
95
- zIndex: D = 2,
96
- allowCloseOutside: S = !0,
97
- scrollable: z = !1,
98
- withoutFooter: N = !1,
99
- createFooter: A = null,
97
+ zIndex: S = 2,
98
+ allowCloseOutside: k = !0,
99
+ scrollable: D = !1,
100
+ withoutFooter: y = !1,
101
+ createFooter: E = null,
100
102
  description: l = null
101
103
  }) => {
102
- const [O, E] = y(!1), [I, L] = y(0), [$, P] = y(!1), a = G(null), H = q().height, B = H * ue, g = (H - I) / 2, W = () => {
103
- let t = B - we;
104
- return N || (t = t - fe), l ? t = t - he : t = t - pe, t;
105
- }, r = M(() => {
106
- E(!1);
107
- }, []), T = M(
104
+ const [v, H] = T(!1), [L, z] = T(0), [$, B] = T(!1), a = j(null), A = q().height, K = A * _e, g = (A - L) / 2, P = () => {
105
+ let t = K - fe;
106
+ return y || (t = t - he), l ? t = t - ue : t = t - pe, t;
107
+ }, r = C(() => {
108
+ H(!1);
109
+ }, []), N = C(
108
110
  (t) => {
109
111
  const { keyCode: h } = t;
110
- h === ee.ESCAPE_KEY_CODE && r();
112
+ h === J.ESCAPE_KEY_CODE && r();
111
113
  },
112
114
  [r]
113
- ), K = () => {
115
+ ), F = () => {
114
116
  var t;
115
- $ || ((t = a.current) == null || t.focus(), P(!0));
117
+ $ || ((t = a.current) == null || t.focus(), B(!0));
116
118
  };
117
- x(() => {
118
- if (!O || !a.current)
119
+ M(() => {
120
+ if (!v || !a.current)
119
121
  return;
120
122
  const t = () => {
121
- a.current && L(a.current.clientHeight);
123
+ a.current && z(a.current.clientHeight);
122
124
  };
123
125
  if (t(), typeof ResizeObserver > "u")
124
126
  return;
125
127
  const h = new ResizeObserver(t);
126
128
  return h.observe(a.current), () => h.disconnect();
127
- }, [O]), x(() => (E(!0), document.addEventListener("keydown", T, !1), () => document.removeEventListener("keydown", T, !1)), [T]);
128
- const j = U(
129
+ }, [v]), M(() => (H(!0), document.addEventListener("keydown", N, !1), () => document.removeEventListener("keydown", N, !1)), [N]);
130
+ const G = U(
129
131
  () => ({
130
- ignoreSelectors: [`[${Q}]`, `[${J}]`]
132
+ ignoreSelectors: oe
131
133
  }),
132
134
  []
133
135
  );
134
- return Z(a, S ? r : void 0, j), /* @__PURE__ */ e(Y, { onExitComplete: v, children: O && /* @__PURE__ */ e("div", { className: c("modal", { [`overlay-${_}`]: _ }), style: { zIndex: D }, children: /* @__PURE__ */ d(
136
+ return Z(a, k ? r : void 0, G), /* @__PURE__ */ e(Y, { onExitComplete: O, children: v && /* @__PURE__ */ e("div", { className: c("modal", { [`overlay-${_}`]: _ }), style: { zIndex: S }, children: /* @__PURE__ */ d(
135
137
  V.div,
136
138
  {
137
- className: c("modal-window", { [`size-${m}`]: m }, p),
139
+ className: c("modal-window", { [`size-${m}`]: m }, u),
138
140
  ref: a,
139
141
  tabIndex: 0,
140
142
  initial: { opacity: 0, marginTop: -g },
141
143
  animate: { opacity: 1, marginTop: g },
142
144
  exit: { opacity: 0, marginTop: -g },
143
145
  transition: { duration: 0.3 },
144
- onAnimationStart: K,
146
+ onAnimationStart: F,
145
147
  children: [
146
- /* @__PURE__ */ e(ce, { title: o, onClose: r, withDescription: !!l }),
147
- z ? /* @__PURE__ */ e("div", { className: c("scrollable-wrapper"), children: /* @__PURE__ */ e(
148
+ /* @__PURE__ */ e(re, { title: o, onClose: r, withDescription: !!l }),
149
+ D ? /* @__PURE__ */ e("div", { className: c("scrollable-wrapper"), children: /* @__PURE__ */ e(
148
150
  X,
149
151
  {
150
152
  autoHeight: !0,
151
- autoHeightMax: W(),
153
+ autoHeightMax: P(),
152
154
  hideTracksWhenNotNeeded: !0,
153
- renderTrackHorizontal: k,
154
- renderTrackVertical: k,
155
+ renderTrackHorizontal: R,
156
+ renderTrackVertical: R,
155
157
  children: /* @__PURE__ */ d("div", { className: c("scrollable-content"), children: [
156
158
  l && /* @__PURE__ */ e("span", { className: c("description"), children: l }),
157
- /* @__PURE__ */ e(C, { children: n })
159
+ /* @__PURE__ */ e(I, { children: n })
158
160
  ] })
159
161
  }
160
- ) }) : /* @__PURE__ */ d(F, { children: [
162
+ ) }) : /* @__PURE__ */ d(W, { children: [
161
163
  l && /* @__PURE__ */ e("span", { className: c("description"), children: l }),
162
- /* @__PURE__ */ e(C, { children: n })
164
+ /* @__PURE__ */ e(I, { children: n })
163
165
  ] }),
164
- !N && (A ? A(r) : /* @__PURE__ */ e(
165
- le,
166
+ !y && (E ? E(r) : /* @__PURE__ */ e(
167
+ se,
166
168
  {
167
169
  size: m,
168
170
  footerNode: i,
169
- okButton: u,
171
+ okButton: p,
170
172
  cancelButton: s,
171
173
  closeHandler: r
172
174
  }
@@ -178,7 +180,8 @@ const ae = {
178
180
  };
179
181
  export {
180
182
  Ye as Modal,
181
- C as ModalContent,
182
- le as ModalFooter,
183
- ce as ModalHeader
183
+ I as ModalContent,
184
+ se as ModalFooter,
185
+ re as ModalHeader,
186
+ qe as NOTIFICATION_PORTAL_ATTR
184
187
  };
package/dist/sidePanel.js CHANGED
@@ -1,13 +1,14 @@
1
- import { jsxs as a, jsx as i, Fragment as D } from "react/jsx-runtime";
2
- import { useId as I, useRef as K, useMemo as P, useEffect as $ } from "react";
3
- import { c as A } from "./bind-06a7ff84.js";
4
- import { K as B } from "./keyCodes-f63c0e11.js";
5
- import { u as L } from "./useOnClickOutside-8f7d68a1.js";
1
+ import { jsxs as a, jsx as i, Fragment as x } from "react/jsx-runtime";
2
+ import { useId as A, useRef as O, useMemo as P, useEffect as S } from "react";
3
+ import { c as $ } from "./bind-06a7ff84.js";
4
+ import { K as D } from "./keyCodes-f63c0e11.js";
5
+ import { u as K } from "./useOnClickOutside-8f7d68a1.js";
6
6
  import "react-dnd";
7
7
  import "react-dnd-html5-backend";
8
- import { a as O } from "./dropdown-d2a05471.js";
9
- import { S as T } from "./close-4d480ef7.js";
10
- import { B as j } from "./baseIconButton-251479f7.js";
8
+ import { a as L } from "./dropdown-d2a05471.js";
9
+ import { N as B } from "./constants-7319a394.js";
10
+ import { S as j } from "./close-4d480ef7.js";
11
+ import { B as w } from "./baseIconButton-251479f7.js";
11
12
  import "react-dom";
12
13
  import "@floating-ui/react-dom";
13
14
  import "downshift";
@@ -23,9 +24,10 @@ import "./checkbox-76aa8f97.js";
23
24
  import "./tooltip.js";
24
25
  import "@floating-ui/react";
25
26
  import "./floatingUi-46f5b896.js";
26
- const w = "_active_5ebdz_11", M = "_compact_5ebdz_62", F = "_header_5ebdz_58", H = "_title_5ebdz_88", U = "_description_5ebdz_99", W = "_content_5ebdz_108", Y = "_footer_5ebdz_115", q = "_divider_5ebdz_121", G = {
27
+ import "./constants-85822a6b.js";
28
+ const F = "_active_5ebdz_11", M = "_compact_5ebdz_62", H = "_header_5ebdz_58", U = "_title_5ebdz_88", W = "_description_5ebdz_99", Y = "_content_5ebdz_108", q = "_footer_5ebdz_115", G = "_divider_5ebdz_121", J = {
27
29
  "side-panel-overlay": "_side-panel-overlay_5ebdz_1",
28
- active: w,
30
+ active: F,
29
31
  "overlay-default": "_overlay-default_5ebdz_16",
30
32
  "overlay-light-cyan": "_overlay-light-cyan_5ebdz_20",
31
33
  "side-panel": "_side-panel_5ebdz_1",
@@ -33,21 +35,21 @@ const w = "_active_5ebdz_11", M = "_compact_5ebdz_62", F = "_header_5ebdz_58", H
33
35
  "side-left": "_side-left_5ebdz_50",
34
36
  "header-section": "_header-section_5ebdz_58",
35
37
  compact: M,
36
- header: F,
38
+ header: H,
37
39
  "header-content": "_header-content_5ebdz_78",
38
40
  "close-button": "_close-button_5ebdz_82",
39
- title: H,
40
- description: U,
41
- content: W,
42
- footer: Y,
43
- divider: q
44
- }, e = A.bind(G), ze = ({
41
+ title: U,
42
+ description: W,
43
+ content: Y,
44
+ footer: q,
45
+ divider: G
46
+ }, e = $.bind(J), ge = ({
45
47
  className: b,
46
48
  title: d,
47
- descriptionComponent: o,
48
- headerComponent: c,
49
+ descriptionComponent: s,
50
+ headerComponent: o,
49
51
  contentClassName: u,
50
- contentComponent: s,
52
+ contentComponent: c,
51
53
  footerComponent: l,
52
54
  top: n = 0,
53
55
  side: z = "right",
@@ -59,30 +61,30 @@ const w = "_active_5ebdz_11", M = "_compact_5ebdz_62", F = "_header_5ebdz_58", H
59
61
  allowCloseOutside: N = !0,
60
62
  overlayClassName: g
61
63
  }) => {
62
- const p = I(), v = K(null), E = () => {
64
+ const p = A(), v = O(null), E = () => {
63
65
  t == null || t();
64
- }, k = P(
66
+ }, T = P(
65
67
  () => ({
66
- ignoreSelectors: [`[${O}]`]
68
+ ignoreSelectors: [`[${L}]`, `[${B}]`]
67
69
  }),
68
70
  []
69
71
  );
70
- L(
72
+ K(
71
73
  v,
72
74
  N && _ && r ? t : void 0,
73
- k
74
- ), $(() => {
75
+ T
76
+ ), S(() => {
75
77
  if (!r || !t)
76
78
  return;
77
79
  const h = (R) => {
78
- const { keyCode: S } = R;
79
- S === B.ESCAPE_KEY_CODE && t();
80
+ const { keyCode: k } = R;
81
+ k === D.ESCAPE_KEY_CODE && t();
80
82
  };
81
83
  return document.addEventListener("keydown", h, !1), () => {
82
84
  document.removeEventListener("keydown", h, !1);
83
85
  };
84
86
  }, [r, t]);
85
- const x = !!(c || o), f = /* @__PURE__ */ a(
87
+ const I = !!(o || s), f = /* @__PURE__ */ a(
86
88
  "aside",
87
89
  {
88
90
  ref: v,
@@ -94,24 +96,24 @@ const w = "_active_5ebdz_11", M = "_compact_5ebdz_62", F = "_header_5ebdz_58", H
94
96
  style: { top: n, height: `calc(100vh - ${n}px)` },
95
97
  tabIndex: -1,
96
98
  children: [
97
- /* @__PURE__ */ a("div", { className: e("header-section", { compact: !x }), children: [
98
- (c || d) && /* @__PURE__ */ a("div", { className: e("header"), children: [
99
- d ? /* @__PURE__ */ i("span", { id: p, className: e("title"), children: d }) : c,
99
+ /* @__PURE__ */ a("div", { className: e("header-section", { compact: !I }), children: [
100
+ (o || d) && /* @__PURE__ */ a("div", { className: e("header"), children: [
101
+ d ? /* @__PURE__ */ i("span", { id: p, className: e("title"), children: d }) : o,
100
102
  t && /* @__PURE__ */ i(
101
- j,
103
+ w,
102
104
  {
103
105
  className: e("close-button"),
104
106
  onClick: E,
105
107
  "aria-label": y,
106
- children: /* @__PURE__ */ i(T, {})
108
+ children: /* @__PURE__ */ i(j, {})
107
109
  }
108
110
  )
109
111
  ] }),
110
- o
112
+ s
111
113
  ] }),
112
114
  /* @__PURE__ */ i("div", { className: e("divider") }),
113
- s && /* @__PURE__ */ i("div", { className: e("content", u), children: s }),
114
- l && /* @__PURE__ */ a(D, { children: [
115
+ c && /* @__PURE__ */ i("div", { className: e("content", u), children: c }),
116
+ l && /* @__PURE__ */ a(x, { children: [
115
117
  /* @__PURE__ */ i("div", { className: e("divider") }),
116
118
  /* @__PURE__ */ i("div", { className: e("footer"), children: l })
117
119
  ] })
@@ -132,5 +134,5 @@ const w = "_active_5ebdz_11", M = "_compact_5ebdz_62", F = "_header_5ebdz_58", H
132
134
  ) : f;
133
135
  };
134
136
  export {
135
- ze as SidePanel
137
+ ge as SidePanel
136
138
  };