@reportportal/ui-kit 0.0.1-alpha.46 → 0.0.1-alpha.48
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/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +1 -1
- package/dist/clear-53660571.js +5 -0
- package/dist/close-4b33d7c1.js +5 -0
- package/dist/common/types.d.ts +3 -0
- package/dist/components/fieldText/fieldText.d.ts +2 -0
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +1 -0
- package/dist/components/icons/index.d.ts +0 -1
- package/dist/components/index.d.ts +1 -3
- package/dist/components/maxValueDisplay/index.d.ts +3 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +7 -0
- package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
- package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/systemAlert/types.d.ts +1 -0
- package/dist/{datePicker-68379fe1.js → datePicker-7aa41281.js} +4 -5
- package/dist/datePicker.js +8 -4
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-6edea86c.js +263 -0
- package/dist/dropdown.js +3 -2
- package/dist/error-4f493850.js +7 -0
- package/dist/fieldNumber-d517a095.js +125 -0
- package/dist/fieldNumber.js +3 -2
- package/dist/fieldText-404383ce.js +139 -0
- package/dist/fieldText.js +4 -2
- package/dist/fieldTextFlex-23d6ecce.js +78 -0
- package/dist/fieldTextFlex.js +2 -1
- package/dist/icons.js +32 -0
- package/dist/index.js +73 -114
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/minus-660ea0d6.js +6 -0
- package/dist/modal.js +144 -14
- package/dist/pagination-86651d50.js +345 -0
- package/dist/pagination.js +7 -3
- 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 +55 -0
- package/dist/table-32fc8c70.js +144 -0
- package/dist/table.js +2 -2
- package/package.json +1 -1
- package/dist/baseIconButton-b6adc843.js +0 -25
- 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/fieldTextFlex-5bddf46a.js +0 -67
- 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
package/dist/date2-9273411e.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
-
import T from "react-datepicker";
|
|
3
|
-
const m = "en", r = "MM-dd-yyyy", U = ({
|
|
4
|
-
onChange: a = () => {
|
|
5
|
-
},
|
|
6
|
-
disabled: s = !1,
|
|
7
|
-
onBlur: d = () => {
|
|
8
|
-
},
|
|
9
|
-
onFocus: l = () => {
|
|
10
|
-
},
|
|
11
|
-
endDate: n = void 0,
|
|
12
|
-
startDate: o = void 0,
|
|
13
|
-
customTimeInput: t = void 0,
|
|
14
|
-
shouldCloseOnSelect: i = !0,
|
|
15
|
-
fixedHeight: p = !1,
|
|
16
|
-
language: c = m,
|
|
17
|
-
placeholder: A = r.toUpperCase(),
|
|
18
|
-
dateFormat: D = r,
|
|
19
|
-
selects: e = "start",
|
|
20
|
-
value: f = null
|
|
21
|
-
}) => /* @__PURE__ */ E(
|
|
22
|
-
T,
|
|
23
|
-
{
|
|
24
|
-
placeholderText: A,
|
|
25
|
-
selected: f,
|
|
26
|
-
startDate: o,
|
|
27
|
-
endDate: n,
|
|
28
|
-
minDate: e === "end" ? o : void 0,
|
|
29
|
-
disabled: s,
|
|
30
|
-
shouldCloseOnSelect: i,
|
|
31
|
-
fixedHeight: p,
|
|
32
|
-
locale: c,
|
|
33
|
-
showPopperArrow: !1,
|
|
34
|
-
onChange: a,
|
|
35
|
-
onBlur: d,
|
|
36
|
-
onFocus: l,
|
|
37
|
-
customTimeInput: t,
|
|
38
|
-
showTimeInput: !!t,
|
|
39
|
-
dateFormat: D,
|
|
40
|
-
selectsStart: e === "start",
|
|
41
|
-
selectsEnd: e === "end"
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
export {
|
|
45
|
-
U as D
|
|
46
|
-
};
|
package/dist/date2.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { jsxs as S, Fragment as U, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import $ from "react-datepicker";
|
|
3
|
-
import { c as Y } from "./bind-06a7ff84.js";
|
|
4
|
-
import { useMemo as E, useRef as B } from "react";
|
|
5
|
-
import { F as D } from "./fieldText-65e4c614.js";
|
|
6
|
-
import "./baseIconButton-b6adc843.js";
|
|
7
|
-
import { S as T, a as G } from "./calendar-f154eb78.js";
|
|
8
|
-
import { D as P } from "./dropdown-b9c6dc2f.js";
|
|
9
|
-
const H = (a, c = 20) => {
|
|
10
|
-
const l = a + c;
|
|
11
|
-
return new Array(l - a).fill(void 0).map((g, e) => a - e);
|
|
12
|
-
}, V = "_header_a3cjx_1", O = "_disabled_a3cjx_25", W = "_dropdown_a3cjx_8", q = {
|
|
13
|
-
header: V,
|
|
14
|
-
"dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
|
|
15
|
-
"button-prev": "_button-prev_a3cjx_13",
|
|
16
|
-
"button-next": "_button-next_a3cjx_14",
|
|
17
|
-
disabled: O,
|
|
18
|
-
dropdown: W,
|
|
19
|
-
"month-dropdown": "_month-dropdown_a3cjx_44",
|
|
20
|
-
"toggle-button": "_toggle-button_a3cjx_47"
|
|
21
|
-
}, r = Y.bind(q), z = ({
|
|
22
|
-
date: a = /* @__PURE__ */ new Date(),
|
|
23
|
-
changeYear: c = () => {
|
|
24
|
-
},
|
|
25
|
-
changeMonth: l = () => {
|
|
26
|
-
},
|
|
27
|
-
decreaseMonth: g = () => {
|
|
28
|
-
},
|
|
29
|
-
increaseMonth: e = () => {
|
|
30
|
-
},
|
|
31
|
-
prevMonthButtonDisabled: n = !1,
|
|
32
|
-
nextMonthButtonDisabled: h = !1,
|
|
33
|
-
headerNodes: b = null,
|
|
34
|
-
customClassName: w = "",
|
|
35
|
-
yearsOptions: i = [],
|
|
36
|
-
locale: x
|
|
37
|
-
}) => {
|
|
38
|
-
const p = a.getFullYear(), C = a.getMonth(), f = E(() => {
|
|
39
|
-
const t = Array(12).keys(), s = new Intl.DateTimeFormat(x, {
|
|
40
|
-
month: "long"
|
|
41
|
-
}), d = (m) => s.format(new Date(p, m));
|
|
42
|
-
return Array.from(t, d).reduce((m, j, A) => m.concat({
|
|
43
|
-
value: A,
|
|
44
|
-
label: j
|
|
45
|
-
}), []);
|
|
46
|
-
}, []), N = E(() => (i.length > 0 ? i : H(p)).reduce(
|
|
47
|
-
(s, d) => s.concat({ value: d, label: `${d}` }),
|
|
48
|
-
[]
|
|
49
|
-
), [i]), v = (t) => {
|
|
50
|
-
l(t);
|
|
51
|
-
}, y = (t) => {
|
|
52
|
-
c(t);
|
|
53
|
-
};
|
|
54
|
-
return /* @__PURE__ */ S(U, { children: [
|
|
55
|
-
b && /* @__PURE__ */ o("div", { className: r(w), children: b }),
|
|
56
|
-
/* @__PURE__ */ S("div", { className: r("header"), children: [
|
|
57
|
-
/* @__PURE__ */ o(
|
|
58
|
-
"button",
|
|
59
|
-
{
|
|
60
|
-
"aria-label": "Previous Months",
|
|
61
|
-
disabled: n,
|
|
62
|
-
onClick: g,
|
|
63
|
-
className: r("button-prev", { disabled: n }),
|
|
64
|
-
children: /* @__PURE__ */ o(T, {})
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ S("div", { className: r("dropdowns-wrapper"), children: [
|
|
68
|
-
/* @__PURE__ */ o(
|
|
69
|
-
P,
|
|
70
|
-
{
|
|
71
|
-
options: f,
|
|
72
|
-
value: C,
|
|
73
|
-
onChange: v,
|
|
74
|
-
transparentBackground: !0,
|
|
75
|
-
className: r("dropdown", "month-dropdown"),
|
|
76
|
-
toggleButtonClassName: r("toggle-button")
|
|
77
|
-
}
|
|
78
|
-
),
|
|
79
|
-
/* @__PURE__ */ o(
|
|
80
|
-
P,
|
|
81
|
-
{
|
|
82
|
-
options: N,
|
|
83
|
-
value: p,
|
|
84
|
-
onChange: y,
|
|
85
|
-
transparentBackground: !0,
|
|
86
|
-
className: r("dropdown"),
|
|
87
|
-
toggleButtonClassName: r("toggle-button")
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
] }),
|
|
91
|
-
/* @__PURE__ */ o(
|
|
92
|
-
"button",
|
|
93
|
-
{
|
|
94
|
-
"aria-label": "Next Months",
|
|
95
|
-
disabled: h,
|
|
96
|
-
onClick: e,
|
|
97
|
-
className: r("button-next", { disabled: h }),
|
|
98
|
-
children: /* @__PURE__ */ o(T, {})
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
] })
|
|
102
|
-
] });
|
|
103
|
-
}, J = "_calendar_1jr94_5", K = "_date_1jr94_90", Q = "_disabled_1jr94_202", X = "_popper_1jr94_210", Z = "_input_1jr94_214", ee = {
|
|
104
|
-
calendar: J,
|
|
105
|
-
"current-date": "_current-date_1jr94_89",
|
|
106
|
-
date: K,
|
|
107
|
-
"selected-range": "_selected-range_1jr94_119",
|
|
108
|
-
"end-date": "_end-date_1jr94_119",
|
|
109
|
-
disabled: Q,
|
|
110
|
-
popper: X,
|
|
111
|
-
input: Z
|
|
112
|
-
}, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", ie = ({
|
|
113
|
-
onChange: a = () => {
|
|
114
|
-
},
|
|
115
|
-
disabled: c = !1,
|
|
116
|
-
onBlur: l = () => {
|
|
117
|
-
},
|
|
118
|
-
onFocus: g = () => {
|
|
119
|
-
},
|
|
120
|
-
endDate: e = void 0,
|
|
121
|
-
startDate: n = void 0,
|
|
122
|
-
headerNodes: h = null,
|
|
123
|
-
customClassName: b = "",
|
|
124
|
-
customTimeInput: w = void 0,
|
|
125
|
-
shouldCloseOnSelect: i = !0,
|
|
126
|
-
popperClassName: x = "",
|
|
127
|
-
calendarClassName: p = "",
|
|
128
|
-
fixedHeight: C = !1,
|
|
129
|
-
language: f = ne,
|
|
130
|
-
yearsOptions: N = [],
|
|
131
|
-
placeholder: v = R.toUpperCase(),
|
|
132
|
-
dateFormat: y = R,
|
|
133
|
-
selects: t = "start",
|
|
134
|
-
value: s = null
|
|
135
|
-
}) => {
|
|
136
|
-
const d = B(null), F = n == null ? void 0 : n.toDateString(), m = e == null ? void 0 : e.toDateString(), j = e && n && e > n, A = (u) => {
|
|
137
|
-
const k = u.toDateString(), I = k === F, M = j && k === m, L = n && e && u > n && u < e;
|
|
138
|
-
return _("date", {
|
|
139
|
-
"current-date": I,
|
|
140
|
-
"selected-range": L && !M,
|
|
141
|
-
"end-date": M && j,
|
|
142
|
-
disabled: c
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
return /* @__PURE__ */ o(
|
|
146
|
-
$,
|
|
147
|
-
{
|
|
148
|
-
customInput: /* @__PURE__ */ o(
|
|
149
|
-
D,
|
|
150
|
-
{
|
|
151
|
-
className: _("input"),
|
|
152
|
-
defaultWidth: !1,
|
|
153
|
-
endIcon: /* @__PURE__ */ o(G, {}),
|
|
154
|
-
ref: d
|
|
155
|
-
}
|
|
156
|
-
),
|
|
157
|
-
placeholderText: v,
|
|
158
|
-
selected: s,
|
|
159
|
-
startDate: n,
|
|
160
|
-
endDate: e,
|
|
161
|
-
minDate: t === "end" ? n : void 0,
|
|
162
|
-
disabled: c,
|
|
163
|
-
shouldCloseOnSelect: i,
|
|
164
|
-
fixedHeight: C,
|
|
165
|
-
locale: f,
|
|
166
|
-
showPopperArrow: !1,
|
|
167
|
-
dayClassName: A,
|
|
168
|
-
calendarClassName: _(p, "calendar"),
|
|
169
|
-
renderCustomHeader: (u) => /* @__PURE__ */ o(
|
|
170
|
-
z,
|
|
171
|
-
{
|
|
172
|
-
...u,
|
|
173
|
-
headerNodes: h,
|
|
174
|
-
customClassName: b,
|
|
175
|
-
yearsOptions: N,
|
|
176
|
-
locale: f
|
|
177
|
-
}
|
|
178
|
-
),
|
|
179
|
-
onChange: a,
|
|
180
|
-
onBlur: l,
|
|
181
|
-
onFocus: g,
|
|
182
|
-
customTimeInput: w,
|
|
183
|
-
showTimeInput: !!w,
|
|
184
|
-
popperClassName: _(x, "popper"),
|
|
185
|
-
dateFormat: y,
|
|
186
|
-
selectsStart: t === "start",
|
|
187
|
-
selectsEnd: t === "end",
|
|
188
|
-
className: _("datepicker")
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
};
|
|
192
|
-
export {
|
|
193
|
-
ie as D
|
|
194
|
-
};
|
package/dist/datePicker1.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-68379fe1.js";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "react-datepicker";
|
|
4
|
-
import "./bind-06a7ff84.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "./fieldText-65e4c614.js";
|
|
7
|
-
import "./baseIconButton-b6adc843.js";
|
|
8
|
-
import "./calendar-f154eb78.js";
|
|
9
|
-
import "./dropdown-b9c6dc2f.js";
|
|
10
|
-
import "@floating-ui/react-dom";
|
|
11
|
-
import "downshift";
|
|
12
|
-
import "rc-scrollbars";
|
|
13
|
-
import "./useOnClickOutside-c332f7d3.js";
|
|
14
|
-
import "./keyCodes-f63c0e11.js";
|
|
15
|
-
import "./checkbox-9a6c7ce1.js";
|
|
16
|
-
export {
|
|
17
|
-
t as DatePicker1,
|
|
18
|
-
t as default
|
|
19
|
-
};
|
|
@@ -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
|
-
};
|