@reportportal/ui-kit 0.0.1-alpha.46 → 0.0.1-alpha.47
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/arrowUp-4a5caee7.js +6 -0
- package/dist/clear-53660571.js +5 -0
- package/dist/close-4b33d7c1.js +5 -0
- package/dist/common/utils/index.d.ts +1 -0
- package/dist/common/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +2 -0
- package/dist/components/icons/index.d.ts +0 -1
- package/dist/components/index.d.ts +1 -3
- package/dist/{datePicker-68379fe1.js → datePicker-81d77983.js} +4 -5
- package/dist/datePicker.js +7 -4
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-5225df5e.js +263 -0
- package/dist/dropdown.js +2 -1
- package/dist/error-4f493850.js +7 -0
- package/dist/fieldNumber-6a5fdd15.js +125 -0
- package/dist/fieldNumber.js +2 -1
- package/dist/fieldText-df070a3c.js +135 -0
- package/dist/fieldText.js +3 -2
- package/dist/icons.js +32 -0
- package/dist/index.js +72 -114
- package/dist/minus-660ea0d6.js +6 -0
- package/dist/modal.js +144 -14
- package/dist/pagination-38898dc9.js +345 -0
- package/dist/pagination.js +5 -2
- package/dist/prevChapter-ebd5a3a7.js +6 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -1
- package/dist/systemAlert.js +51 -0
- package/dist/table-32fc8c70.js +144 -0
- package/dist/table.js +2 -2
- package/package.json +1 -1
- package/dist/components/dataPicker2/dataPicker2/datePicker.d.ts +0 -24
- package/dist/components/dataPicker2/dataPicker2/header/datePickerHeader.d.ts +0 -15
- package/dist/components/dataPicker2/dataPicker2/header/index.d.ts +0 -3
- package/dist/components/dataPicker2/dataPicker2/index.d.ts +0 -3
- package/dist/components/dataPicker2/dataPicker2/utils.d.ts +0 -3
- package/dist/components/date2/date2.d.ts +0 -24
- package/dist/components/date2/index.d.ts +0 -3
- package/dist/components/datePicker1/datePicker.d.ts +0 -24
- package/dist/components/datePicker1/header/datePickerHeader.d.ts +0 -15
- package/dist/components/datePicker1/header/index.d.ts +0 -3
- package/dist/components/datePicker1/index.d.ts +0 -3
- package/dist/components/datePicker1/utils.d.ts +0 -3
- package/dist/components/reactDatePicker/index.d.ts +0 -3
- package/dist/components/reactDatePicker/reactDatePicker.d.ts +0 -2
- package/dist/components/reactDatePicker2/index.d.ts +0 -3
- package/dist/components/reactDatePicker2/reactDatePicker2.d.ts +0 -2
- package/dist/date2-9273411e.js +0 -46
- package/dist/date2.js +0 -7
- package/dist/datePicker-89394dc8.js +0 -194
- package/dist/datePicker1.js +0 -19
- package/dist/dropdown-b9c6dc2f.js +0 -264
- package/dist/fieldNumber-1f286b40.js +0 -127
- package/dist/fieldText-65e4c614.js +0 -134
- package/dist/index-54e3bfc2.js +0 -147
- package/dist/pagination-4ae395bd.js +0 -347
- package/dist/reactDatePicker2-a31b070e.js +0 -5
- package/dist/reactDatePicker2.js +0 -6
- package/dist/table-9bf4ddab.js +0 -147
- /package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +0 -0
- /package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +0 -0
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { jsxs as f, jsx as d, Fragment as S } from "react/jsx-runtime";
|
|
2
|
-
import * as V from "react";
|
|
3
|
-
import { forwardRef as le, useState as $, useRef as oe } from "react";
|
|
4
|
-
import { c as q } from "./bind-06a7ff84.js";
|
|
5
|
-
import { useFloating as ce, offset as _e, flip as he } from "@floating-ui/react-dom";
|
|
6
|
-
import { useSelect as k } from "downshift";
|
|
7
|
-
import { Scrollbars as fe } from "rc-scrollbars";
|
|
8
|
-
import { u as ge } from "./useOnClickOutside-c332f7d3.js";
|
|
9
|
-
import { K as y } from "./keyCodes-f63c0e11.js";
|
|
10
|
-
import { B as ye } from "./baseIconButton-b6adc843.js";
|
|
11
|
-
import { C as ue } from "./checkbox-9a6c7ce1.js";
|
|
12
|
-
const pe = (r) => /* @__PURE__ */ V.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ V.createElement("path", { d: "M14.2174 5.82426C14.3736 5.66805 14.3736 5.41479 14.2174 5.25858L14.0759 5.11716C13.9197 4.96095 13.6665 4.96095 13.5103 5.11716L8.16726 10.4602L2.82426 5.11716C2.66805 4.96095 2.41479 4.96095 2.25858 5.11716L2.11716 5.25858C1.96095 5.41479 1.96095 5.66805 2.11716 5.82426L7.89176 11.5989C8.04797 11.7551 8.30124 11.7551 8.45745 11.5989L8.88171 11.1746L8.87436 11.1673L14.2174 5.82426Z", fill: "#A2AAB5" })), me = "_disabled_t3cjj_12", Ce = "_hidden_t3cjj_16", we = "_hover_t3cjj_22", Oe = {
|
|
13
|
-
"dropdown-option": "_dropdown-option_t3cjj_1",
|
|
14
|
-
disabled: me,
|
|
15
|
-
hidden: Ce,
|
|
16
|
-
hover: we,
|
|
17
|
-
"single-option": "_single-option_t3cjj_35",
|
|
18
|
-
"sub-option": "_sub-option_t3cjj_42"
|
|
19
|
-
}, U = q.bind(Oe), Z = le(
|
|
20
|
-
(r, e) => {
|
|
21
|
-
const {
|
|
22
|
-
option: { value: n, disabled: l, hidden: D, label: u, title: c, groupRef: a },
|
|
23
|
-
selected: A,
|
|
24
|
-
onChange: p,
|
|
25
|
-
render: m,
|
|
26
|
-
highlightHovered: C,
|
|
27
|
-
onMouseEnter: v,
|
|
28
|
-
multiSelect: w,
|
|
29
|
-
isPartiallyChecked: K = !1
|
|
30
|
-
} = r, x = (O) => {
|
|
31
|
-
(O.target instanceof HTMLDivElement || O.target instanceof HTMLInputElement) && (p == null || p(n));
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ f(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
className: U("dropdown-option", {
|
|
37
|
-
disabled: l,
|
|
38
|
-
hidden: D,
|
|
39
|
-
hover: C
|
|
40
|
-
}),
|
|
41
|
-
title: c,
|
|
42
|
-
onClick: x,
|
|
43
|
-
ref: e,
|
|
44
|
-
onMouseEnter: v,
|
|
45
|
-
children: [
|
|
46
|
-
w && /* @__PURE__ */ d(ue, { value: !!A, partiallyChecked: K }),
|
|
47
|
-
/* @__PURE__ */ d("div", { className: U("single-option", { "sub-option": !!a }), children: m ? m(r) : u })
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
), be = [
|
|
53
|
-
y.ENTER_KEY_CODE,
|
|
54
|
-
y.SPACE_KEY_CODE,
|
|
55
|
-
y.ARROW_DOWN_KEY_CODE
|
|
56
|
-
], Ee = [y.ESCAPE_KEY_CODE, y.TAB_KEY_CODE];
|
|
57
|
-
var g = /* @__PURE__ */ ((r) => (r.ON_KEY_DOWN = "onKeyDown", r.ON_CLICK = "onClick", r))(g || {});
|
|
58
|
-
const Ne = (r, e) => {
|
|
59
|
-
const n = Array.isArray(e) ? e : [e];
|
|
60
|
-
return r.findIndex(({ value: l }) => n.includes(l));
|
|
61
|
-
}, De = (r, e) => (r % e + e) % e, j = (r, e = 0, n = 1) => {
|
|
62
|
-
if (!r[e].disabled)
|
|
63
|
-
return e;
|
|
64
|
-
const l = r.length;
|
|
65
|
-
return j(
|
|
66
|
-
r,
|
|
67
|
-
De(e + n, l),
|
|
68
|
-
n
|
|
69
|
-
);
|
|
70
|
-
}, Ae = (r, e) => j(r, e), ve = (r, e) => j(r, e, -1), Ke = "_container_1yr7u_1", xe = "_icon_1yr7u_7", Ie = "_arrow_1yr7u_13", ke = "_dropdown_1yr7u_19", je = "_disabled_1yr7u_36", Le = "_value_1yr7u_43", Pe = "_error_1yr7u_46", Re = "_touched_1yr7u_46", Ye = "_opened_1yr7u_50", Te = "_placeholder_1yr7u_83", He = "_ghost_1yr7u_118", Me = "_divider_1yr7u_132", We = {
|
|
71
|
-
container: Ke,
|
|
72
|
-
icon: xe,
|
|
73
|
-
arrow: Ie,
|
|
74
|
-
dropdown: ke,
|
|
75
|
-
"transparent-background": "_transparent-background_1yr7u_33",
|
|
76
|
-
disabled: je,
|
|
77
|
-
value: Le,
|
|
78
|
-
error: Pe,
|
|
79
|
-
touched: Re,
|
|
80
|
-
opened: Ye,
|
|
81
|
-
placeholder: Te,
|
|
82
|
-
"mobile-disabled": "_mobile-disabled_1yr7u_87",
|
|
83
|
-
"select-list": "_select-list_1yr7u_92",
|
|
84
|
-
"limited-width": "_limited-width_1yr7u_109",
|
|
85
|
-
"options-container": "_options-container_1yr7u_113",
|
|
86
|
-
ghost: He,
|
|
87
|
-
divider: Me
|
|
88
|
-
}, o = q.bind(We), Fe = ({
|
|
89
|
-
multiSelect: r = !1,
|
|
90
|
-
value: e = r ? [] : "",
|
|
91
|
-
options: n = [],
|
|
92
|
-
disabled: l = !1,
|
|
93
|
-
error: D,
|
|
94
|
-
onChange: u,
|
|
95
|
-
onFocus: c,
|
|
96
|
-
onBlur: a,
|
|
97
|
-
mobileDisabled: A,
|
|
98
|
-
title: p,
|
|
99
|
-
touched: m = !1,
|
|
100
|
-
icon: C,
|
|
101
|
-
variant: v,
|
|
102
|
-
placeholder: w = "",
|
|
103
|
-
renderOption: K,
|
|
104
|
-
transparentBackground: x = !1,
|
|
105
|
-
className: O,
|
|
106
|
-
toggleButtonClassName: z,
|
|
107
|
-
isListWidthLimited: G = !1,
|
|
108
|
-
optionAll: L = { value: "all", label: "All" },
|
|
109
|
-
isOptionAllVisible: P = !1,
|
|
110
|
-
onSelectAll: J = () => {
|
|
111
|
-
},
|
|
112
|
-
footer: R
|
|
113
|
-
}) => {
|
|
114
|
-
const [_, h] = $(!1), Y = oe(null), [Q, b] = $(null), I = r && Array.isArray(e) ? n.filter((t) => e.includes(t.value)) : null, { refs: T, floatingStyles: X } = ce({
|
|
115
|
-
middleware: [
|
|
116
|
-
_e(5),
|
|
117
|
-
he({
|
|
118
|
-
fallbackPlacements: ["bottom", "top"]
|
|
119
|
-
})
|
|
120
|
-
]
|
|
121
|
-
}), F = () => {
|
|
122
|
-
if (P && Array.isArray(e)) {
|
|
123
|
-
const t = n.map((s) => s.value);
|
|
124
|
-
u(e.length === n.length ? [] : t), J();
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
ge(Y, () => {
|
|
128
|
-
_ && (h(!1), a == null || a());
|
|
129
|
-
});
|
|
130
|
-
const H = (t) => {
|
|
131
|
-
if (!t.disabled) {
|
|
132
|
-
if (r) {
|
|
133
|
-
const s = Array.isArray(e) ? [...e] : [], i = s.indexOf(t.value);
|
|
134
|
-
i === -1 ? s.push(t.value) : s.splice(i, 1), u(s);
|
|
135
|
-
} else
|
|
136
|
-
u(t.value);
|
|
137
|
-
h((s) => r || !s);
|
|
138
|
-
}
|
|
139
|
-
}, B = () => n.find(({ value: t }) => t === e), M = Ne(n, e), {
|
|
140
|
-
getToggleButtonProps: ee,
|
|
141
|
-
getMenuProps: te,
|
|
142
|
-
getItemProps: re,
|
|
143
|
-
setHighlightedIndex: E,
|
|
144
|
-
highlightedIndex: W,
|
|
145
|
-
selectedItem: N
|
|
146
|
-
} = k({
|
|
147
|
-
items: n,
|
|
148
|
-
itemToString: (t) => (t != null && t.label ? String(t.label) : w) || "",
|
|
149
|
-
selectedItem: B(),
|
|
150
|
-
isOpen: _,
|
|
151
|
-
circularNavigation: !0,
|
|
152
|
-
defaultHighlightedIndex: M,
|
|
153
|
-
onHighlightedIndexChange: (t) => {
|
|
154
|
-
switch (t.type) {
|
|
155
|
-
case k.stateChangeTypes.MenuKeyDownArrowUp:
|
|
156
|
-
return b(g.ON_KEY_DOWN), E(ve(n, t.highlightedIndex)), t;
|
|
157
|
-
case k.stateChangeTypes.MenuKeyDownArrowDown:
|
|
158
|
-
return b(g.ON_KEY_DOWN), E(Ae(n, t.highlightedIndex)), t;
|
|
159
|
-
default:
|
|
160
|
-
return t;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}), ne = () => {
|
|
164
|
-
l || (h((t) => !t), _ ? a == null || a() : c == null || c(), b(g.ON_CLICK));
|
|
165
|
-
}, se = () => !e && e !== !1 && e !== 0 || Array.isArray(e) && !e.length ? w : r && Array.isArray(e) && n.length === e.length ? L.label : n.reduce((s, i) => ((Array.isArray(e) && e.includes(i.value) || i.value === e) && s.push(i.label), s), []).join(", "), ae = (t) => {
|
|
166
|
-
const { keyCode: s } = t;
|
|
167
|
-
be.includes(s) && !_ && (t.preventDefault(), E(M), h(!0), c == null || c(), b(g.ON_KEY_DOWN));
|
|
168
|
-
}, de = (t) => {
|
|
169
|
-
const { keyCode: s } = t;
|
|
170
|
-
if (s === y.ENTER_KEY_CODE) {
|
|
171
|
-
const i = n[W];
|
|
172
|
-
H(i), r || (h(!1), a == null || a());
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
Ee.includes(s) && (t.stopPropagation(), h(!1), a == null || a());
|
|
176
|
-
}, ie = () => /* @__PURE__ */ f("div", { className: o("options-container"), children: [
|
|
177
|
-
r && P && Array.isArray(e) && /* @__PURE__ */ f(S, { children: [
|
|
178
|
-
/* @__PURE__ */ d(
|
|
179
|
-
Z,
|
|
180
|
-
{
|
|
181
|
-
option: L,
|
|
182
|
-
selected: e.length === n.length,
|
|
183
|
-
onChange: F,
|
|
184
|
-
multiSelect: r,
|
|
185
|
-
isPartiallyChecked: !!e.length
|
|
186
|
-
}
|
|
187
|
-
),
|
|
188
|
-
/* @__PURE__ */ d("div", { className: o("divider") }),
|
|
189
|
-
" "
|
|
190
|
-
] }),
|
|
191
|
-
n.map((t, s) => /* @__PURE__ */ d(
|
|
192
|
-
Z,
|
|
193
|
-
{
|
|
194
|
-
...re({
|
|
195
|
-
item: t,
|
|
196
|
-
index: s
|
|
197
|
-
}),
|
|
198
|
-
multiSelect: r,
|
|
199
|
-
selected: r ? I == null ? void 0 : I.some((i) => i.value === t.value) : t.value === ((N == null ? void 0 : N.value) ?? N),
|
|
200
|
-
option: { title: t.label, ...t },
|
|
201
|
-
highlightHovered: W === s && Q !== g.ON_CLICK,
|
|
202
|
-
render: K,
|
|
203
|
-
onChange: t.disabled ? null : () => H(t),
|
|
204
|
-
onMouseEnter: () => E(s)
|
|
205
|
-
},
|
|
206
|
-
t.value
|
|
207
|
-
)),
|
|
208
|
-
R && /* @__PURE__ */ f(S, { children: [
|
|
209
|
-
/* @__PURE__ */ d("div", { className: o("divider") }),
|
|
210
|
-
R
|
|
211
|
-
] })
|
|
212
|
-
] });
|
|
213
|
-
return /* @__PURE__ */ f("div", { ref: Y, className: o("container", O), title: p, children: [
|
|
214
|
-
/* @__PURE__ */ f(
|
|
215
|
-
"button",
|
|
216
|
-
{
|
|
217
|
-
disabled: l,
|
|
218
|
-
...ee({
|
|
219
|
-
className: o("dropdown", v, z, {
|
|
220
|
-
"transparent-background": x,
|
|
221
|
-
opened: _,
|
|
222
|
-
disabled: l,
|
|
223
|
-
error: D,
|
|
224
|
-
touched: m,
|
|
225
|
-
"mobile-disabled": A
|
|
226
|
-
}),
|
|
227
|
-
onClick: ne,
|
|
228
|
-
onKeyDown: ae,
|
|
229
|
-
ref: T.setReference
|
|
230
|
-
}),
|
|
231
|
-
type: "button",
|
|
232
|
-
children: [
|
|
233
|
-
C && /* @__PURE__ */ d("span", { className: o("icon"), children: C }),
|
|
234
|
-
/* @__PURE__ */ d(
|
|
235
|
-
"span",
|
|
236
|
-
{
|
|
237
|
-
className: o("value", {
|
|
238
|
-
placeholder: !e || Array.isArray(e) && !e.length
|
|
239
|
-
}),
|
|
240
|
-
children: se()
|
|
241
|
-
}
|
|
242
|
-
),
|
|
243
|
-
/* @__PURE__ */ d(ye, { className: o("arrow"), tabIndex: -1, children: /* @__PURE__ */ d(pe, {}) })
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
),
|
|
247
|
-
_ && /* @__PURE__ */ d(
|
|
248
|
-
"div",
|
|
249
|
-
{
|
|
250
|
-
style: X,
|
|
251
|
-
className: o("select-list", { opened: _, "limited-width": G }),
|
|
252
|
-
...te({
|
|
253
|
-
onKeyDown: de,
|
|
254
|
-
ref: T.setFloating
|
|
255
|
-
}),
|
|
256
|
-
children: /* @__PURE__ */ d(fe, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: ie() })
|
|
257
|
-
}
|
|
258
|
-
)
|
|
259
|
-
] });
|
|
260
|
-
};
|
|
261
|
-
export {
|
|
262
|
-
Fe as D,
|
|
263
|
-
pe as S
|
|
264
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { jsxs as w, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import * as u from "react";
|
|
3
|
-
import { useRef as A, useMemo as B } from "react";
|
|
4
|
-
import { c as T } from "./bind-06a7ff84.js";
|
|
5
|
-
import { K as e } from "./keyCodes-f63c0e11.js";
|
|
6
|
-
import { B as O } from "./baseIconButton-b6adc843.js";
|
|
7
|
-
const W = (n) => /* @__PURE__ */ u.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ u.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.00117 2.62046C7.63142 2.6189 7.33294 2.91738 7.3345 3.28712L7.35159 7.35159L3.28712 7.3345C2.91738 7.33295 2.6189 7.63142 2.62045 8.00117C2.62201 8.37091 2.92301 8.67191 3.29275 8.67346L7.35722 8.69056L7.37391 12.6599C7.37547 13.0296 7.67647 13.3306 8.04621 13.3322C8.41596 13.3337 8.71443 13.0352 8.71288 12.6655L8.69619 8.69619L12.6655 8.71288C13.0352 8.71444 13.3337 8.41596 13.3322 8.04621C13.3306 7.67647 13.0296 7.37547 12.6599 7.37392L8.69056 7.35722L8.67346 3.29275C8.67191 2.92301 8.37091 2.62201 8.00117 2.62046Z" })), v = (n) => /* @__PURE__ */ u.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ u.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.31082 7.31081C2.94108 7.30926 2.6426 7.60773 2.64415 7.97748C2.64571 8.34722 2.9467 8.64822 3.31645 8.64977L12.6892 8.68919C13.0589 8.69074 13.3574 8.39227 13.3559 8.02252C13.3543 7.65278 13.0533 7.35178 12.6836 7.35023L3.31082 7.31081Z" })), y = 5, f = 16, S = [
|
|
8
|
-
e.TAB_KEY_CODE,
|
|
9
|
-
e.BACKSPACE_KEY_CODE,
|
|
10
|
-
e.ARROW_LEFT_KEY_CODE,
|
|
11
|
-
e.ARROW_UP_KEY_CODE,
|
|
12
|
-
e.ARROW_RIGHT_KEY_CODE,
|
|
13
|
-
e.ARROW_DOWN_KEY_CODE,
|
|
14
|
-
e.DELETE_KEY_CODE,
|
|
15
|
-
e.NUM_LOCK_0_KEY_CODE,
|
|
16
|
-
e.NUM_LOCK_1_KEY_CODE,
|
|
17
|
-
e.NUM_LOCK_2_KEY_CODE,
|
|
18
|
-
e.NUM_LOCK_3_KEY_CODE,
|
|
19
|
-
e.NUM_LOCK_4_KEY_CODE,
|
|
20
|
-
e.NUM_LOCK_5_KEY_CODE,
|
|
21
|
-
e.NUM_LOCK_6_KEY_CODE,
|
|
22
|
-
e.NUM_LOCK_7_KEY_CODE,
|
|
23
|
-
e.NUM_LOCK_8_KEY_CODE,
|
|
24
|
-
e.NUM_LOCK_9_KEY_CODE
|
|
25
|
-
], I = "_disabled_wswgu_6", b = "_label_wswgu_10", k = "_sign_wswgu_21", F = "_error_wswgu_36", H = "_touched_wswgu_36", V = "_filled_wswgu_44", P = "_input_wswgu_26", j = {
|
|
26
|
-
"field-number": "_field-number_wswgu_1",
|
|
27
|
-
disabled: I,
|
|
28
|
-
label: b,
|
|
29
|
-
sign: k,
|
|
30
|
-
"input-container": "_input-container_wswgu_26",
|
|
31
|
-
error: F,
|
|
32
|
-
touched: H,
|
|
33
|
-
filled: V,
|
|
34
|
-
"input-field": "_input-field_wswgu_51",
|
|
35
|
-
input: P
|
|
36
|
-
}, i = T.bind(j), z = ({
|
|
37
|
-
value: n = "",
|
|
38
|
-
placeholder: h = "0",
|
|
39
|
-
disabled: s = !1,
|
|
40
|
-
onChange: o,
|
|
41
|
-
onFocus: d,
|
|
42
|
-
onBlur: G,
|
|
43
|
-
label: K,
|
|
44
|
-
postfix: c = "",
|
|
45
|
-
min: r = 0,
|
|
46
|
-
max: E = Number.MAX_SAFE_INTEGER,
|
|
47
|
-
title: D,
|
|
48
|
-
error: p,
|
|
49
|
-
touched: g = !1,
|
|
50
|
-
...m
|
|
51
|
-
}) => {
|
|
52
|
-
const C = A(null), L = (_) => {
|
|
53
|
-
let t = _.target.value.replace(/^0(?=\d+|^\d)/g, "");
|
|
54
|
-
if (t === "") {
|
|
55
|
-
o("");
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
t = +t, t >= r && t <= E && o(t);
|
|
59
|
-
}, N = (_) => {
|
|
60
|
-
const { keyCode: t } = _;
|
|
61
|
-
S.includes(t) || (t < e.NUMBER_START_KEY_CODE || t > e.NUMBER_END_KEY_CODE || _.shiftKey) && _.preventDefault();
|
|
62
|
-
}, R = () => {
|
|
63
|
-
const _ = +n - 1;
|
|
64
|
-
_ >= r && _ <= E && o(_);
|
|
65
|
-
}, Y = () => {
|
|
66
|
-
const _ = +n + 1;
|
|
67
|
-
_ >= r && _ <= E && o(_);
|
|
68
|
-
}, a = h + c, M = B(() => {
|
|
69
|
-
let _ = (String(n) || a).length;
|
|
70
|
-
return c && !n && (_ += 1), _ > f ? `${f}ch` : `${_ || y}ch`;
|
|
71
|
-
}, [a, c, n]), U = () => {
|
|
72
|
-
C && C.current && C.current.focus(), d && d();
|
|
73
|
-
};
|
|
74
|
-
return /* @__PURE__ */ w("div", { className: i("field-number", { disabled: s }), children: [
|
|
75
|
-
K && /* @__PURE__ */ l("span", { className: i("label"), children: K }),
|
|
76
|
-
/* @__PURE__ */ w(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
className: i("input-container", {
|
|
80
|
-
filled: !!n || n === 0,
|
|
81
|
-
error: p,
|
|
82
|
-
disabled: s,
|
|
83
|
-
touched: g
|
|
84
|
-
}),
|
|
85
|
-
title: D,
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ l(
|
|
88
|
-
O,
|
|
89
|
-
{
|
|
90
|
-
className: i("sign", "minus"),
|
|
91
|
-
disabled: s,
|
|
92
|
-
onClick: R,
|
|
93
|
-
children: /* @__PURE__ */ l(v, {})
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
/* @__PURE__ */ w("span", { className: i("input-field", { disabled: s }), onClick: U, children: [
|
|
97
|
-
/* @__PURE__ */ l(
|
|
98
|
-
"input",
|
|
99
|
-
{
|
|
100
|
-
ref: C,
|
|
101
|
-
className: i("input"),
|
|
102
|
-
type: "number",
|
|
103
|
-
value: n,
|
|
104
|
-
placeholder: a,
|
|
105
|
-
disabled: s,
|
|
106
|
-
min: r,
|
|
107
|
-
max: E,
|
|
108
|
-
onKeyDown: s ? void 0 : N,
|
|
109
|
-
onChange: s ? void 0 : L,
|
|
110
|
-
onFocus: s ? void 0 : d,
|
|
111
|
-
style: { width: M },
|
|
112
|
-
...m
|
|
113
|
-
}
|
|
114
|
-
),
|
|
115
|
-
!!c && (n === 0 || !!n) && /* @__PURE__ */ l("span", { children: c.slice(0, 1) })
|
|
116
|
-
] }),
|
|
117
|
-
/* @__PURE__ */ l(O, { className: i("sign", "plus"), disabled: s, onClick: Y, children: /* @__PURE__ */ l(W, {}) })
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
] });
|
|
122
|
-
};
|
|
123
|
-
export {
|
|
124
|
-
z as F,
|
|
125
|
-
W as S,
|
|
126
|
-
v as a
|
|
127
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as w } from "react/jsx-runtime";
|
|
2
|
-
import * as k from "react";
|
|
3
|
-
import { forwardRef as K, useRef as O, useState as P } from "react";
|
|
4
|
-
import { c as C } from "./bind-06a7ff84.js";
|
|
5
|
-
import "./baseIconButton-b6adc843.js";
|
|
6
|
-
const Q = (t) => /* @__PURE__ */ k.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ k.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 8C1 4.14001 4.14001 1 8 1C11.86 1 15 4.14001 15 8C15 11.8595 11.86 15 8 15C4.14001 15 1 11.8595 1 8ZM5 5.54545L5.54545 5L8 7.45455L10.4545 5L11 5.54545L8.54545 8L11 10.4545L10.4545 11L8 8.54545L5.54545 11L5 10.4545L7.45455 8L5 5.54545Z", fill: "#A2AAB5" })), T = "_collapsed_7ag8j_13", U = "_label_7ag8j_21", V = "_asterisk_7ag8j_30", W = "_disabled_7ag8j_36", X = "_field_7ag8j_41", Y = "_placeholder_7ag8j_62", I = "_error_7ag8j_69", nn = "_touched_7ag8j_69", en = "_input_7ag8j_84", tn = "_icon_7ag8j_1", an = "_text_7ag8j_175", sn = {
|
|
7
|
-
"icon-container": "_icon-container_7ag8j_1",
|
|
8
|
-
"icon-container-end": "_icon-container-end_7ag8j_1",
|
|
9
|
-
"icon-container-start": "_icon-container-start_7ag8j_1",
|
|
10
|
-
collapsed: T,
|
|
11
|
-
label: U,
|
|
12
|
-
asterisk: V,
|
|
13
|
-
disabled: W,
|
|
14
|
-
field: X,
|
|
15
|
-
"default-width": "_default-width_7ag8j_53",
|
|
16
|
-
placeholder: Y,
|
|
17
|
-
error: I,
|
|
18
|
-
touched: nn,
|
|
19
|
-
"input-container": "_input-container_7ag8j_84",
|
|
20
|
-
input: en,
|
|
21
|
-
icon: tn,
|
|
22
|
-
"start-icon": "_start-icon_7ag8j_131",
|
|
23
|
-
"clear-icon": "_clear-icon_7ag8j_132",
|
|
24
|
-
"additional-content": "_additional-content_7ag8j_168",
|
|
25
|
-
text: an,
|
|
26
|
-
"error-text": "_error-text_7ag8j_183",
|
|
27
|
-
"help-text": "_help-text_7ag8j_187"
|
|
28
|
-
}, cn = "_spinner_qn4ih_8", on = "_spin_qn4ih_1", ln = {
|
|
29
|
-
"spin-loader": "_spin-loader_qn4ih_1",
|
|
30
|
-
spinner: cn,
|
|
31
|
-
spin: on,
|
|
32
|
-
"color-topaz": "_color-topaz_qn4ih_20"
|
|
33
|
-
}, v = C.bind(ln), rn = ({ color: t = "topaz", className: o }) => /* @__PURE__ */ e("div", { className: v("spin-loader", o), children: /* @__PURE__ */ e("div", { className: v("spinner", { [`color-${t}`]: t }) }) }), n = C.bind(sn), un = K(
|
|
34
|
-
({
|
|
35
|
-
value: t = "",
|
|
36
|
-
className: o,
|
|
37
|
-
error: i,
|
|
38
|
-
placeholder: p,
|
|
39
|
-
disabled: c = !1,
|
|
40
|
-
onChange: F,
|
|
41
|
-
touched: h = !1,
|
|
42
|
-
title: R,
|
|
43
|
-
label: l,
|
|
44
|
-
helpText: r,
|
|
45
|
-
defaultWidth: b = !0,
|
|
46
|
-
startIcon: u,
|
|
47
|
-
endIcon: f,
|
|
48
|
-
clearable: B = !1,
|
|
49
|
-
onClear: m,
|
|
50
|
-
isRequired: g = !1,
|
|
51
|
-
hasDoubleMessage: E = !1,
|
|
52
|
-
type: S = "text",
|
|
53
|
-
displayError: q = !0,
|
|
54
|
-
collapsible: y = !1,
|
|
55
|
-
loading: z = !1,
|
|
56
|
-
onFocus: A = () => {
|
|
57
|
-
},
|
|
58
|
-
onBlur: $ = () => {
|
|
59
|
-
},
|
|
60
|
-
...H
|
|
61
|
-
}, M) => {
|
|
62
|
-
const Z = O(null), _ = M || Z, [j, x] = P(!1), D = (a) => {
|
|
63
|
-
x(!0), A(a);
|
|
64
|
-
}, G = (a) => {
|
|
65
|
-
x(!1), $(a);
|
|
66
|
-
}, J = () => {
|
|
67
|
-
var a;
|
|
68
|
-
m && (m(t), (a = _.current) == null || a.focus());
|
|
69
|
-
}, N = q && i && h, L = /* @__PURE__ */ e("span", { className: n("text", "help-text"), children: r });
|
|
70
|
-
return /* @__PURE__ */ s(w, { children: [
|
|
71
|
-
l && /* @__PURE__ */ s("span", { className: n("label", { disabled: c }), children: [
|
|
72
|
-
l,
|
|
73
|
-
g && /* @__PURE__ */ e("span", { className: n("asterisk"), children: "*" })
|
|
74
|
-
] }),
|
|
75
|
-
/* @__PURE__ */ s(
|
|
76
|
-
"div",
|
|
77
|
-
{
|
|
78
|
-
className: n("field", o, {
|
|
79
|
-
error: i,
|
|
80
|
-
touched: h,
|
|
81
|
-
disabled: c,
|
|
82
|
-
"default-width": b,
|
|
83
|
-
collapsed: y && !j && !t
|
|
84
|
-
}),
|
|
85
|
-
title: R,
|
|
86
|
-
children: [
|
|
87
|
-
z ? /* @__PURE__ */ e(rn, {}) : u && /* @__PURE__ */ e(
|
|
88
|
-
"span",
|
|
89
|
-
{
|
|
90
|
-
className: n("icon-container-start"),
|
|
91
|
-
onClick: () => {
|
|
92
|
-
var d;
|
|
93
|
-
(d = _.current) == null || d.focus();
|
|
94
|
-
},
|
|
95
|
-
children: /* @__PURE__ */ e("span", { className: n("icon", { "start-icon": !j }), children: u })
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
/* @__PURE__ */ s("span", { className: n("input-container"), children: [
|
|
99
|
-
/* @__PURE__ */ e(
|
|
100
|
-
"input",
|
|
101
|
-
{
|
|
102
|
-
ref: _,
|
|
103
|
-
type: S,
|
|
104
|
-
className: n("input"),
|
|
105
|
-
value: t,
|
|
106
|
-
disabled: c,
|
|
107
|
-
onChange: F,
|
|
108
|
-
onFocus: D,
|
|
109
|
-
onBlur: G,
|
|
110
|
-
...H
|
|
111
|
-
}
|
|
112
|
-
),
|
|
113
|
-
p && !t && /* @__PURE__ */ s("span", { className: n("placeholder"), children: [
|
|
114
|
-
p,
|
|
115
|
-
g && !l && /* @__PURE__ */ e("span", { className: n("asterisk") })
|
|
116
|
-
] })
|
|
117
|
-
] }),
|
|
118
|
-
f && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: f }) }),
|
|
119
|
-
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(Q, {}) }) })
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
),
|
|
123
|
-
(N || r) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: c }), children: N ? /* @__PURE__ */ s(w, { children: [
|
|
124
|
-
/* @__PURE__ */ e("span", { className: n("text", "error-text"), children: i }),
|
|
125
|
-
E && L
|
|
126
|
-
] }) : r && L })
|
|
127
|
-
] });
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
export {
|
|
131
|
-
un as F,
|
|
132
|
-
rn as S,
|
|
133
|
-
Q as a
|
|
134
|
-
};
|
package/dist/index-54e3bfc2.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as c, Fragment as B } from "react/jsx-runtime";
|
|
2
|
-
import * as M from "react";
|
|
3
|
-
import { useState as g, useEffect as b, useRef as j } from "react";
|
|
4
|
-
import { Scrollbars as G } from "rc-scrollbars";
|
|
5
|
-
import { AnimatePresence as K, motion as P } from "framer-motion";
|
|
6
|
-
import { c as u } from "./bind-06a7ff84.js";
|
|
7
|
-
import { u as q } from "./useOnClickOutside-c332f7d3.js";
|
|
8
|
-
import { K as Y } from "./keyCodes-f63c0e11.js";
|
|
9
|
-
import { B as L } from "./button-33c88abf.js";
|
|
10
|
-
import { B as F } from "./baseIconButton-b6adc843.js";
|
|
11
|
-
const U = (t) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ M.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.732179 15.2698C0.330639 14.8683 0.33064 14.2172 0.73218 13.8157L6.54858 7.99928L0.73218 2.18288C0.33064 1.78134 0.330639 1.13031 0.732179 0.728774C1.13372 0.327235 1.78474 0.327235 2.18628 0.728774L8.00269 6.54518L13.8191 0.728767C14.2206 0.327229 14.8717 0.327228 15.2732 0.728767C15.6747 1.13031 15.6747 1.78133 15.2732 2.18287L9.45679 7.99928L15.2732 13.8157C15.6747 14.2172 15.6747 14.8683 15.2732 15.2698C14.8717 15.6713 14.2206 15.6713 13.8191 15.2698L8.00269 9.45338L2.18628 15.2698C1.78474 15.6713 1.13372 15.6713 0.732179 15.2698Z", fill: "#A2AAB5" })), X = () => {
|
|
12
|
-
const [t, n] = g({ width: 0, height: 0 });
|
|
13
|
-
return b(() => {
|
|
14
|
-
const l = () => {
|
|
15
|
-
n({
|
|
16
|
-
width: window.innerWidth,
|
|
17
|
-
height: window.innerHeight
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
return window.addEventListener("resize", l), l(), () => window.removeEventListener("resize", l);
|
|
21
|
-
}, []), t;
|
|
22
|
-
}, Z = "_scrollable_qziry_12", J = {
|
|
23
|
-
"modal-content": "_modal-content_qziry_1",
|
|
24
|
-
scrollable: Z
|
|
25
|
-
}, Q = u.bind(J), A = ({ scrollable: t = !1, children: n }) => /* @__PURE__ */ e("div", { className: Q("modal-content", { scrollable: t }), children: n }), V = {
|
|
26
|
-
"buttons-block": "_buttons-block_1dgm4_1",
|
|
27
|
-
"button-container": "_button-container_1dgm4_5",
|
|
28
|
-
"modal-footer": "_modal-footer_1dgm4_14",
|
|
29
|
-
"with-extra-node": "_with-extra-node_1dgm4_21",
|
|
30
|
-
"size-small": "_size-small_1dgm4_25"
|
|
31
|
-
}, m = u.bind(V), ee = ({
|
|
32
|
-
footerNode: t,
|
|
33
|
-
closeHandler: n,
|
|
34
|
-
okButton: l,
|
|
35
|
-
cancelButton: r,
|
|
36
|
-
size: a
|
|
37
|
-
}) => /* @__PURE__ */ c("div", { className: m("modal-footer", { "with-extra-node": t, [`size-${a}`]: a }), children: [
|
|
38
|
-
t && t,
|
|
39
|
-
/* @__PURE__ */ c("div", { className: m("buttons-block"), children: [
|
|
40
|
-
r && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(
|
|
41
|
-
L,
|
|
42
|
-
{
|
|
43
|
-
variant: "ghost",
|
|
44
|
-
adjustWidthOn: a === "small" ? "parent" : "content",
|
|
45
|
-
onClick: n,
|
|
46
|
-
...r
|
|
47
|
-
}
|
|
48
|
-
) }),
|
|
49
|
-
l && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(L, { adjustWidthOn: a === "small" ? "parent" : "content", ...l }) })
|
|
50
|
-
] })
|
|
51
|
-
] }), te = {
|
|
52
|
-
"modal-header": "_modal-header_68lru_1",
|
|
53
|
-
"width-description": "_width-description_68lru_10",
|
|
54
|
-
"modal-header-content": "_modal-header-content_68lru_14",
|
|
55
|
-
"modal-title": "_modal-title_68lru_20",
|
|
56
|
-
"close-modal-icon": "_close-modal-icon_68lru_29"
|
|
57
|
-
}, _ = u.bind(te), oe = ({ title: t, onClose: n, withDescription: l = !1 }) => /* @__PURE__ */ c("div", { className: _("modal-header", { "width-description": l }), children: [
|
|
58
|
-
/* @__PURE__ */ e("div", { className: _("modal-header-content"), children: t && /* @__PURE__ */ e("div", { className: _("modal-title"), children: t }) }),
|
|
59
|
-
/* @__PURE__ */ e(F, { className: _("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(U, {}) })
|
|
60
|
-
] }), ne = "_modal_f3ckb_1", le = "_description_f3ckb_43", ae = "_scrollable_f3ckb_53", se = {
|
|
61
|
-
modal: ne,
|
|
62
|
-
"overlay-default": "_overlay-default_f3ckb_12",
|
|
63
|
-
"overlay-light-cyan": "_overlay-light-cyan_f3ckb_16",
|
|
64
|
-
"scrolling-content": "_scrolling-content_f3ckb_20",
|
|
65
|
-
"modal-window": "_modal-window_f3ckb_26",
|
|
66
|
-
description: le,
|
|
67
|
-
scrollable: ae,
|
|
68
|
-
"size-default": "_size-default_f3ckb_57",
|
|
69
|
-
"size-small": "_size-small_f3ckb_69",
|
|
70
|
-
"size-large": "_size-large_f3ckb_81"
|
|
71
|
-
}, h = u.bind(se), ie = 0.9, ce = 32 + 24, de = 32 + 8, re = 36 + 16, me = 32 * 2, ye = ({
|
|
72
|
-
title: t,
|
|
73
|
-
children: n,
|
|
74
|
-
footerNode: l,
|
|
75
|
-
okButton: r,
|
|
76
|
-
cancelButton: a,
|
|
77
|
-
className: N,
|
|
78
|
-
size: f = "default",
|
|
79
|
-
onClose: O = () => {
|
|
80
|
-
},
|
|
81
|
-
overlay: p = "default",
|
|
82
|
-
zIndex: z = 2,
|
|
83
|
-
allowCloseOutside: D = !0,
|
|
84
|
-
scrollable: v = !1,
|
|
85
|
-
withoutFooter: y = !1,
|
|
86
|
-
createFooter: C = null,
|
|
87
|
-
description: s = null
|
|
88
|
-
}) => {
|
|
89
|
-
const [R, E] = g(!1), [S, T] = g(0), i = j(null), H = X(), k = H.height, I = k * ie, w = (k - S) / 2, $ = () => {
|
|
90
|
-
let o = I - me;
|
|
91
|
-
return y || (o = o - re), s ? o = o - de : o = o - ce, o;
|
|
92
|
-
}, d = () => {
|
|
93
|
-
E(!1);
|
|
94
|
-
}, x = (o) => {
|
|
95
|
-
const { keyCode: W } = o;
|
|
96
|
-
W === Y.ESCAPE_KEY_CODE && d();
|
|
97
|
-
};
|
|
98
|
-
return b(() => {
|
|
99
|
-
if (i && i.current) {
|
|
100
|
-
const { clientHeight: o } = i.current;
|
|
101
|
-
T(o);
|
|
102
|
-
}
|
|
103
|
-
}, [n, H]), b(() => (E(!0), document.addEventListener("keydown", x, !1), () => document.removeEventListener("keydown", x, !1)), []), q(i, D ? d : void 0), /* @__PURE__ */ e(K, { onExitComplete: O, children: R && /* @__PURE__ */ e("div", { className: h("modal", { [`overlay-${p}`]: p }), style: { zIndex: z }, children: /* @__PURE__ */ c(
|
|
104
|
-
P.div,
|
|
105
|
-
{
|
|
106
|
-
className: h("modal-window", { [`size-${f}`]: f }, N),
|
|
107
|
-
ref: i,
|
|
108
|
-
tabIndex: 0,
|
|
109
|
-
initial: { opacity: 0, marginTop: -w },
|
|
110
|
-
animate: { opacity: 1, marginTop: w },
|
|
111
|
-
exit: { opacity: 0, marginTop: -w },
|
|
112
|
-
transition: { duration: 0.3 },
|
|
113
|
-
onAnimationStart: () => {
|
|
114
|
-
var o;
|
|
115
|
-
return (o = i.current) == null ? void 0 : o.focus();
|
|
116
|
-
},
|
|
117
|
-
children: [
|
|
118
|
-
/* @__PURE__ */ e(oe, { title: t, onClose: d, withDescription: !!s }),
|
|
119
|
-
v ? /* @__PURE__ */ c(G, { autoHeight: !0, autoHeightMax: $(), hideTracksWhenNotNeeded: !0, children: [
|
|
120
|
-
s && /* @__PURE__ */ e("span", { className: h("description", { scrollable: v }), children: s }),
|
|
121
|
-
/* @__PURE__ */ e(A, { scrollable: !0, children: n })
|
|
122
|
-
] }) : /* @__PURE__ */ c(B, { children: [
|
|
123
|
-
s && /* @__PURE__ */ e("span", { className: h("description"), children: s }),
|
|
124
|
-
/* @__PURE__ */ e(A, { children: n })
|
|
125
|
-
] }),
|
|
126
|
-
!y && (C ? C(d) : /* @__PURE__ */ e(
|
|
127
|
-
ee,
|
|
128
|
-
{
|
|
129
|
-
size: f,
|
|
130
|
-
footerNode: l,
|
|
131
|
-
okButton: r,
|
|
132
|
-
cancelButton: a,
|
|
133
|
-
closeHandler: d
|
|
134
|
-
}
|
|
135
|
-
))
|
|
136
|
-
]
|
|
137
|
-
},
|
|
138
|
-
"modal-window"
|
|
139
|
-
) }) });
|
|
140
|
-
};
|
|
141
|
-
export {
|
|
142
|
-
ye as M,
|
|
143
|
-
U as S,
|
|
144
|
-
A as a,
|
|
145
|
-
oe as b,
|
|
146
|
-
ee as c
|
|
147
|
-
};
|