mimir-ui-kit 1.61.1 → 1.62.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.
@@ -1,24 +1,24 @@
1
- import { jsx as s, jsxs as d, Fragment as D } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as d, Fragment as b } from "react/jsx-runtime";
2
2
  import { c as a } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as b } from "react";
4
- import { EDropdownSelectSize as y } from "./constants.js";
3
+ import { forwardRef as y } from "react";
4
+ import { EDropdownSelectSize as S } from "./constants.js";
5
5
  import { Icon as f } from "../../icons/Icon.js";
6
- import { H as S, U as C, K as k, W as U } from "../../combobox-fIVOzEhl.js";
7
- import '../../assets/DropdownSelect.css';const V = "_full_ow9jf_265", z = "_disabled_ow9jf_268", A = "_trigger_ow9jf_273", H = "_options_ow9jf_313", K = "_option_ow9jf_313", W = "_focused_ow9jf_356", B = "_s_ow9jf_381", E = "_m_ow9jf_390", F = "_l_ow9jf_399", e = {
6
+ import { H as C, U as k, K as U, W as V } from "../../combobox-fIVOzEhl.js";
7
+ import '../../assets/DropdownSelect.css';const z = "_full_ow9jf_265", A = "_disabled_ow9jf_268", H = "_trigger_ow9jf_273", K = "_options_ow9jf_313", M = "_option_ow9jf_313", W = "_focused_ow9jf_356", B = "_s_ow9jf_381", E = "_m_ow9jf_390", F = "_l_ow9jf_399", e = {
8
8
  "dropdown-select": "_dropdown-select_ow9jf_261",
9
- full: V,
10
- disabled: z,
11
- trigger: A,
9
+ full: z,
10
+ disabled: A,
11
+ trigger: H,
12
12
  "trigger-text": "_trigger-text_ow9jf_302",
13
- options: H,
14
- option: K,
13
+ options: K,
14
+ option: M,
15
15
  focused: W,
16
16
  "option-content": "_option-content_ow9jf_360",
17
17
  "option-check": "_option-check_ow9jf_372",
18
18
  s: B,
19
19
  m: E,
20
20
  l: F
21
- }, I = b(
21
+ }, I = y(
22
22
  (p, _) => {
23
23
  const {
24
24
  value: t,
@@ -31,17 +31,18 @@ import '../../assets/DropdownSelect.css';const V = "_full_ow9jf_265", z = "_disa
31
31
  optionsClassName: j,
32
32
  optionClassName: N,
33
33
  full: c = !1,
34
- size: l = y.M
35
- } = p, h = (o) => {
34
+ isModal: h = !0,
35
+ size: l = S.M
36
+ } = p, x = (o) => {
36
37
  n == null || n(o);
37
- }, x = (o) => o ? o.displayValue ? o.displayValue : typeof o.name == "string" ? o.name : typeof o.value == "string" ? o.value : String(o.id) : "";
38
+ }, v = (o) => o ? o.displayValue ? o.displayValue : typeof o.name == "string" ? o.name : typeof o.value == "string" ? o.value : String(o.id) : "";
38
39
  return /* @__PURE__ */ s(
39
- S,
40
+ C,
40
41
  {
41
42
  as: "div",
42
43
  ref: _,
43
44
  value: t,
44
- onChange: h,
45
+ onChange: x,
45
46
  disabled: i,
46
47
  className: a(
47
48
  e["dropdown-select"],
@@ -52,9 +53,9 @@ import '../../assets/DropdownSelect.css';const V = "_full_ow9jf_265", z = "_disa
52
53
  },
53
54
  g
54
55
  ),
55
- children: ({ open: o }) => /* @__PURE__ */ d(D, { children: [
56
+ children: ({ open: o }) => /* @__PURE__ */ d(b, { children: [
56
57
  /* @__PURE__ */ d(
57
- C,
58
+ k,
58
59
  {
59
60
  className: a(
60
61
  e.trigger,
@@ -67,7 +68,7 @@ import '../../assets/DropdownSelect.css';const V = "_full_ow9jf_265", z = "_disa
67
68
  ),
68
69
  "data-testid": "dropdown-select-trigger",
69
70
  children: [
70
- /* @__PURE__ */ s("span", { className: a(e["trigger-text"]), children: t ? x(t) : w }),
71
+ /* @__PURE__ */ s("span", { className: a(e["trigger-text"]), children: t ? v(t) : w }),
71
72
  /* @__PURE__ */ s(
72
73
  f,
73
74
  {
@@ -78,19 +79,20 @@ import '../../assets/DropdownSelect.css';const V = "_full_ow9jf_265", z = "_disa
78
79
  }
79
80
  ),
80
81
  /* @__PURE__ */ s(
81
- k,
82
+ U,
82
83
  {
84
+ modal: h,
83
85
  className: a(e.options, e[l], j),
84
86
  "data-testid": "dropdown-select-options",
85
87
  children: m.map((r) => /* @__PURE__ */ d(
86
- U,
88
+ V,
87
89
  {
88
90
  value: r,
89
- className: ({ focus: v }) => a(
91
+ className: ({ focus: D }) => a(
90
92
  e.option,
91
93
  e[l],
92
94
  {
93
- [e.focused]: v
95
+ [e.focused]: D
94
96
  },
95
97
  N
96
98
  ),
@@ -53,4 +53,8 @@ export type TDropdownSelectProps = {
53
53
  * Полная ширина компонента
54
54
  */
55
55
  full?: boolean;
56
+ /**
57
+ * Если `false`, разрешает прокрутку страницы и клики по внешним элементам при открытом списке, иначе блокирует скролл.
58
+ */
59
+ isModal?: boolean;
56
60
  };
@@ -25,6 +25,7 @@ type TUseRenderVirtualizedListProps = {
25
25
  highlightMatches?: boolean;
26
26
  internalSearchQuery?: string;
27
27
  searchInHeaderGroupItems?: boolean;
28
+ isModal?: boolean;
28
29
  };
29
- export declare const useRenderVirtualizedList: ({ items, filteredItems, size, actualMenuPlacement, isVisible, noOptionsText, noMatchText, enableNestedSelection, renderNestedOptions, groupBy, parentRef, virtualItems, virtualizer, classNameOption, selectedItems, renderOptionContent, cls, useIconInsteadOfCheckbox, highlightMatches, internalSearchQuery, searchInHeaderGroupItems }: TUseRenderVirtualizedListProps) => () => ReactNode;
30
+ export declare const useRenderVirtualizedList: ({ items, filteredItems, size, actualMenuPlacement, isVisible, noOptionsText, noMatchText, enableNestedSelection, renderNestedOptions, groupBy, parentRef, virtualItems, virtualizer, classNameOption, selectedItems, renderOptionContent, cls, useIconInsteadOfCheckbox, highlightMatches, internalSearchQuery, searchInHeaderGroupItems, isModal }: TUseRenderVirtualizedListProps) => () => ReactNode;
30
31
  export {};
@@ -1,14 +1,14 @@
1
1
  import { jsx as n, jsxs as $, Fragment as D } from "react/jsx-runtime";
2
- import { c } from "../../../index-DIxK0V-G.js";
2
+ import { c as f } from "../../../index-DIxK0V-G.js";
3
3
  import { Icon as k } from "../../../icons/Icon.js";
4
4
  import { CheckboxMimir as b } from "../../CheckboxMimir/CheckboxMimir.js";
5
5
  import { EMultiSelectSearchSize as j } from "../constants.js";
6
- import { highlightReactNode as I } from "../utils.js";
7
- import { W as E, K } from "../../../combobox-fIVOzEhl.js";
8
- const W = (i, a, o, r, e) => /* @__PURE__ */ n(
6
+ import { highlightReactNode as K } from "../utils.js";
7
+ import { W as E, K as W } from "../../../combobox-fIVOzEhl.js";
8
+ const w = (i, a, o, r, e) => /* @__PURE__ */ n(
9
9
  "div",
10
10
  {
11
- className: c(
11
+ className: f(
12
12
  e.options,
13
13
  e[i],
14
14
  e["no-options"],
@@ -17,10 +17,10 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
17
17
  ),
18
18
  children: r
19
19
  }
20
- ), w = (i, a, o, r, e) => /* @__PURE__ */ n(
20
+ ), F = (i, a, o, r, e) => /* @__PURE__ */ n(
21
21
  "div",
22
22
  {
23
- className: c(
23
+ className: f(
24
24
  e.options,
25
25
  e[i],
26
26
  e["no-options"],
@@ -29,21 +29,21 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
29
29
  ),
30
30
  children: r
31
31
  }
32
- ), F = (i, a, o, r, e, p) => /* @__PURE__ */ n(
32
+ ), H = (i, a, o, r, e, p) => /* @__PURE__ */ n(
33
33
  "div",
34
34
  {
35
- className: c(p.options, p[i], p[a], {
35
+ className: f(p.options, p[i], p[a], {
36
36
  [p.visible]: o
37
37
  }),
38
38
  children: e(r)
39
39
  }
40
- ), H = (i, a, o, r, e, p, d, N, v, t, m, f, x, g, l) => {
41
- const u = new Set(N.map((s) => s.id));
40
+ ), T = (i, a, o, r, e, p, d, v, x, t, g, m, N, c, l) => {
41
+ const u = new Set(v.map((s) => s.id));
42
42
  return /* @__PURE__ */ n(
43
43
  "div",
44
44
  {
45
45
  ref: r,
46
- className: c(
46
+ className: f(
47
47
  t.options,
48
48
  t[i],
49
49
  t[a],
@@ -76,9 +76,9 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
76
76
  {
77
77
  className: t["group-header"],
78
78
  "data-testid": `group-header-${h.name}`,
79
- children: x && g && l ? I(
79
+ children: N && c && l ? K(
80
80
  h.name,
81
- g,
81
+ c,
82
82
  t["highlighted-text"]
83
83
  ) : h.name
84
84
  }
@@ -86,13 +86,13 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
86
86
  E,
87
87
  {
88
88
  value: h,
89
- className: ({ focus: L }) => c(t.option, d, i && t[i], {
90
- [t["option-active"]]: L && !m
89
+ className: ({ focus: L }) => f(t.option, d, i && t[i], {
90
+ [t["option-active"]]: L && !g
91
91
  }),
92
92
  "data-testid": `option-${h.id}`,
93
93
  children: /* @__PURE__ */ $(D, { children: [
94
- /* @__PURE__ */ n("div", { className: t["option-inner"], children: v(h) }),
95
- f ? S && /* @__PURE__ */ n(
94
+ /* @__PURE__ */ n("div", { className: t["option-inner"], children: x(h) }),
95
+ m ? S && /* @__PURE__ */ n(
96
96
  k,
97
97
  {
98
98
  iconName: i === j.L ? "Done24px" : "Done16px",
@@ -117,35 +117,35 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
117
117
  )
118
118
  }
119
119
  );
120
- }, T = (i, a, o, r, e, p, d, N, v) => {
121
- const t = new Set(e.map((m) => m.id));
120
+ }, Y = (i, a, o, r, e, p, d, v, x, t) => {
121
+ const g = new Set(e.map((m) => m.id));
122
122
  return /* @__PURE__ */ n(
123
- K,
123
+ W,
124
124
  {
125
- className: c(d.options, d[i], d[a], {
125
+ className: f(d.options, d[i], d[a], {
126
126
  [d.visible]: o
127
127
  }),
128
- modal: !1,
128
+ modal: t,
129
129
  static: !0,
130
130
  children: ({ option: m }) => {
131
- const f = t.has(m.id);
131
+ const N = g.has(m.id);
132
132
  return /* @__PURE__ */ n(
133
133
  E,
134
134
  {
135
135
  value: m,
136
- className: ({ focus: x }) => c(d.option, r, i && d[i], {
137
- [d["option-active"]]: x && !N
136
+ className: ({ focus: c }) => f(d.option, r, i && d[i], {
137
+ [d["option-active"]]: c && !v
138
138
  }),
139
139
  "data-testid": `option-${m.id}`,
140
140
  children: /* @__PURE__ */ $(D, { children: [
141
141
  /* @__PURE__ */ n("div", { className: d["option-inner"], children: p(m) }),
142
- v ? f && /* @__PURE__ */ n(
142
+ x ? N && /* @__PURE__ */ n(
143
143
  k,
144
144
  {
145
145
  iconName: i === j.L ? "Done24px" : "Done16px",
146
146
  className: d["selected-icon"]
147
147
  }
148
- ) : /* @__PURE__ */ n(b, { isInteractive: !1, checked: f })
148
+ ) : /* @__PURE__ */ n(b, { isInteractive: !1, checked: N })
149
149
  ] })
150
150
  },
151
151
  m.id
@@ -153,7 +153,7 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
153
153
  }
154
154
  }
155
155
  );
156
- }, Z = ({
156
+ }, _ = ({
157
157
  items: i,
158
158
  filteredItems: a,
159
159
  size: o,
@@ -161,35 +161,36 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
161
161
  isVisible: e,
162
162
  noOptionsText: p,
163
163
  noMatchText: d,
164
- enableNestedSelection: N,
165
- renderNestedOptions: v,
164
+ enableNestedSelection: v,
165
+ renderNestedOptions: x,
166
166
  groupBy: t,
167
- parentRef: m,
168
- virtualItems: f,
169
- virtualizer: x,
170
- classNameOption: g,
167
+ parentRef: g,
168
+ virtualItems: m,
169
+ virtualizer: N,
170
+ classNameOption: c,
171
171
  selectedItems: l,
172
172
  renderOptionContent: u,
173
173
  cls: s,
174
174
  useIconInsteadOfCheckbox: h = !1,
175
175
  highlightMatches: S = !1,
176
176
  internalSearchQuery: L,
177
- searchInHeaderGroupItems: G = !1
178
- }) => () => i.length ? a.length ? N ? F(
177
+ searchInHeaderGroupItems: G = !1,
178
+ isModal: I = !0
179
+ }) => () => i.length ? a.length ? v ? H(
179
180
  o,
180
181
  r,
181
182
  e,
182
183
  a,
183
- v,
184
+ x,
184
185
  s
185
- ) : t ? H(
186
+ ) : t ? T(
186
187
  o,
187
188
  r,
188
189
  e,
189
- m,
190
- f,
191
- x,
192
190
  g,
191
+ m,
192
+ N,
193
+ c,
193
194
  l,
194
195
  u,
195
196
  s,
@@ -198,23 +199,24 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
198
199
  S,
199
200
  L,
200
201
  G
201
- ) : T(
202
+ ) : Y(
202
203
  o,
203
204
  r,
204
205
  e,
205
- g,
206
+ c,
206
207
  l,
207
208
  u,
208
209
  s,
209
210
  t,
210
- h
211
- ) : w(
211
+ h,
212
+ I
213
+ ) : F(
212
214
  o,
213
215
  r,
214
216
  e,
215
217
  d,
216
218
  s
217
- ) : W(
219
+ ) : w(
218
220
  o,
219
221
  r,
220
222
  e,
@@ -222,5 +224,5 @@ const W = (i, a, o, r, e) => /* @__PURE__ */ n(
222
224
  s
223
225
  );
224
226
  export {
225
- Z as useRenderVirtualizedList
227
+ _ as useRenderVirtualizedList
226
228
  };
@@ -33,4 +33,5 @@ export declare const SelectSearch: import('react').ForwardRefExoticComponent<Pic
33
33
  borderRadius?: ESelectSearchBorderRadius | `${ESelectSearchBorderRadius}`;
34
34
  highlightMatches?: boolean;
35
35
  searchInHeaderGroupItems?: boolean;
36
+ isModal?: boolean;
36
37
  } & import('react').RefAttributes<HTMLElement>>;
@@ -1,50 +1,50 @@
1
1
  import { jsx as r, jsxs as p, Fragment as D } from "react/jsx-runtime";
2
- import { u as Oe } from "../../index-D5H8gPPn.js";
2
+ import { u as Ve } from "../../index-D5H8gPPn.js";
3
3
  import { c as s } from "../../index-DIxK0V-G.js";
4
- import { forwardRef as Ve, useRef as ie, useState as E, useMemo as T, useCallback as le, useEffect as ce } from "react";
5
- import { ESelectSearchSize as c, ELoadingIndicatorPlacement as w, ESelectSearchBorderRadius as ke } from "./constants.js";
6
- import { prepareGroupedItems as Ae, shouldShowMenuOnTop as Be, mapSizeToInputSize as de, getDropdownArrowIcon as Te, highlightReactNode as ue } from "./utils.js";
4
+ import { forwardRef as ke, useRef as ie, useState as E, useMemo as T, useCallback as le, useEffect as ce } from "react";
5
+ import { ESelectSearchSize as c, ELoadingIndicatorPlacement as w, ESelectSearchBorderRadius as Ae } from "./constants.js";
6
+ import { prepareGroupedItems as Be, shouldShowMenuOnTop as Te, mapSizeToInputSize as de, getDropdownArrowIcon as Pe, highlightReactNode as ue } from "./utils.js";
7
7
  import { Icon as P } from "../../icons/Icon.js";
8
- import { Button as Pe } from "../Button/Button.js";
8
+ import { Button as Ge } from "../Button/Button.js";
9
9
  import { I as pe } from "../../Input-DPnH8pKc.js";
10
- import { EInputVariant as Ge } from "../Input/constants.js";
10
+ import { EInputVariant as qe } from "../Input/constants.js";
11
11
  import { Loader as he } from "../Loader/Loader.js";
12
- import { H as qe, U as me, G as _e, W as be, K as Re } from "../../combobox-fIVOzEhl.js";
13
- import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_options_11tdb_15", He = "_top_11tdb_26", $e = "_bottom_11tdb_32", Ke = "_disabled_11tdb_63", Ue = "_full_11tdb_100", We = "_button_11tdb_112", Qe = "_s_11tdb_59", Ye = "_m_11tdb_140", Je = "_l_11tdb_153", Xe = "_loader_11tdb_186", Ze = "_option_11tdb_15", et = "_clear_11tdb_225", e = {
14
- container: je,
12
+ import { H as Re, U as me, G as _e, W as be, K as je } from "../../combobox-fIVOzEhl.js";
13
+ import '../../assets/SelectSearch.css';const Fe = "_container_11tdb_2", He = "_options_11tdb_15", $e = "_top_11tdb_26", Ke = "_bottom_11tdb_32", Ue = "_disabled_11tdb_63", We = "_full_11tdb_100", Qe = "_button_11tdb_112", Ye = "_s_11tdb_59", Je = "_m_11tdb_140", Xe = "_l_11tdb_153", Ze = "_loader_11tdb_186", et = "_option_11tdb_15", tt = "_clear_11tdb_225", e = {
14
+ container: Fe,
15
15
  "container-open": "_container-open_11tdb_11",
16
- options: Fe,
17
- top: He,
18
- bottom: $e,
16
+ options: He,
17
+ top: $e,
18
+ bottom: Ke,
19
19
  "no-options": "_no-options_11tdb_38",
20
20
  "select-search": "_select-search_11tdb_59",
21
- disabled: Ke,
21
+ disabled: Ue,
22
22
  "border-radius-left": "_border-radius-left_11tdb_69",
23
23
  "border-radius-right": "_border-radius-right_11tdb_81",
24
24
  "border-radius-none": "_border-radius-none_11tdb_93",
25
- full: Ue,
25
+ full: We,
26
26
  "selected-icon": "_selected-icon_11tdb_104",
27
27
  "selector-icon-open": "_selector-icon-open_11tdb_108",
28
- button: We,
28
+ button: Qe,
29
29
  "selector-icon": "_selector-icon_11tdb_108",
30
- s: Qe,
31
- m: Ye,
32
- l: Je,
30
+ s: Ye,
31
+ m: Je,
32
+ l: Xe,
33
33
  "select-search-input": "_select-search-input_11tdb_166",
34
34
  "select-search-input-disabled": "_select-search-input-disabled_11tdb_169",
35
35
  "group-header": "_group-header_11tdb_176",
36
- loader: Xe,
36
+ loader: Ze,
37
37
  "input-container": "_input-container_11tdb_191",
38
- option: Ze,
38
+ option: et,
39
39
  "option-active": "_option-active_11tdb_205",
40
40
  "option-inner": "_option-inner_11tdb_208",
41
41
  "right-slot": "_right-slot_11tdb_215",
42
42
  "required-mark": "_required-mark_11tdb_220",
43
- clear: et,
43
+ clear: tt,
44
44
  "icon-button": "_icon-button_11tdb_234",
45
45
  "highlighted-text": "_highlighted-text_11tdb_238",
46
46
  "highlighted-text-wrapper": "_highlighted-text-wrapper_11tdb_243"
47
- }, tt = Ve(
47
+ }, ot = ke(
48
48
  (fe, ge) => {
49
49
  const {
50
50
  placeholder: G,
@@ -59,7 +59,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
59
59
  displayValue: y = "name",
60
60
  filterOnSearch: j = !0,
61
61
  onSearch: x,
62
- variant: F = Ge.DefaultGray,
62
+ variant: F = qe.DefaultGray,
63
63
  menuPlacement: I = "bottom",
64
64
  disabled: u = !1,
65
65
  searchProps: H,
@@ -67,26 +67,27 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
67
67
  disableInput: f = !1,
68
68
  autocomplete: $ = "on",
69
69
  immediate: Se = !1,
70
- noOptionsText: we = "Нет данных",
71
- noMatchText: ye = "Ничего не найдено",
70
+ isModal: we = !0,
71
+ noOptionsText: ye = "Нет данных",
72
+ noMatchText: xe = "Ничего не найдено",
72
73
  loadOnOpen: V,
73
74
  loading: K,
74
75
  loadingIndicatorPlacement: C = w.Dropdown,
75
76
  groupBy: l,
76
77
  getGroupTitle: U = (t) => t,
77
- optionLayout: xe = "name-bottom",
78
+ optionLayout: Ie = "name-bottom",
78
79
  autoPlacement: L = !1,
79
- borderRadius: W = ke.All,
80
+ borderRadius: W = Ae.All,
80
81
  highlightMatches: Q = !1,
81
82
  searchInHeaderGroupItems: z = !1
82
83
  } = fe, k = (t) => {
83
84
  if (!t) return "";
84
85
  const o = t[y];
85
86
  return typeof o == "string" ? o : String(o || "");
86
- }, Ie = (t) => {
87
+ }, Ce = (t) => {
87
88
  const o = t[y];
88
89
  return typeof o == "string" ? o : String(o || "");
89
- }, A = k(d), Y = ie(null), J = ie(null), [g, v] = E(A), [h, N] = E(d), [Ce, X] = E(!1), [M, Z] = E(I), ee = K !== void 0 ? K : Ce, m = T(() => String(g || "").trim().toLowerCase(), [g]), S = T(() => {
90
+ }, A = k(d), Y = ie(null), J = ie(null), [g, v] = E(A), [h, N] = E(d), [Le, X] = E(!1), [M, Z] = E(I), ee = K !== void 0 ? K : Le, m = T(() => String(g || "").trim().toLowerCase(), [g]), S = T(() => {
90
91
  if (!j)
91
92
  return b;
92
93
  if (l && z) {
@@ -95,7 +96,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
95
96
  l && o[l] && String(o[l]).toLowerCase().includes(m) && t.add(o);
96
97
  }), Array.from(t);
97
98
  }
98
- return m ? b.filter((t) => Ie(t).toLowerCase().includes(m)) : b;
99
+ return m ? b.filter((t) => Ce(t).toLowerCase().includes(m)) : b;
99
100
  }, [
100
101
  m,
101
102
  b,
@@ -103,11 +104,11 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
103
104
  y,
104
105
  l,
105
106
  z
106
- ]), te = T(() => l ? Ae(
107
+ ]), te = T(() => l ? Be(
107
108
  S,
108
109
  l,
109
110
  U || ((t) => t)
110
- ) : S, [S, l, U]), B = Oe({
111
+ ) : S, [S, l, U]), B = Ve({
111
112
  count: te.length,
112
113
  getScrollElement: () => Y.current,
113
114
  estimateSize: () => n === c.L ? 65 : 49,
@@ -117,7 +118,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
117
118
  Z(I);
118
119
  return;
119
120
  }
120
- const t = Be(J, n);
121
+ const t = Te(J, n);
121
122
  Z(t ? "top" : I);
122
123
  }, [L, I, n]);
123
124
  ce(() => {
@@ -133,7 +134,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
133
134
  } finally {
134
135
  X(!1);
135
136
  }
136
- }, Le = (t) => {
137
+ }, ze = (t) => {
137
138
  if (t) {
138
139
  const o = k(t);
139
140
  v(o), N(t), i == null || i(t);
@@ -146,7 +147,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
146
147
  v(o), x == null || x(o), h && o !== k(h) && N(null), !o && d && (i == null || i({ id: "", name: "" }));
147
148
  },
148
149
  [f, i, x, d, h, y]
149
- ), ze = () => {
150
+ ), Me = () => {
150
151
  v(""), N(null), i == null || i({ id: "", name: "" });
151
152
  }, re = async (t) => {
152
153
  f && t.target.blur(), _(), V && await oe();
@@ -155,10 +156,10 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
155
156
  const t = !d || typeof d == "object" && !Object.keys(d).length;
156
157
  v(t ? "" : A), N(t ? null : d);
157
158
  }, [d, A]);
158
- const Me = () => ee && (C === w.Dropdown || C === w.Both) ? /* @__PURE__ */ p("div", { className: e.loader, children: [
159
+ const De = () => ee && (C === w.Dropdown || C === w.Both) ? /* @__PURE__ */ p("div", { className: e.loader, children: [
159
160
  /* @__PURE__ */ r(he, { size: "s" }),
160
161
  "Загрузка..."
161
- ] }) : we, De = (t) => {
162
+ ] }) : ye, Ee = (t) => {
162
163
  if (Ne)
163
164
  return {
164
165
  addonType: "react-node",
@@ -193,14 +194,14 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
193
194
  e["highlighted-text"]
194
195
  ));
195
196
  const a = t.bottom && /* @__PURE__ */ r("div", { children: t.bottom });
196
- return xe === "bottom-name" ? /* @__PURE__ */ p(D, { children: [
197
+ return Ie === "bottom-name" ? /* @__PURE__ */ p(D, { children: [
197
198
  a,
198
199
  o
199
200
  ] }) : /* @__PURE__ */ p(D, { children: [
200
201
  o,
201
202
  a
202
203
  ] });
203
- }, Ee = (t) => b.length ? S.length ? l ? /* @__PURE__ */ r(
204
+ }, Oe = (t) => b.length ? S.length ? l ? /* @__PURE__ */ r(
204
205
  "div",
205
206
  {
206
207
  ref: Y,
@@ -289,8 +290,9 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
289
290
  )
290
291
  }
291
292
  ) : /* @__PURE__ */ r(
292
- Re,
293
+ je,
293
294
  {
295
+ modal: we,
294
296
  className: s(
295
297
  e.options,
296
298
  e[n],
@@ -344,7 +346,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
344
346
  e[M]
345
347
  ),
346
348
  "data-headlessui-state": t ? "open" : "closed",
347
- children: ye
349
+ children: xe
348
350
  }
349
351
  ) : /* @__PURE__ */ r(
350
352
  "div",
@@ -356,11 +358,11 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
356
358
  e[M]
357
359
  ),
358
360
  "data-headlessui-state": t ? "open" : "closed",
359
- children: Me()
361
+ children: De()
360
362
  }
361
363
  );
362
364
  return /* @__PURE__ */ r(
363
- qe,
365
+ Re,
364
366
  {
365
367
  as: "div",
366
368
  value: h,
@@ -368,7 +370,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
368
370
  [e.full]: ve,
369
371
  [e.disabled]: u
370
372
  }),
371
- onChange: Le,
373
+ onChange: ze,
372
374
  ref: ge,
373
375
  disabled: u,
374
376
  virtual: l ? void 0 : { options: S },
@@ -408,7 +410,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
408
410
  onFocus: re,
409
411
  rightAddon: {
410
412
  addonType: "icon",
411
- addonContent: Te(t, n)
413
+ addonContent: Pe(t, n)
412
414
  },
413
415
  autocomplete: $,
414
416
  borderRadius: W,
@@ -418,7 +420,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
418
420
  }
419
421
  ),
420
422
  O && g && /* @__PURE__ */ r(
421
- Pe,
423
+ Ge,
422
424
  {
423
425
  tabIndex: -1,
424
426
  className: s(e.clear, {
@@ -432,7 +434,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
432
434
  disabled: u,
433
435
  variant: "secondary-gray",
434
436
  onClick: (o) => {
435
- o.stopPropagation(), ze();
437
+ o.stopPropagation(), Me();
436
438
  },
437
439
  "data-testid": "clear-button"
438
440
  }
@@ -452,7 +454,7 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
452
454
  variant: F,
453
455
  withClearButton: O && !!g,
454
456
  onChange: ne,
455
- rightAddon: De(t),
457
+ rightAddon: Ee(t),
456
458
  "data-testid": "select-search-input",
457
459
  onFocus: re,
458
460
  autocomplete: $,
@@ -463,13 +465,13 @@ import '../../assets/SelectSearch.css';const je = "_container_11tdb_2", Fe = "_o
463
465
  ]
464
466
  }
465
467
  ),
466
- t && Ee(t)
468
+ t && Oe(t)
467
469
  ] })
468
470
  }
469
471
  );
470
472
  }
471
473
  );
472
- tt.displayName = "SelectSearch";
474
+ ot.displayName = "SelectSearch";
473
475
  export {
474
- tt as SelectSearch
476
+ ot as SelectSearch
475
477
  };
@@ -114,4 +114,8 @@ export type TSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'
114
114
  * @default false
115
115
  */
116
116
  searchInHeaderGroupItems?: boolean;
117
+ /**
118
+ * Если `false`, разрешает прокрутку страницы и клики по внешним элементам при открытом списке, иначе блокирует скролл.
119
+ */
120
+ isModal?: boolean;
117
121
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.61.1",
4
+ "version": "1.62.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {