mimir-ui-kit 1.43.11 → 1.43.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/Input-BU_6U1CW.js +227 -0
  2. package/dist/assets/Accordion.css +1 -1
  3. package/dist/assets/AccordionItem.css +1 -1
  4. package/dist/assets/Avatar.css +1 -1
  5. package/dist/assets/Button.css +1 -1
  6. package/dist/assets/CheckboxMimir.css +1 -1
  7. package/dist/assets/Chip.css +1 -1
  8. package/dist/assets/ClearButton.css +1 -0
  9. package/dist/assets/Drawer.css +1 -1
  10. package/dist/assets/GosZnak.css +1 -1
  11. package/dist/assets/Input.css +1 -1
  12. package/dist/assets/InputPassword.css +1 -1
  13. package/dist/assets/InputRangeSlider.css +1 -1
  14. package/dist/assets/Link.css +1 -1
  15. package/dist/assets/ListFiles.css +1 -1
  16. package/dist/assets/ListPhotos.css +1 -1
  17. package/dist/assets/MessageShortReply.css +1 -1
  18. package/dist/assets/MultiSelectSearch.css +1 -1
  19. package/dist/assets/NotificationBadge.css +1 -1
  20. package/dist/assets/OtpInput.css +1 -1
  21. package/dist/assets/Pagination.css +1 -1
  22. package/dist/assets/SelectSearch.css +1 -1
  23. package/dist/assets/hooks.css +1 -1
  24. package/dist/assets/index.css +1 -1
  25. package/dist/assets/styles.css +1 -1
  26. package/dist/components/Accordion/Accordion.d.ts +3 -10
  27. package/dist/components/Accordion/Accordion.js +212 -286
  28. package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
  29. package/dist/components/Accordion/constants.d.ts +4 -0
  30. package/dist/components/Accordion/constants.js +5 -4
  31. package/dist/components/AnchorLink/Link.js +20 -21
  32. package/dist/components/Avatar/Avatar.js +26 -26
  33. package/dist/components/Button/Button.js +87 -110
  34. package/dist/components/Button/constants.d.ts +2 -8
  35. package/dist/components/Button/constants.js +5 -6
  36. package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +0 -2
  37. package/dist/components/CheckboxMimir/CheckboxMimir.js +35 -37
  38. package/dist/components/Chip/Chip.js +17 -17
  39. package/dist/components/DatePicker/DatePicker.d.ts +0 -8
  40. package/dist/components/DatePicker/DatePicker.js +169 -182
  41. package/dist/components/DatePicker/DatePickerModal.js +98 -134
  42. package/dist/components/DatePicker/MonthPickerModal.js +95 -115
  43. package/dist/components/DatePicker/YearPickerModal.js +89 -109
  44. package/dist/components/DatePicker/constants.d.ts +1 -1
  45. package/dist/components/DatePicker/constants.js +7 -6
  46. package/dist/components/DatePicker/hooks.d.ts +1 -2
  47. package/dist/components/DatePicker/hooks.js +13 -13
  48. package/dist/components/Drawer/Drawer.js +138 -172
  49. package/dist/components/Dropdown/Dropdown.js +1 -1
  50. package/dist/components/Dropdown/hooks.js +1 -1
  51. package/dist/components/GosZnak/GosZnak.js +38 -47
  52. package/dist/components/Input/Input.d.ts +0 -4
  53. package/dist/components/Input/Input.js +2 -2
  54. package/dist/components/Input/index.js +1 -1
  55. package/dist/components/{MiniButton/MiniButton.d.ts → InputClearButton/ClearButton.d.ts} +8 -17
  56. package/dist/components/InputClearButton/ClearButton.js +41 -0
  57. package/dist/components/InputClearButton/constants.d.ts +8 -0
  58. package/dist/components/InputClearButton/constants.js +5 -0
  59. package/dist/components/InputClearButton/index.d.ts +4 -0
  60. package/dist/components/InputClearButton/index.js +6 -0
  61. package/dist/components/InputPassword/InputPassword.js +42 -38
  62. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  63. package/dist/components/InputRangeSlider/InputRangeSlider.js +139 -159
  64. package/dist/components/InputRangeSlider/constants.d.ts +0 -5
  65. package/dist/components/InputRangeSlider/constants.js +6 -11
  66. package/dist/components/ListFiles/ListFiles.js +39 -41
  67. package/dist/components/ListPhotos/ListPhotos.js +18 -17
  68. package/dist/components/MessageShortReply/MessageShortReply.js +34 -34
  69. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +152 -153
  70. package/dist/components/MultiSelectSearch/constants.d.ts +0 -1
  71. package/dist/components/MultiSelectSearch/constants.js +7 -7
  72. package/dist/components/MultiSelectSearch/utils.d.ts +1 -1
  73. package/dist/components/MultiSelectSearch/utils.js +16 -18
  74. package/dist/components/NotificationBadge/NotificationBadge.js +33 -49
  75. package/dist/components/NotificationBadge/constants.d.ts +2 -9
  76. package/dist/components/NotificationBadge/constants.js +2 -3
  77. package/dist/components/NotificationBadge/types.d.ts +1 -11
  78. package/dist/components/OtpInput/OtpInput.js +40 -44
  79. package/dist/components/OtpInput/constants.d.ts +0 -4
  80. package/dist/components/OtpInput/constants.js +4 -6
  81. package/dist/components/OtpInput/index.d.ts +0 -1
  82. package/dist/components/OtpInput/index.js +0 -2
  83. package/dist/components/Pagination/Pagination.js +23 -23
  84. package/dist/components/SelectSearch/SelectSearch.js +241 -241
  85. package/dist/components/SelectSearch/utils.d.ts +1 -1
  86. package/dist/components/SelectSearch/utils.js +1 -1
  87. package/dist/components/Slider/Slider.d.ts +5 -1
  88. package/dist/components/Slider/Slider.js +36 -34
  89. package/dist/components/TextArea/TextArea.js +1 -1
  90. package/dist/components/index.d.ts +1 -3
  91. package/dist/components/index.js +51 -55
  92. package/dist/hooks-HgN6Yauq.js +117 -0
  93. package/dist/icons/Icon.js +1 -1
  94. package/dist/icons/components/64px/AdvancePaymentDiscount64px.js +59 -0
  95. package/dist/icons/components/64px/AtsVendors64px.js +37 -0
  96. package/dist/icons/components/64px/ButtonOn64px.js +31 -0
  97. package/dist/icons/components/64px/BuyoutAuto64px.js +45 -0
  98. package/dist/icons/components/64px/CarAssistance64px.js +44 -0
  99. package/dist/icons/components/64px/CarDelivery64px.js +37 -0
  100. package/dist/icons/components/64px/CarSearchReturn64px.js +45 -0
  101. package/dist/icons/components/64px/CarService64px.js +37 -0
  102. package/dist/icons/components/64px/Case64px.js +33 -0
  103. package/dist/icons/components/64px/CoatOfArms64px.js +149 -0
  104. package/dist/icons/components/64px/CoffeeCup64px.js +44 -0
  105. package/dist/icons/components/64px/Cup64px.js +38 -0
  106. package/dist/icons/components/64px/ExpertAdvice64px.js +40 -0
  107. package/dist/icons/components/64px/Fines64px.js +88 -0
  108. package/dist/icons/components/64px/Fuel64px.js +38 -0
  109. package/dist/icons/components/64px/GazprombankIcon24px.js +21 -0
  110. package/dist/icons/components/64px/Kasko64px.js +44 -0
  111. package/dist/icons/components/64px/LegalSupport64px.js +58 -0
  112. package/dist/icons/components/64px/Microphone64px.js +37 -0
  113. package/dist/icons/components/64px/Money64px.js +60 -0
  114. package/dist/icons/components/64px/PaymentSchedule64px.js +39 -0
  115. package/dist/icons/components/64px/PersonalManager64px.js +100 -0
  116. package/dist/icons/components/64px/PreApproval64px.js +44 -0
  117. package/dist/icons/components/64px/Questions64px.js +37 -0
  118. package/dist/icons/components/64px/SupportGeography64px.js +51 -0
  119. package/dist/icons/components/64px/Timer64px.js +45 -0
  120. package/dist/icons/components/64px/Twogis64px.js +51 -0
  121. package/dist/icons/components/64px/Vehicles64px.js +45 -0
  122. package/dist/icons/components/64px/Workplace64px.js +38 -0
  123. package/dist/icons/components/index.js +591 -564
  124. package/dist/{index-DrVFMaBi.js → index-C2dQUuc9.js} +1346 -1184
  125. package/dist/index.js +69 -73
  126. package/dist/styles.module-Cuqm31CO.js +28 -0
  127. package/package.json +1 -1
  128. package/dist/Input-CGZoshMl.js +0 -224
  129. package/dist/assets/CarBodyButton.css +0 -1
  130. package/dist/assets/MiniButton.css +0 -1
  131. package/dist/assets/RoundButton.css +0 -1
  132. package/dist/assets/ScrollWrapper.css +0 -1
  133. package/dist/components/CarBodyButton/CarBodyButton.d.ts +0 -26
  134. package/dist/components/CarBodyButton/CarBodyButton.js +0 -40
  135. package/dist/components/CarBodyButton/index.d.ts +0 -1
  136. package/dist/components/CarBodyButton/index.js +0 -4
  137. package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.d.ts +0 -11
  138. package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.js +0 -27
  139. package/dist/components/GosZnak/utils.d.ts +0 -6
  140. package/dist/components/GosZnak/utils.js +0 -15
  141. package/dist/components/MiniButton/MiniButton.js +0 -44
  142. package/dist/components/MiniButton/constants.d.ts +0 -9
  143. package/dist/components/MiniButton/constants.js +0 -5
  144. package/dist/components/MiniButton/index.d.ts +0 -4
  145. package/dist/components/MiniButton/index.js +0 -6
  146. package/dist/components/NotificationBadge/utils.d.ts +0 -8
  147. package/dist/components/NotificationBadge/utils.js +0 -4
  148. package/dist/components/RoundButton/RoundButton.d.ts +0 -82
  149. package/dist/components/RoundButton/RoundButton.js +0 -69
  150. package/dist/components/RoundButton/constants.d.ts +0 -11
  151. package/dist/components/RoundButton/constants.js +0 -5
  152. package/dist/components/RoundButton/index.d.ts +0 -2
  153. package/dist/components/RoundButton/index.js +0 -7
  154. package/dist/components/RoundButton/types.d.ts +0 -20
  155. package/dist/hooks-Cd4Ez6_j.js +0 -117
  156. package/dist/icons/components/16px/DropdownArrowDown16px.js +0 -23
  157. package/dist/icons/components/24px/EyeClosed24px.js +0 -65
  158. package/dist/styles.module-BfkM1-KJ.js +0 -32
@@ -1,146 +1,145 @@
1
- import { jsxs as d, jsx as i, Fragment as ee } from "react/jsx-runtime";
1
+ import { jsxs as u, jsx as i, Fragment as ee } from "react/jsx-runtime";
2
2
  import { u as Qe } from "../../index-D5H8gPPn.js";
3
- import { c as l } from "../../index-DIxK0V-G.js";
3
+ import { c } from "../../index-DIxK0V-G.js";
4
4
  import { forwardRef as Xe, useId as Ze, useRef as j, useState as f, useEffect as A, useMemo as te, useCallback as et } from "react";
5
5
  import { EMultiSelectSearchSize as D, ELoadingIndicatorPlacement as P } from "./constants.js";
6
- import { getInitialInputValue as ge, shouldShowMenuOnTop as tt, MULTISELECT_OPEN_EVENT as be, prepareGroupedItems as nt, mapSizeToInputSize as Ie, getDropdownArrowIcon as it, joinSelectedItems as we, dispatchMultiselectOpen as U } from "./utils.js";
6
+ import { getInitialInputValue as ve, shouldShowMenuOnTop as tt, MULTISELECT_OPEN_EVENT as ge, prepareGroupedItems as nt, mapSizeToInputSize as ke, getDropdownArrowIcon as it, joinSelectedItems as Ie, dispatchMultiselectOpen as U } from "./utils.js";
7
7
  import { Icon as ot } from "../../icons/Icon.js";
8
8
  import { Button as st } from "../Button/Button.js";
9
- import { CheckboxMimir as ye } from "../CheckboxMimir/CheckboxMimir.js";
9
+ import { CheckboxMimir as we } from "../CheckboxMimir/CheckboxMimir.js";
10
10
  import { Chip as rt } from "../Chip/Chip.js";
11
- import { I as Ne } from "../../Input-CGZoshMl.js";
12
- import { EInputVariant as ct } from "../Input/constants.js";
13
- import { Loader as Se } from "../Loader/Loader.js";
14
- import { H as at, U as xe, G as Le, W as Ce, K as lt } from "../../combobox-fIVOzEhl.js";
15
- import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt = "_container_uc668_9", pt = "_loader_uc668_37", mt = "_full_uc668_47", ft = "_button_uc668_59", ht = "_options_uc668_73", _t = "_visible_uc668_86", vt = "_top_uc668_89", gt = "_bottom_uc668_94", bt = "_s_uc668_33", It = "_m_uc668_2", wt = "_l_uc668_37", yt = "_focused_uc668_166", Nt = "_option_uc668_73", St = "_chip_uc668_195", xt = "_clear_uc668_220", t = {
16
- "multi-select-search": "_multi-select-search_uc668_2",
17
- disabled: ut,
18
- container: dt,
19
- "container-open": "_container-open_uc668_18",
20
- "group-header": "_group-header_uc668_22",
21
- "sticky-active": "_sticky-active_uc668_33",
11
+ import { I as ye } from "../../Input-BU_6U1CW.js";
12
+ import { EInputVariant as at } from "../Input/constants.js";
13
+ import { Loader as Ne } from "../Loader/Loader.js";
14
+ import { H as lt, U as Se, G as xe, W as Ce, K as ct } from "../../combobox-fIVOzEhl.js";
15
+ import '../../assets/MultiSelectSearch.css';const dt = "_disabled_1b2pk_5", ut = "_container_1b2pk_9", pt = "_loader_1b2pk_37", mt = "_full_1b2pk_47", ft = "_button_1b2pk_59", ht = "_options_1b2pk_73", _t = "_visible_1b2pk_86", bt = "_top_1b2pk_89", vt = "_bottom_1b2pk_94", gt = "_m_1b2pk_2", kt = "_l_1b2pk_37", It = "_focused_1b2pk_154", wt = "_option_1b2pk_73", yt = "_chip_1b2pk_183", Nt = "_clear_1b2pk_208", t = {
16
+ "multi-select-search": "_multi-select-search_1b2pk_2",
17
+ disabled: dt,
18
+ container: ut,
19
+ "container-open": "_container-open_1b2pk_18",
20
+ "group-header": "_group-header_1b2pk_22",
21
+ "sticky-active": "_sticky-active_1b2pk_33",
22
22
  loader: pt,
23
- "input-container": "_input-container_uc668_42",
23
+ "input-container": "_input-container_1b2pk_42",
24
24
  full: mt,
25
- "selected-icon": "_selected-icon_uc668_51",
26
- "selector-icon-open": "_selector-icon-open_uc668_55",
25
+ "selected-icon": "_selected-icon_1b2pk_51",
26
+ "selector-icon-open": "_selector-icon-open_1b2pk_55",
27
27
  button: ft,
28
- "selector-icon": "_selector-icon_uc668_55",
28
+ "selector-icon": "_selector-icon_1b2pk_55",
29
29
  options: ht,
30
30
  visible: _t,
31
- top: vt,
32
- bottom: gt,
33
- "no-options": "_no-options_uc668_115",
34
- s: bt,
35
- m: It,
36
- l: wt,
37
- "multi-select-input-disabled": "_multi-select-input-disabled_uc668_163",
38
- "multi-select-input": "_multi-select-input_uc668_163",
39
- focused: yt,
40
- option: Nt,
41
- "option-active": "_option-active_uc668_185",
42
- "option-inner": "_option-inner_uc668_188",
43
- chip: St,
44
- "chip-container": "_chip-container_uc668_200",
45
- "chip-root": "_chip-root_uc668_206",
46
- "right-slot": "_right-slot_uc668_210",
47
- "required-mark": "_required-mark_uc668_215",
48
- clear: xt,
49
- "icon-button": "_icon-button_uc668_229"
50
- }, Rt = Xe(
51
- (ke, Ee) => {
31
+ top: bt,
32
+ bottom: vt,
33
+ "no-options": "_no-options_1b2pk_115",
34
+ m: gt,
35
+ l: kt,
36
+ "multi-select-input-disabled": "_multi-select-input-disabled_1b2pk_151",
37
+ "multi-select-input": "_multi-select-input_1b2pk_151",
38
+ focused: It,
39
+ option: wt,
40
+ "option-active": "_option-active_1b2pk_173",
41
+ "option-inner": "_option-inner_1b2pk_176",
42
+ chip: yt,
43
+ "chip-container": "_chip-container_1b2pk_188",
44
+ "chip-root": "_chip-root_1b2pk_194",
45
+ "right-slot": "_right-slot_1b2pk_198",
46
+ "required-mark": "_required-mark_1b2pk_203",
47
+ clear: Nt,
48
+ "icon-button": "_icon-button_1b2pk_217"
49
+ }, Ft = Xe(
50
+ (Le, Ee) => {
52
51
  const {
53
52
  placeholder: ne,
54
53
  size: s = D.L,
55
54
  value: h,
56
- onChange: c,
55
+ onChange: a,
57
56
  full: Me,
58
57
  showArrow: Te = !0,
59
- items: g = [],
58
+ items: v = [],
60
59
  classNameOption: ie,
61
- displayValue: b = "name",
60
+ displayValue: g = "name",
62
61
  filterOnSearch: oe = !0,
63
62
  onSearch: W,
64
- variant: se = ct.DefaultGray,
63
+ variant: se = at.DefaultGray,
65
64
  menuPlacement: C = "bottom",
66
65
  disabled: p = !1,
67
66
  searchProps: re,
68
67
  withClearButton: K = !1,
69
68
  withChip: Oe = !1,
70
69
  chipVariant: ze = "sapphire",
71
- disableInput: k = !1,
72
- autocomplete: ce = "on",
70
+ disableInput: L = !1,
71
+ autocomplete: ae = "on",
73
72
  id: Ve,
74
73
  autoPlacement: Y = !1,
75
- onIsOpen: u,
74
+ onIsOpen: d,
76
75
  noOptionsText: Ae = "Нет данных",
77
76
  noMatchText: De = "Ничего не найдено",
78
77
  loadOnOpen: B,
79
- loading: ae,
78
+ loading: le,
80
79
  loadingIndicatorPlacement: q = P.Both,
81
80
  groupBy: _,
82
- getGroupTitle: le = (e) => e
83
- } = ke, Pe = Ze(), I = Ve || `multiselect-${Pe}`, E = j(null), w = j(null), Q = j(!1), G = j(null), [a, y] = f(!1), [M, T] = f(
84
- () => ge(h, b)
81
+ getGroupTitle: ce = (e) => e
82
+ } = Le, Pe = Ze(), k = Ve || `multiselect-${Pe}`, E = j(null), I = j(null), Q = j(!1), G = j(null), [l, w] = f(!1), [M, T] = f(
83
+ () => ve(h, g)
85
84
  ), [r, O] = f(
86
85
  h || []
87
- ), [F, ue] = f(C), [R, de] = f(!1), [Be, pe] = f(!1), [qe, H] = f(!1), [X, Ge] = f(null), me = ae !== void 0 ? ae : qe;
86
+ ), [F, de] = f(C), [R, ue] = f(!1), [Be, pe] = f(!1), [qe, H] = f(!1), [X, Ge] = f(null), me = le !== void 0 ? le : qe;
88
87
  A(() => {
89
- h && (O(h), JSON.stringify(h) !== JSON.stringify(r) && T(ge(h, b)));
90
- }, [h, b, r]);
88
+ h && (O(h), JSON.stringify(h) !== JSON.stringify(r) && T(ve(h, g)));
89
+ }, [h, g, r]);
91
90
  const z = te(() => {
92
91
  var n;
93
- if (!oe) return g;
92
+ if (!oe) return v;
94
93
  const e = ((n = M.split(",").pop()) == null ? void 0 : n.trim().toLowerCase()) ?? "";
95
- return r.length > 0 && r[r.length - 1].name.toLowerCase() === e ? g : g.filter(
94
+ return r.length > 0 && r[r.length - 1].name.toLowerCase() === e ? v : v.filter(
96
95
  (o) => o.name.toLowerCase().includes(e)
97
96
  );
98
- }, [oe, g, M, r]), Fe = (e) => {
99
- O(e), c == null || c(e);
100
- const n = we(e, b);
101
- T(n), y(!0), U(I), setTimeout(() => {
102
- if (w.current) {
103
- w.current.focus(), w.current.scrollLeft = w.current.scrollWidth;
97
+ }, [oe, v, M, r]), Fe = (e) => {
98
+ O(e), a == null || a(e);
99
+ const n = Ie(e, g);
100
+ T(n), w(!0), U(k), setTimeout(() => {
101
+ if (I.current) {
102
+ I.current.focus(), I.current.scrollLeft = I.current.scrollWidth;
104
103
  const o = n.length;
105
- w.current.setSelectionRange(o, o);
104
+ I.current.setSelectionRange(o, o);
106
105
  }
107
106
  }, 0);
108
107
  }, fe = async (e) => {
109
- var v;
110
- if (k) return;
108
+ var b;
109
+ if (L) return;
111
110
  const n = e.target.value;
112
111
  T(n), W == null || W(n);
113
- const o = n.split(",").map((L) => L.trim()).filter(Boolean), S = g.filter(
114
- (L) => o.includes(L[b])
112
+ const o = n.split(",").map((x) => x.trim()).filter(Boolean), N = v.filter(
113
+ (x) => o.includes(x[g])
115
114
  );
116
- if (JSON.stringify(S) !== JSON.stringify(r) && (O(S), c == null || c(S)), !a && (y(!0), U(I), B))
115
+ if (JSON.stringify(N) !== JSON.stringify(r) && (O(N), a == null || a(N)), !l && (w(!0), U(k), B))
117
116
  try {
118
117
  H(!0), await B();
119
118
  } finally {
120
119
  H(!1);
121
120
  }
122
- const x = (v = E.current) == null ? void 0 : v.querySelector(
121
+ const S = (b = E.current) == null ? void 0 : b.querySelector(
123
122
  `.${t.options}`
124
123
  );
125
- x && typeof x.scrollTo == "function" && x.scrollTo({ top: 0, behavior: "smooth" });
124
+ S && typeof S.scrollTo == "function" && S.scrollTo({ top: 0, behavior: "smooth" });
126
125
  }, Re = (e) => {
127
126
  const n = r.filter(
128
127
  (o) => o.id !== e.id
129
128
  );
130
- O(n), c == null || c(n), T(we(n, b));
129
+ O(n), a == null || a(n), T(Ie(n, g));
131
130
  }, m = et(() => {
132
131
  if (!Y) {
133
- ue(C);
132
+ de(C);
134
133
  return;
135
134
  }
136
135
  const e = tt(E, s);
137
- ue(e ? "top" : C);
136
+ de(e ? "top" : C);
138
137
  }, [Y, C, s]), He = (e) => {
139
138
  e.preventDefault(), e.currentTarget.focus();
140
139
  const n = e.currentTarget.value.length;
141
140
  e.currentTarget.setSelectionRange(n, n);
142
141
  }, Je = () => {
143
- T(""), O([]), c == null || c([]);
142
+ T(""), O([]), a == null || a([]);
144
143
  }, $e = (e) => {
145
144
  e.stopPropagation(), Je();
146
145
  }, he = async () => {
@@ -151,65 +150,65 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
151
150
  H(!1);
152
151
  }
153
152
  }, _e = async () => {
154
- m(), y(!0), U(I), await he();
153
+ m(), w(!0), U(k), await he();
155
154
  }, je = async (e) => {
156
- if (k) {
155
+ if (L) {
157
156
  e.target.blur();
158
157
  return;
159
158
  }
160
159
  await _e();
161
- }, ve = async () => {
162
- const e = !a;
163
- e && (m(), U(I), await he()), y(e), u == null || u(e);
160
+ }, be = async () => {
161
+ const e = !l;
162
+ e && (m(), U(k), await he()), w(e), d == null || d(e);
164
163
  };
165
164
  A(() => {
166
- if (a) {
165
+ if (l) {
167
166
  const e = (n) => {
168
- E.current && !E.current.contains(n.target) && !n.defaultPrevented && (y(!1), u == null || u(!1));
167
+ E.current && !E.current.contains(n.target) && !n.defaultPrevented && (w(!1), d == null || d(!1));
169
168
  };
170
169
  return document.addEventListener("mousedown", e), () => {
171
170
  document.removeEventListener("mousedown", e);
172
171
  };
173
172
  }
174
- }, [a, u]), A(() => {
173
+ }, [l, d]), A(() => {
175
174
  const n = (o) => {
176
- o.detail === I || !a || Q.current || (Q.current = !0, y(!1), u == null || u(!1), queueMicrotask(() => {
175
+ o.detail === k || !l || Q.current || (Q.current = !0, w(!1), d == null || d(!1), queueMicrotask(() => {
177
176
  Q.current = !1;
178
177
  }));
179
178
  };
180
- return window.addEventListener(be, n), () => window.removeEventListener(be, n);
181
- }, [I, u, a]), A(() => {
182
- if (a) {
179
+ return window.addEventListener(ge, n), () => window.removeEventListener(ge, n);
180
+ }, [k, d, l]), A(() => {
181
+ if (l) {
183
182
  m(), window.addEventListener("scroll", m), window.addEventListener("resize", m);
184
183
  const e = requestAnimationFrame(() => {
185
- pe(!0), de(!0);
184
+ pe(!0), ue(!0);
186
185
  });
187
186
  return () => {
188
187
  window.removeEventListener("scroll", m), window.removeEventListener("resize", m), cancelAnimationFrame(e);
189
188
  };
190
189
  } else
191
- de(!1), pe(!1);
192
- }, [a, C, Y, s, m]);
190
+ ue(!1), pe(!1);
191
+ }, [l, C, Y, s, m]);
193
192
  const Ue = () => {
194
193
  if (Te)
195
194
  return {
196
195
  addonType: "react-node",
197
- addonContent: /* @__PURE__ */ d(ee, { children: [
198
- me && (q === P.Input || q === P.Both) && /* @__PURE__ */ i(Se, { size: "s" }),
196
+ addonContent: /* @__PURE__ */ u(ee, { children: [
197
+ me && (q === P.Input || q === P.Both) && /* @__PURE__ */ i(Ne, { size: "s" }),
199
198
  /* @__PURE__ */ i(
200
- xe,
199
+ Se,
201
200
  {
202
- className: l(t.button, {
201
+ className: c(t.button, {
203
202
  [t.disabled]: p
204
203
  }),
205
204
  disabled: p,
206
- onMouseDown: ve,
205
+ onMouseDown: be,
207
206
  children: /* @__PURE__ */ i(
208
207
  ot,
209
208
  {
210
- iconName: s == D.L ? "DropdownArrowDown24px" : "DropdownArrowBottom16px",
211
- className: l(t["selector-icon"], {
212
- [t["selector-icon-open"]]: a
209
+ iconName: s == D.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
210
+ className: c(t["selector-icon"], {
211
+ [t["selector-icon-open"]]: l
213
212
  })
214
213
  }
215
214
  )
@@ -217,28 +216,28 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
217
216
  )
218
217
  ] })
219
218
  };
220
- }, We = () => me && (q === P.Dropdown || q === P.Both) ? /* @__PURE__ */ d("div", { className: t.loader, children: [
221
- /* @__PURE__ */ i(Se, { size: "s" }),
219
+ }, We = () => me && (q === P.Dropdown || q === P.Both) ? /* @__PURE__ */ u("div", { className: t.loader, children: [
220
+ /* @__PURE__ */ i(Ne, { size: "s" }),
222
221
  "Загрузка..."
223
222
  ] }) : Ae, V = te(() => _ ? nt(
224
223
  z,
225
224
  _,
226
- le || ((e) => e)
227
- ) : z, [z, _, le]), J = te(() => {
225
+ ce || ((e) => e)
226
+ ) : z, [z, _, ce]), J = te(() => {
228
227
  const e = [];
229
228
  return V.forEach((n, o) => {
230
229
  n.isGroupHeader && e.push(o);
231
230
  }), e;
232
- }, [V]), N = Qe({
231
+ }, [V]), y = Qe({
233
232
  count: V.length,
234
233
  getScrollElement: () => G.current,
235
234
  estimateSize: () => s === D.L ? 65 : 49,
236
235
  overscan: 10
237
- }), Ke = () => g.length ? z.length ? _ ? /* @__PURE__ */ d(
236
+ }), Ke = () => v.length ? z.length ? _ ? /* @__PURE__ */ u(
238
237
  "div",
239
238
  {
240
239
  ref: G,
241
- className: l(
240
+ className: c(
242
241
  t.options,
243
242
  t[s],
244
243
  t[F],
@@ -265,16 +264,16 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
265
264
  "div",
266
265
  {
267
266
  style: {
268
- height: `${N.getTotalSize()}px`,
267
+ height: `${y.getTotalSize()}px`,
269
268
  width: "100%"
270
269
  },
271
- children: N.getVirtualItems().map((e) => {
270
+ children: y.getVirtualItems().map((e) => {
272
271
  const n = V[e.index];
273
272
  return /* @__PURE__ */ i(
274
273
  "div",
275
274
  {
276
275
  "data-index": e.index,
277
- ref: N.measureElement,
276
+ ref: y.measureElement,
278
277
  style: {
279
278
  position: "absolute",
280
279
  top: 0,
@@ -295,7 +294,7 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
295
294
  Ce,
296
295
  {
297
296
  value: n,
298
- className: ({ focus: o }) => l(
297
+ className: ({ focus: o }) => c(
299
298
  t.option,
300
299
  ie,
301
300
  s && t[s],
@@ -303,13 +302,13 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
303
302
  [t["option-active"]]: o
304
303
  }
305
304
  ),
306
- children: /* @__PURE__ */ d(ee, { children: [
307
- /* @__PURE__ */ d("div", { className: t["option-inner"], children: [
305
+ children: /* @__PURE__ */ u(ee, { children: [
306
+ /* @__PURE__ */ u("div", { className: t["option-inner"], children: [
308
307
  n.name,
309
308
  n.bottom && /* @__PURE__ */ i("div", { children: n.bottom })
310
309
  ] }),
311
310
  /* @__PURE__ */ i(
312
- ye,
311
+ we,
313
312
  {
314
313
  isInteractive: !1,
315
314
  checked: r.some(
@@ -330,9 +329,9 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
330
329
  ]
331
330
  }
332
331
  ) : /* @__PURE__ */ i(
333
- lt,
332
+ ct,
334
333
  {
335
- className: l(
334
+ className: c(
336
335
  t.options,
337
336
  t[s],
338
337
  t[F],
@@ -344,16 +343,16 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
344
343
  Ce,
345
344
  {
346
345
  value: e,
347
- className: ({ focus: n }) => l(t.option, ie, s && t[s], {
346
+ className: ({ focus: n }) => c(t.option, ie, s && t[s], {
348
347
  [t["option-active"]]: n
349
348
  }),
350
- children: /* @__PURE__ */ d(ee, { children: [
351
- /* @__PURE__ */ d("div", { className: t["option-inner"], children: [
349
+ children: /* @__PURE__ */ u(ee, { children: [
350
+ /* @__PURE__ */ u("div", { className: t["option-inner"], children: [
352
351
  e.name,
353
352
  e.bottom && /* @__PURE__ */ i("div", { children: e.bottom })
354
353
  ] }),
355
354
  /* @__PURE__ */ i(
356
- ye,
355
+ we,
357
356
  {
358
357
  isInteractive: !1,
359
358
  checked: r.some(
@@ -369,7 +368,7 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
369
368
  ) : /* @__PURE__ */ i(
370
369
  "div",
371
370
  {
372
- className: l(
371
+ className: c(
373
372
  t.options,
374
373
  t[s],
375
374
  t["no-options"],
@@ -381,7 +380,7 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
381
380
  ) : /* @__PURE__ */ i(
382
381
  "div",
383
382
  {
384
- className: l(
383
+ className: c(
385
384
  t.options,
386
385
  t[s],
387
386
  t["no-options"],
@@ -395,30 +394,30 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
395
394
  const e = G.current;
396
395
  if (!e || !_) return;
397
396
  const n = () => {
398
- var Z, x;
397
+ var Z, S;
399
398
  const o = e.scrollTop;
400
- let S = null;
401
- for (let v = 0; v < J.length; v++) {
402
- const L = J[v];
403
- if ((((Z = N.getVirtualItems().find(($) => $.index === L)) == null ? void 0 : Z.start) || 0) <= o) {
404
- S = L;
405
- const $ = J[v + 1];
406
- if ($ !== void 0 && (((x = N.getVirtualItems().find((Ye) => Ye.index === $)) == null ? void 0 : x.start) || 0) <= o)
399
+ let N = null;
400
+ for (let b = 0; b < J.length; b++) {
401
+ const x = J[b];
402
+ if ((((Z = y.getVirtualItems().find(($) => $.index === x)) == null ? void 0 : Z.start) || 0) <= o) {
403
+ N = x;
404
+ const $ = J[b + 1];
405
+ if ($ !== void 0 && (((S = y.getVirtualItems().find((Ye) => Ye.index === $)) == null ? void 0 : S.start) || 0) <= o)
407
406
  continue;
408
407
  } else
409
408
  break;
410
409
  }
411
- Ge(S);
410
+ Ge(N);
412
411
  };
413
412
  return e.addEventListener("scroll", n), () => e.removeEventListener("scroll", n);
414
- }, [N, J, _, G.current]), /* @__PURE__ */ d("div", { ref: E, children: [
413
+ }, [y, J, _, G.current]), /* @__PURE__ */ u("div", { ref: E, children: [
415
414
  /* @__PURE__ */ i(
416
- at,
415
+ lt,
417
416
  {
418
417
  multiple: !0,
419
418
  as: "div",
420
419
  value: r,
421
- className: l(t["multi-select-search"], {
420
+ className: c(t["multi-select-search"], {
422
421
  [t.full]: Me,
423
422
  [t.disabled]: p
424
423
  }),
@@ -426,28 +425,28 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
426
425
  ref: Ee,
427
426
  disabled: p,
428
427
  virtual: _ ? void 0 : { options: z },
429
- children: /* @__PURE__ */ d(
428
+ children: /* @__PURE__ */ u(
430
429
  "div",
431
430
  {
432
- className: l(t.container, t[s], {
433
- [t["container-open"]]: a
431
+ className: c(t.container, t[s], {
432
+ [t["container-open"]]: l
434
433
  }),
435
434
  children: [
436
- k && /* @__PURE__ */ d("div", { className: t["input-container"], children: [
435
+ L && /* @__PURE__ */ u("div", { className: t["input-container"], children: [
437
436
  /* @__PURE__ */ i(
438
- xe,
437
+ Se,
439
438
  {
440
439
  disabled: p,
441
440
  style: { width: "100%" },
442
- onClick: ve,
441
+ onClick: be,
443
442
  children: /* @__PURE__ */ i(
444
- Le,
443
+ xe,
445
444
  {
446
- as: Ne,
445
+ as: ye,
447
446
  label: ne,
448
- size: Ie(s),
449
- className: l(t["multi-select-input"], {
450
- [t["multi-select-input-disabled"]]: k && K
447
+ size: ke(s),
448
+ className: c(t["multi-select-input"], {
449
+ [t["multi-select-input-disabled"]]: L && K
451
450
  }),
452
451
  onChange: fe,
453
452
  value: M,
@@ -459,9 +458,9 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
459
458
  onFocus: je,
460
459
  rightAddon: {
461
460
  addonType: "icon",
462
- addonContent: it(a, s)
461
+ addonContent: it(l, s)
463
462
  },
464
- autocomplete: ce,
463
+ autocomplete: ae,
465
464
  ...re
466
465
  }
467
466
  )
@@ -471,7 +470,7 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
471
470
  st,
472
471
  {
473
472
  tabIndex: -1,
474
- className: l(t.clear, {
473
+ className: c(t.clear, {
475
474
  [t.disabled]: p
476
475
  }),
477
476
  iconButtonClassName: t["icon-button"],
@@ -486,12 +485,12 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
486
485
  }
487
486
  )
488
487
  ] }),
489
- !k && /* @__PURE__ */ i(
490
- Le,
488
+ !L && /* @__PURE__ */ i(
489
+ xe,
491
490
  {
492
- as: Ne,
491
+ as: ye,
493
492
  label: ne,
494
- size: Ie(s),
493
+ size: ke(s),
495
494
  className: t["multi-select-input"],
496
495
  rightSlotClassName: t["right-slot"],
497
496
  requiredMarkClassName: t["required-mark"],
@@ -502,14 +501,14 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
502
501
  onFocus: _e,
503
502
  onMouseDown: He,
504
503
  onChange: fe,
505
- ref: w,
504
+ ref: I,
506
505
  rightAddon: Ue(),
507
506
  "data-testid": "select-search-input",
508
- autocomplete: ce,
507
+ autocomplete: ae,
509
508
  ...re
510
509
  }
511
510
  ),
512
- a && Be && Ke()
511
+ l && Be && Ke()
513
512
  ]
514
513
  }
515
514
  )
@@ -531,5 +530,5 @@ import '../../assets/MultiSelectSearch.css';const ut = "_disabled_uc668_5", dt =
531
530
  }
532
531
  );
533
532
  export {
534
- Rt as MultiSelectSearch
533
+ Ft as MultiSelectSearch
535
534
  };
@@ -1,5 +1,4 @@
1
1
  export declare enum EMultiSelectSearchSize {
2
- S = "s",
3
2
  M = "m",
4
3
  L = "l"
5
4
  }
@@ -1,10 +1,10 @@
1
- var p = /* @__PURE__ */ ((o) => (o.S = "s", o.M = "m", o.L = "l", o))(p || {});
2
- const r = 767, s = 264, B = 320;
3
- var _ = /* @__PURE__ */ ((o) => (o.Input = "input", o.Dropdown = "dropdown", o.Both = "both", o.None = "none", o))(_ || {});
1
+ var p = /* @__PURE__ */ ((o) => (o.M = "m", o.L = "l", o))(p || {});
2
+ const _ = 767, B = 264, E = 320;
3
+ var r = /* @__PURE__ */ ((o) => (o.Input = "input", o.Dropdown = "dropdown", o.Both = "both", o.None = "none", o))(r || {});
4
4
  export {
5
- B as DESKTOP_MENU_HEIGHT,
6
- _ as ELoadingIndicatorPlacement,
5
+ E as DESKTOP_MENU_HEIGHT,
6
+ r as ELoadingIndicatorPlacement,
7
7
  p as EMultiSelectSearchSize,
8
- r as MOBILE_BREAKPOINT,
9
- s as MOBILE_MENU_HEIGHT
8
+ _ as MOBILE_BREAKPOINT,
9
+ B as MOBILE_MENU_HEIGHT
10
10
  };
@@ -3,7 +3,7 @@ import { TMultiSelectOption } from './types';
3
3
  import { EInputSize } from '../Input';
4
4
 
5
5
  export declare const mapSizeToInputSize: (size: EMultiSelectSearchSize) => EInputSize;
6
- export declare const getDropdownArrowIcon: (isOpen: boolean, size: EMultiSelectSearchSize) => "DropdownArrowBottom16px" | "DropdownArrowUp24px" | "DropdownArrowUp16px" | "DropdownArrowDown24px";
6
+ export declare const getDropdownArrowIcon: (isOpen: boolean, size: EMultiSelectSearchSize) => "DropdownArrowBottom16px" | "DropdownArrowUp16px" | "DropdownArrowUp24px" | "DropdownArrowDown24px";
7
7
  export declare const getInitialInputValue: (value: TMultiSelectOption[] | undefined | null, displayValue: string) => string;
8
8
  export declare const joinSelectedItems: (items: TMultiSelectOption[], displayValue: string) => string;
9
9
  export declare const MULTISELECT_OPEN_EVENT = "multiselectOpen";