@reportportal/ui-kit 0.0.1-alpha.178 → 0.0.1-alpha.179
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/sidePanel.js +50 -50
- package/package.json +1 -1
package/dist/sidePanel.js
CHANGED
|
@@ -6,8 +6,8 @@ import { u as B } from "./useOnClickOutside-8f7d68a1.js";
|
|
|
6
6
|
import "react-dnd";
|
|
7
7
|
import "react-dnd-html5-backend";
|
|
8
8
|
import { a as L } from "./dropdown-e853293f.js";
|
|
9
|
-
import { S as
|
|
10
|
-
import { B as
|
|
9
|
+
import { S as O } from "./close-4d480ef7.js";
|
|
10
|
+
import { B as T } from "./baseIconButton-251479f7.js";
|
|
11
11
|
import "react-dom";
|
|
12
12
|
import "@floating-ui/react-dom";
|
|
13
13
|
import "downshift";
|
|
@@ -20,42 +20,42 @@ import "./button-97d9e587.js";
|
|
|
20
20
|
import "./isEmpty-ccacb5ff.js";
|
|
21
21
|
import "./useEllipsisTitle-462fa254.js";
|
|
22
22
|
import "./checkbox-493fdc63.js";
|
|
23
|
-
const
|
|
23
|
+
const j = "_active_5ebdz_11", w = "_compact_5ebdz_62", M = "_header_5ebdz_58", F = "_title_5ebdz_88", H = "_description_5ebdz_99", U = "_content_5ebdz_108", W = "_footer_5ebdz_115", Y = "_divider_5ebdz_121", q = {
|
|
24
24
|
"side-panel-overlay": "_side-panel-overlay_5ebdz_1",
|
|
25
|
-
active:
|
|
25
|
+
active: j,
|
|
26
26
|
"overlay-default": "_overlay-default_5ebdz_16",
|
|
27
27
|
"overlay-light-cyan": "_overlay-light-cyan_5ebdz_20",
|
|
28
28
|
"side-panel": "_side-panel_5ebdz_1",
|
|
29
29
|
"side-right": "_side-right_5ebdz_42",
|
|
30
30
|
"side-left": "_side-left_5ebdz_50",
|
|
31
31
|
"header-section": "_header-section_5ebdz_58",
|
|
32
|
-
compact:
|
|
33
|
-
header:
|
|
32
|
+
compact: w,
|
|
33
|
+
header: M,
|
|
34
34
|
"header-content": "_header-content_5ebdz_78",
|
|
35
35
|
"close-button": "_close-button_5ebdz_82",
|
|
36
|
-
title:
|
|
37
|
-
description:
|
|
38
|
-
content:
|
|
39
|
-
footer:
|
|
40
|
-
divider:
|
|
41
|
-
}, e = $.bind(
|
|
42
|
-
className:
|
|
43
|
-
title:
|
|
44
|
-
descriptionComponent:
|
|
36
|
+
title: F,
|
|
37
|
+
description: H,
|
|
38
|
+
content: U,
|
|
39
|
+
footer: W,
|
|
40
|
+
divider: Y
|
|
41
|
+
}, e = $.bind(q), fe = ({
|
|
42
|
+
className: b,
|
|
43
|
+
title: r,
|
|
44
|
+
descriptionComponent: s,
|
|
45
45
|
headerComponent: c,
|
|
46
|
-
contentComponent:
|
|
46
|
+
contentComponent: o,
|
|
47
47
|
footerComponent: l,
|
|
48
|
-
top:
|
|
49
|
-
side:
|
|
50
|
-
isOpen:
|
|
48
|
+
top: n = 0,
|
|
49
|
+
side: u = "right",
|
|
50
|
+
isOpen: d = !0,
|
|
51
51
|
onClose: t,
|
|
52
|
-
closeButtonAriaLabel:
|
|
53
|
-
showOverlay:
|
|
54
|
-
overlay:
|
|
55
|
-
allowCloseOutside:
|
|
52
|
+
closeButtonAriaLabel: z = "Close panel",
|
|
53
|
+
showOverlay: _ = !1,
|
|
54
|
+
overlay: m = "default",
|
|
55
|
+
allowCloseOutside: y = !0,
|
|
56
56
|
overlayClassName: N
|
|
57
57
|
}) => {
|
|
58
|
-
const
|
|
58
|
+
const p = D(), v = I(null), g = () => {
|
|
59
59
|
t == null || t();
|
|
60
60
|
}, E = K(
|
|
61
61
|
() => ({
|
|
@@ -64,49 +64,49 @@ const M = "_active_5ebdz_11", F = "_compact_5ebdz_62", H = "_header_5ebdz_58", O
|
|
|
64
64
|
[]
|
|
65
65
|
);
|
|
66
66
|
B(
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
v,
|
|
68
|
+
y && _ && d ? t : void 0,
|
|
69
69
|
E
|
|
70
70
|
), P(() => {
|
|
71
|
-
if (!
|
|
71
|
+
if (!d || !t)
|
|
72
72
|
return;
|
|
73
|
-
const
|
|
73
|
+
const h = (x) => {
|
|
74
74
|
const { keyCode: R } = x;
|
|
75
|
-
R === A.ESCAPE_KEY_CODE &&
|
|
75
|
+
R === A.ESCAPE_KEY_CODE && t();
|
|
76
76
|
};
|
|
77
|
-
return document.addEventListener("keydown",
|
|
78
|
-
document.removeEventListener("keydown",
|
|
77
|
+
return document.addEventListener("keydown", h, !1), () => {
|
|
78
|
+
document.removeEventListener("keydown", h, !1);
|
|
79
79
|
};
|
|
80
|
-
}, [
|
|
81
|
-
const k = !!(c ||
|
|
80
|
+
}, [d, t]);
|
|
81
|
+
const k = !!(c || s), f = /* @__PURE__ */ a(
|
|
82
82
|
"aside",
|
|
83
83
|
{
|
|
84
|
-
ref:
|
|
85
|
-
className: e("side-panel", `side-${
|
|
84
|
+
ref: v,
|
|
85
|
+
className: e("side-panel", `side-${u}`, { active: d }, b),
|
|
86
86
|
role: "dialog",
|
|
87
87
|
"aria-modal": "true",
|
|
88
|
-
"aria-hidden": !
|
|
89
|
-
"aria-labelledby":
|
|
90
|
-
style: { top:
|
|
88
|
+
"aria-hidden": !d,
|
|
89
|
+
"aria-labelledby": r ? p : void 0,
|
|
90
|
+
style: { top: n, height: `calc(100vh - ${n}px)` },
|
|
91
91
|
tabIndex: -1,
|
|
92
92
|
children: [
|
|
93
93
|
/* @__PURE__ */ a("div", { className: e("header-section", { compact: !k }), children: [
|
|
94
|
-
(c ||
|
|
95
|
-
|
|
94
|
+
(c || r) && /* @__PURE__ */ a("div", { className: e("header"), children: [
|
|
95
|
+
r ? /* @__PURE__ */ i("span", { id: p, className: e("title"), children: r }) : c,
|
|
96
96
|
t && /* @__PURE__ */ i(
|
|
97
|
-
|
|
97
|
+
T,
|
|
98
98
|
{
|
|
99
99
|
className: e("close-button"),
|
|
100
100
|
onClick: g,
|
|
101
|
-
"aria-label":
|
|
102
|
-
children: /* @__PURE__ */ i(
|
|
101
|
+
"aria-label": z,
|
|
102
|
+
children: /* @__PURE__ */ i(O, {})
|
|
103
103
|
}
|
|
104
104
|
)
|
|
105
105
|
] }),
|
|
106
|
-
|
|
106
|
+
s
|
|
107
107
|
] }),
|
|
108
108
|
/* @__PURE__ */ i("div", { className: e("divider") }),
|
|
109
|
-
|
|
109
|
+
o && /* @__PURE__ */ i("div", { className: e("content"), children: o }),
|
|
110
110
|
l && /* @__PURE__ */ a(S, { children: [
|
|
111
111
|
/* @__PURE__ */ i("div", { className: e("divider") }),
|
|
112
112
|
/* @__PURE__ */ i("div", { className: e("footer"), children: l })
|
|
@@ -114,18 +114,18 @@ const M = "_active_5ebdz_11", F = "_compact_5ebdz_62", H = "_header_5ebdz_58", O
|
|
|
114
114
|
]
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
|
-
return
|
|
117
|
+
return _ ? /* @__PURE__ */ i(
|
|
118
118
|
"div",
|
|
119
119
|
{
|
|
120
120
|
className: e(
|
|
121
121
|
"side-panel-overlay",
|
|
122
|
-
{ active:
|
|
123
|
-
|
|
122
|
+
{ active: d },
|
|
123
|
+
m && `overlay-${m}`,
|
|
124
124
|
N
|
|
125
125
|
),
|
|
126
|
-
children:
|
|
126
|
+
children: f
|
|
127
127
|
}
|
|
128
|
-
) :
|
|
128
|
+
) : f;
|
|
129
129
|
};
|
|
130
130
|
export {
|
|
131
131
|
fe as SidePanel
|