@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/components/index.d.ts +1 -1
- package/dist/components/modal/constants.d.ts +2 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/constants-7319a394.js +11 -0
- package/dist/{fieldNumber-b4aa4d7e.js → fieldNumber-c5ecb471.js} +52 -52
- package/dist/fieldNumber.js +1 -1
- package/dist/index.js +157 -155
- package/dist/modal.js +72 -69
- package/dist/sidePanel.js +40 -38
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as e, jsxs as d, Fragment as
|
|
2
|
-
import { useState as
|
|
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 {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { B as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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
|
-
|
|
28
|
-
import "./floatingUi-46f5b896.js";
|
|
29
|
-
const ae = {
|
|
31
|
+
const ne = {
|
|
30
32
|
"modal-content": "_modal-content_ppzcb_1"
|
|
31
|
-
},
|
|
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(
|
|
39
|
+
}, f = b.bind(ie), se = ({
|
|
38
40
|
footerNode: o,
|
|
39
41
|
closeHandler: n,
|
|
40
42
|
okButton: i,
|
|
41
|
-
cancelButton:
|
|
43
|
+
cancelButton: p,
|
|
42
44
|
size: s
|
|
43
45
|
}) => {
|
|
44
|
-
const { tooltipNode:
|
|
45
|
-
const _ = /* @__PURE__ */ e(
|
|
46
|
-
return
|
|
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
|
-
|
|
52
|
-
|
|
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
|
-
...
|
|
59
|
+
...p
|
|
58
60
|
}
|
|
59
61
|
) }),
|
|
60
|
-
i && /* @__PURE__ */ e("div", { className: f("button-container"), children:
|
|
62
|
+
i && /* @__PURE__ */ e("div", { className: f("button-container"), children: O() })
|
|
61
63
|
] })
|
|
62
64
|
] });
|
|
63
|
-
},
|
|
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(
|
|
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(
|
|
72
|
-
] }),
|
|
73
|
-
modal:
|
|
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:
|
|
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(
|
|
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:
|
|
90
|
+
okButton: p,
|
|
89
91
|
cancelButton: s,
|
|
90
|
-
className:
|
|
92
|
+
className: u,
|
|
91
93
|
size: m = "default",
|
|
92
|
-
onClose:
|
|
94
|
+
onClose: O = () => {
|
|
93
95
|
},
|
|
94
96
|
overlay: _ = "default",
|
|
95
|
-
zIndex:
|
|
96
|
-
allowCloseOutside:
|
|
97
|
-
scrollable:
|
|
98
|
-
withoutFooter:
|
|
99
|
-
createFooter:
|
|
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 [
|
|
103
|
-
let t =
|
|
104
|
-
return
|
|
105
|
-
}, r =
|
|
106
|
-
|
|
107
|
-
}, []),
|
|
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 ===
|
|
112
|
+
h === J.ESCAPE_KEY_CODE && r();
|
|
111
113
|
},
|
|
112
114
|
[r]
|
|
113
|
-
),
|
|
115
|
+
), F = () => {
|
|
114
116
|
var t;
|
|
115
|
-
$ || ((t = a.current) == null || t.focus(),
|
|
117
|
+
$ || ((t = a.current) == null || t.focus(), B(!0));
|
|
116
118
|
};
|
|
117
|
-
|
|
118
|
-
if (!
|
|
119
|
+
M(() => {
|
|
120
|
+
if (!v || !a.current)
|
|
119
121
|
return;
|
|
120
122
|
const t = () => {
|
|
121
|
-
a.current &&
|
|
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
|
-
}, [
|
|
128
|
-
const
|
|
129
|
+
}, [v]), M(() => (H(!0), document.addEventListener("keydown", N, !1), () => document.removeEventListener("keydown", N, !1)), [N]);
|
|
130
|
+
const G = U(
|
|
129
131
|
() => ({
|
|
130
|
-
ignoreSelectors:
|
|
132
|
+
ignoreSelectors: oe
|
|
131
133
|
}),
|
|
132
134
|
[]
|
|
133
135
|
);
|
|
134
|
-
return Z(a,
|
|
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 },
|
|
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:
|
|
146
|
+
onAnimationStart: F,
|
|
145
147
|
children: [
|
|
146
|
-
/* @__PURE__ */ e(
|
|
147
|
-
|
|
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:
|
|
153
|
+
autoHeightMax: P(),
|
|
152
154
|
hideTracksWhenNotNeeded: !0,
|
|
153
|
-
renderTrackHorizontal:
|
|
154
|
-
renderTrackVertical:
|
|
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(
|
|
159
|
+
/* @__PURE__ */ e(I, { children: n })
|
|
158
160
|
] })
|
|
159
161
|
}
|
|
160
|
-
) }) : /* @__PURE__ */ d(
|
|
162
|
+
) }) : /* @__PURE__ */ d(W, { children: [
|
|
161
163
|
l && /* @__PURE__ */ e("span", { className: c("description"), children: l }),
|
|
162
|
-
/* @__PURE__ */ e(
|
|
164
|
+
/* @__PURE__ */ e(I, { children: n })
|
|
163
165
|
] }),
|
|
164
|
-
!
|
|
165
|
-
|
|
166
|
+
!y && (E ? E(r) : /* @__PURE__ */ e(
|
|
167
|
+
se,
|
|
166
168
|
{
|
|
167
169
|
size: m,
|
|
168
170
|
footerNode: i,
|
|
169
|
-
okButton:
|
|
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
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
|
2
|
-
import { useId as
|
|
3
|
-
import { c as
|
|
4
|
-
import { K as
|
|
5
|
-
import { u as
|
|
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
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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
|
-
|
|
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:
|
|
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:
|
|
38
|
+
header: H,
|
|
37
39
|
"header-content": "_header-content_5ebdz_78",
|
|
38
40
|
"close-button": "_close-button_5ebdz_82",
|
|
39
|
-
title:
|
|
40
|
-
description:
|
|
41
|
-
content:
|
|
42
|
-
footer:
|
|
43
|
-
divider:
|
|
44
|
-
}, e =
|
|
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:
|
|
48
|
-
headerComponent:
|
|
49
|
+
descriptionComponent: s,
|
|
50
|
+
headerComponent: o,
|
|
49
51
|
contentClassName: u,
|
|
50
|
-
contentComponent:
|
|
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 =
|
|
64
|
+
const p = A(), v = O(null), E = () => {
|
|
63
65
|
t == null || t();
|
|
64
|
-
},
|
|
66
|
+
}, T = P(
|
|
65
67
|
() => ({
|
|
66
|
-
ignoreSelectors: [`[${
|
|
68
|
+
ignoreSelectors: [`[${L}]`, `[${B}]`]
|
|
67
69
|
}),
|
|
68
70
|
[]
|
|
69
71
|
);
|
|
70
|
-
|
|
72
|
+
K(
|
|
71
73
|
v,
|
|
72
74
|
N && _ && r ? t : void 0,
|
|
73
|
-
|
|
74
|
-
),
|
|
75
|
+
T
|
|
76
|
+
), S(() => {
|
|
75
77
|
if (!r || !t)
|
|
76
78
|
return;
|
|
77
79
|
const h = (R) => {
|
|
78
|
-
const { keyCode:
|
|
79
|
-
|
|
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
|
|
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: !
|
|
98
|
-
(
|
|
99
|
-
d ? /* @__PURE__ */ i("span", { id: p, className: e("title"), children: d }) :
|
|
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
|
-
|
|
103
|
+
w,
|
|
102
104
|
{
|
|
103
105
|
className: e("close-button"),
|
|
104
106
|
onClick: E,
|
|
105
107
|
"aria-label": y,
|
|
106
|
-
children: /* @__PURE__ */ i(
|
|
108
|
+
children: /* @__PURE__ */ i(j, {})
|
|
107
109
|
}
|
|
108
110
|
)
|
|
109
111
|
] }),
|
|
110
|
-
|
|
112
|
+
s
|
|
111
113
|
] }),
|
|
112
114
|
/* @__PURE__ */ i("div", { className: e("divider") }),
|
|
113
|
-
|
|
114
|
-
l && /* @__PURE__ */ a(
|
|
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
|
-
|
|
137
|
+
ge as SidePanel
|
|
136
138
|
};
|