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

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 CHANGED
@@ -1,5 +1,5 @@
1
- import { B as o } from "./button-9e154905.js";
2
- import "./jsx-runtime-2962e83b.js";
1
+ import { B as o } from "./button-a4d3df83.js";
2
+ import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-e1346f99.js";
5
5
  export {
@@ -0,0 +1,74 @@
1
+ import { jsxs as x, jsx as t } from "react/jsx-runtime";
2
+ import { c as m } from "./bind-e1346f99.js";
3
+ import { useRef as d } from "react";
4
+ var r = /* @__PURE__ */ ((c) => (c[c.SPACE_KEY_CODE = 32] = "SPACE_KEY_CODE", c[c.ENTER_KEY_CODE = 13] = "ENTER_KEY_CODE", c))(r || {});
5
+ const f = "_checkbox_1gq3p_1", D = "_disabled_1gq3p_12", C = "_input_1gq3p_17", N = "_control_1gq3p_24", O = "_children_1gq3p_78", Y = {
6
+ checkbox: f,
7
+ disabled: D,
8
+ input: C,
9
+ control: N,
10
+ children: O
11
+ }, n = m.bind(Y), R = ({
12
+ children: c,
13
+ disabled: e = !1,
14
+ onChange: i,
15
+ onFocus: p,
16
+ onBlur: E,
17
+ className: b,
18
+ value: a,
19
+ dataAutomationId: h,
20
+ form: u
21
+ }) => {
22
+ const l = d(null), k = (o) => {
23
+ var _;
24
+ const { keyCode: s } = o;
25
+ if (s === r.SPACE_KEY_CODE) {
26
+ o.preventDefault();
27
+ return;
28
+ }
29
+ s === r.ENTER_KEY_CODE && (o.preventDefault(), (_ = l.current) == null || _.click());
30
+ };
31
+ return /* @__PURE__ */ x(
32
+ "label",
33
+ {
34
+ id: "rp-ui-kit-checkbox-label",
35
+ className: n("checkbox", b, {
36
+ disabled: e
37
+ }),
38
+ onFocus: p,
39
+ onBlur: E,
40
+ "data-automation-id": h,
41
+ children: [
42
+ /* @__PURE__ */ t(
43
+ "input",
44
+ {
45
+ ref: l,
46
+ tabIndex: 0,
47
+ type: "checkbox",
48
+ onKeyDown: k,
49
+ className: n("input"),
50
+ disabled: e,
51
+ onChange: i,
52
+ checked: a,
53
+ form: u
54
+ }
55
+ ),
56
+ /* @__PURE__ */ t(
57
+ "span",
58
+ {
59
+ "aria-labelledby": "rp-ui-kit-checkbox-label",
60
+ role: "checkbox",
61
+ "aria-checked": a,
62
+ className: n("control", {
63
+ disabled: e
64
+ })
65
+ }
66
+ ),
67
+ c && /* @__PURE__ */ t("span", { className: n("children", { disabled: e }), children: c })
68
+ ]
69
+ }
70
+ );
71
+ };
72
+ export {
73
+ R as C
74
+ };
package/dist/checkbox.js CHANGED
@@ -1,7 +1,7 @@
1
- import { C as r } from "./checkbox-ae12c5f5.js";
2
- import "./jsx-runtime-2962e83b.js";
3
- import "react";
1
+ import { C as r } from "./checkbox-3fd4bcc1.js";
2
+ import "react/jsx-runtime";
4
3
  import "./bind-e1346f99.js";
4
+ import "react";
5
5
  export {
6
6
  r as Checkbox,
7
7
  r as default
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
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";
1
+ import { B as p } from "./button-a4d3df83.js";
2
+ import { C as a } from "./checkbox-3fd4bcc1.js";
3
+ import { S as f } from "./systemMessage-55cf51f4.js";
4
+ import { T as h } from "./themeProvider-5800417e.js";
5
+ import "react/jsx-runtime";
6
6
  import "react";
7
7
  import "./bind-e1346f99.js";
8
8
  export {
@@ -0,0 +1,30 @@
1
+ import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
+ import { c } from "./bind-e1346f99.js";
3
+ const m = "_children_14f2u_56", o = {
4
+ "system-message": "_system-message_14f2u_1",
5
+ "stripes-info": "_stripes-info_14f2u_11",
6
+ "stripes-warning": "_stripes-warning_14f2u_16",
7
+ "stripes-error": "_stripes-error_14f2u_21",
8
+ "text-container": "_text-container_14f2u_26",
9
+ "message-header-info": "_message-header-info_14f2u_29",
10
+ "message-header-warning": "_message-header-warning_14f2u_38",
11
+ "message-header-error": "_message-header-error_14f2u_47",
12
+ children: m,
13
+ "content-width": "_content-width_14f2u_74"
14
+ }, e = c.bind(o), h = ({
15
+ header: r,
16
+ caption: a,
17
+ children: i,
18
+ mode: n = "info",
19
+ widthByContent: _ = !1
20
+ }) => /* @__PURE__ */ t("div", { className: e("system-message", { "content-width": _ }), 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
+ h as S
30
+ };
@@ -1,8 +1,7 @@
1
- import { S as m } from "./systemMessage-5dc0f1e6.js";
2
- import "./jsx-runtime-2962e83b.js";
3
- import "react";
1
+ import { S as e } from "./systemMessage-55cf51f4.js";
2
+ import "react/jsx-runtime";
4
3
  import "./bind-e1346f99.js";
5
4
  export {
6
- m as SystemMessage,
7
- m as default
5
+ e as SystemMessage,
6
+ e as default
8
7
  };
@@ -1,4 +1,4 @@
1
- import { j as m } from "./jsx-runtime-2962e83b.js";
1
+ import { jsx as h } from "react/jsx-runtime";
2
2
  const e = {
3
3
  light: "rp-ui-kit-theme-light",
4
4
  dark: "rp-ui-kit-theme-dark"
@@ -6,13 +6,13 @@ const e = {
6
6
  function o({
7
7
  children: t,
8
8
  theme: i = "light",
9
- customThemes: s = {}
9
+ customThemes: r = {}
10
10
  }) {
11
- const r = {
11
+ const s = {
12
12
  ...e,
13
- ...s
13
+ ...r
14
14
  }[i] || e.light;
15
- return /* @__PURE__ */ m.jsx("div", { className: r, children: t });
15
+ return /* @__PURE__ */ h("div", { className: s, children: t });
16
16
  }
17
17
  export {
18
18
  o as T
@@ -1,7 +1,6 @@
1
- import { T as o } from "./themeProvider-4c0ab2a2.js";
2
- import "./jsx-runtime-2962e83b.js";
3
- import "react";
1
+ import { T as e } from "./themeProvider-5800417e.js";
2
+ import "react/jsx-runtime";
4
3
  export {
5
- o as ThemeProvider,
6
- o as default
4
+ e as ThemeProvider,
5
+ e as default
7
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportportal/ui-kit",
3
- "version": "0.0.1-alpha.1",
3
+ "version": "0.0.1-alpha.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "storybook dev -p 6006",
@@ -1,74 +0,0 @@
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
- };