@reportportal/ui-kit 0.0.1-alpha.56 → 0.0.1-alpha.58
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/README.md +1 -1
- package/dist/components/dropdown/dropdown.d.ts +2 -0
- package/dist/components/fieldText/fieldText.d.ts +3 -3
- package/dist/components/fieldText/types.d.ts +5 -0
- package/dist/{datePicker-a333d78b.js → datePicker-0a14e9f2.js} +2 -2
- package/dist/datePicker.js +4 -4
- package/dist/{dropdown-6edea86c.js → dropdown-937ba0eb.js} +79 -77
- package/dist/dropdown.js +1 -1
- package/dist/fieldText-10046ca8.js +161 -0
- package/dist/fieldText.js +1 -1
- package/dist/index.js +4 -4
- package/dist/modal.js +56 -56
- package/dist/{pagination-066b1b2b.js → pagination-2076b7b6.js} +1 -1
- package/dist/pagination.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +10 -10
- package/dist/fieldText-78c1be1a.js +0 -160
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ const MyComponent = () => (
|
|
|
45
45
|
|
|
46
46
|
### Theming
|
|
47
47
|
|
|
48
|
-
All components are provided with the `light
|
|
48
|
+
All components are provided with the `light` theme by default.
|
|
49
49
|
To use the `dark` theme, you need to wrap your application with the `ThemeProvider` component and pass the `dark` theme as a prop:
|
|
50
50
|
|
|
51
51
|
```jsx
|
|
@@ -24,6 +24,8 @@ export interface DropdownProps {
|
|
|
24
24
|
optionAll?: DropdownOptionType;
|
|
25
25
|
isOptionAllVisible?: boolean;
|
|
26
26
|
onSelectAll?: () => void;
|
|
27
|
+
customDisplayedValue?: string;
|
|
28
|
+
notScrollable?: boolean;
|
|
27
29
|
footer?: ReactNode;
|
|
28
30
|
}
|
|
29
31
|
export declare const Dropdown: FC<DropdownProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChangeEventHandler, ReactNode, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { InputType } from './types';
|
|
2
3
|
|
|
3
|
-
interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
export interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
5
|
value?: string;
|
|
5
6
|
className?: string;
|
|
6
7
|
classNameHelpText?: string;
|
|
@@ -21,11 +22,10 @@ interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
21
22
|
onClear?: (prevValue?: string) => void;
|
|
22
23
|
isRequired?: boolean;
|
|
23
24
|
hasDoubleMessage?: boolean;
|
|
24
|
-
type?:
|
|
25
|
+
type?: InputType;
|
|
25
26
|
displayError?: boolean;
|
|
26
27
|
maxLengthDisplay?: number;
|
|
27
28
|
collapsible?: boolean;
|
|
28
29
|
loading?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export declare const FieldText: import('react').ForwardRefExoticComponent<FieldTextProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
31
|
-
export {};
|
|
@@ -2,9 +2,9 @@ import { jsxs as S, Fragment as U, jsx as o } 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 E, useRef as B } from "react";
|
|
5
|
-
import { F as D } from "./fieldText-
|
|
5
|
+
import { F as D } from "./fieldText-10046ca8.js";
|
|
6
6
|
import { a as T, S as G } from "./calendarArrow-3e1339ea.js";
|
|
7
|
-
import { D as L } from "./dropdown-
|
|
7
|
+
import { D as L } from "./dropdown-937ba0eb.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,16 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-
|
|
2
|
-
import { r as q } from "./datePicker-
|
|
1
|
+
import { D as t } from "./datePicker-0a14e9f2.js";
|
|
2
|
+
import { r as q } from "./datePicker-0a14e9f2.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-10046ca8.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
12
|
import "./calendarArrow-3e1339ea.js";
|
|
13
|
-
import "./dropdown-
|
|
13
|
+
import "./dropdown-937ba0eb.js";
|
|
14
14
|
import "@floating-ui/react-dom";
|
|
15
15
|
import "downshift";
|
|
16
16
|
import "rc-scrollbars";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as f, jsx as d, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useFloating as
|
|
1
|
+
import { jsxs as f, jsx as d, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as oe, useState as $, useRef as ce } from "react";
|
|
3
|
+
import { c as z } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useFloating as _e, offset as he, flip as fe } from "@floating-ui/react-dom";
|
|
5
5
|
import { useSelect as k } from "downshift";
|
|
6
|
-
import { Scrollbars as
|
|
7
|
-
import { u as
|
|
6
|
+
import { Scrollbars as ye } from "rc-scrollbars";
|
|
7
|
+
import { u as ge } from "./useOnClickOutside-c332f7d3.js";
|
|
8
8
|
import { K as g } from "./keyCodes-f63c0e11.js";
|
|
9
|
-
import { B as
|
|
10
|
-
import { S as
|
|
11
|
-
import { C as
|
|
12
|
-
const
|
|
9
|
+
import { B as ue } from "./baseIconButton-251479f7.js";
|
|
10
|
+
import { S as pe } from "./dropdown-0260bb66.js";
|
|
11
|
+
import { C as me } from "./checkbox-9a6c7ce1.js";
|
|
12
|
+
const Ce = "_disabled_t3cjj_12", Oe = "_hidden_t3cjj_16", be = "_hover_t3cjj_22", Ne = {
|
|
13
13
|
"dropdown-option": "_dropdown-option_t3cjj_1",
|
|
14
|
-
disabled:
|
|
15
|
-
hidden:
|
|
16
|
-
hover:
|
|
14
|
+
disabled: Ce,
|
|
15
|
+
hidden: Oe,
|
|
16
|
+
hover: be,
|
|
17
17
|
"single-option": "_single-option_t3cjj_35",
|
|
18
18
|
"sub-option": "_sub-option_t3cjj_42"
|
|
19
|
-
},
|
|
19
|
+
}, U = z.bind(Ne), q = oe(
|
|
20
20
|
(t, e) => {
|
|
21
21
|
const {
|
|
22
22
|
option: { value: n, disabled: l, hidden: w, label: u, title: c, groupRef: a },
|
|
@@ -33,7 +33,7 @@ const pe = "_disabled_t3cjj_12", me = "_hidden_t3cjj_16", Ce = "_hover_t3cjj_22"
|
|
|
33
33
|
return /* @__PURE__ */ f(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
|
-
className:
|
|
36
|
+
className: U("dropdown-option", {
|
|
37
37
|
disabled: l,
|
|
38
38
|
hidden: w,
|
|
39
39
|
hover: C
|
|
@@ -43,49 +43,49 @@ const pe = "_disabled_t3cjj_12", me = "_hidden_t3cjj_16", Ce = "_hover_t3cjj_22"
|
|
|
43
43
|
ref: e,
|
|
44
44
|
onMouseEnter: K,
|
|
45
45
|
children: [
|
|
46
|
-
O && /* @__PURE__ */ d(
|
|
47
|
-
/* @__PURE__ */ d("div", { className:
|
|
46
|
+
O && /* @__PURE__ */ d(me, { value: !!A, partiallyChecked: v }),
|
|
47
|
+
/* @__PURE__ */ d("div", { className: U("single-option", { "sub-option": !!a }), children: m ? m(t) : u })
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
|
-
),
|
|
52
|
+
), De = [
|
|
53
53
|
g.ENTER_KEY_CODE,
|
|
54
54
|
g.SPACE_KEY_CODE,
|
|
55
55
|
g.ARROW_DOWN_KEY_CODE
|
|
56
|
-
],
|
|
56
|
+
], Ee = [g.ESCAPE_KEY_CODE, g.TAB_KEY_CODE];
|
|
57
57
|
var y = /* @__PURE__ */ ((t) => (t.ON_KEY_DOWN = "onKeyDown", t.ON_CLICK = "onClick", t))(y || {});
|
|
58
|
-
const
|
|
58
|
+
const we = (t, e) => {
|
|
59
59
|
const n = Array.isArray(e) ? e : [e];
|
|
60
60
|
return t.findIndex(({ value: l }) => n.includes(l));
|
|
61
|
-
},
|
|
61
|
+
}, Ae = (t, e) => (t % e + e) % e, j = (t, e = 0, n = 1) => {
|
|
62
62
|
if (!t[e].disabled)
|
|
63
63
|
return e;
|
|
64
64
|
const l = t.length;
|
|
65
65
|
return j(
|
|
66
66
|
t,
|
|
67
|
-
|
|
67
|
+
Ae(e + n, l),
|
|
68
68
|
n
|
|
69
69
|
);
|
|
70
|
-
},
|
|
71
|
-
container:
|
|
72
|
-
icon:
|
|
73
|
-
arrow:
|
|
74
|
-
dropdown:
|
|
70
|
+
}, Ke = (t, e) => j(t, e), ve = (t, e) => j(t, e, -1), xe = "_container_1yr7u_1", Ie = "_icon_1yr7u_7", ke = "_arrow_1yr7u_13", je = "_dropdown_1yr7u_19", Pe = "_disabled_1yr7u_36", Ye = "_value_1yr7u_43", Re = "_error_1yr7u_46", Te = "_touched_1yr7u_46", He = "_opened_1yr7u_50", Me = "_placeholder_1yr7u_83", We = "_ghost_1yr7u_118", Le = "_divider_1yr7u_132", Se = {
|
|
71
|
+
container: xe,
|
|
72
|
+
icon: Ie,
|
|
73
|
+
arrow: ke,
|
|
74
|
+
dropdown: je,
|
|
75
75
|
"transparent-background": "_transparent-background_1yr7u_33",
|
|
76
|
-
disabled:
|
|
77
|
-
value:
|
|
78
|
-
error:
|
|
79
|
-
touched:
|
|
80
|
-
opened:
|
|
81
|
-
placeholder:
|
|
76
|
+
disabled: Pe,
|
|
77
|
+
value: Ye,
|
|
78
|
+
error: Re,
|
|
79
|
+
touched: Te,
|
|
80
|
+
opened: He,
|
|
81
|
+
placeholder: Me,
|
|
82
82
|
"mobile-disabled": "_mobile-disabled_1yr7u_87",
|
|
83
83
|
"select-list": "_select-list_1yr7u_92",
|
|
84
84
|
"limited-width": "_limited-width_1yr7u_109",
|
|
85
85
|
"options-container": "_options-container_1yr7u_113",
|
|
86
|
-
ghost:
|
|
87
|
-
divider:
|
|
88
|
-
}, o =
|
|
86
|
+
ghost: We,
|
|
87
|
+
divider: Le
|
|
88
|
+
}, o = z.bind(Se), er = ({
|
|
89
89
|
multiSelect: t = !1,
|
|
90
90
|
value: e = t ? [] : "",
|
|
91
91
|
options: n = [],
|
|
@@ -103,28 +103,30 @@ const De = (t, e) => {
|
|
|
103
103
|
renderOption: v,
|
|
104
104
|
transparentBackground: x = !1,
|
|
105
105
|
className: b,
|
|
106
|
-
toggleButtonClassName:
|
|
107
|
-
isListWidthLimited:
|
|
106
|
+
toggleButtonClassName: G,
|
|
107
|
+
isListWidthLimited: J = !1,
|
|
108
108
|
optionAll: P = { value: "all", label: "All" },
|
|
109
109
|
isOptionAllVisible: Y = !1,
|
|
110
|
-
onSelectAll:
|
|
110
|
+
onSelectAll: Q = () => {
|
|
111
111
|
},
|
|
112
|
+
customDisplayedValue: X,
|
|
113
|
+
notScrollable: Z = !1,
|
|
112
114
|
footer: R
|
|
113
115
|
}) => {
|
|
114
|
-
const [_, h] =
|
|
116
|
+
const [_, h] = $(!1), T = ce(null), [F, N] = $(null), I = t && Array.isArray(e) ? n.filter((r) => e.includes(r.value)) : null, { refs: H, floatingStyles: B } = _e({
|
|
115
117
|
middleware: [
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
he(5),
|
|
119
|
+
fe({
|
|
118
120
|
fallbackPlacements: ["bottom", "top"]
|
|
119
121
|
})
|
|
120
122
|
]
|
|
121
|
-
}),
|
|
123
|
+
}), ee = () => {
|
|
122
124
|
if (Y && Array.isArray(e)) {
|
|
123
125
|
const r = n.map((s) => s.value);
|
|
124
|
-
u(e.length === n.length ? [] : r),
|
|
126
|
+
u(e.length === n.length ? [] : r), Q();
|
|
125
127
|
}
|
|
126
128
|
};
|
|
127
|
-
|
|
129
|
+
ge(T, () => {
|
|
128
130
|
_ && (h(!1), a == null || a());
|
|
129
131
|
});
|
|
130
132
|
const M = (r) => {
|
|
@@ -136,51 +138,51 @@ const De = (t, e) => {
|
|
|
136
138
|
u(r.value);
|
|
137
139
|
h((s) => t || !s);
|
|
138
140
|
}
|
|
139
|
-
},
|
|
140
|
-
getToggleButtonProps:
|
|
141
|
-
getMenuProps:
|
|
142
|
-
getItemProps:
|
|
141
|
+
}, re = () => n.find(({ value: r }) => r === e), W = we(n, e), {
|
|
142
|
+
getToggleButtonProps: te,
|
|
143
|
+
getMenuProps: ne,
|
|
144
|
+
getItemProps: se,
|
|
143
145
|
setHighlightedIndex: D,
|
|
144
146
|
highlightedIndex: L,
|
|
145
147
|
selectedItem: E
|
|
146
148
|
} = k({
|
|
147
149
|
items: n,
|
|
148
150
|
itemToString: (r) => (r != null && r.label ? String(r.label) : O) || "",
|
|
149
|
-
selectedItem:
|
|
151
|
+
selectedItem: re(),
|
|
150
152
|
isOpen: _,
|
|
151
153
|
circularNavigation: !0,
|
|
152
154
|
defaultHighlightedIndex: W,
|
|
153
155
|
onHighlightedIndexChange: (r) => {
|
|
154
156
|
switch (r.type) {
|
|
155
157
|
case k.stateChangeTypes.MenuKeyDownArrowUp:
|
|
156
|
-
return N(y.ON_KEY_DOWN), D(
|
|
158
|
+
return N(y.ON_KEY_DOWN), D(ve(n, r.highlightedIndex)), r;
|
|
157
159
|
case k.stateChangeTypes.MenuKeyDownArrowDown:
|
|
158
|
-
return N(y.ON_KEY_DOWN), D(
|
|
160
|
+
return N(y.ON_KEY_DOWN), D(Ke(n, r.highlightedIndex)), r;
|
|
159
161
|
default:
|
|
160
162
|
return r;
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
|
-
}),
|
|
165
|
+
}), ae = () => {
|
|
164
166
|
l || (h((r) => !r), _ ? a == null || a() : c == null || c(), N(y.ON_CLICK));
|
|
165
|
-
},
|
|
167
|
+
}, de = () => !e && e !== !1 && e !== 0 || Array.isArray(e) && !e.length ? O : t && Array.isArray(e) && n.length === e.length ? P.label : n.reduce((s, i) => ((Array.isArray(e) && e.includes(i.value) || i.value === e) && s.push(i.label), s), []).join(", "), ie = (r) => {
|
|
166
168
|
const { keyCode: s } = r;
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
+
De.includes(s) && !_ && (r.preventDefault(), D(W), h(!0), c == null || c(), N(y.ON_KEY_DOWN));
|
|
170
|
+
}, le = (r) => {
|
|
169
171
|
const { keyCode: s } = r;
|
|
170
172
|
if (s === g.ENTER_KEY_CODE) {
|
|
171
173
|
const i = n[L];
|
|
172
174
|
M(i), t || (h(!1), a == null || a());
|
|
173
175
|
return;
|
|
174
176
|
}
|
|
175
|
-
|
|
176
|
-
},
|
|
177
|
-
t && Y && Array.isArray(e) && /* @__PURE__ */ f(
|
|
177
|
+
Ee.includes(s) && (r.stopPropagation(), h(!1), a == null || a());
|
|
178
|
+
}, S = () => /* @__PURE__ */ f("div", { className: o("options-container"), children: [
|
|
179
|
+
t && Y && Array.isArray(e) && /* @__PURE__ */ f(V, { children: [
|
|
178
180
|
/* @__PURE__ */ d(
|
|
179
|
-
|
|
181
|
+
q,
|
|
180
182
|
{
|
|
181
183
|
option: P,
|
|
182
184
|
selected: e.length === n.length,
|
|
183
|
-
onChange:
|
|
185
|
+
onChange: ee,
|
|
184
186
|
multiSelect: t,
|
|
185
187
|
isPartiallyChecked: !!e.length
|
|
186
188
|
}
|
|
@@ -189,23 +191,23 @@ const De = (t, e) => {
|
|
|
189
191
|
" "
|
|
190
192
|
] }),
|
|
191
193
|
n.map((r, s) => /* @__PURE__ */ d(
|
|
192
|
-
|
|
194
|
+
q,
|
|
193
195
|
{
|
|
194
|
-
...
|
|
196
|
+
...se({
|
|
195
197
|
item: r,
|
|
196
198
|
index: s
|
|
197
199
|
}),
|
|
198
200
|
multiSelect: t,
|
|
199
201
|
selected: t ? I == null ? void 0 : I.some((i) => i.value === r.value) : r.value === ((E == null ? void 0 : E.value) ?? E),
|
|
200
202
|
option: { title: r.label, ...r },
|
|
201
|
-
highlightHovered: L === s &&
|
|
203
|
+
highlightHovered: L === s && F !== y.ON_CLICK,
|
|
202
204
|
render: v,
|
|
203
205
|
onChange: r.disabled ? null : () => M(r),
|
|
204
206
|
onMouseEnter: () => D(s)
|
|
205
207
|
},
|
|
206
208
|
r.value
|
|
207
209
|
)),
|
|
208
|
-
R && /* @__PURE__ */ f(
|
|
210
|
+
R && /* @__PURE__ */ f(V, { children: [
|
|
209
211
|
/* @__PURE__ */ d("div", { className: o("divider") }),
|
|
210
212
|
R
|
|
211
213
|
] })
|
|
@@ -215,8 +217,8 @@ const De = (t, e) => {
|
|
|
215
217
|
"button",
|
|
216
218
|
{
|
|
217
219
|
disabled: l,
|
|
218
|
-
...
|
|
219
|
-
className: o("dropdown", K,
|
|
220
|
+
...te({
|
|
221
|
+
className: o("dropdown", K, G, {
|
|
220
222
|
"transparent-background": x,
|
|
221
223
|
opened: _,
|
|
222
224
|
disabled: l,
|
|
@@ -224,8 +226,8 @@ const De = (t, e) => {
|
|
|
224
226
|
touched: m,
|
|
225
227
|
"mobile-disabled": A
|
|
226
228
|
}),
|
|
227
|
-
onClick:
|
|
228
|
-
onKeyDown:
|
|
229
|
+
onClick: ae,
|
|
230
|
+
onKeyDown: ie,
|
|
229
231
|
ref: H.setReference
|
|
230
232
|
}),
|
|
231
233
|
type: "button",
|
|
@@ -237,27 +239,27 @@ const De = (t, e) => {
|
|
|
237
239
|
className: o("value", {
|
|
238
240
|
placeholder: !e || Array.isArray(e) && !e.length
|
|
239
241
|
}),
|
|
240
|
-
children:
|
|
242
|
+
children: X || de()
|
|
241
243
|
}
|
|
242
244
|
),
|
|
243
|
-
/* @__PURE__ */ d(
|
|
245
|
+
/* @__PURE__ */ d(ue, { className: o("arrow"), tabIndex: -1, children: /* @__PURE__ */ d(pe, {}) })
|
|
244
246
|
]
|
|
245
247
|
}
|
|
246
248
|
),
|
|
247
249
|
_ && /* @__PURE__ */ d(
|
|
248
250
|
"div",
|
|
249
251
|
{
|
|
250
|
-
style:
|
|
251
|
-
className: o("select-list", { opened: _, "limited-width":
|
|
252
|
-
...
|
|
253
|
-
onKeyDown:
|
|
252
|
+
style: B,
|
|
253
|
+
className: o("select-list", { opened: _, "limited-width": J }),
|
|
254
|
+
...ne({
|
|
255
|
+
onKeyDown: le,
|
|
254
256
|
ref: H.setFloating
|
|
255
257
|
}),
|
|
256
|
-
children: /* @__PURE__ */ d(
|
|
258
|
+
children: Z ? S() : /* @__PURE__ */ d(ye, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: S() })
|
|
257
259
|
}
|
|
258
260
|
)
|
|
259
261
|
] });
|
|
260
262
|
};
|
|
261
263
|
export {
|
|
262
|
-
|
|
264
|
+
er as D
|
|
263
265
|
};
|
package/dist/dropdown.js
CHANGED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Q, useRef as Y, useState as k } from "react";
|
|
3
|
+
import { c as Z } from "./bind-06a7ff84.js";
|
|
4
|
+
import { b as q, a as I, S as ee } from "./openEye-7b9cf080.js";
|
|
5
|
+
import { B as ne } from "./button-33c88abf.js";
|
|
6
|
+
import { S as te } from "./spinLoader-c4a53718.js";
|
|
7
|
+
import { M as se } from "./maxValueDisplay-9be01a75.js";
|
|
8
|
+
var a = /* @__PURE__ */ ((t) => (t.PASSWORD = "password", t.TEXT = "text", t.EMAIL = "email", t))(a || {});
|
|
9
|
+
const ce = "_collapsed_1jcir_13", ae = "_label_1jcir_21", oe = "_asterisk_1jcir_30", re = "_disabled_1jcir_36", ie = "_field_1jcir_41", le = "_placeholder_1jcir_66", _e = "_error_1jcir_72", de = "_touched_1jcir_72", pe = "_input_1jcir_90", ue = "_icon_1jcir_1", me = "_text_1jcir_196", fe = {
|
|
10
|
+
"icon-container": "_icon-container_1jcir_1",
|
|
11
|
+
"icon-container-end": "_icon-container-end_1jcir_1",
|
|
12
|
+
"icon-container-start": "_icon-container-start_1jcir_1",
|
|
13
|
+
collapsed: ce,
|
|
14
|
+
label: ae,
|
|
15
|
+
asterisk: oe,
|
|
16
|
+
disabled: re,
|
|
17
|
+
field: ie,
|
|
18
|
+
"default-width": "_default-width_1jcir_53",
|
|
19
|
+
placeholder: le,
|
|
20
|
+
error: _e,
|
|
21
|
+
touched: de,
|
|
22
|
+
"max-length-display": "_max-length-display_1jcir_79",
|
|
23
|
+
"input-container": "_input-container_1jcir_90",
|
|
24
|
+
"type-password": "_type-password_1jcir_94",
|
|
25
|
+
input: pe,
|
|
26
|
+
"eye-icon": "_eye-icon_1jcir_98",
|
|
27
|
+
icon: ue,
|
|
28
|
+
"start-icon": "_start-icon_1jcir_152",
|
|
29
|
+
"clear-icon": "_clear-icon_1jcir_153",
|
|
30
|
+
"additional-content": "_additional-content_1jcir_189",
|
|
31
|
+
text: me,
|
|
32
|
+
"error-text": "_error-text_1jcir_216",
|
|
33
|
+
"help-text": "_help-text_1jcir_220"
|
|
34
|
+
}, n = Z.bind(fe), ge = Q(
|
|
35
|
+
({
|
|
36
|
+
value: t = "",
|
|
37
|
+
className: P,
|
|
38
|
+
classNameHelpText: R,
|
|
39
|
+
error: l,
|
|
40
|
+
placeholder: m,
|
|
41
|
+
disabled: o = !1,
|
|
42
|
+
onChange: F,
|
|
43
|
+
touched: f = !1,
|
|
44
|
+
title: M,
|
|
45
|
+
label: _,
|
|
46
|
+
helpText: d,
|
|
47
|
+
defaultWidth: v = !0,
|
|
48
|
+
startIcon: h,
|
|
49
|
+
endIcon: j,
|
|
50
|
+
clearable: A = !1,
|
|
51
|
+
onClear: x,
|
|
52
|
+
isRequired: N = !1,
|
|
53
|
+
hasDoubleMessage: O = !1,
|
|
54
|
+
type: r = a.TEXT,
|
|
55
|
+
displayError: B = !0,
|
|
56
|
+
collapsible: C = !1,
|
|
57
|
+
loading: V = !1,
|
|
58
|
+
maxLengthDisplay: W,
|
|
59
|
+
onFocus: L = () => {
|
|
60
|
+
},
|
|
61
|
+
onBlur: X = () => {
|
|
62
|
+
},
|
|
63
|
+
...H
|
|
64
|
+
}, U) => {
|
|
65
|
+
const $ = Y(null), p = U || $, [S, w] = k(!1), [y, g] = k(!1), z = (s) => {
|
|
66
|
+
w(!0), L(s);
|
|
67
|
+
}, G = (s) => {
|
|
68
|
+
w(!1), X(s);
|
|
69
|
+
}, J = () => {
|
|
70
|
+
var s;
|
|
71
|
+
x && (x(t), (s = p.current) == null || s.focus());
|
|
72
|
+
}, E = B && l && f, D = /* @__PURE__ */ e("span", { className: n("text", "help-text", R), children: d }), K = () => r !== a.PASSWORD ? r : y ? a.TEXT : a.PASSWORD, T = (s) => {
|
|
73
|
+
s.preventDefault(), g(!0);
|
|
74
|
+
}, i = (s) => {
|
|
75
|
+
s.preventDefault(), g(!1);
|
|
76
|
+
};
|
|
77
|
+
return /* @__PURE__ */ c(b, { children: [
|
|
78
|
+
_ && /* @__PURE__ */ c("span", { className: n("label", { disabled: o }), children: [
|
|
79
|
+
_,
|
|
80
|
+
N && /* @__PURE__ */ e("span", { className: n("asterisk"), children: "*" })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ c(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
className: n("field", P, {
|
|
86
|
+
error: l,
|
|
87
|
+
touched: f,
|
|
88
|
+
disabled: o,
|
|
89
|
+
"default-width": v,
|
|
90
|
+
collapsed: C && !S && !t
|
|
91
|
+
}),
|
|
92
|
+
title: M,
|
|
93
|
+
children: [
|
|
94
|
+
V ? /* @__PURE__ */ e(te, {}) : h && /* @__PURE__ */ e(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
className: n("icon-container-start"),
|
|
98
|
+
onClick: () => {
|
|
99
|
+
var u;
|
|
100
|
+
(u = p.current) == null || u.focus();
|
|
101
|
+
},
|
|
102
|
+
children: /* @__PURE__ */ e("span", { className: n("icon", { "start-icon": !S }), children: h })
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ c("span", { className: n("input-container", `type-${r}`), children: [
|
|
106
|
+
/* @__PURE__ */ e(
|
|
107
|
+
"input",
|
|
108
|
+
{
|
|
109
|
+
ref: p,
|
|
110
|
+
type: K(),
|
|
111
|
+
className: n("input"),
|
|
112
|
+
value: t,
|
|
113
|
+
disabled: o,
|
|
114
|
+
onChange: F,
|
|
115
|
+
onFocus: z,
|
|
116
|
+
onBlur: G,
|
|
117
|
+
...H
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
r === a.PASSWORD && t && /* @__PURE__ */ e(
|
|
121
|
+
ne,
|
|
122
|
+
{
|
|
123
|
+
icon: y ? /* @__PURE__ */ e(q, {}) : /* @__PURE__ */ e(I, {}),
|
|
124
|
+
variant: "text",
|
|
125
|
+
className: n("eye-icon"),
|
|
126
|
+
onMouseDown: T,
|
|
127
|
+
onMouseLeave: i,
|
|
128
|
+
onMouseUp: i,
|
|
129
|
+
onTouchStart: T,
|
|
130
|
+
onTouchEnd: i,
|
|
131
|
+
onTouchCancel: i
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
m && !t && /* @__PURE__ */ c("span", { className: n("placeholder"), children: [
|
|
135
|
+
m,
|
|
136
|
+
N && !_ && /* @__PURE__ */ e("span", { className: n("asterisk") })
|
|
137
|
+
] })
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ e(
|
|
140
|
+
se,
|
|
141
|
+
{
|
|
142
|
+
className: n("max-length-display"),
|
|
143
|
+
value: t.length,
|
|
144
|
+
maxValue: W
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
j && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: j }) }),
|
|
148
|
+
A && t.length > 0 && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("button", { type: "button", className: n("clear-icon", { disabled: o }), onClick: J, children: /* @__PURE__ */ e(ee, {}) }) })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
(E || d) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: o }), children: E ? /* @__PURE__ */ c(b, { children: [
|
|
153
|
+
/* @__PURE__ */ e("span", { className: n("text", "error-text"), children: l }),
|
|
154
|
+
O && D
|
|
155
|
+
] }) : d && D })
|
|
156
|
+
] });
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
export {
|
|
160
|
+
ge as F
|
|
161
|
+
};
|
package/dist/fieldText.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import { B as S } from "./button-33c88abf.js";
|
|
|
2
2
|
import { B as C } from "./baseIconButton-251479f7.js";
|
|
3
3
|
import { C as b } from "./checkbox-9a6c7ce1.js";
|
|
4
4
|
import { S as B } from "./systemMessage-1ced6079.js";
|
|
5
|
-
import { F as P } from "./fieldText-
|
|
5
|
+
import { F as P } from "./fieldText-10046ca8.js";
|
|
6
6
|
import { T as g } from "./themeProvider-46c2be7b.js";
|
|
7
7
|
import { Modal as v } from "./modal.js";
|
|
8
|
-
import { D as M } from "./dropdown-
|
|
8
|
+
import { D as M } from "./dropdown-937ba0eb.js";
|
|
9
9
|
import { T as A } from "./toggle-1a3aacb5.js";
|
|
10
10
|
import { F as L } from "./fieldNumber-d81e551e.js";
|
|
11
11
|
import { B as O } from "./bubblesLoader-a7e709d4.js";
|
|
@@ -14,9 +14,9 @@ import { F as U } from "./fieldTextFlex-314741ad.js";
|
|
|
14
14
|
import { R as q } from "./radio-bccc84f2.js";
|
|
15
15
|
import { Tooltip as J } from "./tooltip.js";
|
|
16
16
|
import { Popover as Q } from "./popover.js";
|
|
17
|
-
import { P as W } from "./pagination-
|
|
17
|
+
import { P as W } from "./pagination-2076b7b6.js";
|
|
18
18
|
import { T as Y } from "./table-32fc8c70.js";
|
|
19
|
-
import { D as _ } from "./datePicker-
|
|
19
|
+
import { D as _ } from "./datePicker-0a14e9f2.js";
|
|
20
20
|
import "react-datepicker";
|
|
21
21
|
import { SystemAlert as oo } from "./systemAlert.js";
|
|
22
22
|
import { S as eo, a as to } from "./arrowUp-4a5caee7.js";
|