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-search_mkspj_2{position:relative}._multi-select-search_mkspj_2._disabled_mkspj_5{cursor:not-allowed}._container_mkspj_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_mkspj_18{border-bottom:1px solid var(--citrine-100)}._input-container_mkspj_22{position:relative;width:100%}._full_mkspj_27{width:100%}._selected-icon_mkspj_31 path{fill:var(--sapphire-100)}._selector-icon-open_mkspj_35{transform:rotate(180deg)}._button_mkspj_39{display:flex;align-items:center;background:none;border:none;cursor:pointer}._button_mkspj_39._disabled_mkspj_5{cursor:not-allowed}._button_mkspj_39._disabled_mkspj_5 ._selector-icon_mkspj_35 path{fill:var(--white)}._options_mkspj_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_mkspj_53._top_mkspj_64{bottom:100%;margin-bottom:1px;border-radius:var(--select-search-radius) var(--select-search-radius) 0 0}._options_mkspj_53._bottom_mkspj_69{top:100%;margin-top:1px;border-radius:0 0 var(--select-search-radius) var(--select-search-radius)}._options_mkspj_53::-webkit-scrollbar{width:3px}._options_mkspj_53::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:var(--mimir-control-radius-xs2)}._options_mkspj_53::-webkit-scrollbar-track{background-color:var(--white)}@media (max-width: 600px){._options_mkspj_53{max-height:var(--mimir-select-search-options-height-mobile)}}._no-options_mkspj_90{height:100%;padding:var(--select-search-option-space);color:var(--black-80)}._m_mkspj_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_mkspj_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_mkspj_126{margin-right:var(--multi-select-input-disabled-margin-right)}._multi-select-input_mkspj_126._focused_mkspj_129{height:auto;min-height:var(--input-height);overflow:hidden;resize:vertical}._multi-select-input_mkspj_126:last-child{padding-right:var(--mimir-space-4xl)}._option_mkspj_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_mkspj_148{background-color:var(--black-5)}._option-inner_mkspj_151{display:flex;flex-direction:column;gap:var(--mimir-space-xs);width:100%}._chip-container_mkspj_158{display:flex;flex-wrap:wrap;gap:var(--mimir-space-2xs);margin-top:var(--mimir-space-xs)}._right-slot_mkspj_165{order:2;padding-top:0!important}._required-mark_mkspj_170{order:1;margin-right:var(--mimir-space-xs)}._clear_mkspj_175{position:absolute;top:50%;right:var(--clear-right);transform:translateY(-50%)}._clear_mkspj_175._disabled_mkspj_5{cursor:not-allowed}._clear_mkspj_175._disabled_mkspj_5 ._icon-button_mkspj_184 path{fill:var(--white)}
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, 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
  };
@@ -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({ value: d.Date(t, "yyyy-mm-dd"), name: r })), 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({ value: d.Date(t, "yyyy-mm-dd"), name: r }), c == null || c(d.Date(t, "yyyy-mm-dd"));
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({ value: d.Date(l, "yyyy-mm-dd"), name: r }), c == null || c(d.Date(l, "yyyy-mm-dd")));
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 h, jsx as o, Fragment as q } from "react/jsx-runtime";
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";
6
- import { Icon as le } from "../../icons/Icon.js";
7
- import { Button as ae } from "../Button/Button.js";
8
- import { CheckboxMimir as ce } from "../CheckboxMimir/CheckboxMimir.js";
9
- import { Chip as pe } from "../Chip/Chip.js";
10
- import { I as E } from "../../Input-DlGNMuUD.js";
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";
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
- "multi-select-search": "_multi-select-search_mkspj_2",
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-open_mkspj_18",
18
- "input-container": "_input-container_mkspj_22",
17
+ "container-open": "_container-open_17kql_18",
18
+ "input-container": "_input-container_17kql_22",
19
19
  full: ke,
20
- "selected-icon": "_selected-icon_mkspj_31",
21
- "selector-icon-open": "_selector-icon-open_mkspj_35",
22
- button: be,
23
- "selector-icon": "_selector-icon_mkspj_35",
24
- options: je,
25
- top: ge,
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-options_mkspj_90",
28
- m: Ie,
29
- l: Ne,
30
- "multi-select-input-disabled": "_multi-select-input-disabled_mkspj_126",
31
- "multi-select-input": "_multi-select-input_mkspj_126",
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-active_mkspj_148",
35
- "option-inner": "_option-inner_mkspj_151",
36
- "chip-container": "_chip-container_mkspj_158",
37
- "right-slot": "_right-slot_mkspj_165",
38
- "required-mark": "_required-mark_mkspj_170",
39
- clear: Se,
40
- "icon-button": "_icon-button_mkspj_184"
41
- }, Re = ne(
42
- (G, W) => {
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 = S.L,
46
- value: M,
47
+ size: i = M.L,
48
+ value: a,
47
49
  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",
57
- disabled: l = !1,
58
- searchProps: y,
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: 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(() => {
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 (!z) return p;
70
- const t = ((n = d.split(",").pop()) == null ? void 0 : n.trim().toLowerCase()) ?? "";
71
- return p.filter(
72
- (a) => a.name.toLowerCase().includes(t)
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
- }, [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;
80
- const a = n.length;
81
- c.current.setSelectionRange(a, a);
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
- }, L = (t) => {
85
- if (u) return;
90
+ }, A = (t) => {
91
+ if (_) return;
86
92
  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])
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
- j(V), s == null || s(V), m(!0);
92
- }, Y = (t) => {
93
- const n = _.filter(
94
- (a) => a.id !== t.id
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
- j(n), s == null || s(n), b(R(n, f));
97
- }, T = () => m((t) => !t), Z = (t) => {
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
- b(""), j([]), s == null || s([]);
103
- }, ee = (t) => {
104
- t.stopPropagation(), $();
105
- }, te = (t) => {
106
- u && t.target.blur();
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 se(() => {
114
+ return R(() => {
109
115
  const t = (n) => {
110
- N.current && !N.current.contains(n.target) && !n.defaultPrevented && m(!1);
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__ */ h("div", { ref: N, children: [
121
+ }, []), /* @__PURE__ */ g("div", { ref: w, children: [
116
122
  /* @__PURE__ */ o(
117
- me,
123
+ pe,
118
124
  {
119
125
  multiple: !0,
120
126
  as: "div",
121
- value: _,
122
- className: r(e["multi-select-search"], {
123
- [e.full]: H,
124
- [e.disabled]: l
127
+ value: u,
128
+ className: l(e["multi-select-search"], {
129
+ [e.full]: K,
130
+ [e.disabled]: r
125
131
  }),
126
- onChange: X,
127
- ref: W,
128
- disabled: l,
129
- virtual: { options: A },
130
- children: /* @__PURE__ */ h(
132
+ onChange: Z,
133
+ ref: J,
134
+ disabled: r,
135
+ virtual: { options: O },
136
+ children: /* @__PURE__ */ g(
131
137
  "div",
132
138
  {
133
- className: r(e.container, e[i], {
134
- [e["container-open"]]: k
139
+ className: l(e.container, e[i], {
140
+ [e["container-open"]]: b
135
141
  }),
136
142
  children: [
137
- u && /* @__PURE__ */ h("div", { className: e["input-container"], children: [
143
+ _ && /* @__PURE__ */ g("div", { className: e["input-container"], children: [
138
144
  /* @__PURE__ */ o(
139
- F,
145
+ G,
140
146
  {
141
- disabled: l,
147
+ disabled: r,
142
148
  style: { width: "100%" },
143
- onClick: T,
149
+ onClick: L,
144
150
  children: /* @__PURE__ */ o(
145
- P,
151
+ W,
146
152
  {
147
- as: E,
153
+ as: j,
148
154
  label: x,
149
- size: O(i),
150
- className: r(e["multi-select-input"], {
151
- [e["multi-select-input-disabled"]]: u && I
155
+ size: F(i),
156
+ className: l(e["multi-select-input"], {
157
+ [e["multi-select-input-disabled"]]: _ && I
152
158
  }),
153
- onChange: L,
154
- value: d,
155
- disabled: l,
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: te,
166
+ onFocus: oe,
161
167
  rightAddon: {
162
168
  addonType: "icon",
163
- addonContent: re(k, i)
169
+ addonContent: le(b, i)
164
170
  },
165
- ...y
171
+ ...z
166
172
  }
167
173
  )
168
174
  }
169
175
  ),
170
- I && d && /* @__PURE__ */ o(
171
- ae,
176
+ I && f && /* @__PURE__ */ o(
177
+ ce,
172
178
  {
173
179
  tabIndex: -1,
174
- className: r(e.clear, {
175
- [e.disabled]: l
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: l,
188
+ disabled: r,
183
189
  variant: "secondary-gray",
184
- onClick: ee,
190
+ onClick: ne,
185
191
  "data-testid": "clear-button"
186
192
  }
187
193
  )
188
194
  ] }),
189
- !u && /* @__PURE__ */ o(
190
- P,
195
+ !_ && /* @__PURE__ */ o(
196
+ W,
191
197
  {
192
- as: E,
198
+ as: j,
193
199
  label: x,
194
- size: O(i),
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: d,
199
- disabled: l,
204
+ value: f,
205
+ disabled: r,
200
206
  variant: D,
201
207
  withClearButton: I,
202
- onFocus: () => m(!0),
203
- onMouseDown: Z,
204
- onChange: L,
205
- ref: c,
208
+ onFocus: () => h(!0),
209
+ onMouseDown: ee,
210
+ onChange: A,
211
+ ref: p,
206
212
  rightAddon: {
207
213
  addonType: "react-node",
208
- addonContent: K && /* @__PURE__ */ o(
209
- F,
214
+ addonContent: U && /* @__PURE__ */ o(
215
+ G,
210
216
  {
211
- className: r(e.button, {
212
- [e.disabled]: l
217
+ className: l(e.button, {
218
+ [e.disabled]: r
213
219
  }),
214
- disabled: l,
215
- onClick: T,
220
+ disabled: r,
221
+ onMouseDown: L,
216
222
  children: /* @__PURE__ */ o(
217
- le,
223
+ re,
218
224
  {
219
- iconName: i == S.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
220
- className: r(e["selector-icon"], {
221
- [e["selector-icon-open"]]: k
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
- ...y
235
+ ...z
230
236
  }
231
237
  ),
232
- k && /* @__PURE__ */ o(q, { children: p.length ? A.length ? /* @__PURE__ */ o(
233
- de,
238
+ b && /* @__PURE__ */ o(V, { children: m.length ? O.length ? /* @__PURE__ */ o(
239
+ me,
234
240
  {
235
- className: r(
241
+ className: l(
236
242
  e.options,
237
243
  e[i],
238
- e[v]
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 }) => r(
252
+ className: ({ focus: n }) => l(
247
253
  e.option,
248
- U,
254
+ Q,
249
255
  i && e[i],
250
256
  {
251
257
  [e["option-active"]]: n
252
258
  }
253
259
  ),
254
- children: /* @__PURE__ */ h(q, { children: [
255
- /* @__PURE__ */ h("div", { className: e["option-inner"], children: [
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
- ce,
266
+ ae,
261
267
  {
262
268
  isInteractive: !1,
263
- checked: _.some(
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: r(
282
+ className: l(
277
283
  e.options,
278
284
  e[i],
279
285
  e["no-options"],
280
- e[v]
286
+ e[N]
281
287
  ),
282
288
  children: "Ничего не найдено"
283
289
  }
284
290
  ) : /* @__PURE__ */ o(
285
291
  "div",
286
292
  {
287
- className: r(
293
+ className: l(
288
294
  e.options,
289
295
  e[i],
290
296
  e["no-options"],
291
- e[v]
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
- J && _.length > 0 && /* @__PURE__ */ o("div", { className: e["chip-container"], children: _.map((t) => /* @__PURE__ */ o(
302
- pe,
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 === S.L ? "s" : "xs",
305
- variant: Q,
306
- className: e.chip,
310
+ size: i === M.L ? "s" : "xs",
311
+ variant: Y,
312
+ className: e["chip-root"],
307
313
  withAction: !0,
308
- onClose: () => Y(t),
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
- Re as MultiSelectSearch
323
+ Fe as MultiSelectSearch
318
324
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.36.2",
4
+ "version": "1.36.4",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {