@reportportal/ui-kit 0.0.1-alpha.2 → 0.0.1-alpha.21
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 +229 -3
- package/dist/baseIconButton-b6adc843.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-bb309472.js +62 -0
- package/dist/button.js +2 -2
- package/dist/checkbox-6777be17.js +73 -0
- package/dist/checkbox.js +3 -2
- 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 +6 -7
- package/dist/components/button/index.d.ts +2 -1
- package/dist/components/checkbox/checkbox.d.ts +5 -7
- 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 +24 -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 +15 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/modal/index.d.ts +4 -0
- package/dist/components/modal/modal.d.ts +23 -0
- package/dist/components/modal/modalContent/index.d.ts +1 -0
- package/dist/components/modal/modalContent/modalContent.d.ts +7 -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/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/table/index.d.ts +3 -0
- package/dist/components/table/table.d.ts +3 -0
- package/dist/components/table/types.d.ts +49 -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 +14 -0
- package/dist/dropdown-c21b0d67.js +216 -0
- package/dist/dropdown.js +14 -0
- package/dist/fieldNumber-d20f48d6.js +127 -0
- package/dist/fieldNumber.js +10 -0
- package/dist/fieldText-6eff8292.js +102 -0
- package/dist/fieldText.js +9 -0
- package/dist/fieldTextFlex-5bddf46a.js +67 -0
- package/dist/fieldTextFlex.js +8 -0
- package/dist/index-5022804a.js +147 -0
- package/dist/index.js +246 -11
- package/dist/keyCodes-f63c0e11.js +4 -0
- package/dist/modal.js +16 -0
- package/dist/pagination-5e576cb2.js +346 -0
- package/dist/pagination.js +15 -0
- package/dist/popover.js +95 -0
- package/dist/radio-c5fae439.js +76 -0
- package/dist/radio.js +9 -0
- package/dist/style.css +1 -1
- package/dist/systemMessage-1ced6079.js +30 -0
- package/dist/systemMessage.js +2 -2
- package/dist/table-7fdc18e0.js +147 -0
- package/dist/table.js +11 -0
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +4 -3
- package/dist/toggle-9284387b.js +67 -0
- package/dist/toggle.js +9 -0
- package/dist/tooltip.js +71 -0
- package/dist/useOnClickOutside-c332f7d3.js +16 -0
- package/package.json +96 -64
- package/dist/bind-e1346f99.js +0 -44
- package/dist/button-a4d3df83.js +0 -1867
- package/dist/checkbox-3fd4bcc1.js +0 -74
- package/dist/constants/key-codes.d.ts +0 -4
- package/dist/systemMessage-55cf51f4.js +0 -30
- package/dist/themeProvider-5800417e.js +0 -19
package/dist/tooltip.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as g, Fragment as y, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as E, useRef as N } from "react";
|
|
3
|
+
import { c as O } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useFloating as S, flip as W } from "@floating-ui/react-dom";
|
|
5
|
+
const v = "_tooltip_7bl3z_1", z = {
|
|
6
|
+
"tooltip-wrapper": "_tooltip-wrapper_7bl3z_1",
|
|
7
|
+
tooltip: v,
|
|
8
|
+
"tooltip-content": "_tooltip-content_7bl3z_26",
|
|
9
|
+
"tooltip-arrow": "_tooltip-arrow_7bl3z_39"
|
|
10
|
+
}, n = O.bind(z), F = 300, M = 100, I = ({
|
|
11
|
+
content: c,
|
|
12
|
+
wrapperClassName: a,
|
|
13
|
+
contentClassName: p,
|
|
14
|
+
dynamicWidth: d,
|
|
15
|
+
width: m,
|
|
16
|
+
placement: u = "bottom",
|
|
17
|
+
dataAutomationId: f,
|
|
18
|
+
children: _
|
|
19
|
+
}) => {
|
|
20
|
+
const [h, i] = E(!1), t = N(), { refs: s, floatingStyles: w } = S({
|
|
21
|
+
placement: u,
|
|
22
|
+
strategy: "fixed",
|
|
23
|
+
middleware: [
|
|
24
|
+
W({
|
|
25
|
+
fallbackPlacements: ["bottom", "top", "right", "left"]
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
}), o = d ? null : { width: `${m}px` }, x = document.documentElement.clientWidth, b = o || x - M, r = () => {
|
|
29
|
+
t.current && clearTimeout(t.current), i(!1);
|
|
30
|
+
}, T = () => {
|
|
31
|
+
t.current = setTimeout(() => i(!0), F);
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ g(y, { children: [
|
|
34
|
+
/* @__PURE__ */ l(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
ref: (e) => s.setReference(e),
|
|
38
|
+
className: n("tooltip-wrapper", a),
|
|
39
|
+
onMouseDown: r,
|
|
40
|
+
onMouseEnter: T,
|
|
41
|
+
onMouseLeave: r,
|
|
42
|
+
children: _
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
h && /* @__PURE__ */ l(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: n("tooltip"),
|
|
49
|
+
ref: (e) => s.setFloating(e),
|
|
50
|
+
style: {
|
|
51
|
+
...w,
|
|
52
|
+
...o
|
|
53
|
+
},
|
|
54
|
+
"data-automation-id": f,
|
|
55
|
+
children: /* @__PURE__ */ l(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: n("tooltip-content", p),
|
|
59
|
+
style: {
|
|
60
|
+
maxWidth: `${b}px`
|
|
61
|
+
},
|
|
62
|
+
children: c
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] });
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
I as Tooltip
|
|
71
|
+
};
|
|
@@ -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,96 @@
|
|
|
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
|
-
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"eslint-plugin
|
|
49
|
-
"eslint
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@reportportal/ui-kit",
|
|
3
|
+
"version": "0.0.1-alpha.21",
|
|
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
|
+
"react-datepicker": "^7.3.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@storybook/addon-essentials": "^7.2.0",
|
|
37
|
+
"@storybook/addon-interactions": "^7.2.0",
|
|
38
|
+
"@storybook/addon-links": "^7.2.0",
|
|
39
|
+
"@storybook/addon-onboarding": "^1.0.8",
|
|
40
|
+
"@storybook/blocks": "^7.2.0",
|
|
41
|
+
"@storybook/react": "^7.2.0",
|
|
42
|
+
"@storybook/react-vite": "^7.2.0",
|
|
43
|
+
"@storybook/testing-library": "^0.2.0",
|
|
44
|
+
"@types/node": "^20.4.5",
|
|
45
|
+
"@types/react": "^18.3.3",
|
|
46
|
+
"@types/react-datepicker": "^6.2.0",
|
|
47
|
+
"@types/react-dom": "^18.2.7",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
49
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
50
|
+
"@vitejs/plugin-react": "^4.0.3",
|
|
51
|
+
"date-fns": "^3.6.0",
|
|
52
|
+
"eslint": "^8.46.0",
|
|
53
|
+
"eslint-config-airbnb-typescript": "^15.0.0",
|
|
54
|
+
"eslint-config-prettier": "^8.10.0",
|
|
55
|
+
"eslint-import-resolver-typescript": "^3.6.0",
|
|
56
|
+
"eslint-plugin-import": "^2.28.0",
|
|
57
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
58
|
+
"eslint-plugin-react": "^7.33.1",
|
|
59
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
60
|
+
"eslint-plugin-react-refresh": "^0.4.3",
|
|
61
|
+
"eslint-plugin-storybook": "^0.6.13",
|
|
62
|
+
"husky": "^8.0.3",
|
|
63
|
+
"lint-staged": "^13.2.3",
|
|
64
|
+
"prettier": "^3.0.1",
|
|
65
|
+
"react": "18.2.0",
|
|
66
|
+
"react-dom": "18.2.0",
|
|
67
|
+
"sass": "^1.64.1",
|
|
68
|
+
"storybook": "^7.2.2",
|
|
69
|
+
"typescript": "^5.0.2",
|
|
70
|
+
"vite": "^4.4.5",
|
|
71
|
+
"vite-plugin-dts": "^3.4.0",
|
|
72
|
+
"vite-plugin-svgr": "^3.2.0",
|
|
73
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
74
|
+
},
|
|
75
|
+
"repository": {
|
|
76
|
+
"type": "git",
|
|
77
|
+
"url": "git+https://github.com/reportportal/ui-kit.git"
|
|
78
|
+
},
|
|
79
|
+
"author": "ReportPortal.io",
|
|
80
|
+
"license": "Apache-2.0",
|
|
81
|
+
"bugs": {
|
|
82
|
+
"url": "https://github.com/reportportal/ui-kit/issues"
|
|
83
|
+
},
|
|
84
|
+
"homepage": "https://github.com/reportportal/ui-kit#readme",
|
|
85
|
+
"keywords": [
|
|
86
|
+
"react",
|
|
87
|
+
"react-components",
|
|
88
|
+
"design-systems",
|
|
89
|
+
"ui-kit",
|
|
90
|
+
"reportportal",
|
|
91
|
+
"epam"
|
|
92
|
+
],
|
|
93
|
+
"engines": {
|
|
94
|
+
"node": ">=16.x"
|
|
95
|
+
}
|
|
96
|
+
}
|
package/dist/bind-e1346f99.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var p = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
-
function a(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
5
|
-
var r = { exports: {} };
|
|
6
|
-
/*!
|
|
7
|
-
Copyright (c) 2018 Jed Watson.
|
|
8
|
-
Licensed under the MIT License (MIT), see
|
|
9
|
-
http://jedwatson.github.io/classnames
|
|
10
|
-
*/
|
|
11
|
-
(function(e) {
|
|
12
|
-
(function() {
|
|
13
|
-
var f = {}.hasOwnProperty;
|
|
14
|
-
function s() {
|
|
15
|
-
for (var n = [], i = 0; i < arguments.length; i++) {
|
|
16
|
-
var t = arguments[i];
|
|
17
|
-
if (t) {
|
|
18
|
-
var l = typeof t;
|
|
19
|
-
if (l === "string" || l === "number")
|
|
20
|
-
n.push(this && this[t] || t);
|
|
21
|
-
else if (Array.isArray(t))
|
|
22
|
-
n.push(s.apply(this, t));
|
|
23
|
-
else if (l === "object") {
|
|
24
|
-
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) {
|
|
25
|
-
n.push(t.toString());
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
for (var o in t)
|
|
29
|
-
f.call(t, o) && t[o] && n.push(this && this[o] || o);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return n.join(" ");
|
|
34
|
-
}
|
|
35
|
-
e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
|
|
36
|
-
})();
|
|
37
|
-
})(r);
|
|
38
|
-
var u = r.exports;
|
|
39
|
-
const c = /* @__PURE__ */ a(u);
|
|
40
|
-
export {
|
|
41
|
-
p as a,
|
|
42
|
-
c,
|
|
43
|
-
a as g
|
|
44
|
-
};
|