mimir-ui-kit 1.36.2 → 1.36.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
._multi-select-
|
1
|
+
._multi-select-search_17kql_2{position:relative}._multi-select-search_17kql_2._disabled_17kql_5{cursor:not-allowed}._container_17kql_9{display:block;gap:var(--select-search-gap);align-items:center;justify-content:space-between;height:var(--select-search-height);background-color:var(--black-5);border-radius:var(--select-search-radius)}._container-open_17kql_18{border-bottom:1px solid var(--citrine-100)}._input-container_17kql_22{position:relative;width:100%}._full_17kql_27{width:100%}._selected-icon_17kql_31 path{fill:var(--sapphire-100)}._selector-icon-open_17kql_35{transform:rotate(180deg)}._button_17kql_39{display:flex;align-items:center;background:none;border:none;cursor:pointer}._button_17kql_39._disabled_17kql_5{cursor:not-allowed}._button_17kql_39._disabled_17kql_5 ._selector-icon_17kql_35 path{fill:var(--white)}._options_17kql_53{position:absolute;z-index:10;width:100%;min-height:50%;max-height:var(--select-search-options-height);overflow-y:auto;font-size:var(--mimir-size-text-l);background:var(--white);box-shadow:var(--mimir-box-shadow-select-search)}._options_17kql_53._top_17kql_64{bottom:100%;margin-bottom:1px;border-radius:var(--select-search-radius) var(--select-search-radius) 0 0}._options_17kql_53._bottom_17kql_69{top:100%;margin-top:1px;border-radius:0 0 var(--select-search-radius) var(--select-search-radius)}._options_17kql_53::-webkit-scrollbar{width:3px}._options_17kql_53::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:var(--mimir-control-radius-xs2)}._options_17kql_53::-webkit-scrollbar-track{background-color:var(--white)}@media (max-width: 600px){._options_17kql_53{max-height:var(--mimir-select-search-options-height-mobile)}}._no-options_17kql_90{height:100%;padding:var(--select-search-option-space);color:var(--black-80)}._m_17kql_2{--select-search-height: var(--mimir-select-search-height-l);--select-search-space: var(--mimir-space-xss) var(--mimir-space-m);--select-search-radius: var(--mimir-control-radius);--select-search-gap: var(--mimir-space-2xs);--select-search-btn-space: var(--mimir-space-m) var(--mimir-space-m) var(--mimir-space-m) var(--mimir-space-xs);--select-search-option-space: var(--mimir-space-2s) var(--mimir-space-m);--select-search-options-height: var( --mimir-select-search-options-height-mobile );--clear-right: var(--mimir-space-2xxl);--multi-select-input-disabled-margin-right: var(--mimir-space-l)}._l_17kql_111{--select-search-height: var(--mimir-select-search-height-xxl);--select-search-space: var(--mimir-space-xss) var(--mimir-space-m);--select-search-radius: var(--mimir-control-radius-s);--select-search-gap: var(--mimir-space-xs);--select-search-btn-space: var(--mimir-space-l) var(--mimir-space-m) var(--mimir-space-l) var(--mimir-space-xs);--select-search-option-space: var(--mimir-space-2l) var(--mimir-space-m);--select-search-options-height: var( --mimir-select-search-options-height-desktop );--clear-right: var(--mimir-space-4xl);--multi-select-input-disabled-margin-right: var(--mimir-space-1xl)}._multi-select-input-disabled_17kql_126{margin-right:var(--multi-select-input-disabled-margin-right)}._multi-select-input_17kql_126._focused_17kql_129{height:auto;min-height:var(--input-height);overflow:hidden;resize:vertical}._multi-select-input_17kql_126:last-child{padding-right:var(--mimir-space-4xl)}._option_17kql_53{display:flex;gap:var(--mimir-space-m);align-items:center;width:100%;padding:var(--select-search-option-space);cursor:pointer;transition:background-color .2s ease-in-out}._option-active_17kql_148{background-color:var(--black-5)}._option-inner_17kql_151{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%}._chip_17kql_158{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._chip-container_17kql_163{display:flex;flex-wrap:wrap;gap:var(--mimir-space-2xs);margin-top:var(--mimir-space-xs)}._chip-root_17kql_169{max-width:100%}._right-slot_17kql_173{order:2;padding-top:0!important}._required-mark_17kql_178{order:1;margin-right:var(--mimir-space-xs)}._clear_17kql_183{position:absolute;top:50%;right:var(--clear-right);transform:translateY(-50%)}._clear_17kql_183._disabled_17kql_5{cursor:not-allowed}._clear_17kql_183._disabled_17kql_5 ._icon-button_17kql_192 path{fill:var(--white)}
|
@@ -14,10 +14,6 @@ export type TProps = {
|
|
14
14
|
* Размер чипа. Возможные значения определены в перечислении `EChipSize`.
|
15
15
|
*/
|
16
16
|
size?: `${EChipSize}` | EChipSize;
|
17
|
-
/**
|
18
|
-
* Функция, которая будет вызвана при нажатии на чип.
|
19
|
-
*/
|
20
|
-
onClick?: VoidFunction;
|
21
17
|
/**
|
22
18
|
* Отключено ли чип.
|
23
19
|
*/
|
@@ -31,4 +27,4 @@ export type TProps = {
|
|
31
27
|
*/
|
32
28
|
onClose?: VoidFunction;
|
33
29
|
};
|
34
|
-
export declare const Chip: ({ size, variant, className,
|
30
|
+
export declare const Chip: ({ size, variant, className, disabled, withAction, children, onClose }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,45 +1,44 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { EChipSize as
|
4
|
-
import { Button as
|
5
|
-
import '../../assets/Chip.css';const
|
6
|
-
chip:
|
1
|
+
import { jsxs as r, jsx as m } from "react/jsx-runtime";
|
2
|
+
import { c as p } from "../../index-DIxK0V-G.js";
|
3
|
+
import { EChipSize as h, EChipVariant as b } from "./constants.js";
|
4
|
+
import { Button as l } from "../Button/Button.js";
|
5
|
+
import '../../assets/Chip.css';const v = "_chip_19bvm_2", d = "_disabled_19bvm_40", x = "_xs_19bvm_51", g = "_s_19bvm_59", u = "_m_19bvm_67", w = "_sapphire_19bvm_75", C = "_citrine_19bvm_84", f = "_asphalt_19bvm_93", y = "_gray_19bvm_102", N = "_white_19bvm_111", j = "_green_19bvm_120", s = {
|
6
|
+
chip: v,
|
7
7
|
"with-action": "_with-action_19bvm_18",
|
8
|
-
disabled:
|
8
|
+
disabled: d,
|
9
9
|
xs: x,
|
10
10
|
s: g,
|
11
|
-
m:
|
12
|
-
sapphire:
|
13
|
-
citrine:
|
14
|
-
asphalt:
|
15
|
-
gray:
|
16
|
-
white:
|
17
|
-
green:
|
18
|
-
},
|
19
|
-
size: i =
|
20
|
-
variant: _ =
|
11
|
+
m: u,
|
12
|
+
sapphire: w,
|
13
|
+
citrine: C,
|
14
|
+
asphalt: f,
|
15
|
+
gray: y,
|
16
|
+
white: N,
|
17
|
+
green: j
|
18
|
+
}, z = ({
|
19
|
+
size: i = h.M,
|
20
|
+
variant: _ = b.Sapphire,
|
21
21
|
className: c,
|
22
|
-
|
23
|
-
disabled: o,
|
22
|
+
disabled: e,
|
24
23
|
withAction: t,
|
25
|
-
children:
|
24
|
+
children: o,
|
26
25
|
onClose: a
|
27
26
|
}) => {
|
28
|
-
const
|
27
|
+
const n = p(
|
29
28
|
s.chip,
|
30
29
|
c,
|
31
30
|
{
|
32
31
|
[s["with-action"]]: t,
|
33
|
-
[s.disabled]:
|
32
|
+
[s.disabled]: e
|
34
33
|
},
|
35
34
|
s[_],
|
36
35
|
s[i]
|
37
36
|
);
|
38
|
-
return /* @__PURE__ */
|
39
|
-
|
40
|
-
t && /* @__PURE__ */
|
37
|
+
return /* @__PURE__ */ r("div", { className: n, children: [
|
38
|
+
o,
|
39
|
+
t && /* @__PURE__ */ m(l, { isIconButton: !0, iconName: "Close16px", onClick: a, clear: !0 })
|
41
40
|
] });
|
42
41
|
};
|
43
42
|
export {
|
44
|
-
|
43
|
+
z as Chip
|
45
44
|
};
|
@@ -58,7 +58,13 @@ const mt = {
|
|
58
58
|
const G = () => {
|
59
59
|
S || f(!0);
|
60
60
|
}, K = (t) => {
|
61
|
-
isNaN(t.getTime()) || (D(t), e == null || e({
|
61
|
+
isNaN(t.getTime()) || (D(t), e == null || e({
|
62
|
+
value: d.Date(t, "yyyy-mm-dd"),
|
63
|
+
name: r
|
64
|
+
})), A === "years" && (m === "years" ? (f(!1), p(m)) : p("months")), A === "months" && (m === "months" ? (f(!1), p(m)) : p("days")), D(t), e == null || e({
|
65
|
+
value: d.Date(t, "yyyy-mm-dd"),
|
66
|
+
name: r
|
67
|
+
}), c == null || c(d.Date(t, "yyyy-mm-dd"));
|
62
68
|
}, U = (t) => {
|
63
69
|
if (_) {
|
64
70
|
const I = t.target.value.replace(/[^\d]/g, ""), [h, u, O] = [
|
@@ -70,7 +76,10 @@ const mt = {
|
|
70
76
|
const J = parseInt(O), l = /* @__PURE__ */ new Date(
|
71
77
|
`${J}-${u.padStart(2, "0")}-${h.padStart(2, "0")}`
|
72
78
|
);
|
73
|
-
isNaN(l.getTime()) || (D(l), e == null || e({
|
79
|
+
isNaN(l.getTime()) || (D(l), e == null || e({
|
80
|
+
value: d.Date(l, "yyyy-mm-dd"),
|
81
|
+
name: r
|
82
|
+
}), c == null || c(d.Date(l, "yyyy-mm-dd")));
|
74
83
|
}
|
75
84
|
}
|
76
85
|
}, q = v(a.wrapper, n && a.active), z = v(a.input, a.inputBorderControl), C = {
|
@@ -1,224 +1,230 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { forwardRef as
|
4
|
-
import { EMultiSelectSearchSize as
|
5
|
-
import { getInitialInputValue as
|
6
|
-
import { Icon as
|
7
|
-
import { Button as
|
8
|
-
import { CheckboxMimir as
|
9
|
-
import { Chip as
|
10
|
-
import { I as
|
11
|
-
import { EInputVariant as
|
12
|
-
import { H as
|
13
|
-
import '../../assets/MultiSelectSearch.css';const he = "
|
14
|
-
"multi-select-search": "_multi-select-
|
1
|
+
import { jsxs as g, jsx as o, Fragment as V } from "react/jsx-runtime";
|
2
|
+
import { c as l } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as se, useRef as B, useState as S, useEffect as R, useMemo as ie } from "react";
|
4
|
+
import { EMultiSelectSearchSize as M } from "./constants.js";
|
5
|
+
import { getInitialInputValue as E, mapSizeToInputSize as F, getDropdownArrowIcon as le, joinSelectedItems as P } from "./utils.js";
|
6
|
+
import { Icon as re } from "../../icons/Icon.js";
|
7
|
+
import { Button as ce } from "../Button/Button.js";
|
8
|
+
import { CheckboxMimir as ae } from "../CheckboxMimir/CheckboxMimir.js";
|
9
|
+
import { Chip as ue } from "../Chip/Chip.js";
|
10
|
+
import { I as j } from "../../Input-DlGNMuUD.js";
|
11
|
+
import { EInputVariant as de } from "../Input/constants.js";
|
12
|
+
import { H as pe, U as G, G as W, K as me, W as _e } from "../../combobox-CDU06zJj.js";
|
13
|
+
import '../../assets/MultiSelectSearch.css';const he = "_disabled_17kql_5", fe = "_container_17kql_9", ke = "_full_17kql_27", qe = "_button_17kql_39", ge = "_options_17kql_53", be = "_top_17kql_64", ve = "_bottom_17kql_69", Ne = "_m_17kql_2", Ie = "_l_17kql_111", we = "_focused_17kql_129", Ce = "_option_17kql_53", Se = "_chip_17kql_158", Me = "_clear_17kql_183", e = {
|
14
|
+
"multi-select-search": "_multi-select-search_17kql_2",
|
15
15
|
disabled: he,
|
16
16
|
container: fe,
|
17
|
-
"container-open": "_container-
|
18
|
-
"input-container": "_input-
|
17
|
+
"container-open": "_container-open_17kql_18",
|
18
|
+
"input-container": "_input-container_17kql_22",
|
19
19
|
full: ke,
|
20
|
-
"selected-icon": "_selected-
|
21
|
-
"selector-icon-open": "_selector-icon-
|
22
|
-
button:
|
23
|
-
"selector-icon": "_selector-
|
24
|
-
options:
|
25
|
-
top:
|
20
|
+
"selected-icon": "_selected-icon_17kql_31",
|
21
|
+
"selector-icon-open": "_selector-icon-open_17kql_35",
|
22
|
+
button: qe,
|
23
|
+
"selector-icon": "_selector-icon_17kql_35",
|
24
|
+
options: ge,
|
25
|
+
top: be,
|
26
26
|
bottom: ve,
|
27
|
-
"no-options": "_no-
|
28
|
-
m:
|
29
|
-
l:
|
30
|
-
"multi-select-input-disabled": "_multi-select-input-
|
31
|
-
"multi-select-input": "_multi-select-
|
27
|
+
"no-options": "_no-options_17kql_90",
|
28
|
+
m: Ne,
|
29
|
+
l: Ie,
|
30
|
+
"multi-select-input-disabled": "_multi-select-input-disabled_17kql_126",
|
31
|
+
"multi-select-input": "_multi-select-input_17kql_126",
|
32
32
|
focused: we,
|
33
33
|
option: Ce,
|
34
|
-
"option-active": "_option-
|
35
|
-
"option-inner": "_option-
|
36
|
-
|
37
|
-
"
|
38
|
-
"
|
39
|
-
|
40
|
-
"
|
41
|
-
|
42
|
-
|
34
|
+
"option-active": "_option-active_17kql_148",
|
35
|
+
"option-inner": "_option-inner_17kql_151",
|
36
|
+
chip: Se,
|
37
|
+
"chip-container": "_chip-container_17kql_163",
|
38
|
+
"chip-root": "_chip-root_17kql_169",
|
39
|
+
"right-slot": "_right-slot_17kql_173",
|
40
|
+
"required-mark": "_required-mark_17kql_178",
|
41
|
+
clear: Me,
|
42
|
+
"icon-button": "_icon-button_17kql_192"
|
43
|
+
}, Fe = se(
|
44
|
+
(H, J) => {
|
43
45
|
const {
|
44
46
|
placeholder: x,
|
45
|
-
size: i =
|
46
|
-
value:
|
47
|
+
size: i = M.L,
|
48
|
+
value: a,
|
47
49
|
onChange: s,
|
48
|
-
full:
|
49
|
-
showArrow:
|
50
|
-
items:
|
51
|
-
classNameOption:
|
52
|
-
displayValue:
|
53
|
-
filterOnSearch:
|
54
|
-
onSearch:
|
55
|
-
variant: D =
|
56
|
-
menuPlacement:
|
57
|
-
disabled:
|
58
|
-
searchProps:
|
50
|
+
full: K,
|
51
|
+
showArrow: U = !0,
|
52
|
+
items: m = [],
|
53
|
+
classNameOption: Q,
|
54
|
+
displayValue: d = "name",
|
55
|
+
filterOnSearch: y = !0,
|
56
|
+
onSearch: v,
|
57
|
+
variant: D = de.DefaultGray,
|
58
|
+
menuPlacement: N = "bottom",
|
59
|
+
disabled: r = !1,
|
60
|
+
searchProps: z,
|
59
61
|
withClearButton: I = !1,
|
60
|
-
withChip:
|
61
|
-
chipVariant:
|
62
|
-
disableInput:
|
63
|
-
} =
|
64
|
-
() =>
|
65
|
-
), [
|
66
|
-
|
67
|
-
)
|
62
|
+
withChip: X = !1,
|
63
|
+
chipVariant: Y = "sapphire",
|
64
|
+
disableInput: _ = !1
|
65
|
+
} = H, w = B(null), p = B(null), [b, h] = S(!1), [f, k] = S(
|
66
|
+
() => E(a, d)
|
67
|
+
), [u, q] = S(
|
68
|
+
a || []
|
69
|
+
);
|
70
|
+
R(() => {
|
71
|
+
a && (q(a), JSON.stringify(a) !== JSON.stringify(u) && k(E(a, d)));
|
72
|
+
}, [a, d, u]);
|
73
|
+
const O = ie(() => {
|
68
74
|
var n;
|
69
|
-
if (!
|
70
|
-
const t = ((n =
|
71
|
-
return
|
72
|
-
(
|
75
|
+
if (!y) return m;
|
76
|
+
const t = ((n = f.split(",").pop()) == null ? void 0 : n.trim().toLowerCase()) ?? "";
|
77
|
+
return m.filter(
|
78
|
+
(c) => c.name.toLowerCase().includes(t)
|
73
79
|
);
|
74
|
-
}, [
|
75
|
-
|
76
|
-
const n =
|
77
|
-
|
78
|
-
if (
|
79
|
-
|
80
|
-
const
|
81
|
-
|
80
|
+
}, [y, m, f]), Z = (t) => {
|
81
|
+
q(t), s == null || s(t);
|
82
|
+
const n = P(t, d);
|
83
|
+
k(n), h(!0), setTimeout(() => {
|
84
|
+
if (p.current) {
|
85
|
+
p.current.focus(), p.current.scrollLeft = p.current.scrollWidth;
|
86
|
+
const c = n.length;
|
87
|
+
p.current.setSelectionRange(c, c);
|
82
88
|
}
|
83
89
|
}, 0);
|
84
|
-
},
|
85
|
-
if (
|
90
|
+
}, A = (t) => {
|
91
|
+
if (_) return;
|
86
92
|
const n = t.target.value;
|
87
|
-
|
88
|
-
const
|
89
|
-
(
|
93
|
+
k(n), v == null || v(n);
|
94
|
+
const c = n.split(",").map((C) => C.trim()).filter(Boolean), T = m.filter(
|
95
|
+
(C) => c.includes(C[d])
|
90
96
|
);
|
91
|
-
|
92
|
-
},
|
93
|
-
const n =
|
94
|
-
(
|
97
|
+
q(T), s == null || s(T), h(!0);
|
98
|
+
}, $ = (t) => {
|
99
|
+
const n = u.filter(
|
100
|
+
(c) => c.id !== t.id
|
95
101
|
);
|
96
|
-
|
97
|
-
},
|
102
|
+
q(n), s == null || s(n), k(P(n, d));
|
103
|
+
}, L = () => h((t) => !t), ee = (t) => {
|
98
104
|
t.preventDefault(), t.currentTarget.focus();
|
99
105
|
const n = t.currentTarget.value.length;
|
100
106
|
t.currentTarget.setSelectionRange(n, n);
|
101
|
-
},
|
102
|
-
|
103
|
-
},
|
104
|
-
t.stopPropagation(),
|
105
|
-
},
|
106
|
-
|
107
|
+
}, te = () => {
|
108
|
+
k(""), q([]), s == null || s([]);
|
109
|
+
}, ne = (t) => {
|
110
|
+
t.stopPropagation(), te();
|
111
|
+
}, oe = (t) => {
|
112
|
+
_ && t.target.blur();
|
107
113
|
};
|
108
|
-
return
|
114
|
+
return R(() => {
|
109
115
|
const t = (n) => {
|
110
|
-
|
116
|
+
w.current && !w.current.contains(n.target) && !n.defaultPrevented && h(!1);
|
111
117
|
};
|
112
118
|
return document.addEventListener("mousedown", t), () => {
|
113
119
|
document.removeEventListener("mousedown", t);
|
114
120
|
};
|
115
|
-
}, []), /* @__PURE__ */
|
121
|
+
}, []), /* @__PURE__ */ g("div", { ref: w, children: [
|
116
122
|
/* @__PURE__ */ o(
|
117
|
-
|
123
|
+
pe,
|
118
124
|
{
|
119
125
|
multiple: !0,
|
120
126
|
as: "div",
|
121
|
-
value:
|
122
|
-
className:
|
123
|
-
[e.full]:
|
124
|
-
[e.disabled]:
|
127
|
+
value: u,
|
128
|
+
className: l(e["multi-select-search"], {
|
129
|
+
[e.full]: K,
|
130
|
+
[e.disabled]: r
|
125
131
|
}),
|
126
|
-
onChange:
|
127
|
-
ref:
|
128
|
-
disabled:
|
129
|
-
virtual: { options:
|
130
|
-
children: /* @__PURE__ */
|
132
|
+
onChange: Z,
|
133
|
+
ref: J,
|
134
|
+
disabled: r,
|
135
|
+
virtual: { options: O },
|
136
|
+
children: /* @__PURE__ */ g(
|
131
137
|
"div",
|
132
138
|
{
|
133
|
-
className:
|
134
|
-
[e["container-open"]]:
|
139
|
+
className: l(e.container, e[i], {
|
140
|
+
[e["container-open"]]: b
|
135
141
|
}),
|
136
142
|
children: [
|
137
|
-
|
143
|
+
_ && /* @__PURE__ */ g("div", { className: e["input-container"], children: [
|
138
144
|
/* @__PURE__ */ o(
|
139
|
-
|
145
|
+
G,
|
140
146
|
{
|
141
|
-
disabled:
|
147
|
+
disabled: r,
|
142
148
|
style: { width: "100%" },
|
143
|
-
onClick:
|
149
|
+
onClick: L,
|
144
150
|
children: /* @__PURE__ */ o(
|
145
|
-
|
151
|
+
W,
|
146
152
|
{
|
147
|
-
as:
|
153
|
+
as: j,
|
148
154
|
label: x,
|
149
|
-
size:
|
150
|
-
className:
|
151
|
-
[e["multi-select-input-disabled"]]:
|
155
|
+
size: F(i),
|
156
|
+
className: l(e["multi-select-input"], {
|
157
|
+
[e["multi-select-input-disabled"]]: _ && I
|
152
158
|
}),
|
153
|
-
onChange:
|
154
|
-
value:
|
155
|
-
disabled:
|
159
|
+
onChange: A,
|
160
|
+
value: f,
|
161
|
+
disabled: r,
|
156
162
|
variant: D,
|
157
163
|
rightSlotClassName: e["right-slot"],
|
158
164
|
requiredMarkClassName: e["required-mark"],
|
159
165
|
"data-testid": "select-search-input",
|
160
|
-
onFocus:
|
166
|
+
onFocus: oe,
|
161
167
|
rightAddon: {
|
162
168
|
addonType: "icon",
|
163
|
-
addonContent:
|
169
|
+
addonContent: le(b, i)
|
164
170
|
},
|
165
|
-
...
|
171
|
+
...z
|
166
172
|
}
|
167
173
|
)
|
168
174
|
}
|
169
175
|
),
|
170
|
-
I &&
|
171
|
-
|
176
|
+
I && f && /* @__PURE__ */ o(
|
177
|
+
ce,
|
172
178
|
{
|
173
179
|
tabIndex: -1,
|
174
|
-
className:
|
175
|
-
[e.disabled]:
|
180
|
+
className: l(e.clear, {
|
181
|
+
[e.disabled]: r
|
176
182
|
}),
|
177
183
|
iconButtonClassName: e["icon-button"],
|
178
184
|
isIconButton: !0,
|
179
185
|
iconName: "Close16px",
|
180
186
|
size: "m-s",
|
181
187
|
clear: !0,
|
182
|
-
disabled:
|
188
|
+
disabled: r,
|
183
189
|
variant: "secondary-gray",
|
184
|
-
onClick:
|
190
|
+
onClick: ne,
|
185
191
|
"data-testid": "clear-button"
|
186
192
|
}
|
187
193
|
)
|
188
194
|
] }),
|
189
|
-
!
|
190
|
-
|
195
|
+
!_ && /* @__PURE__ */ o(
|
196
|
+
W,
|
191
197
|
{
|
192
|
-
as:
|
198
|
+
as: j,
|
193
199
|
label: x,
|
194
|
-
size:
|
200
|
+
size: F(i),
|
195
201
|
className: e["multi-select-input"],
|
196
202
|
rightSlotClassName: e["right-slot"],
|
197
203
|
requiredMarkClassName: e["required-mark"],
|
198
|
-
value:
|
199
|
-
disabled:
|
204
|
+
value: f,
|
205
|
+
disabled: r,
|
200
206
|
variant: D,
|
201
207
|
withClearButton: I,
|
202
|
-
onFocus: () =>
|
203
|
-
onMouseDown:
|
204
|
-
onChange:
|
205
|
-
ref:
|
208
|
+
onFocus: () => h(!0),
|
209
|
+
onMouseDown: ee,
|
210
|
+
onChange: A,
|
211
|
+
ref: p,
|
206
212
|
rightAddon: {
|
207
213
|
addonType: "react-node",
|
208
|
-
addonContent:
|
209
|
-
|
214
|
+
addonContent: U && /* @__PURE__ */ o(
|
215
|
+
G,
|
210
216
|
{
|
211
|
-
className:
|
212
|
-
[e.disabled]:
|
217
|
+
className: l(e.button, {
|
218
|
+
[e.disabled]: r
|
213
219
|
}),
|
214
|
-
disabled:
|
215
|
-
|
220
|
+
disabled: r,
|
221
|
+
onMouseDown: L,
|
216
222
|
children: /* @__PURE__ */ o(
|
217
|
-
|
223
|
+
re,
|
218
224
|
{
|
219
|
-
iconName: i ==
|
220
|
-
className:
|
221
|
-
[e["selector-icon-open"]]:
|
225
|
+
iconName: i == M.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
226
|
+
className: l(e["selector-icon"], {
|
227
|
+
[e["selector-icon-open"]]: b
|
222
228
|
})
|
223
229
|
}
|
224
230
|
)
|
@@ -226,16 +232,16 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
226
232
|
)
|
227
233
|
},
|
228
234
|
"data-testid": "select-search-input",
|
229
|
-
...
|
235
|
+
...z
|
230
236
|
}
|
231
237
|
),
|
232
|
-
|
233
|
-
|
238
|
+
b && /* @__PURE__ */ o(V, { children: m.length ? O.length ? /* @__PURE__ */ o(
|
239
|
+
me,
|
234
240
|
{
|
235
|
-
className:
|
241
|
+
className: l(
|
236
242
|
e.options,
|
237
243
|
e[i],
|
238
|
-
e[
|
244
|
+
e[N]
|
239
245
|
),
|
240
246
|
modal: !1,
|
241
247
|
static: !0,
|
@@ -243,24 +249,24 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
243
249
|
_e,
|
244
250
|
{
|
245
251
|
value: t,
|
246
|
-
className: ({ focus: n }) =>
|
252
|
+
className: ({ focus: n }) => l(
|
247
253
|
e.option,
|
248
|
-
|
254
|
+
Q,
|
249
255
|
i && e[i],
|
250
256
|
{
|
251
257
|
[e["option-active"]]: n
|
252
258
|
}
|
253
259
|
),
|
254
|
-
children: /* @__PURE__ */
|
255
|
-
/* @__PURE__ */
|
260
|
+
children: /* @__PURE__ */ g(V, { children: [
|
261
|
+
/* @__PURE__ */ g("div", { className: e["option-inner"], children: [
|
256
262
|
t.name,
|
257
263
|
t.bottom && /* @__PURE__ */ o("div", { children: t.bottom })
|
258
264
|
] }),
|
259
265
|
/* @__PURE__ */ o(
|
260
|
-
|
266
|
+
ae,
|
261
267
|
{
|
262
268
|
isInteractive: !1,
|
263
|
-
checked:
|
269
|
+
checked: u.some(
|
264
270
|
(n) => n.id === t.id
|
265
271
|
)
|
266
272
|
}
|
@@ -273,22 +279,22 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
273
279
|
) : /* @__PURE__ */ o(
|
274
280
|
"div",
|
275
281
|
{
|
276
|
-
className:
|
282
|
+
className: l(
|
277
283
|
e.options,
|
278
284
|
e[i],
|
279
285
|
e["no-options"],
|
280
|
-
e[
|
286
|
+
e[N]
|
281
287
|
),
|
282
288
|
children: "Ничего не найдено"
|
283
289
|
}
|
284
290
|
) : /* @__PURE__ */ o(
|
285
291
|
"div",
|
286
292
|
{
|
287
|
-
className:
|
293
|
+
className: l(
|
288
294
|
e.options,
|
289
295
|
e[i],
|
290
296
|
e["no-options"],
|
291
|
-
e[
|
297
|
+
e[N]
|
292
298
|
),
|
293
299
|
children: "Нет данных"
|
294
300
|
}
|
@@ -298,15 +304,15 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
298
304
|
)
|
299
305
|
}
|
300
306
|
),
|
301
|
-
|
302
|
-
|
307
|
+
X && u.length > 0 && /* @__PURE__ */ o("div", { className: e["chip-container"], children: u.map((t) => /* @__PURE__ */ o(
|
308
|
+
ue,
|
303
309
|
{
|
304
|
-
size: i ===
|
305
|
-
variant:
|
306
|
-
className: e
|
310
|
+
size: i === M.L ? "s" : "xs",
|
311
|
+
variant: Y,
|
312
|
+
className: e["chip-root"],
|
307
313
|
withAction: !0,
|
308
|
-
onClose: () =>
|
309
|
-
children: t.name
|
314
|
+
onClose: () => $(t),
|
315
|
+
children: /* @__PURE__ */ o("span", { className: e.chip, children: t.name })
|
310
316
|
},
|
311
317
|
t.id
|
312
318
|
)) })
|
@@ -314,5 +320,5 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
314
320
|
}
|
315
321
|
);
|
316
322
|
export {
|
317
|
-
|
323
|
+
Fe as MultiSelectSearch
|
318
324
|
};
|