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.
@@ -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, onClick, disabled, withAction, children, onClose }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element;
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 m, jsx as p } from "react/jsx-runtime";
2
- import { c as h } from "../../index-DIxK0V-G.js";
3
- import { EChipSize as b, EChipVariant as l } from "./constants.js";
4
- import { Button as v } from "../Button/Button.js";
5
- import '../../assets/Chip.css';const d = "_chip_19bvm_2", u = "_disabled_19bvm_40", x = "_xs_19bvm_51", g = "_s_19bvm_59", w = "_m_19bvm_67", C = "_sapphire_19bvm_75", f = "_citrine_19bvm_84", y = "_asphalt_19bvm_93", N = "_gray_19bvm_102", j = "_white_19bvm_111", B = "_green_19bvm_120", s = {
6
- chip: d,
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: u,
8
+ disabled: d,
9
9
  xs: x,
10
10
  s: g,
11
- m: w,
12
- sapphire: C,
13
- citrine: f,
14
- asphalt: y,
15
- gray: N,
16
- white: j,
17
- green: B
18
- }, I = ({
19
- size: i = b.M,
20
- variant: _ = l.Sapphire,
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
- onClick: e,
23
- disabled: o,
22
+ disabled: e,
24
23
  withAction: t,
25
- children: n,
24
+ children: o,
26
25
  onClose: a
27
26
  }) => {
28
- const r = h(
27
+ const n = p(
29
28
  s.chip,
30
29
  c,
31
30
  {
32
31
  [s["with-action"]]: t,
33
- [s.disabled]: o
32
+ [s.disabled]: e
34
33
  },
35
34
  s[_],
36
35
  s[i]
37
36
  );
38
- return /* @__PURE__ */ m("button", { type: "button", onClick: e, className: r, children: [
39
- n,
40
- t && /* @__PURE__ */ p(v, { isIconButton: !0, iconName: "Close16px", onClick: a, clear: !0 })
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
- I as Chip
43
+ z as Chip
45
44
  };
@@ -12,7 +12,7 @@ export type TProps = {
12
12
  /**
13
13
  * Функция обратного вызова при потере фокуса компонентом
14
14
  */
15
- onBlur?: (e: Date) => void;
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?: Date;
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: Date) => void;
65
+ onBlur?: (e: string) => void;
66
66
  /**
67
67
  * Функция ограничения выбора даты (до какой даты выбор не доступен)
68
68
  */
@@ -1,123 +1,132 @@
1
- import { jsxs as J, jsx as I } from "react/jsx-runtime";
2
- import { c as g } from "../../index-DIxK0V-G.js";
3
- import { memo as Q, forwardRef as W, useState as d, useEffect as N } from "react";
4
- import { MAX_DAY as Z, MAX_MONTH as E, DATE_LENGTH as B } from "./constants.js";
5
- import { DatePickerModal as V } from "./DatePickerModal.js";
6
- import { MonthPickerModal as tt } from "./MonthPickerModal.js";
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 j } from "./utils.js";
9
- import { YearPickerModal as st } from "./YearPickerModal.js";
10
- import { useClickOutside as et } from "../../hooks/useClickOutside/useClickOutside.js";
11
- import { formating as it } from "../../utils/index.js";
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 ot = {
15
- days: V,
16
- months: tt,
17
- years: st
18
- }, ct = Q(
19
- W(
14
+ const mt = {
15
+ days: tt,
16
+ months: st,
17
+ years: et
18
+ }, ot = W(
19
+ Z(
20
20
  ({
21
- size: Y,
21
+ size: $,
22
22
  value: s,
23
23
  onChangeValue: e,
24
24
  name: r,
25
- before: D,
26
- type: o = "days",
27
- error: y,
28
- onError: c,
29
- onBlur: m,
30
- validateImmediately: v,
31
- variant: $,
32
- disabled: x = !1,
33
- editable: S = !1,
34
- ...H
35
- }, L) => {
36
- const [n, f] = d(!1), [T, p] = d(o), [i, l] = d(
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
- ), [A, k] = d(y), [R, M] = d("");
39
- N(() => {
40
- k(y);
41
- }, [y]), N(() => {
42
- l(
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]), N(() => {
46
- i && typeof i != "string" && !isNaN(i == null ? void 0 : i.getTime()) ? M(it.Date(i, "dd/mm/yyyy")) : M("");
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 _ = s && new Date(s).getTime;
49
- N(() => {
50
- v && (_ ? (k(!1), c == null || c({ name: r, active: !1 })) : (k(!0), c == null || c({ name: r, active: !0 })));
51
- }, [v, r, _]), et({
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(o);
54
+ f(t), p(m);
55
55
  },
56
56
  className: a["calendar-block"]
57
57
  });
58
- const X = () => {
59
- x || f(!0);
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
- if (S) {
64
- const P = t.target.value.replace(/[^\d]/g, ""), [b, h, u] = [
65
- j(P.substring(0, 2), Z),
66
- j(P.substring(2, 4), E),
67
- P.substring(4, 8)
68
- ], O = [b, h, u].filter(Boolean).join("/");
69
- if (M(O), O.length === B) {
70
- const F = parseInt(u), w = /* @__PURE__ */ new Date(
71
- `${F}-${h.padStart(2, "0")}-${b.padStart(2, "0")}`
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(w.getTime()) || (l(w), e == null || e({ value: w, name: r }), m == null || m(w));
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
- }, U = g(a.wrapper, n && a.active), q = g(a.input, a.inputBorderControl), z = {
77
- onChangeValue: G,
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 D == "string" ? new Date(D) : D,
88
+ before: typeof N == "string" ? new Date(N) : N,
80
89
  onChangeType: p,
81
90
  setIsActive: f
82
- }, C = ot[T];
83
- return /* @__PURE__ */ J("div", { className: U, "data-disabled": x, children: [
84
- /* @__PURE__ */ I(
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": A,
89
- className: g(a["date-wrapper"], {
90
- [a.editable]: S
97
+ "data-error": k,
98
+ className: v(a["date-wrapper"], {
99
+ [a.editable]: _
91
100
  }),
92
- onClick: X,
93
- children: /* @__PURE__ */ I(
101
+ onClick: G,
102
+ children: /* @__PURE__ */ g(
94
103
  at,
95
104
  {
96
- ref: L,
97
- className: q,
105
+ ref: R,
106
+ className: z,
98
107
  wrapperClassName: a["input-wrapper"],
99
- size: Y,
108
+ size: $,
100
109
  type: "text",
101
- variant: $,
102
- status: A ? rt.Error : void 0,
103
- value: R,
104
- onChange: K,
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": A,
110
- ...H
118
+ "data-error": k,
119
+ ...L
111
120
  }
112
121
  )
113
122
  }
114
123
  ),
115
- n && /* @__PURE__ */ I(C, { ...z })
124
+ n && /* @__PURE__ */ g(F, { ...C })
116
125
  ] });
117
126
  }
118
127
  )
119
128
  );
120
- ct.displayName = "DatePicker";
129
+ ot.displayName = "DatePicker";
121
130
  export {
122
- ct as DatePicker
131
+ ot as DatePicker
123
132
  };
@@ -1,15 +1,15 @@
1
- import { jsxs as h, jsx as o, Fragment as q } from "react/jsx-runtime";
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 ne, useRef as B, useState as C, useMemo as oe, useEffect as se } from "react";
4
- import { EMultiSelectSearchSize as S } from "./constants.js";
5
- import { getInitialInputValue as ie, mapSizeToInputSize as O, getDropdownArrowIcon as re, joinSelectedItems as R } from "./utils.js";
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 E } from "../../Input-DlGNMuUD.js";
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 F, G as P, K as de, W as _e } from "../../combobox-CDU06zJj.js";
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 = ne(
42
- (G, W) => {
41
+ }, Re = se(
42
+ (H, K) => {
43
43
  const {
44
44
  placeholder: x,
45
- size: i = S.L,
46
- value: M,
45
+ size: i = M.L,
46
+ value: c,
47
47
  onChange: s,
48
- full: H,
49
- showArrow: K = !0,
50
- items: p = [],
51
- classNameOption: U,
52
- displayValue: f = "name",
53
- filterOnSearch: z = !0,
54
- onSearch: g,
55
- variant: D = ue.DefaultGray,
56
- menuPlacement: v = "bottom",
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: I = !1,
60
- withChip: J = !1,
61
- chipVariant: Q = "sapphire",
62
- disableInput: u = !1
63
- } = G, N = B(null), c = B(null), [k, m] = C(!1), [d, b] = C(
64
- () => ie(M, f)
65
- ), [_, j] = C(
66
- M || []
67
- ), A = oe(() => {
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 (!z) return p;
70
- const t = ((n = d.split(",").pop()) == null ? void 0 : n.trim().toLowerCase()) ?? "";
71
- return p.filter(
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
- }, [z, p, d]), X = (t) => {
75
- j(t), s == null || s(t);
76
- const n = R(t, f);
77
- b(n), m(!0), setTimeout(() => {
78
- if (c.current) {
79
- c.current.focus(), c.current.scrollLeft = c.current.scrollWidth;
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
- c.current.setSelectionRange(a, a);
85
+ u.current.setSelectionRange(a, a);
82
86
  }
83
87
  }, 0);
84
88
  }, L = (t) => {
85
- if (u) return;
89
+ if (d) return;
86
90
  const n = t.target.value;
87
- b(n), g == null || g(n);
88
- const a = n.split(",").map((w) => w.trim()).filter(Boolean), V = p.filter(
89
- (w) => a.includes(w[f])
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
- j(V), s == null || s(V), m(!0);
92
- }, Y = (t) => {
93
- const n = _.filter(
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
- j(n), s == null || s(n), b(R(n, f));
97
- }, T = () => m((t) => !t), Z = (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
- b(""), j([]), s == null || s([]);
103
- }, ee = (t) => {
104
- t.stopPropagation(), $();
105
- }, te = (t) => {
106
- u && t.target.blur();
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 se(() => {
112
+ return O(() => {
109
113
  const t = (n) => {
110
- N.current && !N.current.contains(n.target) && !n.defaultPrevented && m(!1);
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__ */ h("div", { ref: N, children: [
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]: H,
127
+ [e.full]: U,
124
128
  [e.disabled]: l
125
129
  }),
126
- onChange: X,
127
- ref: W,
130
+ onChange: Z,
131
+ ref: K,
128
132
  disabled: l,
129
133
  virtual: { options: A },
130
- children: /* @__PURE__ */ h(
134
+ children: /* @__PURE__ */ j(
131
135
  "div",
132
136
  {
133
137
  className: r(e.container, e[i], {
134
- [e["container-open"]]: k
138
+ [e["container-open"]]: g
135
139
  }),
136
140
  children: [
137
- u && /* @__PURE__ */ h("div", { className: e["input-container"], children: [
141
+ d && /* @__PURE__ */ j("div", { className: e["input-container"], children: [
138
142
  /* @__PURE__ */ o(
139
- F,
143
+ G,
140
144
  {
141
145
  disabled: l,
142
146
  style: { width: "100%" },
143
147
  onClick: T,
144
148
  children: /* @__PURE__ */ o(
145
- P,
149
+ W,
146
150
  {
147
- as: E,
151
+ as: P,
148
152
  label: x,
149
- size: O(i),
153
+ size: E(i),
150
154
  className: r(e["multi-select-input"], {
151
- [e["multi-select-input-disabled"]]: u && I
155
+ [e["multi-select-input-disabled"]]: d && N
152
156
  }),
153
157
  onChange: L,
154
- value: d,
158
+ value: h,
155
159
  disabled: l,
156
- variant: D,
160
+ variant: z,
157
161
  rightSlotClassName: e["right-slot"],
158
162
  requiredMarkClassName: e["required-mark"],
159
163
  "data-testid": "select-search-input",
160
- onFocus: te,
164
+ onFocus: oe,
161
165
  rightAddon: {
162
166
  addonType: "icon",
163
- addonContent: re(k, i)
167
+ addonContent: re(g, i)
164
168
  },
165
169
  ...y
166
170
  }
167
171
  )
168
172
  }
169
173
  ),
170
- I && d && /* @__PURE__ */ o(
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: ee,
188
+ onClick: ne,
185
189
  "data-testid": "clear-button"
186
190
  }
187
191
  )
188
192
  ] }),
189
- !u && /* @__PURE__ */ o(
190
- P,
193
+ !d && /* @__PURE__ */ o(
194
+ W,
191
195
  {
192
- as: E,
196
+ as: P,
193
197
  label: x,
194
- size: O(i),
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: d,
202
+ value: h,
199
203
  disabled: l,
200
- variant: D,
201
- withClearButton: I,
202
- onFocus: () => m(!0),
203
- onMouseDown: Z,
204
+ variant: z,
205
+ withClearButton: N,
206
+ onFocus: () => _(!0),
207
+ onMouseDown: ee,
204
208
  onChange: L,
205
- ref: c,
209
+ ref: u,
206
210
  rightAddon: {
207
211
  addonType: "react-node",
208
- addonContent: K && /* @__PURE__ */ o(
209
- F,
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
- onClick: T,
219
+ onMouseDown: T,
216
220
  children: /* @__PURE__ */ o(
217
221
  le,
218
222
  {
219
- iconName: i == S.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
223
+ iconName: i == M.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
220
224
  className: r(e["selector-icon"], {
221
- [e["selector-icon-open"]]: k
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
- k && /* @__PURE__ */ o(q, { children: p.length ? A.length ? /* @__PURE__ */ o(
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[v]
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
- U,
252
+ Q,
249
253
  i && e[i],
250
254
  {
251
255
  [e["option-active"]]: n
252
256
  }
253
257
  ),
254
- children: /* @__PURE__ */ h(q, { children: [
255
- /* @__PURE__ */ h("div", { className: e["option-inner"], children: [
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: _.some(
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[v]
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[v]
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
- J && _.length > 0 && /* @__PURE__ */ o("div", { className: e["chip-container"], children: _.map((t) => /* @__PURE__ */ o(
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 === S.L ? "s" : "xs",
305
- variant: Q,
308
+ size: i === M.L ? "s" : "xs",
309
+ variant: Y,
306
310
  className: e.chip,
307
311
  withAction: !0,
308
- onClose: () => Y(t),
312
+ onClose: () => $(t),
309
313
  children: t.name
310
314
  },
311
315
  t.id
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.36.1",
4
+ "version": "1.36.3",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {