@alfalab/core-components-select 19.1.0 → 19.1.1-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 (345) hide show
  1. package/Component.responsive.d.ts +1 -1
  2. package/Component.responsive.js.map +1 -1
  3. package/components/arrow/index.css +4 -4
  4. package/components/arrow/index.module.css.js +1 -1
  5. package/components/arrow/index.module.css.js.map +1 -1
  6. package/components/base-checkmark/index.css +12 -12
  7. package/components/base-checkmark/index.module.css.js +1 -1
  8. package/components/base-checkmark/index.module.css.js.map +1 -1
  9. package/components/base-option/index.css +19 -17
  10. package/components/base-option/index.module.css.js +1 -1
  11. package/components/base-option/index.module.css.js.map +1 -1
  12. package/components/base-select/Component.d.ts +5 -5
  13. package/components/base-select/Component.js.map +1 -1
  14. package/components/base-select/index.css +11 -11
  15. package/components/base-select/index.module.css.js +1 -1
  16. package/components/base-select/index.module.css.js.map +1 -1
  17. package/components/base-select/mobile.css +11 -11
  18. package/components/base-select/mobile.module.css.js +1 -1
  19. package/components/base-select/mobile.module.css.js.map +1 -1
  20. package/components/base-select/types/component-types.d.ts +4 -4
  21. package/components/checkmark/index.css +11 -11
  22. package/components/checkmark/index.module.css.js +1 -1
  23. package/components/checkmark/index.module.css.js.map +1 -1
  24. package/components/checkmark-mobile/index.css +6 -6
  25. package/components/checkmark-mobile/index.module.css.js +1 -1
  26. package/components/checkmark-mobile/index.module.css.js.map +1 -1
  27. package/components/clear-button/index.css +4 -4
  28. package/components/clear-button/index.module.css.js +1 -1
  29. package/components/field/Component.d.ts +1 -1
  30. package/components/field/index.css +22 -18
  31. package/components/field/index.module.css.js +1 -1
  32. package/components/field/index.module.css.js.map +1 -1
  33. package/components/footer/Component.d.ts +1 -1
  34. package/components/footer/index.css +4 -4
  35. package/components/footer/index.module.css.js +1 -1
  36. package/components/footer/index.module.css.js.map +1 -1
  37. package/components/native-select/Component.d.ts +1 -1
  38. package/components/optgroup/index.css +8 -7
  39. package/components/optgroup/index.module.css.js +1 -1
  40. package/components/optgroup/index.module.css.js.map +1 -1
  41. package/components/option/Component.d.ts +1 -2
  42. package/components/option/desktop/index.css +24 -22
  43. package/components/option/desktop/index.module.css.js +1 -1
  44. package/components/option/desktop/index.module.css.js.map +1 -1
  45. package/components/option/mobile/index.css +21 -19
  46. package/components/option/mobile/index.module.css.js +1 -1
  47. package/components/option/mobile/index.module.css.js.map +1 -1
  48. package/components/options-list/Component.d.ts +25 -25
  49. package/components/options-list/Component.js +3 -3
  50. package/components/options-list/Component.js.map +1 -1
  51. package/components/options-list/index.css +13 -13
  52. package/components/options-list/index.module.css.js +1 -1
  53. package/components/options-list/index.module.css.js.map +1 -1
  54. package/components/search/Component.js.map +1 -1
  55. package/components/search/index.css +1 -1
  56. package/components/search/index.module.css.js +1 -1
  57. package/components/search/index.module.css.js.map +1 -1
  58. package/components/virtual-options-list/Component.d.ts +25 -25
  59. package/components/virtual-options-list/Component.js.map +1 -1
  60. package/components/virtual-options-list/index.css +13 -13
  61. package/components/virtual-options-list/index.module.css.js +1 -1
  62. package/components/virtual-options-list/index.module.css.js.map +1 -1
  63. package/cssm/Component.responsive.d.ts +1 -1
  64. package/cssm/Component.responsive.js.map +1 -1
  65. package/cssm/components/base-option/index.module.css +5 -3
  66. package/cssm/components/base-select/Component.d.ts +5 -5
  67. package/cssm/components/base-select/Component.js.map +1 -1
  68. package/cssm/components/base-select/types/component-types.d.ts +4 -4
  69. package/cssm/components/field/Component.d.ts +1 -1
  70. package/cssm/components/field/index.module.css +9 -5
  71. package/cssm/components/footer/Component.d.ts +1 -1
  72. package/cssm/components/native-select/Component.d.ts +1 -1
  73. package/cssm/components/optgroup/index.module.css +4 -3
  74. package/cssm/components/option/Component.d.ts +1 -2
  75. package/cssm/components/option/desktop/index.module.css +5 -3
  76. package/cssm/components/option/mobile/index.module.css +5 -3
  77. package/cssm/components/options-list/Component.d.ts +25 -25
  78. package/cssm/components/options-list/Component.js +3 -3
  79. package/cssm/components/options-list/Component.js.map +1 -1
  80. package/cssm/components/search/Component.js.map +1 -1
  81. package/cssm/components/virtual-options-list/Component.d.ts +25 -25
  82. package/cssm/components/virtual-options-list/Component.js.map +1 -1
  83. package/cssm/desktop/Component.desktop.d.ts +1 -1
  84. package/cssm/hooks/use-native-scrollbar.d.ts +1 -1
  85. package/cssm/hooks/use-native-scrollbar.js.map +1 -1
  86. package/cssm/presets/useLazyLoading/hook.d.ts +2 -2
  87. package/cssm/presets/useLazyLoading/hook.js.map +1 -1
  88. package/cssm/presets/useSelectWithApply/hook.d.ts +97 -131
  89. package/cssm/presets/useSelectWithApply/hook.js.map +1 -1
  90. package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +36 -69
  91. package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js.map +1 -1
  92. package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +1 -1
  93. package/cssm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +1 -1
  94. package/cssm/presets/useSelectWithLoading/hook.d.ts +1 -1
  95. package/cssm/typings.d.ts +21 -21
  96. package/cssm/utils.d.ts +4 -4
  97. package/cssm/utils.js.map +1 -1
  98. package/desktop/Component.desktop.d.ts +1 -1
  99. package/esm/Component.responsive.d.ts +1 -1
  100. package/esm/Component.responsive.js.map +1 -1
  101. package/esm/components/arrow/index.css +4 -4
  102. package/esm/components/arrow/index.module.css.js +1 -1
  103. package/esm/components/arrow/index.module.css.js.map +1 -1
  104. package/esm/components/base-checkmark/index.css +12 -12
  105. package/esm/components/base-checkmark/index.module.css.js +1 -1
  106. package/esm/components/base-checkmark/index.module.css.js.map +1 -1
  107. package/esm/components/base-option/index.css +19 -17
  108. package/esm/components/base-option/index.module.css.js +1 -1
  109. package/esm/components/base-option/index.module.css.js.map +1 -1
  110. package/esm/components/base-select/Component.d.ts +5 -5
  111. package/esm/components/base-select/Component.js.map +1 -1
  112. package/esm/components/base-select/index.css +11 -11
  113. package/esm/components/base-select/index.module.css.js +1 -1
  114. package/esm/components/base-select/index.module.css.js.map +1 -1
  115. package/esm/components/base-select/mobile.css +11 -11
  116. package/esm/components/base-select/mobile.module.css.js +1 -1
  117. package/esm/components/base-select/mobile.module.css.js.map +1 -1
  118. package/esm/components/base-select/types/component-types.d.ts +4 -4
  119. package/esm/components/checkmark/index.css +11 -11
  120. package/esm/components/checkmark/index.module.css.js +1 -1
  121. package/esm/components/checkmark/index.module.css.js.map +1 -1
  122. package/esm/components/checkmark-mobile/index.css +6 -6
  123. package/esm/components/checkmark-mobile/index.module.css.js +1 -1
  124. package/esm/components/checkmark-mobile/index.module.css.js.map +1 -1
  125. package/esm/components/clear-button/index.css +4 -4
  126. package/esm/components/clear-button/index.module.css.js +1 -1
  127. package/esm/components/field/Component.d.ts +1 -1
  128. package/esm/components/field/index.css +22 -18
  129. package/esm/components/field/index.module.css.js +1 -1
  130. package/esm/components/field/index.module.css.js.map +1 -1
  131. package/esm/components/footer/Component.d.ts +1 -1
  132. package/esm/components/footer/index.css +4 -4
  133. package/esm/components/footer/index.module.css.js +1 -1
  134. package/esm/components/footer/index.module.css.js.map +1 -1
  135. package/esm/components/native-select/Component.d.ts +1 -1
  136. package/esm/components/optgroup/index.css +8 -7
  137. package/esm/components/optgroup/index.module.css.js +1 -1
  138. package/esm/components/optgroup/index.module.css.js.map +1 -1
  139. package/esm/components/option/Component.d.ts +1 -2
  140. package/esm/components/option/desktop/index.css +24 -22
  141. package/esm/components/option/desktop/index.module.css.js +1 -1
  142. package/esm/components/option/desktop/index.module.css.js.map +1 -1
  143. package/esm/components/option/mobile/index.css +21 -19
  144. package/esm/components/option/mobile/index.module.css.js +1 -1
  145. package/esm/components/option/mobile/index.module.css.js.map +1 -1
  146. package/esm/components/options-list/Component.d.ts +25 -25
  147. package/esm/components/options-list/Component.js +3 -3
  148. package/esm/components/options-list/Component.js.map +1 -1
  149. package/esm/components/options-list/index.css +13 -13
  150. package/esm/components/options-list/index.module.css.js +1 -1
  151. package/esm/components/options-list/index.module.css.js.map +1 -1
  152. package/esm/components/search/Component.js.map +1 -1
  153. package/esm/components/search/index.css +1 -1
  154. package/esm/components/search/index.module.css.js +1 -1
  155. package/esm/components/search/index.module.css.js.map +1 -1
  156. package/esm/components/virtual-options-list/Component.d.ts +25 -25
  157. package/esm/components/virtual-options-list/Component.js.map +1 -1
  158. package/esm/components/virtual-options-list/index.css +13 -13
  159. package/esm/components/virtual-options-list/index.module.css.js +1 -1
  160. package/esm/components/virtual-options-list/index.module.css.js.map +1 -1
  161. package/esm/desktop/Component.desktop.d.ts +1 -1
  162. package/esm/hooks/use-native-scrollbar.d.ts +1 -1
  163. package/esm/hooks/use-native-scrollbar.js.map +1 -1
  164. package/esm/presets/useLazyLoading/hook.d.ts +2 -2
  165. package/esm/presets/useLazyLoading/hook.js.map +1 -1
  166. package/esm/presets/useSelectWithApply/hook.d.ts +97 -131
  167. package/esm/presets/useSelectWithApply/hook.js.map +1 -1
  168. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +36 -69
  169. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js.map +1 -1
  170. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +1 -1
  171. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  172. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js +1 -1
  173. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js.map +1 -1
  174. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +1 -1
  175. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +4 -4
  176. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js +1 -1
  177. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js.map +1 -1
  178. package/esm/presets/useSelectWithLoading/hook.d.ts +1 -1
  179. package/esm/presets/useSelectWithLoading/index.css +1 -1
  180. package/esm/presets/useSelectWithLoading/index.module.css.js +1 -1
  181. package/esm/typings.d.ts +21 -21
  182. package/esm/utils.d.ts +4 -4
  183. package/esm/utils.js.map +1 -1
  184. package/hooks/use-native-scrollbar.d.ts +1 -1
  185. package/hooks/use-native-scrollbar.js.map +1 -1
  186. package/modern/Component.responsive.d.ts +1 -1
  187. package/modern/Component.responsive.js.map +1 -1
  188. package/modern/components/arrow/index.css +4 -4
  189. package/modern/components/arrow/index.module.css.js +1 -1
  190. package/modern/components/arrow/index.module.css.js.map +1 -1
  191. package/modern/components/base-checkmark/index.css +12 -12
  192. package/modern/components/base-checkmark/index.module.css.js +1 -1
  193. package/modern/components/base-checkmark/index.module.css.js.map +1 -1
  194. package/modern/components/base-option/index.css +19 -17
  195. package/modern/components/base-option/index.module.css.js +1 -1
  196. package/modern/components/base-option/index.module.css.js.map +1 -1
  197. package/modern/components/base-select/Component.d.ts +5 -5
  198. package/modern/components/base-select/Component.js.map +1 -1
  199. package/modern/components/base-select/index.css +11 -11
  200. package/modern/components/base-select/index.module.css.js +1 -1
  201. package/modern/components/base-select/index.module.css.js.map +1 -1
  202. package/modern/components/base-select/mobile.css +11 -11
  203. package/modern/components/base-select/mobile.module.css.js +1 -1
  204. package/modern/components/base-select/mobile.module.css.js.map +1 -1
  205. package/modern/components/base-select/types/component-types.d.ts +4 -4
  206. package/modern/components/checkmark/index.css +11 -11
  207. package/modern/components/checkmark/index.module.css.js +1 -1
  208. package/modern/components/checkmark/index.module.css.js.map +1 -1
  209. package/modern/components/checkmark-mobile/index.css +6 -6
  210. package/modern/components/checkmark-mobile/index.module.css.js +1 -1
  211. package/modern/components/checkmark-mobile/index.module.css.js.map +1 -1
  212. package/modern/components/clear-button/index.css +4 -4
  213. package/modern/components/clear-button/index.module.css.js +1 -1
  214. package/modern/components/field/Component.d.ts +1 -1
  215. package/modern/components/field/index.css +22 -18
  216. package/modern/components/field/index.module.css.js +1 -1
  217. package/modern/components/field/index.module.css.js.map +1 -1
  218. package/modern/components/footer/Component.d.ts +1 -1
  219. package/modern/components/footer/index.css +4 -4
  220. package/modern/components/footer/index.module.css.js +1 -1
  221. package/modern/components/footer/index.module.css.js.map +1 -1
  222. package/modern/components/native-select/Component.d.ts +1 -1
  223. package/modern/components/optgroup/index.css +8 -7
  224. package/modern/components/optgroup/index.module.css.js +1 -1
  225. package/modern/components/optgroup/index.module.css.js.map +1 -1
  226. package/modern/components/option/Component.d.ts +1 -2
  227. package/modern/components/option/desktop/index.css +24 -22
  228. package/modern/components/option/desktop/index.module.css.js +1 -1
  229. package/modern/components/option/desktop/index.module.css.js.map +1 -1
  230. package/modern/components/option/mobile/index.css +21 -19
  231. package/modern/components/option/mobile/index.module.css.js +1 -1
  232. package/modern/components/option/mobile/index.module.css.js.map +1 -1
  233. package/modern/components/options-list/Component.d.ts +25 -25
  234. package/modern/components/options-list/Component.js +3 -3
  235. package/modern/components/options-list/Component.js.map +1 -1
  236. package/modern/components/options-list/index.css +13 -13
  237. package/modern/components/options-list/index.module.css.js +1 -1
  238. package/modern/components/options-list/index.module.css.js.map +1 -1
  239. package/modern/components/search/Component.js.map +1 -1
  240. package/modern/components/search/index.css +1 -1
  241. package/modern/components/search/index.module.css.js +1 -1
  242. package/modern/components/search/index.module.css.js.map +1 -1
  243. package/modern/components/virtual-options-list/Component.d.ts +25 -25
  244. package/modern/components/virtual-options-list/Component.js.map +1 -1
  245. package/modern/components/virtual-options-list/index.css +13 -13
  246. package/modern/components/virtual-options-list/index.module.css.js +1 -1
  247. package/modern/components/virtual-options-list/index.module.css.js.map +1 -1
  248. package/modern/desktop/Component.desktop.d.ts +1 -1
  249. package/modern/hooks/use-native-scrollbar.d.ts +1 -1
  250. package/modern/hooks/use-native-scrollbar.js.map +1 -1
  251. package/modern/presets/useLazyLoading/hook.d.ts +2 -2
  252. package/modern/presets/useLazyLoading/hook.js.map +1 -1
  253. package/modern/presets/useSelectWithApply/hook.d.ts +97 -131
  254. package/modern/presets/useSelectWithApply/hook.js.map +1 -1
  255. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +36 -69
  256. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js.map +1 -1
  257. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +1 -1
  258. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  259. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js +1 -1
  260. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js.map +1 -1
  261. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +1 -1
  262. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +4 -4
  263. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js +1 -1
  264. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js.map +1 -1
  265. package/modern/presets/useSelectWithLoading/hook.d.ts +1 -1
  266. package/modern/presets/useSelectWithLoading/index.css +1 -1
  267. package/modern/presets/useSelectWithLoading/index.module.css.js +1 -1
  268. package/modern/typings.d.ts +21 -21
  269. package/modern/utils.d.ts +4 -4
  270. package/modern/utils.js.map +1 -1
  271. package/moderncssm/Component.responsive.d.ts +1 -1
  272. package/moderncssm/Component.responsive.js.map +1 -1
  273. package/moderncssm/components/base-option/index.module.css +2 -1
  274. package/moderncssm/components/base-select/Component.d.ts +5 -5
  275. package/moderncssm/components/base-select/Component.js.map +1 -1
  276. package/moderncssm/components/base-select/types/component-types.d.ts +4 -4
  277. package/moderncssm/components/field/Component.d.ts +1 -1
  278. package/moderncssm/components/field/index.module.css +6 -3
  279. package/moderncssm/components/footer/Component.d.ts +1 -1
  280. package/moderncssm/components/native-select/Component.d.ts +1 -1
  281. package/moderncssm/components/optgroup/index.module.css +1 -1
  282. package/moderncssm/components/option/Component.d.ts +1 -2
  283. package/moderncssm/components/option/desktop/index.module.css +2 -1
  284. package/moderncssm/components/option/mobile/index.module.css +2 -1
  285. package/moderncssm/components/options-list/Component.d.ts +25 -25
  286. package/moderncssm/components/options-list/Component.js +3 -3
  287. package/moderncssm/components/options-list/Component.js.map +1 -1
  288. package/moderncssm/components/search/Component.js.map +1 -1
  289. package/moderncssm/components/virtual-options-list/Component.d.ts +25 -25
  290. package/moderncssm/components/virtual-options-list/Component.js.map +1 -1
  291. package/moderncssm/desktop/Component.desktop.d.ts +1 -1
  292. package/moderncssm/hooks/use-native-scrollbar.d.ts +1 -1
  293. package/moderncssm/hooks/use-native-scrollbar.js.map +1 -1
  294. package/moderncssm/presets/useLazyLoading/hook.d.ts +2 -2
  295. package/moderncssm/presets/useLazyLoading/hook.js.map +1 -1
  296. package/moderncssm/presets/useSelectWithApply/hook.d.ts +97 -131
  297. package/moderncssm/presets/useSelectWithApply/hook.js.map +1 -1
  298. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +36 -69
  299. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/Component.js.map +1 -1
  300. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +1 -1
  301. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +1 -1
  302. package/moderncssm/presets/useSelectWithLoading/hook.d.ts +1 -1
  303. package/moderncssm/typings.d.ts +21 -21
  304. package/moderncssm/utils.d.ts +4 -4
  305. package/moderncssm/utils.js.map +1 -1
  306. package/package.json +15 -15
  307. package/presets/useLazyLoading/hook.d.ts +2 -2
  308. package/presets/useLazyLoading/hook.js.map +1 -1
  309. package/presets/useSelectWithApply/hook.d.ts +97 -130
  310. package/presets/useSelectWithApply/hook.js.map +1 -1
  311. package/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +36 -69
  312. package/presets/useSelectWithApply/options-list-with-apply/Component.js.map +1 -1
  313. package/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +1 -1
  314. package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  315. package/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js +1 -1
  316. package/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css.js.map +1 -1
  317. package/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +1 -1
  318. package/presets/useSelectWithApply/options-list-with-apply/header/index.css +4 -4
  319. package/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js +1 -1
  320. package/presets/useSelectWithApply/options-list-with-apply/header/index.module.css.js.map +1 -1
  321. package/presets/useSelectWithLoading/hook.d.ts +1 -1
  322. package/presets/useSelectWithLoading/index.css +1 -1
  323. package/presets/useSelectWithLoading/index.module.css.js +1 -1
  324. package/src/components/arrow/index.module.css +1 -1
  325. package/src/components/base-checkmark/index.module.css +1 -1
  326. package/src/components/base-option/index.module.css +1 -1
  327. package/src/components/base-select/index.module.css +1 -1
  328. package/src/components/base-select/mobile.module.css +1 -1
  329. package/src/components/checkmark/index.module.css +1 -1
  330. package/src/components/checkmark-mobile/index.module.css +1 -1
  331. package/src/components/field/index.module.css +1 -1
  332. package/src/components/footer/index.module.css +1 -1
  333. package/src/components/optgroup/index.module.css +1 -1
  334. package/src/components/option/desktop/index.module.css +1 -1
  335. package/src/components/option/index.module.css +1 -1
  336. package/src/components/option/mobile/index.module.css +1 -1
  337. package/src/components/options-list/Component.tsx +3 -3
  338. package/src/components/options-list/index.module.css +1 -1
  339. package/src/components/search/index.module.css +1 -1
  340. package/src/components/virtual-options-list/index.module.css +1 -1
  341. package/src/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +1 -1
  342. package/src/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +1 -1
  343. package/typings.d.ts +21 -21
  344. package/utils.d.ts +4 -4
  345. package/utils.js.map +1 -1
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"skeleton":"select__skeleton_rw7xv"};
3
+ const styles = {"skeleton":"select__skeleton_qun27"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -7,8 +7,8 @@ import { type ModalProps } from '@alfalab/core-components-modal/modern';
7
7
  import { type ModalFooterProps, type ModalHeaderProps } from '@alfalab/core-components-modal/modern/shared';
8
8
  import { type PopoverProps } from '@alfalab/core-components-popover/modern';
9
9
  import { type UseSelectWithApplyProps } from './presets/useSelectWithApply/hook';
10
- export declare type AnyObject = Record<string, any>;
11
- export declare type OptionShape = {
10
+ export type AnyObject = Record<string, any>;
11
+ export type OptionShape = {
12
12
  /**
13
13
  * Текстовое представление пункта
14
14
  */
@@ -30,7 +30,7 @@ export declare type OptionShape = {
30
30
  */
31
31
  value?: any;
32
32
  };
33
- export declare type GroupShape = {
33
+ export type GroupShape = {
34
34
  /**
35
35
  * Заголовок группы
36
36
  */
@@ -40,7 +40,7 @@ export declare type GroupShape = {
40
40
  */
41
41
  options: OptionShape[];
42
42
  };
43
- export declare type BaseSelectChangePayload = {
43
+ export type BaseSelectChangePayload = {
44
44
  selected: OptionShape | null;
45
45
  selectedMultiple: OptionShape[];
46
46
  initiator: OptionShape | null;
@@ -306,7 +306,7 @@ export interface BaseSelectProps {
306
306
  */
307
307
  environment?: Environment;
308
308
  }
309
- export declare type FieldProps = {
309
+ export type FieldProps = {
310
310
  /**
311
311
  * Дополнительный класс
312
312
  */
@@ -390,7 +390,7 @@ export declare type FieldProps = {
390
390
  */
391
391
  dataTestId?: string;
392
392
  } & AnyObject;
393
- export declare type ArrowProps = {
393
+ export type ArrowProps = {
394
394
  /**
395
395
  * Дополнительный класс
396
396
  */
@@ -409,7 +409,7 @@ export declare type ArrowProps = {
409
409
  */
410
410
  size?: BaseSelectProps['size'];
411
411
  };
412
- export declare type OptionsListProps = Pick<SelectProps, 'client'> & {
412
+ export type OptionsListProps = Pick<SelectProps, 'client'> & {
413
413
  /**
414
414
  * Дополнительный класс
415
415
  */
@@ -540,7 +540,7 @@ export declare type OptionsListProps = Pick<SelectProps, 'client'> & {
540
540
  */
541
541
  limitDynamicOptionGroupSize?: BaseSelectProps['limitDynamicOptionGroupSize'];
542
542
  };
543
- export declare type OptgroupProps = {
543
+ export type OptgroupProps = {
544
544
  /**
545
545
  * Дополнительный класс для компонента группы пунктов
546
546
  */
@@ -578,7 +578,7 @@ export declare type OptgroupProps = {
578
578
  */
579
579
  multiple?: boolean;
580
580
  };
581
- export declare type OptionCommonProps = {
581
+ export type OptionCommonProps = {
582
582
  /**
583
583
  * Дополнительный класс
584
584
  */
@@ -648,7 +648,7 @@ export interface OptionProps extends OptionCommonProps, AriaAttributes {
648
648
  */
649
649
  mobile?: boolean;
650
650
  }
651
- export declare type CheckmarkProps = {
651
+ export type CheckmarkProps = {
652
652
  /**
653
653
  * Флаг, данный пункт выбран
654
654
  */
@@ -682,9 +682,9 @@ export declare type CheckmarkProps = {
682
682
  */
683
683
  align?: 'start' | 'center';
684
684
  };
685
- export declare type SearchProps = InputProps & RefAttributes<HTMLInputElement>;
686
- export declare type SelectFieldProps = Omit<FormControlProps, 'size'> & Record<string, unknown>;
687
- export declare type AdditionalMobileProps = {
685
+ export type SearchProps = InputProps & RefAttributes<HTMLInputElement>;
686
+ export type SelectFieldProps = Omit<FormControlProps, 'size'> & Record<string, unknown>;
687
+ export type AdditionalMobileProps = {
688
688
  /**
689
689
  * Показывать кнопку 'Сбросить' в футере мобильного компонента
690
690
  */
@@ -707,7 +707,7 @@ export declare type AdditionalMobileProps = {
707
707
  */
708
708
  checkmarkPosition?: 'before' | 'after';
709
709
  };
710
- export declare type BottomSheetSelectMobileProps = {
710
+ export type BottomSheetSelectMobileProps = {
711
711
  /**
712
712
  * Футер
713
713
  * @deprecated Используйте bottomSheetProps.actionButton
@@ -725,7 +725,7 @@ export declare type BottomSheetSelectMobileProps = {
725
725
  bottomAddons?: ((flatOptions: OptionShape[]) => ReactNode) | ReactNode;
726
726
  };
727
727
  };
728
- export declare type ModalSelectMobileProps = {
728
+ export type ModalSelectMobileProps = {
729
729
  /**
730
730
  * Дополнительные пропсы шапки модалки
731
731
  */
@@ -741,20 +741,20 @@ export declare type ModalSelectMobileProps = {
741
741
  */
742
742
  modalFooterProps?: Partial<ModalFooterProps>;
743
743
  };
744
- declare type ConditionalMobileProps = ({
744
+ type ConditionalMobileProps = ({
745
745
  isBottomSheet?: true;
746
746
  } & BottomSheetSelectMobileProps) | ({
747
747
  isBottomSheet: false;
748
748
  } & ModalSelectMobileProps);
749
- export declare type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark'> & AdditionalMobileProps & ModalSelectMobileProps;
750
- export declare type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark'> & AdditionalMobileProps & ConditionalMobileProps;
751
- export declare type SelectDesktopProps = Omit<BaseSelectProps, 'fieldProps'> & {
749
+ export type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark'> & AdditionalMobileProps & ModalSelectMobileProps;
750
+ export type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark'> & AdditionalMobileProps & ConditionalMobileProps;
751
+ export type SelectDesktopProps = Omit<BaseSelectProps, 'fieldProps'> & {
752
752
  /**
753
753
  * Пропсы, которые будут прокинуты в компонент поля
754
754
  */
755
755
  fieldProps?: SelectFieldProps;
756
756
  };
757
- export declare type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobileProps & {
757
+ export type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobileProps & {
758
758
  /**
759
759
  * Контрольная точка, с нее начинается desktop версия
760
760
  * @default 1024
@@ -770,7 +770,7 @@ export declare type SelectProps = BaseSelectProps & AdditionalMobileProps & Cond
770
770
  */
771
771
  defaultMatchMediaValue?: boolean | (() => boolean);
772
772
  };
773
- export declare type ClearButtonProps = {
773
+ export type ClearButtonProps = {
774
774
  /**
775
775
  * Обработчик нажатия на крестик для очистки поля
776
776
  */
package/modern/utils.d.ts CHANGED
@@ -3,16 +3,16 @@ import { type BaseSelectProps, type GroupShape, type OptionShape, type OptionsLi
3
3
  export declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
4
  export declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
5
  export declare const joinOptions: ({ selected, selectedMultiple, valueSeparator, }: {
6
- selected?: OptionShape | undefined;
7
- selectedMultiple?: OptionShape[] | undefined;
8
- valueSeparator?: string | undefined;
6
+ selected?: OptionShape;
7
+ selectedMultiple?: OptionShape[];
8
+ valueSeparator?: string;
9
9
  }) => ReactNode[] | null;
10
10
  export declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape | GroupShape) => boolean, filterGroup?: boolean): {
11
11
  filteredOptions: (OptionShape | GroupShape)[];
12
12
  flatOptions: OptionShape[];
13
13
  selectedOptions: OptionShape[];
14
14
  };
15
- declare type useVisibleOptionsArgs = {
15
+ type useVisibleOptionsArgs = {
16
16
  /**
17
17
  * Количество видимых пунктов
18
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import {\n cloneElement,\n isValidElement,\n type ReactNode,\n type RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { fnUtils, getDataTestId, useIsMounted } from '@alfalab/core-components-shared';\nimport { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';\n\nimport { DEFAULT_SEPARATOR } from './consts';\nimport {\n type BaseSelectProps,\n type GroupShape,\n type OptionShape,\n type OptionsListProps,\n} from './typings';\n\nexport const isGroup = (item: OptionShape | GroupShape): item is GroupShape =>\n Object.prototype.hasOwnProperty.call(item, 'options');\n\nexport const isOptionShape = (item: OptionShape | string | null): item is OptionShape =>\n !!item && Object.prototype.hasOwnProperty.call(item, 'key');\n\nexport const joinOptions = ({\n selected,\n selectedMultiple,\n valueSeparator = DEFAULT_SEPARATOR,\n}: {\n selected?: OptionShape;\n selectedMultiple?: OptionShape[];\n valueSeparator?: string;\n}) => {\n const options = selectedMultiple || (selected ? [selected] : []);\n\n if (!options.length) return null;\n\n return options.reduce((acc: Array<ReactNode | string>, option: OptionShape, index: number) => {\n if (isValidElement(option.content)) {\n acc.push(cloneElement(option.content, { key: option.key }));\n } else {\n acc.push(option.content);\n }\n\n if (index < options.length - 1) acc.push(valueSeparator);\n\n return acc;\n }, []);\n};\n\n// За один проход делает список пунктов меню плоским и находит выбранные пункты по ключу\nexport function processOptions(\n options: BaseSelectProps['options'],\n selected: BaseSelectProps['selected'] = [],\n filterFn: (option: OptionShape | GroupShape) => boolean = () => true,\n filterGroup = false,\n) {\n const flatOptions: OptionShape[] = [];\n const filteredOptions: BaseSelectProps['options'] = [];\n\n const selectedArray = Array.isArray(selected) ? selected : [selected];\n const selectedOptions = selectedArray.filter(isOptionShape);\n const selectedKeys = selectedArray.filter(\n (option): option is string => typeof option === 'string',\n );\n\n const isSelected = (option: OptionShape) => selectedKeys.includes(option.key);\n\n const process = (option: OptionShape | GroupShape) => {\n const isGroupOption = isGroup(option);\n\n if (!isGroupOption && isSelected(option)) {\n selectedOptions.push(option);\n }\n\n if (!filterFn(option)) return false;\n\n if (isGroupOption) {\n if (filterGroup) {\n Array.prototype.push.apply(flatOptions, option.options);\n }\n } else {\n flatOptions.push(option);\n }\n\n return true;\n };\n\n options.forEach((option) => {\n if (isGroup(option)) {\n const group: GroupShape = {\n ...option,\n options: [],\n };\n\n option.options.forEach((groupOption) => {\n const matched = process(groupOption);\n\n if (matched) group.options.push(groupOption);\n });\n\n if (group.options.length) {\n filteredOptions.push(group);\n\n return;\n }\n\n if (!filterGroup) return;\n }\n const matched = process(option);\n\n if (matched) filteredOptions.push(option);\n });\n\n return { filteredOptions, flatOptions, selectedOptions };\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\ntype useVisibleOptionsArgs = {\n /**\n * Количество видимых пунктов\n */\n visibleOptions: number;\n\n /**\n * Реф на контейнер с пунтами меню\n */\n listRef: RefObject<HTMLElement>;\n\n /**\n * Реф на контейнер, которому нужно установить высоту\n */\n styleTargetRef?: RefObject<HTMLElement>;\n\n /**\n * Флаг открытия меню\n */\n open?: boolean;\n\n /**\n * Позволяет вызвать пересчет высоты\n */\n invalidate?: unknown;\n\n /**\n * Список вариантов выбора\n */\n options?: Array<OptionShape | GroupShape>;\n\n /**\n * Максимальный размер варианта выбора\n */\n size?: Extract<OptionsListProps['size'], number>;\n\n /**\n * Учитывать действительное число вариантов выбора\n */\n actualOptionsCount?: boolean;\n};\n\n// copy-paste of original `useVisibleOptions` before https://github.com/core-ds/core-components/pull/1368\nexport function useVirtualVisibleOptions({\n visibleOptions,\n listRef,\n styleTargetRef = listRef,\n open,\n invalidate,\n options,\n size,\n actualOptionsCount,\n}: useVisibleOptionsArgs) {\n useEffect(() => {\n const measureOptionHeight = (element: HTMLElement) =>\n typeof size === 'number' ? Math.min(element.clientHeight, size) : element.clientHeight;\n\n const list = listRef.current;\n const styleTarget = styleTargetRef.current;\n\n if (open && list && styleTarget && visibleOptions > 0) {\n const childCount = list.children.length;\n const optionsNodes = ([] as HTMLElement[]).slice.call(\n list.children,\n 0,\n visibleOptions + 1,\n );\n\n let height = optionsNodes\n .slice(0, visibleOptions)\n .reduce((acc, child) => acc + measureOptionHeight(child), 0);\n\n if (visibleOptions < childCount) {\n const lastVisibleOptionHeight = measureOptionHeight(\n optionsNodes[optionsNodes.length - 1],\n );\n\n // Если кол-во опций больше visibleOptions на 1, то показываем все опции, иначе добавляем половинку\n height += Math.round(\n childCount - visibleOptions === 1\n ? lastVisibleOptionHeight\n : lastVisibleOptionHeight / 2,\n );\n } else if (\n visibleOptions > childCount &&\n actualOptionsCount &&\n typeof size === 'number'\n ) {\n const actualCount = (options ?? []).reduce(\n (sum, option) => sum + 1 + (isGroup(option) ? option.options.length : 0),\n 0,\n );\n\n height =\n Math.min(\n actualCount === 0 ? /** empty placeholder */ 1 : actualCount,\n visibleOptions,\n ) * size;\n\n if (visibleOptions < actualCount) {\n height += size / 2;\n }\n }\n\n styleTarget.style.height = `${height}px`;\n }\n }, [\n actualOptionsCount,\n listRef,\n open,\n options,\n size,\n styleTargetRef,\n visibleOptions,\n invalidate,\n ]);\n}\n\nexport function useVisibleOptions({\n visibleOptions,\n listRef,\n open,\n options,\n size,\n actualOptionsCount,\n}: useVisibleOptionsArgs) {\n const [, runIfMounted] = useIsMounted();\n const [measured, setMeasured] = useState(false);\n const [height, setHeight] = useState<number | undefined>();\n\n useLayoutEffect_SAFE_FOR_SSR(() => {\n const measureOptionHeight = (element: HTMLElement) =>\n typeof size === 'number' ? Math.min(element.clientHeight, size) : element.clientHeight;\n\n const list = listRef.current;\n\n if (open && list && visibleOptions > 0) {\n const childCount = list.children.length;\n const optionsNodes = ([] as HTMLElement[]).slice.call(\n list.children,\n 0,\n visibleOptions + 1,\n );\n\n let measuredHeight = optionsNodes\n .slice(0, visibleOptions)\n .reduce((acc, child) => acc + measureOptionHeight(child), 0);\n\n if (visibleOptions < childCount) {\n const lastVisibleOptionHeight = measureOptionHeight(\n optionsNodes[optionsNodes.length - 1],\n );\n\n // Если кол-во опций больше visibleOptions на 1, то показываем все опции, иначе добавляем половинку\n measuredHeight += Math.round(\n childCount - visibleOptions === 1\n ? lastVisibleOptionHeight\n : lastVisibleOptionHeight / 2,\n );\n } else if (\n visibleOptions > childCount &&\n actualOptionsCount &&\n typeof size === 'number'\n ) {\n const actualCount = (options ?? []).reduce(\n (sum, option) => sum + 1 + (isGroup(option) ? option.options.length : 0),\n 0,\n );\n\n measuredHeight =\n Math.min(\n actualCount === 0 ? /** empty placeholder */ 1 : actualCount,\n visibleOptions,\n ) * size;\n\n if (visibleOptions < actualCount) {\n measuredHeight += size / 2;\n }\n }\n\n setHeight(measuredHeight);\n\n setMeasured(true);\n\n return () => {\n runIfMounted(() => setMeasured(false));\n };\n }\n\n return fnUtils.noop;\n }, [actualOptionsCount, listRef, open, options, size, visibleOptions, runIfMounted]);\n\n return [measured, height] as const;\n}\n\nexport function defaultFilterFn(optionText: string, search: string) {\n if (!search) return true;\n\n return optionText.toLowerCase().includes(search.toLowerCase());\n}\n\nexport function defaultGroupAccessor(option: GroupShape) {\n return option.label;\n}\n\nexport function defaultAccessor(option: OptionShape) {\n if (typeof option.content === 'string') return option.content;\n if (typeof option.value === 'string') return option.value;\n\n return option.key;\n}\n\n// TODO: перенести\nexport function usePrevious<T>(value: T) {\n const ref = useRef<T>();\n\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n}\n\n// TODO: перенести\nexport const lastIndexOf = <T>(array: T[], predicate: (item: T) => boolean) => {\n for (let i = array.length - 1; i >= 0; i--) {\n if (predicate(array[i])) return i;\n }\n\n return -1;\n};\n\nexport function getSelectTestIds(dataTestId: string) {\n return {\n select: dataTestId,\n option: getDataTestId(dataTestId, 'option'),\n optionsList: getDataTestId(dataTestId, 'options-list'),\n clearButton: getDataTestId(dataTestId, 'options-list-clear'),\n applyButton: getDataTestId(dataTestId, 'options-list-apply'),\n field: getDataTestId(dataTestId, 'field'),\n fieldFormControl: getDataTestId(dataTestId, 'field-form-control'),\n fieldLeftAddons: getDataTestId(dataTestId, 'field-form-control-left-addons'),\n fieldRightAddons: getDataTestId(dataTestId, 'field-form-control-right-addons'),\n fieldError: getDataTestId(dataTestId, 'field-form-control-error-message'),\n fieldHint: getDataTestId(dataTestId, 'field-form-control-hint'),\n fieldClearIcon: getDataTestId(dataTestId, 'field-clear-icon'),\n searchInput: getDataTestId(dataTestId, 'search'),\n searchFormControl: getDataTestId(dataTestId, 'search-form-control'),\n searchInner: getDataTestId(dataTestId, 'search-form-control-inner'),\n searchLeftAddons: getDataTestId(dataTestId, 'search-form-control-left-addons'),\n searchRightAddons: getDataTestId(dataTestId, 'search-form-control-right-addons'),\n searchError: getDataTestId(dataTestId, 'search-form-control-error-message'),\n searchHint: getDataTestId(dataTestId, 'search-form-control-hint'),\n\n bottomSheet: getDataTestId(dataTestId, 'bottom-sheet'),\n bottomSheetHeader: getDataTestId(dataTestId, 'bottom-sheet-header'),\n bottomSheetContent: getDataTestId(dataTestId, 'bottom-sheet-content'),\n\n modal: getDataTestId(dataTestId, 'modal'),\n modalHeader: getDataTestId(dataTestId, 'modal-header'),\n modalContent: getDataTestId(dataTestId, 'modal-content'),\n };\n}\n"],"names":[],"mappings":";;;;;MAqBa,OAAO,GAAG,CAAC,IAA8B,KAClD,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C;AAC/D,QAAA,cAAc,EAAE,aAAa,CAAC,UAAU,EAAE,kBAAkB,CAAC;AAC7D,QAAA,WAAW,EAAE,aAAa,CAAC,UAAU,EAAE,QAAQ,CAAC;AAChD,QAAA,iBAAiB,EAAE,aAAa,CAAC,UAAU,EAAE,qBAAqB,CAAC;AACnE,QAAA,WAAW,EAAE,aAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;AACnE,QAAA,gBAAgB,EAAE,aAAa,CAAC,UAAU,EAAE,iCAAiC,CAAC;AAC9E,QAAA,iBAAiB,EAAE,aAAa,CAAC,UAAU,EAAE,kCAAkC,CAAC;AAChF,QAAA,WAAW,EAAE,aAAa,CAAC,UAAU,EAAE,mCAAmC,CAAC;AAC3E,QAAA,UAAU,EAAE,aAAa,CAAC,UAAU,EAAE,0BAA0B,CAAC;AAEjE,QAAA,WAAW,EAAE,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC;AACtD,QAAA,iBAAiB,EAAE,aAAa,CAAC,UAAU,EAAE,qBAAqB,CAAC;AACnE,QAAA,kBAAkB,EAAE,aAAa,CAAC,UAAU,EAAE,sBAAsB,CAAC;AAErE,QAAA,KAAK,EAAE,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC;AACzC,QAAA,WAAW,EAAE,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC;AACtD,QAAA,YAAY,EAAE,aAAa,CAAC,UAAU,EAAE,eAAe,CAAC;KAC3D;AACL;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import {\n cloneElement,\n isValidElement,\n type ReactNode,\n type RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { fnUtils, getDataTestId, useIsMounted } from '@alfalab/core-components-shared';\nimport { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';\n\nimport { DEFAULT_SEPARATOR } from './consts';\nimport {\n type BaseSelectProps,\n type GroupShape,\n type OptionShape,\n type OptionsListProps,\n} from './typings';\n\nexport const isGroup = (item: OptionShape | GroupShape): item is GroupShape =>\n Object.prototype.hasOwnProperty.call(item, 'options');\n\nexport const isOptionShape = (item: OptionShape | string | null): item is OptionShape =>\n !!item && Object.prototype.hasOwnProperty.call(item, 'key');\n\nexport const joinOptions = ({\n selected,\n selectedMultiple,\n valueSeparator = DEFAULT_SEPARATOR,\n}: {\n selected?: OptionShape;\n selectedMultiple?: OptionShape[];\n valueSeparator?: string;\n}) => {\n const options = selectedMultiple || (selected ? [selected] : []);\n\n if (!options.length) return null;\n\n return options.reduce((acc: Array<ReactNode | string>, option: OptionShape, index: number) => {\n if (isValidElement(option.content)) {\n acc.push(cloneElement(option.content, { key: option.key }));\n } else {\n acc.push(option.content);\n }\n\n if (index < options.length - 1) acc.push(valueSeparator);\n\n return acc;\n }, []);\n};\n\n// За один проход делает список пунктов меню плоским и находит выбранные пункты по ключу\nexport function processOptions(\n options: BaseSelectProps['options'],\n selected: BaseSelectProps['selected'] = [],\n filterFn: (option: OptionShape | GroupShape) => boolean = () => true,\n filterGroup = false,\n) {\n const flatOptions: OptionShape[] = [];\n const filteredOptions: BaseSelectProps['options'] = [];\n\n const selectedArray = Array.isArray(selected) ? selected : [selected];\n const selectedOptions = selectedArray.filter(isOptionShape);\n const selectedKeys = selectedArray.filter(\n (option): option is string => typeof option === 'string',\n );\n\n const isSelected = (option: OptionShape) => selectedKeys.includes(option.key);\n\n const process = (option: OptionShape | GroupShape) => {\n const isGroupOption = isGroup(option);\n\n if (!isGroupOption && isSelected(option)) {\n selectedOptions.push(option);\n }\n\n if (!filterFn(option)) return false;\n\n if (isGroupOption) {\n if (filterGroup) {\n Array.prototype.push.apply(flatOptions, option.options);\n }\n } else {\n flatOptions.push(option);\n }\n\n return true;\n };\n\n options.forEach((option) => {\n if (isGroup(option)) {\n const group: GroupShape = {\n ...option,\n options: [],\n };\n\n option.options.forEach((groupOption) => {\n const matched = process(groupOption);\n\n if (matched) group.options.push(groupOption);\n });\n\n if (group.options.length) {\n filteredOptions.push(group);\n\n return;\n }\n\n if (!filterGroup) return;\n }\n const matched = process(option);\n\n if (matched) filteredOptions.push(option);\n });\n\n return { filteredOptions, flatOptions, selectedOptions };\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\ntype useVisibleOptionsArgs = {\n /**\n * Количество видимых пунктов\n */\n visibleOptions: number;\n\n /**\n * Реф на контейнер с пунтами меню\n */\n listRef: RefObject<HTMLElement>;\n\n /**\n * Реф на контейнер, которому нужно установить высоту\n */\n styleTargetRef?: RefObject<HTMLElement>;\n\n /**\n * Флаг открытия меню\n */\n open?: boolean;\n\n /**\n * Позволяет вызвать пересчет высоты\n */\n invalidate?: unknown;\n\n /**\n * Список вариантов выбора\n */\n options?: Array<OptionShape | GroupShape>;\n\n /**\n * Максимальный размер варианта выбора\n */\n size?: Extract<OptionsListProps['size'], number>;\n\n /**\n * Учитывать действительное число вариантов выбора\n */\n actualOptionsCount?: boolean;\n};\n\n// copy-paste of original `useVisibleOptions` before https://github.com/core-ds/core-components/pull/1368\nexport function useVirtualVisibleOptions({\n visibleOptions,\n listRef,\n styleTargetRef = listRef,\n open,\n invalidate,\n options,\n size,\n actualOptionsCount,\n}: useVisibleOptionsArgs) {\n useEffect(() => {\n const measureOptionHeight = (element: HTMLElement) =>\n typeof size === 'number' ? Math.min(element.clientHeight, size) : element.clientHeight;\n\n const list = listRef.current;\n const styleTarget = styleTargetRef.current;\n\n if (open && list && styleTarget && visibleOptions > 0) {\n const childCount = list.children.length;\n const optionsNodes = ([] as HTMLElement[]).slice.call(\n list.children,\n 0,\n visibleOptions + 1,\n );\n\n let height = optionsNodes\n .slice(0, visibleOptions)\n .reduce((acc, child) => acc + measureOptionHeight(child), 0);\n\n if (visibleOptions < childCount) {\n const lastVisibleOptionHeight = measureOptionHeight(\n optionsNodes[optionsNodes.length - 1],\n );\n\n // Если кол-во опций больше visibleOptions на 1, то показываем все опции, иначе добавляем половинку\n height += Math.round(\n childCount - visibleOptions === 1\n ? lastVisibleOptionHeight\n : lastVisibleOptionHeight / 2,\n );\n } else if (\n visibleOptions > childCount &&\n actualOptionsCount &&\n typeof size === 'number'\n ) {\n const actualCount = (options ?? []).reduce(\n (sum, option) => sum + 1 + (isGroup(option) ? option.options.length : 0),\n 0,\n );\n\n height =\n Math.min(\n actualCount === 0 ? /** empty placeholder */ 1 : actualCount,\n visibleOptions,\n ) * size;\n\n if (visibleOptions < actualCount) {\n height += size / 2;\n }\n }\n\n styleTarget.style.height = `${height}px`;\n }\n }, [\n actualOptionsCount,\n listRef,\n open,\n options,\n size,\n styleTargetRef,\n visibleOptions,\n invalidate,\n ]);\n}\n\nexport function useVisibleOptions({\n visibleOptions,\n listRef,\n open,\n options,\n size,\n actualOptionsCount,\n}: useVisibleOptionsArgs) {\n const [, runIfMounted] = useIsMounted();\n const [measured, setMeasured] = useState(false);\n const [height, setHeight] = useState<number | undefined>();\n\n useLayoutEffect_SAFE_FOR_SSR(() => {\n const measureOptionHeight = (element: HTMLElement) =>\n typeof size === 'number' ? Math.min(element.clientHeight, size) : element.clientHeight;\n\n const list = listRef.current;\n\n if (open && list && visibleOptions > 0) {\n const childCount = list.children.length;\n const optionsNodes = ([] as HTMLElement[]).slice.call(\n list.children,\n 0,\n visibleOptions + 1,\n );\n\n let measuredHeight = optionsNodes\n .slice(0, visibleOptions)\n .reduce((acc, child) => acc + measureOptionHeight(child), 0);\n\n if (visibleOptions < childCount) {\n const lastVisibleOptionHeight = measureOptionHeight(\n optionsNodes[optionsNodes.length - 1],\n );\n\n // Если кол-во опций больше visibleOptions на 1, то показываем все опции, иначе добавляем половинку\n measuredHeight += Math.round(\n childCount - visibleOptions === 1\n ? lastVisibleOptionHeight\n : lastVisibleOptionHeight / 2,\n );\n } else if (\n visibleOptions > childCount &&\n actualOptionsCount &&\n typeof size === 'number'\n ) {\n const actualCount = (options ?? []).reduce(\n (sum, option) => sum + 1 + (isGroup(option) ? option.options.length : 0),\n 0,\n );\n\n measuredHeight =\n Math.min(\n actualCount === 0 ? /** empty placeholder */ 1 : actualCount,\n visibleOptions,\n ) * size;\n\n if (visibleOptions < actualCount) {\n measuredHeight += size / 2;\n }\n }\n\n setHeight(measuredHeight);\n\n setMeasured(true);\n\n return () => {\n runIfMounted(() => setMeasured(false));\n };\n }\n\n return fnUtils.noop;\n }, [actualOptionsCount, listRef, open, options, size, visibleOptions, runIfMounted]);\n\n return [measured, height] as const;\n}\n\nexport function defaultFilterFn(optionText: string, search: string) {\n if (!search) return true;\n\n return optionText.toLowerCase().includes(search.toLowerCase());\n}\n\nexport function defaultGroupAccessor(option: GroupShape) {\n return option.label;\n}\n\nexport function defaultAccessor(option: OptionShape) {\n if (typeof option.content === 'string') return option.content;\n if (typeof option.value === 'string') return option.value;\n\n return option.key;\n}\n\n// TODO: перенести\nexport function usePrevious<T>(value: T) {\n const ref = useRef<T>();\n\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n}\n\n// TODO: перенести\nexport const lastIndexOf = <T>(array: T[], predicate: (item: T) => boolean) => {\n for (let i = array.length - 1; i >= 0; i--) {\n if (predicate(array[i])) return i;\n }\n\n return -1;\n};\n\nexport function getSelectTestIds(dataTestId: string) {\n return {\n select: dataTestId,\n option: getDataTestId(dataTestId, 'option'),\n optionsList: getDataTestId(dataTestId, 'options-list'),\n clearButton: getDataTestId(dataTestId, 'options-list-clear'),\n applyButton: getDataTestId(dataTestId, 'options-list-apply'),\n field: getDataTestId(dataTestId, 'field'),\n fieldFormControl: getDataTestId(dataTestId, 'field-form-control'),\n fieldLeftAddons: getDataTestId(dataTestId, 'field-form-control-left-addons'),\n fieldRightAddons: getDataTestId(dataTestId, 'field-form-control-right-addons'),\n fieldError: getDataTestId(dataTestId, 'field-form-control-error-message'),\n fieldHint: getDataTestId(dataTestId, 'field-form-control-hint'),\n fieldClearIcon: getDataTestId(dataTestId, 'field-clear-icon'),\n searchInput: getDataTestId(dataTestId, 'search'),\n searchFormControl: getDataTestId(dataTestId, 'search-form-control'),\n searchInner: getDataTestId(dataTestId, 'search-form-control-inner'),\n searchLeftAddons: getDataTestId(dataTestId, 'search-form-control-left-addons'),\n searchRightAddons: getDataTestId(dataTestId, 'search-form-control-right-addons'),\n searchError: getDataTestId(dataTestId, 'search-form-control-error-message'),\n searchHint: getDataTestId(dataTestId, 'search-form-control-hint'),\n\n bottomSheet: getDataTestId(dataTestId, 'bottom-sheet'),\n bottomSheetHeader: getDataTestId(dataTestId, 'bottom-sheet-header'),\n bottomSheetContent: getDataTestId(dataTestId, 'bottom-sheet-content'),\n\n modal: getDataTestId(dataTestId, 'modal'),\n modalHeader: getDataTestId(dataTestId, 'modal-header'),\n modalContent: getDataTestId(dataTestId, 'modal-content'),\n };\n}\n"],"names":[],"mappings":";;;;;MAqBa,OAAO,GAAG,CAAC,IAA8B,KAClD,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS;AAE3C,MAAA,aAAa,GAAG,CAAC,IAAiC,KAC3D,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK;AAEvD,MAAM,WAAW,GAAG,CAAC,EACxB,QAAQ,EACR,gBAAgB,EAChB,cAAc,GAAG,iBAAiB,GAKrC,KAAI;AACD,IAAA,MAAM,OAAO,GAAG,gBAAgB,KAAK,QAAQ,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;IAEhE,IAAI,CAAC,OAAO,CAAC,MAAM;AAAE,QAAA,OAAO,IAAI;IAEhC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,GAA8B,EAAE,MAAmB,EAAE,KAAa,KAAI;AACzF,QAAA,IAAI,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;AAChC,YAAA,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;;aACxD;AACH,YAAA,GAAG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AAc,CAAC;AACtD,QAAA,YAAY,EAAE,aAAa,CAAC,UAAU,EAAE,eAAe,CAAC;KAC3D;AACL;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { type SelectProps } from './typings';
3
3
  export declare const SelectResponsive: React.ForwardRefExoticComponent<(SelectProps & {
4
- originalProps?: SelectProps | undefined;
4
+ originalProps?: SelectProps;
5
5
  }) & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Component.responsive.js","sources":["../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { SelectDesktop } from './desktop';\nimport { SelectMobile } from './mobile';\nimport { type SelectFieldProps, type SelectProps } from './typings';\n\nexport const SelectResponsive = forwardRef<\n HTMLDivElement,\n SelectProps & { originalProps?: SelectProps }\n>(\n (\n {\n onScroll,\n fieldProps,\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n if (isDesktop) {\n return (\n <SelectDesktop\n onScroll={onScroll}\n {...restProps}\n ref={ref}\n fieldProps={fieldProps as SelectFieldProps}\n />\n );\n }\n\n const mobileProps = {\n ...restProps,\n /* В мобильную версию хук уже зашит, и это единственный передать в мобилку оригинальные пропсы */\n ...restProps.originalProps,\n };\n\n return <SelectMobile fieldProps={fieldProps} {...mobileProps} ref={ref} />;\n },\n);\n\nSelectResponsive.displayName = 'SelectResponsive';\n"],"names":[],"mappings":";;;;;;AAQa,MAAA,gBAAgB,GAAG,UAAU,CAItC,CACI,EACI,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,sBAAsB,GAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,EAChF,GAAG,SAAS,EACf,EACD,GAAG,KACH;IACA,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;AAElE,IAAA,IAAI,SAAS,EAAE;AACX,QAAA,QACI,KAAC,CAAA,aAAA,CAAA,aAAa,IACV,QAAQ,EAAE,QAAQ,EACd,GAAA,SAAS,EACb,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAA8B,EAAA,CAC5C;AAET;AAED,IAAA,MAAM,WAAW,GAAG;AAChB,QAAA,GAAG,SAAS;;QAEZ,GAAG,SAAS,CAAC,aAAa;KAC7B;AAED,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,YAAY,EAAC,EAAA,UAAU,EAAE,UAAU,EAAM,GAAA,WAAW,EAAE,GAAG,EAAE,GAAG,GAAI;AAC9E,CAAC;AAGL,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
1
+ {"version":3,"file":"Component.responsive.js","sources":["../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { SelectDesktop } from './desktop';\nimport { SelectMobile } from './mobile';\nimport { type SelectFieldProps, type SelectProps } from './typings';\n\nexport const SelectResponsive = forwardRef<\n HTMLDivElement,\n SelectProps & { originalProps?: SelectProps }\n>(\n (\n {\n onScroll,\n fieldProps,\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n if (isDesktop) {\n return (\n <SelectDesktop\n onScroll={onScroll}\n {...restProps}\n ref={ref}\n fieldProps={fieldProps as SelectFieldProps}\n />\n );\n }\n\n const mobileProps = {\n ...restProps,\n /* В мобильную версию хук уже зашит, и это единственный передать в мобилку оригинальные пропсы */\n ...restProps.originalProps,\n };\n\n return <SelectMobile fieldProps={fieldProps} {...mobileProps} ref={ref} />;\n },\n);\n\nSelectResponsive.displayName = 'SelectResponsive';\n"],"names":[],"mappings":";;;;;;AAQa,MAAA,gBAAgB,GAAG,UAAU,CAItC,CACI,EACI,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,sBAAsB,GAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,EAChF,GAAG,SAAS,EACf,EACD,GAAG,KACH;IACA,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAElE,IAAI,SAAS,EAAE;AACX,QAAA,QACI,KAAC,CAAA,aAAA,CAAA,aAAa,IACV,QAAQ,EAAE,QAAQ,EACd,GAAA,SAAS,EACb,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAA8B,EAAA,CAC5C;;AAIV,IAAA,MAAM,WAAW,GAAG;AAChB,QAAA,GAAG,SAAS;;QAEZ,GAAG,SAAS,CAAC,aAAa;KAC7B;AAED,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,YAAY,EAAC,EAAA,UAAU,EAAE,UAAU,EAAM,GAAA,WAAW,EAAE,GAAG,EAAE,GAAG,GAAI;AAC9E,CAAC;AAGL,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
@@ -15,7 +15,8 @@
15
15
  font-size: 16px;
16
16
  line-height: 20px;
17
17
  font-weight: 400;
18
- font-family: var(--font-family-system);
18
+ letter-spacing: -0.24px;
19
+ font-family: var(--font-family-alfasans);
19
20
 
20
21
  display: flex;
21
22
  align-items: center;
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  export declare const BaseSelect: React.ForwardRefExoticComponent<import("../../typings").BaseSelectProps & import("../../typings").AdditionalMobileProps & import("../../typings").BottomSheetSelectMobileProps & import("../../typings").ModalSelectMobileProps & {
3
- isBottomSheet?: boolean | undefined;
3
+ isBottomSheet?: boolean;
4
4
  view: "desktop" | "mobile";
5
- Popover?: React.ForwardRefExoticComponent<import("@alfalab/core-components-popover").PopoverProps & React.RefAttributes<HTMLDivElement>> | undefined;
6
- BottomSheet?: React.ForwardRefExoticComponent<import("@alfalab/core-components-bottom-sheet").BottomSheetProps & React.RefAttributes<HTMLDivElement>> | undefined;
7
- ModalMobile?: (React.ForwardRefExoticComponent<import("@alfalab/core-components-modal/typings").ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
5
+ Popover?: React.ForwardRefExoticComponent<import("@alfalab/core-components-popover").PopoverProps & React.RefAttributes<HTMLDivElement>>;
6
+ BottomSheet?: React.ForwardRefExoticComponent<import("@alfalab/core-components-bottom-sheet").BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
7
+ ModalMobile?: React.ForwardRefExoticComponent<import("@alfalab/core-components-modal/typings").ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
8
8
  Header: React.FC<import("@alfalab/core-components-modal/shared").ModalHeaderProps>;
9
9
  Footer: React.FC<import("@alfalab/core-components-modal/shared").ModalFooterProps>;
10
10
  Content: React.FC<import("@alfalab/core-components-modal/typings").ContentProps>;
11
- }) | undefined;
11
+ };
12
12
  } & React.RefAttributes<unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/base-select/Component.tsx"],"sourcesContent":["/* eslint-disable no-nested-ternary */\nimport React, {\n type AriaAttributes,\n type FocusEvent,\n forwardRef,\n type KeyboardEvent,\n type MouseEvent,\n type RefAttributes,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport { ResizeObserver as ResizeObserverPolyfill } from '@juggle/resize-observer';\nimport cn from 'classnames';\nimport { compute } from 'compute-scroll-into-view';\nimport {\n useCombobox,\n useMultipleSelection,\n type UseMultipleSelectionProps,\n type UseMultipleSelectionState,\n} from 'downshift';\n\nimport { fnUtils, getDataTestId, isClient } from '@alfalab/core-components-shared';\nimport { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';\n\nimport {\n type AnyObject,\n type OptionShape,\n type OptionsListProps,\n type SearchProps,\n} from '../../typings';\nimport {\n defaultAccessor,\n defaultFilterFn,\n defaultGroupAccessor,\n isGroup,\n processOptions,\n} from '../../utils';\nimport { NativeSelect } from '../native-select';\n\nimport { type ComponentProps } from './types/component-types';\n\nimport styles from './index.module.css';\nimport mobileStyles from './mobile.module.css';\n\nconst itemToString = (option: OptionShape | null) => (option ? option.key : '');\n\nconst isItemDisabled = (option: OptionShape | null) => Boolean(option?.disabled);\n\nexport const BaseSelect = forwardRef<unknown, ComponentProps>(\n // TODO: 😭\n // eslint-disable-next-line complexity\n (props, ref) => {\n const {\n dataTestId,\n className,\n fieldClassName,\n optionGroupClassName,\n optionsListClassName,\n optionClassName,\n popperClassName,\n options,\n autocomplete = false,\n multiple = false,\n allowUnselect = false,\n disabled = false,\n closeOnSelect = !multiple,\n circularNavigation = false,\n nativeSelect = false,\n defaultOpen = false,\n open: openProp,\n popoverPosition = 'bottom-start',\n preventFlip = true,\n optionsListWidth = 'content',\n name,\n id,\n selected,\n size = 48,\n optionsSize = size,\n error,\n hint,\n block,\n label,\n labelView,\n placeholder,\n fieldProps = {},\n optionsListProps = {},\n optionProps = {},\n groupOptionProps = {},\n searchProps = {},\n showSearch = false,\n valueRenderer,\n onChange,\n onOpen,\n onFocus,\n onBlur,\n onScroll,\n onClear,\n clear,\n Arrow,\n Field = () => null,\n OptionsList = () => null,\n Optgroup = () => null,\n Option = () => null,\n Search = () => null,\n updatePopover,\n zIndexPopover,\n showEmptyOptionsList = false,\n visibleOptions,\n view,\n isBottomSheet = true,\n footer,\n swipeable,\n modalProps,\n popoverProps,\n modalFooterProps,\n modalHeaderProps,\n bottomSheetProps,\n Popover,\n ModalMobile,\n BottomSheet,\n limitDynamicOptionGroupSize,\n environment = isClient() ? window : undefined,\n } = props;\n const shouldSearchBlurRef = useRef(true);\n const rootRef = useRef<HTMLDivElement>(null);\n const fieldRef = useRef<HTMLInputElement>(null);\n const listRef = useRef<HTMLDivElement>(null);\n const initiatorRef = useRef<OptionShape | null>(null);\n const searchRef = useRef<HTMLInputElement>(null);\n const scrollableContainerRef = useRef<HTMLDivElement>(null);\n const onOpenRef = useRef(onOpen);\n\n const [searchState, setSearchState] = React.useState('');\n\n const [search, setSearch] =\n typeof searchProps?.value === 'string'\n ? [searchProps.value, searchProps.onChange]\n : [searchState, setSearchState];\n\n const accessor = searchProps.accessor || defaultAccessor;\n const filterFn = searchProps.filterFn || defaultFilterFn;\n const filterGroup = searchProps.filterGroup ?? false;\n const groupAccessor = searchProps.groupAccessor ?? defaultGroupAccessor;\n\n const { filteredOptions, flatOptions, selectedOptions } = useMemo(\n () =>\n processOptions(\n options,\n selected,\n (option) => {\n if (isGroup(option)) {\n const groupAccessorValue = groupAccessor(option);\n\n return (\n typeof groupAccessorValue === 'string' &&\n filterFn(groupAccessorValue, search)\n );\n }\n\n return filterFn(accessor(option), search);\n },\n filterGroup,\n ),\n [options, selected, filterFn, accessor, search, filterGroup, groupAccessor],\n );\n\n const scrollIntoView = (node: HTMLElement) => {\n if (!node || view === 'mobile') return;\n\n requestAnimationFrame(() => {\n const actions = compute(node, {\n boundary: listRef.current,\n block: 'nearest',\n scrollMode: 'if-needed',\n });\n\n actions.forEach((action) => {\n const { el, top } = action;\n\n el.scrollTop = top;\n });\n });\n };\n\n const useMultipleSelectionProps: UseMultipleSelectionProps<OptionShape> = {\n itemToString,\n onSelectedItemsChange: (changes) => {\n if (onChange) {\n const { selectedItems = [] } = changes;\n\n onChange({\n selectedMultiple: selectedItems,\n selected: selectedItems.length ? selectedItems[0] : null,\n initiator: initiatorRef.current,\n name,\n });\n\n initiatorRef.current = null;\n }\n },\n stateReducer: (state, actionAndChanges) => {\n const { type, changes } = actionAndChanges;\n\n if (\n type === useMultipleSelection.stateChangeTypes.DropdownKeyDownBackspace &&\n (!allowUnselect ||\n environment?.document.activeElement?.isSameNode(searchRef.current))\n ) {\n return state;\n }\n\n return changes as UseMultipleSelectionState<OptionShape>;\n },\n };\n\n if (selected !== undefined) {\n useMultipleSelectionProps.selectedItems = selectedOptions;\n }\n\n onOpenRef.current = onOpen;\n\n const {\n selectedItems,\n addSelectedItem,\n setSelectedItems,\n removeSelectedItem,\n getDropdownProps,\n } = useMultipleSelection(useMultipleSelectionProps);\n\n const {\n isOpen: open,\n getMenuProps,\n getInputProps,\n getItemProps,\n getLabelProps,\n highlightedIndex,\n toggleMenu,\n openMenu,\n closeMenu,\n setHighlightedIndex,\n } = useCombobox<OptionShape>({\n id,\n isOpen: openProp,\n items: flatOptions,\n itemToString,\n isItemDisabled,\n defaultHighlightedIndex: selectedItems.length === 0 ? -1 : undefined,\n scrollIntoView,\n environment,\n onSelectedItemChange: (changes) => {\n const selectedItem = changes.selectedItem || initiatorRef.current;\n\n if (selectedItem && !selectedItem.disabled) {\n const alreadySelected = selectedItems.includes(selectedItem);\n const allowRemove = allowUnselect || (multiple && selectedItems.length > 1);\n\n if (alreadySelected && allowRemove) {\n removeSelectedItem(selectedItem);\n }\n\n if (!alreadySelected) {\n if (multiple) {\n addSelectedItem(selectedItem);\n } else {\n setSelectedItems([selectedItem]);\n }\n }\n }\n },\n onIsOpenChange: (changes) => {\n if (onOpenRef.current) {\n /**\n * Вызываем обработчик асинхронно.\n *\n * Иначе при клике вне открытого селекта сначала сработает onOpen, который закроет селект,\n * А затем сработает onClick кнопки открытия\\закрытия с open=false и в итоге селект откроется снова.\n */\n setTimeout(() => {\n onOpenRef.current?.({\n open: changes.isOpen,\n name,\n });\n }, 0);\n }\n\n if (showSearch) {\n if (changes.isOpen && view === 'desktop') {\n setTimeout(() => {\n searchRef.current?.focus();\n }, 0);\n } else {\n setSearch?.('');\n }\n }\n },\n stateReducer: (state, actionAndChanges) => {\n const { type, changes } = actionAndChanges;\n\n switch (type) {\n case useCombobox.stateChangeTypes.InputKeyDownArrowDown:\n if (\n !circularNavigation &&\n state.highlightedIndex === flatOptions.length - 1\n ) {\n return { ...changes, highlightedIndex: state.highlightedIndex };\n }\n\n return changes;\n case useCombobox.stateChangeTypes.InputKeyDownArrowUp:\n if (!circularNavigation && state.highlightedIndex === 0) {\n return { ...changes, highlightedIndex: state.highlightedIndex };\n }\n\n return changes;\n\n case useCombobox.stateChangeTypes.InputKeyDownEnter:\n case useCombobox.stateChangeTypes.ItemClick: {\n const { selectedItem } = changes;\n\n initiatorRef.current = selectedItem || null;\n\n return {\n ...changes,\n selectedItem: state.selectedItem === selectedItem ? null : selectedItem,\n isOpen: !closeOnSelect || (view === 'mobile' && multiple),\n // при closeOnSelect === false - сохраняем подсвеченный индекс\n highlightedIndex:\n state.isOpen && !closeOnSelect\n ? state.highlightedIndex\n : changes.highlightedIndex,\n };\n }\n default:\n return changes;\n }\n },\n });\n\n useEffect(() => {\n /*\n * При изменении openProp, состояние внутри downshift в useEnhancedReducer не меняется, поэтому меняем его таким способом\n * Скорее всего это исправят в будущих версиях downshift\n */\n if (openProp !== undefined) {\n if (openProp) {\n openMenu();\n } else {\n closeMenu();\n }\n }\n }, [openProp, openMenu, closeMenu]);\n\n const inputProps = getInputProps(getDropdownProps({ ref: mergeRefs([ref, fieldRef]) }));\n const { ref: menuRef, ...menuProps } = getMenuProps(\n { ref: listRef },\n { suppressRefError: true },\n );\n\n const handleEntered = (node: HTMLElement, isAppearing: boolean) => {\n if (showSearch) searchRef.current?.focus();\n\n if (isBottomSheet) {\n bottomSheetProps?.transitionProps?.onEntered?.(node, isAppearing);\n } else {\n modalProps?.transitionProps?.onEntered?.(node, isAppearing);\n }\n };\n\n const handleFieldFocus = (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => {\n if (onFocus) onFocus(event);\n\n if (autocomplete && !open) {\n openMenu();\n }\n };\n\n const handleFieldBlur = (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => {\n if (view === 'desktop') {\n const isNextFocusInsideField = fieldRef.current?.contains(\n (event.relatedTarget || document.activeElement) as HTMLElement,\n );\n\n const isNextFocusInsideList = listRef.current?.contains(\n (event.relatedTarget || document.activeElement) as HTMLElement,\n );\n\n if (!isNextFocusInsideField && !isNextFocusInsideList) {\n if (onBlur) onBlur(event);\n\n inputProps.onBlur?.(event);\n }\n }\n\n if (view === 'mobile' && !open && onBlur) onBlur(event);\n };\n\n const handleFieldKeyDown = (event: KeyboardEvent<HTMLDivElement | HTMLInputElement>) => {\n inputProps.onKeyDown?.(event);\n\n // https://caniuse.com/?search=KeyboardEvent.key\n const isKeyUnsupported = event.key === 'Unidentified';\n\n if (\n autocomplete &&\n !open &&\n (isKeyUnsupported || event.key.length === 1 || event.key === 'Backspace')\n ) {\n // Для автокомплита - открываем меню при начале ввода\n openMenu();\n }\n\n if (\n [' ', 'Enter'].includes(event.key) &&\n !autocomplete &&\n !nativeSelect &&\n (event.target as HTMLElement).tagName !== 'INPUT' &&\n (event.target as HTMLElement).tagName !== 'BUTTON' &&\n (event.target as HTMLElement).tagName !== 'TEXTAREA'\n ) {\n // Открываем\\закрываем меню по нажатию enter или пробела\n event.preventDefault();\n if (!open || highlightedIndex === -1) toggleMenu();\n }\n };\n\n const handleFieldClick = (event: MouseEvent) => {\n if (!autocomplete || (event.target as HTMLElement).tagName !== 'INPUT') {\n toggleMenu();\n } else {\n openMenu();\n }\n };\n\n const handleNativeSelectChange = useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n setSelectedItems(\n // eslint-disable-next-line\n [...(event.target.options as any)].reduce(\n (acc, option, index) =>\n option.selected ? acc.concat(flatOptions[index]) : acc,\n [],\n ),\n );\n },\n [flatOptions, setSelectedItems],\n );\n\n const getOptionProps = (option: OptionShape, index: number) => ({\n ...(optionProps as object),\n mobile: view === 'mobile',\n className: cn(optionClassName, {\n [mobileStyles.option]: view === 'mobile',\n }),\n innerProps: getItemProps({\n index,\n item: option,\n onMouseDown: (event: MouseEvent) => event.preventDefault(),\n onClick: () => {\n if (view === 'mobile' || !showSearch || multiple) return;\n shouldSearchBlurRef.current = false;\n searchRef.current?.blur();\n shouldSearchBlurRef.current = true;\n fieldRef.current?.focus();\n },\n }),\n multiple,\n index,\n option,\n size: optionsSize,\n disabled: option.disabled,\n highlighted: index === highlightedIndex,\n selected: selectedItems.some(({ key }) => key === option.key),\n dataTestId: getDataTestId(dataTestId, 'option'),\n });\n\n useEffect(() => {\n if (defaultOpen) openMenu();\n }, [defaultOpen, openMenu]);\n\n useEffect(() => {\n if (openProp) {\n openMenu();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const calcOptionsListWidth = useCallback(() => {\n if (view === 'desktop' && listRef.current) {\n const widthAttr = optionsListWidth === 'field' ? 'width' : 'minWidth';\n\n const optionsListMinWidth = rootRef.current\n ? rootRef.current.getBoundingClientRect().width\n : 0;\n\n listRef.current.removeAttribute('style');\n listRef.current.style[widthAttr] = `${optionsListMinWidth}px`;\n }\n }, [view, optionsListWidth]);\n\n useEffect(() => {\n if (view === 'desktop') {\n const ResizeObserver = window.ResizeObserver || ResizeObserverPolyfill;\n const observer = new ResizeObserver(calcOptionsListWidth);\n\n if (rootRef.current) {\n observer.observe(rootRef.current);\n }\n\n return () => {\n observer.disconnect();\n };\n }\n\n return fnUtils.noop;\n }, [view, calcOptionsListWidth, open, optionsListWidth]);\n\n useLayoutEffect_SAFE_FOR_SSR(calcOptionsListWidth, [\n open,\n optionsListWidth,\n filteredOptions,\n selectedItems,\n ]);\n\n const renderValue = () =>\n selectedItems.map((option) => (\n <input type='hidden' name={name} value={option.key} key={option.key} />\n ));\n\n const renderNativeSelect = () => {\n const value = multiple\n ? selectedItems.map((option) => option.key)\n : selectedItems[0]?.key;\n\n return (\n <NativeSelect\n {...(menuProps as AnyObject)}\n className={styles.nativeSelect}\n disabled={disabled}\n multiple={multiple}\n name={name}\n value={value}\n onChange={handleNativeSelectChange}\n options={filteredOptions}\n />\n );\n };\n\n const handleFieldClear = (event: MouseEvent<HTMLButtonElement>) => {\n setSelectedItems([]);\n onClear?.(event);\n };\n\n const renderSearch = () => {\n if (!showSearch) return null;\n\n const handleClear: SearchProps['onClear'] = (event) => {\n setSearch?.('');\n searchProps?.componentProps?.onClear?.(event);\n };\n\n const handleChange: SearchProps['onChange'] = (event, payload) => {\n setSearch?.(payload.value);\n searchProps?.componentProps?.onChange?.(event, payload);\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (!shouldSearchBlurRef.current) return;\n searchProps.componentProps?.onBlur?.(event);\n handleFieldBlur(event);\n };\n\n return (\n <Search\n {...searchProps?.componentProps}\n onBlur={handleBlur}\n value={search}\n onChange={handleChange}\n dataTestId={getDataTestId(dataTestId, 'search')}\n onClear={handleClear}\n className={cn(\n searchProps?.componentProps?.className,\n {\n [styles.search]: view === 'desktop',\n [mobileStyles.search]: view === 'mobile',\n },\n styles[`size-${size}`],\n )}\n ref={mergeRefs([searchRef, searchProps?.componentProps?.ref || null])}\n client={view}\n />\n );\n };\n\n const { header, emptyPlaceholder } = optionsListProps as OptionsListProps;\n\n const renderOptionsListHeader = () => {\n if (header || (view === 'desktop' && showSearch)) {\n return (\n <React.Fragment>\n {header}\n {view === 'desktop' && renderSearch()}\n </React.Fragment>\n );\n }\n\n return null;\n };\n\n const renderEmptyPlaceholder = () => {\n if (emptyPlaceholder) {\n return emptyPlaceholder;\n }\n\n if (showSearch) {\n return <div className={styles.emptySearchPlaceholder}>Ничего не нашлось</div>;\n }\n\n return undefined;\n };\n\n const renderOptionsList = () => {\n if (flatOptions.length === 0 && !showEmptyOptionsList && !showSearch) return null;\n\n const listProps = optionsListProps as OptionsListProps & RefAttributes<HTMLDivElement>;\n\n return (\n <div\n {...menuProps}\n ref={view === 'desktop' ? menuRef : undefined}\n className={cn(\n optionsListClassName,\n view === 'mobile' && mobileStyles.optionsListWrapper,\n view === 'desktop' && styles.optionsListWrapper,\n )}\n >\n <OptionsList\n {...listProps}\n ref={view === 'desktop' ? listProps.ref : scrollableContainerRef}\n setHighlightedIndex={view === 'desktop' ? setHighlightedIndex : undefined}\n className={cn(\n { [mobileStyles.optionsList]: view === 'mobile' },\n listProps.className,\n )}\n scrollbarClassName={cn(\n { [mobileStyles.scrollbar]: view === 'mobile' },\n listProps.scrollbarClassName,\n )}\n optionsListWidth={optionsListWidth}\n flatOptions={flatOptions}\n highlightedIndex={highlightedIndex}\n open={open}\n size={size}\n options={filteredOptions}\n Optgroup={Optgroup}\n Option={Option}\n selectedItems={selectedItems}\n setSelectedItems={setSelectedItems}\n toggleMenu={toggleMenu}\n groupOptionProps={groupOptionProps}\n getOptionProps={getOptionProps}\n visibleOptions={view === 'desktop' ? visibleOptions : 0}\n dataTestId={getDataTestId(dataTestId, 'options-list')}\n header={renderOptionsListHeader()}\n optionGroupClassName={cn(optionGroupClassName, {\n [mobileStyles.optionGroup]: view === 'mobile',\n })}\n emptyPlaceholder={renderEmptyPlaceholder()}\n onScroll={onScroll}\n search={search}\n multiple={multiple}\n limitDynamicOptionGroupSize={limitDynamicOptionGroupSize}\n client={view}\n />\n {view === 'desktop' && <div className={styles.optionsListBorder} />}\n </div>\n );\n };\n\n const renderInPopover = () => {\n if (!nativeSelect && Popover) {\n return (\n <Popover\n {...popoverProps}\n open={open}\n withTransition={false}\n anchorElement={fieldRef.current as HTMLElement}\n position={popoverPosition}\n preventFlip={preventFlip}\n popperClassName={cn(styles.popoverInner, popperClassName)}\n update={updatePopover}\n zIndex={zIndexPopover}\n >\n {renderOptionsList()}\n </Popover>\n );\n }\n\n return null;\n };\n\n const renderInBottomSheet = () => {\n if (!nativeSelect && BottomSheet) {\n const bottomAddons = bottomSheetProps?.bottomAddons;\n\n return (\n <BottomSheet\n dataTestId={getDataTestId(dataTestId, 'bottom-sheet')}\n open={open}\n className={mobileStyles.sheet}\n contentClassName={mobileStyles.sheetContent}\n containerClassName={mobileStyles.sheetContainer}\n title={label || placeholder}\n actionButton={footer ?? (multiple ? null : undefined)}\n stickyHeader={true}\n hasCloser={true}\n swipeable={swipeable}\n initialHeight={showSearch ? 'full' : 'default'}\n {...bottomSheetProps}\n sheetContainerRef={menuRef}\n scrollableContainerRef={scrollableContainerRef}\n onClose={() => {\n closeMenu();\n bottomSheetProps?.onClose?.();\n }}\n transitionProps={{\n ...bottomSheetProps?.transitionProps,\n onEntered: handleEntered,\n }}\n bottomAddons={\n <React.Fragment>\n {renderSearch()}\n {typeof bottomAddons === 'function'\n ? bottomAddons(flatOptions)\n : bottomAddons}\n </React.Fragment>\n }\n containerProps={{\n ...bottomSheetProps?.containerProps,\n onScroll,\n }}\n >\n {renderOptionsList()}\n </BottomSheet>\n );\n }\n\n return null;\n };\n\n const renderInModalMobile = () => {\n if (!nativeSelect && ModalMobile) {\n const bottomAddons = modalHeaderProps?.bottomAddons;\n\n return (\n <ModalMobile\n dataTestId={getDataTestId(dataTestId, 'modal')}\n open={open}\n hasCloser={true}\n {...modalProps}\n componentRef={menuRef}\n onClose={(...args) => {\n closeMenu();\n modalProps?.onClose?.(...args);\n }}\n contentClassName={cn(\n mobileStyles.sheetContent,\n modalProps?.contentClassName,\n )}\n ref={mergeRefs([\n scrollableContainerRef,\n modalProps?.ref as React.Ref<HTMLDivElement>,\n ])}\n wrapperProps={{\n ...modalProps?.wrapperProps,\n onScroll,\n }}\n transitionProps={{\n ...modalProps?.transitionProps,\n onEntered: handleEntered,\n }}\n >\n <ModalMobile.Header\n hasCloser={true}\n sticky={true}\n {...modalHeaderProps}\n title={undefined}\n bottomAddons={\n <React.Fragment>\n {renderSearch()}\n {typeof bottomAddons === 'function'\n ? bottomAddons(flatOptions)\n : bottomAddons}\n </React.Fragment>\n }\n >\n {modalHeaderProps?.title || label || placeholder}\n </ModalMobile.Header>\n\n <ModalMobile.Content flex={true} className={mobileStyles.modalContent}>\n {renderOptionsList()}\n </ModalMobile.Content>\n\n {modalFooterProps?.children && <ModalMobile.Footer {...modalFooterProps} />}\n </ModalMobile>\n );\n }\n\n return null;\n };\n\n return (\n <div\n {...(disabled && { 'aria-disabled': true })}\n aria-expanded={inputProps['aria-expanded']}\n aria-haspopup='listbox'\n role={inputProps.role}\n className={cn(styles.component, { [styles.block]: block }, className)}\n ref={rootRef}\n onKeyDown={disabled ? undefined : handleFieldKeyDown}\n tabIndex={-1}\n data-test-id={getDataTestId(dataTestId)}\n >\n {nativeSelect && renderNativeSelect()}\n\n <Field\n selectedMultiple={selectedItems}\n selected={selectedItems[0]}\n setSelectedItems={setSelectedItems}\n toggleMenu={toggleMenu}\n multiple={multiple}\n open={open}\n disabled={disabled}\n size={size}\n placeholder={placeholder}\n label={label && <span {...getLabelProps()}>{label}</span>}\n labelView={labelView}\n Arrow={Arrow && <Arrow open={open} size={size} disabled={disabled} />}\n error={error}\n hint={hint}\n valueRenderer={valueRenderer}\n className={fieldClassName}\n clear={clear}\n onClear={handleFieldClear}\n innerProps={{\n onBlur: handleFieldBlur,\n onFocus: disabled ? undefined : handleFieldFocus,\n onClick: disabled ? undefined : handleFieldClick,\n tabIndex: disabled ? undefined : nativeSelect ? -1 : 0,\n ref: inputProps.ref,\n id: inputProps.id,\n 'aria-label': (optionProps as AriaAttributes)['aria-label'],\n 'aria-labelledby': inputProps['aria-labelledby'],\n 'aria-controls': inputProps['aria-controls'],\n 'aria-autocomplete': autocomplete\n ? inputProps['aria-autocomplete']\n : undefined,\n }}\n dataTestId={getDataTestId(dataTestId, 'field')}\n {...(fieldProps as AnyObject)}\n />\n\n {name && !nativeSelect && renderValue()}\n\n {view === 'desktop' && renderInPopover()}\n {view === 'mobile' &&\n (isBottomSheet ? renderInBottomSheet() : renderInModalMobile())}\n </div>\n );\n },\n);\n"],"names":["ResizeObserver","ResizeObserverPolyfill"],"mappings":";;;;;;;;;;;;;AAAA;AA+CA,MAAM,YAAY,GAAG,CAAC,MAA0B,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC;AAE/E,MAAM,cAAc,GAAG,CAAC,MAA0B,KAAK,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;AAEzE,MAAM,UAAU,GAAG,UAAU;AAChC;AACA;AACA,CAAC,KAAK,EAAE,GAAG,KAAI;IACX,MAAM,EACF,UAAU,EACV,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,OAAO,EACP,YAAY,GAAG,KAAK,E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K,EAAE,KAAK,IAAI,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAI,CAAA,EACrE,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,cAAc,EACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE;AACR,gBAAA,MAAM,EAAE,eAAe;gBACvB,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,gBAAgB;gBAChD,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,gBAAgB;AAChD,gBAAA,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,EAAE,GAAG,CAAC;gBACtD,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,EAAE,EAAE,UAAU,CAAC,EAAE;AACjB,gBAAA,YAAY,EAAG,WAA8B,CAAC,YAAY,CAAC;AAC3D,gBAAA,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC;AAChD,gBAAA,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC;AAC5C,gBAAA,mBAAmB,EAAE;AACjB,sBAAE,UAAU,CAAC,mBAAmB;AAChC,sBAAE,SAAS;aAClB,EACD,UAAU,EAAE,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,EACzC,GAAA,UAAwB,EAC/B,CAAA;AAED,QAAA,IAAI,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE;AAEtC,QAAA,IAAI,KAAK,SAAS,IAAI,eAAe,EAAE;AACvC,QAAA,IAAI,KAAK,QAAQ;AACd,aAAC,aAAa,GAAG,mBAAmB,EAAE,GAAG,mBAAmB,EAAE,CAAC,CACjE;AAEd,CAAC;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/base-select/Component.tsx"],"sourcesContent":["/* eslint-disable no-nested-ternary */\nimport React, {\n type AriaAttributes,\n type FocusEvent,\n forwardRef,\n type KeyboardEvent,\n type MouseEvent,\n type RefAttributes,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport { ResizeObserver as ResizeObserverPolyfill } from '@juggle/resize-observer';\nimport cn from 'classnames';\nimport { compute } from 'compute-scroll-into-view';\nimport {\n useCombobox,\n useMultipleSelection,\n type UseMultipleSelectionProps,\n type UseMultipleSelectionState,\n} from 'downshift';\n\nimport { fnUtils, getDataTestId, isClient } from '@alfalab/core-components-shared';\nimport { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';\n\nimport {\n type AnyObject,\n type OptionShape,\n type OptionsListProps,\n type SearchProps,\n} from '../../typings';\nimport {\n defaultAccessor,\n defaultFilterFn,\n defaultGroupAccessor,\n isGroup,\n processOptions,\n} from '../../utils';\nimport { NativeSelect } from '../native-select';\n\nimport { type ComponentProps } from './types/component-types';\n\nimport styles from './index.module.css';\nimport mobileStyles from './mobile.module.css';\n\nconst itemToString = (option: OptionShape | null) => (option ? option.key : '');\n\nconst isItemDisabled = (option: OptionShape | null) => Boolean(option?.disabled);\n\nexport const BaseSelect = forwardRef<unknown, ComponentProps>(\n // TODO: 😭\n // eslint-disable-next-line complexity\n (props, ref) => {\n const {\n dataTestId,\n className,\n fieldClassName,\n optionGroupClassName,\n optionsListClassName,\n optionClassName,\n popperClassName,\n options,\n autocomplete = false,\n multiple = false,\n allowUnselect = false,\n disabled = false,\n closeOnSelect = !multiple,\n circularNavigation = false,\n nativeSelect = false,\n defaultOpen = false,\n open: openProp,\n popoverPosition = 'bottom-start',\n preventFlip = true,\n optionsListWidth = 'content',\n name,\n id,\n selected,\n size = 48,\n optionsSize = size,\n error,\n hint,\n block,\n label,\n labelView,\n placeholder,\n fieldProps = {},\n optionsListProps = {},\n optionProps = {},\n groupOptionProps = {},\n searchProps = {},\n showSearch = false,\n valueRenderer,\n onChange,\n onOpen,\n onFocus,\n onBlur,\n onScroll,\n onClear,\n clear,\n Arrow,\n Field = () => null,\n OptionsList = () => null,\n Optgroup = () => null,\n Option = () => null,\n Search = () => null,\n updatePopover,\n zIndexPopover,\n showEmptyOptionsList = false,\n visibleOptions,\n view,\n isBottomSheet = true,\n footer,\n swipeable,\n modalProps,\n popoverProps,\n modalFooterProps,\n modalHeaderProps,\n bottomSheetProps,\n Popover,\n ModalMobile,\n BottomSheet,\n limitDynamicOptionGroupSize,\n environment = isClient() ? window : undefined,\n } = props;\n const shouldSearchBlurRef = useRef(true);\n const rootRef = useRef<HTMLDivElement>(null);\n const fieldRef = useRef<HTMLInputElement>(null);\n const listRef = useRef<HTMLDivElement>(null);\n const initiatorRef = useRef<OptionShape | null>(null);\n const searchRef = useRef<HTMLInputElement>(null);\n const scrollableContainerRef = useRef<HTMLDivElement>(null);\n const onOpenRef = useRef(onOpen);\n\n const [searchState, setSearchState] = React.useState('');\n\n const [search, setSearch] =\n typeof searchProps?.value === 'string'\n ? [searchProps.value, searchProps.onChange]\n : [searchState, setSearchState];\n\n const accessor = searchProps.accessor || defaultAccessor;\n const filterFn = searchProps.filterFn || defaultFilterFn;\n const filterGroup = searchProps.filterGroup ?? false;\n const groupAccessor = searchProps.groupAccessor ?? defaultGroupAccessor;\n\n const { filteredOptions, flatOptions, selectedOptions } = useMemo(\n () =>\n processOptions(\n options,\n selected,\n (option) => {\n if (isGroup(option)) {\n const groupAccessorValue = groupAccessor(option);\n\n return (\n typeof groupAccessorValue === 'string' &&\n filterFn(groupAccessorValue, search)\n );\n }\n\n return filterFn(accessor(option), search);\n },\n filterGroup,\n ),\n [options, selected, filterFn, accessor, search, filterGroup, groupAccessor],\n );\n\n const scrollIntoView = (node: HTMLElement) => {\n if (!node || view === 'mobile') return;\n\n requestAnimationFrame(() => {\n const actions = compute(node, {\n boundary: listRef.current,\n block: 'nearest',\n scrollMode: 'if-needed',\n });\n\n actions.forEach((action) => {\n const { el, top } = action;\n\n el.scrollTop = top;\n });\n });\n };\n\n const useMultipleSelectionProps: UseMultipleSelectionProps<OptionShape> = {\n itemToString,\n onSelectedItemsChange: (changes) => {\n if (onChange) {\n const { selectedItems = [] } = changes;\n\n onChange({\n selectedMultiple: selectedItems,\n selected: selectedItems.length ? selectedItems[0] : null,\n initiator: initiatorRef.current,\n name,\n });\n\n initiatorRef.current = null;\n }\n },\n stateReducer: (state, actionAndChanges) => {\n const { type, changes } = actionAndChanges;\n\n if (\n type === useMultipleSelection.stateChangeTypes.DropdownKeyDownBackspace &&\n (!allowUnselect ||\n environment?.document.activeElement?.isSameNode(searchRef.current))\n ) {\n return state;\n }\n\n return changes as UseMultipleSelectionState<OptionShape>;\n },\n };\n\n if (selected !== undefined) {\n useMultipleSelectionProps.selectedItems = selectedOptions;\n }\n\n onOpenRef.current = onOpen;\n\n const {\n selectedItems,\n addSelectedItem,\n setSelectedItems,\n removeSelectedItem,\n getDropdownProps,\n } = useMultipleSelection(useMultipleSelectionProps);\n\n const {\n isOpen: open,\n getMenuProps,\n getInputProps,\n getItemProps,\n getLabelProps,\n highlightedIndex,\n toggleMenu,\n openMenu,\n closeMenu,\n setHighlightedIndex,\n } = useCombobox<OptionShape>({\n id,\n isOpen: openProp,\n items: flatOptions,\n itemToString,\n isItemDisabled,\n defaultHighlightedIndex: selectedItems.length === 0 ? -1 : undefined,\n scrollIntoView,\n environment,\n onSelectedItemChange: (changes) => {\n const selectedItem = changes.selectedItem || initiatorRef.current;\n\n if (selectedItem && !selectedItem.disabled) {\n const alreadySelected = selectedItems.includes(selectedItem);\n const allowRemove = allowUnselect || (multiple && selectedItems.length > 1);\n\n if (alreadySelected && allowRemove) {\n removeSelectedItem(selectedItem);\n }\n\n if (!alreadySelected) {\n if (multiple) {\n addSelectedItem(selectedItem);\n } else {\n setSelectedItems([selectedItem]);\n }\n }\n }\n },\n onIsOpenChange: (changes) => {\n if (onOpenRef.current) {\n /**\n * Вызываем обработчик асинхронно.\n *\n * Иначе при клике вне открытого селекта сначала сработает onOpen, который закроет селект,\n * А затем сработает onClick кнопки открытия\\закрытия с open=false и в итоге селект откроется снова.\n */\n setTimeout(() => {\n onOpenRef.current?.({\n open: changes.isOpen,\n name,\n });\n }, 0);\n }\n\n if (showSearch) {\n if (changes.isOpen && view === 'desktop') {\n setTimeout(() => {\n searchRef.current?.focus();\n }, 0);\n } else {\n setSearch?.('');\n }\n }\n },\n stateReducer: (state, actionAndChanges) => {\n const { type, changes } = actionAndChanges;\n\n switch (type) {\n case useCombobox.stateChangeTypes.InputKeyDownArrowDown:\n if (\n !circularNavigation &&\n state.highlightedIndex === flatOptions.length - 1\n ) {\n return { ...changes, highlightedIndex: state.highlightedIndex };\n }\n\n return changes;\n case useCombobox.stateChangeTypes.InputKeyDownArrowUp:\n if (!circularNavigation && state.highlightedIndex === 0) {\n return { ...changes, highlightedIndex: state.highlightedIndex };\n }\n\n return changes;\n\n case useCombobox.stateChangeTypes.InputKeyDownEnter:\n case useCombobox.stateChangeTypes.ItemClick: {\n const { selectedItem } = changes;\n\n initiatorRef.current = selectedItem || null;\n\n return {\n ...changes,\n selectedItem: state.selectedItem === selectedItem ? null : selectedItem,\n isOpen: !closeOnSelect || (view === 'mobile' && multiple),\n // при closeOnSelect === false - сохраняем подсвеченный индекс\n highlightedIndex:\n state.isOpen && !closeOnSelect\n ? state.highlightedIndex\n : changes.highlightedIndex,\n };\n }\n default:\n return changes;\n }\n },\n });\n\n useEffect(() => {\n /*\n * При изменении openProp, состояние внутри downshift в useEnhancedReducer не меняется, поэтому меняем его таким способом\n * Скорее всего это исправят в будущих версиях downshift\n */\n if (openProp !== undefined) {\n if (openProp) {\n openMenu();\n } else {\n closeMenu();\n }\n }\n }, [openProp, openMenu, closeMenu]);\n\n const inputProps = getInputProps(getDropdownProps({ ref: mergeRefs([ref, fieldRef]) }));\n const { ref: menuRef, ...menuProps } = getMenuProps(\n { ref: listRef },\n { suppressRefError: true },\n );\n\n const handleEntered = (node: HTMLElement, isAppearing: boolean) => {\n if (showSearch) searchRef.current?.focus();\n\n if (isBottomSheet) {\n bottomSheetProps?.transitionProps?.onEntered?.(node, isAppearing);\n } else {\n modalProps?.transitionProps?.onEntered?.(node, isAppearing);\n }\n };\n\n const handleFieldFocus = (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => {\n if (onFocus) onFocus(event);\n\n if (autocomplete && !open) {\n openMenu();\n }\n };\n\n const handleFieldBlur = (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => {\n if (view === 'desktop') {\n const isNextFocusInsideField = fieldRef.current?.contains(\n (event.relatedTarget || document.activeElement) as HTMLElement,\n );\n\n const isNextFocusInsideList = listRef.current?.contains(\n (event.relatedTarget || document.activeElement) as HTMLElement,\n );\n\n if (!isNextFocusInsideField && !isNextFocusInsideList) {\n if (onBlur) onBlur(event);\n\n inputProps.onBlur?.(event);\n }\n }\n\n if (view === 'mobile' && !open && onBlur) onBlur(event);\n };\n\n const handleFieldKeyDown = (event: KeyboardEvent<HTMLDivElement | HTMLInputElement>) => {\n inputProps.onKeyDown?.(event);\n\n // https://caniuse.com/?search=KeyboardEvent.key\n const isKeyUnsupported = event.key === 'Unidentified';\n\n if (\n autocomplete &&\n !open &&\n (isKeyUnsupported || event.key.length === 1 || event.key === 'Backspace')\n ) {\n // Для автокомплита - открываем меню при начале ввода\n openMenu();\n }\n\n if (\n [' ', 'Enter'].includes(event.key) &&\n !autocomplete &&\n !nativeSelect &&\n (event.target as HTMLElement).tagName !== 'INPUT' &&\n (event.target as HTMLElement).tagName !== 'BUTTON' &&\n (event.target as HTMLElement).tagName !== 'TEXTAREA'\n ) {\n // Открываем\\закрываем меню по нажатию enter или пробела\n event.preventDefault();\n if (!open || highlightedIndex === -1) toggleMenu();\n }\n };\n\n const handleFieldClick = (event: MouseEvent) => {\n if (!autocomplete || (event.target as HTMLElement).tagName !== 'INPUT') {\n toggleMenu();\n } else {\n openMenu();\n }\n };\n\n const handleNativeSelectChange = useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n setSelectedItems(\n // eslint-disable-next-line\n [...(event.target.options as any)].reduce(\n (acc, option, index) =>\n option.selected ? acc.concat(flatOptions[index]) : acc,\n [],\n ),\n );\n },\n [flatOptions, setSelectedItems],\n );\n\n const getOptionProps = (option: OptionShape, index: number) => ({\n ...(optionProps as object),\n mobile: view === 'mobile',\n className: cn(optionClassName, {\n [mobileStyles.option]: view === 'mobile',\n }),\n innerProps: getItemProps({\n index,\n item: option,\n onMouseDown: (event: MouseEvent) => event.preventDefault(),\n onClick: () => {\n if (view === 'mobile' || !showSearch || multiple) return;\n shouldSearchBlurRef.current = false;\n searchRef.current?.blur();\n shouldSearchBlurRef.current = true;\n fieldRef.current?.focus();\n },\n }),\n multiple,\n index,\n option,\n size: optionsSize,\n disabled: option.disabled,\n highlighted: index === highlightedIndex,\n selected: selectedItems.some(({ key }) => key === option.key),\n dataTestId: getDataTestId(dataTestId, 'option'),\n });\n\n useEffect(() => {\n if (defaultOpen) openMenu();\n }, [defaultOpen, openMenu]);\n\n useEffect(() => {\n if (openProp) {\n openMenu();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const calcOptionsListWidth = useCallback(() => {\n if (view === 'desktop' && listRef.current) {\n const widthAttr = optionsListWidth === 'field' ? 'width' : 'minWidth';\n\n const optionsListMinWidth = rootRef.current\n ? rootRef.current.getBoundingClientRect().width\n : 0;\n\n listRef.current.removeAttribute('style');\n listRef.current.style[widthAttr] = `${optionsListMinWidth}px`;\n }\n }, [view, optionsListWidth]);\n\n useEffect(() => {\n if (view === 'desktop') {\n const ResizeObserver = window.ResizeObserver || ResizeObserverPolyfill;\n const observer = new ResizeObserver(calcOptionsListWidth);\n\n if (rootRef.current) {\n observer.observe(rootRef.current);\n }\n\n return () => {\n observer.disconnect();\n };\n }\n\n return fnUtils.noop;\n }, [view, calcOptionsListWidth, open, optionsListWidth]);\n\n useLayoutEffect_SAFE_FOR_SSR(calcOptionsListWidth, [\n open,\n optionsListWidth,\n filteredOptions,\n selectedItems,\n ]);\n\n const renderValue = () =>\n selectedItems.map((option) => (\n <input type='hidden' name={name} value={option.key} key={option.key} />\n ));\n\n const renderNativeSelect = () => {\n const value = multiple\n ? selectedItems.map((option) => option.key)\n : selectedItems[0]?.key;\n\n return (\n <NativeSelect\n {...(menuProps as AnyObject)}\n className={styles.nativeSelect}\n disabled={disabled}\n multiple={multiple}\n name={name}\n value={value}\n onChange={handleNativeSelectChange}\n options={filteredOptions}\n />\n );\n };\n\n const handleFieldClear = (event: MouseEvent<HTMLButtonElement>) => {\n setSelectedItems([]);\n onClear?.(event);\n };\n\n const renderSearch = () => {\n if (!showSearch) return null;\n\n const handleClear: SearchProps['onClear'] = (event) => {\n setSearch?.('');\n searchProps?.componentProps?.onClear?.(event);\n };\n\n const handleChange: SearchProps['onChange'] = (event, payload) => {\n setSearch?.(payload.value);\n searchProps?.componentProps?.onChange?.(event, payload);\n };\n\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (!shouldSearchBlurRef.current) return;\n searchProps.componentProps?.onBlur?.(event);\n handleFieldBlur(event);\n };\n\n return (\n <Search\n {...searchProps?.componentProps}\n onBlur={handleBlur}\n value={search}\n onChange={handleChange}\n dataTestId={getDataTestId(dataTestId, 'search')}\n onClear={handleClear}\n className={cn(\n searchProps?.componentProps?.className,\n {\n [styles.search]: view === 'desktop',\n [mobileStyles.search]: view === 'mobile',\n },\n styles[`size-${size}`],\n )}\n ref={mergeRefs([searchRef, searchProps?.componentProps?.ref || null])}\n client={view}\n />\n );\n };\n\n const { header, emptyPlaceholder } = optionsListProps as OptionsListProps;\n\n const renderOptionsListHeader = () => {\n if (header || (view === 'desktop' && showSearch)) {\n return (\n <React.Fragment>\n {header}\n {view === 'desktop' && renderSearch()}\n </React.Fragment>\n );\n }\n\n return null;\n };\n\n const renderEmptyPlaceholder = () => {\n if (emptyPlaceholder) {\n return emptyPlaceholder;\n }\n\n if (showSearch) {\n return <div className={styles.emptySearchPlaceholder}>Ничего не нашлось</div>;\n }\n\n return undefined;\n };\n\n const renderOptionsList = () => {\n if (flatOptions.length === 0 && !showEmptyOptionsList && !showSearch) return null;\n\n const listProps = optionsListProps as OptionsListProps & RefAttributes<HTMLDivElement>;\n\n return (\n <div\n {...menuProps}\n ref={view === 'desktop' ? menuRef : undefined}\n className={cn(\n optionsListClassName,\n view === 'mobile' && mobileStyles.optionsListWrapper,\n view === 'desktop' && styles.optionsListWrapper,\n )}\n >\n <OptionsList\n {...listProps}\n ref={view === 'desktop' ? listProps.ref : scrollableContainerRef}\n setHighlightedIndex={view === 'desktop' ? setHighlightedIndex : undefined}\n className={cn(\n { [mobileStyles.optionsList]: view === 'mobile' },\n listProps.className,\n )}\n scrollbarClassName={cn(\n { [mobileStyles.scrollbar]: view === 'mobile' },\n listProps.scrollbarClassName,\n )}\n optionsListWidth={optionsListWidth}\n flatOptions={flatOptions}\n highlightedIndex={highlightedIndex}\n open={open}\n size={size}\n options={filteredOptions}\n Optgroup={Optgroup}\n Option={Option}\n selectedItems={selectedItems}\n setSelectedItems={setSelectedItems}\n toggleMenu={toggleMenu}\n groupOptionProps={groupOptionProps}\n getOptionProps={getOptionProps}\n visibleOptions={view === 'desktop' ? visibleOptions : 0}\n dataTestId={getDataTestId(dataTestId, 'options-list')}\n header={renderOptionsListHeader()}\n optionGroupClassName={cn(optionGroupClassName, {\n [mobileStyles.optionGroup]: view === 'mobile',\n })}\n emptyPlaceholder={renderEmptyPlaceholder()}\n onScroll={onScroll}\n search={search}\n multiple={multiple}\n limitDynamicOptionGroupSize={limitDynamicOptionGroupSize}\n client={view}\n />\n {view === 'desktop' && <div className={styles.optionsListBorder} />}\n </div>\n );\n };\n\n const renderInPopover = () => {\n if (!nativeSelect && Popover) {\n return (\n <Popover\n {...popoverProps}\n open={open}\n withTransition={false}\n anchorElement={fieldRef.current as HTMLElement}\n position={popoverPosition}\n preventFlip={preventFlip}\n popperClassName={cn(styles.popoverInner, popperClassName)}\n update={updatePopover}\n zIndex={zIndexPopover}\n >\n {renderOptionsList()}\n </Popover>\n );\n }\n\n return null;\n };\n\n const renderInBottomSheet = () => {\n if (!nativeSelect && BottomSheet) {\n const bottomAddons = bottomSheetProps?.bottomAddons;\n\n return (\n <BottomSheet\n dataTestId={getDataTestId(dataTestId, 'bottom-sheet')}\n open={open}\n className={mobileStyles.sheet}\n contentClassName={mobileStyles.sheetContent}\n containerClassName={mobileStyles.sheetContainer}\n title={label || placeholder}\n actionButton={footer ?? (multiple ? null : undefined)}\n stickyHeader={true}\n hasCloser={true}\n swipeable={swipeable}\n initialHeight={showSearch ? 'full' : 'default'}\n {...bottomSheetProps}\n sheetContainerRef={menuRef}\n scrollableContainerRef={scrollableContainerRef}\n onClose={() => {\n closeMenu();\n bottomSheetProps?.onClose?.();\n }}\n transitionProps={{\n ...bottomSheetProps?.transitionProps,\n onEntered: handleEntered,\n }}\n bottomAddons={\n <React.Fragment>\n {renderSearch()}\n {typeof bottomAddons === 'function'\n ? bottomAddons(flatOptions)\n : bottomAddons}\n </React.Fragment>\n }\n containerProps={{\n ...bottomSheetProps?.containerProps,\n onScroll,\n }}\n >\n {renderOptionsList()}\n </BottomSheet>\n );\n }\n\n return null;\n };\n\n const renderInModalMobile = () => {\n if (!nativeSelect && ModalMobile) {\n const bottomAddons = modalHeaderProps?.bottomAddons;\n\n return (\n <ModalMobile\n dataTestId={getDataTestId(dataTestId, 'modal')}\n open={open}\n hasCloser={true}\n {...modalProps}\n componentRef={menuRef}\n onClose={(...args) => {\n closeMenu();\n modalProps?.onClose?.(...args);\n }}\n contentClassName={cn(\n mobileStyles.sheetContent,\n modalProps?.contentClassName,\n )}\n ref={mergeRefs([\n scrollableContainerRef,\n modalProps?.ref as React.Ref<HTMLDivElement>,\n ])}\n wrapperProps={{\n ...modalProps?.wrapperProps,\n onScroll,\n }}\n transitionProps={{\n ...modalProps?.transitionProps,\n onEntered: handleEntered,\n }}\n >\n <ModalMobile.Header\n hasCloser={true}\n sticky={true}\n {...modalHeaderProps}\n title={undefined}\n bottomAddons={\n <React.Fragment>\n {renderSearch()}\n {typeof bottomAddons === 'function'\n ? bottomAddons(flatOptions)\n : bottomAddons}\n </React.Fragment>\n }\n >\n {modalHeaderProps?.title || label || placeholder}\n </ModalMobile.Header>\n\n <ModalMobile.Content flex={true} className={mobileStyles.modalContent}>\n {renderOptionsList()}\n </ModalMobile.Content>\n\n {modalFooterProps?.children && <ModalMobile.Footer {...modalFooterProps} />}\n </ModalMobile>\n );\n }\n\n return null;\n };\n\n return (\n <div\n {...(disabled && { 'aria-disabled': true })}\n aria-expanded={inputProps['aria-expanded']}\n aria-haspopup='listbox'\n role={inputProps.role}\n className={cn(styles.component, { [styles.block]: block }, className)}\n ref={rootRef}\n onKeyDown={disabled ? undefined : handleFieldKeyDown}\n tabIndex={-1}\n data-test-id={getDataTestId(dataTestId)}\n >\n {nativeSelect && renderNativeSelect()}\n\n <Field\n selectedMultiple={selectedItems}\n selected={selectedItems[0]}\n setSelectedItems={setSelectedItems}\n toggleMenu={toggleMenu}\n multiple={multiple}\n open={open}\n disabled={disabled}\n size={size}\n placeholder={placeholder}\n label={label && <span {...getLabelProps()}>{label}</span>}\n labelView={labelView}\n Arrow={Arrow && <Arrow open={open} size={size} disabled={disabled} />}\n error={error}\n hint={hint}\n valueRenderer={valueRenderer}\n className={fieldClassName}\n clear={clear}\n onClear={handleFieldClear}\n innerProps={{\n onBlur: handleFieldBlur,\n onFocus: disabled ? undefined : handleFieldFocus,\n onClick: disabled ? undefined : handleFieldClick,\n tabIndex: disabled ? undefined : nativeSelect ? -1 : 0,\n ref: inputProps.ref,\n id: inputProps.id,\n 'aria-label': (optionProps as AriaAttributes)['aria-label'],\n 'aria-labelledby': inputProps['aria-labelledby'],\n 'aria-controls': inputProps['aria-controls'],\n 'aria-autocomplete': autocomplete\n ? inputProps['aria-autocomplete']\n : undefined,\n }}\n dataTestId={getDataTestId(dataTestId, 'field')}\n {...(fieldProps as AnyObject)}\n />\n\n {name && !nativeSelect && renderValue()}\n\n {view === 'desktop' && renderInPopover()}\n {view === 'mobile' &&\n (isBottomSheet ? renderInBottomSheet() : renderInModalMobile())}\n </div>\n );\n },\n);\n"],"names":["ResizeObserver","ResizeObserverPolyfill"],"mappings":";;;;;;;;;;;;;AAAA;AA+CA,MAAM,YAAY,GAAG,CAAC,MAA0B,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC;AAE/E,MAAM,cAAc,GAAG,CAAC,MAA0B,KAAK,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;AAEzE,MAAM,UAAU,GAAG,UAAU;AAChC;AACA;AACA,CAAC,KAAK,EAAE,GAAG,KAAI;IACX,MAAM,EACF,UAAU,EACV,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,OAAO,EACP,YAAY,GAAG,KAAK,EACpB,QAAQ,GAAG,KAAK,EAChB,aAAa,GAAG,KAAK,EACrB,QAAQ,GAAG,KAAK,EAChB,aAAa,GAAG,CAAC,QAAQ,EACzB,kBAAkB,GAAG,KAAK,EAC1B,YAAY,GAAG,KAAK,EACpB,WAAW,GAAG,KAAK,EACnB,IAAI,EAAE,QAAQ,EACd,eAAe,GAAG,cAAc,EAChC,WAAW,GAAG,IAAI,EAClB,gBAAgB,GAAG,SAAS,EAC5B,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,IAAI,GAAG,EAAE,EACT,WAAW,GAAG,IAAI,EAClB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAS,EACT,WAAW,EACX,UAAU,GAAG,EAAE,EACf,gBAAgB,GAAG,EAAE,EACrB,WAAW,GAAG,EAAE,EAChB,gBAAgB,GAAG,EAAE,EACrB,WAAW,GAAG,EAAE,EAChB,UAAU,GAAG,KAAK,EAClB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,KAAK,GAAG,MAAM,IAAI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,EACzC,GAAA,UAAwB,EAC/B,CAAA;AAED,QAAA,IAAI,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE;AAEtC,QAAA,IAAI,KAAK,SAAS,IAAI,eAAe,EAAE;AACvC,QAAA,IAAI,KAAK,QAAQ;AACd,aAAC,aAAa,GAAG,mBAAmB,EAAE,GAAG,mBAAmB,EAAE,CAAC,CACjE;AAEd,CAAC;;;;"}
@@ -4,14 +4,14 @@ import { type ModalContentProps, type ModalFooterProps, type ModalHeaderProps }
4
4
  import { type ModalMobileProps } from '@alfalab/core-components-modal/moderncssm/typings';
5
5
  import { type PopoverProps } from '@alfalab/core-components-popover/moderncssm';
6
6
  import { type AdditionalMobileProps, type BaseSelectProps, type BottomSheetSelectMobileProps, type ModalSelectMobileProps } from '../../../typings';
7
- declare type PopoverType = ForwardRefExoticComponent<PopoverProps & RefAttributes<HTMLDivElement>>;
8
- declare type BottomSheetType = ForwardRefExoticComponent<BottomSheetProps & RefAttributes<HTMLDivElement>>;
9
- declare type ModalMobileType = ForwardRefExoticComponent<ModalMobileProps & RefAttributes<HTMLDivElement>> & {
7
+ type PopoverType = ForwardRefExoticComponent<PopoverProps & RefAttributes<HTMLDivElement>>;
8
+ type BottomSheetType = ForwardRefExoticComponent<BottomSheetProps & RefAttributes<HTMLDivElement>>;
9
+ type ModalMobileType = ForwardRefExoticComponent<ModalMobileProps & RefAttributes<HTMLDivElement>> & {
10
10
  Header: FC<ModalHeaderProps>;
11
11
  Footer: FC<ModalFooterProps>;
12
12
  Content: FC<ModalContentProps>;
13
13
  };
14
- export declare type ComponentProps = BaseSelectProps & AdditionalMobileProps & BottomSheetSelectMobileProps & ModalSelectMobileProps & {
14
+ export type ComponentProps = BaseSelectProps & AdditionalMobileProps & BottomSheetSelectMobileProps & ModalSelectMobileProps & {
15
15
  isBottomSheet?: boolean;
16
16
  view: 'desktop' | 'mobile';
17
17
  Popover?: PopoverType;