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