@reportportal/ui-kit 0.0.1-alpha.11 → 0.0.1-alpha.111
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 +28 -2
- package/dist/attachedFile.js +9 -0
- package/dist/autocompletes.js +694 -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/bubblesLoader-f3ffa240.js +28 -0
- package/dist/bubblesLoader.js +1 -1
- 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/chevronDownDropdown-66f5b1af.js +7 -0
- package/dist/close-4d480ef7.js +5 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/common/types.d.ts +4 -0
- package/dist/common/utils/getFileExtension.d.ts +1 -0
- package/dist/common/utils/index.d.ts +2 -0
- package/dist/common/utils/isString.d.ts +1 -0
- package/dist/components/attachedFile/attachedFile.d.ts +14 -0
- package/dist/components/attachedFile/index.d.ts +2 -0
- package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +9 -0
- package/dist/components/autocompletes/common/autocompleteMenu/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOption/autocompleteOption.d.ts +13 -0
- package/dist/components/autocompletes/common/autocompleteOption/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOptions.d.ts +19 -0
- package/dist/components/autocompletes/common/autocompletePrompt/autocompletePrompt.d.ts +7 -0
- package/dist/components/autocompletes/common/autocompletePrompt/index.d.ts +1 -0
- package/dist/components/autocompletes/common/index.d.ts +19 -0
- package/dist/components/autocompletes/constants.d.ts +2 -0
- package/dist/components/autocompletes/index.d.ts +3 -0
- package/dist/components/autocompletes/multipleAutocomplete/index.d.ts +17 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleAutocomplete.d.ts +46 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleDownshift.d.ts +25 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/index.d.ts +1 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/selectedItems.d.ts +35 -0
- package/dist/components/autocompletes/singleAutocomplete/index.d.ts +1 -0
- package/dist/components/autocompletes/singleAutocomplete/singleAutocomplete.d.ts +40 -0
- package/dist/components/autocompletes/types.d.ts +8 -0
- package/dist/components/autocompletes/utils.d.ts +5 -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 +2 -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 +2 -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 +14 -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 +5 -2
- package/dist/components/fieldTextFlex/index.d.ts +1 -0
- package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +21 -0
- package/dist/components/fileDropArea/attachedFilesList/index.d.ts +5 -0
- package/dist/components/fileDropArea/browseButton/browseButton.d.ts +9 -0
- package/dist/components/fileDropArea/browseButton/index.d.ts +4 -0
- package/dist/components/fileDropArea/constants.d.ts +2 -0
- package/dist/components/fileDropArea/dropZone/dropZone.d.ts +10 -0
- package/dist/components/fileDropArea/dropZone/index.d.ts +4 -0
- package/dist/components/fileDropArea/errorMessage/errorMessage.d.ts +5 -0
- package/dist/components/fileDropArea/errorMessage/index.d.ts +4 -0
- package/dist/components/fileDropArea/fileDropArea.d.ts +19 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/fileDropAreaProvider.d.ts +17 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/index.d.ts +1 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/useFileDropAreaContext.d.ts +3 -0
- package/dist/components/fileDropArea/hooks/index.d.ts +1 -0
- package/dist/components/fileDropArea/hooks/useFileDropArea.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useFileProcessing.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useOverlayDropArea.d.ts +22 -0
- package/dist/components/fileDropArea/index.d.ts +6 -0
- package/dist/components/fileDropArea/types.d.ts +58 -0
- package/dist/components/fileDropArea/utils/getValidationErrorMessage.d.ts +3 -0
- package/dist/components/fileDropArea/utils/index.d.ts +2 -0
- package/dist/components/fileDropArea/utils/validateFile.d.ts +3 -0
- package/dist/components/icons/index.d.ts +60 -7
- package/dist/components/index.d.ts +21 -9
- 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/index.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +7 -3
- package/dist/components/modal/modalContent/modalContent.d.ts +2 -0
- package/dist/components/modal/modalFooter/modalFooter.d.ts +3 -1
- package/dist/components/modal/modalHeader/modalHeader.d.ts +2 -1
- package/dist/components/modal/types.d.ts +6 -0
- 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 +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +1 -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/sidePanel/index.d.ts +2 -0
- package/dist/components/sidePanel/sidePanel.d.ts +17 -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 +22 -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 +5 -0
- package/dist/components/table/hooks/index.d.ts +4 -0
- package/dist/components/table/hooks/useColumnWidths.d.ts +8 -0
- package/dist/components/table/hooks/useTableColumns.d.ts +13 -0
- package/dist/components/table/hooks/useTableExpansion.d.ts +15 -0
- package/dist/components/table/hooks/useTableHover.d.ts +10 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/types.d.ts +24 -9
- package/dist/components/table/utils.d.ts +10 -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-efa4e2d6.js +194 -0
- package/dist/datePicker.js +27 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-ec754bbe.js +289 -0
- package/dist/dropdown.js +5 -2
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-d1b5a7a1.js +140 -0
- package/dist/fieldNumber.js +5 -2
- package/dist/fieldText-ba8a917c.js +165 -0
- package/dist/fieldText.js +6 -2
- package/dist/fieldTextFlex-2f51c173.js +80 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fileDropArea.js +325 -0
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +80 -0
- package/dist/index-1a874a8b.js +110 -0
- package/dist/index.js +140 -48
- package/dist/isEmpty-ccacb5ff.js +38 -0
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/minus-2857540f.js +5 -0
- package/dist/modal.js +153 -14
- package/dist/openEye-7b9cf080.js +7 -0
- package/dist/pagination-43330c73.js +347 -0
- package/dist/pagination.js +10 -5
- package/dist/plus-199fb2a8.js +5 -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/sidePanel.js +74 -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 +69 -0
- package/dist/systemMessage-924fdaa6.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-ea578f47.js +476 -0
- package/dist/table.js +3 -3
- 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/dist/xls-995781cc.js +11 -0
- package/package.json +47 -16
- package/dist/baseIconButton-7bc53dec.js +0 -25
- package/dist/bubblesLoader-a7e709d4.js +0 -17
- package/dist/button-7fb84fde.js +0 -62
- package/dist/checkbox-6777be17.js +0 -73
- 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-5449cd03.js +0 -346
- package/dist/radio-fd49a09c.js +0 -76
- package/dist/systemMessage-1ced6079.js +0 -30
- package/dist/table-231fd19c.js +0 -138
- package/dist/toggle-707ecb74.js +0 -67
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { jsxs as u, jsx as a, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ue, useState as z, useRef as fe, useCallback as ge } from "react";
|
|
3
|
+
import { c as Q } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useFloating as pe, offset as me, flip as ye } from "@floating-ui/react-dom";
|
|
5
|
+
import { useSelect as j } from "downshift";
|
|
6
|
+
import { Scrollbars as be } from "rc-scrollbars";
|
|
7
|
+
import { u as Ce } from "./useOnClickOutside-c332f7d3.js";
|
|
8
|
+
import { K as g } from "./keyCodes-f63c0e11.js";
|
|
9
|
+
import { B as ke } from "./baseIconButton-251479f7.js";
|
|
10
|
+
import { S as Oe } from "./dropdown-0260bb66.js";
|
|
11
|
+
import { FieldLabel as Ne } from "./fieldLabel.js";
|
|
12
|
+
import { C as De } from "./checkbox-ed6cc375.js";
|
|
13
|
+
const Ee = "_disabled_1etj7_12", we = "_hidden_1etj7_16", ve = "_hover_1etj7_22", Ke = "_selected_1etj7_34", Ae = {
|
|
14
|
+
"dropdown-option": "_dropdown-option_1etj7_1",
|
|
15
|
+
disabled: Ee,
|
|
16
|
+
hidden: we,
|
|
17
|
+
hover: ve,
|
|
18
|
+
selected: Ke,
|
|
19
|
+
"multi-select": "_multi-select_1etj7_34",
|
|
20
|
+
"single-option": "_single-option_1etj7_39",
|
|
21
|
+
"sub-option": "_sub-option_1etj7_46"
|
|
22
|
+
}, G = Q.bind(Ae), J = ue(
|
|
23
|
+
(n, t) => {
|
|
24
|
+
const {
|
|
25
|
+
option: { value: r, disabled: d, hidden: A, label: p, title: c, groupRef: i },
|
|
26
|
+
selected: y,
|
|
27
|
+
onChange: m,
|
|
28
|
+
render: b,
|
|
29
|
+
highlightHovered: C,
|
|
30
|
+
onMouseEnter: x,
|
|
31
|
+
multiSelect: h,
|
|
32
|
+
isPartiallyChecked: k = !1
|
|
33
|
+
} = n, I = (O) => {
|
|
34
|
+
(O.target instanceof HTMLDivElement || O.target instanceof HTMLInputElement) && (m == null || m(r));
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ u(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: G("dropdown-option", {
|
|
40
|
+
selected: y,
|
|
41
|
+
disabled: d,
|
|
42
|
+
hidden: A,
|
|
43
|
+
hover: C,
|
|
44
|
+
"multi-select": h
|
|
45
|
+
}),
|
|
46
|
+
title: c,
|
|
47
|
+
onClick: I,
|
|
48
|
+
ref: t,
|
|
49
|
+
onMouseEnter: x,
|
|
50
|
+
children: [
|
|
51
|
+
h && /* @__PURE__ */ a(De, { value: !!y, partiallyChecked: k }),
|
|
52
|
+
/* @__PURE__ */ a("div", { className: G("single-option", { "sub-option": !!i }), children: b ? b(n) : p })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
), xe = [
|
|
58
|
+
g.ENTER_KEY_CODE,
|
|
59
|
+
g.SPACE_KEY_CODE,
|
|
60
|
+
g.ARROW_DOWN_KEY_CODE
|
|
61
|
+
], Ie = [g.ESCAPE_KEY_CODE, g.TAB_KEY_CODE];
|
|
62
|
+
var f = /* @__PURE__ */ ((n) => (n.ON_KEY_DOWN = "onKeyDown", n.ON_CLICK = "onClick", n))(f || {});
|
|
63
|
+
const Pe = (n, t) => {
|
|
64
|
+
const r = Array.isArray(t) ? t : [t];
|
|
65
|
+
return n.findIndex(({ value: d }) => r.includes(d));
|
|
66
|
+
}, Ye = (n, t) => (n % t + t) % t, H = (n, t = 0, r = 1) => {
|
|
67
|
+
if (!n[t].disabled)
|
|
68
|
+
return t;
|
|
69
|
+
const d = n.length;
|
|
70
|
+
return H(
|
|
71
|
+
n,
|
|
72
|
+
Ye(t + r, d),
|
|
73
|
+
r
|
|
74
|
+
);
|
|
75
|
+
}, je = (n, t) => H(n, t), He = (n, t) => H(n, t, -1), Re = "_container_5enku_1", Te = "_icon_5enku_7", Me = "_arrow_5enku_13", We = "_dropdown_5enku_19", Le = "_disabled_5enku_36", Se = "_value_5enku_43", Ve = "_error_5enku_46", $e = "_touched_5enku_46", Ue = "_opened_5enku_50", qe = "_placeholder_5enku_83", ze = "_ghost_5enku_118", Ge = "_divider_5enku_139", Je = {
|
|
76
|
+
container: Re,
|
|
77
|
+
icon: Te,
|
|
78
|
+
arrow: Me,
|
|
79
|
+
dropdown: We,
|
|
80
|
+
"transparent-background": "_transparent-background_5enku_33",
|
|
81
|
+
disabled: Le,
|
|
82
|
+
value: Se,
|
|
83
|
+
error: Ve,
|
|
84
|
+
touched: $e,
|
|
85
|
+
opened: Ue,
|
|
86
|
+
placeholder: qe,
|
|
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: ze,
|
|
92
|
+
divider: Ge
|
|
93
|
+
}, o = Q.bind(Je), ot = ({
|
|
94
|
+
multiSelect: n = !1,
|
|
95
|
+
value: t = n ? [] : "",
|
|
96
|
+
options: r = [],
|
|
97
|
+
disabled: d = !1,
|
|
98
|
+
error: A,
|
|
99
|
+
onChange: p,
|
|
100
|
+
onFocus: c,
|
|
101
|
+
onBlur: i,
|
|
102
|
+
mobileDisabled: y,
|
|
103
|
+
title: m,
|
|
104
|
+
touched: b = !1,
|
|
105
|
+
icon: C,
|
|
106
|
+
variant: x,
|
|
107
|
+
placeholder: h = "",
|
|
108
|
+
label: k = "",
|
|
109
|
+
renderOption: I,
|
|
110
|
+
transparentBackground: O = !1,
|
|
111
|
+
className: X,
|
|
112
|
+
toggleButtonClassName: Z,
|
|
113
|
+
selectListClassName: B,
|
|
114
|
+
isListWidthLimited: F = !1,
|
|
115
|
+
optionAll: R = { value: "all", label: "All" },
|
|
116
|
+
isOptionAllVisible: T = !1,
|
|
117
|
+
onSelectAll: ee = () => {
|
|
118
|
+
},
|
|
119
|
+
formatDisplayedValue: M,
|
|
120
|
+
notScrollable: te = !1,
|
|
121
|
+
footer: N
|
|
122
|
+
}) => {
|
|
123
|
+
const [_, D] = z(!1), W = fe(null), [ne, E] = z(null), P = n && Array.isArray(t) ? r.filter((e) => t.includes(e.value)) : null, { refs: L, floatingStyles: re } = pe({
|
|
124
|
+
placement: "bottom-start",
|
|
125
|
+
middleware: [
|
|
126
|
+
me(5),
|
|
127
|
+
ye({
|
|
128
|
+
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"]
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
}), se = () => {
|
|
132
|
+
if (T && Array.isArray(t)) {
|
|
133
|
+
const e = r.map((s) => s.value);
|
|
134
|
+
p(t.length === r.length ? [] : e), ee();
|
|
135
|
+
}
|
|
136
|
+
}, w = ge(() => {
|
|
137
|
+
D(!1), i == null || i();
|
|
138
|
+
}, [i]);
|
|
139
|
+
Ce(W, () => {
|
|
140
|
+
_ && w();
|
|
141
|
+
});
|
|
142
|
+
const S = (e) => {
|
|
143
|
+
if (!e.disabled) {
|
|
144
|
+
if (n) {
|
|
145
|
+
const s = Array.isArray(t) ? [...t] : [], l = s.indexOf(e.value);
|
|
146
|
+
l === -1 ? s.push(e.value) : s.splice(l, 1), p(s);
|
|
147
|
+
} else
|
|
148
|
+
p(e.value);
|
|
149
|
+
D((s) => n || !s);
|
|
150
|
+
}
|
|
151
|
+
}, ae = () => r.find(({ value: e }) => e === t), V = Pe(r, t), {
|
|
152
|
+
getToggleButtonProps: le,
|
|
153
|
+
getLabelProps: de,
|
|
154
|
+
getMenuProps: ie,
|
|
155
|
+
getItemProps: oe,
|
|
156
|
+
setHighlightedIndex: v,
|
|
157
|
+
highlightedIndex: $,
|
|
158
|
+
selectedItem: K
|
|
159
|
+
} = j({
|
|
160
|
+
items: r,
|
|
161
|
+
itemToString: (e) => (e != null && e.label ? String(e.label) : h) || "",
|
|
162
|
+
selectedItem: ae(),
|
|
163
|
+
isOpen: _,
|
|
164
|
+
circularNavigation: !0,
|
|
165
|
+
defaultHighlightedIndex: V,
|
|
166
|
+
onHighlightedIndexChange: (e) => {
|
|
167
|
+
switch (e.type) {
|
|
168
|
+
case j.stateChangeTypes.MenuKeyDownArrowUp:
|
|
169
|
+
return E(f.ON_KEY_DOWN), v(He(r, e.highlightedIndex)), e;
|
|
170
|
+
case j.stateChangeTypes.MenuKeyDownArrowDown:
|
|
171
|
+
return E(f.ON_KEY_DOWN), v(je(r, e.highlightedIndex)), e;
|
|
172
|
+
default:
|
|
173
|
+
return e;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}), ce = () => {
|
|
177
|
+
d || (D((e) => !e), _ ? i == null || i() : c == null || c(), E(f.ON_CLICK));
|
|
178
|
+
}, Y = (() => {
|
|
179
|
+
if (n && Array.isArray(t) && r.length === t.length)
|
|
180
|
+
return R.label;
|
|
181
|
+
const e = r.reduce((s, l) => ((Array.isArray(t) && t.includes(l.value) || l.value === t) && s.push(l.label), s), []);
|
|
182
|
+
if (e.length > 0)
|
|
183
|
+
return e.join(", ");
|
|
184
|
+
if (!t && t !== !1 && t !== 0 || Array.isArray(t) && !t.length)
|
|
185
|
+
return h;
|
|
186
|
+
})(), _e = (e) => {
|
|
187
|
+
const { keyCode: s } = e;
|
|
188
|
+
xe.includes(s) && !_ && (e.preventDefault(), v(V), D(!0), c == null || c(), E(f.ON_KEY_DOWN));
|
|
189
|
+
}, he = (e) => {
|
|
190
|
+
const { keyCode: s } = e;
|
|
191
|
+
if (s === g.ENTER_KEY_CODE) {
|
|
192
|
+
const l = r[$];
|
|
193
|
+
S(l), n || w();
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
Ie.includes(s) && (e.stopPropagation(), w());
|
|
197
|
+
}, U = () => /* @__PURE__ */ u("div", { className: o("options-container"), children: [
|
|
198
|
+
n && T && Array.isArray(t) && /* @__PURE__ */ u(q, { children: [
|
|
199
|
+
/* @__PURE__ */ a(
|
|
200
|
+
J,
|
|
201
|
+
{
|
|
202
|
+
option: R,
|
|
203
|
+
selected: t.length === r.length,
|
|
204
|
+
onChange: se,
|
|
205
|
+
multiSelect: n,
|
|
206
|
+
isPartiallyChecked: !!t.length
|
|
207
|
+
}
|
|
208
|
+
),
|
|
209
|
+
/* @__PURE__ */ a("div", { className: o("divider") }),
|
|
210
|
+
" "
|
|
211
|
+
] }),
|
|
212
|
+
r.map((e, s) => /* @__PURE__ */ a(
|
|
213
|
+
J,
|
|
214
|
+
{
|
|
215
|
+
...oe({
|
|
216
|
+
item: e,
|
|
217
|
+
index: s
|
|
218
|
+
}),
|
|
219
|
+
multiSelect: n,
|
|
220
|
+
selected: n ? P == null ? void 0 : P.some((l) => l.value === e.value) : e.value === ((K == null ? void 0 : K.value) ?? K),
|
|
221
|
+
option: { title: e.label, ...e },
|
|
222
|
+
highlightHovered: $ === s && ne !== f.ON_CLICK,
|
|
223
|
+
render: I,
|
|
224
|
+
onChange: e.disabled ? null : () => S(e),
|
|
225
|
+
onMouseEnter: () => v(s)
|
|
226
|
+
},
|
|
227
|
+
e.value
|
|
228
|
+
)),
|
|
229
|
+
N && /* @__PURE__ */ u(q, { children: [
|
|
230
|
+
/* @__PURE__ */ a("div", { className: o("divider") }),
|
|
231
|
+
typeof N == "function" ? N(w) : N
|
|
232
|
+
] })
|
|
233
|
+
] });
|
|
234
|
+
return /* @__PURE__ */ u("div", { ref: W, className: o("container", X), title: m, children: [
|
|
235
|
+
k && /* @__PURE__ */ a(Ne, { ...de(), children: k }),
|
|
236
|
+
/* @__PURE__ */ u(
|
|
237
|
+
"button",
|
|
238
|
+
{
|
|
239
|
+
disabled: d,
|
|
240
|
+
...le({
|
|
241
|
+
className: o("dropdown", x, Z, {
|
|
242
|
+
"transparent-background": O,
|
|
243
|
+
opened: _,
|
|
244
|
+
disabled: d,
|
|
245
|
+
error: A,
|
|
246
|
+
touched: b,
|
|
247
|
+
"mobile-disabled": y
|
|
248
|
+
}),
|
|
249
|
+
onClick: ce,
|
|
250
|
+
onKeyDown: _e,
|
|
251
|
+
ref: L.setReference
|
|
252
|
+
}),
|
|
253
|
+
type: "button",
|
|
254
|
+
children: [
|
|
255
|
+
C && /* @__PURE__ */ a("span", { className: o("icon"), children: C }),
|
|
256
|
+
/* @__PURE__ */ a(
|
|
257
|
+
"span",
|
|
258
|
+
{
|
|
259
|
+
className: o("value", {
|
|
260
|
+
placeholder: Y === h
|
|
261
|
+
}),
|
|
262
|
+
children: M ? M(Y) : Y
|
|
263
|
+
}
|
|
264
|
+
),
|
|
265
|
+
/* @__PURE__ */ a(ke, { className: o("arrow"), tabIndex: -1, children: /* @__PURE__ */ a(Oe, {}) })
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
),
|
|
269
|
+
_ && /* @__PURE__ */ a(
|
|
270
|
+
"div",
|
|
271
|
+
{
|
|
272
|
+
style: re,
|
|
273
|
+
className: o(
|
|
274
|
+
"select-list",
|
|
275
|
+
{ opened: _, "limited-width": F },
|
|
276
|
+
B
|
|
277
|
+
),
|
|
278
|
+
...ie({
|
|
279
|
+
onKeyDown: he,
|
|
280
|
+
ref: L.setFloating
|
|
281
|
+
}),
|
|
282
|
+
children: te ? U() : /* @__PURE__ */ a(be, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: U() })
|
|
283
|
+
}
|
|
284
|
+
)
|
|
285
|
+
] });
|
|
286
|
+
};
|
|
287
|
+
export {
|
|
288
|
+
ot as D
|
|
289
|
+
};
|
package/dist/dropdown.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as r } from "./dropdown-
|
|
1
|
+
import { D as r } from "./dropdown-ec754bbe.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,140 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as W, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as y, useId as B, useMemo as F } from "react";
|
|
3
|
+
import { c as w } 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 V } from "./minus-2857540f.js";
|
|
7
|
+
import { S as k } from "./plus-199fb2a8.js";
|
|
8
|
+
import { FieldLabel as H } from "./fieldLabel.js";
|
|
9
|
+
const P = 5, N = 16, j = [
|
|
10
|
+
_.TAB_KEY_CODE,
|
|
11
|
+
_.BACKSPACE_KEY_CODE,
|
|
12
|
+
_.ARROW_LEFT_KEY_CODE,
|
|
13
|
+
_.ARROW_UP_KEY_CODE,
|
|
14
|
+
_.ARROW_RIGHT_KEY_CODE,
|
|
15
|
+
_.ARROW_DOWN_KEY_CODE,
|
|
16
|
+
_.DELETE_KEY_CODE,
|
|
17
|
+
_.NUM_LOCK_0_KEY_CODE,
|
|
18
|
+
_.NUM_LOCK_1_KEY_CODE,
|
|
19
|
+
_.NUM_LOCK_2_KEY_CODE,
|
|
20
|
+
_.NUM_LOCK_3_KEY_CODE,
|
|
21
|
+
_.NUM_LOCK_4_KEY_CODE,
|
|
22
|
+
_.NUM_LOCK_5_KEY_CODE,
|
|
23
|
+
_.NUM_LOCK_6_KEY_CODE,
|
|
24
|
+
_.NUM_LOCK_7_KEY_CODE,
|
|
25
|
+
_.NUM_LOCK_8_KEY_CODE,
|
|
26
|
+
_.NUM_LOCK_9_KEY_CODE
|
|
27
|
+
], z = "_sign_3v3h5_7", G = "_error_3v3h5_22", X = "_disabled_3v3h5_27", $ = "_input_3v3h5_12", b = {
|
|
28
|
+
"field-number": "_field-number_3v3h5_1",
|
|
29
|
+
sign: z,
|
|
30
|
+
"input-container": "_input-container_3v3h5_12",
|
|
31
|
+
error: G,
|
|
32
|
+
disabled: X,
|
|
33
|
+
"input-field": "_input-field_3v3h5_38",
|
|
34
|
+
input: $,
|
|
35
|
+
"additional-content": "_additional-content_3v3h5_84",
|
|
36
|
+
"error-text": "_error-text_3v3h5_88"
|
|
37
|
+
}, c = w.bind(b), tn = ({
|
|
38
|
+
value: i = "",
|
|
39
|
+
placeholder: Y = "0",
|
|
40
|
+
disabled: t = !1,
|
|
41
|
+
onChange: s,
|
|
42
|
+
onFocus: d,
|
|
43
|
+
onBlur: O,
|
|
44
|
+
label: h,
|
|
45
|
+
postfix: o = "",
|
|
46
|
+
min: l = 0,
|
|
47
|
+
max: E = Number.MAX_SAFE_INTEGER,
|
|
48
|
+
title: L,
|
|
49
|
+
error: C,
|
|
50
|
+
id: D,
|
|
51
|
+
...M
|
|
52
|
+
}) => {
|
|
53
|
+
const u = y(null), m = B(), R = (n) => n < l ? l : n > E ? E : n, U = (n) => {
|
|
54
|
+
let e = n.target.value.replace(/^0(?=\d+|^\d)/g, "");
|
|
55
|
+
if (e === "") {
|
|
56
|
+
s("");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
e = +e, s(e);
|
|
60
|
+
}, A = (n) => {
|
|
61
|
+
const e = +n.currentTarget.value, f = R(e);
|
|
62
|
+
f !== e && s(f), O && O(n);
|
|
63
|
+
}, g = (n) => {
|
|
64
|
+
const { keyCode: e } = n;
|
|
65
|
+
j.includes(e) || (e < _.NUMBER_START_KEY_CODE || e > _.NUMBER_END_KEY_CODE || n.shiftKey) && n.preventDefault();
|
|
66
|
+
}, T = () => {
|
|
67
|
+
const n = +i - 1;
|
|
68
|
+
n >= l && n <= E && s(n);
|
|
69
|
+
}, v = () => {
|
|
70
|
+
const n = +i + 1;
|
|
71
|
+
n >= l && n <= E && s(n);
|
|
72
|
+
}, K = Y + o, I = F(() => {
|
|
73
|
+
let n = (String(i) || K).length;
|
|
74
|
+
return o && !i && (n += 1), n > N ? `${N}ch` : `${n || P}ch`;
|
|
75
|
+
}, [K, o, i]), S = () => {
|
|
76
|
+
u && u.current && u.current.focus(), d && d();
|
|
77
|
+
};
|
|
78
|
+
return /* @__PURE__ */ a(W, { children: [
|
|
79
|
+
/* @__PURE__ */ a("div", { className: c("field-number", { disabled: t }), children: [
|
|
80
|
+
h && /* @__PURE__ */ r(H, { htmlFor: D ?? m, children: h }),
|
|
81
|
+
/* @__PURE__ */ a(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: c("input-container", {
|
|
85
|
+
error: C,
|
|
86
|
+
disabled: t
|
|
87
|
+
}),
|
|
88
|
+
title: L,
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ r(
|
|
91
|
+
p,
|
|
92
|
+
{
|
|
93
|
+
className: c("sign", "minus"),
|
|
94
|
+
disabled: t,
|
|
95
|
+
onClick: T,
|
|
96
|
+
children: /* @__PURE__ */ r(V, {})
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ a("span", { className: c("input-field", { disabled: t }), onClick: S, children: [
|
|
100
|
+
/* @__PURE__ */ r(
|
|
101
|
+
"input",
|
|
102
|
+
{
|
|
103
|
+
id: D ?? m,
|
|
104
|
+
ref: u,
|
|
105
|
+
className: c("input"),
|
|
106
|
+
type: "number",
|
|
107
|
+
value: i,
|
|
108
|
+
placeholder: K,
|
|
109
|
+
disabled: t,
|
|
110
|
+
min: l,
|
|
111
|
+
max: E,
|
|
112
|
+
onKeyDown: t ? void 0 : g,
|
|
113
|
+
onChange: t ? void 0 : U,
|
|
114
|
+
onFocus: t ? void 0 : d,
|
|
115
|
+
onBlur: t ? void 0 : A,
|
|
116
|
+
style: { width: I },
|
|
117
|
+
...M
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
!!o && (i === 0 || !!i) && /* @__PURE__ */ r("span", { children: o.slice(0, 1) })
|
|
121
|
+
] }),
|
|
122
|
+
/* @__PURE__ */ r(
|
|
123
|
+
p,
|
|
124
|
+
{
|
|
125
|
+
className: c("sign", "plus"),
|
|
126
|
+
disabled: t,
|
|
127
|
+
onClick: v,
|
|
128
|
+
children: /* @__PURE__ */ r(k, {})
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
] }),
|
|
135
|
+
C && /* @__PURE__ */ r("div", { className: c("additional-content"), children: /* @__PURE__ */ r("span", { className: c("error-text"), children: C }) })
|
|
136
|
+
] });
|
|
137
|
+
};
|
|
138
|
+
export {
|
|
139
|
+
tn as F
|
|
140
|
+
};
|
package/dist/fieldNumber.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { F as m } from "./fieldNumber-
|
|
1
|
+
import { F as m } from "./fieldNumber-d1b5a7a1.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 "./minus-2857540f.js";
|
|
8
|
+
import "./plus-199fb2a8.js";
|
|
9
|
+
import "./fieldLabel.js";
|
|
7
10
|
export {
|
|
8
11
|
m as FieldNumber,
|
|
9
12
|
m as default
|
|
@@ -0,0 +1,165 @@
|
|
|
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 B } 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 "./baseIconButton-251479f7.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: v,
|
|
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: I = !1,
|
|
52
|
+
type: i = "text",
|
|
53
|
+
displayError: L = !0,
|
|
54
|
+
collapsible: P = !1,
|
|
55
|
+
loading: R = !1,
|
|
56
|
+
maxLengthDisplay: j,
|
|
57
|
+
onFocus: H = () => {
|
|
58
|
+
},
|
|
59
|
+
onBlur: O = () => {
|
|
60
|
+
},
|
|
61
|
+
...U
|
|
62
|
+
}, $) => {
|
|
63
|
+
const A = X(null), d = $ || A, w = Y(), [N, y] = B(!1), [g, F] = B(!1), G = (t) => {
|
|
64
|
+
y(!0), H(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 = L && r && f, D = /* @__PURE__ */ e("span", { className: n("text", "help-text", v), 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: P && !N && !s
|
|
86
|
+
}),
|
|
87
|
+
title: T,
|
|
88
|
+
children: [
|
|
89
|
+
R ? /* @__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
|
+
className: n("eye-icon"),
|
|
120
|
+
onMouseDown: M,
|
|
121
|
+
onMouseLeave: c,
|
|
122
|
+
onMouseUp: c,
|
|
123
|
+
onTouchStart: M,
|
|
124
|
+
onTouchEnd: c,
|
|
125
|
+
onTouchCancel: c,
|
|
126
|
+
children: g ? /* @__PURE__ */ e(q, {}) : /* @__PURE__ */ e(ee, {})
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
p && !s && /* @__PURE__ */ o("span", { className: n("placeholder"), children: [
|
|
130
|
+
p,
|
|
131
|
+
z && !l && /* @__PURE__ */ e("span", { className: n("asterisk") })
|
|
132
|
+
] })
|
|
133
|
+
] }),
|
|
134
|
+
/* @__PURE__ */ e(
|
|
135
|
+
oe,
|
|
136
|
+
{
|
|
137
|
+
className: n("max-length-display"),
|
|
138
|
+
value: s.length,
|
|
139
|
+
maxValue: j
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
h && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: h }) }),
|
|
143
|
+
k && s.length > 0 && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e(
|
|
144
|
+
"button",
|
|
145
|
+
{
|
|
146
|
+
type: "button",
|
|
147
|
+
className: n("clear-icon", { disabled: a }),
|
|
148
|
+
onClick: K,
|
|
149
|
+
onMouseDown: (t) => t.preventDefault(),
|
|
150
|
+
children: /* @__PURE__ */ e(ne, {})
|
|
151
|
+
}
|
|
152
|
+
) })
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
(S || u) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: a }), children: S ? /* @__PURE__ */ o(b, { children: [
|
|
157
|
+
/* @__PURE__ */ e("span", { className: n("text", "error-text"), children: r }),
|
|
158
|
+
I && D
|
|
159
|
+
] }) : u && D })
|
|
160
|
+
] });
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
export {
|
|
164
|
+
Se as F
|
|
165
|
+
};
|
package/dist/fieldText.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { F as o } from "./fieldText-
|
|
1
|
+
import { F as o } from "./fieldText-ba8a917c.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 "./baseIconButton-251479f7.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
|