mimir-ui-kit 1.42.2 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ProgressBar-COdzy3fY.js +67 -0
- package/dist/assets/MultiSelectSearch.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/Switcher.css +1 -1
- package/dist/assets/TabTrail.css +1 -1
- package/dist/assets/hooks.css +1 -0
- package/dist/{combobox-Dv6-ANkb.js → combobox-fIVOzEhl.js} +6 -6
- package/dist/components/Accordion/Accordion.d.ts +6 -0
- package/dist/components/Accordion/Accordion.js +202 -182
- package/dist/components/AnchorLink/Link.d.ts +2 -0
- package/dist/components/AnchorLink/Link.js +54 -42
- package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
- package/dist/components/DatePicker/DatePicker.d.ts +32 -0
- package/dist/components/DatePicker/DatePicker.js +125 -111
- package/dist/components/DatePicker/DatePickerModal.d.ts +5 -1
- package/dist/components/DatePicker/DatePickerModal.js +97 -75
- package/dist/components/DatePicker/MonthPickerModal.d.ts +5 -1
- package/dist/components/DatePicker/MonthPickerModal.js +96 -58
- package/dist/components/DatePicker/YearPickerModal.d.ts +5 -1
- package/dist/components/DatePicker/YearPickerModal.js +75 -57
- package/dist/components/Drawer/Drawer.d.ts +7 -1
- package/dist/components/Drawer/Drawer.js +122 -106
- package/dist/components/Drawer/hooks.d.ts +9 -0
- package/dist/components/Drawer/hooks.js +24 -0
- package/dist/components/Dropdown/Dropdown.d.ts +18 -1
- package/dist/components/Dropdown/Dropdown.js +361 -343
- package/dist/components/Dropdown/constants.d.ts +11 -0
- package/dist/components/Dropdown/constants.js +5 -0
- package/dist/components/Dropdown/hooks.d.ts +19 -0
- package/dist/components/Dropdown/hooks.js +11 -0
- package/dist/components/Dropdown/index.d.ts +1 -0
- package/dist/components/Dropdown/index.js +5 -2
- package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +8 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +461 -302
- package/dist/components/MultiSelectSearch/constants.d.ts +6 -0
- package/dist/components/MultiSelectSearch/constants.js +7 -5
- package/dist/components/MultiSelectSearch/index.d.ts +1 -1
- package/dist/components/MultiSelectSearch/index.js +5 -4
- package/dist/components/MultiSelectSearch/types.d.ts +33 -1
- package/dist/components/MultiSelectSearch/utils.d.ts +1 -0
- package/dist/components/MultiSelectSearch/utils.js +31 -17
- package/dist/components/Pagination/Pagination.d.ts +23 -0
- package/dist/components/Pagination/Pagination.js +137 -99
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.d.ts +8 -1
- package/dist/components/SelectSearch/SelectSearch.js +381 -220
- package/dist/components/SelectSearch/constants.d.ts +6 -0
- package/dist/components/SelectSearch/constants.js +3 -2
- package/dist/components/SelectSearch/index.d.ts +1 -1
- package/dist/components/SelectSearch/index.js +5 -4
- package/dist/components/SelectSearch/types.d.ts +32 -1
- package/dist/components/SelectSearch/utils.d.ts +2 -0
- package/dist/components/SelectSearch/utils.js +28 -14
- package/dist/components/Switcher/Switcher.js +66 -59
- package/dist/components/Switcher/types.d.ts +1 -0
- package/dist/components/TabTrail/TabTrail.d.ts +9 -0
- package/dist/components/TabTrail/TabTrail.js +198 -190
- package/dist/components/Toasts/ProgressBar.d.ts +4 -2
- package/dist/components/Toasts/ProgressBar.js +1 -1
- package/dist/components/Toasts/Toast.d.ts +5 -1
- package/dist/components/Toasts/Toast.js +59 -44
- package/dist/components/Toasts/ToastList.js +1 -1
- package/dist/components/Toasts/ToastsProvider.js +1 -1
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +154 -149
- package/dist/{field-BP5-U1Nr.js → field-BLi5834s.js} +2 -2
- package/dist/{focus-management-Dp2_vbQ3.js → focus-management-BAl0GmRk.js} +1 -1
- package/dist/{hidden-Dn4lM6EL.js → hidden-CkTYbiNM.js} +1 -1
- package/dist/hooks/useTimer/index.d.ts +2 -1
- package/dist/hooks/useTimer/index.js +55 -41
- package/dist/hooks-HgN6Yauq.js +117 -0
- package/dist/index.js +182 -177
- package/dist/{keyboard-CUMsrFX1.js → keyboard-wis2TUql.js} +2 -2
- package/dist/{label-DOlEWXBl.js → label-BmphTIGY.js} +2 -2
- package/dist/{open-closed-CkTbpRyi.js → open-closed-CJijMeI2.js} +1 -1
- package/dist/{portal-C_u5auU1.js → portal-BnEqSZwo.js} +2 -2
- package/dist/{use-active-press-BVQqDQ3V.js → use-active-press-CnDeVvQq.js} +1 -1
- package/dist/{use-is-mounted-D7cq4xsa.js → use-is-mounted-MBU4fiLr.js} +1 -1
- package/package.json +3 -1
- package/dist/ProgressBar-DEFs1tWq.js +0 -55
- package/dist/assets/Dropdown.css +0 -1
- package/dist/components/Pagination/types.d.ts +0 -0
@@ -1,264 +1,425 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
"
|
18
|
-
|
19
|
-
|
20
|
-
"selector-icon": "_selector-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
1
|
+
import { jsx as s, jsxs as l, Fragment as ee } from "react/jsx-runtime";
|
2
|
+
import { u as Se } from "../../index-D5H8gPPn.js";
|
3
|
+
import { c as a } from "../../index-DIxK0V-G.js";
|
4
|
+
import { forwardRef as ke, useRef as we, useState as D, useMemo as A, useEffect as te, useCallback as ze } from "react";
|
5
|
+
import { ESelectSearchSize as d, ELoadingIndicatorPlacement as x } from "./constants.js";
|
6
|
+
import { prepareGroupedItems as Ce, mapSizeToInputSize as ne, getDropdownArrowIcon as Le } from "./utils.js";
|
7
|
+
import { Icon as G } from "../../icons/Icon.js";
|
8
|
+
import { Button as Oe } from "../Button/Button.js";
|
9
|
+
import { I as oe } from "../../Input-BU_6U1CW.js";
|
10
|
+
import { EInputVariant as De } from "../Input/constants.js";
|
11
|
+
import { Loader as se } from "../Loader/Loader.js";
|
12
|
+
import { H as Ee, U as ie, G as re, W as ae, K as Te } from "../../combobox-fIVOzEhl.js";
|
13
|
+
import '../../assets/SelectSearch.css';const Be = "_disabled_1rthm_6", Ve = "_container_1rthm_13", Ae = "_full_1rthm_26", Ge = "_button_1rthm_38", Me = "_options_1rthm_52", qe = "_top_1rthm_63", Pe = "_bottom_1rthm_69", je = "_s_1rthm_2", Fe = "_m_1rthm_110", He = "_l_1rthm_123", $e = "_loader_1rthm_161", Ke = "_option_1rthm_52", Ue = "_clear_1rthm_200", e = {
|
14
|
+
"select-search": "_select-search_1rthm_2",
|
15
|
+
disabled: Be,
|
16
|
+
container: Ve,
|
17
|
+
"container-open": "_container-open_1rthm_22",
|
18
|
+
full: Ae,
|
19
|
+
"selected-icon": "_selected-icon_1rthm_30",
|
20
|
+
"selector-icon-open": "_selector-icon-open_1rthm_34",
|
21
|
+
button: Ge,
|
22
|
+
"selector-icon": "_selector-icon_1rthm_34",
|
23
|
+
options: Me,
|
24
|
+
top: qe,
|
25
|
+
bottom: Pe,
|
26
|
+
"no-options": "_no-options_1rthm_75",
|
27
|
+
s: je,
|
28
|
+
m: Fe,
|
29
|
+
l: He,
|
30
|
+
"select-search-input": "_select-search-input_1rthm_136",
|
31
|
+
"select-search-input-disabled": "_select-search-input-disabled_1rthm_139",
|
32
|
+
"group-header": "_group-header_1rthm_146",
|
33
|
+
"sticky-active": "_sticky-active_1rthm_157",
|
34
|
+
loader: $e,
|
35
|
+
"input-container": "_input-container_1rthm_166",
|
36
|
+
option: Ke,
|
37
|
+
"option-active": "_option-active_1rthm_180",
|
38
|
+
"option-inner": "_option-inner_1rthm_183",
|
39
|
+
"right-slot": "_right-slot_1rthm_190",
|
40
|
+
"required-mark": "_required-mark_1rthm_195",
|
41
|
+
clear: Ue,
|
42
|
+
"icon-button": "_icon-button_1rthm_209"
|
43
|
+
}, We = ke(
|
44
|
+
(ce, le) => {
|
39
45
|
const {
|
40
|
-
placeholder:
|
41
|
-
size:
|
42
|
-
value:
|
43
|
-
onChange:
|
44
|
-
full:
|
45
|
-
showArrow:
|
46
|
-
items:
|
47
|
-
classNameOption:
|
48
|
-
displayValue:
|
49
|
-
filterOnSearch:
|
50
|
-
onSearch:
|
51
|
-
variant:
|
52
|
-
menuPlacement:
|
53
|
-
disabled:
|
54
|
-
searchProps:
|
55
|
-
withClearButton:
|
56
|
-
disableInput:
|
57
|
-
autocomplete:
|
58
|
-
immediate:
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
46
|
+
placeholder: M,
|
47
|
+
size: o = d.L,
|
48
|
+
value: c,
|
49
|
+
onChange: r,
|
50
|
+
full: de,
|
51
|
+
showArrow: me = !0,
|
52
|
+
items: g = [],
|
53
|
+
classNameOption: q,
|
54
|
+
displayValue: ue = "name",
|
55
|
+
filterOnSearch: P = !0,
|
56
|
+
onSearch: I,
|
57
|
+
variant: j = De.DefaultGray,
|
58
|
+
menuPlacement: S = "bottom",
|
59
|
+
disabled: m = !1,
|
60
|
+
searchProps: F,
|
61
|
+
withClearButton: E = !1,
|
62
|
+
disableInput: _ = !1,
|
63
|
+
autocomplete: H = "on",
|
64
|
+
immediate: pe = !1,
|
65
|
+
noOptionsText: he = "Нет данных",
|
66
|
+
noMatchText: _e = "Ничего не найдено",
|
67
|
+
loadOnOpen: T,
|
68
|
+
loading: $,
|
69
|
+
loadingIndicatorPlacement: k = x.Dropdown,
|
70
|
+
groupBy: p,
|
71
|
+
getGroupTitle: K = (t) => t
|
72
|
+
} = ce, B = String((c == null ? void 0 : c[ue]) || ""), w = we(null), [h, v] = D(B), [u, b] = D(c), [fe, U] = D(!1), [V, ge] = D(null), W = $ !== void 0 ? $ : fe, N = A(() => P && h.trim().toLowerCase() ? g.filter(
|
73
|
+
(t) => t.name.toLowerCase().includes(h.toLowerCase())
|
74
|
+
) : g, [h, g, P]), y = A(() => p ? Ce(
|
75
|
+
N,
|
76
|
+
p,
|
77
|
+
K || ((t) => t)
|
78
|
+
) : N, [N, p, K]), z = A(() => {
|
79
|
+
const t = [];
|
80
|
+
return y.forEach((n, i) => {
|
81
|
+
n.isGroupHeader && t.push(i);
|
82
|
+
}), t;
|
83
|
+
}, [y]), f = Se({
|
84
|
+
count: y.length,
|
85
|
+
getScrollElement: () => w.current,
|
86
|
+
estimateSize: () => o === d.L ? 65 : 49,
|
87
|
+
overscan: 10
|
88
|
+
});
|
89
|
+
te(() => {
|
90
|
+
const t = w.current;
|
91
|
+
if (!t || !p) return;
|
92
|
+
const n = () => {
|
93
|
+
var R, X;
|
94
|
+
const i = t.scrollTop;
|
95
|
+
let C = null;
|
96
|
+
for (let L = 0; L < z.length; L++) {
|
97
|
+
const Z = z[L];
|
98
|
+
if ((((R = f.getVirtualItems().find((O) => O.index === Z)) == null ? void 0 : R.start) || 0) <= i) {
|
99
|
+
C = Z;
|
100
|
+
const O = z[L + 1];
|
101
|
+
if (O !== void 0 && (((X = f.getVirtualItems().find((Ie) => Ie.index === O)) == null ? void 0 : X.start) || 0) <= i)
|
102
|
+
continue;
|
103
|
+
} else
|
104
|
+
break;
|
105
|
+
}
|
106
|
+
ge(C);
|
107
|
+
};
|
108
|
+
return t.addEventListener("scroll", n), () => t.removeEventListener("scroll", n);
|
109
|
+
}, [f, z, p, w.current]);
|
110
|
+
const Y = async () => {
|
111
|
+
if (T)
|
112
|
+
try {
|
113
|
+
U(!0), await T();
|
114
|
+
} finally {
|
115
|
+
U(!1);
|
116
|
+
}
|
117
|
+
}, ve = (t) => {
|
118
|
+
t ? (v(t.name), b(t), r == null || r(t)) : (v(""), b(null), r == null || r({ id: "", name: "" }));
|
119
|
+
}, J = ze(
|
64
120
|
(t) => {
|
65
|
-
if (
|
66
|
-
const
|
67
|
-
|
121
|
+
if (_) return;
|
122
|
+
const n = t.target.value;
|
123
|
+
v(n), I == null || I(n), u && n !== u.name && b(null), !n && c && (r == null || r({ id: "", name: "" }));
|
68
124
|
},
|
69
|
-
[
|
70
|
-
),
|
71
|
-
|
125
|
+
[_, r, I, c, u]
|
126
|
+
), be = () => {
|
127
|
+
v(""), b(null), r == null || r({ id: "", name: "" });
|
128
|
+
}, Q = async (t) => {
|
129
|
+
_ && t.target.blur(), T && await Y();
|
72
130
|
};
|
73
|
-
|
74
|
-
const t = !
|
75
|
-
|
76
|
-
}, [
|
77
|
-
|
131
|
+
te(() => {
|
132
|
+
const t = !c || typeof c == "object" && !Object.keys(c).length;
|
133
|
+
v(t ? "" : B), b(t ? null : c);
|
134
|
+
}, [c, B]);
|
135
|
+
const Ne = () => W && (k === x.Dropdown || k === x.Both) ? /* @__PURE__ */ l("div", { className: e.loader, children: [
|
136
|
+
/* @__PURE__ */ s(se, { size: "s" }),
|
137
|
+
"Загрузка..."
|
138
|
+
] }) : he, ye = (t) => {
|
139
|
+
if (me)
|
140
|
+
return {
|
141
|
+
addonType: "react-node",
|
142
|
+
addonContent: /* @__PURE__ */ l(ee, { children: [
|
143
|
+
W && (k === x.Input || k === x.Both) && /* @__PURE__ */ s(se, { size: "s" }),
|
144
|
+
/* @__PURE__ */ s(
|
145
|
+
ie,
|
146
|
+
{
|
147
|
+
className: a(e.button, {
|
148
|
+
[e.disabled]: m
|
149
|
+
}),
|
150
|
+
disabled: m,
|
151
|
+
children: /* @__PURE__ */ s(
|
152
|
+
G,
|
153
|
+
{
|
154
|
+
iconName: o == d.M || o == d.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
155
|
+
className: a(e["selector-icon"], {
|
156
|
+
[e["selector-icon-open"]]: t
|
157
|
+
})
|
158
|
+
}
|
159
|
+
)
|
160
|
+
}
|
161
|
+
)
|
162
|
+
] })
|
163
|
+
};
|
164
|
+
}, xe = (t) => g.length ? N.length ? p ? /* @__PURE__ */ l(
|
165
|
+
"div",
|
166
|
+
{
|
167
|
+
ref: w,
|
168
|
+
"data-testid": "select-search-options",
|
169
|
+
className: a(e.options, e[o], e[S]),
|
170
|
+
style: {
|
171
|
+
height: o === d.M || o === d.S ? "240px" : "320px",
|
172
|
+
overflow: "auto"
|
173
|
+
},
|
174
|
+
children: [
|
175
|
+
V !== null && /* @__PURE__ */ s(
|
176
|
+
"div",
|
177
|
+
{
|
178
|
+
className: e["group-header"],
|
179
|
+
style: {
|
180
|
+
position: "sticky",
|
181
|
+
top: 0,
|
182
|
+
zIndex: 3
|
183
|
+
},
|
184
|
+
children: y[V].name
|
185
|
+
}
|
186
|
+
),
|
187
|
+
/* @__PURE__ */ s(
|
188
|
+
"div",
|
189
|
+
{
|
190
|
+
style: {
|
191
|
+
height: `${f.getTotalSize()}px`,
|
192
|
+
width: "100%"
|
193
|
+
},
|
194
|
+
children: f.getVirtualItems().map((n) => {
|
195
|
+
const i = y[n.index];
|
196
|
+
return /* @__PURE__ */ s(
|
197
|
+
"div",
|
198
|
+
{
|
199
|
+
"data-index": n.index,
|
200
|
+
ref: f.measureElement,
|
201
|
+
style: {
|
202
|
+
position: "absolute",
|
203
|
+
top: 0,
|
204
|
+
left: 0,
|
205
|
+
width: "100%",
|
206
|
+
transform: `translateY(${n.start}px)`
|
207
|
+
},
|
208
|
+
children: i.isGroupHeader ? /* @__PURE__ */ s(
|
209
|
+
"div",
|
210
|
+
{
|
211
|
+
className: e["group-header"],
|
212
|
+
style: {
|
213
|
+
visibility: V === n.index ? "hidden" : "visible"
|
214
|
+
},
|
215
|
+
children: i.name
|
216
|
+
}
|
217
|
+
) : /* @__PURE__ */ l(
|
218
|
+
ae,
|
219
|
+
{
|
220
|
+
value: i,
|
221
|
+
className: ({ focus: C }) => a(
|
222
|
+
e.option,
|
223
|
+
q,
|
224
|
+
o && e[o],
|
225
|
+
{
|
226
|
+
[e["option-active"]]: C
|
227
|
+
}
|
228
|
+
),
|
229
|
+
"data-testid": `select-search-option-${i.id}`,
|
230
|
+
children: [
|
231
|
+
/* @__PURE__ */ l("div", { className: e["option-inner"], children: [
|
232
|
+
i.name,
|
233
|
+
i.bottom && /* @__PURE__ */ s("div", { children: i.bottom })
|
234
|
+
] }),
|
235
|
+
u && u.id === i.id && /* @__PURE__ */ s(
|
236
|
+
G,
|
237
|
+
{
|
238
|
+
iconName: o === d.M || o === d.S ? "Done16px" : "Done24px",
|
239
|
+
className: e["selected-icon"]
|
240
|
+
}
|
241
|
+
)
|
242
|
+
]
|
243
|
+
},
|
244
|
+
i.id
|
245
|
+
)
|
246
|
+
},
|
247
|
+
n.key
|
248
|
+
);
|
249
|
+
})
|
250
|
+
}
|
251
|
+
)
|
252
|
+
]
|
253
|
+
}
|
254
|
+
) : /* @__PURE__ */ s(
|
255
|
+
Te,
|
256
|
+
{
|
257
|
+
className: a(e.options, e[o], e[S]),
|
258
|
+
"data-testid": "select-search-options",
|
259
|
+
style: { width: "100%" },
|
260
|
+
static: !0,
|
261
|
+
children: ({ option: n }) => /* @__PURE__ */ l(
|
262
|
+
ae,
|
263
|
+
{
|
264
|
+
value: n,
|
265
|
+
className: ({ focus: i }) => a(
|
266
|
+
e.option,
|
267
|
+
q,
|
268
|
+
{
|
269
|
+
[e["option-active"]]: i
|
270
|
+
},
|
271
|
+
o && e[o]
|
272
|
+
),
|
273
|
+
children: [
|
274
|
+
/* @__PURE__ */ l("div", { className: e["option-inner"], children: [
|
275
|
+
n.name,
|
276
|
+
n.bottom && /* @__PURE__ */ s("div", { children: n.bottom })
|
277
|
+
] }),
|
278
|
+
u && u.id === n.id && /* @__PURE__ */ s(
|
279
|
+
G,
|
280
|
+
{
|
281
|
+
iconName: o === d.M || o === d.S ? "Done16px" : "Done24px",
|
282
|
+
className: e["selected-icon"]
|
283
|
+
}
|
284
|
+
)
|
285
|
+
]
|
286
|
+
},
|
287
|
+
n.id
|
288
|
+
)
|
289
|
+
}
|
290
|
+
) : /* @__PURE__ */ s(
|
291
|
+
"div",
|
292
|
+
{
|
293
|
+
className: a(
|
294
|
+
e.options,
|
295
|
+
e[o],
|
296
|
+
e["no-options"],
|
297
|
+
e[S]
|
298
|
+
),
|
299
|
+
"data-headlessui-state": t ? "open" : "closed",
|
300
|
+
children: _e
|
301
|
+
}
|
302
|
+
) : /* @__PURE__ */ s(
|
303
|
+
"div",
|
304
|
+
{
|
305
|
+
className: a(
|
306
|
+
e.options,
|
307
|
+
e[o],
|
308
|
+
e["no-options"],
|
309
|
+
e[S]
|
310
|
+
),
|
311
|
+
"data-headlessui-state": t ? "open" : "closed",
|
312
|
+
children: Ne()
|
313
|
+
}
|
314
|
+
);
|
315
|
+
return /* @__PURE__ */ s(
|
316
|
+
Ee,
|
78
317
|
{
|
79
318
|
as: "div",
|
80
|
-
value:
|
81
|
-
className:
|
82
|
-
[e.full]:
|
83
|
-
[e.disabled]:
|
319
|
+
value: u,
|
320
|
+
className: a(e["select-search"], {
|
321
|
+
[e.full]: de,
|
322
|
+
[e.disabled]: m
|
84
323
|
}),
|
85
|
-
onChange:
|
86
|
-
ref:
|
87
|
-
disabled:
|
88
|
-
virtual: { options:
|
89
|
-
immediate:
|
90
|
-
children: ({ open: t }) => /* @__PURE__ */
|
91
|
-
/* @__PURE__ */
|
324
|
+
onChange: ve,
|
325
|
+
ref: le,
|
326
|
+
disabled: m,
|
327
|
+
virtual: p ? void 0 : { options: N },
|
328
|
+
immediate: pe,
|
329
|
+
children: ({ open: t }) => /* @__PURE__ */ l(ee, { children: [
|
330
|
+
/* @__PURE__ */ l(
|
92
331
|
"div",
|
93
332
|
{
|
94
|
-
className:
|
333
|
+
className: a(e.container, e[o], {
|
95
334
|
[e["container-open"]]: t
|
96
335
|
}),
|
97
336
|
children: [
|
98
|
-
|
99
|
-
/* @__PURE__ */
|
100
|
-
|
337
|
+
_ && /* @__PURE__ */ l("div", { className: e["input-container"], children: [
|
338
|
+
/* @__PURE__ */ s(
|
339
|
+
ie,
|
101
340
|
{
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
341
|
+
disabled: m,
|
342
|
+
style: { width: "100%" },
|
343
|
+
onClick: Y,
|
344
|
+
children: /* @__PURE__ */ s(
|
345
|
+
re,
|
346
|
+
{
|
347
|
+
as: oe,
|
348
|
+
label: M,
|
349
|
+
size: ne(o),
|
350
|
+
className: a(e["select-search-input"], {
|
351
|
+
[e["select-search-input-disabled"]]: _ && E
|
352
|
+
}),
|
353
|
+
onChange: J,
|
354
|
+
value: h,
|
355
|
+
disabled: m,
|
356
|
+
variant: j,
|
357
|
+
rightSlotClassName: e["right-slot"],
|
358
|
+
requiredMarkClassName: e["required-mark"],
|
359
|
+
"data-testid": "select-search-input",
|
360
|
+
onFocus: Q,
|
361
|
+
rightAddon: {
|
362
|
+
addonType: "icon",
|
363
|
+
addonContent: Le(t, o)
|
364
|
+
},
|
365
|
+
autocomplete: H,
|
366
|
+
...F
|
367
|
+
}
|
368
|
+
)
|
124
369
|
}
|
125
|
-
)
|
126
|
-
|
127
|
-
|
370
|
+
),
|
371
|
+
E && h && /* @__PURE__ */ s(
|
372
|
+
Oe,
|
128
373
|
{
|
129
374
|
tabIndex: -1,
|
130
|
-
className:
|
131
|
-
[e.disabled]:
|
375
|
+
className: a(e.clear, {
|
376
|
+
[e.disabled]: m
|
132
377
|
}),
|
133
378
|
iconButtonClassName: e["icon-button"],
|
134
379
|
isIconButton: !0,
|
135
380
|
iconName: "Close16px",
|
136
381
|
size: "m-s",
|
137
382
|
clear: !0,
|
138
|
-
disabled:
|
383
|
+
disabled: m,
|
139
384
|
variant: "secondary-gray",
|
140
|
-
onClick: (
|
141
|
-
|
385
|
+
onClick: (n) => {
|
386
|
+
n.stopPropagation(), be();
|
142
387
|
},
|
143
388
|
"data-testid": "clear-button"
|
144
389
|
}
|
145
390
|
)
|
146
391
|
] }),
|
147
|
-
!
|
148
|
-
|
392
|
+
!_ && /* @__PURE__ */ s(
|
393
|
+
re,
|
149
394
|
{
|
150
|
-
as:
|
151
|
-
label:
|
152
|
-
size:
|
153
|
-
className: e["select-input"],
|
154
|
-
onChange: z,
|
155
|
-
value: d,
|
156
|
-
disabled: r,
|
157
|
-
variant: I,
|
158
|
-
withClearButton: v,
|
395
|
+
as: oe,
|
396
|
+
label: M,
|
397
|
+
size: ne(o),
|
398
|
+
className: e["select-search-input"],
|
159
399
|
rightSlotClassName: e["right-slot"],
|
160
400
|
requiredMarkClassName: e["required-mark"],
|
401
|
+
value: h,
|
402
|
+
disabled: m,
|
403
|
+
variant: j,
|
404
|
+
withClearButton: E && !!h,
|
405
|
+
onChange: J,
|
406
|
+
rightAddon: ye(t),
|
161
407
|
"data-testid": "select-search-input",
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
M,
|
166
|
-
{
|
167
|
-
className: i(e.button, {
|
168
|
-
[e.disabled]: r
|
169
|
-
}),
|
170
|
-
disabled: r,
|
171
|
-
children: /* @__PURE__ */ n(
|
172
|
-
O,
|
173
|
-
{
|
174
|
-
iconName: a == b.M || a == b.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
175
|
-
className: i(e["selector-icon"], {
|
176
|
-
[e["selector-icon-open"]]: t
|
177
|
-
})
|
178
|
-
}
|
179
|
-
)
|
180
|
-
}
|
181
|
-
)
|
182
|
-
} : void 0,
|
183
|
-
onFocus: (o) => {
|
184
|
-
c && o.target.blur();
|
185
|
-
},
|
186
|
-
autocomplete: k,
|
187
|
-
...y
|
408
|
+
onFocus: Q,
|
409
|
+
autocomplete: H,
|
410
|
+
...F
|
188
411
|
}
|
189
412
|
)
|
190
413
|
]
|
191
414
|
}
|
192
415
|
),
|
193
|
-
t &&
|
194
|
-
Z,
|
195
|
-
{
|
196
|
-
"data-testid": "select-search-options",
|
197
|
-
className: i(
|
198
|
-
e.options,
|
199
|
-
e[a],
|
200
|
-
e[N]
|
201
|
-
),
|
202
|
-
children: ({ option: o }) => /* @__PURE__ */ h(
|
203
|
-
ee,
|
204
|
-
{
|
205
|
-
value: o,
|
206
|
-
className: ({ focus: K }) => i(
|
207
|
-
e.option,
|
208
|
-
F,
|
209
|
-
a && e[a],
|
210
|
-
{
|
211
|
-
[e["option-active"]]: K
|
212
|
-
}
|
213
|
-
),
|
214
|
-
"data-testid": `select-search-option-${o.id}`,
|
215
|
-
children: [
|
216
|
-
/* @__PURE__ */ h("div", { className: e["option-inner"], children: [
|
217
|
-
o.name,
|
218
|
-
o.bottom && /* @__PURE__ */ n("div", { children: o.bottom })
|
219
|
-
] }),
|
220
|
-
p && p.id === o.id && /* @__PURE__ */ n(
|
221
|
-
O,
|
222
|
-
{
|
223
|
-
iconName: a === b.M || a === b.S ? "Done16px" : "Done24px",
|
224
|
-
className: e["selected-icon"]
|
225
|
-
}
|
226
|
-
)
|
227
|
-
]
|
228
|
-
},
|
229
|
-
o.id
|
230
|
-
)
|
231
|
-
}
|
232
|
-
) : /* @__PURE__ */ n(
|
233
|
-
"div",
|
234
|
-
{
|
235
|
-
className: i(
|
236
|
-
e.options,
|
237
|
-
e[a],
|
238
|
-
e["no-options"],
|
239
|
-
e[N]
|
240
|
-
),
|
241
|
-
"data-headlessui-state": t ? "open" : "closed",
|
242
|
-
children: "Ничего не найдено"
|
243
|
-
}
|
244
|
-
) : /* @__PURE__ */ n(
|
245
|
-
"div",
|
246
|
-
{
|
247
|
-
className: i(
|
248
|
-
e.options,
|
249
|
-
e[a],
|
250
|
-
e["no-options"],
|
251
|
-
e[N]
|
252
|
-
),
|
253
|
-
"data-headlessui-state": t ? "open" : "closed",
|
254
|
-
children: "Нет данных"
|
255
|
-
}
|
256
|
-
) })
|
416
|
+
t && xe(t)
|
257
417
|
] })
|
258
418
|
}
|
259
419
|
);
|
260
420
|
}
|
261
421
|
);
|
422
|
+
We.displayName = "SelectSearch";
|
262
423
|
export {
|
263
|
-
|
424
|
+
We as SelectSearch
|
264
425
|
};
|
@@ -1,4 +1,5 @@
|
|
1
|
-
var
|
1
|
+
var r = /* @__PURE__ */ ((p) => (p.S = "s", p.M = "m", p.L = "l", p))(r || {}), u = /* @__PURE__ */ ((p) => (p.Input = "input", p.Dropdown = "dropdown", p.Both = "both", p.None = "none", p))(u || {});
|
2
2
|
export {
|
3
|
-
|
3
|
+
u as ELoadingIndicatorPlacement,
|
4
|
+
r as ESelectSearchSize
|
4
5
|
};
|