mimir-ui-kit 1.44.2 → 1.45.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,193 +1,191 @@
1
- import { jsx as s, jsxs as c, Fragment as T } from "react/jsx-runtime";
2
- import { u as Ae } from "../../index-D5H8gPPn.js";
3
- import { c as r } from "../../index-DIxK0V-G.js";
4
- import { forwardRef as Be, useRef as me, useState as N, useMemo as F, useCallback as pe, useEffect as H } from "react";
5
- import { ESelectSearchSize as l, ELoadingIndicatorPlacement as S, ESelectSearchBorderRadius as Pe } from "./constants.js";
6
- import { prepareGroupedItems as Ge, shouldShowMenuOnTop as je, mapSizeToInputSize as he, getDropdownArrowIcon as Fe } from "./utils.js";
7
- import { Icon as R } from "../../icons/Icon.js";
8
- import { Button as He } from "../Button/Button.js";
9
- import { I as _e } from "../../Input-IzZ6B9kw.js";
10
- import { EInputVariant as Re } from "../Input/constants.js";
11
- import { Loader as fe } from "../Loader/Loader.js";
12
- import { H as $e, U as xe, G as ve, W as ge, K as Ke } from "../../combobox-fIVOzEhl.js";
13
- import '../../assets/SelectSearch.css';const Ue = "_container_1x6qm_2", We = "_options_1x6qm_15", Qe = "_top_1x6qm_26", Ye = "_bottom_1x6qm_32", Je = "_disabled_1x6qm_63", Xe = "_full_1x6qm_100", Ze = "_button_1x6qm_112", et = "_s_1x6qm_59", tt = "_m_1x6qm_140", nt = "_l_1x6qm_153", ot = "_loader_1x6qm_191", st = "_option_1x6qm_15", it = "_clear_1x6qm_230", t = {
14
- container: Ue,
15
- "container-open": "_container-open_1x6qm_11",
16
- options: We,
17
- top: Qe,
18
- bottom: Ye,
19
- "no-options": "_no-options_1x6qm_38",
20
- "select-search": "_select-search_1x6qm_59",
21
- disabled: Je,
22
- "border-radius-left": "_border-radius-left_1x6qm_69",
23
- "border-radius-right": "_border-radius-right_1x6qm_81",
24
- "border-radius-none": "_border-radius-none_1x6qm_93",
25
- full: Xe,
26
- "selected-icon": "_selected-icon_1x6qm_104",
27
- "selector-icon-open": "_selector-icon-open_1x6qm_108",
28
- button: Ze,
29
- "selector-icon": "_selector-icon_1x6qm_108",
30
- s: et,
31
- m: tt,
32
- l: nt,
33
- "select-search-input": "_select-search-input_1x6qm_166",
34
- "select-search-input-disabled": "_select-search-input-disabled_1x6qm_169",
35
- "group-header": "_group-header_1x6qm_176",
36
- "sticky-active": "_sticky-active_1x6qm_187",
37
- loader: ot,
38
- "input-container": "_input-container_1x6qm_196",
39
- option: st,
40
- "option-active": "_option-active_1x6qm_210",
41
- "option-inner": "_option-inner_1x6qm_213",
42
- "right-slot": "_right-slot_1x6qm_220",
43
- "required-mark": "_required-mark_1x6qm_225",
44
- clear: it,
45
- "icon-button": "_icon-button_1x6qm_239"
46
- }, rt = Be(
47
- (be, ye) => {
1
+ import { jsx as r, jsxs as c, Fragment as B } from "react/jsx-runtime";
2
+ import { u as Ge } from "../../index-D5H8gPPn.js";
3
+ import { c as s } from "../../index-DIxK0V-G.js";
4
+ import { forwardRef as qe, useRef as he, useState as w, useMemo as P, useCallback as me, useEffect as R } from "react";
5
+ import { ESelectSearchSize as l, ELoadingIndicatorPlacement as I, ESelectSearchBorderRadius as je } from "./constants.js";
6
+ import { prepareGroupedItems as Fe, shouldShowMenuOnTop as He, mapSizeToInputSize as _e, getDropdownArrowIcon as Re, highlightReactNode as $e } from "./utils.js";
7
+ import { Icon as $ } from "../../icons/Icon.js";
8
+ import { Button as Ke } from "../Button/Button.js";
9
+ import { I as fe } from "../../Input-IzZ6B9kw.js";
10
+ import { EInputVariant as Ue } from "../Input/constants.js";
11
+ import { Loader as ve } from "../Loader/Loader.js";
12
+ import { H as We, U as ge, G as be, W as ye, K as Qe } from "../../combobox-fIVOzEhl.js";
13
+ import '../../assets/SelectSearch.css';const Ye = "_container_rnc9v_2", Je = "_options_rnc9v_15", Xe = "_top_rnc9v_26", Ze = "_bottom_rnc9v_32", et = "_disabled_rnc9v_63", tt = "_full_rnc9v_100", nt = "_button_rnc9v_112", ot = "_s_rnc9v_59", rt = "_m_rnc9v_140", it = "_l_rnc9v_153", st = "_loader_rnc9v_191", at = "_option_rnc9v_15", ct = "_clear_rnc9v_230", e = {
14
+ container: Ye,
15
+ "container-open": "_container-open_rnc9v_11",
16
+ options: Je,
17
+ top: Xe,
18
+ bottom: Ze,
19
+ "no-options": "_no-options_rnc9v_38",
20
+ "select-search": "_select-search_rnc9v_59",
21
+ disabled: et,
22
+ "border-radius-left": "_border-radius-left_rnc9v_69",
23
+ "border-radius-right": "_border-radius-right_rnc9v_81",
24
+ "border-radius-none": "_border-radius-none_rnc9v_93",
25
+ full: tt,
26
+ "selected-icon": "_selected-icon_rnc9v_104",
27
+ "selector-icon-open": "_selector-icon-open_rnc9v_108",
28
+ button: nt,
29
+ "selector-icon": "_selector-icon_rnc9v_108",
30
+ s: ot,
31
+ m: rt,
32
+ l: it,
33
+ "select-search-input": "_select-search-input_rnc9v_166",
34
+ "select-search-input-disabled": "_select-search-input-disabled_rnc9v_169",
35
+ "group-header": "_group-header_rnc9v_176",
36
+ "sticky-active": "_sticky-active_rnc9v_187",
37
+ loader: st,
38
+ "input-container": "_input-container_rnc9v_196",
39
+ option: at,
40
+ "option-active": "_option-active_rnc9v_210",
41
+ "option-inner": "_option-inner_rnc9v_213",
42
+ "right-slot": "_right-slot_rnc9v_220",
43
+ "required-mark": "_required-mark_rnc9v_225",
44
+ clear: ct,
45
+ "icon-button": "_icon-button_rnc9v_239",
46
+ "highlighted-text": "_highlighted-text_rnc9v_243",
47
+ "highlighted-text-wrapper": "_highlighted-text-wrapper_rnc9v_248"
48
+ }, lt = qe(
49
+ (xe, Ne) => {
48
50
  const {
49
- placeholder: $,
51
+ placeholder: K,
50
52
  size: o = l.L,
51
53
  value: d,
52
54
  onChange: a,
53
- full: qe,
54
- showArrow: Ne = !0,
55
- items: v = [],
56
- classNameOption: K,
57
- classNameOptionInner: U,
58
- displayValue: I = "name",
59
- filterOnSearch: W = !0,
60
- onSearch: w,
61
- variant: Q = Re.DefaultGray,
62
- menuPlacement: k = "bottom",
55
+ full: Se,
56
+ showArrow: we = !0,
57
+ items: g = [],
58
+ classNameOption: U,
59
+ classNameOptionInner: W,
60
+ displayValue: k = "name",
61
+ filterOnSearch: Q = !0,
62
+ onSearch: C,
63
+ variant: Y = Ue.DefaultGray,
64
+ menuPlacement: L = "bottom",
63
65
  disabled: u = !1,
64
- searchProps: Y,
65
- withClearButton: A = !1,
66
+ searchProps: J,
67
+ withClearButton: G = !1,
66
68
  disableInput: _ = !1,
67
- autocomplete: J = "on",
68
- immediate: Se = !1,
69
- noOptionsText: Ie = "Нет данных",
70
- noMatchText: we = "Ничего не найдено",
71
- loadOnOpen: B,
72
- loading: X,
73
- loadingIndicatorPlacement: C = S.Dropdown,
74
- groupBy: h,
75
- getGroupTitle: Z = (e) => e,
76
- optionLayout: ke = "name-bottom",
77
- autoPlacement: L = !1,
78
- borderRadius: ee = Pe.All
79
- } = be, P = (e) => {
80
- if (!e) return "";
81
- const n = e[I];
69
+ autocomplete: X = "on",
70
+ immediate: Ie = !1,
71
+ noOptionsText: ke = "Нет данных",
72
+ noMatchText: Ce = "Ничего не найдено",
73
+ loadOnOpen: q,
74
+ loading: Z,
75
+ loadingIndicatorPlacement: z = I.Dropdown,
76
+ groupBy: m,
77
+ getGroupTitle: ee = (t) => t,
78
+ optionLayout: Le = "name-bottom",
79
+ autoPlacement: O = !1,
80
+ borderRadius: te = je.All,
81
+ highlightMatches: ze = !1
82
+ } = xe, j = (t) => {
83
+ if (!t) return "";
84
+ const n = t[k];
82
85
  return typeof n == "string" ? n : String(n || "");
83
- }, Ce = (e) => {
84
- const n = e[I];
86
+ }, Oe = (t) => {
87
+ const n = t[k];
85
88
  return typeof n == "string" ? n : String(n || "");
86
- }, G = P(d), z = me(null), te = me(null), [f, g] = N(G), [m, b] = N(d), [Le, ne] = N(!1), [j, ze] = N(null), [O, oe] = N(k), se = X !== void 0 ? X : Le, y = F(() => {
87
- if (!W)
88
- return v;
89
- const e = String(f || "").trim().toLowerCase();
90
- return e ? v.filter((n) => Ce(n).toLowerCase().includes(e)) : v;
91
- }, [f, v, W, I]), q = F(() => h ? Ge(
92
- y,
93
- h,
94
- Z || ((e) => e)
95
- ) : y, [y, h, Z]), E = F(() => {
96
- const e = [];
97
- return q.forEach((n, i) => {
98
- n.isGroupHeader && e.push(i);
99
- }), e;
100
- }, [q]), x = Ae({
101
- count: q.length,
102
- getScrollElement: () => z.current,
89
+ }, F = j(d), E = he(null), ne = he(null), [f, b] = w(F), [p, y] = w(d), [Ee, oe] = w(!1), [H, De] = w(null), [D, re] = w(L), ie = Z !== void 0 ? Z : Ee, x = P(() => String(f || "").trim().toLowerCase(), [f]), N = P(() => Q && x ? g.filter((t) => Oe(t).toLowerCase().includes(x)) : g, [x, g, Q, k]), S = P(() => m ? Fe(
90
+ N,
91
+ m,
92
+ ee || ((t) => t)
93
+ ) : N, [N, m, ee]), M = P(() => {
94
+ const t = [];
95
+ return S.forEach((n, i) => {
96
+ n.isGroupHeader && t.push(i);
97
+ }), t;
98
+ }, [S]), v = Ge({
99
+ count: S.length,
100
+ getScrollElement: () => E.current,
103
101
  estimateSize: () => o === l.L ? 65 : 49,
104
102
  overscan: 10
105
- }), p = pe(() => {
106
- if (!L) {
107
- oe(k);
103
+ }), h = me(() => {
104
+ if (!O) {
105
+ re(L);
108
106
  return;
109
107
  }
110
- const e = je(te, o);
111
- oe(e ? "top" : k);
112
- }, [L, k, o]);
113
- H(() => {
114
- if (L)
115
- return p(), window.addEventListener("scroll", p), window.addEventListener("resize", p), () => {
116
- window.removeEventListener("scroll", p), window.removeEventListener("resize", p);
108
+ const t = He(ne, o);
109
+ re(t ? "top" : L);
110
+ }, [O, L, o]);
111
+ R(() => {
112
+ if (O)
113
+ return h(), window.addEventListener("scroll", h), window.addEventListener("resize", h), () => {
114
+ window.removeEventListener("scroll", h), window.removeEventListener("resize", h);
117
115
  };
118
- }, [L, p]), H(() => {
119
- const e = z.current;
120
- if (!e || !h) return;
116
+ }, [O, h]), R(() => {
117
+ const t = E.current;
118
+ if (!t || !m) return;
121
119
  const n = () => {
122
- var le, de;
123
- const i = e.scrollTop;
124
- let D = null;
125
- for (let V = 0; V < E.length; V++) {
126
- const ue = E[V];
127
- if ((((le = x.getVirtualItems().find((M) => M.index === ue)) == null ? void 0 : le.start) || 0) <= i) {
128
- D = ue;
129
- const M = E[V + 1];
130
- if (M !== void 0 && (((de = x.getVirtualItems().find((Te) => Te.index === M)) == null ? void 0 : de.start) || 0) <= i)
120
+ var de, ue;
121
+ const i = t.scrollTop;
122
+ let V = null;
123
+ for (let T = 0; T < M.length; T++) {
124
+ const pe = M[T];
125
+ if ((((de = v.getVirtualItems().find((A) => A.index === pe)) == null ? void 0 : de.start) || 0) <= i) {
126
+ V = pe;
127
+ const A = M[T + 1];
128
+ if (A !== void 0 && (((ue = v.getVirtualItems().find((Pe) => Pe.index === A)) == null ? void 0 : ue.start) || 0) <= i)
131
129
  continue;
132
130
  } else
133
131
  break;
134
132
  }
135
- ze(D);
133
+ De(V);
136
134
  };
137
- return e.addEventListener("scroll", n), () => e.removeEventListener("scroll", n);
138
- }, [x, E, h, z.current]);
139
- const ie = async () => {
140
- if (B)
135
+ return t.addEventListener("scroll", n), () => t.removeEventListener("scroll", n);
136
+ }, [v, M, m, E.current]);
137
+ const se = async () => {
138
+ if (q)
141
139
  try {
142
- ne(!0), await B();
140
+ oe(!0), await q();
143
141
  } finally {
144
- ne(!1);
142
+ oe(!1);
145
143
  }
146
- }, Oe = (e) => {
147
- if (e) {
148
- const n = P(e);
149
- g(n), b(e), a == null || a(e);
144
+ }, Me = (t) => {
145
+ if (t) {
146
+ const n = j(t);
147
+ b(n), y(t), a == null || a(t);
150
148
  } else
151
- g(""), b(null), a == null || a({ id: "", name: "" });
152
- }, re = pe(
153
- (e) => {
149
+ b(""), y(null), a == null || a({ id: "", name: "" });
150
+ }, ae = me(
151
+ (t) => {
154
152
  if (_) return;
155
- const n = e.target.value;
156
- g(n), w == null || w(n), m && n !== P(m) && b(null), !n && d && (a == null || a({ id: "", name: "" }));
153
+ const n = t.target.value;
154
+ b(n), C == null || C(n), p && n !== j(p) && y(null), !n && d && (a == null || a({ id: "", name: "" }));
157
155
  },
158
- [_, a, w, d, m, I]
159
- ), Ee = () => {
160
- g(""), b(null), a == null || a({ id: "", name: "" });
161
- }, ae = async (e) => {
162
- _ && e.target.blur(), p(), B && await ie();
156
+ [_, a, C, d, p, k]
157
+ ), Ve = () => {
158
+ b(""), y(null), a == null || a({ id: "", name: "" });
159
+ }, ce = async (t) => {
160
+ _ && t.target.blur(), h(), q && await se();
163
161
  };
164
- H(() => {
165
- const e = !d || typeof d == "object" && !Object.keys(d).length;
166
- g(e ? "" : G), b(e ? null : d);
167
- }, [d, G]);
168
- const De = () => se && (C === S.Dropdown || C === S.Both) ? /* @__PURE__ */ c("div", { className: t.loader, children: [
169
- /* @__PURE__ */ s(fe, { size: "s" }),
162
+ R(() => {
163
+ const t = !d || typeof d == "object" && !Object.keys(d).length;
164
+ b(t ? "" : F), y(t ? null : d);
165
+ }, [d, F]);
166
+ const Te = () => ie && (z === I.Dropdown || z === I.Both) ? /* @__PURE__ */ c("div", { className: e.loader, children: [
167
+ /* @__PURE__ */ r(ve, { size: "s" }),
170
168
  "Загрузка..."
171
- ] }) : Ie, Ve = (e) => {
172
- if (Ne)
169
+ ] }) : ke, Ae = (t) => {
170
+ if (we)
173
171
  return {
174
172
  addonType: "react-node",
175
- addonContent: /* @__PURE__ */ c(T, { children: [
176
- se && (C === S.Input || C === S.Both) && /* @__PURE__ */ s(fe, { size: "s" }),
177
- /* @__PURE__ */ s(
178
- xe,
173
+ addonContent: /* @__PURE__ */ c(B, { children: [
174
+ ie && (z === I.Input || z === I.Both) && /* @__PURE__ */ r(ve, { size: "s" }),
175
+ /* @__PURE__ */ r(
176
+ ge,
179
177
  {
180
- className: r(t.button, {
181
- [t.disabled]: u
178
+ className: s(e.button, {
179
+ [e.disabled]: u
182
180
  }),
183
181
  disabled: u,
184
- onClick: p,
185
- children: /* @__PURE__ */ s(
186
- R,
182
+ onClick: h,
183
+ children: /* @__PURE__ */ r(
184
+ $,
187
185
  {
188
186
  iconName: o == l.M || o == l.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
189
- className: r(t["selector-icon"], {
190
- [t["selector-icon-open"]]: e
187
+ className: s(e["selector-icon"], {
188
+ [e["selector-icon-open"]]: t
191
189
  })
192
190
  }
193
191
  )
@@ -195,56 +193,62 @@ import '../../assets/SelectSearch.css';const Ue = "_container_1x6qm_2", We = "_o
195
193
  )
196
194
  ] })
197
195
  };
198
- }, ce = (e) => {
199
- const n = e.name, i = e.bottom && /* @__PURE__ */ s("div", { children: e.bottom });
200
- return ke === "bottom-name" ? /* @__PURE__ */ c(T, { children: [
196
+ }, le = (t) => {
197
+ let n = t.name;
198
+ ze && x && (n = $e(
199
+ t.name,
200
+ x,
201
+ e["highlighted-text"]
202
+ ));
203
+ const i = t.bottom && /* @__PURE__ */ r("div", { children: t.bottom });
204
+ return Le === "bottom-name" ? /* @__PURE__ */ c(B, { children: [
201
205
  i,
202
206
  n
203
- ] }) : /* @__PURE__ */ c(T, { children: [
207
+ ] }) : /* @__PURE__ */ c(B, { children: [
204
208
  n,
205
209
  i
206
210
  ] });
207
- }, Me = (e) => v.length ? y.length ? h ? /* @__PURE__ */ c(
211
+ }, Be = (t) => g.length ? N.length ? m ? /* @__PURE__ */ c(
208
212
  "div",
209
213
  {
210
- ref: z,
214
+ ref: E,
211
215
  "data-testid": "select-search-options",
212
- className: r(
213
- t.options,
214
- t[o],
215
- t[O]
216
+ className: s(
217
+ e.options,
218
+ e[o],
219
+ e[D]
216
220
  ),
217
221
  style: {
218
222
  height: o === l.M || o === l.S ? "240px" : "320px",
219
223
  overflow: "auto"
220
224
  },
221
225
  children: [
222
- j !== null && /* @__PURE__ */ s(
226
+ H !== null && /* @__PURE__ */ r(
223
227
  "div",
224
228
  {
225
- className: t["group-header"],
229
+ className: e["group-header"],
226
230
  style: {
227
231
  position: "sticky",
228
232
  top: 0,
229
233
  zIndex: 3
230
234
  },
231
- children: q[j].name
235
+ children: S[H].name
232
236
  }
233
237
  ),
234
- /* @__PURE__ */ s(
238
+ /* @__PURE__ */ r(
235
239
  "div",
236
240
  {
237
241
  style: {
238
- height: `${x.getTotalSize()}px`,
242
+ height: `${v.getTotalSize()}px`,
239
243
  width: "100%"
240
244
  },
241
- children: x.getVirtualItems().map((n) => {
242
- const i = q[n.index];
243
- return /* @__PURE__ */ s(
245
+ children: v.getVirtualItems().map((n) => {
246
+ const i = S[n.index];
247
+ return /* @__PURE__ */ r(
244
248
  "div",
245
249
  {
246
250
  "data-index": n.index,
247
- ref: x.measureElement,
251
+ ref: v.measureElement,
248
252
  style: {
249
253
  position: "absolute",
250
254
  top: 0,
@@ -252,44 +256,44 @@ import '../../assets/SelectSearch.css';const Ue = "_container_1x6qm_2", We = "_o
252
256
  width: "100%",
253
257
  transform: `translateY(${n.start}px)`
254
258
  },
255
- children: i.isGroupHeader ? /* @__PURE__ */ s(
259
+ children: i.isGroupHeader ? /* @__PURE__ */ r(
256
260
  "div",
257
261
  {
258
- className: t["group-header"],
262
+ className: e["group-header"],
259
263
  style: {
260
- visibility: j === n.index ? "hidden" : "visible"
264
+ visibility: H === n.index ? "hidden" : "visible"
261
265
  },
262
266
  children: i.name
263
267
  }
264
268
  ) : /* @__PURE__ */ c(
265
- ge,
269
+ ye,
266
270
  {
267
271
  value: i,
268
- className: ({ focus: D }) => r(
269
- t.option,
270
- K,
271
- o && t[o],
272
+ className: ({ focus: V }) => s(
273
+ e.option,
274
+ U,
275
+ o && e[o],
272
276
  {
273
- [t["option-active"]]: D
277
+ [e["option-active"]]: V
274
278
  }
275
279
  ),
276
280
  "data-testid": `select-search-option-${i.id}`,
277
281
  children: [
278
- /* @__PURE__ */ s(
282
+ /* @__PURE__ */ r(
279
283
  "div",
280
284
  {
281
- className: r(
282
- t["option-inner"],
283
- U
285
+ className: s(
286
+ e["option-inner"],
287
+ W
284
288
  ),
285
- children: ce(i)
289
+ children: le(i)
286
290
  }
287
291
  ),
288
- m && m.id === i.id && /* @__PURE__ */ s(
289
- R,
292
+ p && p.id === i.id && /* @__PURE__ */ r(
293
+ $,
290
294
  {
291
295
  iconName: o === l.M || o === l.S ? "Done16px" : "Done24px",
292
- className: t["selected-icon"]
296
+ className: e["selected-icon"]
293
297
  }
294
298
  )
295
299
  ]
@@ -304,45 +308,45 @@ import '../../assets/SelectSearch.css';const Ue = "_container_1x6qm_2", We = "_o
304
308
  )
305
309
  ]
306
310
  }
307
- ) : /* @__PURE__ */ s(
308
- Ke,
311
+ ) : /* @__PURE__ */ r(
312
+ Qe,
309
313
  {
310
- className: r(
311
- t.options,
312
- t[o],
313
- t[O]
314
+ className: s(
315
+ e.options,
316
+ e[o],
317
+ e[D]
314
318
  ),
315
319
  "data-testid": "select-search-options",
316
320
  style: { width: "100%" },
317
321
  static: !0,
318
322
  children: ({ option: n }) => /* @__PURE__ */ c(
319
- ge,
323
+ ye,
320
324
  {
321
325
  value: n,
322
- className: ({ focus: i }) => r(
323
- t.option,
324
- K,
326
+ className: ({ focus: i }) => s(
327
+ e.option,
328
+ U,
325
329
  {
326
- [t["option-active"]]: i
330
+ [e["option-active"]]: i
327
331
  },
328
- o && t[o]
332
+ o && e[o]
329
333
  ),
330
334
  children: [
331
- /* @__PURE__ */ s(
335
+ /* @__PURE__ */ r(
332
336
  "div",
333
337
  {
334
- className: r(
335
- t["option-inner"],
336
- U
338
+ className: s(
339
+ e["option-inner"],
340
+ W
337
341
  ),
338
- children: ce(n)
342
+ children: le(n)
339
343
  }
340
344
  ),
341
- m && m.id === n.id && /* @__PURE__ */ s(
342
- R,
345
+ p && p.id === n.id && /* @__PURE__ */ r(
346
+ $,
343
347
  {
344
348
  iconName: o === l.M || o === l.S ? "Done16px" : "Done24px",
345
- className: t["selected-icon"]
349
+ className: e["selected-icon"]
346
350
  }
347
351
  )
348
352
  ]
@@ -350,97 +354,97 @@ import '../../assets/SelectSearch.css';const Ue = "_container_1x6qm_2", We = "_o
350
354
  n.id
351
355
  )
352
356
  }
353
- ) : /* @__PURE__ */ s(
357
+ ) : /* @__PURE__ */ r(
354
358
  "div",
355
359
  {
356
- className: r(
357
- t.options,
358
- t[o],
359
- t["no-options"],
360
- t[O]
360
+ className: s(
361
+ e.options,
362
+ e[o],
363
+ e["no-options"],
364
+ e[D]
361
365
  ),
362
- "data-headlessui-state": e ? "open" : "closed",
363
- children: we
366
+ "data-headlessui-state": t ? "open" : "closed",
367
+ children: Ce
364
368
  }
365
- ) : /* @__PURE__ */ s(
369
+ ) : /* @__PURE__ */ r(
366
370
  "div",
367
371
  {
368
- className: r(
369
- t.options,
370
- t[o],
371
- t["no-options"],
372
- t[O]
372
+ className: s(
373
+ e.options,
374
+ e[o],
375
+ e["no-options"],
376
+ e[D]
373
377
  ),
374
- "data-headlessui-state": e ? "open" : "closed",
375
- children: De()
378
+ "data-headlessui-state": t ? "open" : "closed",
379
+ children: Te()
376
380
  }
377
381
  );
378
- return /* @__PURE__ */ s(
379
- $e,
382
+ return /* @__PURE__ */ r(
383
+ We,
380
384
  {
381
385
  as: "div",
382
- value: m,
383
- className: r(t["select-search"], {
384
- [t.full]: qe,
385
- [t.disabled]: u
386
+ value: p,
387
+ className: s(e["select-search"], {
388
+ [e.full]: Se,
389
+ [e.disabled]: u
386
390
  }),
387
- onChange: Oe,
388
- ref: ye,
391
+ onChange: Me,
392
+ ref: Ne,
389
393
  disabled: u,
390
- virtual: h ? void 0 : { options: y },
391
- immediate: Se,
392
- children: ({ open: e }) => /* @__PURE__ */ c(T, { children: [
394
+ virtual: m ? void 0 : { options: N },
395
+ immediate: Ie,
396
+ children: ({ open: t }) => /* @__PURE__ */ c(B, { children: [
393
397
  /* @__PURE__ */ c(
394
398
  "div",
395
399
  {
396
- ref: te,
397
- className: r(t.container, t[o], {
398
- [t["container-open"]]: e
400
+ ref: ne,
401
+ className: s(e.container, e[o], {
402
+ [e["container-open"]]: t
399
403
  }),
400
404
  children: [
401
- _ && /* @__PURE__ */ c("div", { className: t["input-container"], children: [
402
- /* @__PURE__ */ s(
403
- xe,
405
+ _ && /* @__PURE__ */ c("div", { className: e["input-container"], children: [
406
+ /* @__PURE__ */ r(
407
+ ge,
404
408
  {
405
409
  disabled: u,
406
410
  style: { width: "100%" },
407
- onClick: ie,
408
- children: /* @__PURE__ */ s(
409
- ve,
411
+ onClick: se,
412
+ children: /* @__PURE__ */ r(
413
+ be,
410
414
  {
411
- as: _e,
412
- label: $,
413
- size: he(o),
414
- className: r(t["select-search-input"], {
415
- [t["select-search-input-disabled"]]: _ && A
415
+ as: fe,
416
+ label: K,
417
+ size: _e(o),
418
+ className: s(e["select-search-input"], {
419
+ [e["select-search-input-disabled"]]: _ && G
416
420
  }),
417
- onChange: re,
421
+ onChange: ae,
418
422
  value: f,
419
423
  disabled: u,
420
- variant: Q,
421
- rightSlotClassName: t["right-slot"],
422
- requiredMarkClassName: t["required-mark"],
424
+ variant: Y,
425
+ rightSlotClassName: e["right-slot"],
426
+ requiredMarkClassName: e["required-mark"],
423
427
  "data-testid": "select-search-input",
424
- onFocus: ae,
428
+ onFocus: ce,
425
429
  rightAddon: {
426
430
  addonType: "icon",
427
- addonContent: Fe(e, o)
431
+ addonContent: Re(t, o)
428
432
  },
429
- autocomplete: J,
430
- borderRadius: ee,
431
- ...Y
433
+ autocomplete: X,
434
+ borderRadius: te,
435
+ ...J
432
436
  }
433
437
  )
434
438
  }
435
439
  ),
436
- A && f && /* @__PURE__ */ s(
437
- He,
440
+ G && f && /* @__PURE__ */ r(
441
+ Ke,
438
442
  {
439
443
  tabIndex: -1,
440
- className: r(t.clear, {
441
- [t.disabled]: u
444
+ className: s(e.clear, {
445
+ [e.disabled]: u
442
446
  }),
443
- iconButtonClassName: t["icon-button"],
447
+ iconButtonClassName: e["icon-button"],
444
448
  isIconButton: !0,
445
449
  iconName: "Close16px",
446
450
  size: "m-s",
@@ -448,44 +452,44 @@ import '../../assets/SelectSearch.css';const Ue = "_container_1x6qm_2", We = "_o
448
452
  disabled: u,
449
453
  variant: "secondary-gray",
450
454
  onClick: (n) => {
451
- n.stopPropagation(), Ee();
455
+ n.stopPropagation(), Ve();
452
456
  },
453
457
  "data-testid": "clear-button"
454
458
  }
455
459
  )
456
460
  ] }),
457
- !_ && /* @__PURE__ */ s(
458
- ve,
461
+ !_ && /* @__PURE__ */ r(
462
+ be,
459
463
  {
460
- as: _e,
461
- label: $,
462
- size: he(o),
463
- className: t["select-search-input"],
464
- rightSlotClassName: t["right-slot"],
465
- requiredMarkClassName: t["required-mark"],
464
+ as: fe,
465
+ label: K,
466
+ size: _e(o),
467
+ className: e["select-search-input"],
468
+ rightSlotClassName: e["right-slot"],
469
+ requiredMarkClassName: e["required-mark"],
466
470
  value: f,
467
471
  disabled: u,
468
- variant: Q,
469
- withClearButton: A && !!f,
470
- onChange: re,
471
- rightAddon: Ve(e),
472
+ variant: Y,
473
+ withClearButton: G && !!f,
474
+ onChange: ae,
475
+ rightAddon: Ae(t),
472
476
  "data-testid": "select-search-input",
473
- onFocus: ae,
474
- autocomplete: J,
475
- borderRadius: ee,
476
- ...Y
477
+ onFocus: ce,
478
+ autocomplete: X,
479
+ borderRadius: te,
480
+ ...J
477
481
  }
478
482
  )
479
483
  ]
480
484
  }
481
485
  ),
482
- e && Me(e)
486
+ t && Be(t)
483
487
  ] })
484
488
  }
485
489
  );
486
490
  }
487
491
  );
488
- rt.displayName = "SelectSearch";
492
+ lt.displayName = "SelectSearch";
489
493
  export {
490
- rt as SelectSearch
494
+ lt as SelectSearch
491
495
  };