@reportportal/ui-kit 0.0.1-alpha.9 → 0.0.1-alpha.90
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/README.md +70 -12
- package/dist/arrowUp-4a5caee7.js +6 -0
- package/dist/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +1 -1
- package/dist/breadcrumbs-8e5ca8d7.js +183 -0
- package/dist/breadcrumbs.js +11 -0
- package/dist/button-97d9e587.js +66 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-44c7e60e.js +5 -0
- package/dist/checkbox-ed6cc375.js +73 -0
- package/dist/checkbox.js +1 -1
- package/dist/close-4d480ef7.js +5 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/common/types.d.ts +3 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +1 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumbs/breadcrumb/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/breadcrumbsProvider.d.ts +13 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/hooks.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/index.d.ts +1 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/hiddenBreadcrumbs.d.ts +6 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.d.ts +5 -0
- package/dist/components/breadcrumbs/tree/index.d.ts +1 -0
- package/dist/components/breadcrumbs/tree/tree.d.ts +7 -0
- package/dist/components/breadcrumbs/types.d.ts +24 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +1 -0
- package/dist/components/bubblesLoader/index.d.ts +1 -0
- package/dist/components/button/button.d.ts +5 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +3 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/datePicker/datePicker.d.ts +25 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +16 -0
- package/dist/components/datePicker/header/index.d.ts +4 -0
- package/dist/components/datePicker/index.d.ts +5 -0
- package/dist/components/datePicker/utils.d.ts +4 -0
- package/dist/components/dropdown/constants.d.ts +1 -0
- package/dist/components/dropdown/dropdown.d.ts +13 -4
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +1 -0
- package/dist/components/dropdown/types.d.ts +3 -0
- package/dist/components/dropdown/utils.d.ts +2 -1
- package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
- package/dist/components/fieldLabel/index.d.ts +1 -0
- package/dist/components/fieldNumber/constants.d.ts +1 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +3 -3
- package/dist/components/fieldNumber/index.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +12 -4
- package/dist/components/fieldText/index.d.ts +1 -0
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +4 -2
- package/dist/components/fieldTextFlex/index.d.ts +1 -0
- package/dist/components/icons/index.d.ts +46 -7
- package/dist/components/index.d.ts +7 -0
- package/dist/components/maxValueDisplay/index.d.ts +4 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
- package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
- package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +5 -2
- package/dist/components/modal/modalContent/modalContent.d.ts +2 -0
- package/dist/components/modal/modalFooter/modalFooter.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +2 -1
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +12 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +4 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +1 -0
- package/dist/components/popover/index.d.ts +4 -1
- package/dist/components/popover/popover.d.ts +3 -2
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +1 -0
- package/dist/components/radio/radioGroup.d.ts +1 -0
- package/dist/components/selection/index.d.ts +5 -0
- package/dist/components/selection/selection.d.ts +12 -0
- package/dist/components/selection/types.d.ts +1 -0
- package/dist/components/spinLoader/index.d.ts +4 -0
- package/dist/components/spinLoader/spinLoader.d.ts +8 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +4 -0
- package/dist/components/systemAlert/types.d.ts +16 -0
- package/dist/components/systemMessage/index.d.ts +1 -0
- package/dist/components/systemMessage/systemMessage.d.ts +1 -0
- package/dist/components/table/constants.d.ts +2 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/types.d.ts +13 -7
- package/dist/components/table/utils.d.ts +5 -1
- package/dist/components/themeProvider/index.d.ts +1 -0
- package/dist/components/themeProvider/themeProvider.d.ts +1 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/toggle.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +12 -2
- package/dist/datePicker-f8747600.js +196 -0
- package/dist/datePicker.js +28 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-b26b8fd8.js +282 -0
- package/dist/dropdown.js +5 -2
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-c9113a7f.js +135 -0
- package/dist/fieldNumber.js +4 -2
- package/dist/fieldText-35421470.js +166 -0
- package/dist/fieldText.js +6 -2
- package/dist/fieldTextFlex-8afaab31.js +78 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +64 -0
- package/dist/index.js +110 -44
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/modal.js +144 -14
- package/dist/openEye-7b9cf080.js +7 -0
- package/dist/pagination-b001d791.js +347 -0
- package/dist/pagination.js +11 -4
- package/dist/plus-0929dda4.js +6 -0
- package/dist/popover.js +61 -57
- package/dist/prevPage-87faf576.js +6 -0
- package/dist/radio-62546efa.js +76 -0
- package/dist/radio.js +1 -1
- package/dist/selection-9124d029.js +38 -0
- package/dist/selection.js +10 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -1
- package/dist/success-8fd8bd2c.js +7 -0
- package/dist/systemAlert.js +63 -0
- package/dist/systemMessage-924fdaa6.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-920fdad9.js +142 -0
- package/dist/table.js +11 -0
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +87 -56
- package/dist/tree-c3dd3d45.js +6 -0
- package/package.json +28 -16
- package/dist/baseIconButton-7bc53dec.js +0 -25
- package/dist/button-7fb84fde.js +0 -62
- package/dist/checkbox-4143390f.js +0 -70
- package/dist/dropdown-e07f2a71.js +0 -212
- package/dist/fieldNumber-46fe79b9.js +0 -127
- package/dist/fieldText-d80b29ba.js +0 -102
- package/dist/fieldTextFlex-5bddf46a.js +0 -67
- package/dist/index-bb9b62ef.js +0 -131
- package/dist/pagination-a36bc786.js +0 -274
- package/dist/radio-fd49a09c.js +0 -76
- package/dist/systemMessage-1ced6079.js +0 -30
- package/dist/toggle-707ecb74.js +0 -67
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useMemo as K } from "react";
|
|
3
|
+
import { c as O } from "./bind-06a7ff84.js";
|
|
4
|
+
import { a as g, S as P } from "./arrowUp-4a5caee7.js";
|
|
5
|
+
import { C as w } from "./checkbox-ed6cc375.js";
|
|
6
|
+
const Q = "_table_1qo1m_1", V = "_label_1qo1m_96", W = {
|
|
7
|
+
table: Q,
|
|
8
|
+
"table-header": "_table-header_1qo1m_9",
|
|
9
|
+
"table-row": "_table-row_1qo1m_17",
|
|
10
|
+
"table-row-content": "_table-row-content_1qo1m_23",
|
|
11
|
+
"size-small": "_size-small_1qo1m_33",
|
|
12
|
+
"size-large": "_size-large_1qo1m_36",
|
|
13
|
+
"table-body": "_table-body_1qo1m_40",
|
|
14
|
+
"table-header-cell": "_table-header-cell_1qo1m_47",
|
|
15
|
+
"table-cell": "_table-cell_1qo1m_48",
|
|
16
|
+
"action-menu-cell": "_action-menu-cell_1qo1m_53",
|
|
17
|
+
"checkbox-cell": "_checkbox-cell_1qo1m_65",
|
|
18
|
+
"primary-cell": "_primary-cell_1qo1m_79",
|
|
19
|
+
label: V,
|
|
20
|
+
"sortable-cell": "_sortable-cell_1qo1m_100",
|
|
21
|
+
"align-right": "_align-right_1qo1m_103",
|
|
22
|
+
"align-center": "_align-center_1qo1m_109"
|
|
23
|
+
}, S = "asc", X = (t) => t.toLowerCase() === S, Y = (t) => t.map((r) => r.key), l = O.bind(W), ae = ({
|
|
24
|
+
data: t,
|
|
25
|
+
primaryColumn: r,
|
|
26
|
+
fixedColumns: i,
|
|
27
|
+
renderRowActions: h,
|
|
28
|
+
className: f = "",
|
|
29
|
+
rowClassName: x = "",
|
|
30
|
+
headerClassName: z = "",
|
|
31
|
+
selectable: b = !1,
|
|
32
|
+
selectedRowIds: s = [],
|
|
33
|
+
sortingDirection: y = S,
|
|
34
|
+
sortingColumn: n = r,
|
|
35
|
+
sortableColumns: _ = Y([r, ...i]),
|
|
36
|
+
onChangeSorting: M = () => {
|
|
37
|
+
},
|
|
38
|
+
onToggleRowSelection: u = () => {
|
|
39
|
+
},
|
|
40
|
+
onToggleAllRowsSelection: A = () => {
|
|
41
|
+
}
|
|
42
|
+
}) => {
|
|
43
|
+
const [L, k] = N(null), [E, v] = N(null), m = K(() => [{ ...r, primary: !0 }, ...i], [r, i]), j = (e) => {
|
|
44
|
+
_.includes(e) && M({ key: e, direction: y });
|
|
45
|
+
}, p = (e) => ({
|
|
46
|
+
width: e.width,
|
|
47
|
+
textAlign: e.align
|
|
48
|
+
}), C = (e) => {
|
|
49
|
+
k(e);
|
|
50
|
+
}, H = () => {
|
|
51
|
+
k(null);
|
|
52
|
+
}, T = (e) => {
|
|
53
|
+
v(e);
|
|
54
|
+
}, $ = () => {
|
|
55
|
+
v(null);
|
|
56
|
+
}, D = (e) => {
|
|
57
|
+
u(e);
|
|
58
|
+
}, U = () => {
|
|
59
|
+
A();
|
|
60
|
+
}, B = t.every((e) => s.includes(e.id)), F = t.some((e) => s.includes(e.id)), q = (s == null ? void 0 : s.length) > 0, G = (e) => {
|
|
61
|
+
var c;
|
|
62
|
+
return `size-${((c = e.rowConfigs) == null ? void 0 : c.size) ?? "default"}`;
|
|
63
|
+
}, J = (e) => {
|
|
64
|
+
if (_.includes(e))
|
|
65
|
+
return (n == null ? void 0 : n.key) === e ? X(y) ? /* @__PURE__ */ a(g, {}) : /* @__PURE__ */ a(P, {}) : /* @__PURE__ */ a(g, {});
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ o("div", { className: l("table", f), children: [
|
|
68
|
+
/* @__PURE__ */ o("div", { className: l("table-header", z), children: [
|
|
69
|
+
b && /* @__PURE__ */ a("div", { className: l("table-header-cell", "checkbox-cell"), children: q && /* @__PURE__ */ a(
|
|
70
|
+
w,
|
|
71
|
+
{
|
|
72
|
+
value: B,
|
|
73
|
+
partiallyChecked: F,
|
|
74
|
+
onChange: U,
|
|
75
|
+
className: l("checkbox-cell")
|
|
76
|
+
}
|
|
77
|
+
) }),
|
|
78
|
+
m.map((e) => /* @__PURE__ */ a(
|
|
79
|
+
"button",
|
|
80
|
+
{
|
|
81
|
+
className: l("table-header-cell", {
|
|
82
|
+
[`align-${e.align}`]: "align" in e,
|
|
83
|
+
"primary-cell": "primary" in e && e.primary,
|
|
84
|
+
"sortable-cell": _.includes(e.key)
|
|
85
|
+
}),
|
|
86
|
+
style: p(e),
|
|
87
|
+
children: /* @__PURE__ */ o(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
className: l("label"),
|
|
91
|
+
onClick: () => j(e.key),
|
|
92
|
+
onMouseEnter: () => C(e.key),
|
|
93
|
+
onMouseLeave: H,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ a("span", { children: e.header }),
|
|
96
|
+
(L === e.key || (n == null ? void 0 : n.key) === e.key) && J(e.key)
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
},
|
|
101
|
+
e.key
|
|
102
|
+
)),
|
|
103
|
+
h && /* @__PURE__ */ a("div", { className: l("table-header-cell", "action-menu-cell") })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ a("div", { className: l("table-body"), children: t.map((e, d) => /* @__PURE__ */ o(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
className: l("table-row", G(e), x),
|
|
109
|
+
onMouseEnter: () => T(d),
|
|
110
|
+
onMouseLeave: $,
|
|
111
|
+
children: [
|
|
112
|
+
b && /* @__PURE__ */ a("div", { className: l("table-cell", "checkbox-cell"), children: (q || E === d) && /* @__PURE__ */ a(
|
|
113
|
+
w,
|
|
114
|
+
{
|
|
115
|
+
value: s.includes(e.id),
|
|
116
|
+
onChange: () => D(e.id),
|
|
117
|
+
className: l("checkbox-cell")
|
|
118
|
+
}
|
|
119
|
+
) }),
|
|
120
|
+
/* @__PURE__ */ o("div", { className: l("table-row-content"), children: [
|
|
121
|
+
m.map((c) => /* @__PURE__ */ a(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
className: l("table-cell", {
|
|
125
|
+
"primary-cell": "primary" in c && c.primary
|
|
126
|
+
}),
|
|
127
|
+
style: p(c),
|
|
128
|
+
children: e[c.key].component || e[c.key].content || e[c.key]
|
|
129
|
+
},
|
|
130
|
+
c.key
|
|
131
|
+
)),
|
|
132
|
+
h && /* @__PURE__ */ a("div", { className: l("table-cell", "action-menu-cell"), children: h(e.metaData) })
|
|
133
|
+
] })
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
e.id
|
|
137
|
+
)) })
|
|
138
|
+
] });
|
|
139
|
+
};
|
|
140
|
+
export {
|
|
141
|
+
ae as T
|
|
142
|
+
};
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { T as r } from "./table-920fdad9.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "./bind-06a7ff84.js";
|
|
5
|
+
import "./arrowUp-4a5caee7.js";
|
|
6
|
+
import "./checkbox-ed6cc375.js";
|
|
7
|
+
import "./keyCodes-f63c0e11.js";
|
|
8
|
+
export {
|
|
9
|
+
r as Table,
|
|
10
|
+
r as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as h } from "./bind-06a7ff84.js";
|
|
3
|
+
import { useRef as k, useId as x } from "react";
|
|
4
|
+
import { K as _ } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
const y = "_toggle_1c7gt_1", E = "_slider_1c7gt_27", D = "_round_1c7gt_47", K = "_input_1c7gt_51", N = "_disabled_1c7gt_92", C = {
|
|
6
|
+
toggle: y,
|
|
7
|
+
"children-container": "_children-container_1c7gt_14",
|
|
8
|
+
slider: E,
|
|
9
|
+
round: D,
|
|
10
|
+
input: K,
|
|
11
|
+
disabled: N
|
|
12
|
+
}, e = h.bind(C), w = ({
|
|
13
|
+
children: s,
|
|
14
|
+
value: r,
|
|
15
|
+
onChange: g,
|
|
16
|
+
className: u,
|
|
17
|
+
disabled: t = !1,
|
|
18
|
+
title: p,
|
|
19
|
+
...m
|
|
20
|
+
}) => {
|
|
21
|
+
const c = k(null), l = x(), f = (n) => {
|
|
22
|
+
var a, d;
|
|
23
|
+
const { keyCode: i } = n;
|
|
24
|
+
if (i === _.SPACE_KEY_CODE) {
|
|
25
|
+
n.preventDefault(), (a = c.current) == null || a.click();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
i === _.ENTER_KEY_CODE && (n.preventDefault(), (d = c.current) == null || d.click());
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ b("label", { id: l, title: p, className: e("toggle", u, { disabled: t }), children: [
|
|
31
|
+
/* @__PURE__ */ o(
|
|
32
|
+
"input",
|
|
33
|
+
{
|
|
34
|
+
ref: c,
|
|
35
|
+
tabIndex: t ? -1 : 0,
|
|
36
|
+
onChange: g,
|
|
37
|
+
checked: r,
|
|
38
|
+
disabled: t,
|
|
39
|
+
onKeyDown: f,
|
|
40
|
+
className: e("input"),
|
|
41
|
+
type: "checkbox",
|
|
42
|
+
...m
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ o(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
"aria-labelledby": l,
|
|
49
|
+
role: "checkbox",
|
|
50
|
+
"aria-checked": r,
|
|
51
|
+
className: e("slider", "round")
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
s && /* @__PURE__ */ o("span", { className: e("children-container"), children: s })
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
w as T
|
|
59
|
+
};
|
package/dist/toggle.js
CHANGED
package/dist/tooltip.js
CHANGED
|
@@ -1,70 +1,101 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
tooltip:
|
|
8
|
-
"tooltip-content": "_tooltip-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as p, Fragment as D, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as H, useRef as d } from "react";
|
|
3
|
+
import { createPortal as R } from "react-dom";
|
|
4
|
+
import { c as G } from "./bind-06a7ff84.js";
|
|
5
|
+
import { useFloating as P, offset as j, flip as k, arrow as $, autoUpdate as C, FloatingArrow as U } from "@floating-ui/react";
|
|
6
|
+
const Y = {
|
|
7
|
+
"tooltip-wrapper": "_tooltip-wrapper_lwpn2_16",
|
|
8
|
+
"tooltip-content": "_tooltip-content_lwpn2_23"
|
|
9
|
+
}, n = G.bind(Y), Z = 300, q = 100, z = 16, f = 8, B = ["top", "right", "bottom", "left"], tt = ({
|
|
10
|
+
content: u,
|
|
11
|
+
wrapperClassName: h,
|
|
12
|
+
tooltipClassName: w,
|
|
13
|
+
contentClassName: x,
|
|
14
|
+
dynamicWidth: T,
|
|
15
|
+
width: _,
|
|
16
|
+
minWidth: g = 120,
|
|
17
|
+
safeZone: E = 4,
|
|
18
|
+
zIndex: A = 9,
|
|
19
|
+
placement: N = "bottom",
|
|
20
|
+
arrowColor: b = "rgba(34, 34, 34, 0.91)",
|
|
21
|
+
dataAutomationId: I,
|
|
22
|
+
mainAxis: S = !0,
|
|
23
|
+
children: W,
|
|
24
|
+
portalRoot: s,
|
|
25
|
+
isFloating: y = !0
|
|
18
26
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
const [i, l] = H(!1), r = d(null), t = d(), { refs: c, floatingStyles: F, context: L } = P({
|
|
28
|
+
open: i,
|
|
29
|
+
placement: N,
|
|
22
30
|
middleware: [
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
j({
|
|
32
|
+
mainAxis: E + f
|
|
33
|
+
}),
|
|
34
|
+
y && k({
|
|
35
|
+
mainAxis: S,
|
|
36
|
+
fallbackAxisSideDirection: "start",
|
|
37
|
+
fallbackPlacements: B
|
|
38
|
+
}),
|
|
39
|
+
$({
|
|
40
|
+
element: r
|
|
25
41
|
})
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
],
|
|
43
|
+
whileElementsMounted: C
|
|
44
|
+
}), e = T ? null : { width: `${_}px` }, M = document.documentElement.clientWidth, O = e || M - q, a = () => {
|
|
45
|
+
t.current && clearTimeout(t.current), l(!1);
|
|
46
|
+
}, v = () => {
|
|
47
|
+
t.current = setTimeout(() => l(!0), Z);
|
|
48
|
+
}, m = () => /* @__PURE__ */ p(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
ref: c.setFloating,
|
|
52
|
+
style: {
|
|
53
|
+
...F,
|
|
54
|
+
...e,
|
|
55
|
+
minWidth: g,
|
|
56
|
+
zIndex: A
|
|
57
|
+
},
|
|
58
|
+
"data-automation-id": I,
|
|
59
|
+
className: n(w),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ o(
|
|
62
|
+
U,
|
|
63
|
+
{
|
|
64
|
+
ref: r,
|
|
65
|
+
context: L,
|
|
66
|
+
width: z,
|
|
67
|
+
height: f,
|
|
68
|
+
fill: b
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ o(
|
|
55
72
|
"div",
|
|
56
73
|
{
|
|
57
|
-
className: n("tooltip-content"),
|
|
74
|
+
className: n("tooltip-content", x),
|
|
58
75
|
style: {
|
|
59
|
-
maxWidth: `${
|
|
76
|
+
maxWidth: `${O}px`
|
|
60
77
|
},
|
|
61
|
-
children:
|
|
78
|
+
children: u
|
|
62
79
|
}
|
|
63
80
|
)
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
return /* @__PURE__ */ p(D, { children: [
|
|
85
|
+
/* @__PURE__ */ o(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
ref: c.setReference,
|
|
89
|
+
className: n("tooltip-wrapper", h),
|
|
90
|
+
onMouseDown: a,
|
|
91
|
+
onMouseEnter: v,
|
|
92
|
+
onMouseLeave: a,
|
|
93
|
+
children: W
|
|
64
94
|
}
|
|
65
|
-
)
|
|
95
|
+
),
|
|
96
|
+
i && (s ? R(m(), s) : m())
|
|
66
97
|
] });
|
|
67
98
|
};
|
|
68
99
|
export {
|
|
69
|
-
|
|
100
|
+
tt as Tooltip
|
|
70
101
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
const l = (e) => /* @__PURE__ */ C.createElement("svg", { width: 14, height: 3, viewBox: "0 0 14 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.30811 2.47803C1.72868 2.47803 2.05339 2.36206 2.28223 2.13013C2.51107 1.89819 2.62549 1.60596 2.62549 1.25342C2.62549 0.894694 2.51107 0.596273 2.28223 0.358154C2.05339 0.120036 1.72868 0.000976562 1.30811 0.000976562C0.893717 0.000976562 0.572103 0.120036 0.343262 0.358154C0.114421 0.596273 0 0.894694 0 1.25342C0 1.61214 0.117513 1.90592 0.352539 2.13477C0.587565 2.36361 0.906087 2.47803 1.30811 2.47803ZM6.61475 2.47803C7.03532 2.47803 7.36003 2.36206 7.58887 2.13013C7.81771 1.89819 7.93213 1.60596 7.93213 1.25342C7.93213 0.894694 7.81771 0.596273 7.58887 0.358154C7.36003 0.120036 7.03532 0.000976562 6.61475 0.000976562C6.20036 0.000976562 5.87874 0.120036 5.6499 0.358154C5.42106 0.596273 5.30664 0.894694 5.30664 1.25342C5.30664 1.61214 5.42415 1.90592 5.65918 2.13477C5.89421 2.36361 6.21273 2.47803 6.61475 2.47803ZM12.8955 2.13013C12.6667 2.36206 12.342 2.47803 11.9214 2.47803C11.5194 2.47803 11.2008 2.36361 10.9658 2.13477C10.7308 1.90592 10.6133 1.61214 10.6133 1.25342C10.6133 0.894694 10.7277 0.596273 10.9565 0.358154C11.1854 0.120036 11.507 0.000976562 11.9214 0.000976562C12.342 0.000976562 12.6667 0.120036 12.8955 0.358154C13.1243 0.596273 13.2388 0.894694 13.2388 1.25342C13.2388 1.60596 13.1243 1.89819 12.8955 2.13013Z", fill: "#A2AAB5" })), t = (e) => /* @__PURE__ */ C.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("path", { d: "M2 10C2 10.764 2.24187 11.5133 2.69535 12.0801C3.15115 12.6499 3.79637 13 4.5 13H5.9C5.86913 12.8384 5.85293 12.6712 5.85293 12.5C5.85293 12.3288 5.86913 12.1616 5.89999 12H4.5C4.14277 12 3.77057 11.8234 3.47622 11.4554C3.17956 11.0846 3 10.5621 3 10V5.40311C3.41945 5.77926 3.94131 6 4.5 6H5.89996C5.8691 5.83844 5.85289 5.67122 5.85289 5.49998C5.85289 5.32876 5.86909 5.16155 5.89996 5L4.5 5C4.14277 5 3.77057 4.82335 3.47622 4.45542C3.17956 4.08459 3 3.56203 3 2.99994L3 1.5C3 1.22386 2.77614 1 2.5 1C2.22386 1 2 1.22386 2 1.5L2 10Z", fill: "#A2AAB5" }), /* @__PURE__ */ C.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.20583 3.99998H11.5C12.1909 3.99998 12.8529 4.61358 12.8529 5.49998C12.8529 6.38639 12.1909 6.99998 11.5 6.99998H8.20583C7.51487 6.99998 6.85289 6.38639 6.85289 5.49998C6.85289 4.61358 7.51487 3.99998 8.20583 3.99998ZM8.20587 11H11.5C12.1909 11 12.8529 11.6136 12.8529 12.5C12.8529 13.3864 12.1909 14 11.5 14H8.20587C7.51491 14 6.85293 13.3864 6.85293 12.5C6.85293 11.6136 7.51491 11 8.20587 11ZM5.89996 5C6.11796 3.85887 7.06749 2.99998 8.20583 2.99998H11.5C12.7994 2.99998 13.8529 4.11927 13.8529 5.49998C13.8529 6.8807 12.7994 7.99998 11.5 7.99998H8.20583C7.0675 7.99998 6.11798 7.14111 5.89996 6C5.8691 5.83844 5.85289 5.67122 5.85289 5.49998C5.85289 5.32876 5.86909 5.16155 5.89996 5ZM5.89999 12C6.118 10.8589 7.06753 9.99998 8.20587 9.99998H11.5C12.7995 9.99998 13.8529 11.1193 13.8529 12.5C13.8529 13.8807 12.7995 15 11.5 15H8.20587C7.06754 15 6.11801 14.1411 5.9 13H6C6.27614 13 6.5 12.7761 6.5 12.5C6.5 12.2239 6.27614 12 6 12H5.89999Z", fill: "#A2AAB5" }), /* @__PURE__ */ C.createElement("path", { d: "M6.5 12.5C6.5 12.2239 6.27614 12 6 12H5.89999C5.86913 12.1616 5.85293 12.3288 5.85293 12.5C5.85293 12.6712 5.86913 12.8384 5.9 13H6C6.27614 13 6.5 12.7761 6.5 12.5Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
l as S,
|
|
5
|
+
t as a
|
|
6
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reportportal/ui-kit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.90",
|
|
4
4
|
"description": "The UI-kit library for ReportPortal Design System.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
"build:storybook": "storybook build",
|
|
10
10
|
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
11
11
|
"format": "npm run lint -- --fix",
|
|
12
|
-
"test": "
|
|
13
|
-
"test:coverage": "
|
|
12
|
+
"test": "vitest",
|
|
13
|
+
"test:coverage": "vitest run --coverage",
|
|
14
|
+
"test:ci": "vitest run",
|
|
15
|
+
"test:ui": "vitest --ui",
|
|
14
16
|
"prepare": "husky install"
|
|
15
17
|
},
|
|
16
18
|
"files": [
|
|
@@ -29,23 +31,31 @@
|
|
|
29
31
|
"classnames": "^2.3.2",
|
|
30
32
|
"downshift": "^6.1.12",
|
|
31
33
|
"framer-motion": "^10.15.2",
|
|
32
|
-
"rc-scrollbars": "^1.1.6"
|
|
34
|
+
"rc-scrollbars": "^1.1.6",
|
|
35
|
+
"react-datepicker": "^7.6.0"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@storybook/addon-essentials": "^
|
|
36
|
-
"@storybook/addon-interactions": "^
|
|
37
|
-
"@storybook/addon-links": "^
|
|
38
|
-
"@storybook/addon-onboarding": "^
|
|
39
|
-
"@storybook/blocks": "^
|
|
40
|
-
"@storybook/react": "^
|
|
41
|
-
"@storybook/react-vite": "^
|
|
42
|
-
"@storybook/testing-library": "^0.2.
|
|
38
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
39
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
40
|
+
"@storybook/addon-links": "^8.6.14",
|
|
41
|
+
"@storybook/addon-onboarding": "^8.6.14",
|
|
42
|
+
"@storybook/blocks": "^8.6.14",
|
|
43
|
+
"@storybook/react": "^8.6.14",
|
|
44
|
+
"@storybook/react-vite": "^8.6.14",
|
|
45
|
+
"@storybook/testing-library": "^0.2.2",
|
|
46
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
47
|
+
"@testing-library/react": "^16.1.0",
|
|
48
|
+
"@testing-library/user-event": "^14.5.2",
|
|
43
49
|
"@types/node": "^20.4.5",
|
|
44
50
|
"@types/react": "^18.3.3",
|
|
51
|
+
"@types/react-datepicker": "^6.2.0",
|
|
45
52
|
"@types/react-dom": "^18.2.7",
|
|
46
53
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
47
54
|
"@typescript-eslint/parser": "^5.62.0",
|
|
48
55
|
"@vitejs/plugin-react": "^4.0.3",
|
|
56
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
57
|
+
"@vitest/ui": "^2.1.8",
|
|
58
|
+
"date-fns": "^3.6.0",
|
|
49
59
|
"eslint": "^8.46.0",
|
|
50
60
|
"eslint-config-airbnb-typescript": "^15.0.0",
|
|
51
61
|
"eslint-config-prettier": "^8.10.0",
|
|
@@ -55,19 +65,21 @@
|
|
|
55
65
|
"eslint-plugin-react": "^7.33.1",
|
|
56
66
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
57
67
|
"eslint-plugin-react-refresh": "^0.4.3",
|
|
58
|
-
"eslint-plugin-storybook": "^0.
|
|
68
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
59
69
|
"husky": "^8.0.3",
|
|
70
|
+
"jsdom": "^25.0.1",
|
|
60
71
|
"lint-staged": "^13.2.3",
|
|
61
72
|
"prettier": "^3.0.1",
|
|
62
73
|
"react": "18.2.0",
|
|
63
74
|
"react-dom": "18.2.0",
|
|
64
75
|
"sass": "^1.64.1",
|
|
65
|
-
"storybook": "^
|
|
76
|
+
"storybook": "^8.6.14",
|
|
66
77
|
"typescript": "^5.0.2",
|
|
67
|
-
"vite": "^4.
|
|
78
|
+
"vite": "^4.5.14",
|
|
68
79
|
"vite-plugin-dts": "^3.4.0",
|
|
69
80
|
"vite-plugin-svgr": "^3.2.0",
|
|
70
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
81
|
+
"vite-tsconfig-paths": "^4.2.0",
|
|
82
|
+
"vitest": "^2.1.8"
|
|
71
83
|
},
|
|
72
84
|
"repository": {
|
|
73
85
|
"type": "git",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "./bind-06a7ff84.js";
|
|
3
|
-
const b = "_disabled_p6ked_12", i = {
|
|
4
|
-
"base-icon-button": "_base-icon-button_p6ked_1",
|
|
5
|
-
disabled: b
|
|
6
|
-
}, d = c.bind(i), l = ({
|
|
7
|
-
children: s,
|
|
8
|
-
className: o,
|
|
9
|
-
disabled: t = !1,
|
|
10
|
-
onClick: n,
|
|
11
|
-
...e
|
|
12
|
-
}) => /* @__PURE__ */ a(
|
|
13
|
-
"button",
|
|
14
|
-
{
|
|
15
|
-
className: d("base-icon-button", o, { disabled: t }),
|
|
16
|
-
type: "button",
|
|
17
|
-
disabled: t,
|
|
18
|
-
onClick: n,
|
|
19
|
-
...e,
|
|
20
|
-
children: s
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
export {
|
|
24
|
-
l as B
|
|
25
|
-
};
|
package/dist/button-7fb84fde.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as h } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as l } from "react";
|
|
3
|
-
import { c as u } from "./bind-06a7ff84.js";
|
|
4
|
-
const w = "_button_1fbsg_1", x = "_primary_1fbsg_18", y = "_disabled_1fbsg_23", N = "_ghost_1fbsg_35", B = "_danger_1fbsg_53", $ = "_text_1fbsg_69", j = "_icon_1fbsg_115", I = {
|
|
5
|
-
button: w,
|
|
6
|
-
primary: x,
|
|
7
|
-
disabled: y,
|
|
8
|
-
ghost: N,
|
|
9
|
-
danger: B,
|
|
10
|
-
text: $,
|
|
11
|
-
"width-wide-content": "_width-wide-content_1fbsg_105",
|
|
12
|
-
"width-parent": "_width-parent_1fbsg_110",
|
|
13
|
-
icon: j,
|
|
14
|
-
"icon-start": "_icon-start_1fbsg_121",
|
|
15
|
-
"icon-end": "_icon-end_1fbsg_125"
|
|
16
|
-
}, c = u.bind(I), z = l(
|
|
17
|
-
({
|
|
18
|
-
variant: t = "primary",
|
|
19
|
-
icon: e,
|
|
20
|
-
iconPlace: s = "start",
|
|
21
|
-
adjustWidthOn: n = "content",
|
|
22
|
-
type: r = "button",
|
|
23
|
-
children: i,
|
|
24
|
-
disabled: o = !1,
|
|
25
|
-
onClick: a,
|
|
26
|
-
title: b,
|
|
27
|
-
className: d,
|
|
28
|
-
...f
|
|
29
|
-
}, g) => {
|
|
30
|
-
const m = c("button", t, d, {
|
|
31
|
-
disabled: o,
|
|
32
|
-
[`width-${n}`]: n
|
|
33
|
-
}), _ = t === "text" && e;
|
|
34
|
-
return /* @__PURE__ */ p(
|
|
35
|
-
"button",
|
|
36
|
-
{
|
|
37
|
-
ref: g,
|
|
38
|
-
type: r,
|
|
39
|
-
disabled: o,
|
|
40
|
-
className: m,
|
|
41
|
-
onClick: a,
|
|
42
|
-
title: b,
|
|
43
|
-
...f,
|
|
44
|
-
children: [
|
|
45
|
-
_ && /* @__PURE__ */ h(
|
|
46
|
-
"i",
|
|
47
|
-
{
|
|
48
|
-
className: c("icon", {
|
|
49
|
-
[`icon-${s}`]: s
|
|
50
|
-
}),
|
|
51
|
-
children: _
|
|
52
|
-
}
|
|
53
|
-
),
|
|
54
|
-
i
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
export {
|
|
61
|
-
z as B
|
|
62
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsxs as u, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as x } from "./bind-06a7ff84.js";
|
|
3
|
-
import { useRef as m } from "react";
|
|
4
|
-
import { K as k } from "./keyCodes-f63c0e11.js";
|
|
5
|
-
const f = "_checkbox_189ko_1", y = "_disabled_189ko_11", C = "_input_189ko_16", E = "_control_189ko_23", D = "_children_189ko_149", K = {
|
|
6
|
-
checkbox: f,
|
|
7
|
-
disabled: y,
|
|
8
|
-
input: C,
|
|
9
|
-
control: E,
|
|
10
|
-
"partially-checked": "_partially-checked_189ko_76",
|
|
11
|
-
children: D
|
|
12
|
-
}, e = x.bind(K), O = ({
|
|
13
|
-
children: l,
|
|
14
|
-
disabled: c = !1,
|
|
15
|
-
onChange: _,
|
|
16
|
-
className: p,
|
|
17
|
-
value: r,
|
|
18
|
-
partiallyChecked: h,
|
|
19
|
-
...b
|
|
20
|
-
}) => {
|
|
21
|
-
const o = m(null), d = (t) => {
|
|
22
|
-
var a, i;
|
|
23
|
-
const { keyCode: s } = t;
|
|
24
|
-
if (s === k.SPACE_KEY_CODE) {
|
|
25
|
-
t.preventDefault(), (a = o.current) == null || a.click();
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
s === k.ENTER_KEY_CODE && (t.preventDefault(), (i = o.current) == null || i.click());
|
|
29
|
-
};
|
|
30
|
-
return /* @__PURE__ */ u(
|
|
31
|
-
"label",
|
|
32
|
-
{
|
|
33
|
-
id: "rp-ui-kit-checkbox-label",
|
|
34
|
-
className: e("checkbox", p, {
|
|
35
|
-
disabled: c
|
|
36
|
-
}),
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ n(
|
|
39
|
-
"input",
|
|
40
|
-
{
|
|
41
|
-
ref: o,
|
|
42
|
-
tabIndex: 0,
|
|
43
|
-
type: "checkbox",
|
|
44
|
-
onKeyDown: d,
|
|
45
|
-
className: e("input", { "partially-checked": h }),
|
|
46
|
-
disabled: c,
|
|
47
|
-
onChange: _,
|
|
48
|
-
checked: r,
|
|
49
|
-
...b
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
/* @__PURE__ */ n(
|
|
53
|
-
"span",
|
|
54
|
-
{
|
|
55
|
-
"aria-labelledby": "rp-ui-kit-checkbox-label",
|
|
56
|
-
role: "checkbox",
|
|
57
|
-
"aria-checked": r,
|
|
58
|
-
className: e("control", {
|
|
59
|
-
disabled: c
|
|
60
|
-
})
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
l && /* @__PURE__ */ n("span", { className: e("children", { disabled: c }), children: l })
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
export {
|
|
69
|
-
O as C
|
|
70
|
-
};
|