@reportportal/ui-kit 0.0.1-alpha.10 → 0.0.1-alpha.101
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/attachedFile.js +9 -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/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 +1 -0
- package/dist/components/attachedFile/attachedFile.d.ts +14 -0
- package/dist/components/attachedFile/index.d.ts +2 -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 +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 +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 +4 -2
- package/dist/components/fieldTextFlex/index.d.ts +1 -0
- package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +20 -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 +57 -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 +52 -7
- package/dist/components/index.d.ts +18 -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/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 +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 +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 +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-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-4a22c986.js +131 -0
- package/dist/fieldNumber.js +4 -2
- package/dist/fieldText-ba8a917c.js +165 -0
- package/dist/fieldText.js +6 -2
- package/dist/fieldTextFlex-8afaab31.js +78 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fileDropArea.js +353 -0
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +71 -0
- package/dist/index-e27a72a8.js +99 -0
- package/dist/index.js +128 -50
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -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 +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 +69 -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 +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 +30 -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-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/table-d949a4ae.js +0 -132
- package/dist/toggle-707ecb74.js +0 -67
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { jsxs as F, Fragment as $, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import B from "react-datepicker/dist/es/index.js";
|
|
3
|
+
import { c as R } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useMemo as P, useRef as D } from "react";
|
|
5
|
+
import { F as I } from "./fieldText-ba8a917c.js";
|
|
6
|
+
import { D as E } from "./dropdown-ec754bbe.js";
|
|
7
|
+
import { S as T } from "./calendarArrow-44c7e60e.js";
|
|
8
|
+
import { registerLocale as j } from "react-datepicker";
|
|
9
|
+
const ie = (n, s) => {
|
|
10
|
+
j(n, s);
|
|
11
|
+
}, G = (n, s = 20) => {
|
|
12
|
+
const i = n + s;
|
|
13
|
+
return new Array(i - n).fill(void 0).map((g, t) => n - t);
|
|
14
|
+
}, H = "_header_1q16i_1", V = "_disabled_1q16i_25", O = "_dropdown_1q16i_8", W = {
|
|
15
|
+
header: H,
|
|
16
|
+
"dropdowns-wrapper": "_dropdowns-wrapper_1q16i_8",
|
|
17
|
+
"button-prev": "_button-prev_1q16i_13",
|
|
18
|
+
"button-next": "_button-next_1q16i_14",
|
|
19
|
+
disabled: V,
|
|
20
|
+
dropdown: O,
|
|
21
|
+
"month-dropdown": "_month-dropdown_1q16i_44",
|
|
22
|
+
"toggle-button": "_toggle-button_1q16i_47"
|
|
23
|
+
}, a = R.bind(W), z = ({
|
|
24
|
+
date: n = /* @__PURE__ */ new Date(),
|
|
25
|
+
changeYear: s = () => {
|
|
26
|
+
},
|
|
27
|
+
changeMonth: i = () => {
|
|
28
|
+
},
|
|
29
|
+
decreaseMonth: g = () => {
|
|
30
|
+
},
|
|
31
|
+
increaseMonth: t = () => {
|
|
32
|
+
},
|
|
33
|
+
prevMonthButtonDisabled: o = !1,
|
|
34
|
+
nextMonthButtonDisabled: h = !1,
|
|
35
|
+
headerNodes: b = null,
|
|
36
|
+
customClassName: w = "",
|
|
37
|
+
yearsOptions: p = [],
|
|
38
|
+
locale: N
|
|
39
|
+
}) => {
|
|
40
|
+
const l = n.getFullYear(), C = n.getMonth(), y = P(() => {
|
|
41
|
+
const e = Array(12).keys(), c = new Intl.DateTimeFormat(N, {
|
|
42
|
+
month: "long"
|
|
43
|
+
}), d = (m) => c.format(new Date(l, m));
|
|
44
|
+
return Array.from(e, d).reduce((m, f, x) => m.concat({
|
|
45
|
+
value: x,
|
|
46
|
+
label: f
|
|
47
|
+
}), []);
|
|
48
|
+
}, []), v = P(() => (p.length > 0 ? p : G(l)).reduce(
|
|
49
|
+
(c, d) => c.concat({ value: d, label: `${d}` }),
|
|
50
|
+
[]
|
|
51
|
+
), [p, l]), A = (e) => {
|
|
52
|
+
i(e);
|
|
53
|
+
}, k = (e) => {
|
|
54
|
+
s(e);
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ F($, { children: [
|
|
57
|
+
b && /* @__PURE__ */ r("div", { className: a(w), children: b }),
|
|
58
|
+
/* @__PURE__ */ F("div", { className: a("header"), children: [
|
|
59
|
+
/* @__PURE__ */ r(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
"aria-label": "Previous Months",
|
|
64
|
+
disabled: o,
|
|
65
|
+
onClick: (e) => {
|
|
66
|
+
e.stopPropagation(), g();
|
|
67
|
+
},
|
|
68
|
+
className: a("button-prev", { disabled: o }),
|
|
69
|
+
children: /* @__PURE__ */ r(T, {})
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ F("div", { className: a("dropdowns-wrapper"), children: [
|
|
73
|
+
/* @__PURE__ */ r(
|
|
74
|
+
E,
|
|
75
|
+
{
|
|
76
|
+
options: y,
|
|
77
|
+
value: C,
|
|
78
|
+
onChange: A,
|
|
79
|
+
transparentBackground: !0,
|
|
80
|
+
className: a("dropdown", "month-dropdown"),
|
|
81
|
+
toggleButtonClassName: a("toggle-button")
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ r(
|
|
85
|
+
E,
|
|
86
|
+
{
|
|
87
|
+
options: v,
|
|
88
|
+
value: l,
|
|
89
|
+
onChange: k,
|
|
90
|
+
transparentBackground: !0,
|
|
91
|
+
className: a("dropdown"),
|
|
92
|
+
toggleButtonClassName: a("toggle-button")
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ r(
|
|
97
|
+
"button",
|
|
98
|
+
{
|
|
99
|
+
type: "button",
|
|
100
|
+
"aria-label": "Next Months",
|
|
101
|
+
disabled: h,
|
|
102
|
+
onClick: (e) => {
|
|
103
|
+
e.stopPropagation(), t();
|
|
104
|
+
},
|
|
105
|
+
className: a("button-next", { disabled: h }),
|
|
106
|
+
children: /* @__PURE__ */ r(T, {})
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
] })
|
|
110
|
+
] });
|
|
111
|
+
}, J = "_calendar_3ty6m_5", K = "_date_3ty6m_90", Q = "_disabled_3ty6m_203", X = "_popper_3ty6m_211", Z = "_input_3ty6m_215", ee = {
|
|
112
|
+
calendar: J,
|
|
113
|
+
"current-date": "_current-date_3ty6m_89",
|
|
114
|
+
date: K,
|
|
115
|
+
"selected-range": "_selected-range_3ty6m_119",
|
|
116
|
+
"end-date": "_end-date_3ty6m_119",
|
|
117
|
+
disabled: Q,
|
|
118
|
+
popper: X,
|
|
119
|
+
input: Z
|
|
120
|
+
}, _ = R.bind(ee), te = "en", L = "MM-dd-yyyy", pe = ({
|
|
121
|
+
onChange: n = () => {
|
|
122
|
+
},
|
|
123
|
+
disabled: s = !1,
|
|
124
|
+
onBlur: i = () => {
|
|
125
|
+
},
|
|
126
|
+
onFocus: g = () => {
|
|
127
|
+
},
|
|
128
|
+
endDate: t = void 0,
|
|
129
|
+
startDate: o = void 0,
|
|
130
|
+
headerNodes: h = null,
|
|
131
|
+
customClassName: b = "",
|
|
132
|
+
customTimeInput: w = void 0,
|
|
133
|
+
shouldCloseOnSelect: p = !0,
|
|
134
|
+
popperClassName: N = "",
|
|
135
|
+
calendarClassName: l = "",
|
|
136
|
+
fixedHeight: C = !1,
|
|
137
|
+
language: y = te,
|
|
138
|
+
yearsOptions: v = [],
|
|
139
|
+
placeholder: A = L.toUpperCase(),
|
|
140
|
+
dateFormat: k = L,
|
|
141
|
+
selects: e = "start",
|
|
142
|
+
value: c = null
|
|
143
|
+
}) => {
|
|
144
|
+
const d = D(null), S = o == null ? void 0 : o.toDateString(), m = t == null ? void 0 : t.toDateString(), f = t && o && t > o, x = (u) => {
|
|
145
|
+
const M = u.toDateString(), Y = M === S, q = f && M === m, U = o && t && u > o && u < t;
|
|
146
|
+
return _("date", {
|
|
147
|
+
"current-date": Y,
|
|
148
|
+
"selected-range": U && !q,
|
|
149
|
+
"end-date": q && f,
|
|
150
|
+
disabled: s
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
return /* @__PURE__ */ r(
|
|
154
|
+
B,
|
|
155
|
+
{
|
|
156
|
+
customInput: /* @__PURE__ */ r(I, { className: _("input"), defaultWidth: !1, ref: d }),
|
|
157
|
+
placeholderText: A,
|
|
158
|
+
selected: c,
|
|
159
|
+
startDate: o,
|
|
160
|
+
endDate: t,
|
|
161
|
+
disabled: s,
|
|
162
|
+
shouldCloseOnSelect: p,
|
|
163
|
+
fixedHeight: C,
|
|
164
|
+
locale: y,
|
|
165
|
+
showPopperArrow: !1,
|
|
166
|
+
dayClassName: x,
|
|
167
|
+
calendarClassName: _(l, "calendar"),
|
|
168
|
+
renderCustomHeader: (u) => /* @__PURE__ */ r(
|
|
169
|
+
z,
|
|
170
|
+
{
|
|
171
|
+
...u,
|
|
172
|
+
headerNodes: h,
|
|
173
|
+
customClassName: b,
|
|
174
|
+
yearsOptions: v,
|
|
175
|
+
locale: y
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
onChange: n,
|
|
179
|
+
onBlur: i,
|
|
180
|
+
onFocus: g,
|
|
181
|
+
customTimeInput: w,
|
|
182
|
+
showTimeInput: !!w,
|
|
183
|
+
popperClassName: _(N, "popper"),
|
|
184
|
+
dateFormat: k,
|
|
185
|
+
selectsStart: e === "start",
|
|
186
|
+
selectsEnd: e === "end",
|
|
187
|
+
className: _("datepicker")
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
export {
|
|
192
|
+
pe as D,
|
|
193
|
+
ie as r
|
|
194
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { D as t } from "./datePicker-efa4e2d6.js";
|
|
2
|
+
import { r as q } from "./datePicker-efa4e2d6.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "react-datepicker/dist/es/index.js";
|
|
5
|
+
import "./bind-06a7ff84.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "./fieldText-ba8a917c.js";
|
|
8
|
+
import "./openEye-7b9cf080.js";
|
|
9
|
+
import "./baseIconButton-251479f7.js";
|
|
10
|
+
import "./spinLoader-c4a53718.js";
|
|
11
|
+
import "./maxValueDisplay-9be01a75.js";
|
|
12
|
+
import "./fieldLabel.js";
|
|
13
|
+
import "./dropdown-ec754bbe.js";
|
|
14
|
+
import "@floating-ui/react-dom";
|
|
15
|
+
import "downshift";
|
|
16
|
+
import "rc-scrollbars";
|
|
17
|
+
import "./useOnClickOutside-c332f7d3.js";
|
|
18
|
+
import "./keyCodes-f63c0e11.js";
|
|
19
|
+
import "./dropdown-0260bb66.js";
|
|
20
|
+
import "./checkbox-ed6cc375.js";
|
|
21
|
+
import "./calendarArrow-44c7e60e.js";
|
|
22
|
+
import "react-datepicker";
|
|
23
|
+
export {
|
|
24
|
+
t as DatePicker,
|
|
25
|
+
t as default,
|
|
26
|
+
q as registerDatePickerLocale
|
|
27
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const o = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M14.2174 5.82426C14.3736 5.66805 14.3736 5.41479 14.2174 5.25858L14.0759 5.11716C13.9197 4.96095 13.6665 4.96095 13.5103 5.11716L8.16726 10.4602L2.82426 5.11716C2.66805 4.96095 2.41479 4.96095 2.25858 5.11716L2.11716 5.25858C1.96095 5.41479 1.96095 5.66805 2.11716 5.82426L7.89176 11.5989C8.04797 11.7551 8.30124 11.7551 8.45745 11.5989L8.88171 11.1746L8.87436 11.1673L14.2174 5.82426Z", fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
o as S
|
|
5
|
+
};
|
|
@@ -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,131 @@
|
|
|
1
|
+
import { jsxs as a, 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, N = 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: m = "0",
|
|
39
|
+
disabled: t = !1,
|
|
40
|
+
onChange: C,
|
|
41
|
+
onFocus: d,
|
|
42
|
+
onBlur: G,
|
|
43
|
+
label: O,
|
|
44
|
+
postfix: o = "",
|
|
45
|
+
min: c = 0,
|
|
46
|
+
max: E = Number.MAX_SAFE_INTEGER,
|
|
47
|
+
title: f,
|
|
48
|
+
error: u,
|
|
49
|
+
id: h,
|
|
50
|
+
...Y
|
|
51
|
+
}) => {
|
|
52
|
+
const l = T(null), D = I(), L = (n) => {
|
|
53
|
+
let e = n.target.value.replace(/^0(?=\d+|^\d)/g, "");
|
|
54
|
+
e = +e, e = e < c ? c : e, e >= c && e <= E && C(e);
|
|
55
|
+
}, M = (n) => {
|
|
56
|
+
const { keyCode: e } = n;
|
|
57
|
+
k.includes(e) || (e < _.NUMBER_START_KEY_CODE || e > _.NUMBER_END_KEY_CODE || n.shiftKey) && n.preventDefault();
|
|
58
|
+
}, R = () => {
|
|
59
|
+
const n = +r - 1;
|
|
60
|
+
n >= c && n <= E && C(n);
|
|
61
|
+
}, U = () => {
|
|
62
|
+
const n = +r + 1;
|
|
63
|
+
n >= c && n <= E && C(n);
|
|
64
|
+
}, K = m + o, A = W(() => {
|
|
65
|
+
let n = (String(r) || K).length;
|
|
66
|
+
return o && !r && (n += 1), n > N ? `${N}ch` : `${n || w}ch`;
|
|
67
|
+
}, [K, o, r]), g = () => {
|
|
68
|
+
l && l.current && l.current.focus(), d && d();
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ a(v, { children: [
|
|
71
|
+
/* @__PURE__ */ a("div", { className: s("field-number", { disabled: t }), children: [
|
|
72
|
+
O && /* @__PURE__ */ i(S, { htmlFor: h ?? D, children: O }),
|
|
73
|
+
/* @__PURE__ */ a(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: s("input-container", {
|
|
77
|
+
error: u,
|
|
78
|
+
disabled: t
|
|
79
|
+
}),
|
|
80
|
+
title: f,
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ i(
|
|
83
|
+
p,
|
|
84
|
+
{
|
|
85
|
+
className: s("sign", "minus"),
|
|
86
|
+
disabled: t,
|
|
87
|
+
onClick: R,
|
|
88
|
+
children: /* @__PURE__ */ i(B, {})
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ a("span", { className: s("input-field", { disabled: t }), onClick: g, children: [
|
|
92
|
+
/* @__PURE__ */ i(
|
|
93
|
+
"input",
|
|
94
|
+
{
|
|
95
|
+
id: h ?? D,
|
|
96
|
+
ref: l,
|
|
97
|
+
className: s("input"),
|
|
98
|
+
type: "number",
|
|
99
|
+
value: r,
|
|
100
|
+
placeholder: K,
|
|
101
|
+
disabled: t,
|
|
102
|
+
min: c,
|
|
103
|
+
max: E,
|
|
104
|
+
onKeyDown: t ? void 0 : M,
|
|
105
|
+
onChange: t ? void 0 : L,
|
|
106
|
+
onFocus: t ? void 0 : d,
|
|
107
|
+
style: { width: A },
|
|
108
|
+
...Y
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
!!o && (r === 0 || !!r) && /* @__PURE__ */ i("span", { children: o.slice(0, 1) })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ i(
|
|
114
|
+
p,
|
|
115
|
+
{
|
|
116
|
+
className: s("sign", "plus"),
|
|
117
|
+
disabled: t,
|
|
118
|
+
onClick: U,
|
|
119
|
+
children: /* @__PURE__ */ i(F, {})
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
] }),
|
|
126
|
+
u && /* @__PURE__ */ i("div", { className: s("additional-content"), children: /* @__PURE__ */ i("span", { className: s("error-text"), children: u }) })
|
|
127
|
+
] });
|
|
128
|
+
};
|
|
129
|
+
export {
|
|
130
|
+
Z as F
|
|
131
|
+
};
|
package/dist/fieldNumber.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { F as m } from "./fieldNumber-
|
|
1
|
+
import { F as m } from "./fieldNumber-4a22c986.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
|