mimir-ui-kit 1.38.6 → 1.38.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/dist/{combobox-DgSZTriw.js → combobox-CVtJDVoZ.js} +251 -254
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Accordion/Accordion.js +3 -3
  4. package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
  5. package/dist/components/Dropdown/Dropdown.js +32 -32
  6. package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +1 -0
  7. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +175 -157
  8. package/dist/components/MultiSelectSearch/constants.d.ts +3 -0
  9. package/dist/components/MultiSelectSearch/constants.js +6 -2
  10. package/dist/components/MultiSelectSearch/types.d.ts +4 -0
  11. package/dist/components/MultiSelectSearch/utils.d.ts +1 -0
  12. package/dist/components/MultiSelectSearch/utils.js +19 -14
  13. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  14. package/dist/components/SelectSearch/SelectSearch.js +21 -21
  15. package/dist/components/Slider/Slider.d.ts +21 -8
  16. package/dist/components/Slider/Slider.js +388 -383
  17. package/dist/components/Switcher/Switcher.js +4 -4
  18. package/dist/components/TabTrail/TabTrail.js +4 -4
  19. package/dist/{field-C1kt7aNM.js → field-FJ34aSs4.js} +2 -2
  20. package/dist/{focus-management-BtPpk3D1.js → focus-management-DE4t_lW3.js} +1 -1
  21. package/dist/{hidden-PvGXrYUY.js → hidden-DbgtYPOH.js} +1 -1
  22. package/dist/{keyboard-mgWkd2Vh.js → keyboard-B0lm_zyn.js} +111 -114
  23. package/dist/{label-D4GFpe5F.js → label-y3ANLTNC.js} +2 -2
  24. package/dist/open-closed-CdldUPoq.js +86 -0
  25. package/dist/portal-WDFNoIMz.js +1908 -0
  26. package/dist/{use-active-press-CqLGIFz7.js → use-active-press-86hajhdd.js} +1 -1
  27. package/package.json +1 -1
  28. package/dist/open-closed-D2VjDhAN.js +0 -86
  29. package/dist/portal-DPqg52FR.js +0 -1946
@@ -1,199 +1,217 @@
1
- import { jsxs as b, jsx as o, Fragment as j } from "react/jsx-runtime";
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 ce, useRef as P, useState as E, useEffect as L, useMemo as ae } from "react";
4
- import { EMultiSelectSearchSize as O } from "./constants.js";
5
- import { getInitialInputValue as F, MULTISELECT_OPEN_EVENT as G, mapSizeToInputSize as U, getDropdownArrowIcon as ue, dispatchMultiselectOpen as I, joinSelectedItems as H } from "./utils.js";
6
- import { Icon as de } from "../../icons/Icon.js";
7
- import { Button as pe } from "../Button/Button.js";
8
- import { CheckboxMimir as me } from "../CheckboxMimir/CheckboxMimir.js";
9
- import { Chip as _e } from "../Chip/Chip.js";
10
- import { I as J } from "../../Input-BYrIS5GU.js";
11
- import { EInputVariant as he } from "../Input/constants.js";
12
- import { H as fe, U as K, G as W, K as ke, j as qe } from "../../combobox-DgSZTriw.js";
13
- import '../../assets/MultiSelectSearch.css';const ge = "_disabled_17kql_5", ve = "_container_17kql_9", be = "_full_17kql_27", Ie = "_button_17kql_39", we = "_options_17kql_53", Ne = "_top_17kql_64", Ce = "_bottom_17kql_69", Se = "_m_17kql_2", Me = "_l_17kql_111", Ee = "_focused_17kql_129", Le = "_option_17kql_53", Oe = "_chip_17kql_158", Te = "_clear_17kql_183", t = {
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: ge,
16
- container: ve,
15
+ disabled: Me,
16
+ container: Le,
17
17
  "container-open": "_container-open_17kql_18",
18
18
  "input-container": "_input-container_17kql_22",
19
- full: be,
19
+ full: Te,
20
20
  "selected-icon": "_selected-icon_17kql_31",
21
21
  "selector-icon-open": "_selector-icon-open_17kql_35",
22
- button: Ie,
22
+ button: Oe,
23
23
  "selector-icon": "_selector-icon_17kql_35",
24
- options: we,
25
- top: Ne,
26
- bottom: Ce,
24
+ options: ye,
25
+ top: ze,
26
+ bottom: xe,
27
27
  "no-options": "_no-options_17kql_90",
28
- m: Se,
29
- l: Me,
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: Ee,
33
- option: Le,
32
+ focused: Ae,
33
+ option: Ve,
34
34
  "option-active": "_option-active_17kql_148",
35
35
  "option-inner": "_option-inner_17kql_151",
36
- chip: Oe,
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: Te,
41
+ clear: Re,
42
42
  "icon-button": "_icon-button_17kql_192"
43
- }, Ue = ce(
44
- ($, Q) => {
43
+ }, Ze = he(
44
+ (ee, te) => {
45
45
  const {
46
- placeholder: T,
47
- size: i = O.L,
46
+ placeholder: z,
47
+ size: s = y.L,
48
48
  value: u,
49
- onChange: s,
50
- full: X,
51
- showArrow: Y = !0,
52
- items: d = [],
53
- classNameOption: Z,
54
- displayValue: p = "name",
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: w,
57
- variant: y = he.DefaultGray,
58
- menuPlacement: N = "bottom",
56
+ onSearch: E,
57
+ variant: D = Ne.DefaultGray,
58
+ menuPlacement: b = "bottom",
59
59
  disabled: c = !1,
60
- searchProps: D,
61
- withClearButton: C = !1,
62
- withChip: ee = !1,
63
- chipVariant: te = "sapphire",
64
- disableInput: f = !1,
65
- autocomplete: z = "on",
66
- id: m = `multiselect-${Math.random().toString(36).slice(2, 11)}`
67
- } = $, S = P(null), _ = P(null), [k, h] = E(!1), [q, g] = E(
68
- () => F(u, p)
69
- ), [l, v] = E(
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
- L(() => {
73
- u && (v(u), JSON.stringify(u) !== JSON.stringify(l) && g(F(u, p)));
74
- }, [u, p, l]);
75
- const V = ae(() => {
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 d;
78
- const e = ((n = q.split(",").pop()) == null ? void 0 : n.trim().toLowerCase()) ?? "";
79
- return l.length > 0 && l[l.length - 1].name.toLowerCase() === e ? d : d.filter(
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, d, q, l]), ne = (e) => {
83
- v(e), s == null || s(e);
84
- const n = H(e, p);
85
- g(n), h(!0), I(m), setTimeout(() => {
86
- if (_.current) {
87
- _.current.focus(), _.current.scrollLeft = _.current.scrollWidth;
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
- _.current.setSelectionRange(a, a);
90
+ h.current.setSelectionRange(a, a);
90
91
  }
91
92
  }, 0);
92
- }, A = (e) => {
93
- if (f) return;
93
+ }, F = (e) => {
94
+ var U;
95
+ if (k) return;
94
96
  const n = e.target.value;
95
- g(n), w == null || w(n);
96
- const a = n.split(",").map((M) => M.trim()).filter(Boolean), R = d.filter(
97
- (M) => a.includes(M[p])
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
- v(R), s == null || s(R), h(!0), I(m);
100
- }, oe = (e) => {
101
- const n = l.filter(
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
- v(n), s == null || s(n), g(H(n, p));
105
- }, B = () => {
106
- const e = !k;
107
- h(e), e && I(m);
108
- }, se = (e) => {
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
- }, ie = () => {
113
- g(""), v([]), s == null || s([]);
114
- }, le = (e) => {
115
- e.stopPropagation(), ie();
116
- }, re = (e) => {
117
- f && e.target.blur();
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 L(() => {
125
+ return S(() => {
120
126
  const e = (n) => {
121
- S.current && !S.current.contains(n.target) && !n.defaultPrevented && h(!1);
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
- }, []), L(() => {
132
+ }, []), S(() => {
127
133
  const e = (n) => {
128
- n.detail !== m && h(!1);
134
+ n.detail !== _ && f(!1);
129
135
  };
130
136
  return window.addEventListener(
131
- G,
137
+ K,
132
138
  e
133
139
  ), () => {
134
140
  window.removeEventListener(
135
- G,
141
+ K,
136
142
  e
137
143
  );
138
144
  };
139
- }, [m]), /* @__PURE__ */ b("div", { ref: S, children: [
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
- fe,
159
+ Se,
142
160
  {
143
161
  multiple: !0,
144
162
  as: "div",
145
- value: l,
163
+ value: i,
146
164
  className: r(t["multi-select-search"], {
147
- [t.full]: X,
165
+ [t.full]: ne,
148
166
  [t.disabled]: c
149
167
  }),
150
- onChange: ne,
151
- ref: Q,
168
+ onChange: ae,
169
+ ref: te,
152
170
  disabled: c,
153
- virtual: { options: V },
154
- children: /* @__PURE__ */ b(
171
+ virtual: { options: R },
172
+ children: /* @__PURE__ */ I(
155
173
  "div",
156
174
  {
157
- className: r(t.container, t[i], {
158
- [t["container-open"]]: k
175
+ className: r(t.container, t[s], {
176
+ [t["container-open"]]: d
159
177
  }),
160
178
  children: [
161
- f && /* @__PURE__ */ b("div", { className: t["input-container"], children: [
179
+ k && /* @__PURE__ */ I("div", { className: t["input-container"], children: [
162
180
  /* @__PURE__ */ o(
163
- K,
181
+ Y,
164
182
  {
165
183
  disabled: c,
166
184
  style: { width: "100%" },
167
- onClick: B,
185
+ onClick: j,
168
186
  children: /* @__PURE__ */ o(
169
- W,
187
+ Z,
170
188
  {
171
- as: J,
172
- label: T,
173
- size: U(i),
189
+ as: X,
190
+ label: z,
191
+ size: $(s),
174
192
  className: r(t["multi-select-input"], {
175
- [t["multi-select-input-disabled"]]: f && C
193
+ [t["multi-select-input-disabled"]]: k && M
176
194
  }),
177
- onChange: A,
178
- value: q,
195
+ onChange: F,
196
+ value: w,
179
197
  disabled: c,
180
- variant: y,
198
+ variant: D,
181
199
  rightSlotClassName: t["right-slot"],
182
200
  requiredMarkClassName: t["required-mark"],
183
201
  "data-testid": "select-search-input",
184
- onFocus: re,
202
+ onFocus: _e,
185
203
  rightAddon: {
186
204
  addonType: "icon",
187
- addonContent: ue(k, i)
205
+ addonContent: ve(d, s)
188
206
  },
189
- autocomplete: z,
190
- ...D
207
+ autocomplete: A,
208
+ ...P
191
209
  }
192
210
  )
193
211
  }
194
212
  ),
195
- C && q && /* @__PURE__ */ o(
196
- pe,
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: le,
227
+ onClick: me,
210
228
  "data-testid": "clear-button"
211
229
  }
212
230
  )
213
231
  ] }),
214
- !f && /* @__PURE__ */ o(
215
- W,
232
+ !k && /* @__PURE__ */ o(
233
+ Z,
216
234
  {
217
- as: J,
218
- label: T,
219
- size: U(i),
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: q,
241
+ value: w,
224
242
  disabled: c,
225
- variant: y,
226
- withClearButton: C,
243
+ variant: D,
244
+ withClearButton: M,
227
245
  onFocus: () => {
228
- h(!0), I(m);
246
+ f(!0), C(_);
229
247
  },
230
- onMouseDown: se,
231
- onChange: A,
232
- ref: _,
248
+ onMouseDown: de,
249
+ onChange: F,
250
+ ref: h,
233
251
  rightAddon: {
234
252
  addonType: "react-node",
235
- addonContent: Y && /* @__PURE__ */ o(
236
- K,
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: B,
260
+ onMouseDown: j,
243
261
  children: /* @__PURE__ */ o(
244
- de,
262
+ qe,
245
263
  {
246
- iconName: i == O.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
264
+ iconName: s == y.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
247
265
  className: r(t["selector-icon"], {
248
- [t["selector-icon-open"]]: k
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: z,
257
- ...D
274
+ autocomplete: A,
275
+ ...P
258
276
  }
259
277
  ),
260
- k && /* @__PURE__ */ o(j, { children: d.length ? V.length ? /* @__PURE__ */ o(
261
- ke,
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[i],
266
- t[N]
283
+ t[s],
284
+ t[L]
267
285
  ),
268
286
  modal: !1,
269
287
  static: !0,
270
288
  children: ({ option: e }) => /* @__PURE__ */ o(
271
- qe,
289
+ Ee,
272
290
  {
273
291
  value: e,
274
292
  className: ({ focus: n }) => r(
275
293
  t.option,
276
- Z,
277
- i && t[i],
294
+ se,
295
+ s && t[s],
278
296
  {
279
297
  [t["option-active"]]: n
280
298
  }
281
299
  ),
282
- children: /* @__PURE__ */ b(j, { children: [
283
- /* @__PURE__ */ b("div", { className: t["option-inner"], children: [
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
- me,
306
+ Ie,
289
307
  {
290
308
  isInteractive: !1,
291
- checked: l.some(
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[i],
324
+ t[s],
307
325
  t["no-options"],
308
- t[N]
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[i],
335
+ t[s],
318
336
  t["no-options"],
319
- t[N]
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
- ee && l.length > 0 && /* @__PURE__ */ o("div", { className: t["chip-container"], children: l.map((e) => /* @__PURE__ */ o(
330
- _e,
347
+ le && i.length > 0 && /* @__PURE__ */ o("div", { className: t["chip-container"], children: i.map((e) => /* @__PURE__ */ o(
348
+ be,
331
349
  {
332
- size: i === O.L ? "s" : "xs",
333
- variant: te,
350
+ size: s === y.L ? "s" : "xs",
351
+ variant: ie,
334
352
  className: t["chip-root"],
335
353
  withAction: !0,
336
- onClose: () => oe(e),
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
- Ue as MultiSelectSearch
363
+ Ze as MultiSelectSearch
346
364
  };
@@ -2,3 +2,6 @@ export declare enum EMultiSelectSearchSize {
2
2
  M = "m",
3
3
  L = "l"
4
4
  }
5
+ export declare const MOBILE_BREAKPOINT = 767;
6
+ export declare const MOBILE_MENU_HEIGHT = 264;
7
+ export declare const DESKTOP_MENU_HEIGHT = 320;
@@ -1,4 +1,8 @@
1
- var m = /* @__PURE__ */ ((r) => (r.M = "m", r.L = "l", r))(m || {});
1
+ var I = /* @__PURE__ */ ((E) => (E.M = "m", E.L = "l", E))(I || {});
2
+ const _ = 767, n = 264, o = 320;
2
3
  export {
3
- m as EMultiSelectSearchSize
4
+ o as DESKTOP_MENU_HEIGHT,
5
+ I as EMultiSelectSearchSize,
6
+ _ as MOBILE_BREAKPOINT,
7
+ n as MOBILE_MENU_HEIGHT
4
8
  };
@@ -63,4 +63,8 @@ export type TMultiSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'var
63
63
  * Уникальный идентификатор мультиселекта
64
64
  */
65
65
  id?: string;
66
+ /**
67
+ * Автоматическое определение положения выпадающего меню
68
+ */
69
+ autoPlacement?: boolean;
66
70
  };
@@ -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 e } from "../Input/constants.js";
4
- const w = (t) => {
3
+ import { EInputSize as r } from "../Input/constants.js";
4
+ const m = (t) => {
5
5
  switch (t) {
6
6
  case o.M:
7
- return e.M;
7
+ return r.M;
8
8
  case o.L:
9
- return e.L;
9
+ return r.L;
10
10
  default:
11
- return e.M;
11
+ return r.M;
12
12
  }
13
- }, s = (t, r) => t ? r === o.L ? "DropdownArrowUp24px" : "DropdownArrowUp16px" : r === o.L ? "DropdownArrowDown24px" : "DropdownArrowBottom16px", m = (t, r) => t && t.length > 0 ? t.map((n) => n[r]).join(", ") : "", d = (t, r) => t.map((n) => n[r]).join(", "), p = "multiselectOpen", a = (t) => {
14
- window.dispatchEvent(new CustomEvent(p, { detail: t }));
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
- p as MULTISELECT_OPEN_EVENT,
18
- a as dispatchMultiselectOpen,
19
- s as getDropdownArrowIcon,
20
- m as getInitialInputValue,
21
- d as joinSelectedItems,
22
- w as mapSizeToInputSize
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
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as ee, jsx as L, Fragment as _e } from "react/jsx-runtime";
2
- import { K as V, w as ye, a as oe, z as te, U as ie, b as ke, T as Oe, j as we, u as Pe, I as Ee, G as Te, p as De } from "../../label-D4GFpe5F.js";
3
- import { W, y as z, o as U, H as K, s as se, n as ne, $ as le, b as de, D as ue, a as Ce, u as Ge, c as N } from "../../keyboard-mgWkd2Vh.js";
2
+ import { K as V, w as ye, a as oe, z as te, U as ie, b as ke, T as Oe, j as we, u as Pe, I as Ee, G as Te, p as De } from "../../label-y3ANLTNC.js";
3
+ import { W, y as z, o as U, H as K, s as se, n as ne, $ as le, b as de, D as ue, a as Ce, u as Ge, c as N } from "../../keyboard-B0lm_zyn.js";
4
4
  import E, { createContext as ce, useId as q, useReducer as xe, useRef as B, useMemo as T, useCallback as Fe, useContext as pe, forwardRef as Ne } from "react";
5
5
  import { u as Ae } from "../../use-by-comparator-CVuf9KBq.js";
6
6
  import { r as fe } from "../../bugs-diTMAGNw.js";
7
- import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-BtPpk3D1.js";
7
+ import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-DE4t_lW3.js";
8
8
  import { c as M } from "../../index-DIxK0V-G.js";
9
9
  import '../../assets/RadioGroup.css';var Se = ((e) => (e[e.RegisterOption = 0] = "RegisterOption", e[e.UnregisterOption = 1] = "UnregisterOption", e))(Se || {});
10
10
  let Le = { 0(e, r) {