@reportportal/ui-kit 0.0.1-alpha.70 → 0.0.1-alpha.72

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.
@@ -1,158 +0,0 @@
1
- import { jsx as e, jsxs as a, Fragment as R } from "react/jsx-runtime";
2
- import { forwardRef as Q, useRef as Y, useId as Z, useState as M } from "react";
3
- import { c as q } from "./bind-06a7ff84.js";
4
- import { b as ee, a as ne, S as te } from "./openEye-7b9cf080.js";
5
- import { B as se } from "./button-33bc880f.js";
6
- import { S as oe } from "./spinLoader-c4a53718.js";
7
- import { M as ae } from "./maxValueDisplay-9be01a75.js";
8
- import { FieldLabel as ce } from "./fieldLabel.js";
9
- var o = /* @__PURE__ */ ((t) => (t.PASSWORD = "password", t.TEXT = "text", t.EMAIL = "email", t))(o || {});
10
- const re = "_collapsed_1xyy3_13", ie = "_field_1xyy3_21", le = "_placeholder_1xyy3_46", de = "_disabled_1xyy3_49", _e = "_error_1xyy3_52", pe = "_touched_1xyy3_52", ye = "_input_1xyy3_70", ue = "_icon_1xyy3_1", xe = "_text_1xyy3_168", me = {
11
- "icon-container": "_icon-container_1xyy3_1",
12
- "icon-container-end": "_icon-container-end_1xyy3_1",
13
- "icon-container-start": "_icon-container-start_1xyy3_1",
14
- collapsed: re,
15
- field: ie,
16
- "default-width": "_default-width_1xyy3_33",
17
- placeholder: le,
18
- disabled: de,
19
- error: _e,
20
- touched: pe,
21
- "max-length-display": "_max-length-display_1xyy3_59",
22
- "input-container": "_input-container_1xyy3_70",
23
- "type-password": "_type-password_1xyy3_74",
24
- input: ye,
25
- "eye-icon": "_eye-icon_1xyy3_78",
26
- icon: ue,
27
- "start-icon": "_start-icon_1xyy3_124",
28
- "clear-icon": "_clear-icon_1xyy3_125",
29
- "additional-content": "_additional-content_1xyy3_161",
30
- text: xe,
31
- "error-text": "_error-text_1xyy3_188",
32
- "help-text": "_help-text_1xyy3_192"
33
- }, n = q.bind(me), Fe = Q(
34
- ({
35
- value: t = "",
36
- className: b,
37
- classNameHelpText: v,
38
- error: l,
39
- placeholder: u,
40
- disabled: c = !1,
41
- onChange: A,
42
- touched: x = !1,
43
- title: O,
44
- label: d,
45
- helpText: _,
46
- defaultWidth: B = !0,
47
- startIcon: m,
48
- endIcon: f,
49
- clearable: C = !1,
50
- onClear: h,
51
- isRequired: N = !1,
52
- hasDoubleMessage: L = !1,
53
- type: r = o.TEXT,
54
- displayError: V = !0,
55
- collapsible: W = !1,
56
- loading: k = !1,
57
- maxLengthDisplay: X,
58
- onFocus: j = () => {
59
- },
60
- onBlur: H = () => {
61
- },
62
- ...I
63
- }, U) => {
64
- const $ = Y(null), p = U || $, S = Z(), [w, g] = M(!1), [E, D] = M(!1), z = (s) => {
65
- g(!0), j(s);
66
- }, G = (s) => {
67
- g(!1), H(s);
68
- }, J = () => {
69
- var s;
70
- h && (h(t), (s = p.current) == null || s.focus());
71
- }, F = V && l && x, T = /* @__PURE__ */ e("span", { className: n("text", "help-text", v), children: _ }), K = () => r !== o.PASSWORD ? r : E ? o.TEXT : o.PASSWORD, P = (s) => {
72
- s.preventDefault(), D(!0);
73
- }, i = (s) => {
74
- s.preventDefault(), D(!1);
75
- };
76
- return /* @__PURE__ */ a(R, { children: [
77
- d && /* @__PURE__ */ e(ce, { isRequired: N, htmlFor: S, children: d }),
78
- /* @__PURE__ */ a(
79
- "div",
80
- {
81
- className: n("field", b, {
82
- error: l,
83
- touched: x,
84
- disabled: c,
85
- "default-width": B,
86
- collapsed: W && !w && !t
87
- }),
88
- title: O,
89
- children: [
90
- k ? /* @__PURE__ */ e(oe, {}) : m && /* @__PURE__ */ e(
91
- "span",
92
- {
93
- className: n("icon-container-start"),
94
- onClick: () => {
95
- var y;
96
- (y = p.current) == null || y.focus();
97
- },
98
- children: /* @__PURE__ */ e("span", { className: n("icon", { "start-icon": !w }), children: m })
99
- }
100
- ),
101
- /* @__PURE__ */ a("span", { className: n("input-container", `type-${r}`), children: [
102
- /* @__PURE__ */ e(
103
- "input",
104
- {
105
- ref: p,
106
- type: K(),
107
- className: n("input"),
108
- value: t,
109
- disabled: c,
110
- id: S,
111
- onChange: A,
112
- onFocus: z,
113
- onBlur: G,
114
- ...I
115
- }
116
- ),
117
- r === o.PASSWORD && t && /* @__PURE__ */ e(
118
- se,
119
- {
120
- icon: E ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ e(ne, {}),
121
- variant: "text",
122
- className: n("eye-icon"),
123
- onMouseDown: P,
124
- onMouseLeave: i,
125
- onMouseUp: i,
126
- onTouchStart: P,
127
- onTouchEnd: i,
128
- onTouchCancel: i
129
- }
130
- ),
131
- u && !t && /* @__PURE__ */ a("span", { className: n("placeholder"), children: [
132
- u,
133
- N && !d && /* @__PURE__ */ e("span", { className: n("asterisk") })
134
- ] })
135
- ] }),
136
- /* @__PURE__ */ e(
137
- ae,
138
- {
139
- className: n("max-length-display"),
140
- value: t.length,
141
- maxValue: X
142
- }
143
- ),
144
- f && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: f }) }),
145
- C && t.length > 0 && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("button", { type: "button", className: n("clear-icon", { disabled: c }), onClick: J, children: /* @__PURE__ */ e(te, {}) }) })
146
- ]
147
- }
148
- ),
149
- (F || _) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: c }), children: F ? /* @__PURE__ */ a(R, { children: [
150
- /* @__PURE__ */ e("span", { className: n("text", "error-text"), children: l }),
151
- L && T
152
- ] }) : _ && T })
153
- ] });
154
- }
155
- );
156
- export {
157
- Fe as F
158
- };
@@ -1,7 +0,0 @@
1
- import * as e from "react";
2
- const t = (l) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.0449 3.41275C10.5805 2.59573 9.41952 2.59573 8.95513 3.41275L2.16344 15.3617C1.69905 16.1787 2.27954 17.2 3.20832 17.2H16.7917C17.7205 17.2 18.3009 16.1787 17.8366 15.3617L11.0449 3.41275ZM10.9325 6.41163C10.9391 6.18625 10.7582 5.99999 10.5327 5.99999H9.46161C9.236 5.99999 9.05502 6.18647 9.06179 6.41198L9.24768 12.612C9.25416 12.8281 9.43125 13 9.6475 13H10.3523C10.5686 13 10.7458 12.8279 10.7521 12.6116L10.9325 6.41163ZM10 16C10.5523 16 11 15.5523 11 15C11 14.4477 10.5523 14 10 14C9.44771 14 9 14.4477 9 15C9 15.5523 9.44771 16 10 16Z", fill: "white" })), C = (l) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.2 9.99999C17.2 13.9764 13.9765 17.2 10 17.2C6.0236 17.2 2.80005 13.9764 2.80005 9.99999C2.80005 6.02354 6.0236 2.79999 10 2.79999C13.9765 2.79999 17.2 6.02354 17.2 9.99999ZM11 6.59999C11 7.15227 10.5523 7.59999 10 7.59999C9.44776 7.59999 9.00005 7.15227 9.00005 6.59999C9.00005 6.0477 9.44776 5.59999 10 5.59999C10.5523 5.59999 11 6.0477 11 6.59999ZM10.8 13.6C10.8 14.0418 10.4419 14.4 10 14.4C9.55822 14.4 9.20005 14.0418 9.20005 13.6L9.20005 9.19999C9.20005 8.75816 9.55822 8.39999 10 8.39999C10.4419 8.39999 10.8 8.75816 10.8 9.19999V13.6Z", fill: "white" })), i = (l) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.2 9.99999C17.2 13.9764 13.9765 17.2 10 17.2C6.0236 17.2 2.80005 13.9764 2.80005 9.99999C2.80005 6.02354 6.0236 2.79999 10 2.79999C13.9765 2.79999 17.2 6.02354 17.2 9.99999ZM13.8146 8.11216C14.0975 7.77273 14.0516 7.26828 13.7122 6.98543C13.3728 6.70258 12.8683 6.74844 12.5855 7.08786L9.14629 11.2149L7.36573 9.43432C7.05331 9.1219 6.54678 9.1219 6.23436 9.43432C5.92194 9.74674 5.92194 10.2533 6.23436 10.5657L8.63436 12.9657C8.7933 13.1246 9.01176 13.2094 9.2363 13.1992C9.46084 13.189 9.67073 13.0848 9.81463 12.9122L13.8146 8.11216Z", fill: "white" }));
3
- export {
4
- t as S,
5
- C as a,
6
- i as b
7
- };