@reportportal/ui-kit 0.0.1-alpha.117 → 0.0.1-alpha.119

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportportal/ui-kit",
3
- "version": "0.0.1-alpha.117",
3
+ "version": "0.0.1-alpha.119",
4
4
  "description": "The UI-kit library for ReportPortal Design System.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,165 +0,0 @@
1
- import { jsx as e, jsxs as o, Fragment as b } from "react/jsx-runtime";
2
- import { forwardRef as W, useRef as X, useId as Y, useState as B } from "react";
3
- import { c as Z } from "./bind-06a7ff84.js";
4
- import { b as q, a as ee, S as ne } from "./openEye-7b9cf080.js";
5
- import { B as te } from "./baseIconButton-251479f7.js";
6
- import { S as se } from "./spinLoader-c4a53718.js";
7
- import { M as oe } from "./maxValueDisplay-9be01a75.js";
8
- import { FieldLabel as ae } from "./fieldLabel.js";
9
- const ie = "_collapsed_uz1iu_13", ce = "_field_uz1iu_21", re = "_placeholder_uz1iu_46", le = "_disabled_uz1iu_49", ue = "_error_uz1iu_52", de = "_touched_uz1iu_52", _e = "_input_uz1iu_71", pe = "_icon_uz1iu_1", fe = "_text_uz1iu_169", me = {
10
- "icon-container": "_icon-container_uz1iu_1",
11
- "icon-container-end": "_icon-container-end_uz1iu_1",
12
- "icon-container-start": "_icon-container-start_uz1iu_1",
13
- collapsed: ie,
14
- field: ce,
15
- "default-width": "_default-width_uz1iu_33",
16
- placeholder: re,
17
- disabled: le,
18
- error: ue,
19
- touched: de,
20
- "max-length-display": "_max-length-display_uz1iu_59",
21
- "input-container": "_input-container_uz1iu_71",
22
- "type-password": "_type-password_uz1iu_75",
23
- input: _e,
24
- "eye-icon": "_eye-icon_uz1iu_79",
25
- icon: pe,
26
- "start-icon": "_start-icon_uz1iu_125",
27
- "clear-icon": "_clear-icon_uz1iu_126",
28
- "additional-content": "_additional-content_uz1iu_162",
29
- text: fe,
30
- "error-text": "_error-text_uz1iu_189",
31
- "help-text": "_help-text_uz1iu_193"
32
- }, n = Z.bind(me), Se = W(
33
- ({
34
- value: s = "",
35
- className: E,
36
- classNameHelpText: v,
37
- error: r,
38
- placeholder: p,
39
- disabled: a = !1,
40
- onChange: C,
41
- touched: f = !1,
42
- title: T,
43
- label: l,
44
- helpText: u,
45
- defaultWidth: V = !0,
46
- startIcon: m,
47
- endIcon: h,
48
- clearable: k = !1,
49
- onClear: x,
50
- isRequired: z = !1,
51
- hasDoubleMessage: I = !1,
52
- type: i = "text",
53
- displayError: L = !0,
54
- collapsible: P = !1,
55
- loading: R = !1,
56
- maxLengthDisplay: j,
57
- onFocus: H = () => {
58
- },
59
- onBlur: O = () => {
60
- },
61
- ...U
62
- }, $) => {
63
- const A = X(null), d = $ || A, w = Y(), [N, y] = B(!1), [g, F] = B(!1), G = (t) => {
64
- y(!0), H(t);
65
- }, J = (t) => {
66
- y(!1), O(t);
67
- }, K = () => {
68
- var t;
69
- x && (x(s), (t = d.current) == null || t.focus());
70
- }, S = L && r && f, D = /* @__PURE__ */ e("span", { className: n("text", "help-text", v), children: u }), Q = () => i !== "password" ? i : g ? "text" : "password", M = (t) => {
71
- t.preventDefault(), F(!0);
72
- }, c = (t) => {
73
- t.preventDefault(), F(!1);
74
- };
75
- return /* @__PURE__ */ o(b, { children: [
76
- l && /* @__PURE__ */ e(ae, { isRequired: z, htmlFor: w, children: l }),
77
- /* @__PURE__ */ o(
78
- "div",
79
- {
80
- className: n("field", E, {
81
- error: r,
82
- touched: f,
83
- disabled: a,
84
- "default-width": V,
85
- collapsed: P && !N && !s
86
- }),
87
- title: T,
88
- children: [
89
- R ? /* @__PURE__ */ e(se, {}) : m && /* @__PURE__ */ e(
90
- "span",
91
- {
92
- className: n("icon-container-start"),
93
- onClick: () => {
94
- var _;
95
- (_ = d.current) == null || _.focus();
96
- },
97
- children: /* @__PURE__ */ e("span", { className: n("icon", { "start-icon": !N }), children: m })
98
- }
99
- ),
100
- /* @__PURE__ */ o("span", { className: n("input-container", `type-${i}`), children: [
101
- /* @__PURE__ */ e(
102
- "input",
103
- {
104
- ref: d,
105
- type: Q(),
106
- className: n("input"),
107
- value: s,
108
- disabled: a,
109
- id: w,
110
- onChange: C,
111
- onFocus: G,
112
- onBlur: J,
113
- ...U
114
- }
115
- ),
116
- i === "password" && s && /* @__PURE__ */ e(
117
- te,
118
- {
119
- className: n("eye-icon"),
120
- onMouseDown: M,
121
- onMouseLeave: c,
122
- onMouseUp: c,
123
- onTouchStart: M,
124
- onTouchEnd: c,
125
- onTouchCancel: c,
126
- children: g ? /* @__PURE__ */ e(q, {}) : /* @__PURE__ */ e(ee, {})
127
- }
128
- ),
129
- p && !s && /* @__PURE__ */ o("span", { className: n("placeholder"), children: [
130
- p,
131
- z && !l && /* @__PURE__ */ e("span", { className: n("asterisk") })
132
- ] })
133
- ] }),
134
- /* @__PURE__ */ e(
135
- oe,
136
- {
137
- className: n("max-length-display"),
138
- value: s.length,
139
- maxValue: j
140
- }
141
- ),
142
- h && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: h }) }),
143
- k && s.length > 0 && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e(
144
- "button",
145
- {
146
- type: "button",
147
- className: n("clear-icon", { disabled: a }),
148
- onClick: K,
149
- onMouseDown: (t) => t.preventDefault(),
150
- children: /* @__PURE__ */ e(ne, {})
151
- }
152
- ) })
153
- ]
154
- }
155
- ),
156
- (S || u) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: a }), children: S ? /* @__PURE__ */ o(b, { children: [
157
- /* @__PURE__ */ e("span", { className: n("text", "error-text"), children: r }),
158
- I && D
159
- ] }) : u && D })
160
- ] });
161
- }
162
- );
163
- export {
164
- Se as F
165
- };