@reportportal/ui-kit 0.0.1-alpha.9 → 0.0.1-alpha.91
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 +70 -12
- package/dist/arrowUp-4a5caee7.js +6 -0
- package/dist/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +1 -1
- package/dist/breadcrumbs-8e5ca8d7.js +183 -0
- package/dist/breadcrumbs.js +11 -0
- package/dist/button-97d9e587.js +66 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-44c7e60e.js +5 -0
- package/dist/checkbox-ed6cc375.js +73 -0
- package/dist/checkbox.js +1 -1
- package/dist/close-4d480ef7.js +5 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/common/types.d.ts +3 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +1 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumbs/breadcrumb/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/breadcrumbsProvider.d.ts +13 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/hooks.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/index.d.ts +1 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/hiddenBreadcrumbs.d.ts +6 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.d.ts +5 -0
- package/dist/components/breadcrumbs/tree/index.d.ts +1 -0
- package/dist/components/breadcrumbs/tree/tree.d.ts +7 -0
- package/dist/components/breadcrumbs/types.d.ts +24 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +1 -0
- package/dist/components/bubblesLoader/index.d.ts +1 -0
- package/dist/components/button/button.d.ts +5 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +3 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/datePicker/datePicker.d.ts +25 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +16 -0
- package/dist/components/datePicker/header/index.d.ts +4 -0
- package/dist/components/datePicker/index.d.ts +5 -0
- package/dist/components/datePicker/utils.d.ts +4 -0
- package/dist/components/dropdown/constants.d.ts +1 -0
- package/dist/components/dropdown/dropdown.d.ts +13 -4
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +1 -0
- package/dist/components/dropdown/types.d.ts +3 -0
- package/dist/components/dropdown/utils.d.ts +2 -1
- package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
- package/dist/components/fieldLabel/index.d.ts +1 -0
- package/dist/components/fieldNumber/constants.d.ts +1 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +3 -3
- package/dist/components/fieldNumber/index.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +12 -4
- package/dist/components/fieldText/index.d.ts +1 -0
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +4 -2
- package/dist/components/fieldTextFlex/index.d.ts +1 -0
- package/dist/components/icons/index.d.ts +46 -7
- package/dist/components/index.d.ts +7 -0
- package/dist/components/maxValueDisplay/index.d.ts +4 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
- package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
- package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +5 -2
- package/dist/components/modal/modalContent/modalContent.d.ts +2 -0
- package/dist/components/modal/modalFooter/modalFooter.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +2 -1
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +12 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +4 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +1 -0
- package/dist/components/popover/index.d.ts +4 -1
- package/dist/components/popover/popover.d.ts +3 -2
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +1 -0
- package/dist/components/radio/radioGroup.d.ts +1 -0
- package/dist/components/selection/index.d.ts +5 -0
- package/dist/components/selection/selection.d.ts +12 -0
- package/dist/components/selection/types.d.ts +1 -0
- package/dist/components/spinLoader/index.d.ts +4 -0
- package/dist/components/spinLoader/spinLoader.d.ts +8 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +4 -0
- package/dist/components/systemAlert/types.d.ts +16 -0
- package/dist/components/systemMessage/index.d.ts +1 -0
- package/dist/components/systemMessage/systemMessage.d.ts +1 -0
- package/dist/components/table/constants.d.ts +2 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/types.d.ts +13 -7
- package/dist/components/table/utils.d.ts +5 -1
- package/dist/components/themeProvider/index.d.ts +1 -0
- package/dist/components/themeProvider/themeProvider.d.ts +1 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/toggle.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +12 -2
- package/dist/datePicker-c9d859b1.js +194 -0
- package/dist/datePicker.js +28 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-b26b8fd8.js +282 -0
- package/dist/dropdown.js +5 -2
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-c9113a7f.js +135 -0
- package/dist/fieldNumber.js +4 -2
- package/dist/fieldText-35421470.js +166 -0
- package/dist/fieldText.js +6 -2
- package/dist/fieldTextFlex-8afaab31.js +78 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +64 -0
- package/dist/index.js +110 -44
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/modal.js +144 -14
- package/dist/openEye-7b9cf080.js +7 -0
- package/dist/pagination-b001d791.js +347 -0
- package/dist/pagination.js +11 -4
- package/dist/plus-0929dda4.js +6 -0
- package/dist/popover.js +61 -57
- package/dist/prevPage-87faf576.js +6 -0
- package/dist/radio-62546efa.js +76 -0
- package/dist/radio.js +1 -1
- package/dist/selection-9124d029.js +38 -0
- package/dist/selection.js +10 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +1 -1
- package/dist/success-8fd8bd2c.js +7 -0
- package/dist/systemAlert.js +63 -0
- package/dist/systemMessage-924fdaa6.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-920fdad9.js +142 -0
- package/dist/table.js +11 -0
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +87 -56
- package/dist/tree-c3dd3d45.js +6 -0
- package/package.json +28 -16
- package/dist/baseIconButton-7bc53dec.js +0 -25
- package/dist/button-7fb84fde.js +0 -62
- package/dist/checkbox-4143390f.js +0 -70
- package/dist/dropdown-e07f2a71.js +0 -212
- package/dist/fieldNumber-46fe79b9.js +0 -127
- package/dist/fieldText-d80b29ba.js +0 -102
- package/dist/fieldTextFlex-5bddf46a.js +0 -67
- package/dist/index-bb9b62ef.js +0 -131
- package/dist/pagination-a36bc786.js +0 -274
- package/dist/radio-fd49a09c.js +0 -76
- package/dist/systemMessage-1ced6079.js +0 -30
- package/dist/toggle-707ecb74.js +0 -67
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { jsxs as u, jsx as d, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as _e, useState as q, useRef as he } from "react";
|
|
3
|
+
import { c as J } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useFloating as fe, offset as ue, flip as ge } from "@floating-ui/react-dom";
|
|
5
|
+
import { useSelect as P } from "downshift";
|
|
6
|
+
import { Scrollbars as pe } from "rc-scrollbars";
|
|
7
|
+
import { u as me } from "./useOnClickOutside-c332f7d3.js";
|
|
8
|
+
import { K as p } from "./keyCodes-f63c0e11.js";
|
|
9
|
+
import { B as ye } 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-ed6cc375.js";
|
|
13
|
+
const ke = "_disabled_1etj7_12", Ne = "_hidden_1etj7_16", De = "_hover_1etj7_22", Ee = "_selected_1etj7_34", we = {
|
|
14
|
+
"dropdown-option": "_dropdown-option_1etj7_1",
|
|
15
|
+
disabled: ke,
|
|
16
|
+
hidden: Ne,
|
|
17
|
+
hover: De,
|
|
18
|
+
selected: Ee,
|
|
19
|
+
"multi-select": "_multi-select_1etj7_34",
|
|
20
|
+
"single-option": "_single-option_1etj7_39",
|
|
21
|
+
"sub-option": "_sub-option_1etj7_46"
|
|
22
|
+
}, z = J.bind(we), G = _e(
|
|
23
|
+
(n, t) => {
|
|
24
|
+
const {
|
|
25
|
+
option: { value: r, disabled: i, hidden: v, label: m, title: c, groupRef: a },
|
|
26
|
+
selected: b,
|
|
27
|
+
onChange: y,
|
|
28
|
+
render: C,
|
|
29
|
+
highlightHovered: O,
|
|
30
|
+
onMouseEnter: K,
|
|
31
|
+
multiSelect: h,
|
|
32
|
+
isPartiallyChecked: k = !1
|
|
33
|
+
} = n, A = (N) => {
|
|
34
|
+
(N.target instanceof HTMLDivElement || N.target instanceof HTMLInputElement) && (y == null || y(r));
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ u(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: z("dropdown-option", {
|
|
40
|
+
selected: b,
|
|
41
|
+
disabled: i,
|
|
42
|
+
hidden: v,
|
|
43
|
+
hover: O,
|
|
44
|
+
"multi-select": h
|
|
45
|
+
}),
|
|
46
|
+
title: c,
|
|
47
|
+
onClick: A,
|
|
48
|
+
ref: t,
|
|
49
|
+
onMouseEnter: K,
|
|
50
|
+
children: [
|
|
51
|
+
h && /* @__PURE__ */ d(Oe, { value: !!b, partiallyChecked: k }),
|
|
52
|
+
/* @__PURE__ */ d("div", { className: z("single-option", { "sub-option": !!a }), children: C ? C(n) : m })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
), ve = [
|
|
58
|
+
p.ENTER_KEY_CODE,
|
|
59
|
+
p.SPACE_KEY_CODE,
|
|
60
|
+
p.ARROW_DOWN_KEY_CODE
|
|
61
|
+
], Ke = [p.ESCAPE_KEY_CODE, p.TAB_KEY_CODE];
|
|
62
|
+
var g = /* @__PURE__ */ ((n) => (n.ON_KEY_DOWN = "onKeyDown", n.ON_CLICK = "onClick", n))(g || {});
|
|
63
|
+
const Ae = (n, t) => {
|
|
64
|
+
const r = Array.isArray(t) ? t : [t];
|
|
65
|
+
return n.findIndex(({ value: i }) => r.includes(i));
|
|
66
|
+
}, xe = (n, t) => (n % t + t) % t, Y = (n, t = 0, r = 1) => {
|
|
67
|
+
if (!n[t].disabled)
|
|
68
|
+
return t;
|
|
69
|
+
const i = n.length;
|
|
70
|
+
return Y(
|
|
71
|
+
n,
|
|
72
|
+
xe(t + r, i),
|
|
73
|
+
r
|
|
74
|
+
);
|
|
75
|
+
}, Ie = (n, t) => Y(n, t), Pe = (n, t) => Y(n, t, -1), Ye = "_container_5enku_1", je = "_icon_5enku_7", Re = "_arrow_5enku_13", Te = "_dropdown_5enku_19", He = "_disabled_5enku_36", Me = "_value_5enku_43", We = "_error_5enku_46", Le = "_touched_5enku_46", Se = "_opened_5enku_50", Ve = "_placeholder_5enku_83", $e = "_ghost_5enku_118", Ue = "_divider_5enku_139", qe = {
|
|
76
|
+
container: Ye,
|
|
77
|
+
icon: je,
|
|
78
|
+
arrow: Re,
|
|
79
|
+
dropdown: Te,
|
|
80
|
+
"transparent-background": "_transparent-background_5enku_33",
|
|
81
|
+
disabled: He,
|
|
82
|
+
value: Me,
|
|
83
|
+
error: We,
|
|
84
|
+
touched: Le,
|
|
85
|
+
opened: Se,
|
|
86
|
+
placeholder: Ve,
|
|
87
|
+
"mobile-disabled": "_mobile-disabled_5enku_87",
|
|
88
|
+
"select-list": "_select-list_5enku_92",
|
|
89
|
+
"limited-width": "_limited-width_5enku_109",
|
|
90
|
+
"options-container": "_options-container_5enku_113",
|
|
91
|
+
ghost: $e,
|
|
92
|
+
divider: Ue
|
|
93
|
+
}, o = J.bind(qe), dt = ({
|
|
94
|
+
multiSelect: n = !1,
|
|
95
|
+
value: t = n ? [] : "",
|
|
96
|
+
options: r = [],
|
|
97
|
+
disabled: i = !1,
|
|
98
|
+
error: v,
|
|
99
|
+
onChange: m,
|
|
100
|
+
onFocus: c,
|
|
101
|
+
onBlur: a,
|
|
102
|
+
mobileDisabled: b,
|
|
103
|
+
title: y,
|
|
104
|
+
touched: C = !1,
|
|
105
|
+
icon: O,
|
|
106
|
+
variant: K,
|
|
107
|
+
placeholder: h = "",
|
|
108
|
+
label: k = "",
|
|
109
|
+
renderOption: A,
|
|
110
|
+
transparentBackground: N = !1,
|
|
111
|
+
className: Q,
|
|
112
|
+
toggleButtonClassName: X,
|
|
113
|
+
isListWidthLimited: Z = !1,
|
|
114
|
+
optionAll: j = { value: "all", label: "All" },
|
|
115
|
+
isOptionAllVisible: R = !1,
|
|
116
|
+
onSelectAll: F = () => {
|
|
117
|
+
},
|
|
118
|
+
formatDisplayedValue: T,
|
|
119
|
+
notScrollable: B = !1,
|
|
120
|
+
footer: H
|
|
121
|
+
}) => {
|
|
122
|
+
const [_, f] = q(!1), M = he(null), [ee, D] = q(null), x = n && Array.isArray(t) ? r.filter((e) => t.includes(e.value)) : null, { refs: W, floatingStyles: te } = fe({
|
|
123
|
+
placement: "bottom-start",
|
|
124
|
+
middleware: [
|
|
125
|
+
ue(5),
|
|
126
|
+
ge({
|
|
127
|
+
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"]
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
}), ne = () => {
|
|
131
|
+
if (R && Array.isArray(t)) {
|
|
132
|
+
const e = r.map((s) => s.value);
|
|
133
|
+
m(t.length === r.length ? [] : e), F();
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
me(M, () => {
|
|
137
|
+
_ && (f(!1), a == null || a());
|
|
138
|
+
});
|
|
139
|
+
const L = (e) => {
|
|
140
|
+
if (!e.disabled) {
|
|
141
|
+
if (n) {
|
|
142
|
+
const s = Array.isArray(t) ? [...t] : [], l = s.indexOf(e.value);
|
|
143
|
+
l === -1 ? s.push(e.value) : s.splice(l, 1), m(s);
|
|
144
|
+
} else
|
|
145
|
+
m(e.value);
|
|
146
|
+
f((s) => n || !s);
|
|
147
|
+
}
|
|
148
|
+
}, re = () => r.find(({ value: e }) => e === t), S = Ae(r, t), {
|
|
149
|
+
getToggleButtonProps: se,
|
|
150
|
+
getLabelProps: ae,
|
|
151
|
+
getMenuProps: de,
|
|
152
|
+
getItemProps: le,
|
|
153
|
+
setHighlightedIndex: E,
|
|
154
|
+
highlightedIndex: V,
|
|
155
|
+
selectedItem: w
|
|
156
|
+
} = P({
|
|
157
|
+
items: r,
|
|
158
|
+
itemToString: (e) => (e != null && e.label ? String(e.label) : h) || "",
|
|
159
|
+
selectedItem: re(),
|
|
160
|
+
isOpen: _,
|
|
161
|
+
circularNavigation: !0,
|
|
162
|
+
defaultHighlightedIndex: S,
|
|
163
|
+
onHighlightedIndexChange: (e) => {
|
|
164
|
+
switch (e.type) {
|
|
165
|
+
case P.stateChangeTypes.MenuKeyDownArrowUp:
|
|
166
|
+
return D(g.ON_KEY_DOWN), E(Pe(r, e.highlightedIndex)), e;
|
|
167
|
+
case P.stateChangeTypes.MenuKeyDownArrowDown:
|
|
168
|
+
return D(g.ON_KEY_DOWN), E(Ie(r, e.highlightedIndex)), e;
|
|
169
|
+
default:
|
|
170
|
+
return e;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}), ie = () => {
|
|
174
|
+
i || (f((e) => !e), _ ? a == null || a() : c == null || c(), D(g.ON_CLICK));
|
|
175
|
+
}, I = (() => {
|
|
176
|
+
if (n && Array.isArray(t) && r.length === t.length)
|
|
177
|
+
return j.label;
|
|
178
|
+
const e = r.reduce((s, l) => ((Array.isArray(t) && t.includes(l.value) || l.value === t) && s.push(l.label), s), []);
|
|
179
|
+
if (e.length > 0)
|
|
180
|
+
return e.join(", ");
|
|
181
|
+
if (!t && t !== !1 && t !== 0 || Array.isArray(t) && !t.length)
|
|
182
|
+
return h;
|
|
183
|
+
})(), oe = (e) => {
|
|
184
|
+
const { keyCode: s } = e;
|
|
185
|
+
ve.includes(s) && !_ && (e.preventDefault(), E(S), f(!0), c == null || c(), D(g.ON_KEY_DOWN));
|
|
186
|
+
}, ce = (e) => {
|
|
187
|
+
const { keyCode: s } = e;
|
|
188
|
+
if (s === p.ENTER_KEY_CODE) {
|
|
189
|
+
const l = r[V];
|
|
190
|
+
L(l), n || (f(!1), a == null || a());
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
Ke.includes(s) && (e.stopPropagation(), f(!1), a == null || a());
|
|
194
|
+
}, $ = () => /* @__PURE__ */ u("div", { className: o("options-container"), children: [
|
|
195
|
+
n && R && Array.isArray(t) && /* @__PURE__ */ u(U, { children: [
|
|
196
|
+
/* @__PURE__ */ d(
|
|
197
|
+
G,
|
|
198
|
+
{
|
|
199
|
+
option: j,
|
|
200
|
+
selected: t.length === r.length,
|
|
201
|
+
onChange: ne,
|
|
202
|
+
multiSelect: n,
|
|
203
|
+
isPartiallyChecked: !!t.length
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
/* @__PURE__ */ d("div", { className: o("divider") }),
|
|
207
|
+
" "
|
|
208
|
+
] }),
|
|
209
|
+
r.map((e, s) => /* @__PURE__ */ d(
|
|
210
|
+
G,
|
|
211
|
+
{
|
|
212
|
+
...le({
|
|
213
|
+
item: e,
|
|
214
|
+
index: s
|
|
215
|
+
}),
|
|
216
|
+
multiSelect: n,
|
|
217
|
+
selected: n ? x == null ? void 0 : x.some((l) => l.value === e.value) : e.value === ((w == null ? void 0 : w.value) ?? w),
|
|
218
|
+
option: { title: e.label, ...e },
|
|
219
|
+
highlightHovered: V === s && ee !== g.ON_CLICK,
|
|
220
|
+
render: A,
|
|
221
|
+
onChange: e.disabled ? null : () => L(e),
|
|
222
|
+
onMouseEnter: () => E(s)
|
|
223
|
+
},
|
|
224
|
+
e.value
|
|
225
|
+
)),
|
|
226
|
+
H && /* @__PURE__ */ u(U, { children: [
|
|
227
|
+
/* @__PURE__ */ d("div", { className: o("divider") }),
|
|
228
|
+
H
|
|
229
|
+
] })
|
|
230
|
+
] });
|
|
231
|
+
return /* @__PURE__ */ u("div", { ref: M, className: o("container", Q), title: y, children: [
|
|
232
|
+
k && /* @__PURE__ */ d(Ce, { ...ae(), children: k }),
|
|
233
|
+
/* @__PURE__ */ u(
|
|
234
|
+
"button",
|
|
235
|
+
{
|
|
236
|
+
disabled: i,
|
|
237
|
+
...se({
|
|
238
|
+
className: o("dropdown", K, X, {
|
|
239
|
+
"transparent-background": N,
|
|
240
|
+
opened: _,
|
|
241
|
+
disabled: i,
|
|
242
|
+
error: v,
|
|
243
|
+
touched: C,
|
|
244
|
+
"mobile-disabled": b
|
|
245
|
+
}),
|
|
246
|
+
onClick: ie,
|
|
247
|
+
onKeyDown: oe,
|
|
248
|
+
ref: W.setReference
|
|
249
|
+
}),
|
|
250
|
+
type: "button",
|
|
251
|
+
children: [
|
|
252
|
+
O && /* @__PURE__ */ d("span", { className: o("icon"), children: O }),
|
|
253
|
+
/* @__PURE__ */ d(
|
|
254
|
+
"span",
|
|
255
|
+
{
|
|
256
|
+
className: o("value", {
|
|
257
|
+
placeholder: I === h
|
|
258
|
+
}),
|
|
259
|
+
children: T ? T(I) : I
|
|
260
|
+
}
|
|
261
|
+
),
|
|
262
|
+
/* @__PURE__ */ d(ye, { className: o("arrow"), tabIndex: -1, children: /* @__PURE__ */ d(be, {}) })
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
_ && /* @__PURE__ */ d(
|
|
267
|
+
"div",
|
|
268
|
+
{
|
|
269
|
+
style: te,
|
|
270
|
+
className: o("select-list", { opened: _, "limited-width": Z }),
|
|
271
|
+
...de({
|
|
272
|
+
onKeyDown: ce,
|
|
273
|
+
ref: W.setFloating
|
|
274
|
+
}),
|
|
275
|
+
children: B ? $() : /* @__PURE__ */ d(pe, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: $() })
|
|
276
|
+
}
|
|
277
|
+
)
|
|
278
|
+
] });
|
|
279
|
+
};
|
|
280
|
+
export {
|
|
281
|
+
dt as D
|
|
282
|
+
};
|
package/dist/dropdown.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as r } from "./dropdown-
|
|
1
|
+
import { D as r } from "./dropdown-b26b8fd8.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
@@ -7,7 +7,10 @@ import "downshift";
|
|
|
7
7
|
import "rc-scrollbars";
|
|
8
8
|
import "./useOnClickOutside-c332f7d3.js";
|
|
9
9
|
import "./keyCodes-f63c0e11.js";
|
|
10
|
-
import "./baseIconButton-
|
|
10
|
+
import "./baseIconButton-251479f7.js";
|
|
11
|
+
import "./dropdown-0260bb66.js";
|
|
12
|
+
import "./fieldLabel.js";
|
|
13
|
+
import "./checkbox-ed6cc375.js";
|
|
11
14
|
export {
|
|
12
15
|
r as Dropdown,
|
|
13
16
|
r as default
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as r, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { c as t } from "./bind-06a7ff84.js";
|
|
3
|
+
const c = "_asterisk_1rhlz_11", o = "_disabled_1rhlz_17", b = {
|
|
4
|
+
"field-label": "_field-label_1rhlz_1",
|
|
5
|
+
asterisk: c,
|
|
6
|
+
disabled: o
|
|
7
|
+
}, s = t.bind(b), m = ({
|
|
8
|
+
children: l,
|
|
9
|
+
isRequired: e = !1,
|
|
10
|
+
className: a,
|
|
11
|
+
...i
|
|
12
|
+
}) => /* @__PURE__ */ r("label", { className: s("field-label", a), ...i, children: [
|
|
13
|
+
l,
|
|
14
|
+
e && /* @__PURE__ */ d("span", { className: s("asterisk"), children: "*" })
|
|
15
|
+
] });
|
|
16
|
+
export {
|
|
17
|
+
m as FieldLabel
|
|
18
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { jsxs as d, Fragment as v, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as T, useId as I, useMemo as W } from "react";
|
|
3
|
+
import { c as y } from "./bind-06a7ff84.js";
|
|
4
|
+
import { K as _ } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
import { B as p } from "./baseIconButton-251479f7.js";
|
|
6
|
+
import { S as B, a as F } from "./plus-0929dda4.js";
|
|
7
|
+
import { FieldLabel as S } from "./fieldLabel.js";
|
|
8
|
+
const w = 5, m = 16, k = [
|
|
9
|
+
_.TAB_KEY_CODE,
|
|
10
|
+
_.BACKSPACE_KEY_CODE,
|
|
11
|
+
_.ARROW_LEFT_KEY_CODE,
|
|
12
|
+
_.ARROW_UP_KEY_CODE,
|
|
13
|
+
_.ARROW_RIGHT_KEY_CODE,
|
|
14
|
+
_.ARROW_DOWN_KEY_CODE,
|
|
15
|
+
_.DELETE_KEY_CODE,
|
|
16
|
+
_.NUM_LOCK_0_KEY_CODE,
|
|
17
|
+
_.NUM_LOCK_1_KEY_CODE,
|
|
18
|
+
_.NUM_LOCK_2_KEY_CODE,
|
|
19
|
+
_.NUM_LOCK_3_KEY_CODE,
|
|
20
|
+
_.NUM_LOCK_4_KEY_CODE,
|
|
21
|
+
_.NUM_LOCK_5_KEY_CODE,
|
|
22
|
+
_.NUM_LOCK_6_KEY_CODE,
|
|
23
|
+
_.NUM_LOCK_7_KEY_CODE,
|
|
24
|
+
_.NUM_LOCK_8_KEY_CODE,
|
|
25
|
+
_.NUM_LOCK_9_KEY_CODE
|
|
26
|
+
], H = "_sign_3v3h5_7", V = "_error_3v3h5_22", P = "_disabled_3v3h5_27", b = "_input_3v3h5_12", j = {
|
|
27
|
+
"field-number": "_field-number_3v3h5_1",
|
|
28
|
+
sign: H,
|
|
29
|
+
"input-container": "_input-container_3v3h5_12",
|
|
30
|
+
error: V,
|
|
31
|
+
disabled: P,
|
|
32
|
+
"input-field": "_input-field_3v3h5_38",
|
|
33
|
+
input: b,
|
|
34
|
+
"additional-content": "_additional-content_3v3h5_84",
|
|
35
|
+
"error-text": "_error-text_3v3h5_88"
|
|
36
|
+
}, s = y.bind(j), Z = ({
|
|
37
|
+
value: r = "",
|
|
38
|
+
placeholder: N = "0",
|
|
39
|
+
disabled: t = !1,
|
|
40
|
+
onChange: o,
|
|
41
|
+
onFocus: C,
|
|
42
|
+
onBlur: G,
|
|
43
|
+
label: O,
|
|
44
|
+
postfix: c = "",
|
|
45
|
+
min: E = 0,
|
|
46
|
+
max: l = Number.MAX_SAFE_INTEGER,
|
|
47
|
+
title: f,
|
|
48
|
+
error: u,
|
|
49
|
+
id: h,
|
|
50
|
+
...Y
|
|
51
|
+
}) => {
|
|
52
|
+
const a = T(null), D = I(), L = (n) => {
|
|
53
|
+
let e = n.target.value.replace(/^0(?=\d+|^\d)/g, "");
|
|
54
|
+
if (e === "") {
|
|
55
|
+
o("");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
e = +e, e >= E && e <= l && o(e);
|
|
59
|
+
}, M = (n) => {
|
|
60
|
+
const { keyCode: e } = n;
|
|
61
|
+
k.includes(e) || (e < _.NUMBER_START_KEY_CODE || e > _.NUMBER_END_KEY_CODE || n.shiftKey) && n.preventDefault();
|
|
62
|
+
}, R = () => {
|
|
63
|
+
const n = +r - 1;
|
|
64
|
+
n >= E && n <= l && o(n);
|
|
65
|
+
}, U = () => {
|
|
66
|
+
const n = +r + 1;
|
|
67
|
+
n >= E && n <= l && o(n);
|
|
68
|
+
}, K = N + c, A = W(() => {
|
|
69
|
+
let n = (String(r) || K).length;
|
|
70
|
+
return c && !r && (n += 1), n > m ? `${m}ch` : `${n || w}ch`;
|
|
71
|
+
}, [K, c, r]), g = () => {
|
|
72
|
+
a && a.current && a.current.focus(), C && C();
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ d(v, { children: [
|
|
75
|
+
/* @__PURE__ */ d("div", { className: s("field-number", { disabled: t }), children: [
|
|
76
|
+
O && /* @__PURE__ */ i(S, { htmlFor: h ?? D, children: O }),
|
|
77
|
+
/* @__PURE__ */ d(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: s("input-container", {
|
|
81
|
+
error: u,
|
|
82
|
+
disabled: t
|
|
83
|
+
}),
|
|
84
|
+
title: f,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ i(
|
|
87
|
+
p,
|
|
88
|
+
{
|
|
89
|
+
className: s("sign", "minus"),
|
|
90
|
+
disabled: t,
|
|
91
|
+
onClick: R,
|
|
92
|
+
children: /* @__PURE__ */ i(B, {})
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ d("span", { className: s("input-field", { disabled: t }), onClick: g, children: [
|
|
96
|
+
/* @__PURE__ */ i(
|
|
97
|
+
"input",
|
|
98
|
+
{
|
|
99
|
+
id: h ?? D,
|
|
100
|
+
ref: a,
|
|
101
|
+
className: s("input"),
|
|
102
|
+
type: "number",
|
|
103
|
+
value: r,
|
|
104
|
+
placeholder: K,
|
|
105
|
+
disabled: t,
|
|
106
|
+
min: E,
|
|
107
|
+
max: l,
|
|
108
|
+
onKeyDown: t ? void 0 : M,
|
|
109
|
+
onChange: t ? void 0 : L,
|
|
110
|
+
onFocus: t ? void 0 : C,
|
|
111
|
+
style: { width: A },
|
|
112
|
+
...Y
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
!!c && (r === 0 || !!r) && /* @__PURE__ */ i("span", { children: c.slice(0, 1) })
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ i(
|
|
118
|
+
p,
|
|
119
|
+
{
|
|
120
|
+
className: s("sign", "plus"),
|
|
121
|
+
disabled: t,
|
|
122
|
+
onClick: U,
|
|
123
|
+
children: /* @__PURE__ */ i(F, {})
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
] }),
|
|
130
|
+
u && /* @__PURE__ */ i("div", { className: s("additional-content"), children: /* @__PURE__ */ i("span", { className: s("error-text"), children: u }) })
|
|
131
|
+
] });
|
|
132
|
+
};
|
|
133
|
+
export {
|
|
134
|
+
Z as F
|
|
135
|
+
};
|
package/dist/fieldNumber.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { F as m } from "./fieldNumber-
|
|
1
|
+
import { F as m } from "./fieldNumber-c9113a7f.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
5
5
|
import "./keyCodes-f63c0e11.js";
|
|
6
|
-
import "./baseIconButton-
|
|
6
|
+
import "./baseIconButton-251479f7.js";
|
|
7
|
+
import "./plus-0929dda4.js";
|
|
8
|
+
import "./fieldLabel.js";
|
|
7
9
|
export {
|
|
8
10
|
m as FieldNumber,
|
|
9
11
|
m as default
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as W, useRef as X, useId as Y, useState as v } from "react";
|
|
3
|
+
import { c as Z } from "./bind-06a7ff84.js";
|
|
4
|
+
import { b as q, a as ee, S as ne } from "./openEye-7b9cf080.js";
|
|
5
|
+
import { B as te } from "./button-97d9e587.js";
|
|
6
|
+
import { S as se } from "./spinLoader-c4a53718.js";
|
|
7
|
+
import { M as oe } from "./maxValueDisplay-9be01a75.js";
|
|
8
|
+
import { FieldLabel as ae } from "./fieldLabel.js";
|
|
9
|
+
const ie = "_collapsed_uz1iu_13", ce = "_field_uz1iu_21", re = "_placeholder_uz1iu_46", le = "_disabled_uz1iu_49", ue = "_error_uz1iu_52", de = "_touched_uz1iu_52", _e = "_input_uz1iu_71", pe = "_icon_uz1iu_1", fe = "_text_uz1iu_169", me = {
|
|
10
|
+
"icon-container": "_icon-container_uz1iu_1",
|
|
11
|
+
"icon-container-end": "_icon-container-end_uz1iu_1",
|
|
12
|
+
"icon-container-start": "_icon-container-start_uz1iu_1",
|
|
13
|
+
collapsed: ie,
|
|
14
|
+
field: ce,
|
|
15
|
+
"default-width": "_default-width_uz1iu_33",
|
|
16
|
+
placeholder: re,
|
|
17
|
+
disabled: le,
|
|
18
|
+
error: ue,
|
|
19
|
+
touched: de,
|
|
20
|
+
"max-length-display": "_max-length-display_uz1iu_59",
|
|
21
|
+
"input-container": "_input-container_uz1iu_71",
|
|
22
|
+
"type-password": "_type-password_uz1iu_75",
|
|
23
|
+
input: _e,
|
|
24
|
+
"eye-icon": "_eye-icon_uz1iu_79",
|
|
25
|
+
icon: pe,
|
|
26
|
+
"start-icon": "_start-icon_uz1iu_125",
|
|
27
|
+
"clear-icon": "_clear-icon_uz1iu_126",
|
|
28
|
+
"additional-content": "_additional-content_uz1iu_162",
|
|
29
|
+
text: fe,
|
|
30
|
+
"error-text": "_error-text_uz1iu_189",
|
|
31
|
+
"help-text": "_help-text_uz1iu_193"
|
|
32
|
+
}, n = Z.bind(me), Se = W(
|
|
33
|
+
({
|
|
34
|
+
value: s = "",
|
|
35
|
+
className: E,
|
|
36
|
+
classNameHelpText: B,
|
|
37
|
+
error: r,
|
|
38
|
+
placeholder: p,
|
|
39
|
+
disabled: a = !1,
|
|
40
|
+
onChange: C,
|
|
41
|
+
touched: f = !1,
|
|
42
|
+
title: T,
|
|
43
|
+
label: l,
|
|
44
|
+
helpText: u,
|
|
45
|
+
defaultWidth: V = !0,
|
|
46
|
+
startIcon: m,
|
|
47
|
+
endIcon: h,
|
|
48
|
+
clearable: k = !1,
|
|
49
|
+
onClear: x,
|
|
50
|
+
isRequired: z = !1,
|
|
51
|
+
hasDoubleMessage: L = !1,
|
|
52
|
+
type: i = "text",
|
|
53
|
+
displayError: P = !0,
|
|
54
|
+
collapsible: R = !1,
|
|
55
|
+
loading: j = !1,
|
|
56
|
+
maxLengthDisplay: H,
|
|
57
|
+
onFocus: I = () => {
|
|
58
|
+
},
|
|
59
|
+
onBlur: O = () => {
|
|
60
|
+
},
|
|
61
|
+
...U
|
|
62
|
+
}, $) => {
|
|
63
|
+
const A = X(null), d = $ || A, w = Y(), [N, y] = v(!1), [g, F] = v(!1), G = (t) => {
|
|
64
|
+
y(!0), I(t);
|
|
65
|
+
}, J = (t) => {
|
|
66
|
+
y(!1), O(t);
|
|
67
|
+
}, K = () => {
|
|
68
|
+
var t;
|
|
69
|
+
x && (x(s), (t = d.current) == null || t.focus());
|
|
70
|
+
}, S = P && r && f, D = /* @__PURE__ */ e("span", { className: n("text", "help-text", B), children: u }), Q = () => i !== "password" ? i : g ? "text" : "password", M = (t) => {
|
|
71
|
+
t.preventDefault(), F(!0);
|
|
72
|
+
}, c = (t) => {
|
|
73
|
+
t.preventDefault(), F(!1);
|
|
74
|
+
};
|
|
75
|
+
return /* @__PURE__ */ o(b, { children: [
|
|
76
|
+
l && /* @__PURE__ */ e(ae, { isRequired: z, htmlFor: w, children: l }),
|
|
77
|
+
/* @__PURE__ */ o(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: n("field", E, {
|
|
81
|
+
error: r,
|
|
82
|
+
touched: f,
|
|
83
|
+
disabled: a,
|
|
84
|
+
"default-width": V,
|
|
85
|
+
collapsed: R && !N && !s
|
|
86
|
+
}),
|
|
87
|
+
title: T,
|
|
88
|
+
children: [
|
|
89
|
+
j ? /* @__PURE__ */ e(se, {}) : m && /* @__PURE__ */ e(
|
|
90
|
+
"span",
|
|
91
|
+
{
|
|
92
|
+
className: n("icon-container-start"),
|
|
93
|
+
onClick: () => {
|
|
94
|
+
var _;
|
|
95
|
+
(_ = d.current) == null || _.focus();
|
|
96
|
+
},
|
|
97
|
+
children: /* @__PURE__ */ e("span", { className: n("icon", { "start-icon": !N }), children: m })
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ o("span", { className: n("input-container", `type-${i}`), children: [
|
|
101
|
+
/* @__PURE__ */ e(
|
|
102
|
+
"input",
|
|
103
|
+
{
|
|
104
|
+
ref: d,
|
|
105
|
+
type: Q(),
|
|
106
|
+
className: n("input"),
|
|
107
|
+
value: s,
|
|
108
|
+
disabled: a,
|
|
109
|
+
id: w,
|
|
110
|
+
onChange: C,
|
|
111
|
+
onFocus: G,
|
|
112
|
+
onBlur: J,
|
|
113
|
+
...U
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
i === "password" && s && /* @__PURE__ */ e(
|
|
117
|
+
te,
|
|
118
|
+
{
|
|
119
|
+
icon: g ? /* @__PURE__ */ e(q, {}) : /* @__PURE__ */ e(ee, {}),
|
|
120
|
+
variant: "text",
|
|
121
|
+
className: n("eye-icon"),
|
|
122
|
+
onMouseDown: M,
|
|
123
|
+
onMouseLeave: c,
|
|
124
|
+
onMouseUp: c,
|
|
125
|
+
onTouchStart: M,
|
|
126
|
+
onTouchEnd: c,
|
|
127
|
+
onTouchCancel: c
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
p && !s && /* @__PURE__ */ o("span", { className: n("placeholder"), children: [
|
|
131
|
+
p,
|
|
132
|
+
z && !l && /* @__PURE__ */ e("span", { className: n("asterisk") })
|
|
133
|
+
] })
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ e(
|
|
136
|
+
oe,
|
|
137
|
+
{
|
|
138
|
+
className: n("max-length-display"),
|
|
139
|
+
value: s.length,
|
|
140
|
+
maxValue: H
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
h && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: h }) }),
|
|
144
|
+
k && s.length > 0 && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e(
|
|
145
|
+
"button",
|
|
146
|
+
{
|
|
147
|
+
type: "button",
|
|
148
|
+
className: n("clear-icon", { disabled: a }),
|
|
149
|
+
onClick: K,
|
|
150
|
+
onMouseDown: (t) => t.preventDefault(),
|
|
151
|
+
children: /* @__PURE__ */ e(ne, {})
|
|
152
|
+
}
|
|
153
|
+
) })
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
(S || u) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: a }), children: S ? /* @__PURE__ */ o(b, { children: [
|
|
158
|
+
/* @__PURE__ */ e("span", { className: n("text", "error-text"), children: r }),
|
|
159
|
+
L && D
|
|
160
|
+
] }) : u && D })
|
|
161
|
+
] });
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
export {
|
|
165
|
+
Se as F
|
|
166
|
+
};
|
package/dist/fieldText.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { F as o } from "./fieldText-
|
|
1
|
+
import { F as o } from "./fieldText-35421470.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
5
|
-
import "./
|
|
5
|
+
import "./openEye-7b9cf080.js";
|
|
6
|
+
import "./button-97d9e587.js";
|
|
7
|
+
import "./spinLoader-c4a53718.js";
|
|
8
|
+
import "./maxValueDisplay-9be01a75.js";
|
|
9
|
+
import "./fieldLabel.js";
|
|
6
10
|
export {
|
|
7
11
|
o as FieldText,
|
|
8
12
|
o as default
|