@reportportal/ui-kit 0.0.1-alpha.143 → 0.0.1-alpha.145
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/autocompletes.js +63 -62
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/modal/modalContent/modalContent.d.ts +2 -3
- package/dist/components/table/hooks/index.d.ts +1 -0
- package/dist/components/table/hooks/useColumnResize.d.ts +18 -0
- package/dist/components/table/resizeHandle/index.d.ts +1 -0
- package/dist/components/table/resizeHandle/resizeHandle.d.ts +2 -0
- package/dist/components/table/types.d.ts +4 -0
- package/dist/components/table/utils.d.ts +1 -1
- package/dist/icons.js +38 -37
- package/dist/index.js +135 -133
- package/dist/modal.js +111 -103
- package/dist/{chevronDownDropdown-66f5b1af.js → resizeColumn-d4107941.js} +3 -2
- package/dist/style.css +1 -1
- package/dist/table-a67da002.js +586 -0
- package/dist/table.js +3 -2
- package/package.json +4 -2
- package/dist/table-c172f35e.js +0 -504
package/dist/modal.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Scrollbars as
|
|
4
|
-
import { AnimatePresence as
|
|
5
|
-
import { c as
|
|
1
|
+
import { jsx as e, jsxs as h, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as z, useEffect as w, useState as v, useMemo as K } from "react";
|
|
3
|
+
import { Scrollbars as U } from "rc-scrollbars";
|
|
4
|
+
import { AnimatePresence as Y, motion as X } from "framer-motion";
|
|
5
|
+
import { c as b } from "./bind-06a7ff84.js";
|
|
6
6
|
import "react-dnd";
|
|
7
7
|
import "react-dnd-html5-backend";
|
|
8
|
-
import { a as
|
|
8
|
+
import { a as q } from "./dropdown-893c692c.js";
|
|
9
9
|
import { K as J } from "./keyCodes-f63c0e11.js";
|
|
10
10
|
import { B as D } from "./button-97d9e587.js";
|
|
11
11
|
import { Tooltip as Q } from "./tooltip.js";
|
|
@@ -22,163 +22,171 @@ import "./isEmpty-ccacb5ff.js";
|
|
|
22
22
|
import "./checkbox-ed6cc375.js";
|
|
23
23
|
import "@floating-ui/react";
|
|
24
24
|
import "./floatingUi-41f8c7b5.js";
|
|
25
|
-
function
|
|
26
|
-
const c =
|
|
25
|
+
function ee(t, i, o) {
|
|
26
|
+
const c = z(o);
|
|
27
27
|
w(() => {
|
|
28
|
-
c.current =
|
|
29
|
-
}, [
|
|
30
|
-
if (!
|
|
28
|
+
c.current = o;
|
|
29
|
+
}, [o]), w(() => {
|
|
30
|
+
if (!i)
|
|
31
31
|
return;
|
|
32
|
-
const s = (
|
|
32
|
+
const s = (l) => {
|
|
33
33
|
var r, d;
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
34
|
+
if (t && t.current && !t.current.contains(l.target)) {
|
|
35
|
+
const a = l.target;
|
|
36
36
|
((d = (r = c.current) == null ? void 0 : r.ignoreSelectors) == null ? void 0 : d.some(
|
|
37
|
-
(
|
|
38
|
-
)) ||
|
|
37
|
+
(E) => a == null ? void 0 : a.closest(E)
|
|
38
|
+
)) || i(l);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
return document.addEventListener("pointerdown", s), () => {
|
|
42
42
|
document.removeEventListener("pointerdown", s);
|
|
43
43
|
};
|
|
44
|
-
}, [
|
|
44
|
+
}, [t, i]);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
const [
|
|
46
|
+
const te = () => {
|
|
47
|
+
const [t, i] = v({ width: 0, height: 0 });
|
|
48
48
|
return w(() => {
|
|
49
|
-
const
|
|
50
|
-
|
|
49
|
+
const o = () => {
|
|
50
|
+
i({
|
|
51
51
|
width: window.innerWidth,
|
|
52
52
|
height: window.innerHeight
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
-
return window.addEventListener("resize",
|
|
56
|
-
}, []),
|
|
57
|
-
},
|
|
58
|
-
"modal-content": "_modal-
|
|
59
|
-
|
|
60
|
-
}, it = x.bind(nt), S = ({ scrollable: e = !1, children: o }) => /* @__PURE__ */ t("div", { className: it("modal-content", { scrollable: e }), children: o }), st = {
|
|
55
|
+
return window.addEventListener("resize", o), o(), () => window.removeEventListener("resize", o);
|
|
56
|
+
}, []), t;
|
|
57
|
+
}, oe = {
|
|
58
|
+
"modal-content": "_modal-content_ppzcb_1"
|
|
59
|
+
}, ne = b.bind(oe), S = ({ children: t }) => /* @__PURE__ */ e("div", { className: ne("modal-content"), children: t }), ie = {
|
|
61
60
|
"buttons-block": "_buttons-block_1mwne_1",
|
|
62
61
|
"button-container": "_button-container_1mwne_7",
|
|
63
62
|
"modal-footer": "_modal-footer_1mwne_12",
|
|
64
63
|
"with-extra-node": "_with-extra-node_1mwne_19",
|
|
65
64
|
"size-small": "_size-small_1mwne_23"
|
|
66
|
-
},
|
|
67
|
-
footerNode:
|
|
68
|
-
closeHandler:
|
|
69
|
-
okButton:
|
|
65
|
+
}, f = b.bind(ie), se = ({
|
|
66
|
+
footerNode: t,
|
|
67
|
+
closeHandler: i,
|
|
68
|
+
okButton: o,
|
|
70
69
|
cancelButton: c,
|
|
71
70
|
size: s
|
|
72
71
|
}) => {
|
|
73
|
-
const { tooltipNode:
|
|
74
|
-
const
|
|
75
|
-
return
|
|
72
|
+
const { tooltipNode: l, ...r } = o || {}, d = () => {
|
|
73
|
+
const a = /* @__PURE__ */ e(D, { adjustWidthOn: s === "small" ? "parent" : "min-width", ...r });
|
|
74
|
+
return l ? /* @__PURE__ */ e(Q, { content: l, placement: "top", width: 270, children: a }) : a;
|
|
76
75
|
};
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
c && /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ h("div", { className: f("modal-footer", { "with-extra-node": t, [`size-${s}`]: s }), children: [
|
|
77
|
+
t && t,
|
|
78
|
+
/* @__PURE__ */ h("div", { className: f("buttons-block"), children: [
|
|
79
|
+
c && /* @__PURE__ */ e("div", { className: f("button-container"), children: /* @__PURE__ */ e(
|
|
81
80
|
D,
|
|
82
81
|
{
|
|
83
82
|
variant: "ghost",
|
|
84
83
|
adjustWidthOn: s === "small" ? "parent" : "min-width",
|
|
85
|
-
onClick:
|
|
84
|
+
onClick: i,
|
|
86
85
|
...c
|
|
87
86
|
}
|
|
88
87
|
) }),
|
|
89
|
-
|
|
88
|
+
o && /* @__PURE__ */ e("div", { className: f("button-container"), children: d() })
|
|
90
89
|
] })
|
|
91
90
|
] });
|
|
92
|
-
},
|
|
91
|
+
}, ae = {
|
|
93
92
|
"modal-header": "_modal-header_w4aaf_1",
|
|
94
93
|
"width-description": "_width-description_w4aaf_10",
|
|
95
94
|
"modal-header-content": "_modal-header-content_w4aaf_14",
|
|
96
95
|
"modal-title": "_modal-title_w4aaf_20",
|
|
97
96
|
"close-modal-icon": "_close-modal-icon_w4aaf_29"
|
|
98
|
-
},
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
] }),
|
|
102
|
-
modal:
|
|
103
|
-
"overlay-default": "_overlay-
|
|
104
|
-
"overlay-light-cyan": "_overlay-light-
|
|
105
|
-
"scrolling-content": "_scrolling-
|
|
106
|
-
"modal-window": "_modal-
|
|
107
|
-
description:
|
|
108
|
-
scrollable:
|
|
109
|
-
"
|
|
110
|
-
"size-
|
|
111
|
-
"size-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
}, g = b.bind(ae), le = ({ title: t, onClose: i, withDescription: o = !1 }) => /* @__PURE__ */ h("div", { className: g("modal-header", { "width-description": o }), children: [
|
|
98
|
+
/* @__PURE__ */ e("div", { className: g("modal-header-content"), children: t && /* @__PURE__ */ e("div", { className: g("modal-title"), children: t }) }),
|
|
99
|
+
/* @__PURE__ */ e(V, { className: g("close-modal-icon"), onClick: i, children: /* @__PURE__ */ e(Z, {}) })
|
|
100
|
+
] }), re = "_modal_35896_1", ce = "_description_35896_43", de = {
|
|
101
|
+
modal: re,
|
|
102
|
+
"overlay-default": "_overlay-default_35896_12",
|
|
103
|
+
"overlay-light-cyan": "_overlay-light-cyan_35896_16",
|
|
104
|
+
"scrolling-content": "_scrolling-content_35896_20",
|
|
105
|
+
"modal-window": "_modal-window_35896_26",
|
|
106
|
+
description: ce,
|
|
107
|
+
"scrollable-wrapper": "_scrollable-wrapper_35896_54",
|
|
108
|
+
"scrollable-content": "_scrollable-content_35896_58",
|
|
109
|
+
"size-default": "_size-default_35896_62",
|
|
110
|
+
"size-small": "_size-small_35896_74",
|
|
111
|
+
"size-large": "_size-large_35896_86"
|
|
112
|
+
}, u = b.bind(de), me = 0.9, _e = 32 + 24, ue = 32 + 8, he = 36 + 16, pe = 32 * 2, Pe = ({
|
|
113
|
+
title: t,
|
|
114
|
+
children: i,
|
|
115
|
+
footerNode: o,
|
|
116
116
|
okButton: c,
|
|
117
117
|
cancelButton: s,
|
|
118
|
-
className:
|
|
118
|
+
className: l,
|
|
119
119
|
size: r = "default",
|
|
120
120
|
onClose: d = () => {
|
|
121
121
|
},
|
|
122
|
-
overlay:
|
|
123
|
-
zIndex:
|
|
124
|
-
allowCloseOutside:
|
|
125
|
-
scrollable:
|
|
126
|
-
withoutFooter:
|
|
127
|
-
createFooter:
|
|
122
|
+
overlay: a = "default",
|
|
123
|
+
zIndex: H = 2,
|
|
124
|
+
allowCloseOutside: E = !0,
|
|
125
|
+
scrollable: C = !1,
|
|
126
|
+
withoutFooter: N = !1,
|
|
127
|
+
createFooter: O = null,
|
|
128
128
|
description: m = null
|
|
129
129
|
}) => {
|
|
130
|
-
const [I,
|
|
131
|
-
let
|
|
132
|
-
return
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
const { keyCode:
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
var
|
|
140
|
-
k || ((
|
|
130
|
+
const [I, M] = v(!1), [L, R] = v(0), [k, $] = v(!1), _ = z(null), x = te(), A = x.height, W = A * me, y = (A - L) / 2, P = () => {
|
|
131
|
+
let n = W - pe;
|
|
132
|
+
return N || (n = n - he), m ? n = n - ue : n = n - _e, n;
|
|
133
|
+
}, p = () => {
|
|
134
|
+
M(!1);
|
|
135
|
+
}, T = (n) => {
|
|
136
|
+
const { keyCode: F } = n;
|
|
137
|
+
F === J.ESCAPE_KEY_CODE && p();
|
|
138
|
+
}, B = () => {
|
|
139
|
+
var n;
|
|
140
|
+
k || ((n = _.current) == null || n.focus(), $(!0));
|
|
141
141
|
};
|
|
142
142
|
w(() => {
|
|
143
143
|
if (_ && _.current) {
|
|
144
|
-
const { clientHeight:
|
|
145
|
-
R(
|
|
144
|
+
const { clientHeight: n } = _.current;
|
|
145
|
+
R(n);
|
|
146
146
|
}
|
|
147
|
-
}, [
|
|
148
|
-
const
|
|
147
|
+
}, [i, x]), w(() => (M(!0), document.addEventListener("keydown", T, !1), () => document.removeEventListener("keydown", T, !1)), []);
|
|
148
|
+
const j = K(
|
|
149
149
|
() => ({
|
|
150
|
-
ignoreSelectors: [`[${
|
|
150
|
+
ignoreSelectors: [`[${q}]`]
|
|
151
151
|
}),
|
|
152
152
|
[]
|
|
153
153
|
);
|
|
154
|
-
return
|
|
155
|
-
|
|
154
|
+
return ee(_, E ? p : void 0, j), /* @__PURE__ */ e(Y, { onExitComplete: d, children: I && /* @__PURE__ */ e("div", { className: u("modal", { [`overlay-${a}`]: a }), style: { zIndex: H }, children: /* @__PURE__ */ h(
|
|
155
|
+
X.div,
|
|
156
156
|
{
|
|
157
|
-
className:
|
|
157
|
+
className: u("modal-window", { [`size-${r}`]: r }, l),
|
|
158
158
|
ref: _,
|
|
159
159
|
tabIndex: 0,
|
|
160
|
-
initial: { opacity: 0, marginTop: -
|
|
161
|
-
animate: { opacity: 1, marginTop:
|
|
162
|
-
exit: { opacity: 0, marginTop: -
|
|
160
|
+
initial: { opacity: 0, marginTop: -y },
|
|
161
|
+
animate: { opacity: 1, marginTop: y },
|
|
162
|
+
exit: { opacity: 0, marginTop: -y },
|
|
163
163
|
transition: { duration: 0.3 },
|
|
164
|
-
onAnimationStart:
|
|
164
|
+
onAnimationStart: B,
|
|
165
165
|
children: [
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
/* @__PURE__ */ e(le, { title: t, onClose: p, withDescription: !!m }),
|
|
167
|
+
C ? /* @__PURE__ */ e("div", { className: u("scrollable-wrapper"), children: /* @__PURE__ */ e(
|
|
168
|
+
U,
|
|
169
|
+
{
|
|
170
|
+
autoHeight: !0,
|
|
171
|
+
autoHeightMax: P(),
|
|
172
|
+
hideTracksWhenNotNeeded: !0,
|
|
173
|
+
children: /* @__PURE__ */ h("div", { className: u("scrollable-content"), children: [
|
|
174
|
+
m && /* @__PURE__ */ e("span", { className: u("description"), children: m }),
|
|
175
|
+
/* @__PURE__ */ e(S, { children: i })
|
|
176
|
+
] })
|
|
177
|
+
}
|
|
178
|
+
) }) : /* @__PURE__ */ h(G, { children: [
|
|
179
|
+
m && /* @__PURE__ */ e("span", { className: u("description"), children: m }),
|
|
180
|
+
/* @__PURE__ */ e(S, { children: i })
|
|
173
181
|
] }),
|
|
174
|
-
!
|
|
175
|
-
|
|
182
|
+
!N && (O ? O(p) : /* @__PURE__ */ e(
|
|
183
|
+
se,
|
|
176
184
|
{
|
|
177
185
|
size: r,
|
|
178
|
-
footerNode:
|
|
186
|
+
footerNode: o,
|
|
179
187
|
okButton: c,
|
|
180
188
|
cancelButton: s,
|
|
181
|
-
closeHandler:
|
|
189
|
+
closeHandler: p
|
|
182
190
|
}
|
|
183
191
|
))
|
|
184
192
|
]
|
|
@@ -187,8 +195,8 @@ const et = () => {
|
|
|
187
195
|
) }) });
|
|
188
196
|
};
|
|
189
197
|
export {
|
|
190
|
-
|
|
198
|
+
Pe as Modal,
|
|
191
199
|
S as ModalContent,
|
|
192
|
-
|
|
193
|
-
|
|
200
|
+
se as ModalFooter,
|
|
201
|
+
le as ModalHeader
|
|
194
202
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L4.14645 9.85355C3.95118 9.65829 3.95118 9.34171 4.14645 9.14645C4.34171 8.95118 4.65829 8.95118 4.85355 9.14645L7 11.2929L7 3.5C7 3.22386 7.22386 3 7.5 3C7.77614 3 8 3.22386 8 3.5L8 11.2929L10.1464 9.14645C10.3417 8.95119 10.6583 8.95118 10.8536 9.14645C11.0488 9.34171 11.0488 9.65829 10.8536 9.85355L7.85355 12.8536Z", fill: "#A2AAB5" })), n = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L10.8536 6.14645C11.0488 6.34171 11.0488 6.65829 10.8536 6.85355C10.6583 7.04882 10.3417 7.04882 10.1464 6.85355L8 4.70711V12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 4.70711L4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355C3.95118 6.65829 3.95118 6.34171 4.14645 6.14645L7.14645 3.14645Z", fill: "#A2AAB5" })),
|
|
2
|
+
const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L4.14645 9.85355C3.95118 9.65829 3.95118 9.34171 4.14645 9.14645C4.34171 8.95118 4.65829 8.95118 4.85355 9.14645L7 11.2929L7 3.5C7 3.22386 7.22386 3 7.5 3C7.77614 3 8 3.22386 8 3.5L8 11.2929L10.1464 9.14645C10.3417 8.95119 10.6583 8.95118 10.8536 9.14645C11.0488 9.34171 11.0488 9.65829 10.8536 9.85355L7.85355 12.8536Z", fill: "#A2AAB5" })), n = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L10.8536 6.14645C11.0488 6.34171 11.0488 6.65829 10.8536 6.85355C10.6583 7.04882 10.3417 7.04882 10.1464 6.85355L8 4.70711V12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 4.70711L4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355C3.95118 6.65829 3.95118 6.34171 4.14645 6.14645L7.14645 3.14645Z", fill: "#A2AAB5" })), i = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M14.2174 5.82426C14.3736 5.66805 14.3736 5.41479 14.2174 5.25858L14.0759 5.11716C13.9197 4.96095 13.6665 4.96095 13.5103 5.11716L8.16726 10.4602L2.82426 5.11716C2.66805 4.96095 2.41479 4.96095 2.25858 5.11716L2.11716 5.25858C1.96095 5.41479 1.96095 5.66805 2.11716 5.82426L7.89176 11.5989C8.04797 11.7551 8.30124 11.7551 8.45745 11.5989L8.88171 11.1746L8.87436 11.1673L14.2174 5.82426Z", fill: "#A2AAB5" })), w = (t) => /* @__PURE__ */ e.createElement("svg", { width: 11, height: 24, viewBox: "0 0 11 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("rect", { x: 5, width: 1, height: 24, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 1, y: 4, width: 2, height: 16, rx: 1, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 8, y: 4, width: 2, height: 16, rx: 1, fill: "#A2AAB5" }));
|
|
3
3
|
export {
|
|
4
4
|
l as S,
|
|
5
5
|
n as a,
|
|
6
|
-
|
|
6
|
+
i as b,
|
|
7
|
+
w as c
|
|
7
8
|
};
|