@reportportal/ui-kit 0.0.1-alpha.60 → 0.0.1-alpha.61
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/components/dropdown/dropdown.d.ts +1 -0
- package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
- package/dist/components/fieldLabel/index.d.ts +1 -0
- package/dist/components/icons/index.d.ts +5 -0
- package/dist/{datePicker-5253e237.js → datePicker-a2b6acf5.js} +2 -2
- package/dist/datePicker.js +6 -5
- package/dist/{dropdown-d6aea1b9.js → dropdown-29285346.js} +106 -101
- package/dist/dropdown.js +2 -1
- package/dist/fieldLabel.js +13 -0
- package/dist/fieldText-1ab17a11.js +158 -0
- package/dist/fieldText.js +2 -1
- package/dist/icons.js +46 -41
- package/dist/index.js +72 -66
- package/dist/{pagination-2076b7b6.js → pagination-7c6ebae2.js} +1 -1
- package/dist/pagination.js +3 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/fieldText-10046ca8.js +0 -161
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DetailedHTMLProps, FC, LabelHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
interface FieldLabelProps extends DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
4
|
+
isRequired?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const FieldLabel: FC<FieldLabelProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FieldLabel } from './fieldLabel';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { default as AddCsv } from './svg/addCsv.svg';
|
|
2
|
+
export { default as AddImage } from './svg/addImage.svg';
|
|
3
|
+
export { default as AddJar } from './svg/addJar.svg';
|
|
1
4
|
export { default as ArrowDownIcon } from './svg/arrowDown.svg';
|
|
2
5
|
export { default as ArrowUpIcon } from './svg/arrowUp.svg';
|
|
3
6
|
export { default as BreadcrumbsTreeIcon } from './svg/breadcrumbsTree.svg';
|
|
@@ -10,7 +13,9 @@ export { default as CloseIcon } from './svg/close.svg';
|
|
|
10
13
|
export { default as CloseEyeIcon } from './svg/closeEye.svg';
|
|
11
14
|
export { default as CopyIcon } from './svg/copy.svg';
|
|
12
15
|
export { default as DeleteIcon } from './svg/delete.svg';
|
|
16
|
+
export { default as DragNDrop } from './svg/dragNDrop.svg';
|
|
13
17
|
export { default as DropdownIcon } from './svg/dropdown.svg';
|
|
18
|
+
export { default as DrugNDrop } from './svg/drugNDrop.svg';
|
|
14
19
|
export { default as EditIcon } from './svg/edit.svg';
|
|
15
20
|
export { default as ErrorIcon } from './svg/error.svg';
|
|
16
21
|
export { default as ExportIcon } from './svg/export.svg';
|
|
@@ -2,9 +2,9 @@ import { jsxs as S, Fragment as U, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import $ from "react-datepicker/dist/es/index.js";
|
|
3
3
|
import { c as R } from "./bind-06a7ff84.js";
|
|
4
4
|
import { useMemo as P, useRef as B } from "react";
|
|
5
|
-
import { F as D } from "./fieldText-
|
|
5
|
+
import { F as D } from "./fieldText-1ab17a11.js";
|
|
6
6
|
import { a as E, S as G } from "./calendarArrow-3e1339ea.js";
|
|
7
|
-
import { D as T } from "./dropdown-
|
|
7
|
+
import { D as T } from "./dropdown-29285346.js";
|
|
8
8
|
import { registerLocale as H } from "react-datepicker";
|
|
9
9
|
const pe = (r, s) => {
|
|
10
10
|
H(r, s);
|
package/dist/datePicker.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-
|
|
2
|
-
import { r as
|
|
1
|
+
import { D as t } from "./datePicker-a2b6acf5.js";
|
|
2
|
+
import { r as v } from "./datePicker-a2b6acf5.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react-datepicker/dist/es/index.js";
|
|
5
5
|
import "./bind-06a7ff84.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import "./fieldText-
|
|
7
|
+
import "./fieldText-1ab17a11.js";
|
|
8
8
|
import "./openEye-7b9cf080.js";
|
|
9
9
|
import "./button-33c88abf.js";
|
|
10
10
|
import "./spinLoader-c4a53718.js";
|
|
11
11
|
import "./maxValueDisplay-9be01a75.js";
|
|
12
|
+
import "./fieldLabel.js";
|
|
12
13
|
import "./calendarArrow-3e1339ea.js";
|
|
13
|
-
import "./dropdown-
|
|
14
|
+
import "./dropdown-29285346.js";
|
|
14
15
|
import "@floating-ui/react-dom";
|
|
15
16
|
import "downshift";
|
|
16
17
|
import "rc-scrollbars";
|
|
@@ -23,5 +24,5 @@ import "react-datepicker";
|
|
|
23
24
|
export {
|
|
24
25
|
t as DatePicker,
|
|
25
26
|
t as default,
|
|
26
|
-
|
|
27
|
+
v as registerDatePickerLocale
|
|
27
28
|
};
|
|
@@ -1,132 +1,135 @@
|
|
|
1
1
|
import { jsxs as f, jsx as d, Fragment as U } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as _e, useState as q, useRef as he } from "react";
|
|
3
3
|
import { c as J } from "./bind-06a7ff84.js";
|
|
4
|
-
import { useFloating as
|
|
4
|
+
import { useFloating as fe, offset as ge, flip as ue } from "@floating-ui/react-dom";
|
|
5
5
|
import { useSelect as j } from "downshift";
|
|
6
|
-
import { Scrollbars as
|
|
7
|
-
import { u as
|
|
6
|
+
import { Scrollbars as ye } from "rc-scrollbars";
|
|
7
|
+
import { u as pe } from "./useOnClickOutside-c332f7d3.js";
|
|
8
8
|
import { K as u } from "./keyCodes-f63c0e11.js";
|
|
9
|
-
import { B as
|
|
10
|
-
import { S as
|
|
11
|
-
import {
|
|
12
|
-
|
|
9
|
+
import { B as me } from "./baseIconButton-251479f7.js";
|
|
10
|
+
import { S as be } from "./dropdown-0260bb66.js";
|
|
11
|
+
import { FieldLabel as Ce } from "./fieldLabel.js";
|
|
12
|
+
import { C as Oe } from "./checkbox-9a6c7ce1.js";
|
|
13
|
+
const Ne = "_disabled_t3cjj_12", De = "_hidden_t3cjj_16", Ee = "_hover_t3cjj_22", we = {
|
|
13
14
|
"dropdown-option": "_dropdown-option_t3cjj_1",
|
|
14
|
-
disabled:
|
|
15
|
-
hidden:
|
|
16
|
-
hover:
|
|
15
|
+
disabled: Ne,
|
|
16
|
+
hidden: De,
|
|
17
|
+
hover: Ee,
|
|
17
18
|
"single-option": "_single-option_t3cjj_35",
|
|
18
19
|
"sub-option": "_sub-option_t3cjj_42"
|
|
19
|
-
}, z = J.bind(
|
|
20
|
+
}, z = J.bind(we), G = _e(
|
|
20
21
|
(r, t) => {
|
|
21
22
|
const {
|
|
22
|
-
option: { value: n, disabled: l, hidden:
|
|
23
|
-
selected:
|
|
23
|
+
option: { value: n, disabled: l, hidden: v, label: y, title: c, groupRef: a },
|
|
24
|
+
selected: K,
|
|
24
25
|
onChange: p,
|
|
25
|
-
render:
|
|
26
|
-
highlightHovered:
|
|
27
|
-
onMouseEnter:
|
|
26
|
+
render: b,
|
|
27
|
+
highlightHovered: C,
|
|
28
|
+
onMouseEnter: A,
|
|
28
29
|
multiSelect: m,
|
|
29
|
-
isPartiallyChecked:
|
|
30
|
-
} = r, x = (
|
|
31
|
-
(
|
|
30
|
+
isPartiallyChecked: O = !1
|
|
31
|
+
} = r, x = (N) => {
|
|
32
|
+
(N.target instanceof HTMLDivElement || N.target instanceof HTMLInputElement) && (p == null || p(n));
|
|
32
33
|
};
|
|
33
34
|
return /* @__PURE__ */ f(
|
|
34
35
|
"div",
|
|
35
36
|
{
|
|
36
37
|
className: z("dropdown-option", {
|
|
37
38
|
disabled: l,
|
|
38
|
-
hidden:
|
|
39
|
-
hover:
|
|
39
|
+
hidden: v,
|
|
40
|
+
hover: C
|
|
40
41
|
}),
|
|
41
42
|
title: c,
|
|
42
43
|
onClick: x,
|
|
43
44
|
ref: t,
|
|
44
|
-
onMouseEnter:
|
|
45
|
+
onMouseEnter: A,
|
|
45
46
|
children: [
|
|
46
|
-
m && /* @__PURE__ */ d(
|
|
47
|
-
/* @__PURE__ */ d("div", { className: z("single-option", { "sub-option": !!a }), children:
|
|
47
|
+
m && /* @__PURE__ */ d(Oe, { value: !!K, partiallyChecked: O }),
|
|
48
|
+
/* @__PURE__ */ d("div", { className: z("single-option", { "sub-option": !!a }), children: b ? b(r) : y })
|
|
48
49
|
]
|
|
49
50
|
}
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
|
-
),
|
|
53
|
+
), ve = [
|
|
53
54
|
u.ENTER_KEY_CODE,
|
|
54
55
|
u.SPACE_KEY_CODE,
|
|
55
56
|
u.ARROW_DOWN_KEY_CODE
|
|
56
|
-
],
|
|
57
|
+
], Ke = [u.ESCAPE_KEY_CODE, u.TAB_KEY_CODE];
|
|
57
58
|
var g = /* @__PURE__ */ ((r) => (r.ON_KEY_DOWN = "onKeyDown", r.ON_CLICK = "onClick", r))(g || {});
|
|
58
|
-
const
|
|
59
|
+
const Ae = (r, t) => {
|
|
59
60
|
const n = Array.isArray(t) ? t : [t];
|
|
60
61
|
return r.findIndex(({ value: l }) => n.includes(l));
|
|
61
|
-
},
|
|
62
|
+
}, xe = (r, t) => (r % t + t) % t, P = (r, t = 0, n = 1) => {
|
|
62
63
|
if (!r[t].disabled)
|
|
63
64
|
return t;
|
|
64
65
|
const l = r.length;
|
|
65
66
|
return P(
|
|
66
67
|
r,
|
|
67
|
-
|
|
68
|
+
xe(t + n, l),
|
|
68
69
|
n
|
|
69
70
|
);
|
|
70
|
-
},
|
|
71
|
-
container:
|
|
72
|
-
icon:
|
|
73
|
-
arrow:
|
|
74
|
-
dropdown:
|
|
71
|
+
}, Ie = (r, t) => P(r, t), ke = (r, t) => P(r, t, -1), je = "_container_1yr7u_1", Pe = "_icon_1yr7u_7", Ye = "_arrow_1yr7u_13", Re = "_dropdown_1yr7u_19", Te = "_disabled_1yr7u_36", He = "_value_1yr7u_43", Me = "_error_1yr7u_46", We = "_touched_1yr7u_46", Le = "_opened_1yr7u_50", Se = "_placeholder_1yr7u_83", Ve = "_ghost_1yr7u_118", $e = "_divider_1yr7u_132", Ue = {
|
|
72
|
+
container: je,
|
|
73
|
+
icon: Pe,
|
|
74
|
+
arrow: Ye,
|
|
75
|
+
dropdown: Re,
|
|
75
76
|
"transparent-background": "_transparent-background_1yr7u_33",
|
|
76
|
-
disabled:
|
|
77
|
-
value:
|
|
78
|
-
error:
|
|
79
|
-
touched:
|
|
80
|
-
opened:
|
|
81
|
-
placeholder:
|
|
77
|
+
disabled: Te,
|
|
78
|
+
value: He,
|
|
79
|
+
error: Me,
|
|
80
|
+
touched: We,
|
|
81
|
+
opened: Le,
|
|
82
|
+
placeholder: Se,
|
|
82
83
|
"mobile-disabled": "_mobile-disabled_1yr7u_87",
|
|
83
84
|
"select-list": "_select-list_1yr7u_92",
|
|
84
85
|
"limited-width": "_limited-width_1yr7u_109",
|
|
85
86
|
"options-container": "_options-container_1yr7u_113",
|
|
86
|
-
ghost:
|
|
87
|
-
divider:
|
|
88
|
-
}, o = J.bind(
|
|
87
|
+
ghost: Ve,
|
|
88
|
+
divider: $e
|
|
89
|
+
}, o = J.bind(Ue), at = ({
|
|
89
90
|
multiSelect: r = !1,
|
|
90
91
|
value: t = r ? [] : "",
|
|
91
92
|
options: n = [],
|
|
92
93
|
disabled: l = !1,
|
|
93
|
-
error:
|
|
94
|
+
error: v,
|
|
94
95
|
onChange: y,
|
|
95
96
|
onFocus: c,
|
|
96
97
|
onBlur: a,
|
|
97
|
-
mobileDisabled:
|
|
98
|
+
mobileDisabled: K,
|
|
98
99
|
title: p,
|
|
99
|
-
touched:
|
|
100
|
-
icon:
|
|
101
|
-
variant:
|
|
100
|
+
touched: b = !1,
|
|
101
|
+
icon: C,
|
|
102
|
+
variant: A,
|
|
102
103
|
placeholder: m = "",
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
label: O = "",
|
|
105
|
+
renderOption: x,
|
|
106
|
+
transparentBackground: N = !1,
|
|
107
|
+
className: Q,
|
|
108
|
+
toggleButtonClassName: X,
|
|
109
|
+
isListWidthLimited: Z = !1,
|
|
108
110
|
optionAll: Y = { value: "all", label: "All" },
|
|
109
111
|
isOptionAllVisible: R = !1,
|
|
110
|
-
onSelectAll:
|
|
112
|
+
onSelectAll: F = () => {
|
|
111
113
|
},
|
|
112
114
|
formatDisplayedValue: T,
|
|
113
|
-
notScrollable:
|
|
115
|
+
notScrollable: B = !1,
|
|
114
116
|
footer: H
|
|
115
117
|
}) => {
|
|
116
|
-
const [_, h] = q(!1), M =
|
|
118
|
+
const [_, h] = q(!1), M = he(null), [ee, D] = q(null), I = r && Array.isArray(t) ? n.filter((e) => t.includes(e.value)) : null, { refs: W, floatingStyles: te } = fe({
|
|
119
|
+
placement: "bottom-start",
|
|
117
120
|
middleware: [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
fallbackPlacements: ["bottom", "top"]
|
|
121
|
+
ge(5),
|
|
122
|
+
ue({
|
|
123
|
+
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"]
|
|
121
124
|
})
|
|
122
125
|
]
|
|
123
|
-
}),
|
|
126
|
+
}), re = () => {
|
|
124
127
|
if (R && Array.isArray(t)) {
|
|
125
128
|
const e = n.map((s) => s.value);
|
|
126
|
-
y(t.length === n.length ? [] : e),
|
|
129
|
+
y(t.length === n.length ? [] : e), F();
|
|
127
130
|
}
|
|
128
131
|
};
|
|
129
|
-
|
|
132
|
+
pe(M, () => {
|
|
130
133
|
_ && (h(!1), a == null || a());
|
|
131
134
|
});
|
|
132
135
|
const L = (e) => {
|
|
@@ -138,32 +141,33 @@ const we = (r, t) => {
|
|
|
138
141
|
y(e.value);
|
|
139
142
|
h((s) => r || !s);
|
|
140
143
|
}
|
|
141
|
-
},
|
|
142
|
-
getToggleButtonProps:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
}, ne = () => n.find(({ value: e }) => e === t), S = Ae(n, t), {
|
|
145
|
+
getToggleButtonProps: se,
|
|
146
|
+
getLabelProps: ae,
|
|
147
|
+
getMenuProps: de,
|
|
148
|
+
getItemProps: ie,
|
|
149
|
+
setHighlightedIndex: E,
|
|
146
150
|
highlightedIndex: V,
|
|
147
|
-
selectedItem:
|
|
151
|
+
selectedItem: w
|
|
148
152
|
} = j({
|
|
149
153
|
items: n,
|
|
150
154
|
itemToString: (e) => (e != null && e.label ? String(e.label) : m) || "",
|
|
151
|
-
selectedItem:
|
|
155
|
+
selectedItem: ne(),
|
|
152
156
|
isOpen: _,
|
|
153
157
|
circularNavigation: !0,
|
|
154
158
|
defaultHighlightedIndex: S,
|
|
155
159
|
onHighlightedIndexChange: (e) => {
|
|
156
160
|
switch (e.type) {
|
|
157
161
|
case j.stateChangeTypes.MenuKeyDownArrowUp:
|
|
158
|
-
return
|
|
162
|
+
return D(g.ON_KEY_DOWN), E(ke(n, e.highlightedIndex)), e;
|
|
159
163
|
case j.stateChangeTypes.MenuKeyDownArrowDown:
|
|
160
|
-
return
|
|
164
|
+
return D(g.ON_KEY_DOWN), E(Ie(n, e.highlightedIndex)), e;
|
|
161
165
|
default:
|
|
162
166
|
return e;
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
|
-
}),
|
|
166
|
-
l || (h((e) => !e), _ ? a == null || a() : c == null || c(),
|
|
169
|
+
}), le = () => {
|
|
170
|
+
l || (h((e) => !e), _ ? a == null || a() : c == null || c(), D(g.ON_CLICK));
|
|
167
171
|
}, k = (() => {
|
|
168
172
|
if (r && Array.isArray(t) && n.length === t.length)
|
|
169
173
|
return Y.label;
|
|
@@ -172,17 +176,17 @@ const we = (r, t) => {
|
|
|
172
176
|
return e.join(", ");
|
|
173
177
|
if (!t && t !== !1 && t !== 0 || Array.isArray(t) && !t.length)
|
|
174
178
|
return m;
|
|
175
|
-
})(),
|
|
179
|
+
})(), oe = (e) => {
|
|
176
180
|
const { keyCode: s } = e;
|
|
177
|
-
|
|
178
|
-
},
|
|
181
|
+
ve.includes(s) && !_ && (e.preventDefault(), E(S), h(!0), c == null || c(), D(g.ON_KEY_DOWN));
|
|
182
|
+
}, ce = (e) => {
|
|
179
183
|
const { keyCode: s } = e;
|
|
180
184
|
if (s === u.ENTER_KEY_CODE) {
|
|
181
185
|
const i = n[V];
|
|
182
186
|
L(i), r || (h(!1), a == null || a());
|
|
183
187
|
return;
|
|
184
188
|
}
|
|
185
|
-
|
|
189
|
+
Ke.includes(s) && (e.stopPropagation(), h(!1), a == null || a());
|
|
186
190
|
}, $ = () => /* @__PURE__ */ f("div", { className: o("options-container"), children: [
|
|
187
191
|
r && R && Array.isArray(t) && /* @__PURE__ */ f(U, { children: [
|
|
188
192
|
/* @__PURE__ */ d(
|
|
@@ -190,7 +194,7 @@ const we = (r, t) => {
|
|
|
190
194
|
{
|
|
191
195
|
option: Y,
|
|
192
196
|
selected: t.length === n.length,
|
|
193
|
-
onChange:
|
|
197
|
+
onChange: re,
|
|
194
198
|
multiSelect: r,
|
|
195
199
|
isPartiallyChecked: !!t.length
|
|
196
200
|
}
|
|
@@ -201,17 +205,17 @@ const we = (r, t) => {
|
|
|
201
205
|
n.map((e, s) => /* @__PURE__ */ d(
|
|
202
206
|
G,
|
|
203
207
|
{
|
|
204
|
-
...
|
|
208
|
+
...ie({
|
|
205
209
|
item: e,
|
|
206
210
|
index: s
|
|
207
211
|
}),
|
|
208
212
|
multiSelect: r,
|
|
209
|
-
selected: r ? I == null ? void 0 : I.some((i) => i.value === e.value) : e.value === ((
|
|
213
|
+
selected: r ? I == null ? void 0 : I.some((i) => i.value === e.value) : e.value === ((w == null ? void 0 : w.value) ?? w),
|
|
210
214
|
option: { title: e.label, ...e },
|
|
211
|
-
highlightHovered: V === s &&
|
|
212
|
-
render:
|
|
215
|
+
highlightHovered: V === s && ee !== g.ON_CLICK,
|
|
216
|
+
render: x,
|
|
213
217
|
onChange: e.disabled ? null : () => L(e),
|
|
214
|
-
onMouseEnter: () =>
|
|
218
|
+
onMouseEnter: () => E(s)
|
|
215
219
|
},
|
|
216
220
|
e.value
|
|
217
221
|
)),
|
|
@@ -220,27 +224,28 @@ const we = (r, t) => {
|
|
|
220
224
|
H
|
|
221
225
|
] })
|
|
222
226
|
] });
|
|
223
|
-
return /* @__PURE__ */ f("div", { ref: M, className: o("container",
|
|
227
|
+
return /* @__PURE__ */ f("div", { ref: M, className: o("container", Q), title: p, children: [
|
|
228
|
+
O && /* @__PURE__ */ d(Ce, { ...ae(), children: O }),
|
|
224
229
|
/* @__PURE__ */ f(
|
|
225
230
|
"button",
|
|
226
231
|
{
|
|
227
232
|
disabled: l,
|
|
228
|
-
...
|
|
229
|
-
className: o("dropdown",
|
|
230
|
-
"transparent-background":
|
|
233
|
+
...se({
|
|
234
|
+
className: o("dropdown", A, X, {
|
|
235
|
+
"transparent-background": N,
|
|
231
236
|
opened: _,
|
|
232
237
|
disabled: l,
|
|
233
|
-
error:
|
|
234
|
-
touched:
|
|
235
|
-
"mobile-disabled":
|
|
238
|
+
error: v,
|
|
239
|
+
touched: b,
|
|
240
|
+
"mobile-disabled": K
|
|
236
241
|
}),
|
|
237
|
-
onClick:
|
|
238
|
-
onKeyDown:
|
|
242
|
+
onClick: le,
|
|
243
|
+
onKeyDown: oe,
|
|
239
244
|
ref: W.setReference
|
|
240
245
|
}),
|
|
241
246
|
type: "button",
|
|
242
247
|
children: [
|
|
243
|
-
|
|
248
|
+
C && /* @__PURE__ */ d("span", { className: o("icon"), children: C }),
|
|
244
249
|
/* @__PURE__ */ d(
|
|
245
250
|
"span",
|
|
246
251
|
{
|
|
@@ -250,24 +255,24 @@ const we = (r, t) => {
|
|
|
250
255
|
children: T ? T(k) : k
|
|
251
256
|
}
|
|
252
257
|
),
|
|
253
|
-
/* @__PURE__ */ d(
|
|
258
|
+
/* @__PURE__ */ d(me, { className: o("arrow"), tabIndex: -1, children: /* @__PURE__ */ d(be, {}) })
|
|
254
259
|
]
|
|
255
260
|
}
|
|
256
261
|
),
|
|
257
262
|
_ && /* @__PURE__ */ d(
|
|
258
263
|
"div",
|
|
259
264
|
{
|
|
260
|
-
style:
|
|
261
|
-
className: o("select-list", { opened: _, "limited-width":
|
|
262
|
-
...
|
|
263
|
-
onKeyDown:
|
|
265
|
+
style: te,
|
|
266
|
+
className: o("select-list", { opened: _, "limited-width": Z }),
|
|
267
|
+
...de({
|
|
268
|
+
onKeyDown: ce,
|
|
264
269
|
ref: W.setFloating
|
|
265
270
|
}),
|
|
266
|
-
children:
|
|
271
|
+
children: B ? $() : /* @__PURE__ */ d(ye, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: $() })
|
|
267
272
|
}
|
|
268
273
|
)
|
|
269
274
|
] });
|
|
270
275
|
};
|
|
271
276
|
export {
|
|
272
|
-
|
|
277
|
+
at as D
|
|
273
278
|
};
|
package/dist/dropdown.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as r } from "./dropdown-
|
|
1
|
+
import { D as r } from "./dropdown-29285346.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
@@ -9,6 +9,7 @@ import "./useOnClickOutside-c332f7d3.js";
|
|
|
9
9
|
import "./keyCodes-f63c0e11.js";
|
|
10
10
|
import "./baseIconButton-251479f7.js";
|
|
11
11
|
import "./dropdown-0260bb66.js";
|
|
12
|
+
import "./fieldLabel.js";
|
|
12
13
|
import "./checkbox-9a6c7ce1.js";
|
|
13
14
|
export {
|
|
14
15
|
r as Dropdown,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as d } from "./bind-06a7ff84.js";
|
|
3
|
+
const c = "_asterisk_1hktw_11", r = "_disabled_1hktw_17", o = {
|
|
4
|
+
"field-label": "_field-label_1hktw_1",
|
|
5
|
+
asterisk: c,
|
|
6
|
+
disabled: r
|
|
7
|
+
}, s = d.bind(o), _ = ({ children: e, isRequired: l = !1, ...a }) => /* @__PURE__ */ i("label", { className: s("field-label"), ...a, children: [
|
|
8
|
+
e,
|
|
9
|
+
l && /* @__PURE__ */ t("span", { className: s("asterisk"), children: "*" })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
_ as FieldLabel
|
|
13
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Q, useRef as Y, useId as Z, useState as R } 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-33c88abf.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_fju7x_13", ie = "_field_fju7x_21", le = "_placeholder_fju7x_46", ue = "_disabled_fju7x_49", de = "_error_fju7x_52", _e = "_touched_fju7x_52", fe = "_input_fju7x_70", pe = "_icon_fju7x_1", xe = "_text_fju7x_168", me = {
|
|
11
|
+
"icon-container": "_icon-container_fju7x_1",
|
|
12
|
+
"icon-container-end": "_icon-container-end_fju7x_1",
|
|
13
|
+
"icon-container-start": "_icon-container-start_fju7x_1",
|
|
14
|
+
collapsed: re,
|
|
15
|
+
field: ie,
|
|
16
|
+
"default-width": "_default-width_fju7x_33",
|
|
17
|
+
placeholder: le,
|
|
18
|
+
disabled: ue,
|
|
19
|
+
error: de,
|
|
20
|
+
touched: _e,
|
|
21
|
+
"max-length-display": "_max-length-display_fju7x_59",
|
|
22
|
+
"input-container": "_input-container_fju7x_70",
|
|
23
|
+
"type-password": "_type-password_fju7x_74",
|
|
24
|
+
input: fe,
|
|
25
|
+
"eye-icon": "_eye-icon_fju7x_78",
|
|
26
|
+
icon: pe,
|
|
27
|
+
"start-icon": "_start-icon_fju7x_124",
|
|
28
|
+
"clear-icon": "_clear-icon_fju7x_125",
|
|
29
|
+
"additional-content": "_additional-content_fju7x_161",
|
|
30
|
+
text: xe,
|
|
31
|
+
"error-text": "_error-text_fju7x_188",
|
|
32
|
+
"help-text": "_help-text_fju7x_192"
|
|
33
|
+
}, n = q.bind(me), De = Q(
|
|
34
|
+
({
|
|
35
|
+
value: t = "",
|
|
36
|
+
className: M,
|
|
37
|
+
classNameHelpText: b,
|
|
38
|
+
error: l,
|
|
39
|
+
placeholder: p,
|
|
40
|
+
disabled: c = !1,
|
|
41
|
+
onChange: v,
|
|
42
|
+
touched: x = !1,
|
|
43
|
+
title: A,
|
|
44
|
+
label: u,
|
|
45
|
+
helpText: d,
|
|
46
|
+
defaultWidth: O = !0,
|
|
47
|
+
startIcon: m,
|
|
48
|
+
endIcon: h,
|
|
49
|
+
clearable: B = !1,
|
|
50
|
+
onClear: j,
|
|
51
|
+
isRequired: N = !1,
|
|
52
|
+
hasDoubleMessage: C = !1,
|
|
53
|
+
type: r = o.TEXT,
|
|
54
|
+
displayError: L = !0,
|
|
55
|
+
collapsible: V = !1,
|
|
56
|
+
loading: W = !1,
|
|
57
|
+
maxLengthDisplay: k,
|
|
58
|
+
onFocus: X = () => {
|
|
59
|
+
},
|
|
60
|
+
onBlur: H = () => {
|
|
61
|
+
},
|
|
62
|
+
...I
|
|
63
|
+
}, U) => {
|
|
64
|
+
const $ = Y(null), _ = U || $, S = Z(), [w, y] = R(!1), [g, E] = R(!1), z = (s) => {
|
|
65
|
+
y(!0), X(s);
|
|
66
|
+
}, G = (s) => {
|
|
67
|
+
y(!1), H(s);
|
|
68
|
+
}, J = () => {
|
|
69
|
+
var s;
|
|
70
|
+
j && (j(t), (s = _.current) == null || s.focus());
|
|
71
|
+
}, D = L && l && x, F = /* @__PURE__ */ e("span", { className: n("text", "help-text", b), children: d }), K = () => r !== o.PASSWORD ? r : g ? o.TEXT : o.PASSWORD, T = (s) => {
|
|
72
|
+
s.preventDefault(), E(!0);
|
|
73
|
+
}, i = (s) => {
|
|
74
|
+
s.preventDefault(), E(!1);
|
|
75
|
+
};
|
|
76
|
+
return /* @__PURE__ */ a(P, { children: [
|
|
77
|
+
u && /* @__PURE__ */ e(ce, { isRequired: N, htmlFor: S, children: u }),
|
|
78
|
+
/* @__PURE__ */ a(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
className: n("field", M, {
|
|
82
|
+
error: l,
|
|
83
|
+
touched: x,
|
|
84
|
+
disabled: c,
|
|
85
|
+
"default-width": O,
|
|
86
|
+
collapsed: V && !w && !t
|
|
87
|
+
}),
|
|
88
|
+
title: A,
|
|
89
|
+
children: [
|
|
90
|
+
W ? /* @__PURE__ */ e(oe, {}) : m && /* @__PURE__ */ e(
|
|
91
|
+
"span",
|
|
92
|
+
{
|
|
93
|
+
className: n("icon-container-start"),
|
|
94
|
+
onClick: () => {
|
|
95
|
+
var f;
|
|
96
|
+
(f = _.current) == null || f.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: _,
|
|
106
|
+
type: K(),
|
|
107
|
+
className: n("input"),
|
|
108
|
+
value: t,
|
|
109
|
+
disabled: c,
|
|
110
|
+
id: S,
|
|
111
|
+
onChange: v,
|
|
112
|
+
onFocus: z,
|
|
113
|
+
onBlur: G,
|
|
114
|
+
...I
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
r === o.PASSWORD && t && /* @__PURE__ */ e(
|
|
118
|
+
se,
|
|
119
|
+
{
|
|
120
|
+
icon: g ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ e(ne, {}),
|
|
121
|
+
variant: "text",
|
|
122
|
+
className: n("eye-icon"),
|
|
123
|
+
onMouseDown: T,
|
|
124
|
+
onMouseLeave: i,
|
|
125
|
+
onMouseUp: i,
|
|
126
|
+
onTouchStart: T,
|
|
127
|
+
onTouchEnd: i,
|
|
128
|
+
onTouchCancel: i
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
p && !t && /* @__PURE__ */ a("span", { className: n("placeholder"), children: [
|
|
132
|
+
p,
|
|
133
|
+
N && !u && /* @__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: k
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
h && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: h }) }),
|
|
145
|
+
B && 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
|
+
(D || d) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: c }), children: D ? /* @__PURE__ */ a(P, { children: [
|
|
150
|
+
/* @__PURE__ */ e("span", { className: n("text", "error-text"), children: l }),
|
|
151
|
+
C && F
|
|
152
|
+
] }) : d && F })
|
|
153
|
+
] });
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
export {
|
|
157
|
+
De as F
|
|
158
|
+
};
|
package/dist/fieldText.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as o } from "./fieldText-
|
|
1
|
+
import { F as o } from "./fieldText-1ab17a11.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
@@ -6,6 +6,7 @@ import "./openEye-7b9cf080.js";
|
|
|
6
6
|
import "./button-33c88abf.js";
|
|
7
7
|
import "./spinLoader-c4a53718.js";
|
|
8
8
|
import "./maxValueDisplay-9be01a75.js";
|
|
9
|
+
import "./fieldLabel.js";
|
|
9
10
|
export {
|
|
10
11
|
o as FieldText,
|
|
11
12
|
o as default
|