@alfalab/core-components-select 12.4.6 → 13.0.0

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 (259) hide show
  1. package/{Component-0adcc33f.d.ts → Component-395c666f.d.ts} +0 -0
  2. package/{Component-0adcc33f.js → Component-395c666f.js} +8 -13
  3. package/{cssm/Component-77d7e4fc.d.ts → Component-6cb15433.d.ts} +5 -5
  4. package/{Component-c9860dd6.js → Component-6cb15433.js} +28 -43
  5. package/Component-db573794.d.ts +73 -0
  6. package/Component.d.ts +10 -3
  7. package/Component.js +12 -12
  8. package/components/arrow/Component.js +1 -1
  9. package/components/arrow/index.css +3 -3
  10. package/components/base-select/Component.js +5 -5
  11. package/components/base-select/index.css +15 -9
  12. package/components/base-select/index.d.ts +1 -1
  13. package/components/base-select/index.js +5 -5
  14. package/components/base-select-mobile/Component.js +15 -15
  15. package/components/base-select-mobile/checkmark/Component.js +1 -1
  16. package/components/base-select-mobile/checkmark/index.css +4 -4
  17. package/components/base-select-mobile/index.css +12 -12
  18. package/components/base-select-mobile/index.d.ts +1 -1
  19. package/components/base-select-mobile/index.js +15 -15
  20. package/components/base-select-mobile/options-list/Component.js +2 -2
  21. package/components/base-select-mobile/options-list/index.css +9 -9
  22. package/components/base-select-mobile/options-list/index.js +1 -1
  23. package/components/checkmark/Component.js +1 -1
  24. package/components/checkmark/index.css +7 -7
  25. package/components/field/Component.d.ts +2 -22
  26. package/components/field/Component.js +3 -3
  27. package/components/field/index.css +9 -9
  28. package/components/field/index.js +2 -2
  29. package/components/index.js +18 -18
  30. package/components/native-select/Component.d.ts +2 -2
  31. package/components/native-select/Component.js +1 -1
  32. package/components/native-select/index.js +1 -1
  33. package/components/optgroup/Component.js +1 -1
  34. package/components/optgroup/index.css +6 -6
  35. package/components/option/Component.js +2 -2
  36. package/components/option/index.css +20 -20
  37. package/components/option/index.js +1 -1
  38. package/components/options-list/Component.js +13 -19
  39. package/components/options-list/index.css +6 -6
  40. package/components/options-list/index.js +3 -3
  41. package/components/select-mobile/Component.js +15 -15
  42. package/components/select-mobile/index.d.ts +1 -1
  43. package/components/select-mobile/index.js +15 -15
  44. package/components/select-modal-mobile/Component.js +15 -15
  45. package/components/select-modal-mobile/index.d.ts +1 -1
  46. package/components/select-modal-mobile/index.js +15 -15
  47. package/components/virtual-options-list/Component.js +7 -10
  48. package/components/virtual-options-list/index.css +12 -12
  49. package/components/virtual-options-list/index.js +2 -2
  50. package/{esm/Component-7abd68e3.d.ts → cssm/Component-095a346d.d.ts} +5 -5
  51. package/cssm/{Component-77d7e4fc.js → Component-095a346d.js} +28 -43
  52. package/cssm/Component-db573794.d.ts +73 -0
  53. package/cssm/{Component-4bd2b7ec.d.ts → Component-f4dd589a.d.ts} +0 -0
  54. package/cssm/{Component-4bd2b7ec.js → Component-f4dd589a.js} +7 -12
  55. package/cssm/Component.d.ts +10 -3
  56. package/cssm/Component.js +15 -15
  57. package/cssm/components/base-select/Component.js +5 -5
  58. package/cssm/components/base-select/index.d.ts +1 -1
  59. package/cssm/components/base-select/index.js +5 -5
  60. package/cssm/components/base-select/index.module.css +8 -2
  61. package/cssm/components/base-select-mobile/Component.js +20 -20
  62. package/cssm/components/base-select-mobile/index.d.ts +1 -1
  63. package/cssm/components/base-select-mobile/index.js +20 -20
  64. package/cssm/components/base-select-mobile/index.module.css +1 -1
  65. package/cssm/components/base-select-mobile/options-list/Component.js +1 -1
  66. package/cssm/components/base-select-mobile/options-list/index.js +1 -1
  67. package/cssm/components/field/Component.d.ts +2 -22
  68. package/cssm/components/field/Component.js +2 -2
  69. package/cssm/components/field/index.js +2 -2
  70. package/cssm/components/index.js +23 -23
  71. package/cssm/components/native-select/Component.d.ts +2 -2
  72. package/cssm/components/native-select/Component.js +1 -1
  73. package/cssm/components/native-select/index.js +1 -1
  74. package/cssm/components/option/Component.js +1 -1
  75. package/cssm/components/option/index.js +1 -1
  76. package/cssm/components/options-list/Component.js +12 -18
  77. package/cssm/components/options-list/index.js +3 -3
  78. package/cssm/components/select-mobile/Component.js +20 -20
  79. package/cssm/components/select-mobile/index.d.ts +1 -1
  80. package/cssm/components/select-mobile/index.js +20 -20
  81. package/cssm/components/select-modal-mobile/Component.js +20 -20
  82. package/cssm/components/select-modal-mobile/index.d.ts +1 -1
  83. package/cssm/components/select-modal-mobile/index.js +20 -20
  84. package/cssm/components/virtual-options-list/Component.js +6 -9
  85. package/cssm/components/virtual-options-list/index.js +2 -2
  86. package/cssm/{hook-f5b8fe4f.d.ts → hook-edac5428.d.ts} +2 -4
  87. package/cssm/index.js +23 -23
  88. package/cssm/presets/index.d.ts +1 -1
  89. package/cssm/presets/index.js +20 -20
  90. package/cssm/presets/useLazyLoading/hook.d.ts +2 -2
  91. package/cssm/presets/useLazyLoading/hook.js +4 -4
  92. package/cssm/presets/useSelectWithApply/hook.js +20 -20
  93. package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +20 -20
  94. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  95. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +20 -20
  96. package/cssm/presets/useSelectWithLoading/hook.js +1 -1
  97. package/{esm/tslib.es6-babe1c35.d.ts → cssm/tslib.es6-0857346e.d.ts} +8 -4
  98. package/{tslib.es6-820c70b7.js → cssm/tslib.es6-0857346e.js} +12 -9
  99. package/cssm/typings.d.ts +2 -2
  100. package/cssm/utils.d.ts +2 -2
  101. package/{modern/Component-7a4219aa.d.ts → esm/Component-2cf53a63.d.ts} +5 -5
  102. package/esm/{Component-7abd68e3.js → Component-2cf53a63.js} +28 -43
  103. package/esm/{Component-4cadb402.d.ts → Component-878fd5fa.d.ts} +0 -0
  104. package/esm/{Component-4cadb402.js → Component-878fd5fa.js} +8 -13
  105. package/esm/Component-db573794.d.ts +73 -0
  106. package/esm/Component.d.ts +10 -3
  107. package/esm/Component.js +12 -12
  108. package/esm/components/arrow/Component.js +1 -1
  109. package/esm/components/arrow/index.css +3 -3
  110. package/esm/components/base-select/Component.js +5 -5
  111. package/esm/components/base-select/index.css +15 -9
  112. package/esm/components/base-select/index.d.ts +1 -1
  113. package/esm/components/base-select/index.js +5 -5
  114. package/esm/components/base-select-mobile/Component.js +15 -15
  115. package/esm/components/base-select-mobile/checkmark/Component.js +1 -1
  116. package/esm/components/base-select-mobile/checkmark/index.css +4 -4
  117. package/esm/components/base-select-mobile/index.css +12 -12
  118. package/esm/components/base-select-mobile/index.d.ts +1 -1
  119. package/esm/components/base-select-mobile/index.js +15 -15
  120. package/esm/components/base-select-mobile/options-list/Component.js +2 -2
  121. package/esm/components/base-select-mobile/options-list/index.css +9 -9
  122. package/esm/components/base-select-mobile/options-list/index.js +1 -1
  123. package/esm/components/checkmark/Component.js +1 -1
  124. package/esm/components/checkmark/index.css +7 -7
  125. package/esm/components/field/Component.d.ts +2 -22
  126. package/esm/components/field/Component.js +3 -3
  127. package/esm/components/field/index.css +9 -9
  128. package/esm/components/field/index.js +2 -2
  129. package/esm/components/index.js +15 -15
  130. package/esm/components/native-select/Component.d.ts +2 -2
  131. package/esm/components/native-select/Component.js +1 -1
  132. package/esm/components/native-select/index.js +1 -1
  133. package/esm/components/optgroup/Component.js +1 -1
  134. package/esm/components/optgroup/index.css +6 -6
  135. package/esm/components/option/Component.js +2 -2
  136. package/esm/components/option/index.css +20 -20
  137. package/esm/components/option/index.js +1 -1
  138. package/esm/components/options-list/Component.js +14 -20
  139. package/esm/components/options-list/index.css +6 -6
  140. package/esm/components/options-list/index.js +3 -3
  141. package/esm/components/select-mobile/Component.js +15 -15
  142. package/esm/components/select-mobile/index.d.ts +1 -1
  143. package/esm/components/select-mobile/index.js +15 -15
  144. package/esm/components/select-modal-mobile/Component.js +15 -15
  145. package/esm/components/select-modal-mobile/index.d.ts +1 -1
  146. package/esm/components/select-modal-mobile/index.js +15 -15
  147. package/esm/components/virtual-options-list/Component.js +7 -10
  148. package/esm/components/virtual-options-list/index.css +12 -12
  149. package/esm/components/virtual-options-list/index.js +2 -2
  150. package/{modern/hook-f5b8fe4f.d.ts → esm/hook-edac5428.d.ts} +2 -4
  151. package/esm/index.js +15 -15
  152. package/esm/{intersection-observer-47ac1624.d.ts → intersection-observer-5cff2265.d.ts} +0 -0
  153. package/esm/{intersection-observer-47ac1624.js → intersection-observer-5cff2265.js} +0 -0
  154. package/esm/presets/index.d.ts +1 -1
  155. package/esm/presets/index.js +15 -15
  156. package/esm/presets/useLazyLoading/hook.d.ts +2 -2
  157. package/esm/presets/useLazyLoading/hook.js +5 -5
  158. package/esm/presets/useLazyLoading/index.css +2 -2
  159. package/esm/presets/useSelectWithApply/hook.js +15 -15
  160. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +15 -15
  161. package/esm/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
  162. package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  163. package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +15 -15
  164. package/esm/presets/useSelectWithLoading/hook.js +2 -2
  165. package/esm/presets/useSelectWithLoading/index.css +2 -2
  166. package/{cssm/tslib.es6-f8106a15.d.ts → esm/tslib.es6-8ce25143.d.ts} +8 -4
  167. package/esm/{tslib.es6-babe1c35.js → tslib.es6-8ce25143.js} +12 -9
  168. package/esm/typings.d.ts +2 -2
  169. package/esm/utils.d.ts +2 -2
  170. package/{hook-f5b8fe4f.d.ts → hook-edac5428.d.ts} +2 -4
  171. package/index.js +18 -18
  172. package/{intersection-observer-f9d37e0f.d.ts → intersection-observer-ecb8338a.d.ts} +0 -0
  173. package/{intersection-observer-f9d37e0f.js → intersection-observer-ecb8338a.js} +0 -0
  174. package/modern/{Component-f424e3c6.d.ts → Component-42762c09.d.ts} +0 -0
  175. package/modern/{Component-f424e3c6.js → Component-42762c09.js} +19 -22
  176. package/{Component-c9860dd6.d.ts → modern/Component-afb04bfc.d.ts} +5 -5
  177. package/modern/{Component-7a4219aa.js → Component-afb04bfc.js} +43 -61
  178. package/modern/Component-db573794.d.ts +73 -0
  179. package/modern/Component.d.ts +10 -3
  180. package/modern/Component.js +12 -12
  181. package/modern/components/arrow/Component.js +1 -1
  182. package/modern/components/arrow/index.css +3 -3
  183. package/modern/components/base-select/Component.js +4 -4
  184. package/modern/components/base-select/index.css +15 -9
  185. package/modern/components/base-select/index.d.ts +1 -1
  186. package/modern/components/base-select/index.js +4 -4
  187. package/modern/components/base-select-mobile/Component.js +14 -14
  188. package/modern/components/base-select-mobile/checkmark/Component.js +1 -1
  189. package/modern/components/base-select-mobile/checkmark/index.css +4 -4
  190. package/modern/components/base-select-mobile/index.css +12 -12
  191. package/modern/components/base-select-mobile/index.d.ts +1 -1
  192. package/modern/components/base-select-mobile/index.js +14 -14
  193. package/modern/components/base-select-mobile/options-list/Component.js +2 -2
  194. package/modern/components/base-select-mobile/options-list/index.css +9 -9
  195. package/modern/components/checkmark/Component.js +1 -1
  196. package/modern/components/checkmark/index.css +7 -7
  197. package/modern/components/field/Component.d.ts +2 -22
  198. package/modern/components/field/Component.js +4 -4
  199. package/modern/components/field/index.css +9 -9
  200. package/modern/components/field/index.js +1 -1
  201. package/modern/components/index.js +14 -14
  202. package/modern/components/native-select/Component.d.ts +2 -2
  203. package/modern/components/native-select/Component.js +1 -1
  204. package/modern/components/optgroup/Component.js +1 -1
  205. package/modern/components/optgroup/index.css +6 -6
  206. package/modern/components/option/Component.js +3 -3
  207. package/modern/components/option/index.css +20 -20
  208. package/modern/components/options-list/Component.js +11 -15
  209. package/modern/components/options-list/index.css +6 -6
  210. package/modern/components/options-list/index.js +2 -2
  211. package/modern/components/select-mobile/Component.js +14 -14
  212. package/modern/components/select-mobile/index.d.ts +1 -1
  213. package/modern/components/select-mobile/index.js +14 -14
  214. package/modern/components/select-modal-mobile/Component.js +14 -14
  215. package/modern/components/select-modal-mobile/index.d.ts +1 -1
  216. package/modern/components/select-modal-mobile/index.js +14 -14
  217. package/modern/components/virtual-options-list/Component.js +18 -23
  218. package/modern/components/virtual-options-list/index.css +12 -12
  219. package/modern/components/virtual-options-list/index.js +1 -1
  220. package/{esm/hook-f5b8fe4f.d.ts → modern/hook-edac5428.d.ts} +2 -4
  221. package/modern/index.js +14 -14
  222. package/modern/{intersection-observer-47ac1624.d.ts → intersection-observer-5cff2265.d.ts} +0 -0
  223. package/modern/{intersection-observer-47ac1624.js → intersection-observer-5cff2265.js} +0 -0
  224. package/modern/presets/index.d.ts +1 -1
  225. package/modern/presets/index.js +14 -14
  226. package/modern/presets/useLazyLoading/hook.d.ts +2 -2
  227. package/modern/presets/useLazyLoading/hook.js +13 -15
  228. package/modern/presets/useLazyLoading/index.css +2 -2
  229. package/modern/presets/useSelectWithApply/hook.js +14 -14
  230. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +14 -14
  231. package/modern/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
  232. package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  233. package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +14 -14
  234. package/modern/presets/useSelectWithLoading/hook.js +2 -2
  235. package/modern/presets/useSelectWithLoading/index.css +2 -2
  236. package/modern/typings.d.ts +2 -2
  237. package/modern/utils.d.ts +2 -2
  238. package/modern/utils.js +1 -1
  239. package/package.json +8 -8
  240. package/presets/index.d.ts +1 -1
  241. package/presets/index.js +15 -15
  242. package/presets/useLazyLoading/hook.d.ts +2 -2
  243. package/presets/useLazyLoading/hook.js +5 -5
  244. package/presets/useLazyLoading/index.css +2 -2
  245. package/presets/useSelectWithApply/hook.js +15 -15
  246. package/presets/useSelectWithApply/options-list-with-apply/Component.js +15 -15
  247. package/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
  248. package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  249. package/presets/useSelectWithApply/options-list-with-apply/index.js +15 -15
  250. package/presets/useSelectWithLoading/hook.js +2 -2
  251. package/presets/useSelectWithLoading/index.css +2 -2
  252. package/{tslib.es6-820c70b7.d.ts → tslib.es6-401ce1ea.d.ts} +8 -4
  253. package/{cssm/tslib.es6-f8106a15.js → tslib.es6-401ce1ea.js} +12 -9
  254. package/typings.d.ts +2 -2
  255. package/utils.d.ts +2 -2
  256. package/Component-afce40e0.d.ts +0 -73
  257. package/cssm/Component-afce40e0.d.ts +0 -73
  258. package/esm/Component-afce40e0.d.ts +0 -73
  259. package/modern/Component-afce40e0.d.ts +0 -73
@@ -1,13 +1,13 @@
1
- import { a as __assign } from '../../tslib.es6-babe1c35.js';
2
- import React, { forwardRef, useCallback, useRef } from 'react';
1
+ import { a as __assign } from '../../tslib.es6-8ce25143.js';
2
+ import React, { forwardRef, useRef } from 'react';
3
3
  import cn from 'classnames';
4
+ import mergeRefs from 'react-merge-refs';
4
5
  import { useMedia } from '@alfalab/hooks';
5
6
  import { useVisibleOptions, isGroup } from '../../utils.js';
6
- import mergeRefs from 'react-merge-refs';
7
- import { Scrollbar } from '@alfalab/core-components-scrollbar/esm';
8
7
  import { Optgroup } from '../optgroup/Component.js';
8
+ import { Scrollbar } from '@alfalab/core-components-scrollbar/esm';
9
9
 
10
- var styles = {"optionsList":"select__optionsList_157la","scrollable":"select__scrollable_157la","emptyPlaceholder":"select__emptyPlaceholder_157la","l":"select__l_157la","xl":"select__xl_157la"};
10
+ var styles = {"optionsList":"select__optionsList_13ww0","scrollable":"select__scrollable_13ww0","emptyPlaceholder":"select__emptyPlaceholder_13ww0","l":"select__l_13ww0","xl":"select__xl_13ww0"};
11
11
  require('./index.css')
12
12
 
13
13
  var createCounter = function () {
@@ -19,24 +19,20 @@ var OptionsList = forwardRef(function (_a, ref) {
19
19
  var _b = _a.size, size = _b === void 0 ? 's' : _b, className = _a.className, optionGroupClassName = _a.optionGroupClassName, Option = _a.Option, getOptionProps = _a.getOptionProps, _c = _a.options, options = _c === void 0 ? [] : _c, _d = _a.Optgroup, Optgroup$1 = _d === void 0 ? Optgroup : _d, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _e = _a.visibleOptions, visibleOptions = _e === void 0 ? 5 : _e, onScroll = _a.onScroll, open = _a.open, header = _a.header, footer = _a.footer, optionsListWidth = _a.optionsListWidth, nativeScrollbarProp = _a.nativeScrollbar;
20
20
  var nativeScrollbar = useMedia([[true, '(max-width: 1023px)']], false)[0];
21
21
  nativeScrollbar = Boolean(nativeScrollbarProp !== null && nativeScrollbarProp !== void 0 ? nativeScrollbarProp : nativeScrollbar);
22
- var renderOption = useCallback(function (option, index) { return (React.createElement(Option, __assign({ key: option.key }, getOptionProps(option, index)))); }, [getOptionProps]);
22
+ var renderOption = function (option, index) { return (React.createElement(Option, __assign({ key: option.key }, getOptionProps(option, index)))); };
23
23
  var listRef = useRef(null);
24
24
  var scrollbarRef = useRef(null);
25
25
  var counter = createCounter();
26
- var renderGroup = useCallback(function (group) { return (React.createElement(Optgroup$1, { className: optionGroupClassName, label: group.label, key: group.label, size: size }, group.options.map(function (option) { return renderOption(option, counter()); }))); }, [optionGroupClassName, counter, renderOption, size]);
27
- useVisibleOptions(__assign(__assign({}, (!nativeScrollbar && { styleTargetRef: scrollbarRef })), { visibleOptions: visibleOptions,
28
- listRef: listRef,
29
- open: open, invalidate: options }));
26
+ var renderGroup = function (group) { return (React.createElement(Optgroup$1, { className: optionGroupClassName, label: group.label, key: group.label, size: size }, group.options.map(function (option) { return renderOption(option, counter()); }))); };
27
+ useVisibleOptions(__assign(__assign({}, (!nativeScrollbar && { styleTargetRef: scrollbarRef })), { visibleOptions: visibleOptions, listRef: listRef, open: open, invalidate: options }));
30
28
  if (options.length === 0 && !emptyPlaceholder) {
31
29
  return null;
32
30
  }
33
- var renderListItems = function () {
34
- return (React.createElement(React.Fragment, null,
35
- options.map(function (option) {
36
- return isGroup(option) ? renderGroup(option) : renderOption(option, counter());
37
- }),
38
- emptyPlaceholder && options.length === 0 && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder))));
39
- };
31
+ var renderListItems = function () { return (React.createElement(React.Fragment, null,
32
+ options.map(function (option) {
33
+ return isGroup(option) ? renderGroup(option) : renderOption(option, counter());
34
+ }),
35
+ emptyPlaceholder && options.length === 0 && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder)))); };
40
36
  var renderWithCustomScrollbar = function () {
41
37
  var scrollableNodeProps = {
42
38
  onScroll: onScroll,
@@ -45,9 +41,7 @@ var OptionsList = forwardRef(function (_a, ref) {
45
41
  };
46
42
  return (React.createElement(Scrollbar, { className: styles.scrollable, ref: scrollbarRef, horizontalAutoStretch: optionsListWidth === 'content', scrollableNodeProps: scrollableNodeProps, contentNodeProps: { ref: listRef } }, renderListItems()));
47
43
  };
48
- var renderWithNativeScrollbar = function () {
49
- return (React.createElement("div", { className: styles.scrollable, ref: mergeRefs([listRef, ref]), onScroll: onScroll }, renderListItems()));
50
- };
44
+ var renderWithNativeScrollbar = function () { return (React.createElement("div", { className: styles.scrollable, ref: mergeRefs([listRef, ref]), onScroll: onScroll }, renderListItems())); };
51
45
  return (React.createElement("div", __assign({}, (nativeScrollbar && { 'data-test-id': dataTestId }), { className: cn(styles.optionsList, styles[size], className) }),
52
46
  header,
53
47
  nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
@@ -1,4 +1,4 @@
1
- /* hash: drtu6 */
1
+ /* hash: 1pxgv */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -26,21 +26,21 @@
26
26
 
27
27
  /* optgroup */
28
28
  }
29
- .select__optionsList_157la {
29
+ .select__optionsList_13ww0 {
30
30
  overflow: auto;
31
31
  width: 100%;
32
32
  outline: none;
33
33
  box-sizing: border-box;
34
34
  }
35
- .select__scrollable_157la {
35
+ .select__scrollable_13ww0 {
36
36
  overflow: auto;
37
37
  width: 100%;
38
38
  }
39
- .select__emptyPlaceholder_157la {
39
+ .select__emptyPlaceholder_13ww0 {
40
40
  padding: var(--gap-m) var(--gap-s);
41
41
  color: var(--select-options-list-empty-placeholder-color);
42
42
  }
43
- .select__l_157la .select__emptyPlaceholder_157la,
44
- .select__xl_157la .select__emptyPlaceholder_157la {
43
+ .select__l_13ww0 .select__emptyPlaceholder_13ww0,
44
+ .select__xl_13ww0 .select__emptyPlaceholder_13ww0 {
45
45
  padding: var(--gap-xl) var(--gap-m);
46
46
  }
@@ -1,9 +1,9 @@
1
- import '../../tslib.es6-babe1c35.js';
1
+ import '../../tslib.es6-8ce25143.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
+ import 'react-merge-refs';
4
5
  import '@alfalab/hooks';
5
6
  import '../../utils.js';
6
- import 'react-merge-refs';
7
- import '@alfalab/core-components-scrollbar/esm';
8
7
  import '../optgroup/Component.js';
8
+ import '@alfalab/core-components-scrollbar/esm';
9
9
  export { OptionsList } from './Component.js';
@@ -1,32 +1,32 @@
1
- import '../../tslib.es6-babe1c35.js';
1
+ import '../../tslib.es6-8ce25143.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
- import '@alfalab/core-components-form-control/esm';
6
- import '../../utils.js';
7
- import '../field/Component.js';
8
4
  import '@alfalab/icons-glyph/ChevronDownMIcon';
9
5
  import '../arrow/Component.js';
10
6
  import 'react-merge-refs';
11
- import '@alfalab/core-components-scrollbar/esm';
7
+ import '@juggle/resize-observer';
8
+ import 'downshift';
9
+ import '@alfalab/core-components-popover/esm';
10
+ import '@alfalab/hooks';
11
+ import '../../Component-878fd5fa.js';
12
+ import '../../utils.js';
13
+ import '../native-select/Component.js';
14
+ import '@alfalab/core-components-form-control/esm';
15
+ import '../field/Component.js';
12
16
  import '../optgroup/Component.js';
13
- import '../options-list/Component.js';
14
17
  import '@alfalab/core-components-checkbox/esm';
15
18
  import '../checkmark/Component.js';
16
19
  import '../option/Component.js';
17
- import '@juggle/resize-observer';
18
- import '@alfalab/core-components-popover/esm';
19
- import 'downshift';
20
- import '../native-select/Component.js';
21
- import '../../Component-4cadb402.js';
20
+ import '@alfalab/core-components-scrollbar/esm';
21
+ import '../options-list/Component.js';
22
22
  import '../../Component.js';
23
23
  import '@alfalab/core-components-bottom-sheet/esm';
24
24
  import '@alfalab/core-components-modal/esm/mobile';
25
25
  import '@alfalab/core-components-button/esm';
26
+ export { S as SelectMobile } from '../../Component-2cf53a63.js';
27
+ import '../base-select-mobile/checkmark/Component.js';
26
28
  import '@alfalab/core-components-base-modal/esm';
27
29
  import '../base-select-mobile/options-list/Component.js';
28
- import '../base-select-mobile/checkmark/Component.js';
29
- export { S as SelectMobile } from '../../Component-7abd68e3.js';
30
30
  import 'react-virtual';
31
31
  import '@alfalab/core-components-skeleton/esm';
32
- import '../../intersection-observer-47ac1624.js';
32
+ import '../../intersection-observer-5cff2265.js';
@@ -1 +1 @@
1
- export * from "../../Component-7abd68e3";
1
+ export * from "../../Component-2cf53a63";
@@ -1,32 +1,32 @@
1
- import '../../tslib.es6-babe1c35.js';
1
+ import '../../tslib.es6-8ce25143.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
- import '@alfalab/core-components-form-control/esm';
6
- import '../../utils.js';
7
- import '../field/Component.js';
8
4
  import '@alfalab/icons-glyph/ChevronDownMIcon';
9
5
  import '../arrow/Component.js';
10
6
  import 'react-merge-refs';
11
- import '@alfalab/core-components-scrollbar/esm';
7
+ import '@juggle/resize-observer';
8
+ import 'downshift';
9
+ import '@alfalab/core-components-popover/esm';
10
+ import '@alfalab/hooks';
11
+ import '../../Component-878fd5fa.js';
12
+ import '../../utils.js';
13
+ import '../native-select/Component.js';
14
+ import '@alfalab/core-components-form-control/esm';
15
+ import '../field/Component.js';
12
16
  import '../optgroup/Component.js';
13
- import '../options-list/Component.js';
14
17
  import '@alfalab/core-components-checkbox/esm';
15
18
  import '../checkmark/Component.js';
16
19
  import '../option/Component.js';
17
- import '@juggle/resize-observer';
18
- import '@alfalab/core-components-popover/esm';
19
- import 'downshift';
20
- import '../native-select/Component.js';
21
- import '../../Component-4cadb402.js';
20
+ import '@alfalab/core-components-scrollbar/esm';
21
+ import '../options-list/Component.js';
22
22
  import '../../Component.js';
23
23
  import '@alfalab/core-components-bottom-sheet/esm';
24
24
  import '@alfalab/core-components-modal/esm/mobile';
25
25
  import '@alfalab/core-components-button/esm';
26
+ export { S as SelectMobile } from '../../Component-2cf53a63.js';
27
+ import '../base-select-mobile/checkmark/Component.js';
26
28
  import '@alfalab/core-components-base-modal/esm';
27
29
  import '../base-select-mobile/options-list/Component.js';
28
- import '../base-select-mobile/checkmark/Component.js';
29
- export { S as SelectMobile } from '../../Component-7abd68e3.js';
30
30
  import 'react-virtual';
31
31
  import '@alfalab/core-components-skeleton/esm';
32
- import '../../intersection-observer-47ac1624.js';
32
+ import '../../intersection-observer-5cff2265.js';
@@ -1,32 +1,32 @@
1
- import '../../tslib.es6-babe1c35.js';
1
+ import '../../tslib.es6-8ce25143.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
- import '@alfalab/core-components-form-control/esm';
6
- import '../../utils.js';
7
- import '../field/Component.js';
8
4
  import '@alfalab/icons-glyph/ChevronDownMIcon';
9
5
  import '../arrow/Component.js';
10
6
  import 'react-merge-refs';
11
- import '@alfalab/core-components-scrollbar/esm';
7
+ import '@juggle/resize-observer';
8
+ import 'downshift';
9
+ import '@alfalab/core-components-popover/esm';
10
+ import '@alfalab/hooks';
11
+ import '../../Component-878fd5fa.js';
12
+ import '../../utils.js';
13
+ import '../native-select/Component.js';
14
+ import '@alfalab/core-components-form-control/esm';
15
+ import '../field/Component.js';
12
16
  import '../optgroup/Component.js';
13
- import '../options-list/Component.js';
14
17
  import '@alfalab/core-components-checkbox/esm';
15
18
  import '../checkmark/Component.js';
16
19
  import '../option/Component.js';
17
- import '@juggle/resize-observer';
18
- import '@alfalab/core-components-popover/esm';
19
- import 'downshift';
20
- import '../native-select/Component.js';
21
- import '../../Component-4cadb402.js';
20
+ import '@alfalab/core-components-scrollbar/esm';
21
+ import '../options-list/Component.js';
22
22
  import '../../Component.js';
23
23
  import '@alfalab/core-components-bottom-sheet/esm';
24
24
  import '@alfalab/core-components-modal/esm/mobile';
25
25
  import '@alfalab/core-components-button/esm';
26
+ export { a as SelectModalMobile } from '../../Component-2cf53a63.js';
27
+ import '../base-select-mobile/checkmark/Component.js';
26
28
  import '@alfalab/core-components-base-modal/esm';
27
29
  import '../base-select-mobile/options-list/Component.js';
28
- import '../base-select-mobile/checkmark/Component.js';
29
- export { a as SelectModalMobile } from '../../Component-7abd68e3.js';
30
30
  import 'react-virtual';
31
31
  import '@alfalab/core-components-skeleton/esm';
32
- import '../../intersection-observer-47ac1624.js';
32
+ import '../../intersection-observer-5cff2265.js';
@@ -1 +1 @@
1
- export * from "../../Component-7abd68e3";
1
+ export * from "../../Component-2cf53a63";
@@ -1,32 +1,32 @@
1
- import '../../tslib.es6-babe1c35.js';
1
+ import '../../tslib.es6-8ce25143.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
- import '@alfalab/core-components-form-control/esm';
6
- import '../../utils.js';
7
- import '../field/Component.js';
8
4
  import '@alfalab/icons-glyph/ChevronDownMIcon';
9
5
  import '../arrow/Component.js';
10
6
  import 'react-merge-refs';
11
- import '@alfalab/core-components-scrollbar/esm';
7
+ import '@juggle/resize-observer';
8
+ import 'downshift';
9
+ import '@alfalab/core-components-popover/esm';
10
+ import '@alfalab/hooks';
11
+ import '../../Component-878fd5fa.js';
12
+ import '../../utils.js';
13
+ import '../native-select/Component.js';
14
+ import '@alfalab/core-components-form-control/esm';
15
+ import '../field/Component.js';
12
16
  import '../optgroup/Component.js';
13
- import '../options-list/Component.js';
14
17
  import '@alfalab/core-components-checkbox/esm';
15
18
  import '../checkmark/Component.js';
16
19
  import '../option/Component.js';
17
- import '@juggle/resize-observer';
18
- import '@alfalab/core-components-popover/esm';
19
- import 'downshift';
20
- import '../native-select/Component.js';
21
- import '../../Component-4cadb402.js';
20
+ import '@alfalab/core-components-scrollbar/esm';
21
+ import '../options-list/Component.js';
22
22
  import '../../Component.js';
23
23
  import '@alfalab/core-components-bottom-sheet/esm';
24
24
  import '@alfalab/core-components-modal/esm/mobile';
25
25
  import '@alfalab/core-components-button/esm';
26
+ export { a as SelectModalMobile } from '../../Component-2cf53a63.js';
27
+ import '../base-select-mobile/checkmark/Component.js';
26
28
  import '@alfalab/core-components-base-modal/esm';
27
29
  import '../base-select-mobile/options-list/Component.js';
28
- import '../base-select-mobile/checkmark/Component.js';
29
- export { a as SelectModalMobile } from '../../Component-7abd68e3.js';
30
30
  import 'react-virtual';
31
31
  import '@alfalab/core-components-skeleton/esm';
32
- import '../../intersection-observer-47ac1624.js';
32
+ import '../../intersection-observer-5cff2265.js';
@@ -1,16 +1,17 @@
1
- import { a as __assign } from '../../tslib.es6-babe1c35.js';
1
+ import { a as __assign } from '../../tslib.es6-8ce25143.js';
2
2
  import React, { useRef, useState, useEffect, useMemo } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { useMedia } from '@alfalab/hooks';
5
5
  import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
6
- import { Scrollbar } from '@alfalab/core-components-scrollbar/esm';
7
6
  import { Optgroup } from '../optgroup/Component.js';
7
+ import { Scrollbar } from '@alfalab/core-components-scrollbar/esm';
8
8
  import { useVirtual } from 'react-virtual';
9
9
 
10
- var styles = {"virtualOptionsList":"select__virtualOptionsList_1q8cq","scrollable":"select__scrollable_1q8cq","inner":"select__inner_1q8cq","virtualRow":"select__virtualRow_1q8cq","highlighted":"select__highlighted_1q8cq","emptyPlaceholder":"select__emptyPlaceholder_1q8cq","l":"select__l_1q8cq","xl":"select__xl_1q8cq"};
10
+ var styles = {"virtualOptionsList":"select__virtualOptionsList_bkmps","scrollable":"select__scrollable_bkmps","inner":"select__inner_bkmps","virtualRow":"select__virtualRow_bkmps","highlighted":"select__highlighted_bkmps","emptyPlaceholder":"select__emptyPlaceholder_bkmps","l":"select__l_bkmps","xl":"select__xl_bkmps"};
11
11
  require('./index.css')
12
12
 
13
13
  /* eslint-disable react-hooks/exhaustive-deps */
14
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
14
15
  var VirtualOptionsList = function (_a) {
15
16
  var _b = _a.size, size = _b === void 0 ? 's' : _b, _c = _a.flatOptions, flatOptions = _c === void 0 ? [] : _c, _d = _a.highlightedIndex, highlightedIndex = _d === void 0 ? -1 : _d, className = _a.className, getOptionProps = _a.getOptionProps, Option = _a.Option, open = _a.open, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.overscan, overscan = _f === void 0 ? 10 : _f, _g = _a.Optgroup, Optgroup$1 = _g === void 0 ? Optgroup : _g, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _h = _a.visibleOptions, visibleOptions = _h === void 0 ? 5 : _h, onScroll = _a.onScroll, header = _a.header, footer = _a.footer, nativeScrollbarProp = _a.nativeScrollbar;
16
17
  var listRef = useRef(null);
@@ -101,13 +102,9 @@ var VirtualOptionsList = function (_a) {
101
102
  !isGroup(option) && React.createElement(Option, __assign({}, getOptionProps(option, virtualRow.index)))));
102
103
  });
103
104
  };
104
- var renderWithCustomScrollbar = function () {
105
- return (React.createElement(Scrollbar, { className: styles.scrollable, ref: scrollbarRef, scrollableNodeProps: { onScroll: onScroll, ref: parentRef }, contentNodeProps: contentNodeProps }, renderList()));
106
- };
107
- var renderWithNativeScrollbar = function () {
108
- return (React.createElement("div", { className: styles.scrollable, ref: parentRef, onScroll: onScroll },
109
- React.createElement("div", __assign({}, contentNodeProps), renderList())));
110
- };
105
+ var renderWithCustomScrollbar = function () { return (React.createElement(Scrollbar, { className: styles.scrollable, ref: scrollbarRef, scrollableNodeProps: { onScroll: onScroll, ref: parentRef }, contentNodeProps: contentNodeProps }, renderList())); };
106
+ var renderWithNativeScrollbar = function () { return (React.createElement("div", { className: styles.scrollable, ref: parentRef, onScroll: onScroll },
107
+ React.createElement("div", __assign({}, contentNodeProps), renderList()))); };
111
108
  return (React.createElement("div", { className: cn(styles.virtualOptionsList, styles[size], className), "data-test-id": dataTestId },
112
109
  header,
113
110
  nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
@@ -1,4 +1,4 @@
1
- /* hash: 1qkyh */
1
+ /* hash: 1dvgm */
2
2
  :root {
3
3
  --color-light-border-primary: #dbdee1;
4
4
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
@@ -32,27 +32,27 @@
32
32
 
33
33
  /* optgroup */
34
34
  }
35
- .select__virtualOptionsList_1q8cq {
35
+ .select__virtualOptionsList_bkmps {
36
36
  width: 100%;
37
37
  outline: none;
38
38
  box-sizing: border-box;
39
39
  position: relative;
40
40
  }
41
- .select__scrollable_1q8cq {
41
+ .select__scrollable_bkmps {
42
42
  overflow: auto;
43
43
  width: 100%;
44
44
  }
45
- .select__inner_1q8cq {
45
+ .select__inner_bkmps {
46
46
  position: relative;
47
47
  width: 100%;
48
48
  }
49
- .select__virtualRow_1q8cq {
49
+ .select__virtualRow_bkmps {
50
50
  position: absolute;
51
51
  top: 0;
52
52
  left: 0;
53
53
  width: 100%
54
54
  }
55
- .select__virtualRow_1q8cq:before {
55
+ .select__virtualRow_bkmps:before {
56
56
  content: '';
57
57
  position: absolute;
58
58
  z-index: 1;
@@ -63,18 +63,18 @@
63
63
  background: var(--select-option-divider-background);
64
64
  display: var(--select-option-divider-display);
65
65
  }
66
- .select__virtualRow_1q8cq:first-child:before {
66
+ .select__virtualRow_bkmps:first-child:before {
67
67
  display: none;
68
68
  }
69
- .select__highlighted_1q8cq:before,
70
- .select__highlighted_1q8cq + .select__virtualRow_1q8cq:before {
69
+ .select__highlighted_bkmps:before,
70
+ .select__highlighted_bkmps + .select__virtualRow_bkmps:before {
71
71
  display: none;
72
72
  }
73
- .select__emptyPlaceholder_1q8cq {
73
+ .select__emptyPlaceholder_bkmps {
74
74
  padding: var(--gap-m) var(--gap-s);
75
75
  color: var(--select-options-list-empty-placeholder-color);
76
76
  }
77
- .select__l_1q8cq .select__emptyPlaceholder_1q8cq,
78
- .select__xl_1q8cq .select__emptyPlaceholder_1q8cq {
77
+ .select__l_bkmps .select__emptyPlaceholder_bkmps,
78
+ .select__xl_bkmps .select__emptyPlaceholder_bkmps {
79
79
  padding: var(--gap-xl) var(--gap-m);
80
80
  }
@@ -1,9 +1,9 @@
1
- import '../../tslib.es6-babe1c35.js';
1
+ import '../../tslib.es6-8ce25143.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '@alfalab/hooks';
5
5
  import '../../utils.js';
6
- import '@alfalab/core-components-scrollbar/esm';
7
6
  import '../optgroup/Component.js';
7
+ import '@alfalab/core-components-scrollbar/esm';
8
8
  import 'react-virtual';
9
9
  export { VirtualOptionsList } from './Component.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { OptionShape, BaseSelectProps } from "./index";
2
+ import { BaseSelectProps, OptionShape } from "./index";
3
3
  type useSelectWithApplyProps = {
4
4
  /**
5
5
  * Список выбранных пунктов
@@ -32,9 +32,7 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
32
32
  showClear?: boolean | undefined;
33
33
  onClose?: (() => void) | undefined;
34
34
  selectedDraft?: OptionShape[] | undefined;
35
- OptionsList?: import("react").FC<import("./index").OptionsListProps & import("react").RefAttributes<unknown>> | undefined; /**
36
- * Показывать кнопку очистки
37
- */
35
+ OptionsList?: import("react").FC<import("./index").OptionsListProps & import("react").RefAttributes<unknown>> | undefined;
38
36
  } & import("react").RefAttributes<unknown>>;
39
37
  optionsListProps: {
40
38
  OptionsList: import("react").FC<import("./index").OptionsListProps> | undefined;
package/esm/index.js CHANGED
@@ -1,35 +1,35 @@
1
- import './tslib.es6-babe1c35.js';
1
+ import './tslib.es6-8ce25143.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
- import '@alfalab/core-components-form-control/esm';
6
- export { isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from './utils.js';
7
- export { Field } from './components/field/Component.js';
8
4
  import '@alfalab/icons-glyph/ChevronDownMIcon';
9
5
  export { Arrow } from './components/arrow/Component.js';
10
6
  import 'react-merge-refs';
11
- import '@alfalab/core-components-scrollbar/esm';
7
+ import '@juggle/resize-observer';
8
+ import 'downshift';
9
+ import '@alfalab/core-components-popover/esm';
10
+ import '@alfalab/hooks';
11
+ export { B as BaseSelect } from './Component-878fd5fa.js';
12
+ export { isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from './utils.js';
13
+ import './components/native-select/Component.js';
14
+ import '@alfalab/core-components-form-control/esm';
15
+ export { Field } from './components/field/Component.js';
12
16
  export { Optgroup } from './components/optgroup/Component.js';
13
- export { OptionsList } from './components/options-list/Component.js';
14
17
  import '@alfalab/core-components-checkbox/esm';
15
18
  import './components/checkmark/Component.js';
16
19
  export { Option } from './components/option/Component.js';
17
- import '@juggle/resize-observer';
18
- import '@alfalab/core-components-popover/esm';
19
- import 'downshift';
20
- import './components/native-select/Component.js';
21
- export { B as BaseSelect } from './Component-4cadb402.js';
20
+ import '@alfalab/core-components-scrollbar/esm';
21
+ export { OptionsList } from './components/options-list/Component.js';
22
22
  export { Select } from './Component.js';
23
23
  import '@alfalab/core-components-bottom-sheet/esm';
24
24
  import '@alfalab/core-components-modal/esm/mobile';
25
25
  import '@alfalab/core-components-button/esm';
26
+ export { b as SELECT_ALL_KEY, S as SelectMobile, a as SelectModalMobile, u as useSelectWithApply } from './Component-2cf53a63.js';
27
+ import './components/base-select-mobile/checkmark/Component.js';
26
28
  import '@alfalab/core-components-base-modal/esm';
27
29
  import './components/base-select-mobile/options-list/Component.js';
28
- import './components/base-select-mobile/checkmark/Component.js';
29
- export { b as SELECT_ALL_KEY, S as SelectMobile, a as SelectModalMobile, u as useSelectWithApply } from './Component-7abd68e3.js';
30
30
  import 'react-virtual';
31
31
  export { VirtualOptionsList } from './components/virtual-options-list/Component.js';
32
32
  import '@alfalab/core-components-skeleton/esm';
33
33
  export { useSelectWithLoading } from './presets/useSelectWithLoading/hook.js';
34
- import './intersection-observer-47ac1624.js';
35
34
  export { useLazyLoading } from './presets/useLazyLoading/hook.js';
35
+ import './intersection-observer-5cff2265.js';
@@ -1,3 +1,3 @@
1
1
  export * from "./useSelectWithLoading/hook";
2
2
  export * from "./useLazyLoading/hook";
3
- export * from "../hook-f5b8fe4f";
3
+ export * from "../hook-edac5428";
@@ -1,34 +1,34 @@
1
- import '../tslib.es6-babe1c35.js';
1
+ import '../tslib.es6-8ce25143.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '@alfalab/hooks';
5
- import '@alfalab/core-components-form-control/esm';
6
- import '../utils.js';
7
- import '../components/field/Component.js';
8
4
  import '@alfalab/icons-glyph/ChevronDownMIcon';
9
5
  import '../components/arrow/Component.js';
10
6
  import 'react-merge-refs';
11
- import '@alfalab/core-components-scrollbar/esm';
7
+ import '@juggle/resize-observer';
8
+ import 'downshift';
9
+ import '@alfalab/core-components-popover/esm';
10
+ import '@alfalab/hooks';
11
+ import '../Component-878fd5fa.js';
12
+ import '../utils.js';
13
+ import '../components/native-select/Component.js';
14
+ import '@alfalab/core-components-form-control/esm';
15
+ import '../components/field/Component.js';
12
16
  import '../components/optgroup/Component.js';
13
- import '../components/options-list/Component.js';
14
17
  import '@alfalab/core-components-checkbox/esm';
15
18
  import '../components/checkmark/Component.js';
16
19
  import '../components/option/Component.js';
17
- import '@juggle/resize-observer';
18
- import '@alfalab/core-components-popover/esm';
19
- import 'downshift';
20
- import '../components/native-select/Component.js';
21
- import '../Component-4cadb402.js';
20
+ import '@alfalab/core-components-scrollbar/esm';
21
+ import '../components/options-list/Component.js';
22
22
  import '../Component.js';
23
23
  import '@alfalab/core-components-bottom-sheet/esm';
24
24
  import '@alfalab/core-components-modal/esm/mobile';
25
25
  import '@alfalab/core-components-button/esm';
26
+ export { b as SELECT_ALL_KEY, u as useSelectWithApply } from '../Component-2cf53a63.js';
27
+ import '../components/base-select-mobile/checkmark/Component.js';
26
28
  import '@alfalab/core-components-base-modal/esm';
27
29
  import '../components/base-select-mobile/options-list/Component.js';
28
- import '../components/base-select-mobile/checkmark/Component.js';
29
- export { b as SELECT_ALL_KEY, u as useSelectWithApply } from '../Component-7abd68e3.js';
30
30
  import 'react-virtual';
31
31
  import '@alfalab/core-components-skeleton/esm';
32
32
  export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
33
- import '../intersection-observer-47ac1624.js';
34
33
  export { useLazyLoading } from './useLazyLoading/hook.js';
34
+ import '../intersection-observer-5cff2265.js';
@@ -22,7 +22,7 @@ type useLazyLoadingProps = {
22
22
  * hasMore - указывает, есть ли еще незагруженные элементы (в случае false перестает загружать "следующую страницу")
23
23
  * }>
24
24
  */
25
- optionsFetcher<T>(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
25
+ optionsFetcher(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
26
26
  };
27
27
  declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, }: useLazyLoadingProps): {
28
28
  optionsProps: {
@@ -38,7 +38,7 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
38
38
  };
39
39
  };
40
40
  onOpen: (payload: {
41
- open?: boolean | undefined;
41
+ open?: boolean;
42
42
  }) => void;
43
43
  };
44
44
  reset: () => void;
@@ -1,13 +1,13 @@
1
- import { a as __assign, b as __spreadArrays } from '../../tslib.es6-babe1c35.js';
1
+ import { a as __assign, b as __spreadArray } from '../../tslib.es6-8ce25143.js';
2
2
  import React, { useReducer, useRef, useCallback, useEffect, useMemo } from 'react';
3
3
  import 'classnames';
4
4
  import '@alfalab/core-components-checkbox/esm';
5
5
  import '../../components/checkmark/Component.js';
6
6
  import { Option } from '../../components/option/Component.js';
7
7
  import { Skeleton } from '@alfalab/core-components-skeleton/esm';
8
- import '../../intersection-observer-47ac1624.js';
8
+ import '../../intersection-observer-5cff2265.js';
9
9
 
10
- var styles = {"skeleton":"select__skeleton_4i4e5"};
10
+ var styles = {"skeleton":"select__skeleton_1uz0l"};
11
11
  require('./index.css')
12
12
 
13
13
  var DEBOUNCE_TIMEOUT = 300;
@@ -52,7 +52,7 @@ function useLazyLoading(_a) {
52
52
  return __assign(__assign({}, state), { loading: false });
53
53
  }
54
54
  case 'FETCH_OPTIONS_SUCCESS': {
55
- return __assign(__assign({}, state), { options: __spreadArrays(state.options, action.payload.options), offset: state.offset + (action.payload.options.length ? 1 : 0), allOptionsLoaded: !action.payload.hasMore, loading: false });
55
+ return __assign(__assign({}, state), { options: __spreadArray(__spreadArray([], state.options, true), action.payload.options, true), offset: state.offset + (action.payload.options.length ? 1 : 0), allOptionsLoaded: !action.payload.hasMore, loading: false });
56
56
  }
57
57
  case 'SET_IS_OPENED': {
58
58
  return __assign(__assign({}, state), { opened: action.payload });
@@ -184,7 +184,7 @@ function useLazyLoading(_a) {
184
184
  return {
185
185
  optionsProps: {
186
186
  Option: renderOption,
187
- options: __spreadArrays(options, skeletonOptions),
187
+ options: __spreadArray(__spreadArray([], options, true), skeletonOptions, true),
188
188
  optionsListProps: {
189
189
  ref: listRef,
190
190
  inputProps: {
@@ -1,5 +1,5 @@
1
- /* hash: 1uvsd */
2
- .select__skeleton_4i4e5 {
1
+ /* hash: 1mt83 */
2
+ .select__skeleton_1uz0l {
3
3
  position: absolute;
4
4
  top: 50%;
5
5
  transform: translateY(-50%);