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