mimir-ui-kit 1.43.9 → 1.43.11

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