@reportportal/ui-kit 0.0.1-alpha.5 → 0.0.1-alpha.51
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 +252 -3
- package/dist/arrowUp-4a5caee7.js +6 -0
- package/dist/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +7 -0
- package/dist/bubblesLoader-a7e709d4.js +17 -0
- package/dist/bubblesLoader.js +7 -0
- package/dist/button-33c88abf.js +62 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-3e1339ea.js +6 -0
- package/dist/checkbox-9a6c7ce1.js +73 -0
- package/dist/checkbox.js +2 -2
- package/dist/close-4b33d7c1.js +5 -0
- package/dist/common/constants/keyCodes.d.ts +24 -0
- package/dist/common/types.d.ts +3 -0
- package/dist/components/baseIconButton/baseIconButton.d.ts +8 -0
- package/dist/components/baseIconButton/index.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 +0 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -1
- package/dist/components/datePicker/datePicker.d.ts +24 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +15 -0
- package/dist/components/datePicker/header/index.d.ts +3 -0
- package/dist/components/datePicker/index.d.ts +3 -0
- package/dist/components/datePicker/utils.d.ts +3 -0
- package/dist/components/dropdown/constants.d.ts +7 -0
- package/dist/components/dropdown/dropdown.d.ts +28 -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 +22 -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 +10 -3
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +15 -0
- package/dist/components/fieldTextFlex/index.d.ts +3 -0
- package/dist/components/icons/index.d.ts +32 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/components/maxValueDisplay/index.d.ts +3 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +7 -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 +6 -2
- package/dist/components/modal/modalContent/modalContent.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -1
- 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/bar/bar.d.ts +11 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +11 -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/spinLoader/index.d.ts +3 -0
- package/dist/components/spinLoader/spinLoader.d.ts +7 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +3 -0
- package/dist/components/systemAlert/types.d.ts +15 -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 +53 -0
- package/dist/components/table/utils.d.ts +3 -0
- package/dist/components/themeProvider/themeProvider.d.ts +2 -1
- 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 +19 -0
- package/dist/datePicker-0480f3fb.js +193 -0
- package/dist/datePicker.js +24 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-6edea86c.js +263 -0
- package/dist/dropdown.js +16 -0
- package/dist/fieldNumber-d81e551e.js +125 -0
- package/dist/fieldNumber.js +11 -0
- package/dist/fieldText-43787c48.js +160 -0
- package/dist/fieldText.js +5 -1
- package/dist/fieldTextFlex-23d6ecce.js +78 -0
- package/dist/fieldTextFlex.js +9 -0
- package/dist/icons.js +44 -0
- package/dist/index.js +88 -13
- package/dist/keyCodes-f63c0e11.js +4 -0
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/modal.js +111 -102
- package/dist/openEye-7b9cf080.js +7 -0
- package/dist/pagination-09b1f2af.js +345 -0
- package/dist/pagination.js +18 -0
- package/dist/plus-0929dda4.js +6 -0
- package/dist/popover.js +95 -0
- package/dist/prevPage-87faf576.js +6 -0
- package/dist/radio-bccc84f2.js +76 -0
- package/dist/radio.js +9 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -1
- package/dist/success-dc1914aa.js +7 -0
- package/dist/systemAlert.js +63 -0
- package/dist/systemMessage-1ced6079.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-32fc8c70.js +144 -0
- package/dist/table.js +11 -0
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +4 -3
- package/dist/toggle-1a3aacb5.js +59 -0
- package/dist/toggle.js +9 -0
- package/dist/tooltip.js +96 -0
- package/dist/useOnClickOutside-c332f7d3.js +16 -0
- package/package.json +54 -15
- package/dist/button-d4944dbc.js +0 -64
- package/dist/checkbox-7736509c.js +0 -70
- package/dist/common/constants/key-codes.d.ts +0 -5
- package/dist/fieldText-9621b0b7.js +0 -99
- package/dist/key-codes-abbe7725.js +0 -4
- package/dist/systemMessage-62c3133d.js +0 -30
- package/dist/themeProvider-5800417e.js +0 -19
package/dist/table.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { T as r } from "./table-32fc8c70.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "./bind-06a7ff84.js";
|
|
5
|
+
import "./arrowUp-4a5caee7.js";
|
|
6
|
+
import "./checkbox-9a6c7ce1.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
|
+
};
|
package/dist/themeProvider.js
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as g, jsx as s } 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_1bvir_1", E = "_slider_1bvir_27", v = "_round_1bvir_47", D = "_input_1bvir_51", K = "_disabled_1bvir_92", N = {
|
|
6
|
+
toggle: y,
|
|
7
|
+
"children-container": "_children-container_1bvir_14",
|
|
8
|
+
slider: E,
|
|
9
|
+
round: v,
|
|
10
|
+
input: D,
|
|
11
|
+
disabled: K
|
|
12
|
+
}, e = h.bind(N), j = ({
|
|
13
|
+
children: t,
|
|
14
|
+
value: c,
|
|
15
|
+
onChange: u,
|
|
16
|
+
className: b,
|
|
17
|
+
disabled: n = !1,
|
|
18
|
+
title: p,
|
|
19
|
+
...m
|
|
20
|
+
}) => {
|
|
21
|
+
const r = k(null), i = x(), f = (o) => {
|
|
22
|
+
var a, d;
|
|
23
|
+
const { keyCode: l } = o;
|
|
24
|
+
if (l === _.SPACE_KEY_CODE) {
|
|
25
|
+
o.preventDefault(), (a = r.current) == null || a.click();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
l === _.ENTER_KEY_CODE && (o.preventDefault(), (d = r.current) == null || d.click());
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ g("label", { id: i, title: p, className: e("toggle", b, { disabled: n }), children: [
|
|
31
|
+
/* @__PURE__ */ s(
|
|
32
|
+
"input",
|
|
33
|
+
{
|
|
34
|
+
ref: r,
|
|
35
|
+
tabIndex: n ? -1 : 0,
|
|
36
|
+
onChange: u,
|
|
37
|
+
checked: c,
|
|
38
|
+
disabled: n,
|
|
39
|
+
onKeyDown: f,
|
|
40
|
+
className: e("input"),
|
|
41
|
+
type: "checkbox",
|
|
42
|
+
...m
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ s(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
"aria-labelledby": i,
|
|
49
|
+
role: "checkbox",
|
|
50
|
+
"aria-checked": c,
|
|
51
|
+
className: e("slider", "round")
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
t && /* @__PURE__ */ s("span", { className: e("children-container"), children: t })
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
j as T
|
|
59
|
+
};
|
package/dist/toggle.js
ADDED
package/dist/tooltip.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsxs as c, Fragment as L, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, useRef as a } from "react";
|
|
3
|
+
import { c as O } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useFloating as R, offset as v, flip as D, arrow as H, autoUpdate as G, FloatingArrow as j } from "@floating-ui/react";
|
|
5
|
+
const k = {
|
|
6
|
+
"tooltip-wrapper": "_tooltip-wrapper_18ppz_16",
|
|
7
|
+
"tooltip-content": "_tooltip-content_18ppz_23"
|
|
8
|
+
}, p = O.bind(k), z = 300, P = 100, $ = 16, d = 8, U = ["top", "right", "bottom", "left"], C = ({
|
|
9
|
+
content: m,
|
|
10
|
+
wrapperClassName: f,
|
|
11
|
+
contentClassName: u,
|
|
12
|
+
dynamicWidth: h,
|
|
13
|
+
width: w,
|
|
14
|
+
minWidth: x = 120,
|
|
15
|
+
safeZone: T = 4,
|
|
16
|
+
zIndex: _ = 9,
|
|
17
|
+
placement: E = "bottom",
|
|
18
|
+
arrowColor: g = "rgba(34, 34, 34, 0.91)",
|
|
19
|
+
dataAutomationId: A,
|
|
20
|
+
mainAxis: b = !0,
|
|
21
|
+
children: I
|
|
22
|
+
}) => {
|
|
23
|
+
const [n, s] = M(!1), i = a(null), t = a(), { refs: l, floatingStyles: N, context: S } = R({
|
|
24
|
+
open: n,
|
|
25
|
+
placement: E,
|
|
26
|
+
middleware: [
|
|
27
|
+
v({
|
|
28
|
+
mainAxis: T + d
|
|
29
|
+
}),
|
|
30
|
+
D({
|
|
31
|
+
mainAxis: b,
|
|
32
|
+
fallbackAxisSideDirection: "start",
|
|
33
|
+
fallbackPlacements: U
|
|
34
|
+
}),
|
|
35
|
+
H({
|
|
36
|
+
element: i
|
|
37
|
+
})
|
|
38
|
+
],
|
|
39
|
+
whileElementsMounted: G
|
|
40
|
+
}), e = h ? null : { width: `${w}px` }, W = document.documentElement.clientWidth, y = e || W - P, r = () => {
|
|
41
|
+
t.current && clearTimeout(t.current), s(!1);
|
|
42
|
+
}, F = () => {
|
|
43
|
+
t.current = setTimeout(() => s(!0), z);
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ c(L, { children: [
|
|
46
|
+
/* @__PURE__ */ o(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref: l.setReference,
|
|
50
|
+
className: p("tooltip-wrapper", f),
|
|
51
|
+
onMouseDown: r,
|
|
52
|
+
onMouseEnter: F,
|
|
53
|
+
onMouseLeave: r,
|
|
54
|
+
children: I
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
n && /* @__PURE__ */ c(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
ref: l.setFloating,
|
|
61
|
+
style: {
|
|
62
|
+
...N,
|
|
63
|
+
...e,
|
|
64
|
+
minWidth: x,
|
|
65
|
+
zIndex: _
|
|
66
|
+
},
|
|
67
|
+
"data-automation-id": A,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ o(
|
|
70
|
+
j,
|
|
71
|
+
{
|
|
72
|
+
ref: i,
|
|
73
|
+
context: S,
|
|
74
|
+
width: $,
|
|
75
|
+
height: d,
|
|
76
|
+
fill: g
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ o(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
className: p("tooltip-content", u),
|
|
83
|
+
style: {
|
|
84
|
+
maxWidth: `${y}px`
|
|
85
|
+
},
|
|
86
|
+
children: m
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
] });
|
|
93
|
+
};
|
|
94
|
+
export {
|
|
95
|
+
C as Tooltip
|
|
96
|
+
};
|
|
@@ -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,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reportportal/ui-kit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.51",
|
|
4
|
+
"description": "The UI-kit library for ReportPortal Design System.",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
+
"start": "storybook dev -p 6006",
|
|
7
8
|
"build": "tsc && vite build",
|
|
8
9
|
"build:storybook": "storybook build",
|
|
9
10
|
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
10
11
|
"format": "npm run lint -- --fix",
|
|
12
|
+
"test": "vitest",
|
|
13
|
+
"test:coverage": "vitest run --coverage",
|
|
14
|
+
"test:ci": "vitest run",
|
|
15
|
+
"test:ui": "vitest --ui",
|
|
11
16
|
"prepare": "husky install"
|
|
12
17
|
},
|
|
13
18
|
"files": [
|
|
@@ -21,25 +26,36 @@
|
|
|
21
26
|
"react-dom": "17.x-18.x"
|
|
22
27
|
},
|
|
23
28
|
"dependencies": {
|
|
29
|
+
"@floating-ui/react": "^0.26.16",
|
|
30
|
+
"@floating-ui/react-dom": "^2.0.1",
|
|
24
31
|
"classnames": "^2.3.2",
|
|
32
|
+
"downshift": "^6.1.12",
|
|
25
33
|
"framer-motion": "^10.15.2",
|
|
26
|
-
"rc-scrollbars": "^1.1.6"
|
|
34
|
+
"rc-scrollbars": "^1.1.6",
|
|
35
|
+
"react-datepicker": "^7.3.0"
|
|
27
36
|
},
|
|
28
37
|
"devDependencies": {
|
|
29
|
-
"@storybook/addon-essentials": "^
|
|
30
|
-
"@storybook/addon-interactions": "^
|
|
31
|
-
"@storybook/addon-links": "^
|
|
32
|
-
"@storybook/addon-onboarding": "^
|
|
33
|
-
"@storybook/blocks": "^
|
|
34
|
-
"@storybook/react": "^
|
|
35
|
-
"@storybook/react-vite": "^
|
|
36
|
-
"@storybook/testing-library": "^0.2.
|
|
38
|
+
"@storybook/addon-essentials": "^8.2.9",
|
|
39
|
+
"@storybook/addon-interactions": "^8.2.9",
|
|
40
|
+
"@storybook/addon-links": "^8.2.9",
|
|
41
|
+
"@storybook/addon-onboarding": "^8.2.9",
|
|
42
|
+
"@storybook/blocks": "^8.2.9",
|
|
43
|
+
"@storybook/react": "^8.2.9",
|
|
44
|
+
"@storybook/react-vite": "^8.2.9",
|
|
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",
|
|
37
49
|
"@types/node": "^20.4.5",
|
|
38
|
-
"@types/react": "^18.
|
|
50
|
+
"@types/react": "^18.3.3",
|
|
51
|
+
"@types/react-datepicker": "^6.2.0",
|
|
39
52
|
"@types/react-dom": "^18.2.7",
|
|
40
53
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
41
54
|
"@typescript-eslint/parser": "^5.62.0",
|
|
42
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",
|
|
43
59
|
"eslint": "^8.46.0",
|
|
44
60
|
"eslint-config-airbnb-typescript": "^15.0.0",
|
|
45
61
|
"eslint-config-prettier": "^8.10.0",
|
|
@@ -49,18 +65,41 @@
|
|
|
49
65
|
"eslint-plugin-react": "^7.33.1",
|
|
50
66
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
51
67
|
"eslint-plugin-react-refresh": "^0.4.3",
|
|
52
|
-
"eslint-plugin-storybook": "^0.
|
|
68
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
53
69
|
"husky": "^8.0.3",
|
|
70
|
+
"jsdom": "^25.0.1",
|
|
54
71
|
"lint-staged": "^13.2.3",
|
|
55
72
|
"prettier": "^3.0.1",
|
|
56
73
|
"react": "18.2.0",
|
|
57
74
|
"react-dom": "18.2.0",
|
|
58
75
|
"sass": "^1.64.1",
|
|
59
|
-
"storybook": "^
|
|
76
|
+
"storybook": "^8.2.9",
|
|
60
77
|
"typescript": "^5.0.2",
|
|
61
78
|
"vite": "^4.4.5",
|
|
62
79
|
"vite-plugin-dts": "^3.4.0",
|
|
63
80
|
"vite-plugin-svgr": "^3.2.0",
|
|
64
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
81
|
+
"vite-tsconfig-paths": "^4.2.0",
|
|
82
|
+
"vitest": "^2.1.8"
|
|
83
|
+
},
|
|
84
|
+
"repository": {
|
|
85
|
+
"type": "git",
|
|
86
|
+
"url": "git+https://github.com/reportportal/ui-kit.git"
|
|
87
|
+
},
|
|
88
|
+
"author": "ReportPortal.io",
|
|
89
|
+
"license": "Apache-2.0",
|
|
90
|
+
"bugs": {
|
|
91
|
+
"url": "https://github.com/reportportal/ui-kit/issues"
|
|
92
|
+
},
|
|
93
|
+
"homepage": "https://github.com/reportportal/ui-kit#readme",
|
|
94
|
+
"keywords": [
|
|
95
|
+
"react",
|
|
96
|
+
"react-components",
|
|
97
|
+
"design-systems",
|
|
98
|
+
"ui-kit",
|
|
99
|
+
"reportportal",
|
|
100
|
+
"epam"
|
|
101
|
+
],
|
|
102
|
+
"engines": {
|
|
103
|
+
"node": ">=16.x"
|
|
65
104
|
}
|
|
66
105
|
}
|
package/dist/button-d4944dbc.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as x } from "react";
|
|
3
|
-
import { c as f } from "./bind-06a7ff84.js";
|
|
4
|
-
const g = "_button_wutm5_1", y = "_primary_wutm5_19", N = "_disabled_wutm5_24", B = "_ghost_wutm5_36", $ = "_danger_wutm5_51", j = "_text_wutm5_67", I = "_icon_wutm5_113", R = {
|
|
5
|
-
button: g,
|
|
6
|
-
primary: y,
|
|
7
|
-
disabled: N,
|
|
8
|
-
ghost: B,
|
|
9
|
-
danger: $,
|
|
10
|
-
text: j,
|
|
11
|
-
"width-wide-content": "_width-wide-content_wutm5_103",
|
|
12
|
-
"width-parent": "_width-parent_wutm5_108",
|
|
13
|
-
icon: I,
|
|
14
|
-
"icon-start": "_icon-start_wutm5_119",
|
|
15
|
-
"icon-end": "_icon-end_wutm5_123"
|
|
16
|
-
}, c = f.bind(R), A = x(
|
|
17
|
-
({
|
|
18
|
-
variant: t = "primary",
|
|
19
|
-
icon: e,
|
|
20
|
-
iconPlace: n = "start",
|
|
21
|
-
adjustWidthOn: o = "content",
|
|
22
|
-
type: i = "button",
|
|
23
|
-
children: r,
|
|
24
|
-
disabled: s = !1,
|
|
25
|
-
onClick: a,
|
|
26
|
-
title: m,
|
|
27
|
-
className: d,
|
|
28
|
-
dataAutomationId: u,
|
|
29
|
-
...w
|
|
30
|
-
}, b) => {
|
|
31
|
-
const p = c("button", t, d, {
|
|
32
|
-
disabled: s,
|
|
33
|
-
[`width-${o}`]: o
|
|
34
|
-
}), _ = t === "text" && e;
|
|
35
|
-
return /* @__PURE__ */ h(
|
|
36
|
-
"button",
|
|
37
|
-
{
|
|
38
|
-
ref: b,
|
|
39
|
-
type: i,
|
|
40
|
-
disabled: s,
|
|
41
|
-
className: p,
|
|
42
|
-
onClick: a,
|
|
43
|
-
title: m,
|
|
44
|
-
"data-automation-id": u,
|
|
45
|
-
...w,
|
|
46
|
-
children: [
|
|
47
|
-
_ && /* @__PURE__ */ l(
|
|
48
|
-
"i",
|
|
49
|
-
{
|
|
50
|
-
className: c("icon", {
|
|
51
|
-
[`icon-${n}`]: n
|
|
52
|
-
}),
|
|
53
|
-
children: _
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
r
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
export {
|
|
63
|
-
A as B
|
|
64
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as m } from "./bind-06a7ff84.js";
|
|
3
|
-
import { useRef as x } from "react";
|
|
4
|
-
import { K as p } from "./key-codes-abbe7725.js";
|
|
5
|
-
const f = "_checkbox_1gq3p_1", y = "_disabled_1gq3p_12", C = "_input_1gq3p_17", E = "_control_1gq3p_24", D = "_children_1gq3p_78", K = {
|
|
6
|
-
checkbox: f,
|
|
7
|
-
disabled: y,
|
|
8
|
-
input: C,
|
|
9
|
-
control: E,
|
|
10
|
-
children: D
|
|
11
|
-
}, e = m.bind(K), j = ({
|
|
12
|
-
children: s,
|
|
13
|
-
disabled: c = !1,
|
|
14
|
-
onChange: _,
|
|
15
|
-
className: b,
|
|
16
|
-
value: r,
|
|
17
|
-
dataAutomationId: h,
|
|
18
|
-
...k
|
|
19
|
-
}) => {
|
|
20
|
-
const o = x(null), u = (t) => {
|
|
21
|
-
var l, i;
|
|
22
|
-
const { keyCode: a } = t;
|
|
23
|
-
if (a === p.SPACE_KEY_CODE) {
|
|
24
|
-
t.preventDefault(), (l = o.current) == null || l.click();
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
a === p.ENTER_KEY_CODE && (t.preventDefault(), (i = o.current) == null || i.click());
|
|
28
|
-
};
|
|
29
|
-
return /* @__PURE__ */ d(
|
|
30
|
-
"label",
|
|
31
|
-
{
|
|
32
|
-
id: "rp-ui-kit-checkbox-label",
|
|
33
|
-
className: e("checkbox", b, {
|
|
34
|
-
disabled: c
|
|
35
|
-
}),
|
|
36
|
-
"data-automation-id": h,
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ n(
|
|
39
|
-
"input",
|
|
40
|
-
{
|
|
41
|
-
ref: o,
|
|
42
|
-
tabIndex: 0,
|
|
43
|
-
type: "checkbox",
|
|
44
|
-
onKeyDown: u,
|
|
45
|
-
className: e("input"),
|
|
46
|
-
disabled: c,
|
|
47
|
-
onChange: _,
|
|
48
|
-
checked: r,
|
|
49
|
-
...k
|
|
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
|
-
s && /* @__PURE__ */ n("span", { className: e("children", { disabled: c }), children: s })
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
export {
|
|
69
|
-
j as C
|
|
70
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as t, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import * as o from "react";
|
|
3
|
-
import { forwardRef as A } from "react";
|
|
4
|
-
import { c as F } from "./bind-06a7ff84.js";
|
|
5
|
-
const R = (c) => /* @__PURE__ */ o.createElement("svg", { width: 17, height: 17, viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ o.createElement("rect", { width: 16.2089, height: 16.1568, rx: 8.07842, fill: "#A2AAB5" }), /* @__PURE__ */ o.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.14768 5.14645C4.95077 5.34171 4.95077 5.65829 5.14768 5.85355L7.49578 8.18198L5.35655 10.3033C5.15963 10.4986 5.15963 10.8151 5.35655 11.0104C5.55346 11.2057 5.87271 11.2057 6.06962 11.0104L8.20886 8.88909L10.1392 10.8033C10.3361 10.9986 10.6554 10.9986 10.8523 10.8033C11.0492 10.608 11.0492 10.2915 10.8523 10.0962L8.92193 8.18198L11.0612 6.06065C11.2581 5.86539 11.2581 5.54881 11.0612 5.35355C10.8643 5.15828 10.545 5.15828 10.3481 5.35355L8.20886 7.47487L5.86076 5.14645C5.66385 4.95118 5.34459 4.95118 5.14768 5.14645Z", fill: "white" })), j = "_label_11rxn_18", y = "_asterisk_11rxn_27", B = "_disabled_11rxn_33", M = "_field_11rxn_37", S = "_error_11rxn_51", Z = "_touched_11rxn_51", z = "_input_11rxn_65", D = "_placeholder_11rxn_88", G = "_icon_11rxn_1", H = "_text_11rxn_151", J = {
|
|
6
|
-
"icon-container": "_icon-container_11rxn_1",
|
|
7
|
-
"icon-container-end": "_icon-container-end_11rxn_1",
|
|
8
|
-
"icon-container-start": "_icon-container-start_11rxn_1",
|
|
9
|
-
label: j,
|
|
10
|
-
asterisk: y,
|
|
11
|
-
disabled: B,
|
|
12
|
-
field: M,
|
|
13
|
-
error: S,
|
|
14
|
-
touched: Z,
|
|
15
|
-
"default-width": "_default-width_11rxn_61",
|
|
16
|
-
"input-container": "_input-container_11rxn_65",
|
|
17
|
-
input: z,
|
|
18
|
-
placeholder: D,
|
|
19
|
-
icon: G,
|
|
20
|
-
"clear-icon": "_clear-icon_11rxn_108",
|
|
21
|
-
"additional-content": "_additional-content_11rxn_144",
|
|
22
|
-
text: H,
|
|
23
|
-
"error-text": "_error-text_11rxn_159",
|
|
24
|
-
"help-text": "_help-text_11rxn_163"
|
|
25
|
-
}, n = F.bind(J), Q = A(
|
|
26
|
-
({
|
|
27
|
-
value: c,
|
|
28
|
-
className: N,
|
|
29
|
-
error: r,
|
|
30
|
-
placeholder: _,
|
|
31
|
-
disabled: a = !1,
|
|
32
|
-
onChange: u,
|
|
33
|
-
touched: i = !1,
|
|
34
|
-
title: w,
|
|
35
|
-
label: s,
|
|
36
|
-
helpText: l,
|
|
37
|
-
defaultWidth: C = !0,
|
|
38
|
-
startIcon: d,
|
|
39
|
-
endIcon: x,
|
|
40
|
-
clearable: L = !1,
|
|
41
|
-
onClear: p,
|
|
42
|
-
isRequired: h = !1,
|
|
43
|
-
hasDoubleMessage: g = !1,
|
|
44
|
-
type: k = "text",
|
|
45
|
-
...v
|
|
46
|
-
}, b) => {
|
|
47
|
-
const E = () => {
|
|
48
|
-
p && p(c);
|
|
49
|
-
}, m = /* @__PURE__ */ e("span", { className: n("text", "help-text"), children: l });
|
|
50
|
-
return /* @__PURE__ */ t(f, { children: [
|
|
51
|
-
s && /* @__PURE__ */ t("span", { className: n("label", { disabled: a }), children: [
|
|
52
|
-
s,
|
|
53
|
-
h && /* @__PURE__ */ e("span", { className: n("asterisk"), children: "*" })
|
|
54
|
-
] }),
|
|
55
|
-
/* @__PURE__ */ t(
|
|
56
|
-
"div",
|
|
57
|
-
{
|
|
58
|
-
className: n("field", N, {
|
|
59
|
-
error: r,
|
|
60
|
-
touched: i,
|
|
61
|
-
disabled: a,
|
|
62
|
-
"default-width": C
|
|
63
|
-
}),
|
|
64
|
-
title: w,
|
|
65
|
-
children: [
|
|
66
|
-
d && /* @__PURE__ */ e("span", { className: n("icon-container-start"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: d }) }),
|
|
67
|
-
/* @__PURE__ */ t("span", { className: n("input-container"), children: [
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
"input",
|
|
70
|
-
{
|
|
71
|
-
ref: b,
|
|
72
|
-
type: k,
|
|
73
|
-
className: n("input"),
|
|
74
|
-
value: c,
|
|
75
|
-
disabled: a,
|
|
76
|
-
onChange: u,
|
|
77
|
-
...v
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
_ && !c && /* @__PURE__ */ t("span", { className: n("placeholder"), children: [
|
|
81
|
-
_,
|
|
82
|
-
h && !s && /* @__PURE__ */ e("span", { className: n("asterisk") })
|
|
83
|
-
] })
|
|
84
|
-
] }),
|
|
85
|
-
x && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: x }) }),
|
|
86
|
-
L && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("button", { type: "button", className: n("clear-icon", { disabled: a }), onClick: E, children: /* @__PURE__ */ e(R, {}) }) })
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
(r && i || l) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: a }), children: r && i ? /* @__PURE__ */ t(f, { children: [
|
|
91
|
-
/* @__PURE__ */ e("span", { className: n("text", "error-text"), children: r }),
|
|
92
|
-
g && m
|
|
93
|
-
] }) : l && m })
|
|
94
|
-
] });
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
export {
|
|
98
|
-
Q as F
|
|
99
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { c as _ } from "./bind-06a7ff84.js";
|
|
3
|
-
const c = "_children_19dbq_54", m = {
|
|
4
|
-
"system-message": "_system-message_19dbq_1",
|
|
5
|
-
"stripes-info": "_stripes-info_19dbq_12",
|
|
6
|
-
"stripes-warning": "_stripes-warning_19dbq_17",
|
|
7
|
-
"stripes-error": "_stripes-error_19dbq_22",
|
|
8
|
-
"text-container": "_text-container_19dbq_27",
|
|
9
|
-
"message-header-info": "_message-header-info_19dbq_30",
|
|
10
|
-
"message-header-warning": "_message-header-warning_19dbq_38",
|
|
11
|
-
"message-header-error": "_message-header-error_19dbq_46",
|
|
12
|
-
children: c,
|
|
13
|
-
"content-width": "_content-width_19dbq_70"
|
|
14
|
-
}, e = _.bind(m), l = ({
|
|
15
|
-
header: r,
|
|
16
|
-
caption: a,
|
|
17
|
-
children: i,
|
|
18
|
-
mode: n = "info",
|
|
19
|
-
widthByContent: d = !1
|
|
20
|
-
}) => /* @__PURE__ */ t("div", { className: e("system-message", { "content-width": d }), children: [
|
|
21
|
-
/* @__PURE__ */ s("div", { className: e(`stripes-${n}`) }),
|
|
22
|
-
/* @__PURE__ */ t("div", { className: e("text-container"), children: [
|
|
23
|
-
r && /* @__PURE__ */ s("h1", { className: e(`message-header-${n}`), children: r }),
|
|
24
|
-
/* @__PURE__ */ s("div", { className: e("children"), children: i }),
|
|
25
|
-
a && /* @__PURE__ */ s("p", { children: a })
|
|
26
|
-
] })
|
|
27
|
-
] });
|
|
28
|
-
export {
|
|
29
|
-
l as S
|
|
30
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
-
const e = {
|
|
3
|
-
light: "rp-ui-kit-theme-light",
|
|
4
|
-
dark: "rp-ui-kit-theme-dark"
|
|
5
|
-
};
|
|
6
|
-
function o({
|
|
7
|
-
children: t,
|
|
8
|
-
theme: i = "light",
|
|
9
|
-
customThemes: r = {}
|
|
10
|
-
}) {
|
|
11
|
-
const s = {
|
|
12
|
-
...e,
|
|
13
|
-
...r
|
|
14
|
-
}[i] || e.light;
|
|
15
|
-
return /* @__PURE__ */ h("div", { className: s, children: t });
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
o as T
|
|
19
|
-
};
|