@reportportal/ui-kit 0.0.1-alpha.12 → 0.0.1-alpha.121
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 +729 -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 +12 -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/clear-53660571.js +5 -0
- package/dist/close-4d480ef7.js +5 -0
- package/dist/common/constants/floatingUi.d.ts +8 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
- package/dist/common/types.d.ts +4 -0
- package/dist/common/utils/floatingUi.d.ts +3 -0
- package/dist/common/utils/getFileExtension.d.ts +1 -0
- package/dist/common/utils/index.d.ts +3 -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 +10 -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 +49 -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 +42 -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 +2 -0
- package/dist/components/dropdown/dropdown.d.ts +25 -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 +11 -0
- package/dist/components/dropdown/utils.d.ts +6 -2
- 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 +63 -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 +25 -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-fcff097b.js +194 -0
- package/dist/datePicker.js +32 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-e85dd323.js +436 -0
- package/dist/dropdown.js +10 -2
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-d1b5a7a1.js +140 -0
- package/dist/fieldNumber.js +5 -2
- package/dist/fieldText-2c4790e1.js +167 -0
- package/dist/fieldText.js +7 -2
- package/dist/fieldTextFlex-2f51c173.js +80 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fileDropArea.js +325 -0
- package/dist/floatingUi-41f8c7b5.js +29 -0
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +84 -0
- package/dist/index-1a874a8b.js +110 -0
- package/dist/index.js +147 -50
- 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 +154 -14
- package/dist/openEye-950159cb.js +6 -0
- package/dist/pagination-5cc0ebdd.js +347 -0
- package/dist/pagination.js +12 -5
- package/dist/plus-199fb2a8.js +5 -0
- package/dist/popover.js +58 -73
- 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-8e223d5d.js +485 -0
- package/dist/table.js +3 -3
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +89 -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,436 @@
|
|
|
1
|
+
import { jsxs as D, jsx as l, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Je, useState as oe, useRef as P, useMemo as y, useCallback as x, useLayoutEffect as Qe, useEffect as Oe } from "react";
|
|
3
|
+
import { c as be } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useFloating as Ze, offset as er, flip as rr } from "@floating-ui/react-dom";
|
|
5
|
+
import { useSelect as le } from "downshift";
|
|
6
|
+
import { Scrollbars as tr } from "rc-scrollbars";
|
|
7
|
+
import { u as nr } from "./useOnClickOutside-c332f7d3.js";
|
|
8
|
+
import { K as w } from "./keyCodes-f63c0e11.js";
|
|
9
|
+
import { B as sr } from "./baseIconButton-251479f7.js";
|
|
10
|
+
import { S as ar } from "./clear-53660571.js";
|
|
11
|
+
import { S as or } from "./dropdown-0260bb66.js";
|
|
12
|
+
import { Tooltip as lr } from "./tooltip.js";
|
|
13
|
+
import { FieldLabel as cr } from "./fieldLabel.js";
|
|
14
|
+
import { C as dr } from "./checkbox-ed6cc375.js";
|
|
15
|
+
const ir = "_disabled_14s7v_12", ur = "_hidden_14s7v_16", hr = "_hover_14s7v_22", fr = "_selected_14s7v_38", _r = {
|
|
16
|
+
"dropdown-option": "_dropdown-option_14s7v_1",
|
|
17
|
+
disabled: ir,
|
|
18
|
+
hidden: ur,
|
|
19
|
+
hover: hr,
|
|
20
|
+
"depth-1": "_depth-1_14s7v_32",
|
|
21
|
+
selected: fr,
|
|
22
|
+
"multi-select": "_multi-select_14s7v_38",
|
|
23
|
+
"single-option": "_single-option_14s7v_43",
|
|
24
|
+
"sub-option": "_sub-option_14s7v_50"
|
|
25
|
+
}, ve = be.bind(_r), Ne = Je(
|
|
26
|
+
(t, r) => {
|
|
27
|
+
const {
|
|
28
|
+
option: { value: a, disabled: s, hidden: d, label: f, title: m, groupRef: p },
|
|
29
|
+
selected: R,
|
|
30
|
+
onChange: K,
|
|
31
|
+
render: V,
|
|
32
|
+
highlightHovered: L,
|
|
33
|
+
onMouseEnter: J,
|
|
34
|
+
multiSelect: C,
|
|
35
|
+
isPartiallyChecked: H = !1,
|
|
36
|
+
depth: Y = 0,
|
|
37
|
+
hasChildren: Q = !1
|
|
38
|
+
} = t, Z = (M) => {
|
|
39
|
+
(M.target instanceof HTMLDivElement || M.target instanceof HTMLInputElement) && (K == null || K(a));
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ D(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: ve("dropdown-option", {
|
|
45
|
+
selected: R,
|
|
46
|
+
disabled: s,
|
|
47
|
+
hidden: d,
|
|
48
|
+
hover: L,
|
|
49
|
+
"multi-select": C,
|
|
50
|
+
"has-children": Q,
|
|
51
|
+
[`depth-${Y}`]: Y > 0
|
|
52
|
+
}),
|
|
53
|
+
title: m,
|
|
54
|
+
onClick: Z,
|
|
55
|
+
ref: r,
|
|
56
|
+
onMouseEnter: J,
|
|
57
|
+
children: [
|
|
58
|
+
C && /* @__PURE__ */ l(dr, { value: !!R, partiallyChecked: H }),
|
|
59
|
+
/* @__PURE__ */ l(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: ve("single-option", {
|
|
63
|
+
"sub-option": !!p
|
|
64
|
+
}),
|
|
65
|
+
children: V ? V(t) : f
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
), pr = [
|
|
73
|
+
w.ENTER_KEY_CODE,
|
|
74
|
+
w.SPACE_KEY_CODE,
|
|
75
|
+
w.ARROW_DOWN_KEY_CODE
|
|
76
|
+
], gr = [w.ESCAPE_KEY_CODE, w.TAB_KEY_CODE];
|
|
77
|
+
var A = /* @__PURE__ */ ((t) => (t.ON_KEY_DOWN = "onKeyDown", t.ON_CLICK = "onClick", t))(A || {});
|
|
78
|
+
const wr = 216, mr = (t, r) => {
|
|
79
|
+
const a = Array.isArray(r) ? r : [r];
|
|
80
|
+
return t.findIndex(({ value: s }) => a.includes(s));
|
|
81
|
+
}, yr = (t, r) => (t % r + r) % r, ce = (t, r = 0, a = 1) => {
|
|
82
|
+
var d;
|
|
83
|
+
if (t.length === 0)
|
|
84
|
+
return 0;
|
|
85
|
+
if (!((d = t[r]) != null && d.disabled))
|
|
86
|
+
return r;
|
|
87
|
+
const s = t.length;
|
|
88
|
+
return ce(
|
|
89
|
+
t,
|
|
90
|
+
yr(r + a, s),
|
|
91
|
+
a
|
|
92
|
+
);
|
|
93
|
+
}, Cr = (t, r) => ce(t, r), Er = (t, r) => ce(t, r, -1), De = (t, r = 0, a) => !t || t.length === 0 ? [] : t.reduce((s, d) => {
|
|
94
|
+
var f;
|
|
95
|
+
return d && (s.push({ option: d, depth: r, parent: a }), (f = d.children) != null && f.length && s.push(...De(d.children, r + 1, d))), s;
|
|
96
|
+
}, []), Ae = (t) => !t || t.length === 0 ? [] : t.reduce((r, a) => {
|
|
97
|
+
var s;
|
|
98
|
+
return a && ((s = a.children) != null && s.length ? r.push(...Ae(a.children)) : r.push(a)), r;
|
|
99
|
+
}, []), Ke = (t) => {
|
|
100
|
+
var r;
|
|
101
|
+
return t ? (r = t.children) != null && r.length ? t.children.reduce((a, s) => (s && a.push(...Ke(s)), a), []) : [t.value] : [];
|
|
102
|
+
}, Or = "_container_owe49_1", vr = "_icon_owe49_7", Nr = "_arrow_owe49_13", br = "_dropdown_owe49_27", Dr = "_disabled_owe49_44", Ar = "_value_owe49_51", Kr = "_error_owe49_54", Ir = "_touched_owe49_54", Tr = "_opened_owe49_58", kr = "_placeholder_owe49_93", Pr = "_ghost_owe49_139", xr = "_divider_owe49_160", Rr = {
|
|
103
|
+
container: Or,
|
|
104
|
+
icon: vr,
|
|
105
|
+
arrow: Nr,
|
|
106
|
+
"clear-button": "_clear-button_owe49_19",
|
|
107
|
+
dropdown: br,
|
|
108
|
+
"transparent-background": "_transparent-background_owe49_41",
|
|
109
|
+
disabled: Dr,
|
|
110
|
+
value: Ar,
|
|
111
|
+
error: Kr,
|
|
112
|
+
touched: Ir,
|
|
113
|
+
opened: Tr,
|
|
114
|
+
placeholder: kr,
|
|
115
|
+
"mobile-disabled": "_mobile-disabled_owe49_97",
|
|
116
|
+
"value-wrapper": "_value-wrapper_owe49_102",
|
|
117
|
+
"value-tooltip": "_value-tooltip_owe49_108",
|
|
118
|
+
"select-list": "_select-list_owe49_113",
|
|
119
|
+
"limited-width": "_limited-width_owe49_130",
|
|
120
|
+
"options-container": "_options-container_owe49_134",
|
|
121
|
+
ghost: Pr,
|
|
122
|
+
divider: xr
|
|
123
|
+
}, i = be.bind(Rr), Jr = ({
|
|
124
|
+
multiSelect: t = !1,
|
|
125
|
+
value: r = t ? [] : "",
|
|
126
|
+
options: a = [],
|
|
127
|
+
disabled: s = !1,
|
|
128
|
+
error: d,
|
|
129
|
+
onChange: f,
|
|
130
|
+
onFocus: m,
|
|
131
|
+
onBlur: p,
|
|
132
|
+
mobileDisabled: R,
|
|
133
|
+
title: K,
|
|
134
|
+
touched: V = !1,
|
|
135
|
+
icon: L,
|
|
136
|
+
variant: J,
|
|
137
|
+
placeholder: C = "",
|
|
138
|
+
label: H = "",
|
|
139
|
+
renderOption: Y,
|
|
140
|
+
transparentBackground: Q = !1,
|
|
141
|
+
className: Z,
|
|
142
|
+
toggleButtonClassName: M,
|
|
143
|
+
selectListClassName: Ie,
|
|
144
|
+
isListWidthLimited: Te = !1,
|
|
145
|
+
optionAll: ee = { value: "all", label: "All" },
|
|
146
|
+
isOptionAllVisible: de = !1,
|
|
147
|
+
onSelectAll: ke = () => {
|
|
148
|
+
},
|
|
149
|
+
formatDisplayedValue: ie,
|
|
150
|
+
notScrollable: I = !1,
|
|
151
|
+
footer: W,
|
|
152
|
+
includeGroupValue: ue = !1,
|
|
153
|
+
clearable: Pe = !1,
|
|
154
|
+
onClear: he = () => {
|
|
155
|
+
},
|
|
156
|
+
clearButtonAriaLabel: xe = "Clear selection"
|
|
157
|
+
}) => {
|
|
158
|
+
const [u, S] = oe(!1), fe = P(null), T = P(null), re = P(0), te = P(null), [Re, _e] = oe(!1), [Ve, $] = oe(null), E = P(null), k = y(() => De(a), [a]), _ = y(
|
|
159
|
+
() => k.map(({ option: e }) => e),
|
|
160
|
+
[k]
|
|
161
|
+
), j = y(() => k.filter(({ option: e }) => {
|
|
162
|
+
var n;
|
|
163
|
+
return (n = e.children) == null ? void 0 : n.length;
|
|
164
|
+
}).map(({ option: e }) => e), [k]), pe = y(() => Ae(a), [a]), g = y(
|
|
165
|
+
() => pe.map(({ value: e }) => e),
|
|
166
|
+
[pe]
|
|
167
|
+
), z = y(() => {
|
|
168
|
+
const e = /* @__PURE__ */ new Map();
|
|
169
|
+
return j.forEach((n) => {
|
|
170
|
+
e.set(n.value, Ke(n));
|
|
171
|
+
}), e;
|
|
172
|
+
}, [j]), q = x(
|
|
173
|
+
(e) => (j.forEach((n) => {
|
|
174
|
+
const o = z.get(n.value) ?? [], c = o.length > 0 && o.every((h) => e.has(h));
|
|
175
|
+
ue && c ? e.add(n.value) : e.delete(n.value);
|
|
176
|
+
}), e),
|
|
177
|
+
[j, ue, z]
|
|
178
|
+
), O = y(() => !t || !Array.isArray(r) ? /* @__PURE__ */ new Set() : q(new Set(r)), [t, r, q]), ge = t ? Array.isArray(r) && r.length > 0 : r || r === !1 || r === 0, Le = Pe && ge && !s, He = x((e) => {
|
|
179
|
+
re.current = e.scrollTop;
|
|
180
|
+
}, []);
|
|
181
|
+
Qe(() => {
|
|
182
|
+
u && !I && T.current && !(t && E.current !== null) && T.current.scrollTop(re.current);
|
|
183
|
+
}, [u, I, r, t]);
|
|
184
|
+
const { refs: B, floatingStyles: Ye } = Ze({
|
|
185
|
+
placement: "bottom-start",
|
|
186
|
+
middleware: [
|
|
187
|
+
er(5),
|
|
188
|
+
rr({
|
|
189
|
+
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"]
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
}), Me = () => {
|
|
193
|
+
if (!de)
|
|
194
|
+
return;
|
|
195
|
+
const e = Array.isArray(r) ? r : [], n = new Set(e), o = g.some((h) => !n.has(h));
|
|
196
|
+
g.forEach((h) => {
|
|
197
|
+
o ? n.add(h) : n.delete(h);
|
|
198
|
+
});
|
|
199
|
+
const c = q(n);
|
|
200
|
+
f(Array.from(c)), ke();
|
|
201
|
+
}, N = x(() => {
|
|
202
|
+
S(!1), p == null || p();
|
|
203
|
+
}, [p]), ne = x(() => {
|
|
204
|
+
if (s)
|
|
205
|
+
return;
|
|
206
|
+
f(t ? [] : ""), he(), N(), requestAnimationFrame(() => {
|
|
207
|
+
const n = B.reference.current;
|
|
208
|
+
n && n instanceof HTMLElement && n.focus();
|
|
209
|
+
});
|
|
210
|
+
}, [s, t, f, he, N, B]), We = x(
|
|
211
|
+
(e) => {
|
|
212
|
+
e.preventDefault(), e.stopPropagation(), ne();
|
|
213
|
+
},
|
|
214
|
+
[ne]
|
|
215
|
+
);
|
|
216
|
+
nr(fe, () => {
|
|
217
|
+
u && N();
|
|
218
|
+
});
|
|
219
|
+
const we = (e) => {
|
|
220
|
+
var n;
|
|
221
|
+
if (!e.disabled) {
|
|
222
|
+
if (t) {
|
|
223
|
+
const o = Array.isArray(r) ? r : [], c = new Set(o);
|
|
224
|
+
if ((n = e.children) != null && n.length) {
|
|
225
|
+
const F = z.get(e.value) ?? [], G = F.some((v) => !c.has(v));
|
|
226
|
+
F.forEach((v) => {
|
|
227
|
+
G ? c.add(v) : c.delete(v);
|
|
228
|
+
});
|
|
229
|
+
} else
|
|
230
|
+
c.has(e.value) ? c.delete(e.value) : c.add(e.value);
|
|
231
|
+
const h = q(c);
|
|
232
|
+
f(Array.from(h));
|
|
233
|
+
} else
|
|
234
|
+
f(e.value);
|
|
235
|
+
S((o) => t || !o);
|
|
236
|
+
}
|
|
237
|
+
}, Se = () => _.find(({ value: e }) => e === r), me = mr(_, r), {
|
|
238
|
+
getToggleButtonProps: $e,
|
|
239
|
+
getLabelProps: je,
|
|
240
|
+
getMenuProps: ze,
|
|
241
|
+
getItemProps: qe,
|
|
242
|
+
setHighlightedIndex: b,
|
|
243
|
+
highlightedIndex: se,
|
|
244
|
+
selectedItem: U
|
|
245
|
+
} = le({
|
|
246
|
+
items: _,
|
|
247
|
+
itemToString: (e) => (e != null && e.label ? String(e.label) : C) || "",
|
|
248
|
+
selectedItem: Se(),
|
|
249
|
+
isOpen: u,
|
|
250
|
+
circularNavigation: !0,
|
|
251
|
+
defaultHighlightedIndex: me,
|
|
252
|
+
onHighlightedIndexChange: (e) => {
|
|
253
|
+
switch (e.type) {
|
|
254
|
+
case le.stateChangeTypes.MenuKeyDownArrowUp:
|
|
255
|
+
return $(A.ON_KEY_DOWN), b(Er(_, e.highlightedIndex)), e;
|
|
256
|
+
case le.stateChangeTypes.MenuKeyDownArrowDown:
|
|
257
|
+
return $(A.ON_KEY_DOWN), b(Cr(_, e.highlightedIndex)), e;
|
|
258
|
+
default:
|
|
259
|
+
return e;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
Oe(() => {
|
|
264
|
+
t && u && E.current !== null && E.current >= 0 && E.current < _.length && (b(E.current), E.current = null, requestAnimationFrame(() => {
|
|
265
|
+
T.current && !I && T.current.scrollTop(re.current);
|
|
266
|
+
}));
|
|
267
|
+
}, [t, u, r, _.length, b, I]);
|
|
268
|
+
const Be = () => {
|
|
269
|
+
s || (S((e) => !e), u ? p == null || p() : m == null || m(), $(A.ON_CLICK));
|
|
270
|
+
}, X = y(() => {
|
|
271
|
+
if (t && Array.isArray(r) && g.length > 0 && g.every((n) => O.has(n)))
|
|
272
|
+
return ee.label;
|
|
273
|
+
const e = _.reduce((n, o) => ((Array.isArray(r) && r.includes(o.value) || o.value === r) && n.push(o.label), n), []);
|
|
274
|
+
if (e.length > 0)
|
|
275
|
+
return e.join(", ");
|
|
276
|
+
if (!r && r !== !1 && r !== 0 || Array.isArray(r) && !r.length)
|
|
277
|
+
return C;
|
|
278
|
+
}, [
|
|
279
|
+
t,
|
|
280
|
+
r,
|
|
281
|
+
g,
|
|
282
|
+
O,
|
|
283
|
+
ee.label,
|
|
284
|
+
_,
|
|
285
|
+
C
|
|
286
|
+
]);
|
|
287
|
+
Oe(() => {
|
|
288
|
+
if (te.current) {
|
|
289
|
+
const { offsetWidth: e, scrollWidth: n } = te.current;
|
|
290
|
+
_e(n > e);
|
|
291
|
+
} else
|
|
292
|
+
_e(!1);
|
|
293
|
+
}, [X]);
|
|
294
|
+
const Ue = (e) => {
|
|
295
|
+
const { keyCode: n } = e;
|
|
296
|
+
pr.includes(n) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !u && (b(me), S(!0), m == null || m(), $(A.ON_KEY_DOWN)));
|
|
297
|
+
}, Xe = (e) => {
|
|
298
|
+
const { keyCode: n } = e;
|
|
299
|
+
if (n === w.ENTER_KEY_CODE || n === w.SPACE_KEY_CODE) {
|
|
300
|
+
const o = _[se];
|
|
301
|
+
if (!o)
|
|
302
|
+
return;
|
|
303
|
+
t && (E.current = se), we(o), t || N();
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
gr.includes(n) && (e.stopPropagation(), N());
|
|
307
|
+
}, ye = () => /* @__PURE__ */ D("div", { className: i("options-container"), children: [
|
|
308
|
+
t && de && /* @__PURE__ */ D(Ee, { children: [
|
|
309
|
+
/* @__PURE__ */ l(
|
|
310
|
+
Ne,
|
|
311
|
+
{
|
|
312
|
+
option: ee,
|
|
313
|
+
selected: Array.isArray(r) && g.length > 0 && g.every((e) => O.has(e)),
|
|
314
|
+
onChange: Me,
|
|
315
|
+
multiSelect: t,
|
|
316
|
+
isPartiallyChecked: g.some((e) => O.has(e)) && !g.every((e) => O.has(e))
|
|
317
|
+
}
|
|
318
|
+
),
|
|
319
|
+
/* @__PURE__ */ l("div", { className: i("divider") }),
|
|
320
|
+
" "
|
|
321
|
+
] }),
|
|
322
|
+
k.map(({ option: e, depth: n }, o) => {
|
|
323
|
+
var G, v;
|
|
324
|
+
const c = z.get(e.value) ?? [e.value], h = t && c.every((ae) => O.has(ae)), F = t && ((G = e.children) == null ? void 0 : G.length) && c.some((ae) => O.has(ae)) && !h;
|
|
325
|
+
return /* @__PURE__ */ l(
|
|
326
|
+
Ne,
|
|
327
|
+
{
|
|
328
|
+
...qe({
|
|
329
|
+
item: e,
|
|
330
|
+
index: o
|
|
331
|
+
}),
|
|
332
|
+
multiSelect: t,
|
|
333
|
+
selected: t ? h : e.value === ((U == null ? void 0 : U.value) ?? U),
|
|
334
|
+
option: { title: e.label, ...e },
|
|
335
|
+
highlightHovered: se === o && Ve !== A.ON_CLICK,
|
|
336
|
+
render: Y,
|
|
337
|
+
onChange: e.disabled ? null : () => we(e),
|
|
338
|
+
onMouseEnter: () => b(o),
|
|
339
|
+
depth: n,
|
|
340
|
+
hasChildren: !!((v = e.children) != null && v.length),
|
|
341
|
+
isPartiallyChecked: F
|
|
342
|
+
},
|
|
343
|
+
e.value
|
|
344
|
+
);
|
|
345
|
+
}),
|
|
346
|
+
W && /* @__PURE__ */ D(Ee, { children: [
|
|
347
|
+
/* @__PURE__ */ l("div", { className: i("divider") }),
|
|
348
|
+
typeof W == "function" ? W(N) : W
|
|
349
|
+
] })
|
|
350
|
+
] }), Fe = () => {
|
|
351
|
+
const e = ie ? ie(X) : X, n = /* @__PURE__ */ l(
|
|
352
|
+
"span",
|
|
353
|
+
{
|
|
354
|
+
ref: te,
|
|
355
|
+
className: i("value", {
|
|
356
|
+
placeholder: X === C
|
|
357
|
+
}),
|
|
358
|
+
children: e
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
return ge && !!e && Re ? /* @__PURE__ */ l(lr, { content: e, placement: "top", wrapperClassName: i("value-tooltip"), children: n }) : n;
|
|
362
|
+
}, Ge = $e({
|
|
363
|
+
className: i("dropdown", J, M, {
|
|
364
|
+
"transparent-background": Q,
|
|
365
|
+
opened: u,
|
|
366
|
+
disabled: s,
|
|
367
|
+
error: d,
|
|
368
|
+
touched: V,
|
|
369
|
+
"mobile-disabled": R
|
|
370
|
+
}),
|
|
371
|
+
onClick: Be,
|
|
372
|
+
onKeyDown: Ue,
|
|
373
|
+
ref: B.setReference
|
|
374
|
+
}), { type: Lr, ...Ce } = Ge;
|
|
375
|
+
return /* @__PURE__ */ D("div", { ref: fe, className: i("container", Z), title: K, children: [
|
|
376
|
+
H && /* @__PURE__ */ l(cr, { ...je(), children: H }),
|
|
377
|
+
/* @__PURE__ */ D(
|
|
378
|
+
"div",
|
|
379
|
+
{
|
|
380
|
+
...Ce,
|
|
381
|
+
role: "button",
|
|
382
|
+
"aria-disabled": s,
|
|
383
|
+
tabIndex: s ? -1 : Ce.tabIndex ?? 0,
|
|
384
|
+
children: [
|
|
385
|
+
L && /* @__PURE__ */ l("span", { className: i("icon"), children: L }),
|
|
386
|
+
/* @__PURE__ */ l("div", { className: i("value-wrapper"), children: Fe() }),
|
|
387
|
+
Le && /* @__PURE__ */ l(
|
|
388
|
+
sr,
|
|
389
|
+
{
|
|
390
|
+
className: i("clear-button"),
|
|
391
|
+
onClick: We,
|
|
392
|
+
onKeyDown: (e) => {
|
|
393
|
+
const { keyCode: n } = e;
|
|
394
|
+
(n === w.ENTER_KEY_CODE || n === w.SPACE_KEY_CODE) && (e.preventDefault(), e.stopPropagation(), ne());
|
|
395
|
+
},
|
|
396
|
+
"aria-label": xe,
|
|
397
|
+
children: /* @__PURE__ */ l(ar, {})
|
|
398
|
+
}
|
|
399
|
+
),
|
|
400
|
+
/* @__PURE__ */ l("span", { className: i("arrow"), "aria-hidden": "true", children: /* @__PURE__ */ l(or, {}) })
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
),
|
|
404
|
+
u && /* @__PURE__ */ l(
|
|
405
|
+
"div",
|
|
406
|
+
{
|
|
407
|
+
style: Ye,
|
|
408
|
+
className: i(
|
|
409
|
+
"select-list",
|
|
410
|
+
{ opened: u, "limited-width": Te },
|
|
411
|
+
Ie
|
|
412
|
+
),
|
|
413
|
+
...ze({
|
|
414
|
+
onKeyDown: Xe,
|
|
415
|
+
ref: B.setFloating
|
|
416
|
+
}),
|
|
417
|
+
children: I ? ye() : /* @__PURE__ */ l(
|
|
418
|
+
tr,
|
|
419
|
+
{
|
|
420
|
+
autoHeight: !0,
|
|
421
|
+
autoHeightMax: wr,
|
|
422
|
+
hideTracksWhenNotNeeded: !0,
|
|
423
|
+
ref: (e) => {
|
|
424
|
+
T.current = e;
|
|
425
|
+
},
|
|
426
|
+
onScrollFrame: He,
|
|
427
|
+
children: ye()
|
|
428
|
+
}
|
|
429
|
+
)
|
|
430
|
+
}
|
|
431
|
+
)
|
|
432
|
+
] });
|
|
433
|
+
};
|
|
434
|
+
export {
|
|
435
|
+
Jr as D
|
|
436
|
+
};
|
package/dist/dropdown.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as r } from "./dropdown-
|
|
1
|
+
import { D as r } from "./dropdown-e85dd323.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
@@ -7,7 +7,15 @@ 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 "./clear-53660571.js";
|
|
12
|
+
import "./dropdown-0260bb66.js";
|
|
13
|
+
import "./tooltip.js";
|
|
14
|
+
import "react-dom";
|
|
15
|
+
import "@floating-ui/react";
|
|
16
|
+
import "./floatingUi-41f8c7b5.js";
|
|
17
|
+
import "./fieldLabel.js";
|
|
18
|
+
import "./checkbox-ed6cc375.js";
|
|
11
19
|
export {
|
|
12
20
|
r as Dropdown,
|
|
13
21
|
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
|