mimir-ui-kit 1.62.0 → 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.
- package/dist/Input-CqNPT8os.js +243 -0
- package/dist/components/Accordion/Accordion.d.ts +5 -0
- package/dist/components/Accordion/Accordion.js +242 -220
- package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +6 -1
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +19 -8
- package/dist/components/Button/Button.d.ts +37 -0
- package/dist/components/Button/Button.js +77 -61
- package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +9 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.js +90 -59
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +5 -0
- package/dist/components/Drawer/Drawer.js +141 -135
- package/dist/components/GosZnak/GosZnak.d.ts +1 -1
- package/dist/components/GosZnak/GosZnak.js +88 -67
- package/dist/components/GosZnak/types.d.ts +5 -0
- package/dist/components/Image/Image.d.ts +5 -0
- package/dist/components/Image/Image.js +55 -50
- package/dist/components/Input/Input.d.ts +5 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.d.ts +5 -0
- package/dist/components/InputPassword/InputPassword.js +80 -69
- package/dist/components/InputPhoneNumber/InputPhoneNumber.d.ts +5 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +39 -32
- package/dist/components/Loader/Loader.d.ts +6 -1
- package/dist/components/Loader/Loader.js +37 -14
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +9 -0
- package/dist/components/RadioGroup/RadioGroup.js +142 -129
- package/dist/components/SelectSearch/SelectSearch.d.ts +1 -0
- package/dist/components/SelectSearch/SelectSearch.js +299 -277
- package/dist/components/SelectSearch/types.d.ts +5 -0
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/TextArea/TextArea.d.ts +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextAreaV2/TextArea.js +155 -142
- package/dist/components/TextAreaV2/types.d.ts +5 -0
- package/dist/components/UniversalUploader/UniversalUploader.d.ts +1 -0
- package/dist/components/UniversalUploader/UniversalUploader.js +89 -86
- package/dist/components/UniversalUploader/types.d.ts +5 -0
- package/dist/components/Uploader/Uploader.d.ts +5 -0
- package/dist/components/Uploader/Uploader.js +116 -87
- package/dist/components/UploaderFiles/UploaderFiles.js +88 -79
- package/dist/components/UploaderFiles/types.d.ts +5 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +5 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.js +60 -57
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/dataTestId.d.ts +1 -0
- package/dist/types/dataTestId.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/Input-DPnH8pKc.js +0 -227
|
@@ -1,183 +1,191 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { u as
|
|
3
|
-
import { c as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { ESelectSearchSize as
|
|
6
|
-
import { prepareGroupedItems as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { I as
|
|
10
|
-
import { EInputVariant as
|
|
11
|
-
import { Loader as
|
|
12
|
-
import { H as
|
|
13
|
-
import '../../assets/SelectSearch.css';const
|
|
14
|
-
container:
|
|
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:
|
|
17
|
-
top:
|
|
18
|
-
bottom:
|
|
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:
|
|
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:
|
|
25
|
+
full: Xe,
|
|
26
26
|
"selected-icon": "_selected-icon_11tdb_104",
|
|
27
27
|
"selector-icon-open": "_selector-icon-open_11tdb_108",
|
|
28
|
-
button:
|
|
28
|
+
button: Ze,
|
|
29
29
|
"selector-icon": "_selector-icon_11tdb_108",
|
|
30
|
-
s:
|
|
31
|
-
m:
|
|
32
|
-
l:
|
|
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:
|
|
36
|
+
loader: et,
|
|
37
37
|
"input-container": "_input-container_11tdb_191",
|
|
38
|
-
option:
|
|
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:
|
|
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
|
-
},
|
|
48
|
-
(
|
|
47
|
+
}, nt = Pe(
|
|
48
|
+
(ge, ve) => {
|
|
49
49
|
const {
|
|
50
|
-
placeholder:
|
|
51
|
-
size:
|
|
52
|
-
value:
|
|
53
|
-
onChange:
|
|
54
|
-
full:
|
|
55
|
-
showArrow:
|
|
56
|
-
items:
|
|
57
|
-
classNameOption:
|
|
58
|
-
classNameOptionInner:
|
|
59
|
-
displayValue:
|
|
60
|
-
filterOnSearch:
|
|
61
|
-
onSearch:
|
|
62
|
-
variant:
|
|
63
|
-
menuPlacement:
|
|
64
|
-
disabled:
|
|
65
|
-
searchProps:
|
|
66
|
-
withClearButton:
|
|
67
|
-
disableInput:
|
|
68
|
-
autocomplete:
|
|
69
|
-
immediate:
|
|
70
|
-
isModal:
|
|
71
|
-
noOptionsText:
|
|
72
|
-
noMatchText:
|
|
73
|
-
loadOnOpen:
|
|
74
|
-
loading:
|
|
75
|
-
loadingIndicatorPlacement:
|
|
76
|
-
groupBy:
|
|
77
|
-
getGroupTitle:
|
|
78
|
-
optionLayout:
|
|
79
|
-
autoPlacement:
|
|
80
|
-
borderRadius:
|
|
81
|
-
highlightMatches:
|
|
82
|
-
searchInHeaderGroupItems:
|
|
83
|
-
|
|
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
|
|
86
|
-
return typeof
|
|
87
|
-
},
|
|
88
|
-
const
|
|
89
|
-
return typeof
|
|
90
|
-
},
|
|
91
|
-
if (!
|
|
92
|
-
return
|
|
93
|
-
if (
|
|
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
|
|
96
|
-
|
|
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
|
|
100
|
+
return _ ? f.filter((t) => ze(t).toLowerCase().includes(_)) : f;
|
|
100
101
|
}, [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
]),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
) :
|
|
112
|
-
count:
|
|
113
|
-
getScrollElement: () =>
|
|
114
|
-
estimateSize: () =>
|
|
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
|
-
}),
|
|
117
|
-
if (!
|
|
118
|
-
|
|
117
|
+
}), b = ce(() => {
|
|
118
|
+
if (!D) {
|
|
119
|
+
ee(L);
|
|
119
120
|
return;
|
|
120
121
|
}
|
|
121
|
-
const t =
|
|
122
|
-
|
|
123
|
-
}, [
|
|
124
|
-
|
|
125
|
-
if (
|
|
126
|
-
return
|
|
127
|
-
window.removeEventListener("scroll",
|
|
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
|
-
}, [
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
130
|
+
}, [D, b]);
|
|
131
|
+
const ne = async () => {
|
|
132
|
+
if (A)
|
|
132
133
|
try {
|
|
133
|
-
|
|
134
|
+
R(!0), await A();
|
|
134
135
|
} finally {
|
|
135
|
-
|
|
136
|
+
R(!1);
|
|
136
137
|
}
|
|
137
|
-
},
|
|
138
|
+
}, Ee = (t) => {
|
|
138
139
|
if (t) {
|
|
139
|
-
const
|
|
140
|
-
|
|
140
|
+
const n = P(t);
|
|
141
|
+
N(n), S(t), l == null || l(t);
|
|
141
142
|
} else
|
|
142
|
-
|
|
143
|
-
},
|
|
143
|
+
N(""), S(null), l == null || l({ id: "", name: "" });
|
|
144
|
+
}, re = ce(
|
|
144
145
|
(t) => {
|
|
145
|
-
if (
|
|
146
|
-
const
|
|
147
|
-
|
|
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
|
-
[
|
|
150
|
-
),
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
|
|
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
|
-
|
|
156
|
-
const t = !
|
|
157
|
-
|
|
158
|
-
}, [
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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__ */
|
|
167
|
-
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
|
|
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:
|
|
172
|
-
[e.disabled]:
|
|
179
|
+
className: a(e.button, {
|
|
180
|
+
[e.disabled]: p
|
|
173
181
|
}),
|
|
174
|
-
disabled:
|
|
175
|
-
onClick:
|
|
176
|
-
children: /* @__PURE__ */
|
|
177
|
-
|
|
182
|
+
disabled: p,
|
|
183
|
+
onClick: b,
|
|
184
|
+
children: /* @__PURE__ */ i(
|
|
185
|
+
j,
|
|
178
186
|
{
|
|
179
|
-
iconName:
|
|
180
|
-
className:
|
|
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
|
-
},
|
|
190
|
-
let
|
|
191
|
-
|
|
197
|
+
}, se = (t) => {
|
|
198
|
+
let n = t.name;
|
|
199
|
+
Z && _ && !E && (n = pe(
|
|
192
200
|
t.name,
|
|
193
|
-
|
|
201
|
+
_,
|
|
194
202
|
e["highlighted-text"]
|
|
195
203
|
));
|
|
196
|
-
const
|
|
197
|
-
return
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
] }) : /* @__PURE__ */
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
},
|
|
212
|
+
}, Be = (t) => f.length ? w.length ? c ? /* @__PURE__ */ i(
|
|
205
213
|
"div",
|
|
206
214
|
{
|
|
207
|
-
ref:
|
|
215
|
+
ref: M,
|
|
208
216
|
"data-testid": "select-search-options",
|
|
209
|
-
|
|
217
|
+
"data-testid-react": o == null ? void 0 : o.options,
|
|
218
|
+
className: a(
|
|
210
219
|
e.options,
|
|
211
|
-
e[
|
|
212
|
-
e[
|
|
220
|
+
e[r],
|
|
221
|
+
e[O]
|
|
213
222
|
),
|
|
214
223
|
style: {
|
|
215
|
-
height:
|
|
224
|
+
height: r === d.M || r === d.S ? "240px" : "320px",
|
|
216
225
|
overflow: "auto"
|
|
217
226
|
},
|
|
218
|
-
children: /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ i(
|
|
219
228
|
"div",
|
|
220
229
|
{
|
|
221
230
|
style: {
|
|
222
|
-
height: `${
|
|
231
|
+
height: `${q.getTotalSize()}px`,
|
|
223
232
|
width: "100%"
|
|
224
233
|
},
|
|
225
|
-
children:
|
|
226
|
-
const
|
|
227
|
-
return /* @__PURE__ */
|
|
234
|
+
children: q.getVirtualItems().map((n) => {
|
|
235
|
+
const s = oe[n.index];
|
|
236
|
+
return /* @__PURE__ */ i(
|
|
228
237
|
"div",
|
|
229
238
|
{
|
|
230
|
-
"data-index":
|
|
231
|
-
ref:
|
|
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(${
|
|
246
|
+
transform: `translateY(${n.start}px)`
|
|
238
247
|
},
|
|
239
|
-
children:
|
|
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-${
|
|
244
|
-
children:
|
|
245
|
-
|
|
246
|
-
|
|
253
|
+
"data-testid": `group-header-${s.name}`,
|
|
254
|
+
children: Z && _ && E ? pe(
|
|
255
|
+
s.name,
|
|
256
|
+
_,
|
|
247
257
|
e["highlighted-text"]
|
|
248
|
-
) :
|
|
258
|
+
) : s.name
|
|
249
259
|
}
|
|
250
|
-
) : /* @__PURE__ */
|
|
251
|
-
|
|
260
|
+
) : /* @__PURE__ */ h(
|
|
261
|
+
fe,
|
|
252
262
|
{
|
|
253
|
-
|
|
254
|
-
|
|
263
|
+
"data-testid-react": o == null ? void 0 : o.option,
|
|
264
|
+
value: s,
|
|
265
|
+
className: ({ focus: ae }) => a(
|
|
255
266
|
e.option,
|
|
256
|
-
|
|
257
|
-
|
|
267
|
+
I,
|
|
268
|
+
r && e[r],
|
|
258
269
|
{
|
|
259
|
-
[e["option-active"]]:
|
|
270
|
+
[e["option-active"]]: ae && !c
|
|
260
271
|
}
|
|
261
272
|
),
|
|
262
|
-
"data-testid": `select-search-option-${
|
|
273
|
+
"data-testid": `select-search-option-${s.id}`,
|
|
263
274
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ i(
|
|
265
276
|
"div",
|
|
266
277
|
{
|
|
267
|
-
className:
|
|
278
|
+
className: a(
|
|
268
279
|
e["option-inner"],
|
|
269
|
-
|
|
280
|
+
$
|
|
270
281
|
),
|
|
271
|
-
children:
|
|
282
|
+
children: se(s)
|
|
272
283
|
}
|
|
273
284
|
),
|
|
274
|
-
|
|
275
|
-
|
|
285
|
+
m && m.id === s.id && /* @__PURE__ */ i(
|
|
286
|
+
j,
|
|
276
287
|
{
|
|
277
|
-
iconName:
|
|
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
|
-
|
|
294
|
+
s.id
|
|
284
295
|
)
|
|
285
296
|
},
|
|
286
|
-
|
|
297
|
+
n.key
|
|
287
298
|
);
|
|
288
299
|
})
|
|
289
300
|
}
|
|
290
301
|
)
|
|
291
302
|
}
|
|
292
|
-
) : /* @__PURE__ */
|
|
293
|
-
|
|
303
|
+
) : /* @__PURE__ */ i(
|
|
304
|
+
Ke,
|
|
294
305
|
{
|
|
295
|
-
modal:
|
|
296
|
-
className:
|
|
306
|
+
modal: ye,
|
|
307
|
+
className: a(
|
|
297
308
|
e.options,
|
|
298
|
-
e[
|
|
299
|
-
e[
|
|
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:
|
|
305
|
-
|
|
316
|
+
children: ({ option: n }) => /* @__PURE__ */ h(
|
|
317
|
+
fe,
|
|
306
318
|
{
|
|
307
|
-
|
|
308
|
-
|
|
319
|
+
"data-testid-react": o == null ? void 0 : o.option,
|
|
320
|
+
value: n,
|
|
321
|
+
className: ({ focus: s }) => a(
|
|
309
322
|
e.option,
|
|
310
|
-
|
|
323
|
+
I,
|
|
311
324
|
{
|
|
312
|
-
[e["option-active"]]:
|
|
325
|
+
[e["option-active"]]: s
|
|
313
326
|
},
|
|
314
|
-
|
|
327
|
+
r && e[r]
|
|
315
328
|
),
|
|
316
329
|
children: [
|
|
317
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ i(
|
|
318
331
|
"div",
|
|
319
332
|
{
|
|
320
|
-
className:
|
|
333
|
+
className: a(
|
|
321
334
|
e["option-inner"],
|
|
322
|
-
|
|
335
|
+
$
|
|
323
336
|
),
|
|
324
|
-
children:
|
|
337
|
+
children: se(n)
|
|
325
338
|
}
|
|
326
339
|
),
|
|
327
|
-
|
|
328
|
-
|
|
340
|
+
m && m.id === n.id && /* @__PURE__ */ i(
|
|
341
|
+
j,
|
|
329
342
|
{
|
|
330
|
-
iconName:
|
|
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
|
-
|
|
349
|
+
n.id
|
|
337
350
|
)
|
|
338
351
|
}
|
|
339
|
-
) : /* @__PURE__ */
|
|
352
|
+
) : /* @__PURE__ */ i(
|
|
340
353
|
"div",
|
|
341
354
|
{
|
|
342
|
-
className:
|
|
355
|
+
className: a(
|
|
343
356
|
e.options,
|
|
344
|
-
e[
|
|
357
|
+
e[r],
|
|
345
358
|
e["no-options"],
|
|
346
|
-
e[
|
|
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:
|
|
363
|
+
children: Ce
|
|
350
364
|
}
|
|
351
|
-
) : /* @__PURE__ */
|
|
365
|
+
) : /* @__PURE__ */ i(
|
|
352
366
|
"div",
|
|
353
367
|
{
|
|
354
|
-
className:
|
|
368
|
+
className: a(
|
|
355
369
|
e.options,
|
|
356
|
-
e[
|
|
370
|
+
e[r],
|
|
357
371
|
e["no-options"],
|
|
358
|
-
e[
|
|
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:
|
|
376
|
+
children: Ve()
|
|
362
377
|
}
|
|
363
378
|
);
|
|
364
|
-
return /* @__PURE__ */
|
|
365
|
-
|
|
379
|
+
return /* @__PURE__ */ i(
|
|
380
|
+
$e,
|
|
366
381
|
{
|
|
367
382
|
as: "div",
|
|
368
|
-
value:
|
|
369
|
-
className:
|
|
370
|
-
[e.full]:
|
|
371
|
-
[e.disabled]:
|
|
383
|
+
value: m,
|
|
384
|
+
className: a(e["select-search"], {
|
|
385
|
+
[e.full]: Ne,
|
|
386
|
+
[e.disabled]: p
|
|
372
387
|
}),
|
|
373
|
-
onChange:
|
|
374
|
-
ref:
|
|
375
|
-
disabled:
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
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:
|
|
383
|
-
className:
|
|
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
|
-
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
404
|
+
g && /* @__PURE__ */ h("div", { className: e["input-container"], children: [
|
|
405
|
+
/* @__PURE__ */ i(
|
|
406
|
+
_e,
|
|
390
407
|
{
|
|
391
|
-
disabled:
|
|
408
|
+
disabled: p,
|
|
392
409
|
style: { width: "100%" },
|
|
393
|
-
onClick:
|
|
394
|
-
children: /* @__PURE__ */
|
|
395
|
-
|
|
410
|
+
onClick: ne,
|
|
411
|
+
children: /* @__PURE__ */ i(
|
|
412
|
+
be,
|
|
396
413
|
{
|
|
397
|
-
as:
|
|
398
|
-
label:
|
|
399
|
-
size:
|
|
400
|
-
className:
|
|
401
|
-
[e["select-search-input-disabled"]]:
|
|
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:
|
|
404
|
-
value:
|
|
405
|
-
disabled:
|
|
406
|
-
variant:
|
|
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
|
-
|
|
427
|
+
dataTestIdReactMap: { input: o == null ? void 0 : o.input },
|
|
428
|
+
onFocus: ie,
|
|
411
429
|
rightAddon: {
|
|
412
430
|
addonType: "icon",
|
|
413
|
-
addonContent:
|
|
431
|
+
addonContent: je(t, r)
|
|
414
432
|
},
|
|
415
|
-
autocomplete:
|
|
416
|
-
borderRadius:
|
|
417
|
-
...
|
|
433
|
+
autocomplete: Q,
|
|
434
|
+
borderRadius: X,
|
|
435
|
+
...W
|
|
418
436
|
}
|
|
419
437
|
)
|
|
420
438
|
}
|
|
421
439
|
),
|
|
422
|
-
|
|
423
|
-
|
|
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:
|
|
427
|
-
[e.disabled]:
|
|
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:
|
|
455
|
+
disabled: p,
|
|
435
456
|
variant: "secondary-gray",
|
|
436
|
-
onClick: (
|
|
437
|
-
|
|
457
|
+
onClick: (n) => {
|
|
458
|
+
n.stopPropagation(), Oe();
|
|
438
459
|
},
|
|
439
460
|
"data-testid": "clear-button"
|
|
440
461
|
}
|
|
441
462
|
)
|
|
442
463
|
] }),
|
|
443
|
-
!
|
|
444
|
-
|
|
464
|
+
!g && /* @__PURE__ */ i(
|
|
465
|
+
be,
|
|
445
466
|
{
|
|
446
|
-
as:
|
|
447
|
-
label:
|
|
448
|
-
size:
|
|
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:
|
|
453
|
-
disabled:
|
|
454
|
-
variant:
|
|
455
|
-
withClearButton:
|
|
456
|
-
onChange:
|
|
457
|
-
rightAddon:
|
|
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
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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 &&
|
|
490
|
+
t && Be(t)
|
|
469
491
|
] })
|
|
470
492
|
}
|
|
471
493
|
);
|
|
472
494
|
}
|
|
473
495
|
);
|
|
474
|
-
|
|
496
|
+
nt.displayName = "SelectSearch";
|
|
475
497
|
export {
|
|
476
|
-
|
|
498
|
+
nt as SelectSearch
|
|
477
499
|
};
|