@reportportal/ui-kit 0.0.1-alpha.0 → 0.0.1-alpha.10
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/LICENSE +201 -201
- package/README.md +197 -3
- package/dist/baseIconButton-7bc53dec.js +25 -0
- package/dist/baseIconButton.js +7 -0
- package/dist/bind-06a7ff84.js +41 -0
- package/dist/bubblesLoader-a7e709d4.js +17 -0
- package/dist/bubblesLoader.js +7 -0
- package/dist/button-7fb84fde.js +62 -0
- package/dist/button.js +8 -0
- package/dist/checkbox-4143390f.js +70 -0
- package/dist/checkbox.js +9 -0
- package/dist/common/constants/keyCodes.d.ts +24 -0
- package/dist/common/hooks/index.d.ts +2 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +2 -0
- package/dist/common/hooks/useWindowResize.d.ts +4 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +7 -0
- package/dist/components/bubblesLoader/index.d.ts +3 -0
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/checkbox/checkbox.d.ts +11 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/dropdown/constants.d.ts +7 -0
- package/dist/components/dropdown/dropdown.d.ts +23 -0
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +3 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +3 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/dropdown/types.d.ts +20 -0
- package/dist/components/dropdown/utils.d.ts +4 -0
- package/dist/components/fieldNumber/constants.d.ts +4 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +18 -0
- package/dist/components/fieldNumber/index.d.ts +3 -0
- package/dist/components/fieldText/fieldText.d.ts +24 -0
- package/dist/components/fieldText/index.d.ts +3 -0
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
- package/dist/components/fieldTextFlex/index.d.ts +3 -0
- package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
- package/dist/components/icons/baseIconButton/index.d.ts +4 -0
- package/dist/components/icons/index.d.ts +12 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/modal/index.d.ts +4 -0
- package/dist/components/modal/modal.d.ts +21 -0
- package/dist/components/modal/modalContent/index.d.ts +1 -0
- package/dist/components/modal/modalContent/modalContent.d.ts +6 -0
- package/dist/components/modal/modalFooter/index.d.ts +2 -0
- package/dist/components/modal/modalFooter/modalFooter.d.ts +12 -0
- package/dist/components/modal/modalHeader/index.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +8 -0
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
- package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
- package/dist/components/pagination/pageControls/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
- package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +8 -0
- package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
- package/dist/components/pagination/pagination.d.ts +22 -0
- package/dist/components/pagination/types.d.ts +2 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/popover.d.ts +18 -0
- package/dist/components/radio/index.d.ts +4 -0
- package/dist/components/radio/radio.d.ts +16 -0
- package/dist/components/radio/radioGroup.d.ts +8 -0
- package/dist/components/systemMessage/index.d.ts +3 -0
- package/dist/components/systemMessage/systemMessage.d.ts +11 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/table.d.ts +3 -0
- package/dist/components/table/types.d.ts +46 -0
- package/dist/components/table/utils.d.ts +2 -0
- package/dist/components/themeProvider/index.d.ts +3 -0
- package/dist/components/themeProvider/themeProvider.d.ts +13 -0
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/toggle.d.ts +11 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +13 -0
- package/dist/dropdown-e07f2a71.js +212 -0
- package/dist/dropdown.js +14 -0
- package/dist/fieldNumber-46fe79b9.js +127 -0
- package/dist/fieldNumber.js +10 -0
- package/dist/fieldText-d80b29ba.js +102 -0
- package/dist/fieldText.js +9 -0
- package/dist/fieldTextFlex-5bddf46a.js +67 -0
- package/dist/fieldTextFlex.js +8 -0
- package/dist/fonts/OpenSans/OpenSans-Light.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Regular.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Semibold.ttf +0 -0
- package/dist/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/dist/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/dist/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/dist/index-bb9b62ef.js +131 -0
- package/dist/index.js +58 -0
- package/dist/keyCodes-f63c0e11.js +4 -0
- package/dist/modal.js +16 -0
- package/dist/pagination-a36bc786.js +274 -0
- package/dist/pagination.js +13 -0
- package/dist/popover.js +95 -0
- package/dist/radio-fd49a09c.js +76 -0
- package/dist/radio.js +9 -0
- package/dist/style.css +1 -0
- package/dist/systemMessage-1ced6079.js +30 -0
- package/dist/systemMessage.js +7 -0
- package/dist/table-d949a4ae.js +132 -0
- package/dist/table.js +11 -0
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +7 -0
- package/dist/toggle-707ecb74.js +67 -0
- package/dist/toggle.js +9 -0
- package/dist/tooltip.js +70 -0
- package/dist/useOnClickOutside-c332f7d3.js +16 -0
- package/package.json +93 -64
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { useState as w, useMemo as V } from "react";
|
|
4
|
+
import { c as q } from "./bind-06a7ff84.js";
|
|
5
|
+
import "./baseIconButton-7bc53dec.js";
|
|
6
|
+
import { C } from "./checkbox-4143390f.js";
|
|
7
|
+
const D = (t) => /* @__PURE__ */ n.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ n.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" })), g = (t) => /* @__PURE__ */ n.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ n.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" })), F = "_table_fmu4u_5", G = {
|
|
8
|
+
table: F,
|
|
9
|
+
"table-header": "_table-header_fmu4u_10",
|
|
10
|
+
"table-row": "_table-row_fmu4u_17",
|
|
11
|
+
"table-row-content": "_table-row-content_fmu4u_22",
|
|
12
|
+
"size-small": "_size-small_fmu4u_31",
|
|
13
|
+
"size-large": "_size-large_fmu4u_34",
|
|
14
|
+
"table-body": "_table-body_fmu4u_41",
|
|
15
|
+
"table-header-cell": "_table-header-cell_fmu4u_48",
|
|
16
|
+
"table-cell": "_table-cell_fmu4u_48",
|
|
17
|
+
"action-menu-cell": "_action-menu-cell_fmu4u_53",
|
|
18
|
+
"checkbox-cell": "_checkbox-cell_fmu4u_63",
|
|
19
|
+
"primary-cell": "_primary-cell_fmu4u_71",
|
|
20
|
+
"align-right": "_align-right_fmu4u_88",
|
|
21
|
+
"align-center": "_align-center_fmu4u_94"
|
|
22
|
+
};
|
|
23
|
+
var b = /* @__PURE__ */ ((t) => (t.ASC = "asc", t.DESC = "desc", t))(b || {});
|
|
24
|
+
const l = q.bind(G), W = ({
|
|
25
|
+
data: t,
|
|
26
|
+
primaryColumn: i,
|
|
27
|
+
fixedColumns: u,
|
|
28
|
+
rowActionMenu: d,
|
|
29
|
+
className: L = "",
|
|
30
|
+
selectable: v = !1,
|
|
31
|
+
selectedRowIds: o = [],
|
|
32
|
+
sortingDirection: m = b.ASC,
|
|
33
|
+
sortingColumn: s = i,
|
|
34
|
+
onChangeSorting: N = () => {
|
|
35
|
+
},
|
|
36
|
+
onToggleRowSelection: x = () => {
|
|
37
|
+
},
|
|
38
|
+
onToggleAllRowsSelection: A = () => {
|
|
39
|
+
}
|
|
40
|
+
}) => {
|
|
41
|
+
const [S, y] = w(null), [z, f] = w(null), p = V(() => [{ ...i, primary: !0 }, ...u], [i, u]), E = (e) => {
|
|
42
|
+
N({ key: e, direction: m });
|
|
43
|
+
}, k = (e) => ({
|
|
44
|
+
width: e.width,
|
|
45
|
+
textAlign: e.align
|
|
46
|
+
}), M = (e) => {
|
|
47
|
+
y(e);
|
|
48
|
+
}, R = () => {
|
|
49
|
+
y(null);
|
|
50
|
+
}, B = (e) => {
|
|
51
|
+
f(e);
|
|
52
|
+
}, j = () => {
|
|
53
|
+
f(null);
|
|
54
|
+
}, H = (e) => {
|
|
55
|
+
x(e);
|
|
56
|
+
}, T = () => {
|
|
57
|
+
A();
|
|
58
|
+
}, Z = t.every((e) => o.includes(e.id)), h = t.some((e) => o.includes(e.id)), $ = (e) => {
|
|
59
|
+
var c;
|
|
60
|
+
return `size-${((c = e.rowConfigs) == null ? void 0 : c.size) ?? "default"}`;
|
|
61
|
+
}, U = (e) => (s == null ? void 0 : s.key) === e ? m === b.ASC ? /* @__PURE__ */ a(g, {}) : /* @__PURE__ */ a(D, {}) : /* @__PURE__ */ a(g, {});
|
|
62
|
+
return /* @__PURE__ */ r("div", { className: l("table", L), children: [
|
|
63
|
+
/* @__PURE__ */ r("div", { className: l("table-header"), children: [
|
|
64
|
+
v && /* @__PURE__ */ a("div", { className: l("table-header-cell", "checkbox-cell"), children: h && /* @__PURE__ */ a(
|
|
65
|
+
C,
|
|
66
|
+
{
|
|
67
|
+
value: Z,
|
|
68
|
+
partiallyChecked: h,
|
|
69
|
+
onChange: T,
|
|
70
|
+
className: l("checkbox-cell")
|
|
71
|
+
}
|
|
72
|
+
) }),
|
|
73
|
+
p.map((e) => /* @__PURE__ */ r(
|
|
74
|
+
"button",
|
|
75
|
+
{
|
|
76
|
+
className: l("table-header-cell", {
|
|
77
|
+
[`align-${e.align}`]: "align" in e,
|
|
78
|
+
"primary-cell": "primary" in e && e.primary
|
|
79
|
+
}),
|
|
80
|
+
style: k(e),
|
|
81
|
+
onClick: () => E(e.key),
|
|
82
|
+
onMouseEnter: () => M(e.key),
|
|
83
|
+
onMouseLeave: R,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ a("span", { children: e.header }),
|
|
86
|
+
(S === e.key || (s == null ? void 0 : s.key) === e.key) && U(e.key)
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
e.key
|
|
90
|
+
)),
|
|
91
|
+
d && /* @__PURE__ */ a("div", { className: l("table-header-cell", "action-menu-cell") })
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ a("div", { className: l("table-body"), children: t.map((e, _) => /* @__PURE__ */ r(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
className: l("table-row", $(e)),
|
|
97
|
+
onMouseEnter: () => B(_),
|
|
98
|
+
onMouseLeave: j,
|
|
99
|
+
children: [
|
|
100
|
+
v && /* @__PURE__ */ a("div", { className: l("table-cell", "checkbox-cell"), children: (h || z === _) && /* @__PURE__ */ a(
|
|
101
|
+
C,
|
|
102
|
+
{
|
|
103
|
+
value: o.includes(e.id),
|
|
104
|
+
onChange: () => H(e.id),
|
|
105
|
+
className: l("checkbox-cell")
|
|
106
|
+
}
|
|
107
|
+
) }),
|
|
108
|
+
/* @__PURE__ */ r("div", { className: l("table-row-content"), children: [
|
|
109
|
+
p.map((c) => /* @__PURE__ */ a(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
className: l("table-cell", "table-cell", {
|
|
113
|
+
"primary-cell": "primary" in c && c.primary
|
|
114
|
+
}),
|
|
115
|
+
style: k(c),
|
|
116
|
+
children: e[c.key].component || e[c.key].content || e[c.key]
|
|
117
|
+
},
|
|
118
|
+
c.key
|
|
119
|
+
)),
|
|
120
|
+
d && /* @__PURE__ */ a("div", { className: l("table-cell", "action-menu-cell"), children: d })
|
|
121
|
+
] })
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
e.id
|
|
125
|
+
)) })
|
|
126
|
+
] });
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
D as S,
|
|
130
|
+
W as T,
|
|
131
|
+
g as a
|
|
132
|
+
};
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { T as r } from "./table-d949a4ae.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "./bind-06a7ff84.js";
|
|
5
|
+
import "./baseIconButton-7bc53dec.js";
|
|
6
|
+
import "./checkbox-4143390f.js";
|
|
7
|
+
import "./keyCodes-f63c0e11.js";
|
|
8
|
+
export {
|
|
9
|
+
r as Table,
|
|
10
|
+
r as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as h } from "./bind-06a7ff84.js";
|
|
3
|
+
const n = {
|
|
4
|
+
"theme-provider": "_theme-provider_xipmx_1"
|
|
5
|
+
}, c = h.bind(n), e = {
|
|
6
|
+
light: "rp-ui-kit-theme-light",
|
|
7
|
+
dark: "rp-ui-kit-theme-dark"
|
|
8
|
+
};
|
|
9
|
+
function p({
|
|
10
|
+
children: t,
|
|
11
|
+
theme: i = "light",
|
|
12
|
+
customThemes: r = {},
|
|
13
|
+
className: s
|
|
14
|
+
}) {
|
|
15
|
+
const m = {
|
|
16
|
+
...e,
|
|
17
|
+
...r
|
|
18
|
+
}[i] || e.light;
|
|
19
|
+
return /* @__PURE__ */ o("div", { className: c("theme-provider", s, m), children: t });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
p as T
|
|
23
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "./bind-06a7ff84.js";
|
|
3
|
+
import { useRef as k } from "react";
|
|
4
|
+
import { K as d } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
const h = "_toggle_p1gaq_1", x = "_slider_p1gaq_26", y = "_round_p1gaq_46", E = "_input_p1gaq_50", q = "_disabled_p1gaq_63", D = {
|
|
6
|
+
toggle: h,
|
|
7
|
+
"children-container": "_children-container_p1gaq_13",
|
|
8
|
+
slider: x,
|
|
9
|
+
round: y,
|
|
10
|
+
input: E,
|
|
11
|
+
disabled: q
|
|
12
|
+
}, e = b.bind(D), T = ({
|
|
13
|
+
children: s,
|
|
14
|
+
value: c,
|
|
15
|
+
onChange: p,
|
|
16
|
+
className: _,
|
|
17
|
+
disabled: n = !1,
|
|
18
|
+
title: g,
|
|
19
|
+
...u
|
|
20
|
+
}) => {
|
|
21
|
+
const o = k(null), m = (t) => {
|
|
22
|
+
var a, i;
|
|
23
|
+
const { keyCode: l } = t;
|
|
24
|
+
if (l === d.SPACE_KEY_CODE) {
|
|
25
|
+
t.preventDefault(), (a = o.current) == null || a.click();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
l === d.ENTER_KEY_CODE && (t.preventDefault(), (i = o.current) == null || i.click());
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ f(
|
|
31
|
+
"label",
|
|
32
|
+
{
|
|
33
|
+
id: "rp-ui-kit-toggle-label",
|
|
34
|
+
title: g,
|
|
35
|
+
className: e("toggle", _, { disabled: n }),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ r(
|
|
38
|
+
"input",
|
|
39
|
+
{
|
|
40
|
+
ref: o,
|
|
41
|
+
tabIndex: n ? -1 : 0,
|
|
42
|
+
onChange: p,
|
|
43
|
+
checked: c,
|
|
44
|
+
disabled: n,
|
|
45
|
+
onKeyDown: m,
|
|
46
|
+
className: e("input"),
|
|
47
|
+
type: "checkbox",
|
|
48
|
+
...u
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ r(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
"aria-labelledby": "rp-ui-kit-toggle-label",
|
|
55
|
+
role: "checkbox",
|
|
56
|
+
"aria-checked": c,
|
|
57
|
+
className: e("slider", "round")
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
s && /* @__PURE__ */ r("span", { className: e("children-container"), children: s })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
T
|
|
67
|
+
};
|
package/dist/toggle.js
ADDED
package/dist/tooltip.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsxs as T, Fragment as g, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useRef as E } from "react";
|
|
3
|
+
import { c as N } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useFloating as O, flip as S } from "@floating-ui/react-dom";
|
|
5
|
+
const W = "_tooltip_7bl3z_1", v = {
|
|
6
|
+
"tooltip-wrapper": "_tooltip-wrapper_7bl3z_1",
|
|
7
|
+
tooltip: W,
|
|
8
|
+
"tooltip-content": "_tooltip-content_7bl3z_26",
|
|
9
|
+
"tooltip-arrow": "_tooltip-arrow_7bl3z_39"
|
|
10
|
+
}, n = N.bind(v), z = 2e3, F = 100, D = ({
|
|
11
|
+
content: c,
|
|
12
|
+
className: a,
|
|
13
|
+
dynamicWidth: p,
|
|
14
|
+
width: d,
|
|
15
|
+
placement: m = "bottom",
|
|
16
|
+
dataAutomationId: u,
|
|
17
|
+
children: f
|
|
18
|
+
}) => {
|
|
19
|
+
const [_, i] = y(!1), t = E(), { refs: s, floatingStyles: h } = O({
|
|
20
|
+
placement: m,
|
|
21
|
+
strategy: "fixed",
|
|
22
|
+
middleware: [
|
|
23
|
+
S({
|
|
24
|
+
fallbackPlacements: ["bottom", "top", "right", "left"]
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
}), o = p ? null : { width: `${d}px` }, w = document.documentElement.clientWidth, x = o || w - F, r = () => {
|
|
28
|
+
t.current && clearTimeout(t.current), i(!1);
|
|
29
|
+
}, b = () => {
|
|
30
|
+
t.current = setTimeout(() => i(!0), z);
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ T(g, { children: [
|
|
33
|
+
/* @__PURE__ */ l(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
ref: (e) => s.setReference(e),
|
|
37
|
+
className: n("tooltip-wrapper", a),
|
|
38
|
+
onMouseDown: r,
|
|
39
|
+
onMouseEnter: b,
|
|
40
|
+
onMouseLeave: r,
|
|
41
|
+
children: f
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
_ && /* @__PURE__ */ l(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: n("tooltip"),
|
|
48
|
+
ref: (e) => s.setFloating(e),
|
|
49
|
+
style: {
|
|
50
|
+
...h,
|
|
51
|
+
...o
|
|
52
|
+
},
|
|
53
|
+
"data-automation-id": u,
|
|
54
|
+
children: /* @__PURE__ */ l(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
className: n("tooltip-content"),
|
|
58
|
+
style: {
|
|
59
|
+
maxWidth: `${x}px`
|
|
60
|
+
},
|
|
61
|
+
children: c
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] });
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
D as Tooltip
|
|
70
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useEffect as i } from "react";
|
|
2
|
+
function u(t, n) {
|
|
3
|
+
i(() => {
|
|
4
|
+
if (!n)
|
|
5
|
+
return;
|
|
6
|
+
const e = (o) => {
|
|
7
|
+
t && t.current && !t.current.contains(o.target) && n(o);
|
|
8
|
+
};
|
|
9
|
+
return document.addEventListener("pointerdown", e), () => {
|
|
10
|
+
document.removeEventListener("pointerdown", e);
|
|
11
|
+
};
|
|
12
|
+
}, [t, n]);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
u
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,64 +1,93 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@reportportal/ui-kit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"build
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"@
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@storybook/
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"eslint-plugin
|
|
47
|
-
"eslint
|
|
48
|
-
"
|
|
49
|
-
"eslint
|
|
50
|
-
"eslint-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"react
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@reportportal/ui-kit",
|
|
3
|
+
"version": "0.0.1-alpha.10",
|
|
4
|
+
"description": "The UI-kit library for ReportPortal Design System.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "storybook dev -p 6006",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"build:storybook": "storybook build",
|
|
10
|
+
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
11
|
+
"format": "npm run lint -- --fix",
|
|
12
|
+
"test": "exit 0",
|
|
13
|
+
"test:coverage": "exit 0",
|
|
14
|
+
"prepare": "husky install"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/components/index.d.ts",
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "17.x-18.x",
|
|
24
|
+
"react-dom": "17.x-18.x"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@floating-ui/react": "^0.26.16",
|
|
28
|
+
"@floating-ui/react-dom": "^2.0.1",
|
|
29
|
+
"classnames": "^2.3.2",
|
|
30
|
+
"downshift": "^6.1.12",
|
|
31
|
+
"framer-motion": "^10.15.2",
|
|
32
|
+
"rc-scrollbars": "^1.1.6"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@storybook/addon-essentials": "^7.2.0",
|
|
36
|
+
"@storybook/addon-interactions": "^7.2.0",
|
|
37
|
+
"@storybook/addon-links": "^7.2.0",
|
|
38
|
+
"@storybook/addon-onboarding": "^1.0.8",
|
|
39
|
+
"@storybook/blocks": "^7.2.0",
|
|
40
|
+
"@storybook/react": "^7.2.0",
|
|
41
|
+
"@storybook/react-vite": "^7.2.0",
|
|
42
|
+
"@storybook/testing-library": "^0.2.0",
|
|
43
|
+
"@types/node": "^20.4.5",
|
|
44
|
+
"@types/react": "^18.3.3",
|
|
45
|
+
"@types/react-dom": "^18.2.7",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
47
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
48
|
+
"@vitejs/plugin-react": "^4.0.3",
|
|
49
|
+
"eslint": "^8.46.0",
|
|
50
|
+
"eslint-config-airbnb-typescript": "^15.0.0",
|
|
51
|
+
"eslint-config-prettier": "^8.10.0",
|
|
52
|
+
"eslint-import-resolver-typescript": "^3.6.0",
|
|
53
|
+
"eslint-plugin-import": "^2.28.0",
|
|
54
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
55
|
+
"eslint-plugin-react": "^7.33.1",
|
|
56
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
57
|
+
"eslint-plugin-react-refresh": "^0.4.3",
|
|
58
|
+
"eslint-plugin-storybook": "^0.6.13",
|
|
59
|
+
"husky": "^8.0.3",
|
|
60
|
+
"lint-staged": "^13.2.3",
|
|
61
|
+
"prettier": "^3.0.1",
|
|
62
|
+
"react": "18.2.0",
|
|
63
|
+
"react-dom": "18.2.0",
|
|
64
|
+
"sass": "^1.64.1",
|
|
65
|
+
"storybook": "^7.2.2",
|
|
66
|
+
"typescript": "^5.0.2",
|
|
67
|
+
"vite": "^4.4.5",
|
|
68
|
+
"vite-plugin-dts": "^3.4.0",
|
|
69
|
+
"vite-plugin-svgr": "^3.2.0",
|
|
70
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
71
|
+
},
|
|
72
|
+
"repository": {
|
|
73
|
+
"type": "git",
|
|
74
|
+
"url": "git+https://github.com/reportportal/ui-kit.git"
|
|
75
|
+
},
|
|
76
|
+
"author": "ReportPortal.io",
|
|
77
|
+
"license": "Apache-2.0",
|
|
78
|
+
"bugs": {
|
|
79
|
+
"url": "https://github.com/reportportal/ui-kit/issues"
|
|
80
|
+
},
|
|
81
|
+
"homepage": "https://github.com/reportportal/ui-kit#readme",
|
|
82
|
+
"keywords": [
|
|
83
|
+
"react",
|
|
84
|
+
"react-components",
|
|
85
|
+
"design-systems",
|
|
86
|
+
"ui-kit",
|
|
87
|
+
"reportportal",
|
|
88
|
+
"epam"
|
|
89
|
+
],
|
|
90
|
+
"engines": {
|
|
91
|
+
"node": ">=16.x"
|
|
92
|
+
}
|
|
93
|
+
}
|