@alfalab/core-components-select 19.1.10 → 19.2.0-alfasans

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 (257) hide show
  1. package/components/arrow/index.css +4 -4
  2. package/components/arrow/index.module.css.js +1 -1
  3. package/components/base-checkmark/index.css +9 -9
  4. package/components/base-checkmark/index.module.css.js +1 -1
  5. package/components/base-option/index.css +19 -17
  6. package/components/base-option/index.module.css.js +1 -1
  7. package/components/base-select/Component.js +36 -49
  8. package/components/base-select/Component.js.map +1 -1
  9. package/components/base-select/index.css +70 -20
  10. package/components/base-select/index.module.css.js +1 -1
  11. package/components/base-select/index.module.css.js.map +1 -1
  12. package/components/base-select/mobile.css +12 -11
  13. package/components/base-select/mobile.module.css.js +1 -1
  14. package/components/base-select/mobile.module.css.js.map +1 -1
  15. package/components/checkmark/index.css +11 -11
  16. package/components/checkmark/index.module.css.js +1 -1
  17. package/components/checkmark-mobile/index.css +6 -6
  18. package/components/checkmark-mobile/index.module.css.js +1 -1
  19. package/components/clear-button/index.css +4 -4
  20. package/components/clear-button/index.module.css.js +1 -1
  21. package/components/field/index.css +22 -18
  22. package/components/field/index.module.css.js +1 -1
  23. package/components/footer/index.css +4 -4
  24. package/components/footer/index.module.css.js +1 -1
  25. package/components/optgroup/index.css +8 -7
  26. package/components/optgroup/index.module.css.js +1 -1
  27. package/components/option/desktop/index.css +28 -22
  28. package/components/option/desktop/index.module.css.js +1 -1
  29. package/components/option/desktop/index.module.css.js.map +1 -1
  30. package/components/option/mobile/index.css +25 -19
  31. package/components/option/mobile/index.module.css.js +1 -1
  32. package/components/option/mobile/index.module.css.js.map +1 -1
  33. package/components/options-list/Component.d.ts +4 -0
  34. package/components/options-list/Component.js +32 -53
  35. package/components/options-list/Component.js.map +1 -1
  36. package/components/options-list/index.css +13 -33
  37. package/components/options-list/index.module.css.js +1 -1
  38. package/components/options-list/index.module.css.js.map +1 -1
  39. package/components/search/index.css +1 -1
  40. package/components/search/index.module.css.js +1 -1
  41. package/components/virtual-options-list/Component.d.ts +4 -0
  42. package/components/virtual-options-list/Component.js +61 -48
  43. package/components/virtual-options-list/Component.js.map +1 -1
  44. package/cssm/components/base-option/index.module.css +5 -3
  45. package/cssm/components/base-select/Component.js +36 -49
  46. package/cssm/components/base-select/Component.js.map +1 -1
  47. package/cssm/components/base-select/index.module.css +61 -11
  48. package/cssm/components/base-select/mobile.module.css +1 -0
  49. package/cssm/components/field/index.module.css +9 -5
  50. package/cssm/components/optgroup/index.module.css +4 -3
  51. package/cssm/components/option/desktop/index.module.css +9 -3
  52. package/cssm/components/option/mobile/index.module.css +9 -3
  53. package/cssm/components/options-list/Component.d.ts +4 -0
  54. package/cssm/components/options-list/Component.js +32 -53
  55. package/cssm/components/options-list/Component.js.map +1 -1
  56. package/cssm/components/options-list/index.module.css +6 -26
  57. package/cssm/components/virtual-options-list/Component.d.ts +4 -0
  58. package/cssm/components/virtual-options-list/Component.js +61 -48
  59. package/cssm/components/virtual-options-list/Component.js.map +1 -1
  60. package/cssm/presets/useSelectWithApply/hook.d.ts +12 -0
  61. package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +4 -0
  62. package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +0 -5
  63. package/cssm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +9 -6
  64. package/cssm/shared/index.js +0 -1
  65. package/cssm/shared/index.js.map +1 -1
  66. package/cssm/typings.d.ts +21 -1
  67. package/cssm/utils.d.ts +1 -6
  68. package/cssm/utils.js +19 -28
  69. package/cssm/utils.js.map +1 -1
  70. package/esm/components/arrow/index.css +4 -4
  71. package/esm/components/arrow/index.module.css.js +1 -1
  72. package/esm/components/base-checkmark/index.css +9 -9
  73. package/esm/components/base-checkmark/index.module.css.js +1 -1
  74. package/esm/components/base-option/index.css +19 -17
  75. package/esm/components/base-option/index.module.css.js +1 -1
  76. package/esm/components/base-select/Component.js +37 -50
  77. package/esm/components/base-select/Component.js.map +1 -1
  78. package/esm/components/base-select/index.css +70 -20
  79. package/esm/components/base-select/index.module.css.js +1 -1
  80. package/esm/components/base-select/index.module.css.js.map +1 -1
  81. package/esm/components/base-select/mobile.css +12 -11
  82. package/esm/components/base-select/mobile.module.css.js +1 -1
  83. package/esm/components/base-select/mobile.module.css.js.map +1 -1
  84. package/esm/components/checkmark/index.css +11 -11
  85. package/esm/components/checkmark/index.module.css.js +1 -1
  86. package/esm/components/checkmark-mobile/index.css +6 -6
  87. package/esm/components/checkmark-mobile/index.module.css.js +1 -1
  88. package/esm/components/clear-button/index.css +4 -4
  89. package/esm/components/clear-button/index.module.css.js +1 -1
  90. package/esm/components/field/index.css +22 -18
  91. package/esm/components/field/index.module.css.js +1 -1
  92. package/esm/components/footer/index.css +4 -4
  93. package/esm/components/footer/index.module.css.js +1 -1
  94. package/esm/components/optgroup/index.css +8 -7
  95. package/esm/components/optgroup/index.module.css.js +1 -1
  96. package/esm/components/option/desktop/index.css +28 -22
  97. package/esm/components/option/desktop/index.module.css.js +1 -1
  98. package/esm/components/option/desktop/index.module.css.js.map +1 -1
  99. package/esm/components/option/mobile/index.css +25 -19
  100. package/esm/components/option/mobile/index.module.css.js +1 -1
  101. package/esm/components/option/mobile/index.module.css.js.map +1 -1
  102. package/esm/components/options-list/Component.d.ts +4 -0
  103. package/esm/components/options-list/Component.js +33 -54
  104. package/esm/components/options-list/Component.js.map +1 -1
  105. package/esm/components/options-list/index.css +13 -33
  106. package/esm/components/options-list/index.module.css.js +1 -1
  107. package/esm/components/options-list/index.module.css.js.map +1 -1
  108. package/esm/components/search/index.css +1 -1
  109. package/esm/components/search/index.module.css.js +1 -1
  110. package/esm/components/virtual-options-list/Component.d.ts +4 -0
  111. package/esm/components/virtual-options-list/Component.js +63 -49
  112. package/esm/components/virtual-options-list/Component.js.map +1 -1
  113. package/esm/mobile/modal.mobile.css +1 -1
  114. package/esm/mobile/modal.mobile.module.css.js +1 -1
  115. package/esm/presets/useSelectWithApply/hook.d.ts +12 -0
  116. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +4 -0
  117. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +2 -7
  118. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js +1 -1
  119. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js.map +1 -1
  120. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +12 -9
  121. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js +1 -1
  122. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js.map +1 -1
  123. package/esm/presets/useSelectWithLoading/index.css +1 -1
  124. package/esm/presets/useSelectWithLoading/index.module.css.js +1 -1
  125. package/esm/shared/index.js +1 -1
  126. package/esm/typings.d.ts +21 -1
  127. package/esm/utils.d.ts +1 -6
  128. package/esm/utils.js +21 -29
  129. package/esm/utils.js.map +1 -1
  130. package/mobile/modal.mobile.css +1 -1
  131. package/mobile/modal.mobile.module.css.js +1 -1
  132. package/modern/components/arrow/index.css +4 -4
  133. package/modern/components/arrow/index.module.css.js +1 -1
  134. package/modern/components/base-checkmark/index.css +9 -9
  135. package/modern/components/base-checkmark/index.module.css.js +1 -1
  136. package/modern/components/base-option/index.css +19 -17
  137. package/modern/components/base-option/index.module.css.js +1 -1
  138. package/modern/components/base-select/Component.js +34 -47
  139. package/modern/components/base-select/Component.js.map +1 -1
  140. package/modern/components/base-select/index.css +70 -20
  141. package/modern/components/base-select/index.module.css.js +1 -1
  142. package/modern/components/base-select/index.module.css.js.map +1 -1
  143. package/modern/components/base-select/mobile.css +12 -11
  144. package/modern/components/base-select/mobile.module.css.js +1 -1
  145. package/modern/components/base-select/mobile.module.css.js.map +1 -1
  146. package/modern/components/checkmark/index.css +11 -11
  147. package/modern/components/checkmark/index.module.css.js +1 -1
  148. package/modern/components/checkmark-mobile/index.css +6 -6
  149. package/modern/components/checkmark-mobile/index.module.css.js +1 -1
  150. package/modern/components/clear-button/index.css +4 -4
  151. package/modern/components/clear-button/index.module.css.js +1 -1
  152. package/modern/components/field/index.css +22 -18
  153. package/modern/components/field/index.module.css.js +1 -1
  154. package/modern/components/footer/index.css +4 -4
  155. package/modern/components/footer/index.module.css.js +1 -1
  156. package/modern/components/optgroup/index.css +8 -7
  157. package/modern/components/optgroup/index.module.css.js +1 -1
  158. package/modern/components/option/desktop/index.css +28 -22
  159. package/modern/components/option/desktop/index.module.css.js +1 -1
  160. package/modern/components/option/desktop/index.module.css.js.map +1 -1
  161. package/modern/components/option/mobile/index.css +25 -19
  162. package/modern/components/option/mobile/index.module.css.js +1 -1
  163. package/modern/components/option/mobile/index.module.css.js.map +1 -1
  164. package/modern/components/options-list/Component.d.ts +4 -0
  165. package/modern/components/options-list/Component.js +29 -49
  166. package/modern/components/options-list/Component.js.map +1 -1
  167. package/modern/components/options-list/index.css +13 -33
  168. package/modern/components/options-list/index.module.css.js +1 -1
  169. package/modern/components/options-list/index.module.css.js.map +1 -1
  170. package/modern/components/search/index.css +1 -1
  171. package/modern/components/search/index.module.css.js +1 -1
  172. package/modern/components/virtual-options-list/Component.d.ts +4 -0
  173. package/modern/components/virtual-options-list/Component.js +59 -45
  174. package/modern/components/virtual-options-list/Component.js.map +1 -1
  175. package/modern/mobile/modal.mobile.css +1 -1
  176. package/modern/mobile/modal.mobile.module.css.js +1 -1
  177. package/modern/presets/useSelectWithApply/hook.d.ts +12 -0
  178. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +4 -0
  179. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +2 -7
  180. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js +1 -1
  181. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js.map +1 -1
  182. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +12 -9
  183. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js +1 -1
  184. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js.map +1 -1
  185. package/modern/presets/useSelectWithLoading/index.css +1 -1
  186. package/modern/presets/useSelectWithLoading/index.module.css.js +1 -1
  187. package/modern/shared/index.js +1 -1
  188. package/modern/typings.d.ts +21 -1
  189. package/modern/utils.d.ts +1 -6
  190. package/modern/utils.js +21 -29
  191. package/modern/utils.js.map +1 -1
  192. package/moderncssm/components/base-option/index.module.css +2 -1
  193. package/moderncssm/components/base-select/Component.js +34 -47
  194. package/moderncssm/components/base-select/Component.js.map +1 -1
  195. package/moderncssm/components/base-select/index.module.css +67 -9
  196. package/moderncssm/components/base-select/mobile.module.css +1 -0
  197. package/moderncssm/components/field/index.module.css +6 -3
  198. package/moderncssm/components/optgroup/index.module.css +1 -1
  199. package/moderncssm/components/option/desktop/index.module.css +5 -1
  200. package/moderncssm/components/option/mobile/index.module.css +5 -1
  201. package/moderncssm/components/options-list/Component.d.ts +4 -0
  202. package/moderncssm/components/options-list/Component.js +29 -49
  203. package/moderncssm/components/options-list/Component.js.map +1 -1
  204. package/moderncssm/components/options-list/index.module.css +7 -32
  205. package/moderncssm/components/virtual-options-list/Component.d.ts +4 -0
  206. package/moderncssm/components/virtual-options-list/Component.js +59 -45
  207. package/moderncssm/components/virtual-options-list/Component.js.map +1 -1
  208. package/moderncssm/presets/useSelectWithApply/hook.d.ts +12 -0
  209. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +4 -0
  210. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +0 -4
  211. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +8 -6
  212. package/moderncssm/shared/index.js +1 -1
  213. package/moderncssm/typings.d.ts +21 -1
  214. package/moderncssm/utils.d.ts +1 -6
  215. package/moderncssm/utils.js +21 -29
  216. package/moderncssm/utils.js.map +1 -1
  217. package/package.json +15 -16
  218. package/presets/useSelectWithApply/hook.d.ts +12 -0
  219. package/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +4 -0
  220. package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +2 -7
  221. package/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js +1 -1
  222. package/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js.map +1 -1
  223. package/presets/useSelectWithApply/options-list-with-apply/header/index.css +12 -9
  224. package/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js +1 -1
  225. package/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js.map +1 -1
  226. package/presets/useSelectWithLoading/index.css +1 -1
  227. package/presets/useSelectWithLoading/index.module.css.js +1 -1
  228. package/shared/index.js +0 -1
  229. package/shared/index.js.map +1 -1
  230. package/src/components/base-select/Component.tsx +41 -55
  231. package/src/components/base-select/index.module.css +60 -8
  232. package/src/components/base-select/mobile.module.css +1 -0
  233. package/src/components/option/index.module.css +4 -0
  234. package/src/components/options-list/Component.tsx +54 -97
  235. package/src/components/options-list/index.module.css +7 -31
  236. package/src/components/virtual-options-list/Component.tsx +95 -72
  237. package/src/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +0 -4
  238. package/src/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +4 -4
  239. package/src/typings.ts +26 -0
  240. package/src/utils.ts +30 -34
  241. package/src/vars.css +3 -0
  242. package/typings.d.ts +21 -1
  243. package/utils.d.ts +1 -6
  244. package/utils.js +19 -28
  245. package/utils.js.map +1 -1
  246. package/components/virtual-options-list/index.css +0 -83
  247. package/components/virtual-options-list/index.module.css.js +0 -8
  248. package/components/virtual-options-list/index.module.css.js.map +0 -1
  249. package/cssm/components/virtual-options-list/index.module.css +0 -83
  250. package/esm/components/virtual-options-list/index.css +0 -83
  251. package/esm/components/virtual-options-list/index.module.css.js +0 -6
  252. package/esm/components/virtual-options-list/index.module.css.js.map +0 -1
  253. package/modern/components/virtual-options-list/index.css +0 -83
  254. package/modern/components/virtual-options-list/index.module.css.js +0 -6
  255. package/modern/components/virtual-options-list/index.module.css.js.map +0 -1
  256. package/moderncssm/components/virtual-options-list/index.module.css +0 -81
  257. package/src/components/virtual-options-list/index.module.css +0 -77
@@ -6,16 +6,16 @@
6
6
  :root {
7
7
  --input-error-icon-display: none;
8
8
  }
9
- .select__clearIcon_weo53 {
9
+ .select__clearIcon_1gmjh {
10
10
  display: block;
11
11
  color: var(--color-light-neutral-translucent-500);
12
12
  }
13
- .select__clearIcon_weo53:hover {
13
+ .select__clearIcon_1gmjh:hover {
14
14
  color: var(--color-light-neutral-translucent-500-hover);
15
15
  }
16
- .select__clearIcon_weo53:active {
16
+ .select__clearIcon_1gmjh:active {
17
17
  color: var(--color-light-neutral-translucent-500-press);
18
18
  }
19
- .select__clearButton_weo53 + [data-addon='error-icon'] {
19
+ .select__clearButton_1gmjh + [data-addon='error-icon'] {
20
20
  display: var(--input-error-icon-display);
21
21
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"clearIcon":"select__clearIcon_weo53","clearButton":"select__clearButton_weo53"};
3
+ const styles = {"clearIcon":"select__clearIcon_1gmjh","clearButton":"select__clearButton_1gmjh"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -4,8 +4,9 @@
4
4
  --color-light-text-tertiary: rgba(5, 8, 29, 0.38);
5
5
  }
6
6
  :root {
7
- --font-family-system:
8
- system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
7
+ --font-family-alfasans:
8
+ 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
9
+ Helvetica, sans-serif;
9
10
  }
10
11
  :root {
11
12
  --focus-color: var(--color-light-status-info);
@@ -18,60 +19,63 @@
18
19
  :root {
19
20
  --select-arrow-hover-opacity: 0.7;
20
21
  }
21
- .select__component_1436i {
22
+ .select__component_13vng {
22
23
  width: 100%;
23
24
  outline: none;
24
25
  }
25
- .select__field_1436i:not(.select__disabled_1436i) {
26
+ .select__field_13vng:not(.select__disabled_13vng) {
26
27
  cursor: pointer;
27
28
  }
28
- .select__field_1436i:not(.select__disabled_1436i):hover .select__arrow_1436i {
29
+ .select__field_13vng:not(.select__disabled_13vng):hover .select__arrow_13vng {
29
30
  opacity: var(--select-arrow-hover-opacity);
30
31
  }
31
- .select__disabled_1436i {
32
+ .select__disabled_13vng {
32
33
  cursor: var(--disabled-cursor);
33
34
  }
34
- .select__placeholder_1436i {
35
+ .select__placeholder_13vng {
35
36
  color: var(--input-placeholder-color);
36
37
  transition: color 0.2s ease;
37
- animation: select__show-placeholder_1436i 0.2s ease;
38
+ animation: select__show-placeholder_13vng 0.2s ease;
38
39
  }
39
- .select__placeholder_1436i.select__focused_1436i {
40
+ .select__placeholder_13vng.select__focused_13vng {
40
41
  color: var(--input-focus-placeholder-color);
41
42
  }
42
- .select__contentWrapper_1436i {
43
+ .select__contentWrapper_13vng {
43
44
  font-size: 16px;
44
45
  line-height: 20px;
45
46
  font-weight: 400;
46
- font-family: var(--font-family-system);
47
+ letter-spacing: -0.24px;
48
+ font-family: var(--font-family-alfasans);
47
49
 
48
50
  white-space: nowrap;
49
51
  text-overflow: ellipsis;
50
52
  overflow: hidden;
51
53
  width: 100%;
52
54
  }
53
- .select__contentWrapper_1436i.select__size-40_1436i {
55
+ .select__contentWrapper_13vng.select__size-40_13vng {
54
56
  font-size: 14px;
55
57
  line-height: 18px;
56
58
  font-weight: 400;
57
- font-family: var(--font-family-system);
59
+ letter-spacing: -0.08px;
60
+ font-family: var(--font-family-alfasans);
58
61
  }
59
- .select__value_1436i {
62
+ .select__value_13vng {
60
63
  overflow: hidden;
61
64
  text-overflow: ellipsis;
62
65
  text-align: left;
63
66
  }
64
- .select__value_1436i.select__size-40_1436i {
67
+ .select__value_13vng.select__size-40_13vng {
65
68
  font-size: 14px;
66
69
  line-height: 18px;
67
70
  font-weight: 400;
68
- font-family: var(--font-family-system);
71
+ letter-spacing: -0.08px;
72
+ font-family: var(--font-family-alfasans);
69
73
  }
70
- .select__focusVisible_1436i {
74
+ .select__focusVisible_13vng {
71
75
  outline: 2px solid var(--focus-color);
72
76
  outline-offset: 2px;
73
77
  }
74
- @keyframes select__show-placeholder_1436i {
78
+ @keyframes select__show-placeholder_13vng {
75
79
  from {
76
80
  opacity: 0;
77
81
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"select__component_1436i","field":"select__field_1436i","disabled":"select__disabled_1436i","arrow":"select__arrow_1436i","placeholder":"select__placeholder_1436i","show-placeholder":"select__show-placeholder_1436i","focused":"select__focused_1436i","contentWrapper":"select__contentWrapper_1436i","size-40":"select__size-40_1436i","value":"select__value_1436i","focusVisible":"select__focusVisible_1436i"};
3
+ const styles = {"component":"select__component_13vng","field":"select__field_13vng","disabled":"select__disabled_13vng","arrow":"select__arrow_13vng","placeholder":"select__placeholder_13vng","show-placeholder":"select__show-placeholder_13vng","focused":"select__focused_13vng","contentWrapper":"select__contentWrapper_13vng","size-40":"select__size-40_13vng","value":"select__value_13vng","focusVisible":"select__focusVisible_13vng"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -6,20 +6,20 @@
6
6
  --gap-m: 16px;
7
7
  --gap-16: var(--gap-m);
8
8
  }
9
- .select__footer_1p00t {
9
+ .select__footer_h0ez7 {
10
10
  display: flex;
11
11
  box-sizing: border-box;
12
12
  width: 100%;
13
13
  padding: var(--gap-16) var(--gap-16);
14
14
  background-color: var(--color-light-modal-bg-primary);
15
15
  }
16
- .select__footer_1p00t .select__button_1p00t:first-of-type {
16
+ .select__footer_h0ez7 .select__button_h0ez7:first-of-type {
17
17
  margin-right: var(--gap-16);
18
18
  }
19
- .select__button_1p00t {
19
+ .select__button_h0ez7 {
20
20
  width: 50%;
21
21
  }
22
- .select__highlighted_1p00t {
22
+ .select__highlighted_h0ez7 {
23
23
  border-top: 1px solid var(--color-light-neutral-300);
24
24
  background-color: var(--color-light-modal-bg-primary);
25
25
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"footer":"select__footer_1p00t","button":"select__button_1p00t","highlighted":"select__highlighted_1p00t"};
3
+ const styles = {"footer":"select__footer_h0ez7","button":"select__button_h0ez7","highlighted":"select__highlighted_h0ez7"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -11,8 +11,9 @@
11
11
  --gap-16: var(--gap-m);
12
12
  }
13
13
  :root {
14
- --font-family-system:
15
- system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
14
+ --font-family-alfasans:
15
+ 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
16
+ Helvetica, sans-serif;
16
17
  }
17
18
  :root {
18
19
 
@@ -23,7 +24,7 @@
23
24
  --select-optgroup-l-left-padding: var(--gap-16);
24
25
  --select-optgroup-l-right-padding: var(--gap-16);
25
26
  }
26
- .select__optgroup_9oduw {
27
+ .select__optgroup_afu48 {
27
28
  position: relative;
28
29
  display: flex;
29
30
  align-items: center;
@@ -33,21 +34,21 @@
33
34
  background: var(--select-optgroup-background);
34
35
  min-height: 40px;
35
36
  }
36
- .select__optgroup_9oduw + *[role='option']:before {
37
+ .select__optgroup_afu48 + *[role='option']:before {
37
38
  display: none;
38
39
  }
39
- .select__label_9oduw {
40
+ .select__label_afu48 {
40
41
  font-size: 12px;
41
42
  line-height: 16px;
42
43
  font-weight: 400;
43
44
  letter-spacing: 1.25px;
44
45
  text-transform: uppercase;
45
- font-family: var(--font-family-system);
46
+ font-family: var(--font-family-alfasans);
46
47
 
47
48
  display: block;
48
49
  color: var(--select-optgroup-color);
49
50
  }
50
- .select__size-72_9oduw {
51
+ .select__size-72_afu48 {
51
52
  padding-left: var(--select-optgroup-l-left-padding);
52
53
  padding-right: var(--select-optgroup-l-right-padding);
53
54
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"optgroup":"select__optgroup_9oduw","label":"select__label_9oduw","size-72":"select__size-72_9oduw"};
3
+ const styles = {"optgroup":"select__optgroup_afu48","label":"select__label_afu48","size-72":"select__size-72_afu48"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -14,11 +14,13 @@
14
14
  --gap-16: var(--gap-m);
15
15
  }
16
16
  :root {
17
- --font-family-system:
18
- system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
17
+ --font-family-alfasans:
18
+ 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
19
+ Helvetica, sans-serif;
19
20
  }
20
21
  :root {
21
22
  --disabled-cursor: not-allowed;
23
+ --size-xs-height: 40px;
22
24
  --size-s-height: 48px;
23
25
  --size-m-height: 56px;
24
26
  --size-l-height: 64px;
@@ -43,11 +45,12 @@
43
45
  --select-option-active-color: var(--color-light-text-primary);
44
46
  --select-option-disabled-color: var(--color-light-text-secondary);
45
47
  }
46
- .select__option_4b4g6 {
48
+ .select__option_1tsbu {
47
49
  font-size: 16px;
48
50
  line-height: 20px;
49
51
  font-weight: 400;
50
- font-family: var(--font-family-system);
52
+ letter-spacing: -0.24px;
53
+ font-family: var(--font-family-alfasans);
51
54
 
52
55
  display: flex;
53
56
  align-items: center;
@@ -60,11 +63,11 @@
60
63
  position: relative;
61
64
  cursor: pointer;
62
65
  }
63
- .select__option_4b4g6:not(.select__disabled_4b4g6):active {
66
+ .select__option_1tsbu:not(.select__disabled_1tsbu):active {
64
67
  background: var(--select-option-active-background);
65
68
  color: var(--select-option-active-color);
66
69
  }
67
- .select__option_4b4g6:before {
70
+ .select__option_1tsbu:before {
68
71
  content: '';
69
72
  position: absolute;
70
73
  left: var(--select-option-left-padding);
@@ -75,59 +78,62 @@
75
78
  display: var(--select-option-divider-display);
76
79
  transition: opacity 0.2s ease;
77
80
  }
78
- .select__option_4b4g6:first-child:before {
81
+ .select__option_1tsbu:first-child:before {
79
82
  display: none;
80
83
  }
81
- .select__size-48_4b4g6 {
84
+ .select__size-40_1tsbu {
85
+ min-height: var(--size-xs-height);
86
+ }
87
+ .select__size-48_1tsbu {
82
88
  min-height: var(--size-s-height);
83
89
  }
84
- .select__size-56_4b4g6 {
90
+ .select__size-56_1tsbu {
85
91
  min-height: var(--size-m-height);
86
92
  }
87
- .select__size-64_4b4g6 {
93
+ .select__size-64_1tsbu {
88
94
  min-height: var(--size-l-height);
89
95
  }
90
- .select__size-72_4b4g6 {
96
+ .select__size-72_1tsbu {
91
97
  min-height: var(--size-xl-height);
92
98
  padding-left: var(--select-option-l-left-padding);
93
99
  padding-right: var(--select-option-l-right-padding);
94
100
  }
95
- .select__size-72_4b4g6:before {
101
+ .select__size-72_1tsbu:before {
96
102
  left: var(--select-option-l-left-padding);
97
103
  right: var(--select-option-l-right-padding);
98
104
  }
99
- .select__selected_4b4g6 {
105
+ .select__selected_1tsbu {
100
106
  background: var(--select-option-selected-background);
101
107
  color: var(--select-option-selected-color);
102
108
  cursor: default;
103
109
  }
104
- .select__highlighted_4b4g6 {
110
+ .select__highlighted_1tsbu {
105
111
  background: var(--select-option-hover-background);
106
112
  color: var(--select-option-hover-color);
107
113
  }
108
- .select__highlighted_4b4g6:before,
109
- .select__highlighted_4b4g6 + .select__option_4b4g6:before {
114
+ .select__highlighted_1tsbu:before,
115
+ .select__highlighted_1tsbu + .select__option_1tsbu:before {
110
116
  opacity: 0;
111
117
  }
112
- .select__disabled_4b4g6 {
118
+ .select__disabled_1tsbu {
113
119
  cursor: var(--disabled-cursor);
114
120
  background: var(--select-option-disabled-background);
115
121
  color: var(--select-option-disabled-color);
116
122
  }
117
- .select__content_4b4g6 {
123
+ .select__content_1tsbu {
118
124
  overflow: hidden;
119
125
  flex: 1;
120
126
  text-overflow: ellipsis;
121
127
  }
122
- .select__textContent_4b4g6 {
128
+ .select__textContent_1tsbu {
123
129
  padding-top: var(--gap-12);
124
130
  padding-bottom: var(--gap-12);
125
131
  }
126
- .select__highlighted_4b4g6 {
132
+ .select__highlighted_1tsbu {
127
133
  background: var(--select-option-hover-background);
128
134
  color: var(--select-option-hover-color);
129
135
  }
130
- .select__highlighted_4b4g6:before,
131
- .select__highlighted_4b4g6 + .select__option_4b4g6:before {
136
+ .select__highlighted_1tsbu:before,
137
+ .select__highlighted_1tsbu + .select__option_1tsbu:before {
132
138
  opacity: 0;
133
139
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"option":"select__option_4b4g6","disabled":"select__disabled_4b4g6","size-48":"select__size-48_4b4g6","size-56":"select__size-56_4b4g6","size-64":"select__size-64_4b4g6","size-72":"select__size-72_4b4g6","selected":"select__selected_4b4g6","highlighted":"select__highlighted_4b4g6","content":"select__content_4b4g6","textContent":"select__textContent_4b4g6"};
3
+ const styles = {"option":"select__option_1tsbu","disabled":"select__disabled_1tsbu","size-40":"select__size-40_1tsbu","size-48":"select__size-48_1tsbu","size-56":"select__size-56_1tsbu","size-64":"select__size-64_1tsbu","size-72":"select__size-72_1tsbu","selected":"select__selected_1tsbu","highlighted":"select__highlighted_1tsbu","content":"select__content_1tsbu","textContent":"select__textContent_1tsbu"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../../src/components/option/desktop/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../../../vars.css';\n@import '../index.module.css';\n\n.highlighted {\n background: var(--select-option-hover-background);\n color: var(--select-option-hover-color);\n\n &:before,\n & + .option:before {\n opacity: 0;\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,CAAC,wBAAwB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,wBAAwB,CAAC,aAAa,CAAC,2BAA2B,CAAC,SAAS,CAAC,uBAAuB,CAAC,aAAa,CAAC,2BAA2B,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../../src/components/option/desktop/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../../../vars.css';\n@import '../index.module.css';\n\n.highlighted {\n background: var(--select-option-hover-background);\n color: var(--select-option-hover-color);\n\n &:before,\n & + .option:before {\n opacity: 0;\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,CAAC,wBAAwB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,wBAAwB,CAAC,aAAa,CAAC,2BAA2B,CAAC,SAAS,CAAC,uBAAuB,CAAC,aAAa,CAAC,2BAA2B,CAAC;;;;"}
@@ -14,11 +14,13 @@
14
14
  --gap-16: var(--gap-m);
15
15
  }
16
16
  :root {
17
- --font-family-system:
18
- system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
17
+ --font-family-alfasans:
18
+ 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
19
+ Helvetica, sans-serif;
19
20
  }
20
21
  :root {
21
22
  --disabled-cursor: not-allowed;
23
+ --size-xs-height: 40px;
22
24
  --size-s-height: 48px;
23
25
  --size-m-height: 56px;
24
26
  --size-l-height: 64px;
@@ -43,11 +45,12 @@
43
45
  --select-option-active-color: var(--color-light-text-primary);
44
46
  --select-option-disabled-color: var(--color-light-text-secondary);
45
47
  }
46
- .select__option_154ac {
48
+ .select__option_yigdd {
47
49
  font-size: 16px;
48
50
  line-height: 20px;
49
51
  font-weight: 400;
50
- font-family: var(--font-family-system);
52
+ letter-spacing: -0.24px;
53
+ font-family: var(--font-family-alfasans);
51
54
 
52
55
  display: flex;
53
56
  align-items: center;
@@ -60,11 +63,11 @@
60
63
  position: relative;
61
64
  cursor: pointer;
62
65
  }
63
- .select__option_154ac:not(.select__disabled_154ac):active {
66
+ .select__option_yigdd:not(.select__disabled_yigdd):active {
64
67
  background: var(--select-option-active-background);
65
68
  color: var(--select-option-active-color);
66
69
  }
67
- .select__option_154ac:before {
70
+ .select__option_yigdd:before {
68
71
  content: '';
69
72
  position: absolute;
70
73
  left: var(--select-option-left-padding);
@@ -75,51 +78,54 @@
75
78
  display: var(--select-option-divider-display);
76
79
  transition: opacity 0.2s ease;
77
80
  }
78
- .select__option_154ac:first-child:before {
81
+ .select__option_yigdd:first-child:before {
79
82
  display: none;
80
83
  }
81
- .select__size-48_154ac {
84
+ .select__size-40_yigdd {
85
+ min-height: var(--size-xs-height);
86
+ }
87
+ .select__size-48_yigdd {
82
88
  min-height: var(--size-s-height);
83
89
  }
84
- .select__size-56_154ac {
90
+ .select__size-56_yigdd {
85
91
  min-height: var(--size-m-height);
86
92
  }
87
- .select__size-64_154ac {
93
+ .select__size-64_yigdd {
88
94
  min-height: var(--size-l-height);
89
95
  }
90
- .select__size-72_154ac {
96
+ .select__size-72_yigdd {
91
97
  min-height: var(--size-xl-height);
92
98
  padding-left: var(--select-option-l-left-padding);
93
99
  padding-right: var(--select-option-l-right-padding);
94
100
  }
95
- .select__size-72_154ac:before {
101
+ .select__size-72_yigdd:before {
96
102
  left: var(--select-option-l-left-padding);
97
103
  right: var(--select-option-l-right-padding);
98
104
  }
99
- .select__selected_154ac {
105
+ .select__selected_yigdd {
100
106
  background: var(--select-option-selected-background);
101
107
  color: var(--select-option-selected-color);
102
108
  cursor: default;
103
109
  }
104
- .select__highlighted_154ac {
110
+ .select__highlighted_yigdd {
105
111
  background: var(--select-option-hover-background);
106
112
  color: var(--select-option-hover-color);
107
113
  }
108
- .select__highlighted_154ac:before,
109
- .select__highlighted_154ac + .select__option_154ac:before {
114
+ .select__highlighted_yigdd:before,
115
+ .select__highlighted_yigdd + .select__option_yigdd:before {
110
116
  opacity: 0;
111
117
  }
112
- .select__disabled_154ac {
118
+ .select__disabled_yigdd {
113
119
  cursor: var(--disabled-cursor);
114
120
  background: var(--select-option-disabled-background);
115
121
  color: var(--select-option-disabled-color);
116
122
  }
117
- .select__content_154ac {
123
+ .select__content_yigdd {
118
124
  overflow: hidden;
119
125
  flex: 1;
120
126
  text-overflow: ellipsis;
121
127
  }
122
- .select__textContent_154ac {
128
+ .select__textContent_yigdd {
123
129
  padding-top: var(--gap-12);
124
130
  padding-bottom: var(--gap-12);
125
131
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"option":"select__option_154ac","disabled":"select__disabled_154ac","size-48":"select__size-48_154ac","size-56":"select__size-56_154ac","size-64":"select__size-64_154ac","size-72":"select__size-72_154ac","selected":"select__selected_154ac","highlighted":"select__highlighted_154ac","content":"select__content_154ac","textContent":"select__textContent_154ac"};
3
+ const styles = {"option":"select__option_yigdd","disabled":"select__disabled_yigdd","size-40":"select__size-40_yigdd","size-48":"select__size-48_yigdd","size-56":"select__size-56_yigdd","size-64":"select__size-64_yigdd","size-72":"select__size-72_yigdd","selected":"select__selected_yigdd","highlighted":"select__highlighted_yigdd","content":"select__content_yigdd","textContent":"select__textContent_yigdd"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../../src/components/option/mobile/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../../../vars.css';\n@import '../index.module.css';\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,CAAC,wBAAwB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,wBAAwB,CAAC,aAAa,CAAC,2BAA2B,CAAC,SAAS,CAAC,uBAAuB,CAAC,aAAa,CAAC,2BAA2B,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../../src/components/option/mobile/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../../../vars.css';\n@import '../index.module.css';\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,QAAQ,CAAC,sBAAsB,CAAC,UAAU,CAAC,wBAAwB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,SAAS,CAAC,uBAAuB,CAAC,UAAU,CAAC,wBAAwB,CAAC,aAAa,CAAC,2BAA2B,CAAC,SAAS,CAAC,uBAAuB,CAAC,aAAa,CAAC,2BAA2B,CAAC;;;;"}
@@ -33,4 +33,8 @@ export declare const OptionsList: React.ForwardRefExoticComponent<Pick<import(".
33
33
  search?: string;
34
34
  multiple?: boolean;
35
35
  limitDynamicOptionGroupSize?: import("../../typings").BaseSelectProps["limitDynamicOptionGroupSize"];
36
+ scrollableNodeClassName?: string;
37
+ contentNodeClassName?: string;
38
+ listNodeClassName?: string;
39
+ ctrlRef?: React.Ref<import("../../typings").OptionsListController>;
36
40
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
- import React, { forwardRef, useState, useCallback, useRef } from 'react';
1
+ import React, { forwardRef, useRef, useState } from 'react';
2
2
  import mergeRefs from 'react-merge-refs';
3
3
  import cn from 'classnames';
4
- import { Scrollbar } from '@alfalab/core-components-scrollbar/modern';
4
+ import { ScrollbarPrivate } from '@alfalab/core-components-scrollbar-private/modern';
5
5
  import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
6
6
  import { useNativeScrollbar } from '../../hooks/use-native-scrollbar.js';
7
7
  import { useVisibleOptions, isGroup } from '../../utils.js';
@@ -13,24 +13,34 @@ const createCounter = () => {
13
13
  // eslint-disable-next-line no-plusplus
14
14
  return () => count++;
15
15
  };
16
- const OptionsList = forwardRef(({ size = 48, className, optionGroupClassName, footerClassName, scrollbarClassName, Option, getOptionProps, groupOptionProps = {}, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, onScroll, open, header, footer, showFooter = true, optionsListWidth, nativeScrollbar: nativeScrollbarProp, flatOptions = [], setHighlightedIndex, selectedItems, search, setSelectedItems, multiple, limitDynamicOptionGroupSize = false, client, }, ref) => {
16
+ const OptionsList = forwardRef(({ size = 48, className, optionGroupClassName, footerClassName, scrollbarClassName, Option, getOptionProps, groupOptionProps = {}, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, onScroll, open, header, footer, showFooter = true, nativeScrollbar: nativeScrollbarProp, flatOptions = [], setHighlightedIndex, selectedItems, search, setSelectedItems, multiple, limitDynamicOptionGroupSize = false, client, scrollableNodeClassName, contentNodeClassName, listNodeClassName, }, ref) => {
17
+ const actualOptionsCount = limitDynamicOptionGroupSize && options.length > 0;
18
+ const listRef = useRef(null);
19
+ const scrollableNodeRef = useRef(null);
20
+ const [, maxHeight] = useVisibleOptions({
21
+ visibleOptions,
22
+ listRef,
23
+ open,
24
+ options,
25
+ actualOptionsCount,
26
+ size: actualOptionsCount ? size : undefined,
27
+ });
28
+ const noOptions = options.length === 0;
17
29
  const [scrollTop, setScrollTop] = useState(true);
18
30
  const [scrollBottom, setScrollBottom] = useState(false);
19
31
  const nativeScrollbar = useNativeScrollbar({
20
32
  nativeScrollbar: nativeScrollbarProp,
21
33
  client,
22
34
  });
23
- const handleScroll = useCallback((event) => {
35
+ const handleScroll = (event) => {
24
36
  const scrolledToHeader = event.currentTarget.scrollTop <= 0;
25
37
  const scrolledToFooter = event.currentTarget.scrollHeight - event.currentTarget.offsetHeight <=
26
38
  event.currentTarget.scrollTop;
27
39
  setScrollTop(scrolledToHeader);
28
40
  setScrollBottom(scrolledToFooter);
29
41
  onScroll?.(event);
30
- }, [onScroll]);
42
+ };
31
43
  const renderOption = (option, index) => (React.createElement(Option, { key: option.key, ...getOptionProps(option, index) }));
32
- const listRef = useRef(null);
33
- const scrollbarRef = useRef(null);
34
44
  const counter = createCounter();
35
45
  const renderGroup = (group) => {
36
46
  const groupSelectedItems = selectedItems?.filter(({ key: selectedItemKey }) => group.options.some((option) => option.key === selectedItemKey));
@@ -39,56 +49,26 @@ const OptionsList = forwardRef(({ size = 48, className, optionGroupClassName, fo
39
49
  };
40
50
  return (React.createElement(Optgroup$1, { className: optionGroupClassName, label: group.label, key: group.label, size: size, options: group.options, selectedItems: groupSelectedItems, setSelectedItems: handleSelectedItems, search: search, multiple: multiple, ...groupOptionProps }, group.options.map((option) => renderOption(option, counter()))));
41
51
  };
42
- const actualOptionsCount = limitDynamicOptionGroupSize && options.length > 0;
43
- const [measured, maxHeight] = useVisibleOptions({
44
- visibleOptions,
45
- listRef,
46
- open,
47
- options,
48
- actualOptionsCount,
49
- size: actualOptionsCount
50
- ? (() => {
51
- switch (typeof size) {
52
- case 'string':
53
- throw new Error('OptionsList with `limitDynamicOptionGroupSize` enabled needs a `size` with number type');
54
- default:
55
- return size;
56
- }
57
- })()
58
- : undefined,
59
- });
60
52
  if (options.length === 0 && !emptyPlaceholder && !header && !footer) {
61
53
  return null;
62
54
  }
63
- const renderListItems = () => (React.createElement(React.Fragment, null,
64
- options.map((option) => isGroup(option) ? renderGroup(option) : renderOption(option, counter())),
65
- emptyPlaceholder && options.length === 0 && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder))));
66
- const renderWithCustomScrollbar = () => {
67
- const scrollableNodeProps = {
68
- onScroll: handleScroll,
69
- 'data-test-id': dataTestId,
70
- ref: ref,
71
- };
72
- return (React.createElement(Scrollbar, { className: cn(styles.scrollable, scrollbarClassName), verticalBarClassName: cn(styles.verticalBar, {
73
- [styles.verticalBarWithHeader]: Boolean(header),
74
- [styles.verticalBarWithFooter]: Boolean(footer),
75
- }), ref: scrollbarRef, style: { maxHeight }, horizontalAutoStretch: optionsListWidth === 'content', scrollableNodeProps: scrollableNodeProps, contentNodeProps: { ref: listRef }, maskProps: {
76
- /*
77
- * Для корректного подсчета высоты опций(иначе для optionsListWidth: 'field'
78
- * высота опции всегда будет равна высоте одной строчки)
79
- */
80
- className: cn({
81
- [styles.mask]: optionsListWidth === 'content' && !measured,
82
- }),
83
- } }, renderListItems()));
84
- };
85
- const renderWithNativeScrollbar = () => (React.createElement("div", { className: cn(styles.scrollable, scrollbarClassName), ref: mergeRefs([listRef, ref]), onScroll: handleScroll, style: { maxHeight } }, renderListItems()));
86
55
  const resetHighlightedIndex = () => setHighlightedIndex?.(-1);
87
56
  return (React.createElement("div", { ...(nativeScrollbar && { 'data-test-id': dataTestId }), className: cn(styles.optionsList, styles[`size-${size}`], className) },
88
57
  header && (React.createElement("div", { className: cn(styles.optionsListHeader, {
89
58
  [styles.headerHighlighted]: !scrollTop,
90
59
  }), onMouseEnter: resetHighlightedIndex }, header)),
91
- nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
60
+ !noOptions && (React.createElement(ScrollbarPrivate, { native: nativeScrollbar, className: scrollbarClassName, style: { maxHeight }, scrollableNodeProps: {
61
+ ref: mergeRefs([scrollableNodeRef, ref]),
62
+ onScroll: handleScroll,
63
+ className: scrollableNodeClassName,
64
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
65
+ // @ts-expect-error
66
+ 'data-test-id': nativeScrollbar ? undefined : dataTestId,
67
+ }, contentNodeProps: { className: contentNodeClassName } },
68
+ React.createElement("div", { className: listNodeClassName, ref: listRef }, options.map((option) => isGroup(option)
69
+ ? renderGroup(option)
70
+ : renderOption(option, counter()))))),
71
+ emptyPlaceholder && noOptions && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder)),
92
72
  showFooter && footer && (React.createElement("div", { onMouseEnter: resetHighlightedIndex, className: cn(styles.optionsListFooter, footerClassName, {
93
73
  [styles.withBorder]: visibleOptions &&
94
74
  flatOptions.length > visibleOptions &&