@alfalab/core-components-select 14.1.2 → 14.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 (236) hide show
  1. package/Component-3885b0d7.d.ts +1 -1
  2. package/{Component-00c64376.d.ts → Component-3eb05f44.d.ts} +48 -1
  3. package/{Component-00c64376.js → Component-3eb05f44.js} +26 -20
  4. package/Component.js +1 -1
  5. package/Component.mobile-b2c0420d.d.ts +93 -0
  6. package/Component.responsive.js +4 -3
  7. package/components/arrow/Component.js +1 -1
  8. package/components/arrow/index.css +3 -3
  9. package/components/base-checkmark/Component.js +1 -1
  10. package/components/base-checkmark/index.css +4 -4
  11. package/components/base-option/Component.js +2 -2
  12. package/components/base-option/index.css +13 -13
  13. package/components/base-select/Component.js +2 -2
  14. package/components/base-select/index.css +8 -8
  15. package/components/base-select/index.js +1 -1
  16. package/components/base-select-mobile/Component.d.ts +24 -0
  17. package/components/base-select-mobile/Component.js +25 -7
  18. package/components/base-select-mobile/footer/Component.js +3 -3
  19. package/components/base-select-mobile/footer/index.css +5 -5
  20. package/components/base-select-mobile/index.css +10 -10
  21. package/components/base-select-mobile/index.js +1 -1
  22. package/components/checkmark/Component.js +1 -1
  23. package/components/checkmark/index.css +10 -10
  24. package/components/checkmark-mobile/Component.js +1 -1
  25. package/components/checkmark-mobile/index.css +6 -6
  26. package/components/field/Component.js +1 -1
  27. package/components/field/index.css +9 -9
  28. package/components/index.js +5 -4
  29. package/components/optgroup/Component.js +1 -1
  30. package/components/optgroup/index.css +6 -6
  31. package/components/option/Component.js +2 -2
  32. package/components/option/index.css +20 -20
  33. package/components/options-list/Component.js +3 -3
  34. package/components/options-list/index.css +9 -9
  35. package/components/select-mobile/Component.js +4 -3
  36. package/components/select-mobile/index.d.ts +1 -1
  37. package/components/select-mobile/index.js +4 -3
  38. package/components/select-modal-mobile/Component.js +4 -3
  39. package/components/select-modal-mobile/index.d.ts +1 -1
  40. package/components/select-modal-mobile/index.js +4 -3
  41. package/components/virtual-options-list/Component.js +4 -4
  42. package/components/virtual-options-list/index.css +15 -15
  43. package/cssm/Component-3885b0d7.d.ts +1 -1
  44. package/{modern/Component-0b711513.d.ts → cssm/Component-4727d474.d.ts} +48 -1
  45. package/cssm/{Component-f86f43e3.js → Component-4727d474.js} +25 -19
  46. package/cssm/Component.mobile-b2c0420d.d.ts +93 -0
  47. package/cssm/Component.responsive.js +3 -1
  48. package/cssm/components/base-option/Component.js +1 -1
  49. package/cssm/components/base-select-mobile/Component.d.ts +24 -0
  50. package/cssm/components/base-select-mobile/Component.js +23 -5
  51. package/cssm/components/base-select-mobile/footer/Component.js +2 -2
  52. package/cssm/components/index.js +4 -2
  53. package/cssm/components/option/Component.js +1 -1
  54. package/cssm/components/options-list/Component.js +2 -2
  55. package/cssm/components/select-mobile/Component.js +3 -1
  56. package/cssm/components/select-mobile/index.d.ts +1 -1
  57. package/cssm/components/select-mobile/index.js +3 -1
  58. package/cssm/components/select-modal-mobile/Component.js +3 -1
  59. package/cssm/components/select-modal-mobile/index.d.ts +1 -1
  60. package/cssm/components/select-modal-mobile/index.js +3 -1
  61. package/cssm/components/virtual-options-list/Component.js +3 -3
  62. package/{esm/hook-4b555174.d.ts → cssm/hook-b4e70cb0.d.ts} +15 -4
  63. package/cssm/index.js +4 -2
  64. package/cssm/mobile.d.ts +4 -0
  65. package/cssm/mobile.js +67 -0
  66. package/cssm/presets/index.d.ts +1 -1
  67. package/cssm/presets/index.js +3 -1
  68. package/cssm/presets/useSelectWithApply/hook.js +3 -1
  69. package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -1
  70. package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +0 -9
  71. package/cssm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
  72. package/cssm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +23 -0
  73. package/cssm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +22 -0
  74. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  75. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +3 -1
  76. package/cssm/responsive.js +3 -1
  77. package/esm/Component-3885b0d7.d.ts +1 -1
  78. package/{cssm/Component-f86f43e3.d.ts → esm/Component-b436aedf.d.ts} +48 -1
  79. package/esm/{Component-2ff63ae2.js → Component-b436aedf.js} +26 -20
  80. package/esm/Component.js +1 -1
  81. package/esm/Component.mobile-b2c0420d.d.ts +93 -0
  82. package/esm/Component.responsive.js +4 -3
  83. package/esm/components/arrow/Component.js +1 -1
  84. package/esm/components/arrow/index.css +3 -3
  85. package/esm/components/base-checkmark/Component.js +1 -1
  86. package/esm/components/base-checkmark/index.css +4 -4
  87. package/esm/components/base-option/Component.js +2 -2
  88. package/esm/components/base-option/index.css +13 -13
  89. package/esm/components/base-select/Component.js +2 -2
  90. package/esm/components/base-select/index.css +8 -8
  91. package/esm/components/base-select/index.js +1 -1
  92. package/esm/components/base-select-mobile/Component.d.ts +24 -0
  93. package/esm/components/base-select-mobile/Component.js +26 -8
  94. package/esm/components/base-select-mobile/footer/Component.js +3 -3
  95. package/esm/components/base-select-mobile/footer/index.css +5 -5
  96. package/esm/components/base-select-mobile/index.css +10 -10
  97. package/esm/components/base-select-mobile/index.js +1 -1
  98. package/esm/components/checkmark/Component.js +1 -1
  99. package/esm/components/checkmark/index.css +10 -10
  100. package/esm/components/checkmark-mobile/Component.js +1 -1
  101. package/esm/components/checkmark-mobile/index.css +6 -6
  102. package/esm/components/field/Component.js +1 -1
  103. package/esm/components/field/index.css +9 -9
  104. package/esm/components/index.js +5 -4
  105. package/esm/components/optgroup/Component.js +1 -1
  106. package/esm/components/optgroup/index.css +6 -6
  107. package/esm/components/option/Component.js +2 -2
  108. package/esm/components/option/index.css +20 -20
  109. package/esm/components/options-list/Component.js +3 -3
  110. package/esm/components/options-list/index.css +9 -9
  111. package/esm/components/select-mobile/Component.js +4 -3
  112. package/esm/components/select-mobile/index.d.ts +1 -1
  113. package/esm/components/select-mobile/index.js +4 -3
  114. package/esm/components/select-modal-mobile/Component.js +4 -3
  115. package/esm/components/select-modal-mobile/index.d.ts +1 -1
  116. package/esm/components/select-modal-mobile/index.js +4 -3
  117. package/esm/components/virtual-options-list/Component.js +4 -4
  118. package/esm/components/virtual-options-list/index.css +15 -15
  119. package/{cssm/hook-4b555174.d.ts → esm/hook-b4e70cb0.d.ts} +15 -4
  120. package/esm/index-3885b0d7.d.ts +1 -1
  121. package/esm/index.js +5 -4
  122. package/esm/mobile.d.ts +4 -0
  123. package/esm/mobile.js +41 -0
  124. package/esm/presets/index.d.ts +1 -1
  125. package/esm/presets/index.js +4 -3
  126. package/esm/presets/useLazyLoading/hook.js +2 -2
  127. package/esm/presets/useLazyLoading/index.css +2 -2
  128. package/esm/presets/useSelectWithApply/hook.js +4 -3
  129. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +4 -3
  130. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  131. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -12
  132. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
  133. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +15 -0
  134. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +23 -0
  135. package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  136. package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +4 -3
  137. package/esm/presets/useSelectWithLoading/hook.js +1 -1
  138. package/esm/presets/useSelectWithLoading/index.css +2 -2
  139. package/esm/responsive.js +4 -3
  140. package/{hook-4b555174.d.ts → hook-b4e70cb0.d.ts} +15 -4
  141. package/index-3885b0d7.d.ts +1 -1
  142. package/index.js +5 -4
  143. package/mobile.d.ts +4 -0
  144. package/mobile.js +50 -0
  145. package/modern/Component-3885b0d7.d.ts +1 -1
  146. package/{esm/Component-2ff63ae2.d.ts → modern/Component-c22703bb.d.ts} +48 -1
  147. package/modern/{Component-0b711513.js → Component-c22703bb.js} +31 -17
  148. package/modern/Component.js +1 -1
  149. package/modern/Component.mobile-b2c0420d.d.ts +93 -0
  150. package/modern/Component.responsive.js +4 -3
  151. package/modern/components/arrow/Component.js +1 -1
  152. package/modern/components/arrow/index.css +3 -3
  153. package/modern/components/base-checkmark/Component.js +1 -1
  154. package/modern/components/base-checkmark/index.css +4 -4
  155. package/modern/components/base-option/Component.js +2 -2
  156. package/modern/components/base-option/index.css +13 -13
  157. package/modern/components/base-select/Component.js +2 -2
  158. package/modern/components/base-select/index.css +8 -8
  159. package/modern/components/base-select/index.js +1 -1
  160. package/modern/components/base-select-mobile/Component.d.ts +24 -0
  161. package/modern/components/base-select-mobile/Component.js +20 -7
  162. package/modern/components/base-select-mobile/footer/Component.js +3 -3
  163. package/modern/components/base-select-mobile/footer/index.css +5 -5
  164. package/modern/components/base-select-mobile/index.css +10 -10
  165. package/modern/components/base-select-mobile/index.js +1 -1
  166. package/modern/components/checkmark/Component.js +1 -1
  167. package/modern/components/checkmark/index.css +10 -10
  168. package/modern/components/checkmark-mobile/Component.js +1 -1
  169. package/modern/components/checkmark-mobile/index.css +6 -6
  170. package/modern/components/field/Component.js +1 -1
  171. package/modern/components/field/index.css +9 -9
  172. package/modern/components/index.js +5 -4
  173. package/modern/components/optgroup/Component.js +1 -1
  174. package/modern/components/optgroup/index.css +6 -6
  175. package/modern/components/option/Component.js +2 -2
  176. package/modern/components/option/index.css +20 -20
  177. package/modern/components/options-list/Component.js +3 -3
  178. package/modern/components/options-list/index.css +9 -9
  179. package/modern/components/select-mobile/Component.js +4 -3
  180. package/modern/components/select-mobile/index.d.ts +1 -1
  181. package/modern/components/select-mobile/index.js +4 -3
  182. package/modern/components/select-modal-mobile/Component.js +4 -3
  183. package/modern/components/select-modal-mobile/index.d.ts +1 -1
  184. package/modern/components/select-modal-mobile/index.js +4 -3
  185. package/modern/components/virtual-options-list/Component.js +3 -3
  186. package/modern/components/virtual-options-list/index.css +15 -15
  187. package/modern/{hook-4b555174.d.ts → hook-b4e70cb0.d.ts} +15 -4
  188. package/modern/index-3885b0d7.d.ts +1 -1
  189. package/modern/index.js +5 -4
  190. package/modern/mobile.d.ts +4 -0
  191. package/modern/mobile.js +40 -0
  192. package/modern/presets/index.d.ts +1 -1
  193. package/modern/presets/index.js +4 -3
  194. package/modern/presets/useLazyLoading/hook.js +2 -2
  195. package/modern/presets/useLazyLoading/index.css +2 -2
  196. package/modern/presets/useSelectWithApply/hook.js +4 -3
  197. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +4 -3
  198. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  199. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -12
  200. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
  201. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +11 -0
  202. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +23 -0
  203. package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  204. package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +4 -3
  205. package/modern/presets/useSelectWithLoading/hook.js +1 -1
  206. package/modern/presets/useSelectWithLoading/index.css +2 -2
  207. package/modern/responsive.js +4 -3
  208. package/package.json +6 -6
  209. package/presets/index.d.ts +1 -1
  210. package/presets/index.js +4 -3
  211. package/presets/useLazyLoading/hook.js +2 -2
  212. package/presets/useLazyLoading/index.css +2 -2
  213. package/presets/useSelectWithApply/hook.js +4 -3
  214. package/presets/useSelectWithApply/options-list-with-apply/Component.js +4 -3
  215. package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  216. package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -12
  217. package/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
  218. package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +24 -0
  219. package/presets/useSelectWithApply/options-list-with-apply/header/index.css +23 -0
  220. package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  221. package/presets/useSelectWithApply/options-list-with-apply/index.js +4 -3
  222. package/presets/useSelectWithLoading/hook.js +1 -1
  223. package/presets/useSelectWithLoading/index.css +2 -2
  224. package/responsive.js +4 -3
  225. /package/esm/{getDataTestId-d8d91b2e.d.ts → getDataTestId-416fe68c.d.ts} +0 -0
  226. /package/esm/{getDataTestId-d8d91b2e.js → getDataTestId-416fe68c.js} +0 -0
  227. /package/esm/{intersection-observer-210062db.d.ts → intersection-observer-71fc11ef.d.ts} +0 -0
  228. /package/esm/{intersection-observer-210062db.js → intersection-observer-71fc11ef.js} +0 -0
  229. /package/{getDataTestId-d8391785.d.ts → getDataTestId-e8d9eb23.d.ts} +0 -0
  230. /package/{getDataTestId-d8391785.js → getDataTestId-e8d9eb23.js} +0 -0
  231. /package/{intersection-observer-131fbe35.d.ts → intersection-observer-c227d471.d.ts} +0 -0
  232. /package/{intersection-observer-131fbe35.js → intersection-observer-c227d471.js} +0 -0
  233. /package/modern/{getDataTestId-b301a7a9.d.ts → getDataTestId-03736ddc.d.ts} +0 -0
  234. /package/modern/{getDataTestId-b301a7a9.js → getDataTestId-03736ddc.js} +0 -0
  235. /package/modern/{intersection-observer-210062db.d.ts → intersection-observer-71fc11ef.d.ts} +0 -0
  236. /package/modern/{intersection-observer-210062db.js → intersection-observer-71fc11ef.js} +0 -0
@@ -1,4 +1,4 @@
1
- /* hash: f0x7j */
1
+ /* hash: 1541y */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-secondary: #e9e9eb;
@@ -29,28 +29,28 @@
29
29
  /* checkmark */
30
30
 
31
31
  /* optgroup */
32
- } .select__optionsList_8upsm {
32
+ } .select__optionsList_1iyoz {
33
33
  width: 100%;
34
34
  outline: none;
35
35
  box-sizing: border-box;
36
36
  position: relative;
37
- } .select__optionsListHeader_8upsm {
37
+ } .select__optionsListHeader_1iyoz {
38
38
  box-sizing: border-box;
39
39
  border-bottom: 1px solid var(--color-light-border-secondary);
40
- } .select__optionsListFooter_8upsm {
40
+ } .select__optionsListFooter_1iyoz {
41
41
  position: sticky;
42
42
  bottom: 0;
43
43
  box-sizing: border-box;
44
44
  border-top: 1px solid transparent
45
- } .select__optionsListFooter_8upsm.select__withBorder_8upsm {
45
+ } .select__optionsListFooter_1iyoz.select__withBorder_1iyoz {
46
46
  border-top: 1px solid var(--color-light-border-secondary);
47
- } .select__scrollable_8upsm {
47
+ } .select__scrollable_1iyoz {
48
48
  overflow: auto;
49
49
  width: 100%;
50
- } .select__emptyPlaceholder_8upsm {
50
+ } .select__emptyPlaceholder_1iyoz {
51
51
  padding: var(--gap-m) var(--gap-s);
52
52
  color: var(--select-options-list-empty-placeholder-color);
53
- } .select__l_8upsm .select__emptyPlaceholder_8upsm,
54
- .select__xl_8upsm .select__emptyPlaceholder_8upsm {
53
+ } .select__l_1iyoz .select__emptyPlaceholder_1iyoz,
54
+ .select__xl_1iyoz .select__emptyPlaceholder_1iyoz {
55
55
  padding: var(--gap-xl) var(--gap-m);
56
56
  }
@@ -4,7 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('tslib');
6
6
  require('react');
7
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-00c64376.js');
7
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-3eb05f44.js');
8
+ require('../../presets/useSelectWithApply/options-list-with-apply/header/Component.js');
8
9
  require('../arrow/Component.js');
9
10
  require('../base-select-mobile/Component.js');
10
11
  require('../base-select-mobile/footer/Component.js');
@@ -21,7 +22,7 @@ require('classnames');
21
22
  require('downshift');
22
23
  require('@alfalab/core-components-popover');
23
24
  require('@alfalab/hooks');
24
- require('../../getDataTestId-d8391785.js');
25
+ require('../../getDataTestId-e8d9eb23.js');
25
26
  require('../../utils.js');
26
27
  require('../native-select/Component.js');
27
28
  require('@alfalab/icons-glyph/ChevronDownMIcon');
@@ -35,7 +36,7 @@ require('../checkmark-mobile/Component.js');
35
36
  require('@alfalab/core-components-scrollbar');
36
37
  require('../../consts.js');
37
38
  require('@alfalab/core-components-skeleton');
38
- require('../../intersection-observer-131fbe35.js');
39
+ require('../../intersection-observer-c227d471.js');
39
40
  require('../../presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
40
41
  require('@alfalab/core-components-button');
41
42
  require('@alfalab/core-components-bottom-sheet');
@@ -1 +1 @@
1
- export * from "../../Component-00c64376";
1
+ export * from "../../Component-3eb05f44";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-00c64376.js');
5
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-3eb05f44.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('../../Component.js');
@@ -15,7 +15,7 @@ require('@juggle/resize-observer');
15
15
  require('downshift');
16
16
  require('@alfalab/core-components-popover');
17
17
  require('@alfalab/hooks');
18
- require('../../getDataTestId-d8391785.js');
18
+ require('../../getDataTestId-e8d9eb23.js');
19
19
  require('../../utils.js');
20
20
  require('../native-select/Component.js');
21
21
  require('../field/Component.js');
@@ -31,6 +31,7 @@ require('../checkmark-mobile/Component.js');
31
31
  require('../options-list/Component.js');
32
32
  require('@alfalab/core-components-scrollbar');
33
33
  require('../../consts.js');
34
+ require('../../presets/useSelectWithApply/options-list-with-apply/header/Component.js');
34
35
  require('../base-select-mobile/Component.js');
35
36
  require('@alfalab/core-components-bottom-sheet');
36
37
  require('@alfalab/core-components-modal/mobile');
@@ -40,7 +41,7 @@ require('@alfalab/core-components-button');
40
41
  require('../virtual-options-list/Component.js');
41
42
  require('react-virtual');
42
43
  require('@alfalab/core-components-skeleton');
43
- require('../../intersection-observer-131fbe35.js');
44
+ require('../../intersection-observer-c227d471.js');
44
45
  require('../../presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
45
46
 
46
47
 
@@ -4,7 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('tslib');
6
6
  require('react');
7
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-00c64376.js');
7
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-3eb05f44.js');
8
+ require('../../presets/useSelectWithApply/options-list-with-apply/header/Component.js');
8
9
  require('../arrow/Component.js');
9
10
  require('../base-select-mobile/Component.js');
10
11
  require('../base-select-mobile/footer/Component.js');
@@ -21,7 +22,7 @@ require('classnames');
21
22
  require('downshift');
22
23
  require('@alfalab/core-components-popover');
23
24
  require('@alfalab/hooks');
24
- require('../../getDataTestId-d8391785.js');
25
+ require('../../getDataTestId-e8d9eb23.js');
25
26
  require('../../utils.js');
26
27
  require('../native-select/Component.js');
27
28
  require('@alfalab/icons-glyph/ChevronDownMIcon');
@@ -35,7 +36,7 @@ require('../checkmark-mobile/Component.js');
35
36
  require('@alfalab/core-components-scrollbar');
36
37
  require('../../consts.js');
37
38
  require('@alfalab/core-components-skeleton');
38
- require('../../intersection-observer-131fbe35.js');
39
+ require('../../intersection-observer-c227d471.js');
39
40
  require('../../presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
40
41
  require('@alfalab/core-components-button');
41
42
  require('@alfalab/core-components-bottom-sheet');
@@ -1 +1 @@
1
- export * from "../../Component-00c64376";
1
+ export * from "../../Component-3eb05f44";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-00c64376.js');
5
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-3eb05f44.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('../../Component.js');
@@ -15,7 +15,7 @@ require('@juggle/resize-observer');
15
15
  require('downshift');
16
16
  require('@alfalab/core-components-popover');
17
17
  require('@alfalab/hooks');
18
- require('../../getDataTestId-d8391785.js');
18
+ require('../../getDataTestId-e8d9eb23.js');
19
19
  require('../../utils.js');
20
20
  require('../native-select/Component.js');
21
21
  require('../field/Component.js');
@@ -31,6 +31,7 @@ require('../checkmark-mobile/Component.js');
31
31
  require('../options-list/Component.js');
32
32
  require('@alfalab/core-components-scrollbar');
33
33
  require('../../consts.js');
34
+ require('../../presets/useSelectWithApply/options-list-with-apply/header/Component.js');
34
35
  require('../base-select-mobile/Component.js');
35
36
  require('@alfalab/core-components-bottom-sheet');
36
37
  require('@alfalab/core-components-modal/mobile');
@@ -40,7 +41,7 @@ require('@alfalab/core-components-button');
40
41
  require('../virtual-options-list/Component.js');
41
42
  require('react-virtual');
42
43
  require('@alfalab/core-components-skeleton');
43
- require('../../intersection-observer-131fbe35.js');
44
+ require('../../intersection-observer-c227d471.js');
44
45
  require('../../presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
45
46
 
46
47
 
@@ -19,16 +19,16 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
19
19
  var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
20
20
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
21
21
 
22
- var styles = {"virtualOptionsList":"select__virtualOptionsList_5cb1o","virtualOptionsListHeader":"select__virtualOptionsListHeader_5cb1o","virtualOptionsListFooter":"select__virtualOptionsListFooter_5cb1o","withBorder":"select__withBorder_5cb1o","scrollable":"select__scrollable_5cb1o","inner":"select__inner_5cb1o","virtualRow":"select__virtualRow_5cb1o","highlighted":"select__highlighted_5cb1o","emptyPlaceholder":"select__emptyPlaceholder_5cb1o","l":"select__l_5cb1o","xl":"select__xl_5cb1o"};
22
+ var styles = {"virtualOptionsList":"select__virtualOptionsList_520i7","virtualOptionsListHeader":"select__virtualOptionsListHeader_520i7","virtualOptionsListFooter":"select__virtualOptionsListFooter_520i7","withBorder":"select__withBorder_520i7","scrollable":"select__scrollable_520i7","inner":"select__inner_520i7","virtualRow":"select__virtualRow_520i7","highlighted":"select__highlighted_520i7","emptyPlaceholder":"select__emptyPlaceholder_520i7","l":"select__l_520i7","xl":"select__xl_520i7"};
23
23
  require('./index.css')
24
24
 
25
25
  var VirtualOptionsList = React.forwardRef(function (_a, ref) {
26
26
  var _b;
27
- var _c = _a.size, size = _c === void 0 ? 's' : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.highlightedIndex, highlightedIndex = _e === void 0 ? -1 : _e, className = _a.className, getOptionProps = _a.getOptionProps, Option = _a.Option, open = _a.open, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.Optgroup, Optgroup = _g === void 0 ? components_optgroup_Component.Optgroup : _g, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _h = _a.visibleOptions, visibleOptions = _h === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _h, header = _a.header, footer = _a.footer, optionsListWidth = _a.optionsListWidth, onScroll = _a.onScroll, nativeScrollbarProp = _a.nativeScrollbar;
27
+ var _c = _a.size, size = _c === void 0 ? 's' : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.highlightedIndex, highlightedIndex = _e === void 0 ? -1 : _e, className = _a.className, getOptionProps = _a.getOptionProps, Option = _a.Option, open = _a.open, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.Optgroup, Optgroup = _g === void 0 ? components_optgroup_Component.Optgroup : _g, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _h = _a.visibleOptions, visibleOptions = _h === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _h, header = _a.header, footer = _a.footer, _j = _a.showFooter, showFooter = _j === void 0 ? true : _j, optionsListWidth = _a.optionsListWidth, onScroll = _a.onScroll, nativeScrollbarProp = _a.nativeScrollbar;
28
28
  var listRef = React.useRef(null);
29
29
  var parentRef = React.useRef(null);
30
30
  var scrollbarRef = React.useRef(null);
31
- var _j = React.useState(0), visibleOptionsInvalidateKey = _j[0], setVisibleOptionsInvalidateKey = _j[1];
31
+ var _k = React.useState(0), visibleOptionsInvalidateKey = _k[0], setVisibleOptionsInvalidateKey = _k[1];
32
32
  var prevHighlightedIndex = utils.usePrevious(highlightedIndex) || -1;
33
33
  var nativeScrollbar = hooks.useMedia([[true, '(max-width: 1023px)']], false)[0];
34
34
  var rowVirtualizer = reactVirtual.useVirtual({
@@ -132,7 +132,7 @@ var VirtualOptionsList = React.forwardRef(function (_a, ref) {
132
132
  header && React__default.default.createElement("div", { className: styles.virtualOptionsListHeader }, header),
133
133
  nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
134
134
  emptyPlaceholder && options.length === 0 && (React__default.default.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder)),
135
- footer && (React__default.default.createElement("div", { className: cn__default.default(styles.virtualOptionsListFooter, (_b = {},
135
+ showFooter && footer && (React__default.default.createElement("div", { className: cn__default.default(styles.virtualOptionsListFooter, (_b = {},
136
136
  _b[styles.withBorder] = visibleOptions && flatOptions.length > visibleOptions,
137
137
  _b)) }, footer))));
138
138
  });
@@ -1,4 +1,4 @@
1
- /* hash: la4a6 */
1
+ /* hash: aezsy */
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_5cb1o {
38
+ } .select__virtualOptionsList_520i7 {
39
39
  width: 100%;
40
40
  outline: none;
41
41
  box-sizing: border-box;
42
42
  position: sticky;
43
- } .select__virtualOptionsListHeader_5cb1o {
43
+ } .select__virtualOptionsListHeader_520i7 {
44
44
  box-sizing: border-box;
45
45
  border-bottom: 1px solid var(--color-light-border-secondary);
46
- } .select__virtualOptionsListFooter_5cb1o {
46
+ } .select__virtualOptionsListFooter_520i7 {
47
47
  position: sticky;
48
48
  bottom: 0;
49
49
  box-sizing: border-box;
50
50
  border-top: 1px solid transparent
51
- } .select__virtualOptionsListFooter_5cb1o.select__withBorder_5cb1o {
51
+ } .select__virtualOptionsListFooter_520i7.select__withBorder_520i7 {
52
52
  border-top: 1px solid var(--color-light-border-secondary);
53
- } .select__scrollable_5cb1o {
53
+ } .select__scrollable_520i7 {
54
54
  position: relative;
55
55
  overflow: auto;
56
56
  width: 100%;
57
- } .select__inner_5cb1o {
57
+ } .select__inner_520i7 {
58
58
  position: relative;
59
59
  width: 100%;
60
- } .select__virtualRow_5cb1o {
60
+ } .select__virtualRow_520i7 {
61
61
  position: absolute;
62
62
  top: 0;
63
63
  left: 0;
64
64
  width: 100%
65
- } .select__virtualRow_5cb1o:before {
65
+ } .select__virtualRow_520i7: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_5cb1o:first-child:before {
75
+ } .select__virtualRow_520i7:first-child:before {
76
76
  display: none;
77
- } .select__highlighted_5cb1o:before,
78
- .select__highlighted_5cb1o + .select__virtualRow_5cb1o:before {
77
+ } .select__highlighted_520i7:before,
78
+ .select__highlighted_520i7 + .select__virtualRow_520i7:before {
79
79
  display: none;
80
- } .select__emptyPlaceholder_5cb1o {
80
+ } .select__emptyPlaceholder_520i7 {
81
81
  padding: var(--gap-m) var(--gap-s);
82
82
  color: var(--select-options-list-empty-placeholder-color);
83
- } .select__l_5cb1o .select__emptyPlaceholder_5cb1o,
84
- .select__xl_5cb1o .select__emptyPlaceholder_5cb1o {
83
+ } .select__l_520i7 .select__emptyPlaceholder_520i7,
84
+ .select__xl_520i7 .select__emptyPlaceholder_520i7 {
85
85
  padding: var(--gap-xl) var(--gap-m);
86
86
  }
@@ -51,7 +51,7 @@ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
51
51
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
52
52
  type TextBaseProps = {
53
53
  /**
54
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
54
+ * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
55
55
  */
56
56
  view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
57
57
  /**
@@ -2,9 +2,11 @@
2
2
  import React from "react";
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "@alfalab/core-components-bottom-sheet";
5
- import { UseSelectWithApplyProps } from "./hook-4b555174";
5
+ import { UseSelectWithApplyProps } from "./hook-b4e70cb0";
6
6
  import { BaseSelectProps, OptionShape, OptionsListProps } from "./typings";
7
7
  import { FooterProps } from "./presets/useSelectWithApply/options-list-with-apply/footer/Component";
8
+ import { HeaderProps } from "./presets/useSelectWithApply/options-list-with-apply/header/Component";
9
+ import { ModalMobile } from "./Component.mobile-b2c0420d";
8
10
  type AdditionalMobileProps = {
9
11
  /**
10
12
  * Футер
@@ -28,6 +30,14 @@ type AdditionalMobileProps = {
28
30
  * Показывать пункт "Выбрать все"
29
31
  */
30
32
  showSelectAll?: UseSelectWithApplyProps["showSelectAll"];
33
+ /**
34
+ * Показывать пункт "Выбрать все" в заголовке списка
35
+ */
36
+ showHeaderWithSelectAll?: UseSelectWithApplyProps["showHeaderWithSelectAll"];
37
+ /**
38
+ * Использовать ли хук useSelectWithApply
39
+ */
40
+ useWithApplyHook?: boolean;
31
41
  };
32
42
  type SelectMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> & AdditionalMobileProps;
33
43
  declare const SelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<unknown>>;
@@ -37,6 +47,9 @@ declare const OptionsListWithApply: React.ForwardRefExoticComponent<OptionsListP
37
47
  selectedDraft?: OptionShape[] | undefined;
38
48
  OptionsList?: React.FC<OptionsListProps & React.RefAttributes<HTMLDivElement>> | undefined;
39
49
  Footer?: React.FC<FooterProps> | undefined;
50
+ Header?: React.FC<HeaderProps> | undefined;
51
+ headerProps?: HeaderProps | undefined;
52
+ showHeaderWithSelectAll?: boolean | undefined;
40
53
  } & React.RefAttributes<HTMLDivElement>>;
41
54
  type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
42
55
  /**
@@ -47,6 +60,23 @@ type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> &
47
60
  * Показывать пункт "Выбрать все"
48
61
  */
49
62
  showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
63
+ /**
64
+ * Дополнительные пропсы шапки модалки
65
+ */
66
+ modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
67
+ /**
68
+ * Дополнительные пропсы модалки
69
+ */
70
+ modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
71
+ /**
72
+ * Дополнительные пропсы футера модалки
73
+ */
74
+ modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
75
+ showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
76
+ /**
77
+ * Использовать ли хук useSelectWithApply
78
+ */
79
+ useWithApplyHook?: boolean;
50
80
  };
51
81
  declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
52
82
  /**
@@ -57,5 +87,22 @@ declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelect
57
87
  * Показывать пункт "Выбрать все"
58
88
  */
59
89
  showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
90
+ /**
91
+ * Дополнительные пропсы шапки модалки
92
+ */
93
+ modalHeaderProps?: Partial<import("./Component.mobile-b2c0420d").HeaderProps> | undefined;
94
+ /**
95
+ * Дополнительные пропсы модалки
96
+ */
97
+ modalProps?: Partial<import("./Component.mobile-b2c0420d").ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
98
+ /**
99
+ * Дополнительные пропсы футера модалки
100
+ */
101
+ modalFooterProps?: Partial<import("./Component.mobile-b2c0420d").FooterProps> | undefined;
102
+ showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
103
+ /**
104
+ * Использовать ли хук useSelectWithApply
105
+ */
106
+ useWithApplyHook?: boolean | undefined;
60
107
  } & React.RefAttributes<unknown>>;
61
108
  export { AdditionalMobileProps, SelectMobileProps, SelectMobile, OptionsListWithApply, SelectModalMobileProps, SelectModalMobile };
@@ -7,6 +7,7 @@ require('classnames');
7
7
  require('@alfalab/icons-glyph/ChevronDownMIcon');
8
8
  require('./components/arrow/index.module.css');
9
9
  require('./components/base-select/Component.js');
10
+ var presets_useSelectWithApply_optionsListWithApply_header_Component = require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
10
11
  var components_arrow_Component = require('./components/arrow/Component.js');
11
12
  var components_baseSelectMobile_Component = require('./components/base-select-mobile/Component.js');
12
13
  var components_baseSelectMobile_footer_Component = require('./components/base-select-mobile/footer/Component.js');
@@ -41,7 +42,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
41
42
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
42
43
 
43
44
  var OptionsListWithApply = React.forwardRef(function (_a, ref) {
44
- var toggleMenu = _a.toggleMenu, defaultGetOptionProps = _a.getOptionProps, _b = _a.showClear, showClear = _b === void 0 ? true : _b, _c = _a.selectedDraft, selectedDraft = _c === void 0 ? [] : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.OptionsList, OptionsList = _e === void 0 ? components_optionsList_Component.OptionsList : _e, _f = _a.onApply, onApply = _f === void 0 ? function () { return null; } : _f, _g = _a.onClear, onClear = _g === void 0 ? function () { return null; } : _g, _h = _a.onClose, onClose = _h === void 0 ? function () { return null; } : _h, _j = _a.visibleOptions, visibleOptions = _j === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _j, _k = _a.Footer, Footer = _k === void 0 ? presets_useSelectWithApply_optionsListWithApply_footer_Component.Footer : _k, restProps = tslib.__rest(_a, ["toggleMenu", "getOptionProps", "showClear", "selectedDraft", "flatOptions", "OptionsList", "onApply", "onClear", "onClose", "visibleOptions", "Footer"]);
45
+ var toggleMenu = _a.toggleMenu, defaultGetOptionProps = _a.getOptionProps, _b = _a.showClear, showClear = _b === void 0 ? true : _b, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _c = _a.selectedDraft, selectedDraft = _c === void 0 ? [] : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.OptionsList, OptionsList = _e === void 0 ? components_optionsList_Component.OptionsList : _e, _f = _a.onApply, onApply = _f === void 0 ? function () { return null; } : _f, _g = _a.onClear, onClear = _g === void 0 ? function () { return null; } : _g, _h = _a.onClose, onClose = _h === void 0 ? function () { return null; } : _h, _j = _a.visibleOptions, visibleOptions = _j === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _j, _k = _a.Footer, Footer = _k === void 0 ? presets_useSelectWithApply_optionsListWithApply_footer_Component.Footer : _k, _l = _a.Header, Header = _l === void 0 ? presets_useSelectWithApply_optionsListWithApply_header_Component.Header : _l, headerProps = _a.headerProps, restProps = tslib.__rest(_a, ["toggleMenu", "getOptionProps", "showClear", "showHeaderWithSelectAll", "selectedDraft", "flatOptions", "OptionsList", "onApply", "onClear", "onClose", "visibleOptions", "Footer", "Header", "headerProps"]);
45
46
  var getOptionProps = React.useCallback(function (option, index) {
46
47
  var optionProps = defaultGetOptionProps(option, index);
47
48
  var selected = option.key === SELECT_ALL_KEY
@@ -67,32 +68,35 @@ var OptionsListWithApply = React.forwardRef(function (_a, ref) {
67
68
  };
68
69
  // eslint-disable-next-line react-hooks/exhaustive-deps
69
70
  }, []);
70
- return (React__default.default.createElement(OptionsList, tslib.__assign({}, restProps, { ref: ref, visibleOptions: visibleOptions, toggleMenu: toggleMenu, flatOptions: flatOptions, getOptionProps: getOptionProps, onApply: handleApply, onClear: handleClear, footer: React__default.default.createElement(Footer, { handleApply: handleApply, handleClear: handleClear, showClear: showClear, selectedDraft: selectedDraft }) })));
71
+ return (React__default.default.createElement(OptionsList, tslib.__assign({}, restProps, { ref: ref, visibleOptions: visibleOptions, toggleMenu: toggleMenu, flatOptions: flatOptions, getOptionProps: getOptionProps, onApply: handleApply, onClear: handleClear, header: showHeaderWithSelectAll ? React__default.default.createElement(Header, tslib.__assign({}, headerProps)) : undefined, footer: React__default.default.createElement(Footer, { handleApply: handleApply, handleClear: handleClear, showClear: showClear, selectedDraft: selectedDraft }) })));
71
72
  });
72
73
 
73
74
  var SELECT_ALL_KEY = 'select_all';
74
75
  var selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
75
76
  function useSelectWithApply(_a) {
76
- var options = _a.options, selected = _a.selected, _b = _a.onChange, onChange = _b === void 0 ? function () { return null; } : _b, OptionsList = _a.OptionsList, _c = _a.optionsListProps, optionsListProps = _c === void 0 ? {} : _c, _d = _a.showClear, showClear = _d === void 0 ? true : _d, _e = _a.showSelectAll, showSelectAll = _e === void 0 ? false : _e;
77
- var _f = React.useMemo(function () { return utils.processOptions(options, selected); }, [options, selected]), flatOptions = _f.flatOptions, selectedOptions = _f.selectedOptions;
78
- var _g = React.useState(selectedOptions), selectedDraft = _g[0], setSelectedDraft = _g[1];
77
+ var options = _a.options, selected = _a.selected, _b = _a.onChange, onChange = _b === void 0 ? function () { return null; } : _b, OptionsList = _a.OptionsList, _c = _a.optionsListProps, optionsListProps = _c === void 0 ? {} : _c, _d = _a.showClear, showClear = _d === void 0 ? true : _d, _e = _a.showSelectAll, showSelectAll = _e === void 0 ? false : _e, _f = _a.showHeaderWithSelectAll, showHeaderWithSelectAll = _f === void 0 ? false : _f;
78
+ var _g = React.useMemo(function () { return utils.processOptions(options, selected); }, [options, selected]), flatOptions = _g.flatOptions, selectedOptions = _g.selectedOptions;
79
+ var _h = React.useState(selectedOptions), selectedDraft = _h[0], setSelectedDraft = _h[1];
79
80
  var selectedOptionsRef = React.useRef(selectedOptions);
80
- var handleApply = React.useCallback(function () {
81
+ var handleApply = function () {
81
82
  onChange({
82
83
  selected: selectedDraft[0],
83
84
  selectedMultiple: selectedDraft,
84
85
  initiator: null,
85
86
  });
86
- }, [onChange, selectedDraft]);
87
- var handleClear = React.useCallback(function () {
87
+ };
88
+ var handleClear = function () {
88
89
  setSelectedDraft([]);
89
90
  onChange({
90
91
  selected: null,
91
92
  selectedMultiple: [],
92
93
  initiator: null,
93
94
  });
94
- }, [onChange]);
95
- var handleChange = React.useCallback(function (_a) {
95
+ };
96
+ var handleToggleAll = function () {
97
+ setSelectedDraft(flatOptions.length === selectedDraft.length ? [] : flatOptions);
98
+ };
99
+ var handleChange = function (_a) {
96
100
  var initiator = _a.initiator, restArgs = tslib.__rest(_a, ["initiator"]);
97
101
  if (!initiator) {
98
102
  onChange(tslib.__assign({ initiator: null }, restArgs));
@@ -108,10 +112,8 @@ function useSelectWithApply(_a) {
108
112
  ? selectedDraft.filter(function (o) { return o !== initiator; })
109
113
  : selectedDraft.concat(initiator));
110
114
  }
111
- }, [flatOptions, onChange, selectedDraft]);
112
- var handleClose = React.useCallback(function () {
113
- setSelectedDraft(selectedOptionsRef.current);
114
- }, []);
115
+ };
116
+ var handleClose = function () { return setSelectedDraft(selectedOptionsRef.current); };
115
117
  React.useEffect(function () {
116
118
  setSelectedDraft(selectedOptions);
117
119
  selectedOptionsRef.current = selectedOptions;
@@ -119,7 +121,11 @@ function useSelectWithApply(_a) {
119
121
  var memoizedOptions = React.useMemo(function () { return (showSelectAll ? tslib.__spreadArray([selectAllOption], options, true) : options); }, [options, showSelectAll]);
120
122
  return {
121
123
  OptionsList: OptionsListWithApply,
122
- optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { OptionsList: OptionsList, showClear: showClear, onClear: handleClear, onApply: handleApply, onClose: handleClose, selectedDraft: selectedDraft }),
124
+ optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { OptionsList: OptionsList, showClear: showClear, onClear: handleClear, onApply: handleApply, onClose: handleClose, selectedDraft: selectedDraft, showHeaderWithSelectAll: showHeaderWithSelectAll, headerProps: {
125
+ indeterminate: !!selectedDraft.length && selectedDraft.length < flatOptions.length,
126
+ checked: selectedDraft.length === flatOptions.length,
127
+ onChange: handleToggleAll,
128
+ } }),
123
129
  allowUnselect: true,
124
130
  multiple: true,
125
131
  options: memoizedOptions,
@@ -132,7 +138,7 @@ var VIRTUAL_OPTIONS_LIST_THRESHOLD$1 = 30;
132
138
  var SelectMobile = React.forwardRef(function (_a, ref) {
133
139
  var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow = _p === void 0 ? components_arrow_Component.Arrow : _p, _q = _a.Field, Field = _q === void 0 ? components_field_Component.Field : _q, _r = _a.Optgroup, Optgroup = _r === void 0 ? components_optgroup_Component.Optgroup : _r, _s = _a.Option, Option = _s === void 0 ? components_option_Component.Option : _s, selected = _a.selected, options = _a.options, _t = _a.OptionsList, OptionsList = _t === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD$1
134
140
  ? components_virtualOptionsList_Component.VirtualOptionsList
135
- : components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, bottomSheetProps = _a.bottomSheetProps, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "bottomSheetProps", "showClear", "showSelectAll"]);
141
+ : components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, bottomSheetProps = _a.bottomSheetProps, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _v = _a.useWithApplyHook, useWithApplyHook = _v === void 0 ? multiple : _v, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "bottomSheetProps", "showClear", "showSelectAll", "showHeaderWithSelectAll", "useWithApplyHook"]);
136
142
  var applyProps = useSelectWithApply({
137
143
  optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { Footer: components_baseSelectMobile_footer_Component.Footer }),
138
144
  OptionsList: OptionsList,
@@ -142,14 +148,14 @@ var SelectMobile = React.forwardRef(function (_a, ref) {
142
148
  showClear: showClear,
143
149
  showSelectAll: showSelectAll,
144
150
  });
145
- return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, bottomSheetProps: bottomSheetProps, optionsListProps: optionsListProps }, restProps, (multiple && !(bottomSheetProps === null || bottomSheetProps === void 0 ? void 0 : bottomSheetProps.actionButton) && applyProps))));
151
+ return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, bottomSheetProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, bottomSheetProps), optionsListProps: optionsListProps }, restProps, (useWithApplyHook && applyProps))));
146
152
  });
147
153
 
148
154
  var VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
149
155
  var SelectModalMobile = React.forwardRef(function (_a, ref) {
150
156
  var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow = _p === void 0 ? components_arrow_Component.Arrow : _p, _q = _a.Field, Field = _q === void 0 ? components_field_Component.Field : _q, _r = _a.Optgroup, Optgroup = _r === void 0 ? components_optgroup_Component.Optgroup : _r, _s = _a.Option, Option = _s === void 0 ? components_option_Component.Option : _s, selected = _a.selected, options = _a.options, _t = _a.OptionsList, OptionsList = _t === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD
151
157
  ? components_virtualOptionsList_Component.VirtualOptionsList
152
- : components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "showClear", "showSelectAll"]);
158
+ : components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, _v = _a.useWithApplyHook, useWithApplyHook = _v === void 0 ? multiple : _v, modalHeaderProps = _a.modalHeaderProps, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "showClear", "showSelectAll", "useWithApplyHook", "modalHeaderProps", "showHeaderWithSelectAll"]);
153
159
  var applyProps = useSelectWithApply({
154
160
  optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { Footer: components_baseSelectMobile_footer_Component.Footer }),
155
161
  OptionsList: OptionsList,
@@ -159,7 +165,7 @@ var SelectModalMobile = React.forwardRef(function (_a, ref) {
159
165
  showClear: showClear,
160
166
  showSelectAll: showSelectAll,
161
167
  });
162
- return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, optionsListProps: optionsListProps }, restProps, (multiple && applyProps))));
168
+ return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, optionsListProps: optionsListProps, modalHeaderProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, modalHeaderProps) }, restProps, (useWithApplyHook && applyProps))));
163
169
  });
164
170
 
165
171
  exports.OptionsListWithApply = OptionsListWithApply;
@@ -0,0 +1,93 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC, ReactNode } from "react";
4
+ import { NavigationBarProps } from "./types-ebda875c";
5
+ import { BaseModalProps, BaseModalContext } from "@alfalab/core-components-base-modal";
6
+ type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
7
+ declare const Header: FC<HeaderProps>;
8
+ type ModalDesktopProps = BaseModalProps & {
9
+ /**
10
+ * Ширина модального окна
11
+ * @default "m"
12
+ */
13
+ size?: "s" | "m" | "l" | "xl" | "fullscreen";
14
+ /**
15
+ * Растягивает модальное окно на весь экран
16
+ * @deprecated Используйте размер fullscreen
17
+ */
18
+ fullscreen?: boolean;
19
+ /**
20
+ * Фиксирует позицию модального окна после открытия,
21
+ * предотвращая скачки, если контент внутри будет меняться
22
+ */
23
+ fixedPosition?: boolean;
24
+ /**
25
+ * Управление наличием закрывающего крестика
26
+ * @default false
27
+ */
28
+ hasCloser?: boolean;
29
+ };
30
+ type ModalMobileProps = Omit<ModalDesktopProps, "size" | "fixedPosition" | "fullscreen">;
31
+ type View = "desktop" | "mobile";
32
+ type TResponsiveModalContext = {
33
+ view: View;
34
+ size: NonNullable<ModalDesktopProps["size"]>;
35
+ };
36
+ type ContentProps = {
37
+ /**
38
+ * Контент
39
+ */
40
+ children?: ReactNode;
41
+ /**
42
+ * Дополнительный класс
43
+ */
44
+ className?: string;
45
+ /**
46
+ * Растягивает контент на всю высоту
47
+ */
48
+ flex?: boolean;
49
+ };
50
+ declare const Content: FC<ContentProps>;
51
+ type FooterProps = {
52
+ /**
53
+ * Контент футера
54
+ */
55
+ children?: ReactNode;
56
+ /**
57
+ * Дополнительный класс
58
+ */
59
+ className?: string;
60
+ /**
61
+ * Фиксирует футер
62
+ */
63
+ sticky?: boolean;
64
+ /**
65
+ * Выравнивание элементов футера
66
+ */
67
+ layout?: "start" | "center" | "space-between" | "column";
68
+ /**
69
+ * Отступы между элементами футера
70
+ */
71
+ gap?: 16 | 24 | 32;
72
+ };
73
+ declare const Footer: FC<FooterProps>;
74
+ declare const Modal: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
75
+ size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
76
+ fullscreen?: boolean | undefined;
77
+ fixedPosition?: boolean | undefined;
78
+ hasCloser?: boolean | undefined;
79
+ } & {
80
+ view: View;
81
+ } & React.RefAttributes<HTMLDivElement>>;
82
+ declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
83
+ declare const ModalContext: import("react").Context<BaseModalContext>;
84
+ declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
85
+ Content: React.FC<ContentProps>;
86
+ Header: React.FC<HeaderProps>;
87
+ Footer: React.FC<FooterProps>;
88
+ Closer: React.FC<CloserProps>;
89
+ };
90
+ export * from "./Component-3885b0d7";
91
+ export * from "./index-ebda875c";
92
+ export type { NavigationBarProps } from "./types-ebda875c";
93
+ export { HeaderProps, Header, Content, FooterProps, Footer, Modal, ResponsiveContext, ModalContext, ModalMobile };
@@ -10,7 +10,7 @@ require('classnames');
10
10
  require('@alfalab/icons-glyph/ChevronDownMIcon');
11
11
  require('./components/arrow/index.module.css');
12
12
  require('./components/base-select/Component.js');
13
- var presets_useSelectWithApply_optionsListWithApply_Component = require('./Component-f86f43e3.js');
13
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('./Component-4727d474.js');
14
14
  require('@alfalab/core-components-form-control/cssm');
15
15
  require('./components/field/index.module.css');
16
16
  require('./components/optgroup/index.module.css');
@@ -39,6 +39,8 @@ require('@alfalab/core-components-popover/cssm');
39
39
  require('./getDataTestId-5c876d98.js');
40
40
  require('./components/native-select/Component.js');
41
41
  require('./components/base-select/index.module.css');
42
+ require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
43
+ require('./presets/useSelectWithApply/options-list-with-apply/header/index.module.css');
42
44
  require('./components/base-select-mobile/Component.js');
43
45
  require('@alfalab/core-components-bottom-sheet/cssm');
44
46
  require('@alfalab/core-components-modal/cssm/mobile');