mimir-ui-kit 1.36.1 → 1.36.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Chip/Chip.d.ts +1 -5
- package/dist/components/Chip/Chip.js +25 -26
- package/dist/components/DatePicker/DatePicker.d.ts +3 -3
- package/dist/components/DatePicker/DatePicker.js +87 -78
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +105 -101
- package/package.json +1 -1
@@ -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
|
};
|
@@ -12,7 +12,7 @@ export type TProps = {
|
|
12
12
|
/**
|
13
13
|
* Функция обратного вызова при потере фокуса компонентом
|
14
14
|
*/
|
15
|
-
onBlur?: (e:
|
15
|
+
onBlur?: (e: string) => void;
|
16
16
|
/**
|
17
17
|
* Функция ограничения выбора даты (до какой даты выбор не доступен)
|
18
18
|
*/
|
@@ -43,7 +43,7 @@ export type TProps = {
|
|
43
43
|
editable?: boolean;
|
44
44
|
} & TInputProps;
|
45
45
|
export type TDatePickerValue = {
|
46
|
-
value?:
|
46
|
+
value?: string;
|
47
47
|
name?: string;
|
48
48
|
};
|
49
49
|
export type TDatePickerOnError = {
|
@@ -62,7 +62,7 @@ export declare const DatePicker: import('react').MemoExoticComponent<import('rea
|
|
62
62
|
/**
|
63
63
|
* Функция обратного вызова при потере фокуса компонентом
|
64
64
|
*/
|
65
|
-
onBlur?: (e:
|
65
|
+
onBlur?: (e: string) => void;
|
66
66
|
/**
|
67
67
|
* Функция ограничения выбора даты (до какой даты выбор не доступен)
|
68
68
|
*/
|
@@ -1,123 +1,132 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { memo as
|
4
|
-
import { MAX_DAY as
|
5
|
-
import { DatePickerModal as
|
6
|
-
import { MonthPickerModal as
|
1
|
+
import { jsxs as Q, jsx as g } from "react/jsx-runtime";
|
2
|
+
import { c as v } from "../../index-DIxK0V-G.js";
|
3
|
+
import { memo as W, forwardRef as Z, useState as y, useEffect as w } from "react";
|
4
|
+
import { MAX_DAY as E, MAX_MONTH as B, DATE_LENGTH as V } from "./constants.js";
|
5
|
+
import { DatePickerModal as tt } from "./DatePickerModal.js";
|
6
|
+
import { MonthPickerModal as st } from "./MonthPickerModal.js";
|
7
7
|
import { c as a } from "../../styles.module-Chnn6DA-.js";
|
8
|
-
import { formatDatePart as
|
9
|
-
import { YearPickerModal as
|
10
|
-
import { useClickOutside as
|
11
|
-
import { formating as
|
8
|
+
import { formatDatePart as Y } from "./utils.js";
|
9
|
+
import { YearPickerModal as et } from "./YearPickerModal.js";
|
10
|
+
import { useClickOutside as it } from "../../hooks/useClickOutside/useClickOutside.js";
|
11
|
+
import { formating as d } from "../../utils/index.js";
|
12
12
|
import { I as at } from "../../Input-DlGNMuUD.js";
|
13
13
|
import { EInputStatus as rt } from "../Input/constants.js";
|
14
|
-
const
|
15
|
-
days:
|
16
|
-
months:
|
17
|
-
years:
|
18
|
-
},
|
19
|
-
|
14
|
+
const mt = {
|
15
|
+
days: tt,
|
16
|
+
months: st,
|
17
|
+
years: et
|
18
|
+
}, ot = W(
|
19
|
+
Z(
|
20
20
|
({
|
21
|
-
size:
|
21
|
+
size: $,
|
22
22
|
value: s,
|
23
23
|
onChangeValue: e,
|
24
24
|
name: r,
|
25
|
-
before:
|
26
|
-
type:
|
27
|
-
error:
|
28
|
-
onError:
|
29
|
-
onBlur:
|
30
|
-
validateImmediately:
|
31
|
-
variant:
|
32
|
-
disabled:
|
33
|
-
editable:
|
34
|
-
...
|
35
|
-
},
|
36
|
-
const [n, f] =
|
25
|
+
before: N,
|
26
|
+
type: m = "days",
|
27
|
+
error: T,
|
28
|
+
onError: o,
|
29
|
+
onBlur: c,
|
30
|
+
validateImmediately: x,
|
31
|
+
variant: H,
|
32
|
+
disabled: S = !1,
|
33
|
+
editable: _ = !1,
|
34
|
+
...L
|
35
|
+
}, R) => {
|
36
|
+
const [n, f] = y(!1), [A, p] = y(m), [i, D] = y(
|
37
37
|
() => s && !isNaN(new Date(s).getTime()) ? new Date(s) : void 0
|
38
|
-
), [
|
39
|
-
|
40
|
-
|
41
|
-
}, [
|
42
|
-
|
38
|
+
), [k, M] = y(T), [X, P] = y("");
|
39
|
+
w(() => {
|
40
|
+
M(T);
|
41
|
+
}, [T]), w(() => {
|
42
|
+
D(
|
43
43
|
s && !isNaN(new Date(s).getTime()) ? new Date(s) : void 0
|
44
44
|
);
|
45
|
-
}, [s]),
|
46
|
-
i && typeof i != "string" && !isNaN(i == null ? void 0 : i.getTime()) ?
|
45
|
+
}, [s]), w(() => {
|
46
|
+
i && typeof i != "string" && !isNaN(i == null ? void 0 : i.getTime()) ? P(d.Date(i, "dd/mm/yyyy")) : P("");
|
47
47
|
}, [i]);
|
48
|
-
const
|
49
|
-
|
50
|
-
|
51
|
-
}, [
|
48
|
+
const b = s && new Date(s).getTime;
|
49
|
+
w(() => {
|
50
|
+
x && (b ? (M(!1), o == null || o({ name: r, active: !1 })) : (M(!0), o == null || o({ name: r, active: !0 })));
|
51
|
+
}, [x, r, b]), it({
|
52
52
|
isActive: n,
|
53
53
|
setActive: (t) => {
|
54
|
-
f(t), p(
|
54
|
+
f(t), p(m);
|
55
55
|
},
|
56
56
|
className: a["calendar-block"]
|
57
57
|
});
|
58
|
-
const
|
59
|
-
|
60
|
-
}, G = (t) => {
|
61
|
-
isNaN(t.getTime()) || (l(t), e == null || e({ value: t, name: r })), T === "years" && (o === "years" ? (f(!1), p(o)) : p("months")), T === "months" && (o === "months" ? (f(!1), p(o)) : p("days")), l(t), e == null || e({ value: t, name: r }), m == null || m(t);
|
58
|
+
const G = () => {
|
59
|
+
S || f(!0);
|
62
60
|
}, K = (t) => {
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
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"));
|
68
|
+
}, U = (t) => {
|
69
|
+
if (_) {
|
70
|
+
const I = t.target.value.replace(/[^\d]/g, ""), [h, u, O] = [
|
71
|
+
Y(I.substring(0, 2), E),
|
72
|
+
Y(I.substring(2, 4), B),
|
73
|
+
I.substring(4, 8)
|
74
|
+
], j = [h, u, O].filter(Boolean).join("/");
|
75
|
+
if (P(j), j.length === V) {
|
76
|
+
const J = parseInt(O), l = /* @__PURE__ */ new Date(
|
77
|
+
`${J}-${u.padStart(2, "0")}-${h.padStart(2, "0")}`
|
72
78
|
);
|
73
|
-
isNaN(
|
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
|
-
},
|
77
|
-
onChangeValue:
|
85
|
+
}, q = v(a.wrapper, n && a.active), z = v(a.input, a.inputBorderControl), C = {
|
86
|
+
onChangeValue: K,
|
78
87
|
date: i || /* @__PURE__ */ new Date(),
|
79
|
-
before: typeof
|
88
|
+
before: typeof N == "string" ? new Date(N) : N,
|
80
89
|
onChangeType: p,
|
81
90
|
setIsActive: f
|
82
|
-
},
|
83
|
-
return /* @__PURE__ */
|
84
|
-
/* @__PURE__ */
|
91
|
+
}, F = mt[A];
|
92
|
+
return /* @__PURE__ */ Q("div", { className: q, "data-disabled": S, children: [
|
93
|
+
/* @__PURE__ */ g(
|
85
94
|
"div",
|
86
95
|
{
|
87
96
|
role: "button",
|
88
|
-
"data-error":
|
89
|
-
className:
|
90
|
-
[a.editable]:
|
97
|
+
"data-error": k,
|
98
|
+
className: v(a["date-wrapper"], {
|
99
|
+
[a.editable]: _
|
91
100
|
}),
|
92
|
-
onClick:
|
93
|
-
children: /* @__PURE__ */
|
101
|
+
onClick: G,
|
102
|
+
children: /* @__PURE__ */ g(
|
94
103
|
at,
|
95
104
|
{
|
96
|
-
ref:
|
97
|
-
className:
|
105
|
+
ref: R,
|
106
|
+
className: z,
|
98
107
|
wrapperClassName: a["input-wrapper"],
|
99
|
-
size:
|
108
|
+
size: $,
|
100
109
|
type: "text",
|
101
|
-
variant:
|
102
|
-
status:
|
103
|
-
value:
|
104
|
-
onChange:
|
110
|
+
variant: H,
|
111
|
+
status: k ? rt.Error : void 0,
|
112
|
+
value: X,
|
113
|
+
onChange: U,
|
105
114
|
rightAddon: {
|
106
115
|
addonType: "icon",
|
107
116
|
addonContent: n ? "DropdownArrowUp24px" : "DropdownArrowDown24px"
|
108
117
|
},
|
109
|
-
"data-error":
|
110
|
-
...
|
118
|
+
"data-error": k,
|
119
|
+
...L
|
111
120
|
}
|
112
121
|
)
|
113
122
|
}
|
114
123
|
),
|
115
|
-
n && /* @__PURE__ */
|
124
|
+
n && /* @__PURE__ */ g(F, { ...C })
|
116
125
|
] });
|
117
126
|
}
|
118
127
|
)
|
119
128
|
);
|
120
|
-
|
129
|
+
ot.displayName = "DatePicker";
|
121
130
|
export {
|
122
|
-
|
131
|
+
ot as DatePicker
|
123
132
|
};
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as j, jsx as o, Fragment as q } from "react/jsx-runtime";
|
2
2
|
import { c as r } from "../../index-DIxK0V-G.js";
|
3
|
-
import { forwardRef as
|
4
|
-
import { EMultiSelectSearchSize as
|
5
|
-
import { getInitialInputValue as
|
3
|
+
import { forwardRef as se, useRef as B, useState as S, useEffect as O, useMemo as ie } from "react";
|
4
|
+
import { EMultiSelectSearchSize as M } from "./constants.js";
|
5
|
+
import { getInitialInputValue as R, mapSizeToInputSize as E, getDropdownArrowIcon as re, joinSelectedItems as F } from "./utils.js";
|
6
6
|
import { Icon as le } from "../../icons/Icon.js";
|
7
7
|
import { Button as ae } from "../Button/Button.js";
|
8
8
|
import { CheckboxMimir as ce } from "../CheckboxMimir/CheckboxMimir.js";
|
9
9
|
import { Chip as pe } from "../Chip/Chip.js";
|
10
|
-
import { I as
|
10
|
+
import { I as P } from "../../Input-DlGNMuUD.js";
|
11
11
|
import { EInputVariant as ue } from "../Input/constants.js";
|
12
|
-
import { H as me, U as
|
12
|
+
import { H as me, U as G, G as W, K as de, W as _e } from "../../combobox-CDU06zJj.js";
|
13
13
|
import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe = "_container_mkspj_9", ke = "_full_mkspj_27", be = "_button_mkspj_39", je = "_options_mkspj_53", ge = "_top_mkspj_64", ve = "_bottom_mkspj_69", Ie = "_m_mkspj_2", Ne = "_l_mkspj_111", we = "_focused_mkspj_129", Ce = "_option_mkspj_53", Se = "_clear_mkspj_175", e = {
|
14
14
|
"multi-select-search": "_multi-select-search_mkspj_2",
|
15
15
|
disabled: he,
|
@@ -38,136 +38,140 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
38
38
|
"required-mark": "_required-mark_mkspj_170",
|
39
39
|
clear: Se,
|
40
40
|
"icon-button": "_icon-button_mkspj_184"
|
41
|
-
}, Re =
|
42
|
-
(
|
41
|
+
}, Re = se(
|
42
|
+
(H, K) => {
|
43
43
|
const {
|
44
44
|
placeholder: x,
|
45
|
-
size: i =
|
46
|
-
value:
|
45
|
+
size: i = M.L,
|
46
|
+
value: c,
|
47
47
|
onChange: s,
|
48
|
-
full:
|
49
|
-
showArrow:
|
50
|
-
items:
|
51
|
-
classNameOption:
|
52
|
-
displayValue:
|
53
|
-
filterOnSearch:
|
54
|
-
onSearch:
|
55
|
-
variant:
|
56
|
-
menuPlacement:
|
48
|
+
full: U,
|
49
|
+
showArrow: J = !0,
|
50
|
+
items: m = [],
|
51
|
+
classNameOption: Q,
|
52
|
+
displayValue: p = "name",
|
53
|
+
filterOnSearch: D = !0,
|
54
|
+
onSearch: v,
|
55
|
+
variant: z = ue.DefaultGray,
|
56
|
+
menuPlacement: I = "bottom",
|
57
57
|
disabled: l = !1,
|
58
58
|
searchProps: y,
|
59
|
-
withClearButton:
|
60
|
-
withChip:
|
61
|
-
chipVariant:
|
62
|
-
disableInput:
|
63
|
-
} =
|
64
|
-
() =>
|
65
|
-
), [
|
66
|
-
|
67
|
-
)
|
59
|
+
withClearButton: N = !1,
|
60
|
+
withChip: X = !1,
|
61
|
+
chipVariant: Y = "sapphire",
|
62
|
+
disableInput: d = !1
|
63
|
+
} = H, w = B(null), u = B(null), [g, _] = S(!1), [h, f] = S(
|
64
|
+
() => R(c, p)
|
65
|
+
), [k, b] = S(
|
66
|
+
c || []
|
67
|
+
);
|
68
|
+
O(() => {
|
69
|
+
c && (b(c), f(R(c, p)));
|
70
|
+
}, [c, p]);
|
71
|
+
const A = ie(() => {
|
68
72
|
var n;
|
69
|
-
if (!
|
70
|
-
const t = ((n =
|
71
|
-
return
|
73
|
+
if (!D) return m;
|
74
|
+
const t = ((n = h.split(",").pop()) == null ? void 0 : n.trim().toLowerCase()) ?? "";
|
75
|
+
return m.filter(
|
72
76
|
(a) => a.name.toLowerCase().includes(t)
|
73
77
|
);
|
74
|
-
}, [
|
75
|
-
|
76
|
-
const n =
|
77
|
-
|
78
|
-
if (
|
79
|
-
|
78
|
+
}, [D, m, h]), Z = (t) => {
|
79
|
+
b(t), s == null || s(t);
|
80
|
+
const n = F(t, p);
|
81
|
+
f(n), _(!0), setTimeout(() => {
|
82
|
+
if (u.current) {
|
83
|
+
u.current.focus(), u.current.scrollLeft = u.current.scrollWidth;
|
80
84
|
const a = n.length;
|
81
|
-
|
85
|
+
u.current.setSelectionRange(a, a);
|
82
86
|
}
|
83
87
|
}, 0);
|
84
88
|
}, L = (t) => {
|
85
|
-
if (
|
89
|
+
if (d) return;
|
86
90
|
const n = t.target.value;
|
87
|
-
|
88
|
-
const a = n.split(",").map((
|
89
|
-
(
|
91
|
+
f(n), v == null || v(n);
|
92
|
+
const a = n.split(",").map((C) => C.trim()).filter(Boolean), V = m.filter(
|
93
|
+
(C) => a.includes(C[p])
|
90
94
|
);
|
91
|
-
|
92
|
-
},
|
93
|
-
const n =
|
95
|
+
b(V), s == null || s(V), _(!0);
|
96
|
+
}, $ = (t) => {
|
97
|
+
const n = k.filter(
|
94
98
|
(a) => a.id !== t.id
|
95
99
|
);
|
96
|
-
|
97
|
-
}, T = () =>
|
100
|
+
b(n), s == null || s(n), f(F(n, p));
|
101
|
+
}, T = () => _((t) => !t), ee = (t) => {
|
98
102
|
t.preventDefault(), t.currentTarget.focus();
|
99
103
|
const n = t.currentTarget.value.length;
|
100
104
|
t.currentTarget.setSelectionRange(n, n);
|
101
|
-
},
|
102
|
-
|
103
|
-
},
|
104
|
-
t.stopPropagation(),
|
105
|
-
},
|
106
|
-
|
105
|
+
}, te = () => {
|
106
|
+
f(""), b([]), s == null || s([]);
|
107
|
+
}, ne = (t) => {
|
108
|
+
t.stopPropagation(), te();
|
109
|
+
}, oe = (t) => {
|
110
|
+
d && t.target.blur();
|
107
111
|
};
|
108
|
-
return
|
112
|
+
return O(() => {
|
109
113
|
const t = (n) => {
|
110
|
-
|
114
|
+
w.current && !w.current.contains(n.target) && !n.defaultPrevented && _(!1);
|
111
115
|
};
|
112
116
|
return document.addEventListener("mousedown", t), () => {
|
113
117
|
document.removeEventListener("mousedown", t);
|
114
118
|
};
|
115
|
-
}, []), /* @__PURE__ */
|
119
|
+
}, []), /* @__PURE__ */ j("div", { ref: w, children: [
|
116
120
|
/* @__PURE__ */ o(
|
117
121
|
me,
|
118
122
|
{
|
119
123
|
multiple: !0,
|
120
124
|
as: "div",
|
121
|
-
value:
|
125
|
+
value: k,
|
122
126
|
className: r(e["multi-select-search"], {
|
123
|
-
[e.full]:
|
127
|
+
[e.full]: U,
|
124
128
|
[e.disabled]: l
|
125
129
|
}),
|
126
|
-
onChange:
|
127
|
-
ref:
|
130
|
+
onChange: Z,
|
131
|
+
ref: K,
|
128
132
|
disabled: l,
|
129
133
|
virtual: { options: A },
|
130
|
-
children: /* @__PURE__ */
|
134
|
+
children: /* @__PURE__ */ j(
|
131
135
|
"div",
|
132
136
|
{
|
133
137
|
className: r(e.container, e[i], {
|
134
|
-
[e["container-open"]]:
|
138
|
+
[e["container-open"]]: g
|
135
139
|
}),
|
136
140
|
children: [
|
137
|
-
|
141
|
+
d && /* @__PURE__ */ j("div", { className: e["input-container"], children: [
|
138
142
|
/* @__PURE__ */ o(
|
139
|
-
|
143
|
+
G,
|
140
144
|
{
|
141
145
|
disabled: l,
|
142
146
|
style: { width: "100%" },
|
143
147
|
onClick: T,
|
144
148
|
children: /* @__PURE__ */ o(
|
145
|
-
|
149
|
+
W,
|
146
150
|
{
|
147
|
-
as:
|
151
|
+
as: P,
|
148
152
|
label: x,
|
149
|
-
size:
|
153
|
+
size: E(i),
|
150
154
|
className: r(e["multi-select-input"], {
|
151
|
-
[e["multi-select-input-disabled"]]:
|
155
|
+
[e["multi-select-input-disabled"]]: d && N
|
152
156
|
}),
|
153
157
|
onChange: L,
|
154
|
-
value:
|
158
|
+
value: h,
|
155
159
|
disabled: l,
|
156
|
-
variant:
|
160
|
+
variant: z,
|
157
161
|
rightSlotClassName: e["right-slot"],
|
158
162
|
requiredMarkClassName: e["required-mark"],
|
159
163
|
"data-testid": "select-search-input",
|
160
|
-
onFocus:
|
164
|
+
onFocus: oe,
|
161
165
|
rightAddon: {
|
162
166
|
addonType: "icon",
|
163
|
-
addonContent: re(
|
167
|
+
addonContent: re(g, i)
|
164
168
|
},
|
165
169
|
...y
|
166
170
|
}
|
167
171
|
)
|
168
172
|
}
|
169
173
|
),
|
170
|
-
|
174
|
+
N && h && /* @__PURE__ */ o(
|
171
175
|
ae,
|
172
176
|
{
|
173
177
|
tabIndex: -1,
|
@@ -181,44 +185,44 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
181
185
|
clear: !0,
|
182
186
|
disabled: l,
|
183
187
|
variant: "secondary-gray",
|
184
|
-
onClick:
|
188
|
+
onClick: ne,
|
185
189
|
"data-testid": "clear-button"
|
186
190
|
}
|
187
191
|
)
|
188
192
|
] }),
|
189
|
-
!
|
190
|
-
|
193
|
+
!d && /* @__PURE__ */ o(
|
194
|
+
W,
|
191
195
|
{
|
192
|
-
as:
|
196
|
+
as: P,
|
193
197
|
label: x,
|
194
|
-
size:
|
198
|
+
size: E(i),
|
195
199
|
className: e["multi-select-input"],
|
196
200
|
rightSlotClassName: e["right-slot"],
|
197
201
|
requiredMarkClassName: e["required-mark"],
|
198
|
-
value:
|
202
|
+
value: h,
|
199
203
|
disabled: l,
|
200
|
-
variant:
|
201
|
-
withClearButton:
|
202
|
-
onFocus: () =>
|
203
|
-
onMouseDown:
|
204
|
+
variant: z,
|
205
|
+
withClearButton: N,
|
206
|
+
onFocus: () => _(!0),
|
207
|
+
onMouseDown: ee,
|
204
208
|
onChange: L,
|
205
|
-
ref:
|
209
|
+
ref: u,
|
206
210
|
rightAddon: {
|
207
211
|
addonType: "react-node",
|
208
|
-
addonContent:
|
209
|
-
|
212
|
+
addonContent: J && /* @__PURE__ */ o(
|
213
|
+
G,
|
210
214
|
{
|
211
215
|
className: r(e.button, {
|
212
216
|
[e.disabled]: l
|
213
217
|
}),
|
214
218
|
disabled: l,
|
215
|
-
|
219
|
+
onMouseDown: T,
|
216
220
|
children: /* @__PURE__ */ o(
|
217
221
|
le,
|
218
222
|
{
|
219
|
-
iconName: i ==
|
223
|
+
iconName: i == M.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
|
220
224
|
className: r(e["selector-icon"], {
|
221
|
-
[e["selector-icon-open"]]:
|
225
|
+
[e["selector-icon-open"]]: g
|
222
226
|
})
|
223
227
|
}
|
224
228
|
)
|
@@ -229,13 +233,13 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
229
233
|
...y
|
230
234
|
}
|
231
235
|
),
|
232
|
-
|
236
|
+
g && /* @__PURE__ */ o(q, { children: m.length ? A.length ? /* @__PURE__ */ o(
|
233
237
|
de,
|
234
238
|
{
|
235
239
|
className: r(
|
236
240
|
e.options,
|
237
241
|
e[i],
|
238
|
-
e[
|
242
|
+
e[I]
|
239
243
|
),
|
240
244
|
modal: !1,
|
241
245
|
static: !0,
|
@@ -245,14 +249,14 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
245
249
|
value: t,
|
246
250
|
className: ({ focus: n }) => r(
|
247
251
|
e.option,
|
248
|
-
|
252
|
+
Q,
|
249
253
|
i && e[i],
|
250
254
|
{
|
251
255
|
[e["option-active"]]: n
|
252
256
|
}
|
253
257
|
),
|
254
|
-
children: /* @__PURE__ */
|
255
|
-
/* @__PURE__ */
|
258
|
+
children: /* @__PURE__ */ j(q, { children: [
|
259
|
+
/* @__PURE__ */ j("div", { className: e["option-inner"], children: [
|
256
260
|
t.name,
|
257
261
|
t.bottom && /* @__PURE__ */ o("div", { children: t.bottom })
|
258
262
|
] }),
|
@@ -260,7 +264,7 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
260
264
|
ce,
|
261
265
|
{
|
262
266
|
isInteractive: !1,
|
263
|
-
checked:
|
267
|
+
checked: k.some(
|
264
268
|
(n) => n.id === t.id
|
265
269
|
)
|
266
270
|
}
|
@@ -277,7 +281,7 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
277
281
|
e.options,
|
278
282
|
e[i],
|
279
283
|
e["no-options"],
|
280
|
-
e[
|
284
|
+
e[I]
|
281
285
|
),
|
282
286
|
children: "Ничего не найдено"
|
283
287
|
}
|
@@ -288,7 +292,7 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
288
292
|
e.options,
|
289
293
|
e[i],
|
290
294
|
e["no-options"],
|
291
|
-
e[
|
295
|
+
e[I]
|
292
296
|
),
|
293
297
|
children: "Нет данных"
|
294
298
|
}
|
@@ -298,14 +302,14 @@ import '../../assets/MultiSelectSearch.css';const he = "_disabled_mkspj_5", fe =
|
|
298
302
|
)
|
299
303
|
}
|
300
304
|
),
|
301
|
-
|
305
|
+
X && k.length > 0 && /* @__PURE__ */ o("div", { className: e["chip-container"], children: k.map((t) => /* @__PURE__ */ o(
|
302
306
|
pe,
|
303
307
|
{
|
304
|
-
size: i ===
|
305
|
-
variant:
|
308
|
+
size: i === M.L ? "s" : "xs",
|
309
|
+
variant: Y,
|
306
310
|
className: e.chip,
|
307
311
|
withAction: !0,
|
308
|
-
onClose: () =>
|
312
|
+
onClose: () => $(t),
|
309
313
|
children: t.name
|
310
314
|
},
|
311
315
|
t.id
|