mimir-ui-kit 1.38.7 → 1.38.8
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/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +1 -0
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +175 -157
- package/dist/components/MultiSelectSearch/constants.d.ts +3 -0
- package/dist/components/MultiSelectSearch/constants.js +6 -2
- package/dist/components/MultiSelectSearch/types.d.ts +4 -0
- package/dist/components/MultiSelectSearch/utils.d.ts +1 -0
- package/dist/components/MultiSelectSearch/utils.js +19 -14
- package/package.json +1 -1
@@ -1,199 +1,217 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as I, jsx as o, Fragment as W } from "react/jsx-runtime";
|
2
2
|
import { c as r } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as
|
4
|
-
import { EMultiSelectSearchSize as
|
5
|
-
import { getInitialInputValue as
|
6
|
-
import { Icon as
|
7
|
-
import { Button as
|
8
|
-
import { CheckboxMimir as
|
9
|
-
import { Chip as
|
10
|
-
import { I as
|
11
|
-
import { EInputVariant as
|
12
|
-
import { H as
|
13
|
-
import '../../assets/MultiSelectSearch.css';const
|
3
|
+
import { forwardRef as he, useId as fe, useRef as H, useState as N, useEffect as S, useMemo as ke } from "react";
|
4
|
+
import { EMultiSelectSearchSize as y } from "./constants.js";
|
5
|
+
import { getInitialInputValue as J, MULTISELECT_OPEN_EVENT as K, mapSizeToInputSize as $, getDropdownArrowIcon as ve, dispatchMultiselectOpen as C, joinSelectedItems as Q, shouldShowMenuOnTop as we } from "./utils.js";
|
6
|
+
import { Icon as qe } from "../../icons/Icon.js";
|
7
|
+
import { Button as ge } from "../Button/Button.js";
|
8
|
+
import { CheckboxMimir as Ie } from "../CheckboxMimir/CheckboxMimir.js";
|
9
|
+
import { Chip as be } from "../Chip/Chip.js";
|
10
|
+
import { I as X } from "../../Input-BYrIS5GU.js";
|
11
|
+
import { EInputVariant as Ne } from "../Input/constants.js";
|
12
|
+
import { H as Se, U as Y, G as Z, K as Ce, W as Ee } from "../../combobox-CVtJDVoZ.js";
|
13
|
+
import '../../assets/MultiSelectSearch.css';const Me = "_disabled_17kql_5", Le = "_container_17kql_9", Te = "_full_17kql_27", Oe = "_button_17kql_39", ye = "_options_17kql_53", ze = "_top_17kql_64", xe = "_bottom_17kql_69", De = "_m_17kql_2", Pe = "_l_17kql_111", Ae = "_focused_17kql_129", Ve = "_option_17kql_53", Be = "_chip_17kql_158", Re = "_clear_17kql_183", t = {
|
14
14
|
"multi-select-search": "_multi-select-search_17kql_2",
|
15
|
-
disabled:
|
16
|
-
container:
|
15
|
+
disabled: Me,
|
16
|
+
container: Le,
|
17
17
|
"container-open": "_container-open_17kql_18",
|
18
18
|
"input-container": "_input-container_17kql_22",
|
19
|
-
full:
|
19
|
+
full: Te,
|
20
20
|
"selected-icon": "_selected-icon_17kql_31",
|
21
21
|
"selector-icon-open": "_selector-icon-open_17kql_35",
|
22
|
-
button:
|
22
|
+
button: Oe,
|
23
23
|
"selector-icon": "_selector-icon_17kql_35",
|
24
|
-
options:
|
25
|
-
top:
|
26
|
-
bottom:
|
24
|
+
options: ye,
|
25
|
+
top: ze,
|
26
|
+
bottom: xe,
|
27
27
|
"no-options": "_no-options_17kql_90",
|
28
|
-
m:
|
29
|
-
l:
|
28
|
+
m: De,
|
29
|
+
l: Pe,
|
30
30
|
"multi-select-input-disabled": "_multi-select-input-disabled_17kql_126",
|
31
31
|
"multi-select-input": "_multi-select-input_17kql_126",
|
32
|
-
focused:
|
33
|
-
option:
|
32
|
+
focused: Ae,
|
33
|
+
option: Ve,
|
34
34
|
"option-active": "_option-active_17kql_148",
|
35
35
|
"option-inner": "_option-inner_17kql_151",
|
36
|
-
chip:
|
36
|
+
chip: Be,
|
37
37
|
"chip-container": "_chip-container_17kql_163",
|
38
38
|
"chip-root": "_chip-root_17kql_169",
|
39
39
|
"right-slot": "_right-slot_17kql_173",
|
40
40
|
"required-mark": "_required-mark_17kql_178",
|
41
|
-
clear:
|
41
|
+
clear: Re,
|
42
42
|
"icon-button": "_icon-button_17kql_192"
|
43
|
-
},
|
44
|
-
(
|
43
|
+
}, Ze = he(
|
44
|
+
(ee, te) => {
|
45
45
|
const {
|
46
|
-
placeholder:
|
47
|
-
size:
|
46
|
+
placeholder: z,
|
47
|
+
size: s = y.L,
|
48
48
|
value: u,
|
49
|
-
onChange:
|
50
|
-
full:
|
51
|
-
showArrow:
|
52
|
-
items:
|
53
|
-
classNameOption:
|
54
|
-
displayValue:
|
49
|
+
onChange: l,
|
50
|
+
full: ne,
|
51
|
+
showArrow: oe = !0,
|
52
|
+
items: p = [],
|
53
|
+
classNameOption: se,
|
54
|
+
displayValue: m = "name",
|
55
55
|
filterOnSearch: x = !0,
|
56
|
-
onSearch:
|
57
|
-
variant:
|
58
|
-
menuPlacement:
|
56
|
+
onSearch: E,
|
57
|
+
variant: D = Ne.DefaultGray,
|
58
|
+
menuPlacement: b = "bottom",
|
59
59
|
disabled: c = !1,
|
60
|
-
searchProps:
|
61
|
-
withClearButton:
|
62
|
-
withChip:
|
63
|
-
chipVariant:
|
64
|
-
disableInput:
|
65
|
-
autocomplete:
|
66
|
-
id:
|
67
|
-
|
68
|
-
|
69
|
-
|
60
|
+
searchProps: P,
|
61
|
+
withClearButton: M = !1,
|
62
|
+
withChip: le = !1,
|
63
|
+
chipVariant: ie = "sapphire",
|
64
|
+
disableInput: k = !1,
|
65
|
+
autocomplete: A = "on",
|
66
|
+
id: re,
|
67
|
+
autoPlacement: V = !1
|
68
|
+
} = ee, ce = fe(), _ = re || `multiselect-${ce}`, v = H(null), h = H(null), [d, f] = N(!1), [w, q] = N(
|
69
|
+
() => J(u, m)
|
70
|
+
), [i, g] = N(
|
70
71
|
u || []
|
71
|
-
);
|
72
|
-
|
73
|
-
u && (
|
74
|
-
}, [u,
|
75
|
-
const
|
72
|
+
), [L, B] = N(b);
|
73
|
+
S(() => {
|
74
|
+
u && (g(u), JSON.stringify(u) !== JSON.stringify(i) && q(J(u, m)));
|
75
|
+
}, [u, m, i]);
|
76
|
+
const R = ke(() => {
|
76
77
|
var n;
|
77
|
-
if (!x) return
|
78
|
-
const e = ((n =
|
79
|
-
return
|
78
|
+
if (!x) return p;
|
79
|
+
const e = ((n = w.split(",").pop()) == null ? void 0 : n.trim().toLowerCase()) ?? "";
|
80
|
+
return i.length > 0 && i[i.length - 1].name.toLowerCase() === e ? p : p.filter(
|
80
81
|
(a) => a.name.toLowerCase().includes(e)
|
81
82
|
);
|
82
|
-
}, [x,
|
83
|
-
|
84
|
-
const n =
|
85
|
-
|
86
|
-
if (
|
87
|
-
|
83
|
+
}, [x, p, w, i]), ae = (e) => {
|
84
|
+
g(e), l == null || l(e);
|
85
|
+
const n = Q(e, m);
|
86
|
+
q(n), f(!0), C(_), setTimeout(() => {
|
87
|
+
if (h.current) {
|
88
|
+
h.current.focus(), h.current.scrollLeft = h.current.scrollWidth;
|
88
89
|
const a = n.length;
|
89
|
-
|
90
|
+
h.current.setSelectionRange(a, a);
|
90
91
|
}
|
91
92
|
}, 0);
|
92
|
-
},
|
93
|
-
|
93
|
+
}, F = (e) => {
|
94
|
+
var U;
|
95
|
+
if (k) return;
|
94
96
|
const n = e.target.value;
|
95
|
-
|
96
|
-
const a = n.split(",").map((
|
97
|
-
(
|
97
|
+
q(n), E == null || E(n);
|
98
|
+
const a = n.split(",").map((O) => O.trim()).filter(Boolean), G = p.filter(
|
99
|
+
(O) => a.includes(O[m])
|
98
100
|
);
|
99
|
-
|
100
|
-
|
101
|
-
|
101
|
+
g(G), l == null || l(G), f(!0), C(_);
|
102
|
+
const T = (U = v.current) == null ? void 0 : U.querySelector(
|
103
|
+
`.${t.options}`
|
104
|
+
);
|
105
|
+
T && typeof T.scrollTo == "function" && T.scrollTo({ top: 0, behavior: "smooth" });
|
106
|
+
}, ue = (e) => {
|
107
|
+
const n = i.filter(
|
102
108
|
(a) => a.id !== e.id
|
103
109
|
);
|
104
|
-
|
105
|
-
},
|
106
|
-
const e = !
|
107
|
-
|
108
|
-
},
|
110
|
+
g(n), l == null || l(n), q(Q(n, m));
|
111
|
+
}, j = () => {
|
112
|
+
const e = !d;
|
113
|
+
f(e), e && C(_);
|
114
|
+
}, de = (e) => {
|
109
115
|
e.preventDefault(), e.currentTarget.focus();
|
110
116
|
const n = e.currentTarget.value.length;
|
111
117
|
e.currentTarget.setSelectionRange(n, n);
|
112
|
-
},
|
113
|
-
|
114
|
-
},
|
115
|
-
e.stopPropagation(),
|
116
|
-
},
|
117
|
-
|
118
|
+
}, pe = () => {
|
119
|
+
q(""), g([]), l == null || l([]);
|
120
|
+
}, me = (e) => {
|
121
|
+
e.stopPropagation(), pe();
|
122
|
+
}, _e = (e) => {
|
123
|
+
k && e.target.blur();
|
118
124
|
};
|
119
|
-
return
|
125
|
+
return S(() => {
|
120
126
|
const e = (n) => {
|
121
|
-
|
127
|
+
v.current && !v.current.contains(n.target) && !n.defaultPrevented && f(!1);
|
122
128
|
};
|
123
129
|
return document.addEventListener("mousedown", e), () => {
|
124
130
|
document.removeEventListener("mousedown", e);
|
125
131
|
};
|
126
|
-
}, []),
|
132
|
+
}, []), S(() => {
|
127
133
|
const e = (n) => {
|
128
|
-
n.detail !==
|
134
|
+
n.detail !== _ && f(!1);
|
129
135
|
};
|
130
136
|
return window.addEventListener(
|
131
|
-
|
137
|
+
K,
|
132
138
|
e
|
133
139
|
), () => {
|
134
140
|
window.removeEventListener(
|
135
|
-
|
141
|
+
K,
|
136
142
|
e
|
137
143
|
);
|
138
144
|
};
|
139
|
-
}, [
|
145
|
+
}, [_]), S(() => {
|
146
|
+
const e = () => {
|
147
|
+
if (!V) {
|
148
|
+
B(b);
|
149
|
+
return;
|
150
|
+
}
|
151
|
+
const n = we(v, s);
|
152
|
+
B(n ? "top" : b);
|
153
|
+
};
|
154
|
+
return d && (e(), window.addEventListener("scroll", e), window.addEventListener("resize", e)), () => {
|
155
|
+
window.removeEventListener("scroll", e), window.removeEventListener("resize", e);
|
156
|
+
};
|
157
|
+
}, [d, b, V, s]), /* @__PURE__ */ I("div", { ref: v, children: [
|
140
158
|
/* @__PURE__ */ o(
|
141
|
-
|
159
|
+
Se,
|
142
160
|
{
|
143
161
|
multiple: !0,
|
144
162
|
as: "div",
|
145
|
-
value:
|
163
|
+
value: i,
|
146
164
|
className: r(t["multi-select-search"], {
|
147
|
-
[t.full]:
|
165
|
+
[t.full]: ne,
|
148
166
|
[t.disabled]: c
|
149
167
|
}),
|
150
|
-
onChange:
|
151
|
-
ref:
|
168
|
+
onChange: ae,
|
169
|
+
ref: te,
|
152
170
|
disabled: c,
|
153
|
-
virtual: { options:
|
154
|
-
children: /* @__PURE__ */
|
171
|
+
virtual: { options: R },
|
172
|
+
children: /* @__PURE__ */ I(
|
155
173
|
"div",
|
156
174
|
{
|
157
|
-
className: r(t.container, t[
|
158
|
-
[t["container-open"]]:
|
175
|
+
className: r(t.container, t[s], {
|
176
|
+
[t["container-open"]]: d
|
159
177
|
}),
|
160
178
|
children: [
|
161
|
-
|
179
|
+
k && /* @__PURE__ */ I("div", { className: t["input-container"], children: [
|
162
180
|
/* @__PURE__ */ o(
|
163
|
-
|
181
|
+
Y,
|
164
182
|
{
|
165
183
|
disabled: c,
|
166
184
|
style: { width: "100%" },
|
167
|
-
onClick:
|
185
|
+
onClick: j,
|
168
186
|
children: /* @__PURE__ */ o(
|
169
|
-
|
187
|
+
Z,
|
170
188
|
{
|
171
|
-
as:
|
172
|
-
label:
|
173
|
-
size:
|
189
|
+
as: X,
|
190
|
+
label: z,
|
191
|
+
size: $(s),
|
174
192
|
className: r(t["multi-select-input"], {
|
175
|
-
[t["multi-select-input-disabled"]]:
|
193
|
+
[t["multi-select-input-disabled"]]: k && M
|
176
194
|
}),
|
177
|
-
onChange:
|
178
|
-
value:
|
195
|
+
onChange: F,
|
196
|
+
value: w,
|
179
197
|
disabled: c,
|
180
|
-
variant:
|
198
|
+
variant: D,
|
181
199
|
rightSlotClassName: t["right-slot"],
|
182
200
|
requiredMarkClassName: t["required-mark"],
|
183
201
|
"data-testid": "select-search-input",
|
184
|
-
onFocus:
|
202
|
+
onFocus: _e,
|
185
203
|
rightAddon: {
|
186
204
|
addonType: "icon",
|
187
|
-
addonContent:
|
205
|
+
addonContent: ve(d, s)
|
188
206
|
},
|
189
|
-
autocomplete:
|
190
|
-
...
|
207
|
+
autocomplete: A,
|
208
|
+
...P
|
191
209
|
}
|
192
210
|
)
|
193
211
|
}
|
194
212
|
),
|
195
|
-
|
196
|
-
|
213
|
+
M && w && /* @__PURE__ */ o(
|
214
|
+
ge,
|
197
215
|
{
|
198
216
|
tabIndex: -1,
|
199
217
|
className: r(t.clear, {
|
@@ -206,46 +224,46 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
206
224
|
clear: !0,
|
207
225
|
disabled: c,
|
208
226
|
variant: "secondary-gray",
|
209
|
-
onClick:
|
227
|
+
onClick: me,
|
210
228
|
"data-testid": "clear-button"
|
211
229
|
}
|
212
230
|
)
|
213
231
|
] }),
|
214
|
-
!
|
215
|
-
|
232
|
+
!k && /* @__PURE__ */ o(
|
233
|
+
Z,
|
216
234
|
{
|
217
|
-
as:
|
218
|
-
label:
|
219
|
-
size:
|
235
|
+
as: X,
|
236
|
+
label: z,
|
237
|
+
size: $(s),
|
220
238
|
className: t["multi-select-input"],
|
221
239
|
rightSlotClassName: t["right-slot"],
|
222
240
|
requiredMarkClassName: t["required-mark"],
|
223
|
-
value:
|
241
|
+
value: w,
|
224
242
|
disabled: c,
|
225
|
-
variant:
|
226
|
-
withClearButton:
|
243
|
+
variant: D,
|
244
|
+
withClearButton: M,
|
227
245
|
onFocus: () => {
|
228
|
-
|
246
|
+
f(!0), C(_);
|
229
247
|
},
|
230
|
-
onMouseDown:
|
231
|
-
onChange:
|
232
|
-
ref:
|
248
|
+
onMouseDown: de,
|
249
|
+
onChange: F,
|
250
|
+
ref: h,
|
233
251
|
rightAddon: {
|
234
252
|
addonType: "react-node",
|
235
|
-
addonContent:
|
236
|
-
|
253
|
+
addonContent: oe && /* @__PURE__ */ o(
|
254
|
+
Y,
|
237
255
|
{
|
238
256
|
className: r(t.button, {
|
239
257
|
[t.disabled]: c
|
240
258
|
}),
|
241
259
|
disabled: c,
|
242
|
-
onMouseDown:
|
260
|
+
onMouseDown: j,
|
243
261
|
children: /* @__PURE__ */ o(
|
244
|
-
|
262
|
+
qe,
|
245
263
|
{
|
246
|
-
iconName:
|
264
|
+
iconName: s == y.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
247
265
|
className: r(t["selector-icon"], {
|
248
|
-
[t["selector-icon-open"]]:
|
266
|
+
[t["selector-icon-open"]]: d
|
249
267
|
})
|
250
268
|
}
|
251
269
|
)
|
@@ -253,42 +271,42 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
253
271
|
)
|
254
272
|
},
|
255
273
|
"data-testid": "select-search-input",
|
256
|
-
autocomplete:
|
257
|
-
...
|
274
|
+
autocomplete: A,
|
275
|
+
...P
|
258
276
|
}
|
259
277
|
),
|
260
|
-
|
261
|
-
|
278
|
+
d && /* @__PURE__ */ o(W, { children: p.length ? R.length ? /* @__PURE__ */ o(
|
279
|
+
Ce,
|
262
280
|
{
|
263
281
|
className: r(
|
264
282
|
t.options,
|
265
|
-
t[
|
266
|
-
t[
|
283
|
+
t[s],
|
284
|
+
t[L]
|
267
285
|
),
|
268
286
|
modal: !1,
|
269
287
|
static: !0,
|
270
288
|
children: ({ option: e }) => /* @__PURE__ */ o(
|
271
|
-
|
289
|
+
Ee,
|
272
290
|
{
|
273
291
|
value: e,
|
274
292
|
className: ({ focus: n }) => r(
|
275
293
|
t.option,
|
276
|
-
|
277
|
-
|
294
|
+
se,
|
295
|
+
s && t[s],
|
278
296
|
{
|
279
297
|
[t["option-active"]]: n
|
280
298
|
}
|
281
299
|
),
|
282
|
-
children: /* @__PURE__ */
|
283
|
-
/* @__PURE__ */
|
300
|
+
children: /* @__PURE__ */ I(W, { children: [
|
301
|
+
/* @__PURE__ */ I("div", { className: t["option-inner"], children: [
|
284
302
|
e.name,
|
285
303
|
e.bottom && /* @__PURE__ */ o("div", { children: e.bottom })
|
286
304
|
] }),
|
287
305
|
/* @__PURE__ */ o(
|
288
|
-
|
306
|
+
Ie,
|
289
307
|
{
|
290
308
|
isInteractive: !1,
|
291
|
-
checked:
|
309
|
+
checked: i.some(
|
292
310
|
(n) => n.id === e.id
|
293
311
|
)
|
294
312
|
}
|
@@ -303,9 +321,9 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
303
321
|
{
|
304
322
|
className: r(
|
305
323
|
t.options,
|
306
|
-
t[
|
324
|
+
t[s],
|
307
325
|
t["no-options"],
|
308
|
-
t[
|
326
|
+
t[L]
|
309
327
|
),
|
310
328
|
children: "Ничего не найдено"
|
311
329
|
}
|
@@ -314,9 +332,9 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
314
332
|
{
|
315
333
|
className: r(
|
316
334
|
t.options,
|
317
|
-
t[
|
335
|
+
t[s],
|
318
336
|
t["no-options"],
|
319
|
-
t[
|
337
|
+
t[L]
|
320
338
|
),
|
321
339
|
children: "Нет данных"
|
322
340
|
}
|
@@ -326,14 +344,14 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
326
344
|
)
|
327
345
|
}
|
328
346
|
),
|
329
|
-
|
330
|
-
|
347
|
+
le && i.length > 0 && /* @__PURE__ */ o("div", { className: t["chip-container"], children: i.map((e) => /* @__PURE__ */ o(
|
348
|
+
be,
|
331
349
|
{
|
332
|
-
size:
|
333
|
-
variant:
|
350
|
+
size: s === y.L ? "s" : "xs",
|
351
|
+
variant: ie,
|
334
352
|
className: t["chip-root"],
|
335
353
|
withAction: !0,
|
336
|
-
onClose: () =>
|
354
|
+
onClose: () => ue(e),
|
337
355
|
children: /* @__PURE__ */ o("span", { className: t.chip, children: e.name })
|
338
356
|
},
|
339
357
|
e.id
|
@@ -342,5 +360,5 @@ import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve =
|
|
342
360
|
}
|
343
361
|
);
|
344
362
|
export {
|
345
|
-
|
363
|
+
Ze as MultiSelectSearch
|
346
364
|
};
|
@@ -1,4 +1,8 @@
|
|
1
|
-
var
|
1
|
+
var I = /* @__PURE__ */ ((E) => (E.M = "m", E.L = "l", E))(I || {});
|
2
|
+
const _ = 767, n = 264, o = 320;
|
2
3
|
export {
|
3
|
-
|
4
|
+
o as DESKTOP_MENU_HEIGHT,
|
5
|
+
I as EMultiSelectSearchSize,
|
6
|
+
_ as MOBILE_BREAKPOINT,
|
7
|
+
n as MOBILE_MENU_HEIGHT
|
4
8
|
};
|
@@ -8,3 +8,4 @@ export declare const getInitialInputValue: (value: TMultiSelectOption[] | undefi
|
|
8
8
|
export declare const joinSelectedItems: (items: TMultiSelectOption[], displayValue: string) => string;
|
9
9
|
export declare const MULTISELECT_OPEN_EVENT = "multiselectOpen";
|
10
10
|
export declare const dispatchMultiselectOpen: (id: string) => void;
|
11
|
+
export declare const shouldShowMenuOnTop: (selectRef: React.RefObject<HTMLDivElement>, size: EMultiSelectSearchSize) => boolean;
|
@@ -1,23 +1,28 @@
|
|
1
|
-
import { EMultiSelectSearchSize as o } from "./constants.js";
|
1
|
+
import { EMultiSelectSearchSize as o, MOBILE_MENU_HEIGHT as c, DESKTOP_MENU_HEIGHT as s } from "./constants.js";
|
2
2
|
import "../../Input-BYrIS5GU.js";
|
3
|
-
import { EInputSize as
|
4
|
-
const
|
3
|
+
import { EInputSize as r } from "../Input/constants.js";
|
4
|
+
const m = (t) => {
|
5
5
|
switch (t) {
|
6
6
|
case o.M:
|
7
|
-
return
|
7
|
+
return r.M;
|
8
8
|
case o.L:
|
9
|
-
return
|
9
|
+
return r.L;
|
10
10
|
default:
|
11
|
-
return
|
11
|
+
return r.M;
|
12
12
|
}
|
13
|
-
},
|
14
|
-
window.dispatchEvent(new CustomEvent(
|
13
|
+
}, a = (t, e) => t ? e === o.L ? "DropdownArrowUp24px" : "DropdownArrowUp16px" : e === o.L ? "DropdownArrowDown24px" : "DropdownArrowBottom16px", M = (t, e) => t && t.length > 0 ? t.map((n) => n[e]).join(", ") : "", h = (t, e) => t.map((n) => n[e]).join(", "), u = "multiselectOpen", I = (t) => {
|
14
|
+
window.dispatchEvent(new CustomEvent(u, { detail: t }));
|
15
|
+
}, S = (t, e) => {
|
16
|
+
if (!t.current) return !1;
|
17
|
+
const n = t.current.getBoundingClientRect(), i = window.innerHeight, p = e === o.M ? c : s;
|
18
|
+
return i - n.bottom < p;
|
15
19
|
};
|
16
20
|
export {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
u as MULTISELECT_OPEN_EVENT,
|
22
|
+
I as dispatchMultiselectOpen,
|
23
|
+
a as getDropdownArrowIcon,
|
24
|
+
M as getInitialInputValue,
|
25
|
+
h as joinSelectedItems,
|
26
|
+
m as mapSizeToInputSize,
|
27
|
+
S as shouldShowMenuOnTop
|
23
28
|
};
|