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,157 +1,173 @@
1
- import { jsx as s, jsxs as l, Fragment as ee } from "react/jsx-runtime";
2
- import { u as Se } from "../../index-D5H8gPPn.js";
1
+ import { jsx as i, jsxs as c, Fragment as z } from "react/jsx-runtime";
2
+ import { u as Oe } from "../../index-D5H8gPPn.js";
3
3
  import { c as a } from "../../index-DIxK0V-G.js";
4
- import { forwardRef as ke, useRef as we, useState as D, useMemo as A, useEffect as te, useCallback as ze } from "react";
5
- import { ESelectSearchSize as d, ELoadingIndicatorPlacement as x } from "./constants.js";
6
- import { prepareGroupedItems as Ce, mapSizeToInputSize as ne, getDropdownArrowIcon as Le } from "./utils.js";
7
- import { Icon as G } from "../../icons/Icon.js";
8
- import { Button as Oe } from "../Button/Button.js";
9
- import { I as oe } from "../../Input-BU_6U1CW.js";
10
- import { EInputVariant as De } from "../Input/constants.js";
11
- import { Loader as se } from "../Loader/Loader.js";
12
- import { H as Ee, U as ie, G as re, W as ae, K as Te } from "../../combobox-fIVOzEhl.js";
13
- import '../../assets/SelectSearch.css';const Be = "_disabled_1rthm_6", Ve = "_container_1rthm_13", Ae = "_full_1rthm_26", Ge = "_button_1rthm_38", Me = "_options_1rthm_52", qe = "_top_1rthm_63", Pe = "_bottom_1rthm_69", je = "_s_1rthm_2", Fe = "_m_1rthm_110", He = "_l_1rthm_123", $e = "_loader_1rthm_161", Ke = "_option_1rthm_52", Ue = "_clear_1rthm_200", e = {
14
- "select-search": "_select-search_1rthm_2",
15
- disabled: Be,
16
- container: Ve,
17
- "container-open": "_container-open_1rthm_22",
18
- full: Ae,
19
- "selected-icon": "_selected-icon_1rthm_30",
20
- "selector-icon-open": "_selector-icon-open_1rthm_34",
21
- button: Ge,
22
- "selector-icon": "_selector-icon_1rthm_34",
23
- options: Me,
24
- top: qe,
25
- bottom: Pe,
26
- "no-options": "_no-options_1rthm_75",
27
- s: je,
28
- m: Fe,
29
- l: He,
30
- "select-search-input": "_select-search-input_1rthm_136",
31
- "select-search-input-disabled": "_select-search-input-disabled_1rthm_139",
32
- "group-header": "_group-header_1rthm_146",
33
- "sticky-active": "_sticky-active_1rthm_157",
34
- loader: $e,
35
- "input-container": "_input-container_1rthm_166",
36
- option: Ke,
37
- "option-active": "_option-active_1rthm_180",
38
- "option-inner": "_option-inner_1rthm_183",
39
- "right-slot": "_right-slot_1rthm_190",
40
- "required-mark": "_required-mark_1rthm_195",
41
- clear: Ue,
42
- "icon-button": "_icon-button_1rthm_209"
43
- }, We = ke(
44
- (ce, le) => {
4
+ import { forwardRef as Le, useRef as De, useState as E, useMemo as q, useEffect as se, useCallback as Ve } from "react";
5
+ import { ESelectSearchSize as l, ELoadingIndicatorPlacement as x } from "./constants.js";
6
+ import { prepareGroupedItems as ze, getDropdownArrowIcon as Ee } from "./utils.js";
7
+ import { Icon as P } from "../../icons/Icon.js";
8
+ import { Button as Be } from "../Button/Button.js";
9
+ import { I as ae } from "../../Input-CGZoshMl.js";
10
+ import { EInputVariant as Te } from "../Input/constants.js";
11
+ import { Loader as re } from "../Loader/Loader.js";
12
+ import { H as Ae, U as ce, G as le, W as de, K as Ge } from "../../combobox-fIVOzEhl.js";
13
+ import '../../assets/SelectSearch.css';const Me = "_disabled_coh7i_6", qe = "_container_coh7i_13", Pe = "_full_coh7i_26", je = "_button_coh7i_38", Fe = "_options_coh7i_52", He = "_top_coh7i_63", $e = "_bottom_coh7i_67", Ke = "_s_coh7i_2", Ue = "_m_coh7i_109", We = "_l_coh7i_123", Qe = "_loader_coh7i_162", Ye = "_option_coh7i_52", Je = "_clear_coh7i_202", e = {
14
+ "select-search": "_select-search_coh7i_2",
15
+ disabled: Me,
16
+ container: qe,
17
+ "container-open": "_container-open_coh7i_22",
18
+ full: Pe,
19
+ "selected-icon": "_selected-icon_coh7i_30",
20
+ "selector-icon-open": "_selector-icon-open_coh7i_34",
21
+ button: je,
22
+ "selector-icon": "_selector-icon_coh7i_34",
23
+ options: Fe,
24
+ top: He,
25
+ bottom: $e,
26
+ "no-options": "_no-options_coh7i_71",
27
+ s: Ke,
28
+ m: Ue,
29
+ l: We,
30
+ "select-search-input": "_select-search-input_coh7i_137",
31
+ "select-search-input-disabled": "_select-search-input-disabled_coh7i_140",
32
+ "group-header": "_group-header_coh7i_147",
33
+ "sticky-active": "_sticky-active_coh7i_158",
34
+ loader: Qe,
35
+ "input-container": "_input-container_coh7i_167",
36
+ option: Ye,
37
+ "option-active": "_option-active_coh7i_182",
38
+ "option-inner": "_option-inner_coh7i_185",
39
+ "right-slot": "_right-slot_coh7i_192",
40
+ "required-mark": "_required-mark_coh7i_197",
41
+ clear: Je,
42
+ "icon-button": "_icon-button_coh7i_211"
43
+ }, Re = Le(
44
+ (ue, pe) => {
45
45
  const {
46
- placeholder: M,
47
- size: o = d.L,
48
- value: c,
46
+ placeholder: j,
47
+ size: n = l.L,
48
+ value: d,
49
49
  onChange: r,
50
- full: de,
50
+ full: he,
51
51
  showArrow: me = !0,
52
52
  items: g = [],
53
- classNameOption: q,
54
- displayValue: ue = "name",
55
- filterOnSearch: P = !0,
56
- onSearch: I,
57
- variant: j = De.DefaultGray,
58
- menuPlacement: S = "bottom",
59
- disabled: m = !1,
60
- searchProps: F,
61
- withClearButton: E = !1,
62
- disableInput: _ = !1,
63
- autocomplete: H = "on",
64
- immediate: pe = !1,
65
- noOptionsText: he = "Нет данных",
66
- noMatchText: _e = "Ничего не найдено",
53
+ classNameOption: F,
54
+ classNameOptionInner: H,
55
+ displayValue: I = "name",
56
+ filterOnSearch: $ = !0,
57
+ onSearch: S,
58
+ variant: K = Te.DefaultGray,
59
+ menuPlacement: k = "bottom",
60
+ disabled: u = !1,
61
+ searchProps: U,
62
+ withClearButton: B = !1,
63
+ disableInput: m = !1,
64
+ autocomplete: W = "on",
65
+ immediate: _e = !1,
66
+ noOptionsText: fe = "Нет данных",
67
+ noMatchText: ge = "Ничего не найдено",
67
68
  loadOnOpen: T,
68
- loading: $,
69
- loadingIndicatorPlacement: k = x.Dropdown,
70
- groupBy: p,
71
- getGroupTitle: K = (t) => t
72
- } = ce, B = String((c == null ? void 0 : c[ue]) || ""), w = we(null), [h, v] = D(B), [u, b] = D(c), [fe, U] = D(!1), [V, ge] = D(null), W = $ !== void 0 ? $ : fe, N = A(() => P && h.trim().toLowerCase() ? g.filter(
73
- (t) => t.name.toLowerCase().includes(h.toLowerCase())
74
- ) : g, [h, g, P]), y = A(() => p ? Ce(
75
- N,
76
- p,
77
- K || ((t) => t)
78
- ) : N, [N, p, K]), z = A(() => {
69
+ loading: Q,
70
+ loadingIndicatorPlacement: w = x.Dropdown,
71
+ groupBy: h,
72
+ getGroupTitle: Y = (t) => t,
73
+ optionLayout: ve = "name-bottom"
74
+ } = ue, A = (t) => {
75
+ if (!t) return "";
76
+ const o = t[I];
77
+ return typeof o == "string" ? o : String(o || "");
78
+ }, be = (t) => {
79
+ const o = t[I];
80
+ return typeof o == "string" ? o : String(o || "");
81
+ }, G = A(d), C = De(null), [_, v] = E(G), [p, b] = E(d), [ye, J] = E(!1), [M, Ne] = E(null), R = Q !== void 0 ? Q : ye, y = q(() => {
82
+ if (!$)
83
+ return g;
84
+ const t = String(_ || "").trim().toLowerCase();
85
+ return t ? g.filter((o) => be(o).toLowerCase().includes(t)) : g;
86
+ }, [_, g, $, I]), N = q(() => h ? ze(
87
+ y,
88
+ h,
89
+ Y || ((t) => t)
90
+ ) : y, [y, h, Y]), O = q(() => {
79
91
  const t = [];
80
- return y.forEach((n, i) => {
81
- n.isGroupHeader && t.push(i);
92
+ return N.forEach((o, s) => {
93
+ o.isGroupHeader && t.push(s);
82
94
  }), t;
83
- }, [y]), f = Se({
84
- count: y.length,
85
- getScrollElement: () => w.current,
86
- estimateSize: () => o === d.L ? 65 : 49,
95
+ }, [N]), f = Oe({
96
+ count: N.length,
97
+ getScrollElement: () => C.current,
98
+ estimateSize: () => n === l.L ? 65 : 49,
87
99
  overscan: 10
88
100
  });
89
- te(() => {
90
- const t = w.current;
91
- if (!t || !p) return;
92
- const n = () => {
93
- var R, X;
94
- const i = t.scrollTop;
95
- let C = null;
96
- for (let L = 0; L < z.length; L++) {
97
- const Z = z[L];
98
- if ((((R = f.getVirtualItems().find((O) => O.index === Z)) == null ? void 0 : R.start) || 0) <= i) {
99
- C = Z;
100
- const O = z[L + 1];
101
- if (O !== void 0 && (((X = f.getVirtualItems().find((Ie) => Ie.index === O)) == null ? void 0 : X.start) || 0) <= i)
101
+ se(() => {
102
+ const t = C.current;
103
+ if (!t || !h) return;
104
+ const o = () => {
105
+ var oe, ne;
106
+ const s = t.scrollTop;
107
+ let L = null;
108
+ for (let D = 0; D < O.length; D++) {
109
+ const ie = O[D];
110
+ if ((((oe = f.getVirtualItems().find((V) => V.index === ie)) == null ? void 0 : oe.start) || 0) <= s) {
111
+ L = ie;
112
+ const V = O[D + 1];
113
+ if (V !== void 0 && (((ne = f.getVirtualItems().find((Ce) => Ce.index === V)) == null ? void 0 : ne.start) || 0) <= s)
102
114
  continue;
103
115
  } else
104
116
  break;
105
117
  }
106
- ge(C);
118
+ Ne(L);
107
119
  };
108
- return t.addEventListener("scroll", n), () => t.removeEventListener("scroll", n);
109
- }, [f, z, p, w.current]);
110
- const Y = async () => {
120
+ return t.addEventListener("scroll", o), () => t.removeEventListener("scroll", o);
121
+ }, [f, O, h, C.current]);
122
+ const X = async () => {
111
123
  if (T)
112
124
  try {
113
- U(!0), await T();
125
+ J(!0), await T();
114
126
  } finally {
115
- U(!1);
127
+ J(!1);
116
128
  }
117
- }, ve = (t) => {
118
- t ? (v(t.name), b(t), r == null || r(t)) : (v(""), b(null), r == null || r({ id: "", name: "" }));
119
- }, J = ze(
129
+ }, xe = (t) => {
130
+ if (t) {
131
+ const o = A(t);
132
+ v(o), b(t), r == null || r(t);
133
+ } else
134
+ v(""), b(null), r == null || r({ id: "", name: "" });
135
+ }, Z = Ve(
120
136
  (t) => {
121
- if (_) return;
122
- const n = t.target.value;
123
- v(n), I == null || I(n), u && n !== u.name && b(null), !n && c && (r == null || r({ id: "", name: "" }));
137
+ if (m) return;
138
+ const o = t.target.value;
139
+ v(o), S == null || S(o), p && o !== A(p) && b(null), !o && d && (r == null || r({ id: "", name: "" }));
124
140
  },
125
- [_, r, I, c, u]
126
- ), be = () => {
141
+ [m, r, S, d, p, I]
142
+ ), Ie = () => {
127
143
  v(""), b(null), r == null || r({ id: "", name: "" });
128
- }, Q = async (t) => {
129
- _ && t.target.blur(), T && await Y();
144
+ }, ee = async (t) => {
145
+ m && t.target.blur(), T && await X();
130
146
  };
131
- te(() => {
132
- const t = !c || typeof c == "object" && !Object.keys(c).length;
133
- v(t ? "" : B), b(t ? null : c);
134
- }, [c, B]);
135
- const Ne = () => W && (k === x.Dropdown || k === x.Both) ? /* @__PURE__ */ l("div", { className: e.loader, children: [
136
- /* @__PURE__ */ s(se, { size: "s" }),
147
+ se(() => {
148
+ const t = !d || typeof d == "object" && !Object.keys(d).length;
149
+ v(t ? "" : G), b(t ? null : d);
150
+ }, [d, G]);
151
+ const Se = () => R && (w === x.Dropdown || w === x.Both) ? /* @__PURE__ */ c("div", { className: e.loader, children: [
152
+ /* @__PURE__ */ i(re, { size: "s" }),
137
153
  "Загрузка..."
138
- ] }) : he, ye = (t) => {
154
+ ] }) : fe, ke = (t) => {
139
155
  if (me)
140
156
  return {
141
157
  addonType: "react-node",
142
- addonContent: /* @__PURE__ */ l(ee, { children: [
143
- W && (k === x.Input || k === x.Both) && /* @__PURE__ */ s(se, { size: "s" }),
144
- /* @__PURE__ */ s(
145
- ie,
158
+ addonContent: /* @__PURE__ */ c(z, { children: [
159
+ R && (w === x.Input || w === x.Both) && /* @__PURE__ */ i(re, { size: "s" }),
160
+ /* @__PURE__ */ i(
161
+ ce,
146
162
  {
147
163
  className: a(e.button, {
148
- [e.disabled]: m
164
+ [e.disabled]: u
149
165
  }),
150
- disabled: m,
151
- children: /* @__PURE__ */ s(
152
- G,
166
+ disabled: u,
167
+ children: /* @__PURE__ */ i(
168
+ P,
153
169
  {
154
- iconName: o == d.M || o == d.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
170
+ iconName: n == l.M || n == l.S ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
155
171
  className: a(e["selector-icon"], {
156
172
  [e["selector-icon-open"]]: t
157
173
  })
@@ -161,18 +177,27 @@ import '../../assets/SelectSearch.css';const Be = "_disabled_1rthm_6", Ve = "_co
161
177
  )
162
178
  ] })
163
179
  };
164
- }, xe = (t) => g.length ? N.length ? p ? /* @__PURE__ */ l(
180
+ }, te = (t) => {
181
+ const o = t.name, s = t.bottom && /* @__PURE__ */ i("div", { children: t.bottom });
182
+ return ve === "bottom-name" ? /* @__PURE__ */ c(z, { children: [
183
+ s,
184
+ o
185
+ ] }) : /* @__PURE__ */ c(z, { children: [
186
+ o,
187
+ s
188
+ ] });
189
+ }, we = (t) => g.length ? y.length ? h ? /* @__PURE__ */ c(
165
190
  "div",
166
191
  {
167
- ref: w,
192
+ ref: C,
168
193
  "data-testid": "select-search-options",
169
- className: a(e.options, e[o], e[S]),
194
+ className: a(e.options, e[n], e[k]),
170
195
  style: {
171
- height: o === d.M || o === d.S ? "240px" : "320px",
196
+ height: n === l.M || n === l.S ? "240px" : "320px",
172
197
  overflow: "auto"
173
198
  },
174
199
  children: [
175
- V !== null && /* @__PURE__ */ s(
200
+ M !== null && /* @__PURE__ */ i(
176
201
  "div",
177
202
  {
178
203
  className: e["group-header"],
@@ -181,245 +206,257 @@ import '../../assets/SelectSearch.css';const Be = "_disabled_1rthm_6", Ve = "_co
181
206
  top: 0,
182
207
  zIndex: 3
183
208
  },
184
- children: y[V].name
209
+ children: N[M].name
185
210
  }
186
211
  ),
187
- /* @__PURE__ */ s(
212
+ /* @__PURE__ */ i(
188
213
  "div",
189
214
  {
190
215
  style: {
191
216
  height: `${f.getTotalSize()}px`,
192
217
  width: "100%"
193
218
  },
194
- children: f.getVirtualItems().map((n) => {
195
- const i = y[n.index];
196
- return /* @__PURE__ */ s(
219
+ children: f.getVirtualItems().map((o) => {
220
+ const s = N[o.index];
221
+ return /* @__PURE__ */ i(
197
222
  "div",
198
223
  {
199
- "data-index": n.index,
224
+ "data-index": o.index,
200
225
  ref: f.measureElement,
201
226
  style: {
202
227
  position: "absolute",
203
228
  top: 0,
204
229
  left: 0,
205
230
  width: "100%",
206
- transform: `translateY(${n.start}px)`
231
+ transform: `translateY(${o.start}px)`
207
232
  },
208
- children: i.isGroupHeader ? /* @__PURE__ */ s(
233
+ children: s.isGroupHeader ? /* @__PURE__ */ i(
209
234
  "div",
210
235
  {
211
236
  className: e["group-header"],
212
237
  style: {
213
- visibility: V === n.index ? "hidden" : "visible"
238
+ visibility: M === o.index ? "hidden" : "visible"
214
239
  },
215
- children: i.name
240
+ children: s.name
216
241
  }
217
- ) : /* @__PURE__ */ l(
218
- ae,
242
+ ) : /* @__PURE__ */ c(
243
+ de,
219
244
  {
220
- value: i,
221
- className: ({ focus: C }) => a(
245
+ value: s,
246
+ className: ({ focus: L }) => a(
222
247
  e.option,
223
- q,
224
- o && e[o],
248
+ F,
249
+ n && e[n],
225
250
  {
226
- [e["option-active"]]: C
251
+ [e["option-active"]]: L
227
252
  }
228
253
  ),
229
- "data-testid": `select-search-option-${i.id}`,
254
+ "data-testid": `select-search-option-${s.id}`,
230
255
  children: [
231
- /* @__PURE__ */ l("div", { className: e["option-inner"], children: [
232
- i.name,
233
- i.bottom && /* @__PURE__ */ s("div", { children: i.bottom })
234
- ] }),
235
- u && u.id === i.id && /* @__PURE__ */ s(
236
- G,
256
+ /* @__PURE__ */ i(
257
+ "div",
237
258
  {
238
- iconName: o === d.M || o === d.S ? "Done16px" : "Done24px",
259
+ className: a(
260
+ e["option-inner"],
261
+ H
262
+ ),
263
+ children: te(s)
264
+ }
265
+ ),
266
+ p && p.id === s.id && /* @__PURE__ */ i(
267
+ P,
268
+ {
269
+ iconName: n === l.M || n === l.S ? "Done16px" : "Done24px",
239
270
  className: e["selected-icon"]
240
271
  }
241
272
  )
242
273
  ]
243
274
  },
244
- i.id
275
+ s.id
245
276
  )
246
277
  },
247
- n.key
278
+ o.key
248
279
  );
249
280
  })
250
281
  }
251
282
  )
252
283
  ]
253
284
  }
254
- ) : /* @__PURE__ */ s(
255
- Te,
285
+ ) : /* @__PURE__ */ i(
286
+ Ge,
256
287
  {
257
- className: a(e.options, e[o], e[S]),
288
+ className: a(e.options, e[n], e[k]),
258
289
  "data-testid": "select-search-options",
259
290
  style: { width: "100%" },
260
291
  static: !0,
261
- children: ({ option: n }) => /* @__PURE__ */ l(
262
- ae,
292
+ children: ({ option: o }) => /* @__PURE__ */ c(
293
+ de,
263
294
  {
264
- value: n,
265
- className: ({ focus: i }) => a(
295
+ value: o,
296
+ className: ({ focus: s }) => a(
266
297
  e.option,
267
- q,
298
+ F,
268
299
  {
269
- [e["option-active"]]: i
300
+ [e["option-active"]]: s
270
301
  },
271
- o && e[o]
302
+ n && e[n]
272
303
  ),
273
304
  children: [
274
- /* @__PURE__ */ l("div", { className: e["option-inner"], children: [
275
- n.name,
276
- n.bottom && /* @__PURE__ */ s("div", { children: n.bottom })
277
- ] }),
278
- u && u.id === n.id && /* @__PURE__ */ s(
279
- G,
305
+ /* @__PURE__ */ i(
306
+ "div",
307
+ {
308
+ className: a(
309
+ e["option-inner"],
310
+ H
311
+ ),
312
+ children: te(o)
313
+ }
314
+ ),
315
+ p && p.id === o.id && /* @__PURE__ */ i(
316
+ P,
280
317
  {
281
- iconName: o === d.M || o === d.S ? "Done16px" : "Done24px",
318
+ iconName: n === l.M || n === l.S ? "Done16px" : "Done24px",
282
319
  className: e["selected-icon"]
283
320
  }
284
321
  )
285
322
  ]
286
323
  },
287
- n.id
324
+ o.id
288
325
  )
289
326
  }
290
- ) : /* @__PURE__ */ s(
327
+ ) : /* @__PURE__ */ i(
291
328
  "div",
292
329
  {
293
330
  className: a(
294
331
  e.options,
295
- e[o],
332
+ e[n],
296
333
  e["no-options"],
297
- e[S]
334
+ e[k]
298
335
  ),
299
336
  "data-headlessui-state": t ? "open" : "closed",
300
- children: _e
337
+ children: ge
301
338
  }
302
- ) : /* @__PURE__ */ s(
339
+ ) : /* @__PURE__ */ i(
303
340
  "div",
304
341
  {
305
342
  className: a(
306
343
  e.options,
307
- e[o],
344
+ e[n],
308
345
  e["no-options"],
309
- e[S]
346
+ e[k]
310
347
  ),
311
348
  "data-headlessui-state": t ? "open" : "closed",
312
- children: Ne()
349
+ children: Se()
313
350
  }
314
351
  );
315
- return /* @__PURE__ */ s(
316
- Ee,
352
+ return /* @__PURE__ */ i(
353
+ Ae,
317
354
  {
318
355
  as: "div",
319
- value: u,
356
+ value: p,
320
357
  className: a(e["select-search"], {
321
- [e.full]: de,
322
- [e.disabled]: m
358
+ [e.full]: he,
359
+ [e.disabled]: u
323
360
  }),
324
- onChange: ve,
325
- ref: le,
326
- disabled: m,
327
- virtual: p ? void 0 : { options: N },
328
- immediate: pe,
329
- children: ({ open: t }) => /* @__PURE__ */ l(ee, { children: [
330
- /* @__PURE__ */ l(
361
+ onChange: xe,
362
+ ref: pe,
363
+ disabled: u,
364
+ virtual: h ? void 0 : { options: y },
365
+ immediate: _e,
366
+ children: ({ open: t }) => /* @__PURE__ */ c(z, { children: [
367
+ /* @__PURE__ */ c(
331
368
  "div",
332
369
  {
333
- className: a(e.container, e[o], {
370
+ className: a(e.container, e[n], {
334
371
  [e["container-open"]]: t
335
372
  }),
336
373
  children: [
337
- _ && /* @__PURE__ */ l("div", { className: e["input-container"], children: [
338
- /* @__PURE__ */ s(
339
- ie,
374
+ m && /* @__PURE__ */ c("div", { className: e["input-container"], children: [
375
+ /* @__PURE__ */ i(
376
+ ce,
340
377
  {
341
- disabled: m,
378
+ disabled: u,
342
379
  style: { width: "100%" },
343
- onClick: Y,
344
- children: /* @__PURE__ */ s(
345
- re,
380
+ onClick: X,
381
+ children: /* @__PURE__ */ i(
382
+ le,
346
383
  {
347
- as: oe,
348
- label: M,
349
- size: ne(o),
384
+ as: ae,
385
+ label: j,
386
+ size: n,
350
387
  className: a(e["select-search-input"], {
351
- [e["select-search-input-disabled"]]: _ && E
388
+ [e["select-search-input-disabled"]]: m && B
352
389
  }),
353
- onChange: J,
354
- value: h,
355
- disabled: m,
356
- variant: j,
390
+ onChange: Z,
391
+ value: _,
392
+ disabled: u,
393
+ variant: K,
357
394
  rightSlotClassName: e["right-slot"],
358
395
  requiredMarkClassName: e["required-mark"],
359
396
  "data-testid": "select-search-input",
360
- onFocus: Q,
397
+ onFocus: ee,
361
398
  rightAddon: {
362
399
  addonType: "icon",
363
- addonContent: Le(t, o)
400
+ addonContent: Ee(t, n)
364
401
  },
365
- autocomplete: H,
366
- ...F
402
+ autocomplete: W,
403
+ ...U
367
404
  }
368
405
  )
369
406
  }
370
407
  ),
371
- E && h && /* @__PURE__ */ s(
372
- Oe,
408
+ B && _ && /* @__PURE__ */ i(
409
+ Be,
373
410
  {
374
411
  tabIndex: -1,
375
412
  className: a(e.clear, {
376
- [e.disabled]: m
413
+ [e.disabled]: u
377
414
  }),
378
415
  iconButtonClassName: e["icon-button"],
379
416
  isIconButton: !0,
380
417
  iconName: "Close16px",
381
418
  size: "m-s",
382
419
  clear: !0,
383
- disabled: m,
420
+ disabled: u,
384
421
  variant: "secondary-gray",
385
- onClick: (n) => {
386
- n.stopPropagation(), be();
422
+ onClick: (o) => {
423
+ o.stopPropagation(), Ie();
387
424
  },
388
425
  "data-testid": "clear-button"
389
426
  }
390
427
  )
391
428
  ] }),
392
- !_ && /* @__PURE__ */ s(
393
- re,
429
+ !m && /* @__PURE__ */ i(
430
+ le,
394
431
  {
395
- as: oe,
396
- label: M,
397
- size: ne(o),
432
+ as: ae,
433
+ label: j,
434
+ size: n,
398
435
  className: e["select-search-input"],
399
436
  rightSlotClassName: e["right-slot"],
400
437
  requiredMarkClassName: e["required-mark"],
401
- value: h,
402
- disabled: m,
403
- variant: j,
404
- withClearButton: E && !!h,
405
- onChange: J,
406
- rightAddon: ye(t),
438
+ value: _,
439
+ disabled: u,
440
+ variant: K,
441
+ withClearButton: B && !!_,
442
+ onChange: Z,
443
+ rightAddon: ke(t),
407
444
  "data-testid": "select-search-input",
408
- onFocus: Q,
409
- autocomplete: H,
410
- ...F
445
+ onFocus: ee,
446
+ autocomplete: W,
447
+ ...U
411
448
  }
412
449
  )
413
450
  ]
414
451
  }
415
452
  ),
416
- t && xe(t)
453
+ t && we(t)
417
454
  ] })
418
455
  }
419
456
  );
420
457
  }
421
458
  );
422
- We.displayName = "SelectSearch";
459
+ Re.displayName = "SelectSearch";
423
460
  export {
424
- We as SelectSearch
461
+ Re as SelectSearch
425
462
  };