@reportportal/ui-kit 0.0.1-alpha.247 → 0.0.1-alpha.249

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.
@@ -9,7 +9,7 @@ import { i as Me } from "./isEmpty-ccacb5ff.js";
9
9
  import { createPortal as Je } from "react-dom";
10
10
  import _e from "downshift";
11
11
  import { useFloating as Be, autoUpdate as Oe, flip as Qe, size as Ze } from "@floating-ui/react";
12
- import { F as qe } from "./fieldText-88af67ae.js";
12
+ import { F as qe } from "./fieldText-9d847bec.js";
13
13
  import { S as Te } from "./dropdown-0260bb66.js";
14
14
  import { E as $e, A as Ue, T as Ve } from "./constants-85822a6b.js";
15
15
  import { S as et } from "./close-4d480ef7.js";
@@ -21,7 +21,7 @@ import "./maxValueDisplay-9be01a75.js";
21
21
  import "./fieldLabel.js";
22
22
  import "react-dnd";
23
23
  import "react-dnd-html5-backend";
24
- import "./useCapsLock-65753959.js";
24
+ import "./useCapsLock-428c77b6.js";
25
25
  import "./tooltip.js";
26
26
  import "./floatingUi-46f5b896.js";
27
27
  const ot = "_disabled_1rpph_43", st = "_input_1rpph_107", nt = {
@@ -1,10 +1,20 @@
1
+ type CapsLockEvent = {
2
+ getModifierState?: (key: string) => boolean;
3
+ nativeEvent?: {
4
+ getModifierState?: (key: string) => boolean;
5
+ };
6
+ key?: string;
7
+ };
1
8
  /**
2
9
  * Tracks Caps Lock state via window-level keyboard events.
3
10
  * Also exposes syncFromMouseEvent so callers can re-read the real OS state
4
- * from a MouseEvent (e.g. onMouseDown on the input) — MouseEvent.getModifierState
5
- * is reliable even after tab switches, unlike FocusEvent which lacks it.
11
+ * from a MouseEvent (e.g. onMouseDown on the input).
12
+ *
13
+ * Optional-chained: autofill, password managers, and some browser/extension
14
+ * events fire keydown/mousedown without getModifierState — calling it raw throws.
6
15
  */
7
16
  export declare const useCapsLock: () => {
8
17
  capsLockOn: boolean;
9
- syncFromMouseEvent: (event: MouseEvent) => void;
18
+ syncFromMouseEvent: (event: CapsLockEvent) => void;
10
19
  };
20
+ export {};
@@ -4,7 +4,7 @@ import { useCallback as D } from "react";
4
4
  import { i as x } from "../isEmpty-ccacb5ff.js";
5
5
  import { u as V } from "../useWindowResize-a7e1ac92.js";
6
6
  import { u as j } from "../useEllipsisTitle-462fa254.js";
7
- import { u as v } from "../useCapsLock-65753959.js";
7
+ import { u as v } from "../useCapsLock-428c77b6.js";
8
8
  import "react-dnd";
9
9
  import "react-dnd-html5-backend";
10
10
  import "../common.js";
@@ -2,7 +2,7 @@ import { jsxs as x, Fragment as z, jsx as a } from "react/jsx-runtime";
2
2
  import { useMemo as v, forwardRef as J, useRef as K } from "react";
3
3
  import I from "react-datepicker/dist/es/index.js";
4
4
  import { c as Y } from "./bind-06a7ff84.js";
5
- import { F as Q } from "./fieldText-88af67ae.js";
5
+ import { F as Q } from "./fieldText-9d847bec.js";
6
6
  import { D as L } from "./dropdown-d2a05471.js";
7
7
  import { S as B } from "./calendarArrow-44c7e60e.js";
8
8
  import { registerLocale as X } from "react-datepicker";
@@ -1,10 +1,10 @@
1
- import { D as t } from "./datePicker-21db317e.js";
2
- import { r as I } from "./datePicker-21db317e.js";
1
+ import { D as t } from "./datePicker-d2f7431c.js";
2
+ import { r as I } from "./datePicker-d2f7431c.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-datepicker/dist/es/index.js";
6
6
  import "./bind-06a7ff84.js";
7
- import "./fieldText-88af67ae.js";
7
+ import "./fieldText-9d847bec.js";
8
8
  import "./clear-53660571.js";
9
9
  import "./capslockIcon-b100b9d6.js";
10
10
  import "./baseIconButton-251479f7.js";
@@ -13,7 +13,7 @@ import "./maxValueDisplay-9be01a75.js";
13
13
  import "./fieldLabel.js";
14
14
  import "react-dnd";
15
15
  import "react-dnd-html5-backend";
16
- import "./useCapsLock-65753959.js";
16
+ import "./useCapsLock-428c77b6.js";
17
17
  import "./tooltip.js";
18
18
  import "react-dom";
19
19
  import "@floating-ui/react";
@@ -0,0 +1,191 @@
1
+ import { jsx as n, jsxs as c, Fragment as b } from "react/jsx-runtime";
2
+ import { forwardRef as q, useRef as nn, useId as tn, useState as v } from "react";
3
+ import { c as en } from "./bind-06a7ff84.js";
4
+ import { S as on } from "./clear-53660571.js";
5
+ import { b as sn, a as cn, S as an } from "./capslockIcon-b100b9d6.js";
6
+ import { B as rn } from "./baseIconButton-251479f7.js";
7
+ import { S as ln } from "./spinLoader-c4a53718.js";
8
+ import { M as pn } from "./maxValueDisplay-9be01a75.js";
9
+ import { FieldLabel as _n } from "./fieldLabel.js";
10
+ import "react-dnd";
11
+ import "react-dnd-html5-backend";
12
+ import { u as dn } from "./useCapsLock-428c77b6.js";
13
+ import { Tooltip as mn } from "./tooltip.js";
14
+ const un = "_collapsed_n886j_11", fn = "_field_n886j_23", hn = "_placeholder_n886j_48", jn = "_disabled_n886j_51", xn = "_error_n886j_54", wn = "_touched_n886j_54", kn = "_input_n886j_73", Nn = "_asterisk_n886j_163", yn = "_icon_n886j_1", gn = "_text_n886j_214", Cn = {
15
+ "icon-container": "_icon-container_n886j_1",
16
+ "icon-container-additional": "_icon-container-additional_n886j_1",
17
+ "icon-container-end": "_icon-container-end_n886j_1",
18
+ "icon-container-start": "_icon-container-start_n886j_1",
19
+ collapsed: un,
20
+ field: fn,
21
+ "default-width": "_default-width_n886j_35",
22
+ placeholder: hn,
23
+ disabled: jn,
24
+ error: xn,
25
+ touched: wn,
26
+ "max-length-display": "_max-length-display_n886j_61",
27
+ "input-container": "_input-container_n886j_73",
28
+ "type-password": "_type-password_n886j_77",
29
+ input: kn,
30
+ "with-caps-lock": "_with-caps-lock_n886j_81",
31
+ "caps-lock-tooltip-wrapper": "_caps-lock-tooltip-wrapper_n886j_84",
32
+ "caps-lock-tooltip-content": "_caps-lock-tooltip-content_n886j_97",
33
+ "caps-lock-icon": "_caps-lock-icon_n886j_108",
34
+ "eye-icon": "_eye-icon_n886j_118",
35
+ asterisk: Nn,
36
+ icon: yn,
37
+ "start-icon": "_start-icon_n886j_170",
38
+ "clear-icon": "_clear-icon_n886j_171",
39
+ "additional-content": "_additional-content_n886j_207",
40
+ text: gn,
41
+ "error-text": "_error-text_n886j_234",
42
+ "help-text": "_help-text_n886j_238"
43
+ }, e = en.bind(Cn), Hn = q(
44
+ ({
45
+ value: o = "",
46
+ className: E,
47
+ classNameHelpText: B,
48
+ error: i,
49
+ placeholder: f,
50
+ disabled: s = !1,
51
+ onChange: I,
52
+ touched: h = !1,
53
+ title: V,
54
+ label: r,
55
+ helpText: l,
56
+ defaultWidth: D = !0,
57
+ startIcon: j,
58
+ endIcon: x,
59
+ clearable: L = !1,
60
+ onClear: w,
61
+ isRequired: k = !1,
62
+ hasDoubleMessage: P = !1,
63
+ type: a = "text",
64
+ displayError: R = !0,
65
+ collapsible: T = !1,
66
+ loading: H = !1,
67
+ maxLengthDisplay: O,
68
+ capsLockMessage: p,
69
+ onFocus: $ = () => {
70
+ },
71
+ onBlur: z = () => {
72
+ },
73
+ onMouseDown: _,
74
+ ...A
75
+ }, G) => {
76
+ const J = nn(null), d = G || J, N = tn(), [m, y] = v(!1), [g, K] = v(!1), { capsLockOn: M, syncFromMouseEvent: Q } = dn(), C = !!p && m && M && o.length >= 1 && !s, U = (t) => {
77
+ y(!0), $(t);
78
+ }, W = (t) => {
79
+ y(!1), z(t);
80
+ }, X = () => {
81
+ var t;
82
+ w && (w(o), (t = d.current) == null || t.focus());
83
+ }, F = R && i && h, S = /* @__PURE__ */ n("span", { className: e("text", "help-text", B), children: l }), Y = () => a !== "password" ? a : g ? "text" : "password", Z = () => {
84
+ K((t) => !t);
85
+ };
86
+ return /* @__PURE__ */ c(b, { children: [
87
+ r && /* @__PURE__ */ n(_n, { isRequired: k, htmlFor: N, children: r }),
88
+ /* @__PURE__ */ c(
89
+ "div",
90
+ {
91
+ className: e("field", E, {
92
+ error: i,
93
+ touched: h,
94
+ disabled: s,
95
+ "default-width": D,
96
+ collapsed: T && !m && !o
97
+ }),
98
+ title: V,
99
+ children: [
100
+ H ? /* @__PURE__ */ n(ln, {}) : j && /* @__PURE__ */ n(
101
+ "span",
102
+ {
103
+ className: e("icon-container-start"),
104
+ onClick: () => {
105
+ var u;
106
+ (u = d.current) == null || u.focus();
107
+ },
108
+ children: /* @__PURE__ */ n("span", { className: e("icon", { "start-icon": !m }), children: j })
109
+ }
110
+ ),
111
+ /* @__PURE__ */ c(
112
+ "span",
113
+ {
114
+ className: e("input-container", `type-${a}`, { "with-caps-lock": C }),
115
+ children: [
116
+ /* @__PURE__ */ n(
117
+ "input",
118
+ {
119
+ ref: d,
120
+ type: Y(),
121
+ className: e("input"),
122
+ value: o,
123
+ disabled: s,
124
+ id: N,
125
+ onChange: I,
126
+ ...A,
127
+ onFocus: U,
128
+ onBlur: W,
129
+ onMouseDown: (t) => {
130
+ p && Q(t.nativeEvent ?? t), _ == null || _(t);
131
+ }
132
+ }
133
+ ),
134
+ C && /* @__PURE__ */ n(
135
+ mn,
136
+ {
137
+ content: p,
138
+ wrapperClassName: e("caps-lock-tooltip-wrapper"),
139
+ contentClassName: e("caps-lock-tooltip-content"),
140
+ wrapperTabIndex: -1,
141
+ children: /* @__PURE__ */ n("span", { className: e("caps-lock-icon"), onMouseDown: (t) => t.preventDefault(), children: /* @__PURE__ */ n(sn, {}) })
142
+ }
143
+ ),
144
+ a === "password" && o && /* @__PURE__ */ n(
145
+ rn,
146
+ {
147
+ className: e("eye-icon"),
148
+ onClick: Z,
149
+ onPointerDown: (t) => t.preventDefault(),
150
+ children: g ? /* @__PURE__ */ n(cn, {}) : /* @__PURE__ */ n(an, {})
151
+ }
152
+ ),
153
+ f && !o && /* @__PURE__ */ c("span", { className: e("placeholder"), children: [
154
+ f,
155
+ k && !r && /* @__PURE__ */ n("span", { className: e("asterisk"), children: "*" })
156
+ ] })
157
+ ]
158
+ }
159
+ ),
160
+ /* @__PURE__ */ n(
161
+ pn,
162
+ {
163
+ className: e("max-length-display"),
164
+ value: o.length,
165
+ maxValue: O
166
+ }
167
+ ),
168
+ L && o.length > 0 && /* @__PURE__ */ n("span", { className: e("icon-container-end"), children: /* @__PURE__ */ n(
169
+ "button",
170
+ {
171
+ type: "button",
172
+ className: e("clear-icon", { disabled: s }),
173
+ onClick: X,
174
+ onMouseDown: (t) => t.preventDefault(),
175
+ children: /* @__PURE__ */ n(on, {})
176
+ }
177
+ ) }),
178
+ x && /* @__PURE__ */ n("span", { className: e("icon-container-end"), children: /* @__PURE__ */ n("span", { className: e("icon"), children: x }) })
179
+ ]
180
+ }
181
+ ),
182
+ (F || l) && /* @__PURE__ */ n("div", { className: e("additional-content", { disabled: s }), children: F ? /* @__PURE__ */ c(b, { children: [
183
+ /* @__PURE__ */ n("span", { className: e("text", "error-text"), children: i }),
184
+ P && S
185
+ ] }) : l && S })
186
+ ] });
187
+ }
188
+ );
189
+ export {
190
+ Hn as F
191
+ };
package/dist/fieldText.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as o } from "./fieldText-88af67ae.js";
1
+ import { F as o } from "./fieldText-9d847bec.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
@@ -10,7 +10,7 @@ import "./maxValueDisplay-9be01a75.js";
10
10
  import "./fieldLabel.js";
11
11
  import "react-dnd";
12
12
  import "react-dnd-html5-backend";
13
- import "./useCapsLock-65753959.js";
13
+ import "./useCapsLock-428c77b6.js";
14
14
  import "./tooltip.js";
15
15
  import "react-dom";
16
16
  import "@floating-ui/react";
package/dist/index.js CHANGED
@@ -9,12 +9,12 @@ import { BulkPanel as V } from "./bulkPanel.js";
9
9
  import { B as W } from "./button-7ab874f3.js";
10
10
  import { C as j } from "./checkbox-76aa8f97.js";
11
11
  import { Chip as K } from "./chip.js";
12
- import { D as Y } from "./datePicker-21db317e.js";
12
+ import { D as Y } from "./datePicker-d2f7431c.js";
13
13
  import "react-datepicker";
14
14
  import { D as $ } from "./dropdown-d2a05471.js";
15
15
  import { FieldLabel as ro } from "./fieldLabel.js";
16
16
  import { F as to } from "./fieldNumber-b4aa4d7e.js";
17
- import { F as ao } from "./fieldText-88af67ae.js";
17
+ import { F as ao } from "./fieldText-9d847bec.js";
18
18
  import { F as po } from "./fieldTextFlex-2f51c173.js";
19
19
  import { FileDropArea as mo } from "./fileDropArea.js";
20
20
  import { FiltersButton as Io } from "./filtersButton.js";
@@ -22,7 +22,7 @@ import { FilterItem as xo } from "./filterItem.js";
22
22
  import { IssueList as uo } from "./issueList.js";
23
23
  import { Modal as Co } from "./modal.js";
24
24
  import { MultipleAutocomplete as Po, SingleAutocomplete as go } from "./autocompletes.js";
25
- import { P as Fo } from "./pagination-09ed6bb0.js";
25
+ import { P as Fo } from "./pagination-4f6cbad8.js";
26
26
  import { Popover as bo } from "./popover.js";
27
27
  import { R as ho, a as Bo } from "./radioGroup-0c132c2e.js";
28
28
  import { SegmentedControl as vo } from "./segmentedControl.js";
@@ -70,7 +70,7 @@ import "react-datepicker/dist/es/index.js";
70
70
  import "@floating-ui/react-dom";
71
71
  import "downshift";
72
72
  import "./maxValueDisplay-9be01a75.js";
73
- import "./useCapsLock-65753959.js";
73
+ import "./useCapsLock-428c77b6.js";
74
74
  import "react-dropzone";
75
75
  import "framer-motion";
76
76
  import "./useWindowResize-a7e1ac92.js";
@@ -4,7 +4,7 @@ import { Tooltip as j } from "./tooltip.js";
4
4
  import { useState as f } from "react";
5
5
  import { Popover as A } from "./popover.js";
6
6
  import { B as w } from "./button-7ab874f3.js";
7
- import { F as B } from "./fieldText-88af67ae.js";
7
+ import { F as B } from "./fieldText-9d847bec.js";
8
8
  import { B as y } from "./baseIconButton-251479f7.js";
9
9
  import { S as z, a as S } from "./prevPage-87faf576.js";
10
10
  const W = {
@@ -1,4 +1,4 @@
1
- import { P as t } from "./pagination-09ed6bb0.js";
1
+ import { P as t } from "./pagination-4f6cbad8.js";
2
2
  import "react/jsx-runtime";
3
3
  import "./bind-06a7ff84.js";
4
4
  import "./tooltip.js";
@@ -8,7 +8,7 @@ import "@floating-ui/react";
8
8
  import "./floatingUi-46f5b896.js";
9
9
  import "./popover.js";
10
10
  import "./button-7ab874f3.js";
11
- import "./fieldText-88af67ae.js";
11
+ import "./fieldText-9d847bec.js";
12
12
  import "./clear-53660571.js";
13
13
  import "./capslockIcon-b100b9d6.js";
14
14
  import "./baseIconButton-251479f7.js";
@@ -17,7 +17,7 @@ import "./maxValueDisplay-9be01a75.js";
17
17
  import "./fieldLabel.js";
18
18
  import "react-dnd";
19
19
  import "react-dnd-html5-backend";
20
- import "./useCapsLock-65753959.js";
20
+ import "./useCapsLock-428c77b6.js";
21
21
  import "./prevPage-87faf576.js";
22
22
  export {
23
23
  t as Pagination,