@reportportal/ui-kit 0.0.1-alpha.242 → 0.0.1-alpha.244
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/autocompletes.js +63 -58
- package/dist/{openedEye-8fa4c67d.js → capslockIcon-b100b9d6.js} +3 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useCapsLock.d.ts +9 -0
- package/dist/common/hooks.js +25 -23
- package/dist/components/fieldText/fieldText.d.ts +2 -1
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/radio/radioGroup.d.ts +1 -2
- package/dist/{datePicker-09dd025d.js → datePicker-438e42b8.js} +1 -1
- package/dist/datePicker.js +12 -11
- package/dist/fieldText-4223a711.js +177 -0
- package/dist/fieldText.js +9 -2
- package/dist/icons.js +43 -42
- package/dist/index.js +185 -183
- package/dist/{pagination-32fc6458.js → pagination-b3b3e067.js} +1 -1
- package/dist/pagination.js +6 -3
- package/dist/style.css +1 -1
- package/dist/useCapsLock-d7f98c9f.js +14 -0
- package/package.json +4 -1
- package/dist/fieldText-4a8e5496.js +0 -167
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsx as t, jsxs as a, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Y, useRef as Z, useId as q, useState as b } from "react";
|
|
3
|
+
import { c as tt } from "./bind-06a7ff84.js";
|
|
4
|
+
import { S as nt } from "./clear-53660571.js";
|
|
5
|
+
import { b as ot, a as et, S as ct } from "./capslockIcon-b100b9d6.js";
|
|
6
|
+
import { B as st } from "./baseIconButton-251479f7.js";
|
|
7
|
+
import { S as at } from "./spinLoader-c4a53718.js";
|
|
8
|
+
import { M as rt } from "./maxValueDisplay-9be01a75.js";
|
|
9
|
+
import { FieldLabel as it } from "./fieldLabel.js";
|
|
10
|
+
import "react-dnd";
|
|
11
|
+
import "react-dnd-html5-backend";
|
|
12
|
+
import { u as lt } from "./useCapsLock-d7f98c9f.js";
|
|
13
|
+
import { Tooltip as pt } from "./tooltip.js";
|
|
14
|
+
const _t = "_collapsed_1vr19_11", dt = "_field_1vr19_23", mt = "_placeholder_1vr19_48", ut = "_disabled_1vr19_51", ft = "_error_1vr19_54", ht = "_touched_1vr19_54", vt = "_input_1vr19_73", wt = "_icon_1vr19_1", xt = "_text_1vr19_207", Nt = {
|
|
15
|
+
"icon-container": "_icon-container_1vr19_1",
|
|
16
|
+
"icon-container-additional": "_icon-container-additional_1vr19_1",
|
|
17
|
+
"icon-container-end": "_icon-container-end_1vr19_1",
|
|
18
|
+
"icon-container-start": "_icon-container-start_1vr19_1",
|
|
19
|
+
collapsed: _t,
|
|
20
|
+
field: dt,
|
|
21
|
+
"default-width": "_default-width_1vr19_35",
|
|
22
|
+
placeholder: mt,
|
|
23
|
+
disabled: ut,
|
|
24
|
+
error: ft,
|
|
25
|
+
touched: ht,
|
|
26
|
+
"max-length-display": "_max-length-display_1vr19_61",
|
|
27
|
+
"input-container": "_input-container_1vr19_73",
|
|
28
|
+
"type-password": "_type-password_1vr19_77",
|
|
29
|
+
input: vt,
|
|
30
|
+
"with-caps-lock": "_with-caps-lock_1vr19_81",
|
|
31
|
+
"caps-lock-tooltip-wrapper": "_caps-lock-tooltip-wrapper_1vr19_84",
|
|
32
|
+
"caps-lock-tooltip-content": "_caps-lock-tooltip-content_1vr19_96",
|
|
33
|
+
"caps-lock-icon": "_caps-lock-icon_1vr19_107",
|
|
34
|
+
"eye-icon": "_eye-icon_1vr19_117",
|
|
35
|
+
icon: wt,
|
|
36
|
+
"start-icon": "_start-icon_1vr19_163",
|
|
37
|
+
"clear-icon": "_clear-icon_1vr19_164",
|
|
38
|
+
"additional-content": "_additional-content_1vr19_200",
|
|
39
|
+
text: xt,
|
|
40
|
+
"error-text": "_error-text_1vr19_227",
|
|
41
|
+
"help-text": "_help-text_1vr19_231"
|
|
42
|
+
}, n = tt.bind(Nt), Rt = Y(
|
|
43
|
+
({
|
|
44
|
+
value: e = "",
|
|
45
|
+
className: B,
|
|
46
|
+
classNameHelpText: V,
|
|
47
|
+
error: i,
|
|
48
|
+
placeholder: d,
|
|
49
|
+
disabled: c = !1,
|
|
50
|
+
onChange: D,
|
|
51
|
+
touched: m = !1,
|
|
52
|
+
title: E,
|
|
53
|
+
label: l,
|
|
54
|
+
helpText: p,
|
|
55
|
+
defaultWidth: I = !0,
|
|
56
|
+
startIcon: u,
|
|
57
|
+
endIcon: f,
|
|
58
|
+
clearable: L = !1,
|
|
59
|
+
onClear: h,
|
|
60
|
+
isRequired: v = !1,
|
|
61
|
+
hasDoubleMessage: R = !1,
|
|
62
|
+
type: r = "text",
|
|
63
|
+
displayError: j = !0,
|
|
64
|
+
collapsible: H = !1,
|
|
65
|
+
loading: M = !1,
|
|
66
|
+
maxLengthDisplay: O,
|
|
67
|
+
capsLockMessage: w,
|
|
68
|
+
onFocus: P = () => {
|
|
69
|
+
},
|
|
70
|
+
onBlur: T = () => {
|
|
71
|
+
},
|
|
72
|
+
...$
|
|
73
|
+
}, z) => {
|
|
74
|
+
const A = Z(null), _ = z || A, x = q(), [N, k] = b(!1), [y, G] = b(!1), { capsLockOn: J } = lt(), g = !!w && J && e.length >= 1 && !c, K = (o) => {
|
|
75
|
+
k(!0), P(o);
|
|
76
|
+
}, Q = (o) => {
|
|
77
|
+
k(!1), T(o);
|
|
78
|
+
}, U = () => {
|
|
79
|
+
var o;
|
|
80
|
+
h && (h(e), (o = _.current) == null || o.focus());
|
|
81
|
+
}, C = j && i && m, S = /* @__PURE__ */ t("span", { className: n("text", "help-text", V), children: p }), W = () => r !== "password" ? r : y ? "text" : "password", X = (o) => {
|
|
82
|
+
o.preventDefault(), G((s) => !s);
|
|
83
|
+
};
|
|
84
|
+
return /* @__PURE__ */ a(F, { children: [
|
|
85
|
+
l && /* @__PURE__ */ t(it, { isRequired: v, htmlFor: x, children: l }),
|
|
86
|
+
/* @__PURE__ */ a(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: n("field", B, {
|
|
90
|
+
error: i,
|
|
91
|
+
touched: m,
|
|
92
|
+
disabled: c,
|
|
93
|
+
"default-width": I,
|
|
94
|
+
collapsed: H && !N && !e
|
|
95
|
+
}),
|
|
96
|
+
title: E,
|
|
97
|
+
children: [
|
|
98
|
+
M ? /* @__PURE__ */ t(at, {}) : u && /* @__PURE__ */ t(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
className: n("icon-container-start"),
|
|
102
|
+
onClick: () => {
|
|
103
|
+
var s;
|
|
104
|
+
(s = _.current) == null || s.focus();
|
|
105
|
+
},
|
|
106
|
+
children: /* @__PURE__ */ t("span", { className: n("icon", { "start-icon": !N }), children: u })
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ a(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
className: n("input-container", `type-${r}`, { "with-caps-lock": g }),
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ t(
|
|
115
|
+
"input",
|
|
116
|
+
{
|
|
117
|
+
ref: _,
|
|
118
|
+
type: W(),
|
|
119
|
+
className: n("input"),
|
|
120
|
+
value: e,
|
|
121
|
+
disabled: c,
|
|
122
|
+
id: x,
|
|
123
|
+
onChange: D,
|
|
124
|
+
onFocus: K,
|
|
125
|
+
onBlur: Q,
|
|
126
|
+
...$
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
g && /* @__PURE__ */ t(
|
|
130
|
+
pt,
|
|
131
|
+
{
|
|
132
|
+
content: w,
|
|
133
|
+
wrapperClassName: n("caps-lock-tooltip-wrapper"),
|
|
134
|
+
contentClassName: n("caps-lock-tooltip-content"),
|
|
135
|
+
children: /* @__PURE__ */ t("span", { className: n("caps-lock-icon"), children: /* @__PURE__ */ t(ot, {}) })
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
r === "password" && e && /* @__PURE__ */ t(st, { className: n("eye-icon"), onClick: X, children: y ? /* @__PURE__ */ t(et, {}) : /* @__PURE__ */ t(ct, {}) }),
|
|
139
|
+
d && !e && /* @__PURE__ */ a("span", { className: n("placeholder"), children: [
|
|
140
|
+
d,
|
|
141
|
+
v && !l && /* @__PURE__ */ t("span", { className: n("asterisk") })
|
|
142
|
+
] })
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ t(
|
|
147
|
+
rt,
|
|
148
|
+
{
|
|
149
|
+
className: n("max-length-display"),
|
|
150
|
+
value: e.length,
|
|
151
|
+
maxValue: O
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
L && e.length > 0 && /* @__PURE__ */ t("span", { className: n("icon-container-end"), children: /* @__PURE__ */ t(
|
|
155
|
+
"button",
|
|
156
|
+
{
|
|
157
|
+
type: "button",
|
|
158
|
+
className: n("clear-icon", { disabled: c }),
|
|
159
|
+
onClick: U,
|
|
160
|
+
onMouseDown: (o) => o.preventDefault(),
|
|
161
|
+
children: /* @__PURE__ */ t(nt, {})
|
|
162
|
+
}
|
|
163
|
+
) }),
|
|
164
|
+
f && /* @__PURE__ */ t("span", { className: n("icon-container-end"), children: /* @__PURE__ */ t("span", { className: n("icon"), children: f }) })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
(C || p) && /* @__PURE__ */ t("div", { className: n("additional-content", { disabled: c }), children: C ? /* @__PURE__ */ a(F, { children: [
|
|
169
|
+
/* @__PURE__ */ t("span", { className: n("text", "error-text"), children: i }),
|
|
170
|
+
R && S
|
|
171
|
+
] }) : p && S })
|
|
172
|
+
] });
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
export {
|
|
176
|
+
Rt as F
|
|
177
|
+
};
|
package/dist/fieldText.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { F as o } from "./fieldText-
|
|
1
|
+
import { F as o } from "./fieldText-4223a711.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
5
5
|
import "./clear-53660571.js";
|
|
6
|
-
import "./
|
|
6
|
+
import "./capslockIcon-b100b9d6.js";
|
|
7
7
|
import "./baseIconButton-251479f7.js";
|
|
8
8
|
import "./spinLoader-c4a53718.js";
|
|
9
9
|
import "./maxValueDisplay-9be01a75.js";
|
|
10
10
|
import "./fieldLabel.js";
|
|
11
|
+
import "react-dnd";
|
|
12
|
+
import "react-dnd-html5-backend";
|
|
13
|
+
import "./useCapsLock-d7f98c9f.js";
|
|
14
|
+
import "./tooltip.js";
|
|
15
|
+
import "react-dom";
|
|
16
|
+
import "@floating-ui/react";
|
|
17
|
+
import "./floatingUi-46f5b896.js";
|
|
11
18
|
export {
|
|
12
19
|
o as FieldText,
|
|
13
20
|
o as default
|