@alfalab/core-components-select 15.2.2 → 15.3.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 (239) hide show
  1. package/Component.desktop.d.ts +1 -2
  2. package/Component.mobile.js +1 -1
  3. package/Component.modal.mobile.d.ts +202 -4
  4. package/Component.modal.mobile.js +1 -1
  5. package/Component.responsive.js +1 -1
  6. package/components/arrow/Component.js +1 -1
  7. package/components/arrow/index.css +3 -3
  8. package/components/base-checkmark/Component.js +1 -1
  9. package/components/base-checkmark/index.css +4 -4
  10. package/components/base-option/Component.js +1 -1
  11. package/components/base-option/index.css +13 -13
  12. package/components/base-select/Component.js +1 -1
  13. package/components/base-select/index.css +11 -11
  14. package/components/base-select-mobile/Component.d.ts +4 -3
  15. package/components/base-select-mobile/Component.js +3 -3
  16. package/components/base-select-mobile/footer/Component.js +1 -1
  17. package/components/base-select-mobile/footer/index.css +5 -5
  18. package/components/base-select-mobile/index.css +16 -16
  19. package/components/checkmark/Component.js +1 -1
  20. package/components/checkmark/index.css +10 -10
  21. package/components/checkmark-mobile/Component.js +1 -1
  22. package/components/checkmark-mobile/index.css +6 -6
  23. package/components/field/Component.js +1 -1
  24. package/components/field/index.css +12 -12
  25. package/components/optgroup/Component.js +1 -1
  26. package/components/optgroup/index.css +6 -6
  27. package/components/option/Component.js +1 -1
  28. package/components/option/index.css +20 -20
  29. package/components/options-list/Component.js +1 -1
  30. package/components/options-list/index.css +9 -9
  31. package/components/search/Component.js +1 -1
  32. package/components/search/index.css +2 -2
  33. package/components/virtual-options-list/Component.js +9 -5
  34. package/components/virtual-options-list/index.css +15 -15
  35. package/cssm/Component.desktop.d.ts +1 -2
  36. package/cssm/Component.modal.mobile.d.ts +202 -4
  37. package/cssm/components/base-select-mobile/Component.d.ts +4 -3
  38. package/cssm/components/base-select-mobile/Component.js +2 -2
  39. package/cssm/components/virtual-options-list/Component.js +8 -4
  40. package/cssm/desktop/index.d.ts +2 -0
  41. package/cssm/desktop/index.js +48 -0
  42. package/cssm/mobile/index.d.ts +5 -0
  43. package/cssm/mobile/index.js +62 -0
  44. package/cssm/shared/index.d.ts +5 -0
  45. package/cssm/shared/index.js +85 -0
  46. package/desktop/index.d.ts +2 -0
  47. package/{desktop.js → desktop/index.js} +13 -13
  48. package/desktop/package.json +3 -0
  49. package/esm/Component.desktop.d.ts +1 -2
  50. package/esm/Component.mobile.js +1 -1
  51. package/esm/Component.modal.mobile.d.ts +202 -4
  52. package/esm/Component.modal.mobile.js +1 -1
  53. package/esm/Component.responsive.js +1 -1
  54. package/esm/components/arrow/Component.js +1 -1
  55. package/esm/components/arrow/index.css +3 -3
  56. package/esm/components/base-checkmark/Component.js +1 -1
  57. package/esm/components/base-checkmark/index.css +4 -4
  58. package/esm/components/base-option/Component.js +1 -1
  59. package/esm/components/base-option/index.css +13 -13
  60. package/esm/components/base-select/Component.js +1 -1
  61. package/esm/components/base-select/index.css +11 -11
  62. package/esm/components/base-select-mobile/Component.d.ts +4 -3
  63. package/esm/components/base-select-mobile/Component.js +3 -3
  64. package/esm/components/base-select-mobile/footer/Component.js +1 -1
  65. package/esm/components/base-select-mobile/footer/index.css +5 -5
  66. package/esm/components/base-select-mobile/index.css +16 -16
  67. package/esm/components/checkmark/Component.js +1 -1
  68. package/esm/components/checkmark/index.css +10 -10
  69. package/esm/components/checkmark-mobile/Component.js +1 -1
  70. package/esm/components/checkmark-mobile/index.css +6 -6
  71. package/esm/components/field/Component.js +1 -1
  72. package/esm/components/field/index.css +12 -12
  73. package/esm/components/optgroup/Component.js +1 -1
  74. package/esm/components/optgroup/index.css +6 -6
  75. package/esm/components/option/Component.js +1 -1
  76. package/esm/components/option/index.css +20 -20
  77. package/esm/components/options-list/Component.js +1 -1
  78. package/esm/components/options-list/index.css +9 -9
  79. package/esm/components/search/Component.js +1 -1
  80. package/esm/components/search/index.css +2 -2
  81. package/esm/components/virtual-options-list/Component.js +9 -5
  82. package/esm/components/virtual-options-list/index.css +15 -15
  83. package/esm/desktop/index.d.ts +2 -0
  84. package/esm/{desktop.js → desktop/index.js} +13 -13
  85. package/esm/index.js +1 -1
  86. package/esm/mobile/index.d.ts +5 -0
  87. package/esm/mobile/index.js +40 -0
  88. package/esm/presets/index.js +1 -1
  89. package/esm/presets/useSelectWithApply/hook.js +1 -1
  90. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  91. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  92. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  93. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  94. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  95. package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  96. package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  97. package/esm/presets/useSelectWithLoading/hook.js +1 -1
  98. package/esm/presets/useSelectWithLoading/index.css +2 -2
  99. package/esm/shared/index.d.ts +5 -0
  100. package/esm/shared/index.js +41 -0
  101. package/index.js +1 -1
  102. package/mobile/index.d.ts +5 -0
  103. package/{mobile.js → mobile/index.js} +18 -18
  104. package/mobile/package.json +3 -0
  105. package/modern/Component.desktop.d.ts +1 -2
  106. package/modern/Component.mobile.js +1 -1
  107. package/modern/Component.modal.mobile.d.ts +202 -4
  108. package/modern/Component.modal.mobile.js +1 -1
  109. package/modern/Component.responsive.js +1 -1
  110. package/modern/components/arrow/Component.js +1 -1
  111. package/modern/components/arrow/index.css +3 -3
  112. package/modern/components/base-checkmark/Component.js +1 -1
  113. package/modern/components/base-checkmark/index.css +4 -4
  114. package/modern/components/base-option/Component.js +1 -1
  115. package/modern/components/base-option/index.css +13 -13
  116. package/modern/components/base-select/Component.js +1 -1
  117. package/modern/components/base-select/index.css +11 -11
  118. package/modern/components/base-select-mobile/Component.d.ts +4 -3
  119. package/modern/components/base-select-mobile/Component.js +3 -3
  120. package/modern/components/base-select-mobile/footer/Component.js +1 -1
  121. package/modern/components/base-select-mobile/footer/index.css +5 -5
  122. package/modern/components/base-select-mobile/index.css +16 -16
  123. package/modern/components/checkmark/Component.js +1 -1
  124. package/modern/components/checkmark/index.css +10 -10
  125. package/modern/components/checkmark-mobile/Component.js +1 -1
  126. package/modern/components/checkmark-mobile/index.css +6 -6
  127. package/modern/components/field/Component.js +1 -1
  128. package/modern/components/field/index.css +12 -12
  129. package/modern/components/optgroup/Component.js +1 -1
  130. package/modern/components/optgroup/index.css +6 -6
  131. package/modern/components/option/Component.js +1 -1
  132. package/modern/components/option/index.css +20 -20
  133. package/modern/components/options-list/Component.js +1 -1
  134. package/modern/components/options-list/index.css +9 -9
  135. package/modern/components/search/Component.js +1 -1
  136. package/modern/components/search/index.css +2 -2
  137. package/modern/components/virtual-options-list/Component.js +9 -5
  138. package/modern/components/virtual-options-list/index.css +15 -15
  139. package/modern/desktop/index.d.ts +2 -0
  140. package/modern/{desktop.js → desktop/index.js} +13 -13
  141. package/modern/index.js +1 -1
  142. package/modern/mobile/index.d.ts +5 -0
  143. package/modern/mobile/index.js +39 -0
  144. package/modern/presets/index.js +1 -1
  145. package/modern/presets/useSelectWithApply/hook.js +1 -1
  146. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  147. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  148. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  149. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  150. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  151. package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  152. package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  153. package/modern/presets/useSelectWithLoading/hook.js +1 -1
  154. package/modern/presets/useSelectWithLoading/index.css +2 -2
  155. package/modern/shared/index.d.ts +5 -0
  156. package/modern/shared/index.js +40 -0
  157. package/package.json +8 -32
  158. package/presets/index.js +1 -1
  159. package/presets/useSelectWithApply/hook.js +1 -1
  160. package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  161. package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  162. package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  163. package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  164. package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  165. package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  166. package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  167. package/presets/useSelectWithLoading/hook.js +1 -1
  168. package/presets/useSelectWithLoading/index.css +2 -2
  169. package/shared/index.d.ts +5 -0
  170. package/{shared.js → shared/index.js} +20 -20
  171. package/shared/package.json +3 -0
  172. package/src/components/base-select-mobile/Component.tsx +2 -1
  173. package/src/components/virtual-options-list/Component.tsx +8 -4
  174. package/src/desktop/index.ts +1 -0
  175. package/src/desktop/package.json +3 -0
  176. package/src/mobile/index.ts +5 -0
  177. package/src/mobile/package.json +3 -0
  178. package/src/shared/index.ts +5 -0
  179. package/src/shared/package.json +3 -0
  180. package/Component-89f0cb07.d.ts +0 -38
  181. package/Component.mobile-ebda875c.d.ts +0 -6
  182. package/Component.mobile-f1f15074.d.ts +0 -404
  183. package/cssm/Component-89f0cb07.d.ts +0 -38
  184. package/cssm/Component.mobile-ebda875c.d.ts +0 -6
  185. package/cssm/Component.mobile-f1f15074.d.ts +0 -404
  186. package/cssm/desktop-69921c40.d.ts +0 -6
  187. package/cssm/desktop.d.ts +0 -2
  188. package/cssm/desktop.js +0 -48
  189. package/cssm/index-ebda875c.d.ts +0 -2
  190. package/cssm/mobile-96988a65.d.ts +0 -2
  191. package/cssm/mobile.d.ts +0 -5
  192. package/cssm/mobile.js +0 -62
  193. package/cssm/shared.d.ts +0 -5
  194. package/cssm/shared.js +0 -85
  195. package/cssm/typings-89f0cb07.d.ts +0 -93
  196. package/cssm/typings-baf4875b.d.ts +0 -52
  197. package/desktop-69921c40.d.ts +0 -6
  198. package/desktop.d.ts +0 -2
  199. package/esm/Component-89f0cb07.d.ts +0 -38
  200. package/esm/Component.mobile-ebda875c.d.ts +0 -6
  201. package/esm/Component.mobile-f1f15074.d.ts +0 -404
  202. package/esm/desktop-69921c40.d.ts +0 -6
  203. package/esm/desktop.d.ts +0 -2
  204. package/esm/index-ebda875c.d.ts +0 -2
  205. package/esm/mobile-96988a65.d.ts +0 -2
  206. package/esm/mobile.d.ts +0 -5
  207. package/esm/mobile.js +0 -40
  208. package/esm/shared.d.ts +0 -5
  209. package/esm/shared.js +0 -41
  210. package/esm/typings-89f0cb07.d.ts +0 -93
  211. package/esm/typings-baf4875b.d.ts +0 -52
  212. package/index-ebda875c.d.ts +0 -2
  213. package/mobile-96988a65.d.ts +0 -2
  214. package/mobile.d.ts +0 -5
  215. package/modern/Component-89f0cb07.d.ts +0 -38
  216. package/modern/Component.mobile-ebda875c.d.ts +0 -6
  217. package/modern/Component.mobile-f1f15074.d.ts +0 -404
  218. package/modern/desktop-69921c40.d.ts +0 -6
  219. package/modern/desktop.d.ts +0 -2
  220. package/modern/index-ebda875c.d.ts +0 -2
  221. package/modern/mobile-96988a65.d.ts +0 -2
  222. package/modern/mobile.d.ts +0 -5
  223. package/modern/mobile.js +0 -39
  224. package/modern/shared.d.ts +0 -5
  225. package/modern/shared.js +0 -40
  226. package/modern/typings-89f0cb07.d.ts +0 -93
  227. package/modern/typings-baf4875b.d.ts +0 -52
  228. package/shared.d.ts +0 -5
  229. package/src/desktop.ts +0 -1
  230. package/src/mobile.ts +0 -5
  231. package/src/shared.ts +0 -5
  232. package/typings-89f0cb07.d.ts +0 -93
  233. package/typings-baf4875b.d.ts +0 -52
  234. /package/esm/{hook-571dca86.d.ts → hook-70d58270.d.ts} +0 -0
  235. /package/esm/{hook-571dca86.js → hook-70d58270.js} +0 -0
  236. /package/{hook-a6f060a1.d.ts → hook-0a5c9f56.d.ts} +0 -0
  237. /package/{hook-a6f060a1.js → hook-0a5c9f56.js} +0 -0
  238. /package/modern/{hook-7e628eb4.d.ts → hook-4eceefed.d.ts} +0 -0
  239. /package/modern/{hook-7e628eb4.js → hook-4eceefed.js} +0 -0
@@ -8,14 +8,14 @@ import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
8
8
  import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
9
9
  import { Optgroup } from '../optgroup/Component.js';
10
10
 
11
- const styles = {"virtualOptionsList":"select__virtualOptionsList_8wamo","virtualOptionsListHeader":"select__virtualOptionsListHeader_8wamo","virtualOptionsListFooter":"select__virtualOptionsListFooter_8wamo","withBorder":"select__withBorder_8wamo","scrollable":"select__scrollable_8wamo","inner":"select__inner_8wamo","virtualRow":"select__virtualRow_8wamo","highlighted":"select__highlighted_8wamo","emptyPlaceholder":"select__emptyPlaceholder_8wamo","l":"select__l_8wamo","xl":"select__xl_8wamo"};
11
+ const styles = {"virtualOptionsList":"select__virtualOptionsList_1b0db","virtualOptionsListHeader":"select__virtualOptionsListHeader_1b0db","virtualOptionsListFooter":"select__virtualOptionsListFooter_1b0db","withBorder":"select__withBorder_1b0db","scrollable":"select__scrollable_1b0db","inner":"select__inner_1b0db","virtualRow":"select__virtualRow_1b0db","highlighted":"select__highlighted_1b0db","emptyPlaceholder":"select__emptyPlaceholder_1b0db","l":"select__l_1b0db","xl":"select__xl_1b0db"};
12
12
  require('./index.css')
13
13
 
14
14
  const VirtualOptionsList = forwardRef(({ size = 's', flatOptions = [], highlightedIndex = -1, className, getOptionProps, Option, open, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, header, footer, showFooter = true, optionsListWidth, onScroll, nativeScrollbar: nativeScrollbarProp, setHighlightedIndex, }, ref) => {
15
15
  const listRef = useRef(null);
16
16
  const parentRef = useRef(null);
17
17
  const scrollbarRef = useRef(null);
18
- const [visibleOptionsInvalidateKey, setVisibleOptionsInvalidateKey] = useState(0);
18
+ const [visibleOptionsInvalidateKey, setVisibleOptionsInvalidateKey] = useState('');
19
19
  const prevHighlightedIndex = usePrevious(highlightedIndex) || -1;
20
20
  let [nativeScrollbar] = useMedia([[true, '(max-width: 1023px)']], false);
21
21
  const rowVirtualizer = useVirtual({
@@ -60,10 +60,14 @@ const VirtualOptionsList = forwardRef(({ size = 's', flatOptions = [], highlight
60
60
  /**
61
61
  * react-virtual может несколько раз отрендерить список с одним элементом,
62
62
  * поэтому нужно еще раз пересчитать высоту, когда список ВИДИМЫХ пунктов будет отрендерен полностью
63
- * Также, высоту нужно пересчитывать при изменении ОБЩЕГО кол-ва пунктов меню
63
+ * Также, высоту нужно пересчитывать при изменении пунктов меню
64
64
  */
65
- rowVirtualizer.virtualItems.length > 1 ? flatOptions.length : 1);
66
- }, [rowVirtualizer.virtualItems.length, flatOptions.length]);
65
+ rowVirtualizer.virtualItems
66
+ .slice(0, Math.min(rowVirtualizer.virtualItems.length, visibleOptions + 1))
67
+ .map((item) => flatOptions[item.index].key)
68
+ .join('_'));
69
+ // eslint-disable-next-line react-hooks/exhaustive-deps
70
+ }, [rowVirtualizer.virtualItems.length, flatOptions]);
67
71
  useVisibleOptions({
68
72
  visibleOptions,
69
73
  invalidate: visibleOptionsInvalidateKey,
@@ -1,4 +1,4 @@
1
- /* hash: 1x0f2 */
1
+ /* hash: 795ug */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-primary: #dcdcdd;
@@ -35,34 +35,34 @@
35
35
  /* checkmark */
36
36
 
37
37
  /* optgroup */
38
- } .select__virtualOptionsList_8wamo {
38
+ } .select__virtualOptionsList_1b0db {
39
39
  width: 100%;
40
40
  outline: none;
41
41
  box-sizing: border-box;
42
42
  position: sticky;
43
- } .select__virtualOptionsListHeader_8wamo {
43
+ } .select__virtualOptionsListHeader_1b0db {
44
44
  box-sizing: border-box;
45
45
  border-bottom: 1px solid var(--color-light-border-secondary);
46
- } .select__virtualOptionsListFooter_8wamo {
46
+ } .select__virtualOptionsListFooter_1b0db {
47
47
  position: sticky;
48
48
  bottom: 0;
49
49
  box-sizing: border-box;
50
50
  border-top: 1px solid transparent
51
- } .select__virtualOptionsListFooter_8wamo.select__withBorder_8wamo {
51
+ } .select__virtualOptionsListFooter_1b0db.select__withBorder_1b0db {
52
52
  border-top: 1px solid var(--color-light-border-secondary);
53
- } .select__scrollable_8wamo {
53
+ } .select__scrollable_1b0db {
54
54
  position: relative;
55
55
  overflow: auto;
56
56
  width: 100%;
57
- } .select__inner_8wamo {
57
+ } .select__inner_1b0db {
58
58
  position: relative;
59
59
  width: 100%;
60
- } .select__virtualRow_8wamo {
60
+ } .select__virtualRow_1b0db {
61
61
  position: absolute;
62
62
  top: 0;
63
63
  left: 0;
64
64
  width: 100%
65
- } .select__virtualRow_8wamo:before {
65
+ } .select__virtualRow_1b0db:before {
66
66
  content: '';
67
67
  position: absolute;
68
68
  z-index: 1;
@@ -72,15 +72,15 @@
72
72
  height: 1px;
73
73
  background: var(--select-option-divider-background);
74
74
  display: var(--select-option-divider-display);
75
- } .select__virtualRow_8wamo:first-child:before {
75
+ } .select__virtualRow_1b0db:first-child:before {
76
76
  display: none;
77
- } .select__highlighted_8wamo:before,
78
- .select__highlighted_8wamo + .select__virtualRow_8wamo:before {
77
+ } .select__highlighted_1b0db:before,
78
+ .select__highlighted_1b0db + .select__virtualRow_1b0db:before {
79
79
  display: none;
80
- } .select__emptyPlaceholder_8wamo {
80
+ } .select__emptyPlaceholder_1b0db {
81
81
  padding: var(--gap-m) var(--gap-s);
82
82
  color: var(--select-options-list-empty-placeholder-color);
83
- } .select__l_8wamo .select__emptyPlaceholder_8wamo,
84
- .select__xl_8wamo .select__emptyPlaceholder_8wamo {
83
+ } .select__l_1b0db .select__emptyPlaceholder_1b0db,
84
+ .select__xl_1b0db .select__emptyPlaceholder_1b0db {
85
85
  padding: var(--gap-xl) var(--gap-m);
86
86
  }
@@ -0,0 +1,2 @@
1
+ export { SelectDesktop, SelectDesktopProps } from "../Component.desktop";
2
+ export {};
@@ -1,30 +1,30 @@
1
- export { SelectDesktop } from './Component.desktop.js';
1
+ export { SelectDesktop } from '../Component.desktop.js';
2
2
  import 'react';
3
3
  import '@alfalab/core-components-form-control/modern/desktop';
4
- import './components/arrow/Component.js';
4
+ import '../components/arrow/Component.js';
5
5
  import 'classnames';
6
6
  import '@alfalab/icons-glyph/ChevronDownMIcon';
7
- import './components/base-select/Component.js';
7
+ import '../components/base-select/Component.js';
8
8
  import 'react-merge-refs';
9
9
  import '@juggle/resize-observer';
10
10
  import 'downshift';
11
11
  import '@alfalab/core-components-popover/modern';
12
12
  import '@alfalab/core-components-shared/modern';
13
13
  import '@alfalab/hooks';
14
- import './utils.js';
15
- import './components/native-select/Component.js';
16
- import './components/field/Component.js';
17
- import './components/optgroup/Component.js';
18
- import './components/option/Component.js';
19
- import './components/checkmark/Component.js';
14
+ import '../utils.js';
15
+ import '../components/native-select/Component.js';
16
+ import '../components/field/Component.js';
17
+ import '../components/optgroup/Component.js';
18
+ import '../components/option/Component.js';
19
+ import '../components/checkmark/Component.js';
20
20
  import '@alfalab/core-components-badge/modern';
21
21
  import '@alfalab/core-components-checkbox/modern';
22
22
  import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
23
23
  import '@alfalab/icons-glyph/CheckmarkMIcon';
24
- import './components/checkmark-mobile/Component.js';
25
- import './components/options-list/Component.js';
24
+ import '../components/checkmark-mobile/Component.js';
25
+ import '../components/options-list/Component.js';
26
26
  import '@alfalab/core-components-scrollbar/modern';
27
- import './consts.js';
28
- import './components/search/Component.js';
27
+ import '../consts.js';
28
+ import '../components/search/Component.js';
29
29
  import '@alfalab/core-components-input/modern';
30
30
  import '@alfalab/icons-glyph/MagnifierMIcon';
package/modern/index.js CHANGED
@@ -39,7 +39,7 @@ import '@alfalab/core-components-base-modal/modern';
39
39
  import '@alfalab/core-components-button/modern/mobile';
40
40
  import './components/virtual-options-list/Component.js';
41
41
  import 'react-virtual';
42
- import './hook-7e628eb4.js';
42
+ import './hook-4eceefed.js';
43
43
  import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
44
44
  import '@alfalab/core-components-button/modern/desktop';
45
45
  import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
@@ -0,0 +1,5 @@
1
+ export { SelectMobile } from "../Component.mobile";
2
+ export { SelectModalMobile } from "../Component.modal.mobile";
3
+ export type { SelectMobileProps } from "../Component.mobile";
4
+ export type { SelectModalMobileProps } from "../Component.modal.mobile";
5
+ export {};
@@ -0,0 +1,39 @@
1
+ export { SelectMobile } from '../Component.mobile.js';
2
+ export { SelectModalMobile } from '../Component.modal.mobile.js';
3
+ import 'react';
4
+ import '@alfalab/core-components-form-control/modern/mobile';
5
+ import '../components/arrow/Component.js';
6
+ import 'classnames';
7
+ import '@alfalab/icons-glyph/ChevronDownMIcon';
8
+ import '../components/base-select-mobile/Component.js';
9
+ import 'react-merge-refs';
10
+ import 'downshift';
11
+ import '@alfalab/core-components-bottom-sheet/modern';
12
+ import '@alfalab/core-components-modal/modern/mobile';
13
+ import '@alfalab/core-components-shared/modern';
14
+ import '../utils.js';
15
+ import '../components/field/Component.js';
16
+ import '@alfalab/hooks';
17
+ import '../components/optgroup/Component.js';
18
+ import '../components/option/Component.js';
19
+ import '../components/checkmark/Component.js';
20
+ import '@alfalab/core-components-badge/modern';
21
+ import '@alfalab/core-components-checkbox/modern';
22
+ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
23
+ import '@alfalab/icons-glyph/CheckmarkMIcon';
24
+ import '../components/checkmark-mobile/Component.js';
25
+ import '../components/options-list/Component.js';
26
+ import '@alfalab/core-components-scrollbar/modern';
27
+ import '../consts.js';
28
+ import '../components/search/Component.js';
29
+ import '@alfalab/core-components-input/modern';
30
+ import '@alfalab/icons-glyph/MagnifierMIcon';
31
+ import '../components/base-select-mobile/footer/Component.js';
32
+ import '@alfalab/core-components-base-modal/modern';
33
+ import '@alfalab/core-components-button/modern/mobile';
34
+ import '../components/virtual-options-list/Component.js';
35
+ import 'react-virtual';
36
+ import '../hook-4eceefed.js';
37
+ import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
38
+ import '@alfalab/core-components-button/modern/desktop';
39
+ import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
@@ -1,6 +1,6 @@
1
1
  export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
2
2
  export { useLazyLoading } from './useLazyLoading/hook.js';
3
- export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-7e628eb4.js';
3
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-4eceefed.js';
4
4
  import 'react';
5
5
  import '@alfalab/core-components-skeleton/modern';
6
6
  import '../components/option/Component.js';
@@ -1,6 +1,6 @@
1
1
  import 'react';
2
2
  import '../../utils.js';
3
- export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-7e628eb4.js';
3
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-4eceefed.js';
4
4
  import '../../components/options-list/Component.js';
5
5
  import 'react-merge-refs';
6
6
  import 'classnames';
@@ -1,7 +1,7 @@
1
1
  import 'react';
2
2
  import '../../../components/options-list/Component.js';
3
3
  import '../../../consts.js';
4
- export { O as OptionsListWithApply } from '../../../hook-7e628eb4.js';
4
+ export { O as OptionsListWithApply } from '../../../hook-4eceefed.js';
5
5
  import './footer/Component.js';
6
6
  import './header/Component.js';
7
7
  import 'react-merge-refs';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
3
3
 
4
- const styles = {"footer":"select__footer_zbbxs"};
4
+ const styles = {"footer":"select__footer_b1owf"};
5
5
  require('./index.css')
6
6
 
7
7
  const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], }) => (React.createElement("div", {
@@ -1,4 +1,4 @@
1
- /* hash: r40yx */
1
+ /* hash: 10dvs */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -17,10 +17,10 @@
17
17
  --gap-s: 12px;
18
18
  } :root {
19
19
  } :root {
20
- } .select__footer_zbbxs {
20
+ } .select__footer_b1owf {
21
21
  background-color: var(--color-light-bg-primary);
22
22
  padding: var(--gap-s);
23
23
  outline: none
24
- } .select__footer_zbbxs > * + * {
24
+ } .select__footer_b1owf > * + * {
25
25
  margin-left: var(--gap-xs);
26
26
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import cn from 'classnames';
3
3
  import { Checkbox } from '@alfalab/core-components-checkbox/modern';
4
4
 
5
- const styles = {"desktop":"select__desktop_1a8hu","mobile":"select__mobile_1a8hu"};
5
+ const styles = {"desktop":"select__desktop_1kxe6","mobile":"select__mobile_1kxe6"};
6
6
  require('./index.css')
7
7
 
8
8
  const Header = ({ onChange, checked, indeterminate, mobile }) => (React.createElement("div", { className: cn({ [styles.desktop]: !mobile, [styles.mobile]: mobile }) },
@@ -1,4 +1,4 @@
1
- /* hash: 1qszj */
1
+ /* hash: 1hj4p */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -16,8 +16,8 @@
16
16
  --gap-s: 12px;
17
17
  } :root {
18
18
  } :root {
19
- } .select__desktop_1a8hu {
19
+ } .select__desktop_1kxe6 {
20
20
  padding: var(--gap-s);
21
- } .select__mobile_1a8hu {
21
+ } .select__mobile_1kxe6 {
22
22
  padding: var(--gap-s) var(--gap-xs);
23
23
  }
@@ -1 +1 @@
1
- export * from "../../../hook-7e628eb4";
1
+ export * from "../../../hook-4eceefed";
@@ -1,4 +1,4 @@
1
- export { O as OptionsListWithApply } from '../../../hook-7e628eb4.js';
1
+ export { O as OptionsListWithApply } from '../../../hook-4eceefed.js';
2
2
  import 'react';
3
3
  import '../../../utils.js';
4
4
  import '../../../components/options-list/Component.js';
@@ -9,7 +9,7 @@ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
9
9
  import '@alfalab/icons-glyph/CheckmarkMIcon';
10
10
  import '../../components/checkmark-mobile/Component.js';
11
11
 
12
- const styles = {"skeleton":"select__skeleton_1eba2"};
12
+ const styles = {"skeleton":"select__skeleton_164am"};
13
13
  require('./index.css')
14
14
 
15
15
  function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
@@ -1,5 +1,5 @@
1
- /* hash: 1fned */
2
- .select__skeleton_1eba2 {
1
+ /* hash: 2b85k */
2
+ .select__skeleton_164am {
3
3
  position: absolute;
4
4
  top: 50%;
5
5
  transform: translateY(-50%);
@@ -0,0 +1,5 @@
1
+ export * from "../components/index";
2
+ export * from "../presets/index";
3
+ export * from "../typings";
4
+ export * from "../utils";
5
+ export type { AdditionalMobileProps } from "../Component.mobile";
@@ -0,0 +1,40 @@
1
+ export { Arrow } from '../components/arrow/Component.js';
2
+ export { BaseSelect } from '../components/base-select/Component.js';
3
+ export { Field } from '../components/field/Component.js';
4
+ export { Optgroup } from '../components/optgroup/Component.js';
5
+ export { Option } from '../components/option/Component.js';
6
+ export { OptionsList } from '../components/options-list/Component.js';
7
+ export { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
8
+ export { BaseOption } from '../components/base-option/Component.js';
9
+ export { Search } from '../components/search/Component.js';
10
+ export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
11
+ export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
12
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-4eceefed.js';
13
+ export { defaultAccessor, defaultFilterFn, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
14
+ import 'react';
15
+ import 'classnames';
16
+ import '@alfalab/icons-glyph/ChevronDownMIcon';
17
+ import 'react-merge-refs';
18
+ import '@juggle/resize-observer';
19
+ import 'downshift';
20
+ import '@alfalab/core-components-popover/modern';
21
+ import '@alfalab/core-components-shared/modern';
22
+ import '@alfalab/hooks';
23
+ import '../components/native-select/Component.js';
24
+ import '../components/checkmark/Component.js';
25
+ import '@alfalab/core-components-badge/modern';
26
+ import '@alfalab/core-components-checkbox/modern';
27
+ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
28
+ import '@alfalab/icons-glyph/CheckmarkMIcon';
29
+ import '../components/checkmark-mobile/Component.js';
30
+ import '@alfalab/core-components-scrollbar/modern';
31
+ import '../consts.js';
32
+ import 'react-virtual';
33
+ import '../components/base-checkmark/Component.js';
34
+ import '@alfalab/core-components-input/modern';
35
+ import '@alfalab/icons-glyph/MagnifierMIcon';
36
+ import '@alfalab/core-components-skeleton/modern';
37
+ import 'intersection-observer';
38
+ import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
39
+ import '@alfalab/core-components-button/modern/desktop';
40
+ import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
package/package.json CHANGED
@@ -1,35 +1,11 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-select",
3
- "version": "15.2.2",
3
+ "version": "15.3.0",
4
4
  "description": "Select component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
7
7
  "main": "index.js",
8
8
  "module": "./esm/index.js",
9
- "exports": {
10
- ".": {
11
- "import": "./esm/index.js",
12
- "require": "./index.js"
13
- },
14
- "./mobile": {
15
- "import": "./esm/mobile.js",
16
- "require": "./mobile.js"
17
- },
18
- "./desktop": {
19
- "import": "./esm/desktop.js",
20
- "require": "./desktop.js"
21
- },
22
- "./shared": {
23
- "import": "./esm/shared.js",
24
- "require": "./shared.js"
25
- },
26
- "./esm": "./esm/index.js",
27
- "./cssm": "./cssm/index.js",
28
- "./modern": "./modern/index.js",
29
- "./esm/*": "./esm/*",
30
- "./cssm/*": "./cssm/*",
31
- "./modern/*": "./modern/*"
32
- },
33
9
  "publishConfig": {
34
10
  "access": "public",
35
11
  "directory": "dist"
@@ -40,17 +16,17 @@
40
16
  },
41
17
  "dependencies": {
42
18
  "@alfalab/core-components-badge": "^5.2.0",
43
- "@alfalab/core-components-base-modal": "^5.4.1",
44
- "@alfalab/core-components-bottom-sheet": "^6.11.1",
45
- "@alfalab/core-components-button": "^9.0.6",
19
+ "@alfalab/core-components-base-modal": "^5.5.0",
20
+ "@alfalab/core-components-bottom-sheet": "^6.11.3",
21
+ "@alfalab/core-components-button": "^9.1.0",
46
22
  "@alfalab/core-components-checkbox": "^3.2.0",
47
- "@alfalab/core-components-form-control": "^10.1.1",
48
- "@alfalab/core-components-input": "^12.2.1",
49
- "@alfalab/core-components-modal": "^8.0.9",
23
+ "@alfalab/core-components-form-control": "^10.2.0",
24
+ "@alfalab/core-components-input": "^12.3.0",
25
+ "@alfalab/core-components-modal": "^8.1.0",
50
26
  "@alfalab/core-components-popover": "^6.1.0",
51
27
  "@alfalab/core-components-scrollbar": "^2.2.0",
52
28
  "@alfalab/core-components-skeleton": "^4.1.0",
53
- "@alfalab/core-components-shared": "^0.6.0",
29
+ "@alfalab/core-components-shared": "^0.7.0",
54
30
  "@alfalab/hooks": "^1.13.0",
55
31
  "@alfalab/icons-glyph": "^2.108.0",
56
32
  "@juggle/resize-observer": "^3.3.1",
package/presets/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var presets_useSelectWithLoading_hook = require('./useSelectWithLoading/hook.js');
6
6
  var presets_useLazyLoading_hook = require('./useLazyLoading/hook.js');
7
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-a6f060a1.js');
7
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-0a5c9f56.js');
8
8
  require('tslib');
9
9
  require('react');
10
10
  require('@alfalab/core-components-skeleton');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  require('tslib');
6
6
  require('react');
7
7
  require('../../utils.js');
8
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-a6f060a1.js');
8
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-0a5c9f56.js');
9
9
  require('../../components/options-list/Component.js');
10
10
  require('react-merge-refs');
11
11
  require('classnames');
@@ -6,7 +6,7 @@ require('tslib');
6
6
  require('react');
7
7
  require('../../../components/options-list/Component.js');
8
8
  require('../../../consts.js');
9
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-a6f060a1.js');
9
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-0a5c9f56.js');
10
10
  require('./footer/Component.js');
11
11
  require('./header/Component.js');
12
12
  require('react-merge-refs');
@@ -9,7 +9,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
9
9
 
10
10
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
11
11
 
12
- var styles = {"footer":"select__footer_zbbxs"};
12
+ var styles = {"footer":"select__footer_b1owf"};
13
13
  require('./index.css')
14
14
 
15
15
  var Footer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: r40yx */
1
+ /* hash: 10dvs */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -17,10 +17,10 @@
17
17
  --gap-s: 12px;
18
18
  } :root {
19
19
  } :root {
20
- } .select__footer_zbbxs {
20
+ } .select__footer_b1owf {
21
21
  background-color: var(--color-light-bg-primary);
22
22
  padding: var(--gap-s);
23
23
  outline: none
24
- } .select__footer_zbbxs > * + * {
24
+ } .select__footer_b1owf > * + * {
25
25
  margin-left: var(--gap-xs);
26
26
  }
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
13
13
 
14
- var styles = {"desktop":"select__desktop_1a8hu","mobile":"select__mobile_1a8hu"};
14
+ var styles = {"desktop":"select__desktop_1kxe6","mobile":"select__mobile_1kxe6"};
15
15
  require('./index.css')
16
16
 
17
17
  var Header = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1qszj */
1
+ /* hash: 1hj4p */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -16,8 +16,8 @@
16
16
  --gap-s: 12px;
17
17
  } :root {
18
18
  } :root {
19
- } .select__desktop_1a8hu {
19
+ } .select__desktop_1kxe6 {
20
20
  padding: var(--gap-s);
21
- } .select__mobile_1a8hu {
21
+ } .select__mobile_1kxe6 {
22
22
  padding: var(--gap-s) var(--gap-xs);
23
23
  }
@@ -1 +1 @@
1
- export * from "../../../hook-a6f060a1";
1
+ export * from "../../../hook-0a5c9f56";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-a6f060a1.js');
5
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-0a5c9f56.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('../../../utils.js');
@@ -18,7 +18,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
18
18
 
19
19
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
20
20
 
21
- var styles = {"skeleton":"select__skeleton_1eba2"};
21
+ var styles = {"skeleton":"select__skeleton_164am"};
22
22
  require('./index.css')
23
23
 
24
24
  function useSelectWithLoading(_a) {
@@ -1,5 +1,5 @@
1
- /* hash: 1fned */
2
- .select__skeleton_1eba2 {
1
+ /* hash: 2b85k */
2
+ .select__skeleton_164am {
3
3
  position: absolute;
4
4
  top: 50%;
5
5
  transform: translateY(-50%);
@@ -0,0 +1,5 @@
1
+ export * from "../components/index";
2
+ export * from "../presets/index";
3
+ export * from "../typings";
4
+ export * from "../utils";
5
+ export type { AdditionalMobileProps } from "../Component.mobile";