@reportportal/ui-kit 0.0.1-alpha.0 → 0.0.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/button.js ADDED
@@ -0,0 +1,8 @@
1
+ import { B as o } from "./button-9e154905.js";
2
+ import "./jsx-runtime-2962e83b.js";
3
+ import "react";
4
+ import "./bind-e1346f99.js";
5
+ export {
6
+ o as Button,
7
+ o as default
8
+ };
@@ -0,0 +1,74 @@
1
+ import { j as t } from "./jsx-runtime-2962e83b.js";
2
+ import { c as k } from "./bind-e1346f99.js";
3
+ import { useRef as m } from "react";
4
+ var s = /* @__PURE__ */ ((c) => (c[c.SPACE_KEY_CODE = 32] = "SPACE_KEY_CODE", c[c.ENTER_KEY_CODE = 13] = "ENTER_KEY_CODE", c))(s || {});
5
+ const d = "_checkbox_1gq3p_1", f = "_disabled_1gq3p_12", D = "_input_1gq3p_17", C = "_control_1gq3p_24", N = "_children_1gq3p_78", j = {
6
+ checkbox: d,
7
+ disabled: f,
8
+ input: D,
9
+ control: C,
10
+ children: N
11
+ }, n = k.bind(j), g = ({
12
+ children: c,
13
+ disabled: e = !1,
14
+ onChange: _,
15
+ onFocus: p,
16
+ onBlur: E,
17
+ className: x,
18
+ value: r,
19
+ dataAutomationId: u,
20
+ form: b
21
+ }) => {
22
+ const a = m(null), h = (o) => {
23
+ var i;
24
+ const { keyCode: l } = o;
25
+ if (l === s.SPACE_KEY_CODE) {
26
+ o.preventDefault();
27
+ return;
28
+ }
29
+ l === s.ENTER_KEY_CODE && (o.preventDefault(), (i = a.current) == null || i.click());
30
+ };
31
+ return /* @__PURE__ */ t.jsxs(
32
+ "label",
33
+ {
34
+ id: "rp-ui-kit-checkbox-label",
35
+ className: n("checkbox", x, {
36
+ disabled: e
37
+ }),
38
+ onFocus: p,
39
+ onBlur: E,
40
+ "data-automation-id": u,
41
+ children: [
42
+ /* @__PURE__ */ t.jsx(
43
+ "input",
44
+ {
45
+ ref: a,
46
+ tabIndex: 0,
47
+ type: "checkbox",
48
+ onKeyDown: h,
49
+ className: n("input"),
50
+ disabled: e,
51
+ onChange: _,
52
+ checked: r,
53
+ form: b
54
+ }
55
+ ),
56
+ /* @__PURE__ */ t.jsx(
57
+ "span",
58
+ {
59
+ "aria-labelledby": "rp-ui-kit-checkbox-label",
60
+ role: "checkbox",
61
+ "aria-checked": r,
62
+ className: n("control", {
63
+ disabled: e
64
+ })
65
+ }
66
+ ),
67
+ c && /* @__PURE__ */ t.jsx("span", { className: n("children", { disabled: e }), children: c })
68
+ ]
69
+ }
70
+ );
71
+ };
72
+ export {
73
+ g as C
74
+ };
@@ -0,0 +1,8 @@
1
+ import { C as r } from "./checkbox-ae12c5f5.js";
2
+ import "./jsx-runtime-2962e83b.js";
3
+ import "react";
4
+ import "./bind-e1346f99.js";
5
+ export {
6
+ r as Checkbox,
7
+ r as default
8
+ };
@@ -0,0 +1,19 @@
1
+ import { FC, ReactNode } from 'react';
2
+ type IconPlace = 'start' | 'end';
3
+ type ButtonVariant = 'primary' | 'ghost' | 'danger' | 'text';
4
+ interface ButtonProps {
5
+ children?: ReactNode;
6
+ icon?: string;
7
+ iconPlace?: IconPlace;
8
+ dataAutomationId?: string;
9
+ wide?: boolean;
10
+ disabled?: boolean;
11
+ type?: 'submit' | 'reset' | 'button';
12
+ onClick?: () => void;
13
+ form?: string;
14
+ title?: string;
15
+ className?: string;
16
+ variant?: ButtonVariant;
17
+ }
18
+ export declare const Button: FC<ButtonProps>;
19
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Button } from './button';
2
+ export { Button };
3
+ export default Button;
@@ -0,0 +1,14 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface CheckboxProps {
3
+ value: boolean;
4
+ children?: ReactNode;
5
+ disabled?: boolean;
6
+ className?: string;
7
+ dataAutomationId?: string;
8
+ onChange?: () => void;
9
+ onFocus?: () => void;
10
+ onBlur?: () => void;
11
+ form?: string;
12
+ }
13
+ export declare const Checkbox: FC<CheckboxProps>;
14
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Checkbox } from './checkbox';
2
+ export { Checkbox };
3
+ export default Checkbox;
@@ -0,0 +1,4 @@
1
+ export { Button } from './button';
2
+ export { Checkbox } from './checkbox';
3
+ export { SystemMessage } from './systemMessage';
4
+ export { ThemeProvider } from './themeProvider';
@@ -0,0 +1,3 @@
1
+ import { SystemMessage } from './systemMessage';
2
+ export { SystemMessage };
3
+ export default SystemMessage;
@@ -0,0 +1,11 @@
1
+ import { FC, ReactNode } from 'react';
2
+ type Mode = 'info' | 'warning' | 'error';
3
+ interface SystemMessageProps {
4
+ children?: ReactNode;
5
+ mode?: Mode;
6
+ header?: string;
7
+ caption?: ReactNode;
8
+ widthByContent?: boolean;
9
+ }
10
+ export declare const SystemMessage: FC<SystemMessageProps>;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ThemeProvider } from './themeProvider';
2
+ export { ThemeProvider };
3
+ export default ThemeProvider;
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ type ThemeKey = 'light' | 'dark' | string;
3
+ interface ITheme {
4
+ [themeKey: ThemeKey]: string;
5
+ }
6
+ interface IThemeProviderProps {
7
+ children?: ReactNode;
8
+ theme?: ThemeKey;
9
+ customThemes?: ITheme;
10
+ }
11
+ export declare function ThemeProvider({ children, theme, customThemes, }: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare enum KeyCodes {
2
+ SPACE_KEY_CODE = 32,
3
+ ENTER_KEY_CODE = 13
4
+ }
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import { B as p } from "./button-9e154905.js";
2
+ import { C as a } from "./checkbox-ae12c5f5.js";
3
+ import { S as f } from "./systemMessage-5dc0f1e6.js";
4
+ import { T as h } from "./themeProvider-4c0ab2a2.js";
5
+ import "./jsx-runtime-2962e83b.js";
6
+ import "react";
7
+ import "./bind-e1346f99.js";
8
+ export {
9
+ p as Button,
10
+ a as Checkbox,
11
+ f as SystemMessage,
12
+ h as ThemeProvider
13
+ };