@alfalab/core-components-select 17.14.0 → 17.14.2

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 (171) hide show
  1. package/components/arrow/Component.js +1 -1
  2. package/components/arrow/index.css +3 -3
  3. package/components/base-checkmark/Component.js +1 -1
  4. package/components/base-checkmark/index.css +6 -6
  5. package/components/base-option/Component.js +1 -1
  6. package/components/base-option/index.css +15 -15
  7. package/components/base-select/Component.js +2 -2
  8. package/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.d.ts +1 -1
  9. package/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  10. package/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  11. package/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  12. package/components/base-select/index.css +11 -11
  13. package/components/base-select/mobile.css +12 -12
  14. package/components/checkmark/Component.js +1 -1
  15. package/components/checkmark/index.css +10 -10
  16. package/components/checkmark-mobile/Component.js +1 -1
  17. package/components/checkmark-mobile/index.css +6 -6
  18. package/components/clear-button/Component.js +1 -1
  19. package/components/clear-button/index.css +6 -6
  20. package/components/field/Component.js +1 -1
  21. package/components/field/index.css +12 -12
  22. package/components/footer/Component.js +1 -1
  23. package/components/footer/index.css +5 -5
  24. package/components/optgroup/Component.js +1 -1
  25. package/components/optgroup/index.css +6 -6
  26. package/components/option/Component.js +1 -1
  27. package/components/option/index.css +19 -19
  28. package/components/options-list/Component.js +1 -1
  29. package/components/options-list/index.css +11 -11
  30. package/components/search/Component.js +1 -1
  31. package/components/search/index.css +2 -2
  32. package/components/virtual-options-list/Component.js +2 -2
  33. package/components/virtual-options-list/index.css +15 -15
  34. package/cssm/components/virtual-options-list/Component.js +1 -1
  35. package/cssm/shared/index.js +1 -0
  36. package/cssm/utils.d.ts +2 -1
  37. package/cssm/utils.js +46 -0
  38. package/esm/components/arrow/Component.js +1 -1
  39. package/esm/components/arrow/index.css +3 -3
  40. package/esm/components/base-checkmark/Component.js +1 -1
  41. package/esm/components/base-checkmark/index.css +6 -6
  42. package/esm/components/base-option/Component.js +1 -1
  43. package/esm/components/base-option/index.css +15 -15
  44. package/esm/components/base-select/Component.js +2 -2
  45. package/esm/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  46. package/esm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  47. package/esm/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  48. package/esm/components/base-select/index.css +11 -11
  49. package/esm/components/base-select/mobile.css +12 -12
  50. package/esm/components/checkmark/Component.js +1 -1
  51. package/esm/components/checkmark/index.css +10 -10
  52. package/esm/components/checkmark-mobile/Component.js +1 -1
  53. package/esm/components/checkmark-mobile/index.css +6 -6
  54. package/esm/components/clear-button/Component.js +1 -1
  55. package/esm/components/clear-button/index.css +6 -6
  56. package/esm/components/field/Component.js +1 -1
  57. package/esm/components/field/index.css +12 -12
  58. package/esm/components/footer/Component.js +1 -1
  59. package/esm/components/footer/index.css +5 -5
  60. package/esm/components/optgroup/Component.js +1 -1
  61. package/esm/components/optgroup/index.css +6 -6
  62. package/esm/components/option/Component.js +1 -1
  63. package/esm/components/option/index.css +19 -19
  64. package/esm/components/options-list/Component.js +1 -1
  65. package/esm/components/options-list/index.css +11 -11
  66. package/esm/components/search/Component.js +1 -1
  67. package/esm/components/search/index.css +2 -2
  68. package/esm/components/virtual-options-list/Component.js +3 -3
  69. package/esm/components/virtual-options-list/index.css +15 -15
  70. package/esm/{list-popover-desktop-2b8c7de9.js → list-popover-desktop-887652b7.js} +1 -1
  71. package/esm/mobile/Component.mobile.js +1 -1
  72. package/esm/mobile.module-4e795c47.js +4 -0
  73. package/esm/presets/index.js +1 -1
  74. package/esm/presets/useSelectWithApply/hook.js +1 -1
  75. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  76. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  77. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  78. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  79. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  80. package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  81. package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  82. package/esm/presets/useSelectWithLoading/hook.js +1 -1
  83. package/esm/presets/useSelectWithLoading/index.css +2 -2
  84. package/esm/shared/index.js +2 -2
  85. package/esm/utils.d.ts +2 -1
  86. package/esm/utils.js +47 -2
  87. package/{list-popover-desktop-5be0267e.js → list-popover-desktop-cbc31679.js} +1 -1
  88. package/mobile/Component.mobile.js +1 -1
  89. package/mobile.module-1cf424b0.js +6 -0
  90. package/modern/components/arrow/Component.js +1 -1
  91. package/modern/components/arrow/index.css +3 -3
  92. package/modern/components/base-checkmark/Component.js +1 -1
  93. package/modern/components/base-checkmark/index.css +6 -6
  94. package/modern/components/base-option/Component.js +1 -1
  95. package/modern/components/base-option/index.css +15 -15
  96. package/modern/components/base-select/Component.js +2 -2
  97. package/modern/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  98. package/modern/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  99. package/modern/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  100. package/modern/components/base-select/index.css +11 -11
  101. package/modern/components/base-select/mobile.css +12 -12
  102. package/modern/components/checkmark/Component.js +1 -1
  103. package/modern/components/checkmark/index.css +10 -10
  104. package/modern/components/checkmark-mobile/Component.js +1 -1
  105. package/modern/components/checkmark-mobile/index.css +6 -6
  106. package/modern/components/clear-button/Component.js +1 -1
  107. package/modern/components/clear-button/index.css +6 -6
  108. package/modern/components/field/Component.js +1 -1
  109. package/modern/components/field/index.css +12 -12
  110. package/modern/components/footer/Component.js +1 -1
  111. package/modern/components/footer/index.css +5 -5
  112. package/modern/components/optgroup/Component.js +1 -1
  113. package/modern/components/optgroup/index.css +6 -6
  114. package/modern/components/option/Component.js +1 -1
  115. package/modern/components/option/index.css +19 -19
  116. package/modern/components/options-list/Component.js +1 -1
  117. package/modern/components/options-list/index.css +11 -11
  118. package/modern/components/search/Component.js +1 -1
  119. package/modern/components/search/index.css +2 -2
  120. package/modern/components/virtual-options-list/Component.js +3 -3
  121. package/modern/components/virtual-options-list/index.css +15 -15
  122. package/modern/{list-popover-desktop-483aa9cb.js → list-popover-desktop-9ae81274.js} +1 -1
  123. package/modern/mobile/Component.mobile.js +1 -1
  124. package/modern/mobile.module-e9497052.js +4 -0
  125. package/modern/presets/index.js +1 -1
  126. package/modern/presets/useSelectWithApply/hook.js +1 -1
  127. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  128. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  129. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  130. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  131. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  132. package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  133. package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  134. package/modern/presets/useSelectWithLoading/hook.js +1 -1
  135. package/modern/presets/useSelectWithLoading/index.css +2 -2
  136. package/modern/shared/index.js +2 -2
  137. package/modern/utils.d.ts +2 -1
  138. package/modern/utils.js +44 -2
  139. package/moderncssm/components/virtual-options-list/Component.js +2 -2
  140. package/moderncssm/shared/index.js +1 -1
  141. package/moderncssm/utils.d.ts +2 -1
  142. package/moderncssm/utils.js +44 -2
  143. package/package.json +4 -4
  144. package/presets/index.js +1 -1
  145. package/presets/useSelectWithApply/hook.js +1 -1
  146. package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  147. package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  148. package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  149. package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  150. package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  151. package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  152. package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  153. package/presets/useSelectWithLoading/hook.js +1 -1
  154. package/presets/useSelectWithLoading/index.css +2 -2
  155. package/shared/index.js +2 -1
  156. package/src/components/virtual-options-list/Component.tsx +2 -2
  157. package/src/utils.ts +76 -0
  158. package/utils.d.ts +2 -1
  159. package/utils.js +46 -0
  160. package/esm/mobile.module-e0ef84c0.js +0 -4
  161. package/mobile.module-7c4bac8a.js +0 -6
  162. package/modern/mobile.module-cf121ed8.js +0 -4
  163. /package/esm/{hook-abcdce24.d.ts → hook-2671ed8c.d.ts} +0 -0
  164. /package/esm/{hook-abcdce24.js → hook-2671ed8c.js} +0 -0
  165. /package/esm/{list-popover-desktop-2b8c7de9.d.ts → list-popover-desktop-887652b7.d.ts} +0 -0
  166. /package/{hook-15f009ec.d.ts → hook-915ae008.d.ts} +0 -0
  167. /package/{hook-15f009ec.js → hook-915ae008.js} +0 -0
  168. /package/{list-popover-desktop-5be0267e.d.ts → list-popover-desktop-cbc31679.d.ts} +0 -0
  169. /package/modern/{hook-3f889408.d.ts → hook-3033a0ac.d.ts} +0 -0
  170. /package/modern/{hook-3f889408.js → hook-3033a0ac.js} +0 -0
  171. /package/modern/{list-popover-desktop-483aa9cb.d.ts → list-popover-desktop-9ae81274.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- /* hash: 1dgcb */
1
+ /* hash: 35144 */
2
2
  :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 */ /* 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 */
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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -27,6 +27,6 @@
27
27
  /* checkmark */
28
28
 
29
29
  /* optgroup */
30
- } .select__component_1hxzg.select__component_1hxzg {
30
+ } .select__component_7il34.select__component_7il34 {
31
31
  width: auto;
32
32
  }
@@ -6,10 +6,10 @@ import { useMatchMedia } from '@alfalab/core-components-mq/modern';
6
6
  import { Scrollbar } from '@alfalab/core-components-scrollbar/modern';
7
7
  import { isClient } from '@alfalab/core-components-shared/modern';
8
8
  import { SIZE_TO_CLASSNAME_MAP, DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
9
- import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
9
+ import { usePrevious, lastIndexOf, useVirtualVisibleOptions, isGroup } from '../../utils.js';
10
10
  import { Optgroup } from '../optgroup/Component.js';
11
11
 
12
- const styles = {"virtualOptionsList":"select__virtualOptionsList_1n8bo","virtualOptionsListHeader":"select__virtualOptionsListHeader_1n8bo","virtualOptionsListFooter":"select__virtualOptionsListFooter_1n8bo","withBorder":"select__withBorder_1n8bo","scrollable":"select__scrollable_1n8bo","inner":"select__inner_1n8bo","virtualRow":"select__virtualRow_1n8bo","highlighted":"select__highlighted_1n8bo","emptyPlaceholder":"select__emptyPlaceholder_1n8bo","size-64":"select__size-64_1n8bo","size-72":"select__size-72_1n8bo"};
12
+ const styles = {"virtualOptionsList":"select__virtualOptionsList_d0h1g","virtualOptionsListHeader":"select__virtualOptionsListHeader_d0h1g","virtualOptionsListFooter":"select__virtualOptionsListFooter_d0h1g","withBorder":"select__withBorder_d0h1g","scrollable":"select__scrollable_d0h1g","inner":"select__inner_d0h1g","virtualRow":"select__virtualRow_d0h1g","highlighted":"select__highlighted_d0h1g","emptyPlaceholder":"select__emptyPlaceholder_d0h1g","size-64":"select__size-64_d0h1g","size-72":"select__size-72_d0h1g"};
13
13
  require('./index.css')
14
14
 
15
15
  const VirtualOptionsList = forwardRef(({ size = 48, flatOptions = [], highlightedIndex = -1, optionGroupClassName, className, getOptionProps, groupOptionProps = {}, Option, open, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, header, footer, showFooter = true, optionsListWidth, onScroll, nativeScrollbar: nativeScrollbarProp, setHighlightedIndex, selectedItems, setSelectedItems, search, multiple, }, ref) => {
@@ -70,7 +70,7 @@ const VirtualOptionsList = forwardRef(({ size = 48, flatOptions = [], highlighte
70
70
  .join('_'));
71
71
  // eslint-disable-next-line react-hooks/exhaustive-deps
72
72
  }, [rowVirtualizer.virtualItems.length, flatOptions]);
73
- useVisibleOptions({
73
+ useVirtualVisibleOptions({
74
74
  visibleOptions,
75
75
  invalidate: visibleOptionsInvalidateKey,
76
76
  listRef,
@@ -1,4 +1,4 @@
1
- /* hash: 1t13g */
1
+ /* hash: 1305y */
2
2
  :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 */ /* 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 */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-300: #e7e8eb;
@@ -43,35 +43,35 @@
43
43
  /* checkmark */
44
44
 
45
45
  /* optgroup */
46
- } .select__virtualOptionsList_1n8bo {
46
+ } .select__virtualOptionsList_d0h1g {
47
47
  width: 100%;
48
48
  outline: none;
49
49
  box-sizing: border-box;
50
50
  position: sticky;
51
51
  justify-content: space-between;
52
- } .select__virtualOptionsListHeader_1n8bo {
52
+ } .select__virtualOptionsListHeader_d0h1g {
53
53
  box-sizing: border-box;
54
54
  border-bottom: 1px solid var(--color-light-neutral-300);
55
- } .select__virtualOptionsListFooter_1n8bo {
55
+ } .select__virtualOptionsListFooter_d0h1g {
56
56
  position: sticky;
57
57
  bottom: var(--gap-0);
58
58
  box-sizing: border-box;
59
59
  border-top: 1px solid transparent
60
- } .select__virtualOptionsListFooter_1n8bo.select__withBorder_1n8bo {
60
+ } .select__virtualOptionsListFooter_d0h1g.select__withBorder_d0h1g {
61
61
  border-top: 1px solid var(--color-light-neutral-300);
62
- } .select__scrollable_1n8bo {
62
+ } .select__scrollable_d0h1g {
63
63
  position: relative;
64
64
  overflow: auto;
65
65
  width: 100%;
66
- } .select__inner_1n8bo {
66
+ } .select__inner_d0h1g {
67
67
  position: relative;
68
68
  width: 100%;
69
- } .select__virtualRow_1n8bo {
69
+ } .select__virtualRow_d0h1g {
70
70
  position: absolute;
71
71
  top: var(--gap-0);
72
72
  left: var(--gap-0);
73
73
  width: 100%
74
- } .select__virtualRow_1n8bo:before {
74
+ } .select__virtualRow_d0h1g:before {
75
75
  content: '';
76
76
  position: absolute;
77
77
  z-index: 1;
@@ -81,16 +81,16 @@
81
81
  height: 1px;
82
82
  background: var(--select-option-divider-background);
83
83
  display: var(--select-option-divider-display);
84
- } .select__virtualRow_1n8bo:first-child:before {
84
+ } .select__virtualRow_d0h1g:first-child:before {
85
85
  display: none;
86
- } .select__highlighted_1n8bo:before,
87
- .select__highlighted_1n8bo + .select__virtualRow_1n8bo:before {
86
+ } .select__highlighted_d0h1g:before,
87
+ .select__highlighted_d0h1g + .select__virtualRow_d0h1g:before {
88
88
  display: none;
89
- } .select__emptyPlaceholder_1n8bo {
89
+ } .select__emptyPlaceholder_d0h1g {
90
90
  padding: var(--gap-16) var(--gap-12);
91
91
  color: var(--select-options-list-empty-placeholder-color);
92
92
  flex: 1;
93
- } .select__size-64_1n8bo .select__emptyPlaceholder_1n8bo,
94
- .select__size-72_1n8bo .select__emptyPlaceholder_1n8bo {
93
+ } .select__size-64_d0h1g .select__emptyPlaceholder_d0h1g,
94
+ .select__size-72_d0h1g .select__emptyPlaceholder_d0h1g {
95
95
  padding: var(--gap-24) var(--gap-16);
96
96
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- const styles = {"component":"select__component_3jwu1","popoverInner":"select__popoverInner_3jwu1","optionsListWrapper":"select__optionsListWrapper_3jwu1","optionsListBorder":"select__optionsListBorder_3jwu1","nativeSelect":"select__nativeSelect_3jwu1","block":"select__block_3jwu1","emptySearchPlaceholder":"select__emptySearchPlaceholder_3jwu1","search":"select__search_3jwu1"};
4
+ const styles = {"component":"select__component_1kggs","popoverInner":"select__popoverInner_1kggs","optionsListWrapper":"select__optionsListWrapper_1kggs","optionsListBorder":"select__optionsListBorder_1kggs","nativeSelect":"select__nativeSelect_1kggs","block":"select__block_1kggs","emptySearchPlaceholder":"select__emptySearchPlaceholder_1kggs","search":"select__search_1kggs"};
5
5
  require('./components/base-select/index.css')
6
6
 
7
7
  const ListPopoverDesktop = (props) => {
@@ -11,7 +11,7 @@ import { Option } from '../components/option/Component.js';
11
11
  import { OptionsList } from '../components/options-list/Component.js';
12
12
  import { Search } from '../components/search/Component.js';
13
13
  import { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
14
- import { u as useSelectWithApply } from '../hook-3f889408.js';
14
+ import { u as useSelectWithApply } from '../hook-3033a0ac.js';
15
15
  import { Header } from '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
16
16
 
17
17
  const VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
@@ -0,0 +1,4 @@
1
+ const mobileStyles = {"sheet":"select__sheet_1qwlo","sheetContent":"select__sheetContent_1qwlo","modalContent":"select__modalContent_1qwlo","sheetContainer":"select__sheetContainer_1qwlo","optionsListWrapper":"select__optionsListWrapper_1qwlo","optionsList":"select__optionsList_1qwlo","scrollbar":"select__scrollbar_1qwlo","search":"select__search_1qwlo","option":"select__option_1qwlo","optionGroup":"select__optionGroup_1qwlo"};
2
+ require('./components/base-select/mobile.css')
3
+
4
+ export { mobileStyles as m };
@@ -1,3 +1,3 @@
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-3f889408.js';
3
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-3033a0ac.js';
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
2
  import 'deep-equal';
3
3
  import '../../utils.js';
4
- export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-3f889408.js';
4
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-3033a0ac.js';
@@ -1,6 +1,6 @@
1
1
  import 'react';
2
2
  import '../../../components/options-list/Component.js';
3
3
  import '../../../consts.js';
4
- export { O as OptionsListWithApply } from '../../../hook-3f889408.js';
4
+ export { O as OptionsListWithApply } from '../../../hook-3033a0ac.js';
5
5
  import './footer/Component.js';
6
6
  import './header/Component.js';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
3
3
  import { getDataTestId } from '@alfalab/core-components-shared/modern';
4
4
 
5
- const styles = {"footer":"select__footer_tycli","button":"select__button_tycli"};
5
+ const styles = {"footer":"select__footer_1c2wo","button":"select__button_1c2wo"};
6
6
  require('./index.css')
7
7
 
8
8
  const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], dataTestId, }) => (React.createElement("div", {
@@ -1,4 +1,4 @@
1
- /* hash: t2f1x */
1
+ /* hash: 31hjz */
2
2
  :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 */ /* 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 */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-base-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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
@@ -23,10 +23,10 @@
23
23
  --gap-12: var(--gap-s);
24
24
  } :root {
25
25
  } :root {
26
- } /* сбрасывает синюю подсветку при нажатии */ .select__footer_tycli {
26
+ } /* сбрасывает синюю подсветку при нажатии */ .select__footer_1c2wo {
27
27
  background-color: var(--color-light-base-bg-primary);
28
28
  padding: var(--gap-12);
29
29
  outline: none
30
- } .select__footer_tycli > .select__button_tycli + .select__button_tycli {
30
+ } .select__footer_1c2wo > .select__button_1c2wo + .select__button_1c2wo {
31
31
  margin-left: var(--gap-8);
32
32
  }
@@ -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_h0itf","mobile":"select__mobile_h0itf"};
5
+ const styles = {"desktop":"select__desktop_19sbe","mobile":"select__mobile_19sbe"};
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: l3an6 */
1
+ /* hash: 1vth5 */
2
2
  :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 */ /* 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 */
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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -22,8 +22,8 @@
22
22
  --gap-12: var(--gap-s);
23
23
  } :root {
24
24
  } :root {
25
- } /* сбрасывает синюю подсветку при нажатии */ .select__desktop_h0itf {
25
+ } /* сбрасывает синюю подсветку при нажатии */ .select__desktop_19sbe {
26
26
  padding: var(--gap-12);
27
- } .select__mobile_h0itf {
27
+ } .select__mobile_19sbe {
28
28
  padding: var(--gap-12) var(--gap-8);
29
29
  }
@@ -1 +1 @@
1
- export * from "../../../hook-3f889408";
1
+ export * from "../../../hook-3033a0ac";
@@ -1 +1 @@
1
- export { O as OptionsListWithApply } from '../../../hook-3f889408.js';
1
+ export { O as OptionsListWithApply } from '../../../hook-3033a0ac.js';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Skeleton } from '@alfalab/core-components-skeleton/modern';
3
3
  import { Option } from '../../components/option/Component.js';
4
4
 
5
- const styles = {"skeleton":"select__skeleton_1x7ma"};
5
+ const styles = {"skeleton":"select__skeleton_18lwl"};
6
6
  require('./index.css')
7
7
 
8
8
  function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
@@ -1,5 +1,5 @@
1
- /* hash: k7ylm */
2
- .select__skeleton_1x7ma {
1
+ /* hash: 11kej */
2
+ .select__skeleton_18lwl {
3
3
  position: absolute;
4
4
  top: 50%;
5
5
  transform: translateY(-50%);
@@ -1,7 +1,7 @@
1
1
  export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
2
2
  export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
3
- export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-3f889408.js';
4
- export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
3
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-3033a0ac.js';
4
+ export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVirtualVisibleOptions, useVisibleOptions } from '../utils.js';
5
5
  export { Option } from '../components/option/Component.js';
6
6
  export { BaseOption } from '../components/base-option/Component.js';
7
7
  export { OptionsList } from '../components/options-list/Component.js';
package/modern/utils.d.ts CHANGED
@@ -45,6 +45,7 @@ type useVisibleOptionsArgs = {
45
45
  */
46
46
  actualOptionsCount?: boolean;
47
47
  };
48
+ declare function useVirtualVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): void;
48
49
  declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): boolean;
49
50
  declare function defaultFilterFn(optionText: string, search: string): boolean;
50
51
  declare function defaultGroupAccessor(option: GroupShape): string | undefined;
@@ -78,4 +79,4 @@ declare function getSelectTestIds(dataTestId: string): {
78
79
  modalHeader: string;
79
80
  modalContent: string;
80
81
  };
81
- export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultGroupAccessor, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
82
+ export { isGroup, isOptionShape, joinOptions, processOptions, useVirtualVisibleOptions, useVisibleOptions, defaultFilterFn, defaultGroupAccessor, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
package/modern/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isValidElement, cloneElement, useState, useEffect, useRef } from 'react';
1
+ import { isValidElement, cloneElement, useEffect, useState, useRef } from 'react';
2
2
  import { useIsMounted, fnUtils, getDataTestId } from '@alfalab/core-components-shared/modern';
3
3
 
4
4
  const isGroup = (item) => Object.prototype.hasOwnProperty.call(item, 'options');
@@ -68,6 +68,48 @@ function processOptions(options, selected = [], filterFn = () => true, filterGro
68
68
  });
69
69
  return { filteredOptions, flatOptions, selectedOptions };
70
70
  }
71
+ // copy-paste of original `useVisibleOptions` before https://github.com/core-ds/core-components/pull/1368
72
+ function useVirtualVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef, open, invalidate, options, size, actualOptionsCount, }) {
73
+ useEffect(() => {
74
+ const measureOptionHeight = (element) => typeof size === 'number' ? Math.min(element.clientHeight, size) : element.clientHeight;
75
+ const list = listRef.current;
76
+ const styleTarget = styleTargetRef.current;
77
+ if (open && list && styleTarget && visibleOptions > 0) {
78
+ const childCount = list.children.length;
79
+ const optionsNodes = [].slice.call(list.children, 0, visibleOptions + 1);
80
+ let height = optionsNodes
81
+ .slice(0, visibleOptions)
82
+ .reduce((acc, child) => acc + measureOptionHeight(child), 0);
83
+ if (visibleOptions < childCount) {
84
+ const lastVisibleOptionHeight = measureOptionHeight(optionsNodes[optionsNodes.length - 1]);
85
+ // Если кол-во опций больше visibleOptions на 1, то показываем все опции, иначе добавляем половинку
86
+ height += Math.round(childCount - visibleOptions === 1
87
+ ? lastVisibleOptionHeight
88
+ : lastVisibleOptionHeight / 2);
89
+ }
90
+ else if (visibleOptions > childCount &&
91
+ actualOptionsCount &&
92
+ typeof size === 'number') {
93
+ const actualCount = (options ?? []).reduce((sum, option) => sum + 1 + (isGroup(option) ? option.options.length : 0), 0);
94
+ height =
95
+ Math.min(actualCount === 0 ? /** empty placeholder */ 1 : actualCount, visibleOptions) * size;
96
+ if (visibleOptions < actualCount) {
97
+ height += size / 2;
98
+ }
99
+ }
100
+ styleTarget.style.height = `${height}px`;
101
+ }
102
+ }, [
103
+ actualOptionsCount,
104
+ listRef,
105
+ open,
106
+ options,
107
+ size,
108
+ styleTargetRef,
109
+ visibleOptions,
110
+ invalidate,
111
+ ]);
112
+ }
71
113
  function useVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef, open, invalidate, options, size, actualOptionsCount, }) {
72
114
  const [, runIfMounted] = useIsMounted();
73
115
  const [measured, setMeasured] = useState(false);
@@ -181,4 +223,4 @@ function getSelectTestIds(dataTestId) {
181
223
  };
182
224
  }
183
225
 
184
- export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions };
226
+ export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVirtualVisibleOptions, useVisibleOptions };
@@ -6,7 +6,7 @@ import { useMatchMedia } from '@alfalab/core-components-mq/moderncssm';
6
6
  import { Scrollbar } from '@alfalab/core-components-scrollbar/moderncssm';
7
7
  import { isClient } from '@alfalab/core-components-shared/moderncssm';
8
8
  import { SIZE_TO_CLASSNAME_MAP, DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
9
- import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
9
+ import { usePrevious, lastIndexOf, useVirtualVisibleOptions, isGroup } from '../../utils.js';
10
10
  import { Optgroup } from '../optgroup/Component.js';
11
11
  import styles from './index.module.css';
12
12
 
@@ -68,7 +68,7 @@ const VirtualOptionsList = forwardRef(({ size = 48, flatOptions = [], highlighte
68
68
  .join('_'));
69
69
  // eslint-disable-next-line react-hooks/exhaustive-deps
70
70
  }, [rowVirtualizer.virtualItems.length, flatOptions]);
71
- useVisibleOptions({
71
+ useVirtualVisibleOptions({
72
72
  visibleOptions,
73
73
  invalidate: visibleOptionsInvalidateKey,
74
74
  listRef,
@@ -1,7 +1,7 @@
1
1
  export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
2
2
  export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
3
3
  export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-a8bc7fe8.js';
4
- export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
4
+ export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVirtualVisibleOptions, useVisibleOptions } from '../utils.js';
5
5
  export { Option } from '../components/option/Component.js';
6
6
  export { BaseOption } from '../components/base-option/Component.js';
7
7
  export { OptionsList } from '../components/options-list/Component.js';
@@ -45,6 +45,7 @@ type useVisibleOptionsArgs = {
45
45
  */
46
46
  actualOptionsCount?: boolean;
47
47
  };
48
+ declare function useVirtualVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): void;
48
49
  declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): boolean;
49
50
  declare function defaultFilterFn(optionText: string, search: string): boolean;
50
51
  declare function defaultGroupAccessor(option: GroupShape): string | undefined;
@@ -78,4 +79,4 @@ declare function getSelectTestIds(dataTestId: string): {
78
79
  modalHeader: string;
79
80
  modalContent: string;
80
81
  };
81
- export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultGroupAccessor, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
82
+ export { isGroup, isOptionShape, joinOptions, processOptions, useVirtualVisibleOptions, useVisibleOptions, defaultFilterFn, defaultGroupAccessor, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
@@ -1,4 +1,4 @@
1
- import { isValidElement, cloneElement, useState, useEffect, useRef } from 'react';
1
+ import { isValidElement, cloneElement, useEffect, useState, useRef } from 'react';
2
2
  import { useIsMounted, fnUtils, getDataTestId } from '@alfalab/core-components-shared/moderncssm';
3
3
 
4
4
  const isGroup = (item) => Object.prototype.hasOwnProperty.call(item, 'options');
@@ -68,6 +68,48 @@ function processOptions(options, selected = [], filterFn = () => true, filterGro
68
68
  });
69
69
  return { filteredOptions, flatOptions, selectedOptions };
70
70
  }
71
+ // copy-paste of original `useVisibleOptions` before https://github.com/core-ds/core-components/pull/1368
72
+ function useVirtualVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef, open, invalidate, options, size, actualOptionsCount, }) {
73
+ useEffect(() => {
74
+ const measureOptionHeight = (element) => typeof size === 'number' ? Math.min(element.clientHeight, size) : element.clientHeight;
75
+ const list = listRef.current;
76
+ const styleTarget = styleTargetRef.current;
77
+ if (open && list && styleTarget && visibleOptions > 0) {
78
+ const childCount = list.children.length;
79
+ const optionsNodes = [].slice.call(list.children, 0, visibleOptions + 1);
80
+ let height = optionsNodes
81
+ .slice(0, visibleOptions)
82
+ .reduce((acc, child) => acc + measureOptionHeight(child), 0);
83
+ if (visibleOptions < childCount) {
84
+ const lastVisibleOptionHeight = measureOptionHeight(optionsNodes[optionsNodes.length - 1]);
85
+ // Если кол-во опций больше visibleOptions на 1, то показываем все опции, иначе добавляем половинку
86
+ height += Math.round(childCount - visibleOptions === 1
87
+ ? lastVisibleOptionHeight
88
+ : lastVisibleOptionHeight / 2);
89
+ }
90
+ else if (visibleOptions > childCount &&
91
+ actualOptionsCount &&
92
+ typeof size === 'number') {
93
+ const actualCount = (options ?? []).reduce((sum, option) => sum + 1 + (isGroup(option) ? option.options.length : 0), 0);
94
+ height =
95
+ Math.min(actualCount === 0 ? /** empty placeholder */ 1 : actualCount, visibleOptions) * size;
96
+ if (visibleOptions < actualCount) {
97
+ height += size / 2;
98
+ }
99
+ }
100
+ styleTarget.style.height = `${height}px`;
101
+ }
102
+ }, [
103
+ actualOptionsCount,
104
+ listRef,
105
+ open,
106
+ options,
107
+ size,
108
+ styleTargetRef,
109
+ visibleOptions,
110
+ invalidate,
111
+ ]);
112
+ }
71
113
  function useVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef, open, invalidate, options, size, actualOptionsCount, }) {
72
114
  const [, runIfMounted] = useIsMounted();
73
115
  const [measured, setMeasured] = useState(false);
@@ -181,4 +223,4 @@ function getSelectTestIds(dataTestId) {
181
223
  };
182
224
  }
183
225
 
184
- export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions };
226
+ export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVirtualVisibleOptions, useVisibleOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-select",
3
- "version": "17.14.0",
3
+ "version": "17.14.2",
4
4
  "description": "Select component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -17,12 +17,12 @@
17
17
  "dependencies": {
18
18
  "@alfalab/core-components-badge": "^5.6.1",
19
19
  "@alfalab/core-components-base-modal": "^5.8.2",
20
- "@alfalab/core-components-bottom-sheet": "^6.17.4",
20
+ "@alfalab/core-components-bottom-sheet": "^6.17.5",
21
21
  "@alfalab/core-components-button": "^11.9.0",
22
- "@alfalab/core-components-checkbox": "^4.7.0",
22
+ "@alfalab/core-components-checkbox": "^4.7.1",
23
23
  "@alfalab/core-components-form-control": "^12.6.0",
24
24
  "@alfalab/core-components-input": "^15.2.0",
25
- "@alfalab/core-components-modal": "^9.7.0",
25
+ "@alfalab/core-components-modal": "^9.7.1",
26
26
  "@alfalab/core-components-mq": "^4.3.0",
27
27
  "@alfalab/core-components-popover": "^6.3.2",
28
28
  "@alfalab/core-components-scrollbar": "^3.1.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-15f009ec.js');
7
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-915ae008.js');
8
8
 
9
9
 
10
10
 
@@ -6,7 +6,7 @@ require('tslib');
6
6
  require('react');
7
7
  require('deep-equal');
8
8
  require('../../utils.js');
9
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-15f009ec.js');
9
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-915ae008.js');
10
10
 
11
11
 
12
12