@alfalab/core-components-select 14.3.5 → 15.0.1

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 (416) hide show
  1. package/Component.desktop.d.ts +19 -0
  2. package/{Component.js → Component.desktop.js} +6 -6
  3. package/Component.mobile-ebda875c.d.ts +6 -0
  4. package/Component.mobile-f1f15074.d.ts +387 -0
  5. package/Component.mobile.d.ts +41 -0
  6. package/Component.mobile.js +62 -0
  7. package/Component.modal.mobile.d.ts +60 -0
  8. package/Component.modal.mobile.js +62 -0
  9. package/Component.responsive.d.ts +1 -1
  10. package/Component.responsive.js +26 -25
  11. package/components/arrow/Component.js +1 -1
  12. package/components/arrow/index.css +3 -3
  13. package/components/base-checkmark/Component.js +1 -1
  14. package/components/base-checkmark/index.css +4 -4
  15. package/components/base-option/Component.js +1 -1
  16. package/components/base-option/index.css +13 -13
  17. package/components/base-select/Component.js +6 -6
  18. package/components/base-select/index.css +8 -8
  19. package/components/base-select/index.js +1 -1
  20. package/components/base-select-mobile/Component.d.ts +3 -3
  21. package/components/base-select-mobile/Component.js +13 -9
  22. package/components/base-select-mobile/footer/Component.js +4 -4
  23. package/components/base-select-mobile/footer/index.css +5 -5
  24. package/components/base-select-mobile/footer/index.js +1 -1
  25. package/components/base-select-mobile/index.css +13 -11
  26. package/components/base-select-mobile/index.js +1 -2
  27. package/components/checkmark/Component.js +1 -1
  28. package/components/checkmark/index.css +10 -10
  29. package/components/checkmark-mobile/Component.js +1 -1
  30. package/components/checkmark-mobile/index.css +6 -6
  31. package/components/field/Component.d.ts +8 -1
  32. package/components/field/Component.js +19 -16
  33. package/components/field/index.css +38 -11
  34. package/components/field/index.js +0 -1
  35. package/components/index.d.ts +0 -2
  36. package/components/index.js +4 -19
  37. package/components/optgroup/Component.js +1 -1
  38. package/components/optgroup/index.css +6 -6
  39. package/components/option/Component.js +1 -1
  40. package/components/option/index.css +20 -20
  41. package/components/options-list/Component.js +1 -1
  42. package/components/options-list/index.css +9 -9
  43. package/components/virtual-options-list/Component.js +1 -1
  44. package/components/virtual-options-list/index.css +15 -15
  45. package/cssm/Component.desktop.d.ts +19 -0
  46. package/cssm/{Component.js → Component.desktop.js} +6 -6
  47. package/cssm/Component.mobile-ebda875c.d.ts +6 -0
  48. package/cssm/Component.mobile-f1f15074.d.ts +387 -0
  49. package/cssm/Component.mobile.d.ts +41 -0
  50. package/cssm/Component.mobile.js +74 -0
  51. package/cssm/Component.modal.mobile.d.ts +60 -0
  52. package/cssm/Component.modal.mobile.js +74 -0
  53. package/cssm/Component.responsive.d.ts +1 -1
  54. package/cssm/Component.responsive.js +30 -33
  55. package/cssm/components/base-select/Component.js +5 -5
  56. package/cssm/components/base-select/index.js +1 -1
  57. package/cssm/components/base-select-mobile/Component.d.ts +3 -3
  58. package/cssm/components/base-select-mobile/Component.js +12 -8
  59. package/cssm/components/base-select-mobile/footer/Component.js +3 -3
  60. package/cssm/components/base-select-mobile/footer/index.js +1 -1
  61. package/cssm/components/base-select-mobile/index.js +1 -2
  62. package/cssm/components/base-select-mobile/index.module.css +4 -2
  63. package/cssm/components/field/Component.d.ts +8 -1
  64. package/cssm/components/field/Component.js +18 -15
  65. package/cssm/components/field/index.js +0 -1
  66. package/cssm/components/field/index.module.css +31 -4
  67. package/cssm/components/index.d.ts +0 -2
  68. package/cssm/components/index.js +7 -28
  69. package/cssm/desktop-63dec22f.d.ts +6 -0
  70. package/cssm/desktop.d.ts +2 -0
  71. package/cssm/desktop.js +44 -0
  72. package/cssm/hook-97e6e688.d.ts +16 -0
  73. package/cssm/hook-97e6e688.js +110 -0
  74. package/{esm/hook-b4e70cb0.d.ts → cssm/hook-9ea9e32c.d.ts} +9 -7
  75. package/cssm/index-ebda875c.d.ts +20 -60
  76. package/cssm/index.d.ts +2 -5
  77. package/cssm/index.js +34 -61
  78. package/cssm/mobile-96988a65.d.ts +2 -0
  79. package/cssm/mobile.d.ts +5 -4
  80. package/cssm/mobile.js +15 -24
  81. package/cssm/presets/index.d.ts +1 -1
  82. package/cssm/presets/index.js +9 -36
  83. package/cssm/presets/useLazyLoading/hook.js +9 -4
  84. package/cssm/presets/useSelectWithApply/hook.js +9 -48
  85. package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -42
  86. package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +3 -3
  87. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  88. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +10 -49
  89. package/cssm/shared.d.ts +5 -0
  90. package/cssm/shared.js +78 -0
  91. package/cssm/typings-9211a437.d.ts +95 -0
  92. package/cssm/typings-baf4875b.d.ts +52 -0
  93. package/desktop-63dec22f.d.ts +6 -0
  94. package/desktop.d.ts +2 -0
  95. package/{responsive.js → desktop.js} +5 -19
  96. package/esm/Component.desktop.d.ts +19 -0
  97. package/esm/{Component.js → Component.desktop.js} +6 -6
  98. package/esm/Component.mobile-ebda875c.d.ts +6 -0
  99. package/esm/Component.mobile-f1f15074.d.ts +387 -0
  100. package/esm/Component.mobile.d.ts +41 -0
  101. package/esm/Component.mobile.js +54 -0
  102. package/esm/Component.modal.mobile.d.ts +60 -0
  103. package/esm/Component.modal.mobile.js +54 -0
  104. package/esm/Component.responsive.d.ts +1 -1
  105. package/esm/Component.responsive.js +26 -25
  106. package/esm/components/arrow/Component.js +1 -1
  107. package/esm/components/arrow/index.css +3 -3
  108. package/esm/components/base-checkmark/Component.js +1 -1
  109. package/esm/components/base-checkmark/index.css +4 -4
  110. package/esm/components/base-option/Component.js +1 -1
  111. package/esm/components/base-option/index.css +13 -13
  112. package/esm/components/base-select/Component.js +2 -2
  113. package/esm/components/base-select/index.css +8 -8
  114. package/esm/components/base-select/index.js +1 -1
  115. package/esm/components/base-select-mobile/Component.d.ts +3 -3
  116. package/esm/components/base-select-mobile/Component.js +9 -5
  117. package/esm/components/base-select-mobile/footer/Component.js +4 -4
  118. package/esm/components/base-select-mobile/footer/index.css +5 -5
  119. package/esm/components/base-select-mobile/footer/index.js +1 -1
  120. package/esm/components/base-select-mobile/index.css +13 -11
  121. package/esm/components/base-select-mobile/index.js +1 -2
  122. package/esm/components/checkmark/Component.js +1 -1
  123. package/esm/components/checkmark/index.css +10 -10
  124. package/esm/components/checkmark-mobile/Component.js +1 -1
  125. package/esm/components/checkmark-mobile/index.css +6 -6
  126. package/esm/components/field/Component.d.ts +8 -1
  127. package/esm/components/field/Component.js +19 -16
  128. package/esm/components/field/index.css +38 -11
  129. package/esm/components/field/index.js +0 -1
  130. package/esm/components/index.d.ts +0 -2
  131. package/esm/components/index.js +4 -17
  132. package/esm/components/optgroup/Component.js +1 -1
  133. package/esm/components/optgroup/index.css +6 -6
  134. package/esm/components/option/Component.js +1 -1
  135. package/esm/components/option/index.css +20 -20
  136. package/esm/components/options-list/Component.js +1 -1
  137. package/esm/components/options-list/index.css +9 -9
  138. package/esm/components/virtual-options-list/Component.js +1 -1
  139. package/esm/components/virtual-options-list/index.css +15 -15
  140. package/esm/desktop-63dec22f.d.ts +6 -0
  141. package/esm/desktop.d.ts +2 -0
  142. package/esm/{responsive.js → desktop.js} +4 -18
  143. package/{cssm/hook-b4e70cb0.d.ts → esm/hook-9ea9e32c.d.ts} +9 -7
  144. package/esm/hook-cb30fc23.d.ts +16 -0
  145. package/esm/hook-cb30fc23.js +102 -0
  146. package/esm/index-ebda875c.d.ts +20 -60
  147. package/esm/index.d.ts +2 -5
  148. package/esm/index.js +27 -29
  149. package/esm/mobile-96988a65.d.ts +2 -0
  150. package/esm/mobile.d.ts +5 -4
  151. package/esm/mobile.js +12 -16
  152. package/esm/presets/index.d.ts +1 -1
  153. package/esm/presets/index.js +7 -25
  154. package/esm/presets/useLazyLoading/hook.js +9 -5
  155. package/esm/presets/useSelectWithApply/hook.js +7 -33
  156. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +2 -28
  157. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +4 -4
  158. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  159. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  160. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  161. package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  162. package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +8 -34
  163. package/esm/presets/useSelectWithLoading/hook.js +1 -1
  164. package/esm/presets/useSelectWithLoading/index.css +2 -2
  165. package/esm/shared.d.ts +5 -0
  166. package/esm/shared.js +38 -0
  167. package/esm/typings-9211a437.d.ts +95 -0
  168. package/esm/typings-baf4875b.d.ts +52 -0
  169. package/hook-3e654f56.d.ts +16 -0
  170. package/hook-3e654f56.js +110 -0
  171. package/{hook-b4e70cb0.d.ts → hook-9ea9e32c.d.ts} +9 -7
  172. package/index-ebda875c.d.ts +20 -60
  173. package/index.d.ts +2 -5
  174. package/index.js +28 -51
  175. package/mobile-96988a65.d.ts +2 -0
  176. package/mobile.d.ts +5 -4
  177. package/mobile.js +14 -18
  178. package/modern/Component.desktop.d.ts +19 -0
  179. package/modern/{Component.js → Component.desktop.js} +7 -4
  180. package/modern/Component.mobile-ebda875c.d.ts +6 -0
  181. package/modern/Component.mobile-f1f15074.d.ts +387 -0
  182. package/modern/Component.mobile.d.ts +41 -0
  183. package/modern/Component.mobile.js +61 -0
  184. package/modern/Component.modal.mobile.d.ts +60 -0
  185. package/modern/Component.modal.mobile.js +61 -0
  186. package/modern/Component.responsive.d.ts +1 -1
  187. package/modern/Component.responsive.js +26 -25
  188. package/modern/components/arrow/Component.js +1 -1
  189. package/modern/components/arrow/index.css +3 -3
  190. package/modern/components/base-checkmark/Component.js +1 -1
  191. package/modern/components/base-checkmark/index.css +4 -4
  192. package/modern/components/base-option/Component.js +1 -1
  193. package/modern/components/base-option/index.css +13 -13
  194. package/modern/components/base-select/Component.js +2 -2
  195. package/modern/components/base-select/index.css +8 -8
  196. package/modern/components/base-select/index.js +1 -1
  197. package/modern/components/base-select-mobile/Component.d.ts +3 -3
  198. package/modern/components/base-select-mobile/Component.js +9 -5
  199. package/modern/components/base-select-mobile/footer/Component.js +4 -4
  200. package/modern/components/base-select-mobile/footer/index.css +5 -5
  201. package/modern/components/base-select-mobile/footer/index.js +1 -1
  202. package/modern/components/base-select-mobile/index.css +13 -11
  203. package/modern/components/base-select-mobile/index.js +1 -2
  204. package/modern/components/checkmark/Component.js +1 -1
  205. package/modern/components/checkmark/index.css +10 -10
  206. package/modern/components/checkmark-mobile/Component.js +1 -1
  207. package/modern/components/checkmark-mobile/index.css +6 -6
  208. package/modern/components/field/Component.d.ts +8 -1
  209. package/modern/components/field/Component.js +17 -14
  210. package/modern/components/field/index.css +38 -11
  211. package/modern/components/field/index.js +0 -1
  212. package/modern/components/index.d.ts +0 -2
  213. package/modern/components/index.js +4 -17
  214. package/modern/components/optgroup/Component.js +1 -1
  215. package/modern/components/optgroup/index.css +6 -6
  216. package/modern/components/option/Component.js +1 -1
  217. package/modern/components/option/index.css +20 -20
  218. package/modern/components/options-list/Component.js +1 -1
  219. package/modern/components/options-list/index.css +9 -9
  220. package/modern/components/virtual-options-list/Component.js +1 -1
  221. package/modern/components/virtual-options-list/index.css +15 -15
  222. package/modern/desktop-63dec22f.d.ts +6 -0
  223. package/modern/desktop.d.ts +2 -0
  224. package/modern/{responsive.js → desktop.js} +4 -18
  225. package/modern/hook-467b4d42.d.ts +16 -0
  226. package/modern/{Component-5c16a908.js → hook-467b4d42.js} +3 -66
  227. package/modern/{hook-b4e70cb0.d.ts → hook-9ea9e32c.d.ts} +9 -7
  228. package/modern/index-ebda875c.d.ts +20 -60
  229. package/modern/index.d.ts +2 -5
  230. package/modern/index.js +27 -29
  231. package/modern/mobile-96988a65.d.ts +2 -0
  232. package/modern/mobile.d.ts +5 -4
  233. package/modern/mobile.js +12 -16
  234. package/modern/presets/index.d.ts +1 -1
  235. package/modern/presets/index.js +7 -25
  236. package/modern/presets/useLazyLoading/hook.js +9 -5
  237. package/modern/presets/useSelectWithApply/hook.js +7 -33
  238. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +2 -28
  239. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +4 -4
  240. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  241. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  242. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  243. package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  244. package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +8 -34
  245. package/modern/presets/useSelectWithLoading/hook.js +1 -1
  246. package/modern/presets/useSelectWithLoading/index.css +2 -2
  247. package/modern/shared.d.ts +5 -0
  248. package/modern/shared.js +37 -0
  249. package/modern/typings-9211a437.d.ts +95 -0
  250. package/modern/typings-baf4875b.d.ts +52 -0
  251. package/package.json +38 -12
  252. package/presets/index.d.ts +1 -1
  253. package/presets/index.js +7 -25
  254. package/presets/useLazyLoading/hook.js +9 -5
  255. package/presets/useSelectWithApply/hook.js +7 -33
  256. package/presets/useSelectWithApply/options-list-with-apply/Component.js +2 -28
  257. package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +4 -4
  258. package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  259. package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  260. package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  261. package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  262. package/presets/useSelectWithApply/options-list-with-apply/index.js +8 -34
  263. package/presets/useSelectWithLoading/hook.js +1 -1
  264. package/presets/useSelectWithLoading/index.css +2 -2
  265. package/shared.d.ts +5 -0
  266. package/shared.js +64 -0
  267. package/src/Component.desktop.tsx +52 -0
  268. package/src/Component.mobile.tsx +149 -0
  269. package/src/Component.modal.mobile.tsx +144 -0
  270. package/src/Component.responsive.tsx +59 -0
  271. package/src/components/arrow/Component.tsx +12 -0
  272. package/src/components/arrow/index.module.css +15 -0
  273. package/src/components/arrow/index.ts +1 -0
  274. package/src/components/base-checkmark/Component.tsx +33 -0
  275. package/src/components/base-checkmark/index.module.css +18 -0
  276. package/src/components/base-checkmark/index.ts +1 -0
  277. package/src/components/base-option/Component.tsx +57 -0
  278. package/src/components/base-option/index.module.css +67 -0
  279. package/src/components/base-option/index.ts +1 -0
  280. package/src/components/base-select/Component.tsx +478 -0
  281. package/src/components/base-select/index.module.css +68 -0
  282. package/src/components/base-select/index.ts +1 -0
  283. package/src/components/base-select-mobile/Component.tsx +486 -0
  284. package/src/components/base-select-mobile/footer/Component.tsx +46 -0
  285. package/src/components/base-select-mobile/footer/index.module.css +23 -0
  286. package/src/components/base-select-mobile/footer/index.ts +1 -0
  287. package/src/components/base-select-mobile/index.module.css +48 -0
  288. package/src/components/base-select-mobile/index.ts +1 -0
  289. package/src/components/checkmark/Component.tsx +56 -0
  290. package/src/components/checkmark/index.module.css +48 -0
  291. package/src/components/checkmark/index.ts +1 -0
  292. package/src/components/checkmark-mobile/Component.tsx +18 -0
  293. package/src/components/checkmark-mobile/index.module.css +28 -0
  294. package/src/components/checkmark-mobile/index.ts +1 -0
  295. package/src/components/field/Component.tsx +110 -0
  296. package/src/components/field/index.module.css +60 -0
  297. package/src/components/field/index.ts +1 -0
  298. package/src/components/index.ts +8 -0
  299. package/src/components/native-select/Component.tsx +60 -0
  300. package/src/components/native-select/index.ts +1 -0
  301. package/src/components/optgroup/Component.tsx +15 -0
  302. package/src/components/optgroup/index.module.css +30 -0
  303. package/src/components/optgroup/index.ts +1 -0
  304. package/src/components/option/Component.tsx +65 -0
  305. package/src/components/option/index.module.css +108 -0
  306. package/src/components/option/index.ts +1 -0
  307. package/src/components/options-list/Component.tsx +140 -0
  308. package/src/components/options-list/index.module.css +40 -0
  309. package/src/components/options-list/index.ts +1 -0
  310. package/src/components/virtual-options-list/Component.tsx +217 -0
  311. package/src/components/virtual-options-list/index.module.css +76 -0
  312. package/src/components/virtual-options-list/index.ts +1 -0
  313. package/src/consts.ts +1 -0
  314. package/src/desktop.ts +1 -0
  315. package/src/index.ts +4 -0
  316. package/src/mobile.ts +5 -0
  317. package/src/presets/index.ts +3 -0
  318. package/src/presets/useLazyLoading/hook.tsx +309 -0
  319. package/src/presets/useSelectWithApply/hook.tsx +154 -0
  320. package/src/presets/useSelectWithApply/options-list-with-apply/Component.tsx +106 -0
  321. package/src/presets/useSelectWithApply/options-list-with-apply/footer/Component.tsx +37 -0
  322. package/src/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +11 -0
  323. package/src/presets/useSelectWithApply/options-list-with-apply/header/Component.tsx +26 -0
  324. package/src/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +9 -0
  325. package/src/presets/useSelectWithApply/options-list-with-apply/index.ts +1 -0
  326. package/src/presets/useSelectWithLoading/hook.tsx +40 -0
  327. package/src/shared.ts +5 -0
  328. package/src/typings.ts +691 -0
  329. package/src/utils.ts +154 -0
  330. package/src/vars.css +57 -0
  331. package/typings-9211a437.d.ts +95 -0
  332. package/typings-baf4875b.d.ts +52 -0
  333. package/Component-1e06de61.d.ts +0 -108
  334. package/Component-1e06de61.js +0 -165
  335. package/Component-3885b0d7.d.ts +0 -169
  336. package/Component.d.ts +0 -104
  337. package/Component.mobile-b2c0420d.d.ts +0 -93
  338. package/components/select-mobile/Component.d.ts +0 -0
  339. package/components/select-mobile/Component.js +0 -49
  340. package/components/select-mobile/index.d.ts +0 -1
  341. package/components/select-mobile/index.js +0 -49
  342. package/components/select-modal-mobile/Component.d.ts +0 -0
  343. package/components/select-modal-mobile/Component.js +0 -49
  344. package/components/select-modal-mobile/index.d.ts +0 -1
  345. package/components/select-modal-mobile/index.js +0 -49
  346. package/cssm/Component-3885b0d7.d.ts +0 -169
  347. package/cssm/Component-4727d474.d.ts +0 -108
  348. package/cssm/Component-4727d474.js +0 -175
  349. package/cssm/Component.d.ts +0 -104
  350. package/cssm/Component.mobile-b2c0420d.d.ts +0 -93
  351. package/cssm/components/select-mobile/Component.d.ts +0 -0
  352. package/cssm/components/select-mobile/Component.js +0 -66
  353. package/cssm/components/select-mobile/index.d.ts +0 -1
  354. package/cssm/components/select-mobile/index.js +0 -66
  355. package/cssm/components/select-modal-mobile/Component.d.ts +0 -0
  356. package/cssm/components/select-modal-mobile/Component.js +0 -66
  357. package/cssm/components/select-modal-mobile/index.d.ts +0 -1
  358. package/cssm/components/select-modal-mobile/index.js +0 -66
  359. package/cssm/getDataTestId-5c876d98.d.ts +0 -2
  360. package/cssm/getDataTestId-5c876d98.js +0 -8
  361. package/cssm/index-3885b0d7.d.ts +0 -3
  362. package/cssm/intersection-observer-9ec5cf59.d.ts +0 -1
  363. package/cssm/intersection-observer-9ec5cf59.js +0 -893
  364. package/cssm/responsive.d.ts +0 -2
  365. package/cssm/responsive.js +0 -67
  366. package/cssm/types-ebda875c.d.ts +0 -113
  367. package/esm/Component-16af9d1e.d.ts +0 -108
  368. package/esm/Component-16af9d1e.js +0 -155
  369. package/esm/Component-3885b0d7.d.ts +0 -169
  370. package/esm/Component.d.ts +0 -104
  371. package/esm/Component.mobile-b2c0420d.d.ts +0 -93
  372. package/esm/components/select-mobile/Component.d.ts +0 -0
  373. package/esm/components/select-mobile/Component.js +0 -41
  374. package/esm/components/select-mobile/index.d.ts +0 -1
  375. package/esm/components/select-mobile/index.js +0 -41
  376. package/esm/components/select-modal-mobile/Component.d.ts +0 -0
  377. package/esm/components/select-modal-mobile/Component.js +0 -41
  378. package/esm/components/select-modal-mobile/index.d.ts +0 -1
  379. package/esm/components/select-modal-mobile/index.js +0 -41
  380. package/esm/getDataTestId-1a678b16.d.ts +0 -2
  381. package/esm/getDataTestId-1a678b16.js +0 -6
  382. package/esm/index-3885b0d7.d.ts +0 -3
  383. package/esm/intersection-observer-4e5bb99c.d.ts +0 -1
  384. package/esm/intersection-observer-4e5bb99c.js +0 -891
  385. package/esm/presets/useLazyLoading/index.css +0 -8
  386. package/esm/responsive.d.ts +0 -2
  387. package/esm/types-ebda875c.d.ts +0 -113
  388. package/getDataTestId-3f974970.d.ts +0 -2
  389. package/getDataTestId-3f974970.js +0 -8
  390. package/index-3885b0d7.d.ts +0 -3
  391. package/intersection-observer-411362a8.d.ts +0 -1
  392. package/intersection-observer-411362a8.js +0 -893
  393. package/modern/Component-3885b0d7.d.ts +0 -169
  394. package/modern/Component-5c16a908.d.ts +0 -108
  395. package/modern/Component.d.ts +0 -104
  396. package/modern/Component.mobile-b2c0420d.d.ts +0 -93
  397. package/modern/components/select-mobile/Component.d.ts +0 -0
  398. package/modern/components/select-mobile/Component.js +0 -40
  399. package/modern/components/select-mobile/index.d.ts +0 -1
  400. package/modern/components/select-mobile/index.js +0 -40
  401. package/modern/components/select-modal-mobile/Component.d.ts +0 -0
  402. package/modern/components/select-modal-mobile/Component.js +0 -40
  403. package/modern/components/select-modal-mobile/index.d.ts +0 -1
  404. package/modern/components/select-modal-mobile/index.js +0 -40
  405. package/modern/getDataTestId-c17bfb0c.d.ts +0 -2
  406. package/modern/getDataTestId-c17bfb0c.js +0 -6
  407. package/modern/index-3885b0d7.d.ts +0 -3
  408. package/modern/intersection-observer-4e5bb99c.d.ts +0 -1
  409. package/modern/intersection-observer-4e5bb99c.js +0 -891
  410. package/modern/presets/useLazyLoading/index.css +0 -8
  411. package/modern/responsive.d.ts +0 -2
  412. package/modern/types-ebda875c.d.ts +0 -113
  413. package/presets/useLazyLoading/index.css +0 -8
  414. package/responsive.d.ts +0 -2
  415. package/types-ebda875c.d.ts +0 -113
  416. /package/{cssm/presets/useLazyLoading → src/presets/useSelectWithLoading}/index.module.css +0 -0
@@ -1,169 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
- import { NavigationBarProps } from "./types-ebda875c";
5
- interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
6
- /**
7
- * Текст после иконки
8
- */
9
- text?: string;
10
- /**
11
- * Дополнительный класс
12
- */
13
- className?: string;
14
- /**
15
- * Вид компонента
16
- */
17
- view: "mobile" | "desktop";
18
- /**
19
- * Прозрачность текста
20
- */
21
- textOpacity?: number;
22
- /**
23
- * Обработчик клика
24
- */
25
- onClick?: () => void;
26
- }
27
- declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
28
- declare const colors: readonly [
29
- "tertiary",
30
- "disabled",
31
- "accent",
32
- "primary",
33
- "attention",
34
- "positive",
35
- "secondary",
36
- "tertiary-inverted",
37
- "primary-inverted",
38
- "secondary-inverted",
39
- "link",
40
- "negative",
41
- "static-primary-light",
42
- "static-secondary-light",
43
- "static-tertiary-light",
44
- "static-primary-dark",
45
- "static-secondary-dark",
46
- "static-tertiary-dark",
47
- "static-accent"
48
- ];
49
- type Color = (typeof colors)[number];
50
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
51
- type NativeProps = HTMLAttributes<HTMLSpanElement>;
52
- type TextBaseProps = {
53
- /**
54
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
55
- */
56
- view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
57
- /**
58
- * Цвет текста
59
- */
60
- color?: Color;
61
- /**
62
- * Толщина шрифта
63
- */
64
- weight?: "regular" | "medium" | "bold";
65
- /**
66
- * Делает цифры моноширинными
67
- */
68
- monospaceNumbers?: boolean;
69
- /**
70
- * HTML тег
71
- */
72
- tag?: "span" | "div";
73
- /**
74
- * Css-класс для стилизации (native prop)
75
- */
76
- className?: string;
77
- /**
78
- * Id компонента для тестов
79
- */
80
- dataTestId?: string;
81
- /**
82
- * Контент (native prop)
83
- */
84
- children?: React.ReactNode;
85
- /**
86
- * Добавляет отступы к тэгу 'p'
87
- */
88
- defaultMargins?: never;
89
- /**
90
- * Количество строк (не поддерживает IE)
91
- */
92
- rowLimit?: 1 | 2 | 3;
93
- };
94
- type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
95
- tag?: "p";
96
- defaultMargins?: boolean;
97
- };
98
- type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
99
- type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
100
- type TitleProps = Omit<NativeProps$0, "color"> & {
101
- /**
102
- * HTML тег
103
- */
104
- tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
105
- /**
106
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
107
- */
108
- view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
109
- /**
110
- * Цвет текста
111
- */
112
- color?: Color;
113
- /**
114
- * Толщина шрифта
115
- */
116
- weight?: "regular" | "medium" | "bold";
117
- /**
118
- * Шрифт текста
119
- */
120
- font?: "styrene" | "system";
121
- /**
122
- * Добавляет отступы
123
- */
124
- defaultMargins?: boolean;
125
- /**
126
- * Css-класс для стилизации (native prop)
127
- */
128
- className?: string;
129
- /**
130
- * Id компонента для тестов
131
- */
132
- dataTestId?: string;
133
- /**
134
- * Контент (native prop)
135
- */
136
- children?: React.ReactNode;
137
- /**
138
- * Количество строк (не поддерживает IE)
139
- */
140
- rowLimit?: 1 | 2 | 3;
141
- };
142
- type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
143
- declare const Typography: {
144
- Title: FC<TitleProps>;
145
- Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
146
- TitleResponsive: FC<TitleProps>;
147
- TitleMobile: FC<TitleMobileProps>;
148
- };
149
- declare const typographyPresets: {
150
- mobile: {
151
- list: {
152
- text: {
153
- primary: {
154
- tag: string;
155
- view: string;
156
- };
157
- secondary: {
158
- tag: string;
159
- color: string;
160
- view: string;
161
- };
162
- };
163
- };
164
- };
165
- };
166
- declare const TitleResponsive: FC<TitleProps>;
167
- declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
168
- export { BackArrowAddonProps, BackArrowAddon, Typography, typographyPresets, TitleResponsive, NavigationBar };
169
- export type { TitleProps, TextProps, Color };
@@ -1,108 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { ReactNode } from "react";
4
- import { BottomSheetProps } from "@alfalab/core-components-bottom-sheet";
5
- import { UseSelectWithApplyProps } from "./hook-b4e70cb0";
6
- import { BaseSelectProps, OptionShape, OptionsListProps } from "./typings";
7
- import { FooterProps } from "./presets/useSelectWithApply/options-list-with-apply/footer/Component";
8
- import { HeaderProps } from "./presets/useSelectWithApply/options-list-with-apply/header/Component";
9
- import { ModalMobile } from "./Component.mobile-b2c0420d";
10
- type AdditionalMobileProps = {
11
- /**
12
- * Футер
13
- * @deprecated Используйте bottomSheetProps.actionButton
14
- */
15
- footer?: ReactNode;
16
- /**
17
- * Будет ли свайпаться шторка
18
- * @deprecated Используйте bottomSheetProps.swipeable
19
- */
20
- swipeable?: boolean;
21
- /**
22
- * Дополнительные пропсы шторки
23
- */
24
- bottomSheetProps?: Partial<BottomSheetProps>;
25
- /**
26
- * Показывать кнопку очистки
27
- */
28
- showClear?: UseSelectWithApplyProps["showClear"];
29
- /**
30
- * Показывать пункт "Выбрать все"
31
- */
32
- showSelectAll?: UseSelectWithApplyProps["showSelectAll"];
33
- /**
34
- * Показывать пункт "Выбрать все" в заголовке списка
35
- */
36
- showHeaderWithSelectAll?: UseSelectWithApplyProps["showHeaderWithSelectAll"];
37
- /**
38
- * Использовать ли хук useSelectWithApply
39
- */
40
- useWithApplyHook?: boolean;
41
- };
42
- type SelectMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> & AdditionalMobileProps;
43
- declare const SelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<unknown>>;
44
- declare const OptionsListWithApply: React.ForwardRefExoticComponent<OptionsListProps & {
45
- showClear?: boolean | undefined;
46
- onClose?: (() => void) | undefined;
47
- selectedDraft?: OptionShape[] | undefined;
48
- OptionsList?: React.FC<OptionsListProps & React.RefAttributes<HTMLDivElement>> | undefined;
49
- Footer?: React.FC<FooterProps> | undefined;
50
- Header?: React.FC<HeaderProps> | undefined;
51
- headerProps?: HeaderProps | undefined;
52
- showHeaderWithSelectAll?: boolean | undefined;
53
- } & React.RefAttributes<HTMLDivElement>>;
54
- type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
55
- /**
56
- * Показывать кнопку очистки
57
- */
58
- showClear?: UseSelectWithApplyProps['showClear'];
59
- /**
60
- * Показывать пункт "Выбрать все"
61
- */
62
- showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
63
- /**
64
- * Дополнительные пропсы шапки модалки
65
- */
66
- modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
67
- /**
68
- * Дополнительные пропсы модалки
69
- */
70
- modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
71
- /**
72
- * Дополнительные пропсы футера модалки
73
- */
74
- modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
75
- showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
76
- /**
77
- * Использовать ли хук useSelectWithApply
78
- */
79
- useWithApplyHook?: boolean;
80
- };
81
- declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
82
- /**
83
- * Показывать кнопку очистки
84
- */
85
- showClear?: UseSelectWithApplyProps['showClear'];
86
- /**
87
- * Показывать пункт "Выбрать все"
88
- */
89
- showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
90
- /**
91
- * Дополнительные пропсы шапки модалки
92
- */
93
- modalHeaderProps?: Partial<import("./Component.mobile-b2c0420d").HeaderProps> | undefined;
94
- /**
95
- * Дополнительные пропсы модалки
96
- */
97
- modalProps?: Partial<import("./Component.mobile-b2c0420d").ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
98
- /**
99
- * Дополнительные пропсы футера модалки
100
- */
101
- modalFooterProps?: Partial<import("./Component.mobile-b2c0420d").FooterProps> | undefined;
102
- showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
103
- /**
104
- * Использовать ли хук useSelectWithApply
105
- */
106
- useWithApplyHook?: boolean | undefined;
107
- } & React.RefAttributes<unknown>>;
108
- export { AdditionalMobileProps, SelectMobileProps, SelectMobile, OptionsListWithApply, SelectModalMobileProps, SelectModalMobile };
@@ -1,175 +0,0 @@
1
- 'use strict';
2
-
3
- var tslib = require('tslib');
4
- var React = require('react');
5
- require('./Component.js');
6
- require('classnames');
7
- require('@alfalab/icons-glyph/ChevronDownMIcon');
8
- require('./components/arrow/index.module.css');
9
- require('./components/base-select/Component.js');
10
- var presets_useSelectWithApply_optionsListWithApply_header_Component = require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
11
- var components_arrow_Component = require('./components/arrow/Component.js');
12
- var components_baseSelectMobile_Component = require('./components/base-select-mobile/Component.js');
13
- var components_baseSelectMobile_footer_Component = require('./components/base-select-mobile/footer/Component.js');
14
- var components_field_Component = require('./components/field/Component.js');
15
- var components_optgroup_Component = require('./components/optgroup/Component.js');
16
- var components_option_Component = require('./components/option/Component.js');
17
- var components_optionsList_Component = require('./components/options-list/Component.js');
18
- var components_virtualOptionsList_Component = require('./components/virtual-options-list/Component.js');
19
- require('@alfalab/core-components-form-control/cssm');
20
- require('@alfalab/hooks');
21
- var utils = require('./utils.js');
22
- require('./components/field/index.module.css');
23
- require('./components/optgroup/index.module.css');
24
- require('@alfalab/core-components-badge/cssm');
25
- require('@alfalab/core-components-checkbox/cssm');
26
- require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
27
- require('@alfalab/icons-glyph/CheckmarkMIcon');
28
- require('./components/checkmark/index.module.css');
29
- require('./components/checkmark-mobile/index.module.css');
30
- require('./components/option/index.module.css');
31
- require('./components/base-checkmark/index.module.css');
32
- require('./components/base-option/index.module.css');
33
- require('@alfalab/core-components-skeleton/cssm');
34
- require('./presets/useSelectWithLoading/index.module.css');
35
- require('./presets/useLazyLoading/index.module.css');
36
- require('./intersection-observer-9ec5cf59.js');
37
- var consts = require('./consts.js');
38
- var presets_useSelectWithApply_optionsListWithApply_footer_Component = require('./presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
39
-
40
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
41
-
42
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
43
-
44
- var OptionsListWithApply = React.forwardRef(function (_a, ref) {
45
- var toggleMenu = _a.toggleMenu, defaultGetOptionProps = _a.getOptionProps, _b = _a.showClear, showClear = _b === void 0 ? true : _b, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _c = _a.selectedDraft, selectedDraft = _c === void 0 ? [] : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.OptionsList, OptionsList = _e === void 0 ? components_optionsList_Component.OptionsList : _e, _f = _a.onApply, onApply = _f === void 0 ? function () { return null; } : _f, _g = _a.onClear, onClear = _g === void 0 ? function () { return null; } : _g, _h = _a.onClose, onClose = _h === void 0 ? function () { return null; } : _h, _j = _a.visibleOptions, visibleOptions = _j === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _j, _k = _a.Footer, Footer = _k === void 0 ? presets_useSelectWithApply_optionsListWithApply_footer_Component.Footer : _k, _l = _a.Header, Header = _l === void 0 ? presets_useSelectWithApply_optionsListWithApply_header_Component.Header : _l, headerProps = _a.headerProps, restProps = tslib.__rest(_a, ["toggleMenu", "getOptionProps", "showClear", "showHeaderWithSelectAll", "selectedDraft", "flatOptions", "OptionsList", "onApply", "onClear", "onClose", "visibleOptions", "Footer", "Header", "headerProps"]);
46
- var getOptionProps = React.useCallback(function (option, index) {
47
- var optionProps = defaultGetOptionProps(option, index);
48
- var selected = option.key === SELECT_ALL_KEY
49
- ? selectedDraft.length === flatOptions.length - 1
50
- : selectedDraft.includes(option);
51
- return tslib.__assign(tslib.__assign({}, optionProps), { selected: selected });
52
- }, [defaultGetOptionProps, flatOptions.length, selectedDraft]);
53
- var handleApply = React.useCallback(function () {
54
- onApply();
55
- toggleMenu();
56
- }, [onApply, toggleMenu]);
57
- var handleClear = React.useCallback(function () {
58
- onClear();
59
- toggleMenu();
60
- }, [onClear, toggleMenu]);
61
- React.useEffect(function () {
62
- var activeElement = document.activeElement;
63
- return function () {
64
- onClose();
65
- if (activeElement) {
66
- activeElement.focus();
67
- }
68
- };
69
- // eslint-disable-next-line react-hooks/exhaustive-deps
70
- }, []);
71
- return (React__default.default.createElement(OptionsList, tslib.__assign({}, restProps, { ref: ref, visibleOptions: visibleOptions, toggleMenu: toggleMenu, flatOptions: flatOptions, getOptionProps: getOptionProps, onApply: handleApply, onClear: handleClear, header: showHeaderWithSelectAll ? React__default.default.createElement(Header, tslib.__assign({}, headerProps)) : undefined, footer: React__default.default.createElement(Footer, { handleApply: handleApply, handleClear: handleClear, showClear: showClear, selectedDraft: selectedDraft }) })));
72
- });
73
-
74
- var SELECT_ALL_KEY = 'select_all';
75
- var selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
76
- function useSelectWithApply(_a) {
77
- var options = _a.options, selected = _a.selected, _b = _a.onChange, onChange = _b === void 0 ? function () { return null; } : _b, OptionsList = _a.OptionsList, _c = _a.optionsListProps, optionsListProps = _c === void 0 ? {} : _c, _d = _a.showClear, showClear = _d === void 0 ? true : _d, _e = _a.showSelectAll, showSelectAll = _e === void 0 ? false : _e, _f = _a.showHeaderWithSelectAll, showHeaderWithSelectAll = _f === void 0 ? false : _f;
78
- var _g = React.useMemo(function () { return utils.processOptions(options, selected); }, [options, selected]), flatOptions = _g.flatOptions, selectedOptions = _g.selectedOptions;
79
- var _h = React.useState(selectedOptions), selectedDraft = _h[0], setSelectedDraft = _h[1];
80
- var selectedOptionsRef = React.useRef(selectedOptions);
81
- var handleApply = function () {
82
- onChange({
83
- selected: selectedDraft[0],
84
- selectedMultiple: selectedDraft,
85
- initiator: null,
86
- });
87
- };
88
- var handleClear = function () {
89
- setSelectedDraft([]);
90
- onChange({
91
- selected: null,
92
- selectedMultiple: [],
93
- initiator: null,
94
- });
95
- };
96
- var handleToggleAll = function () {
97
- setSelectedDraft(flatOptions.length === selectedDraft.length ? [] : flatOptions);
98
- };
99
- var handleChange = function (_a) {
100
- var initiator = _a.initiator, restArgs = tslib.__rest(_a, ["initiator"]);
101
- if (!initiator) {
102
- onChange(tslib.__assign({ initiator: null }, restArgs));
103
- return;
104
- }
105
- var initiatorSelected = selectedDraft.includes(initiator) ||
106
- (initiator.key === SELECT_ALL_KEY && selectedDraft.length === flatOptions.length);
107
- if (initiator.key === SELECT_ALL_KEY) {
108
- setSelectedDraft(initiatorSelected ? [] : flatOptions);
109
- }
110
- else {
111
- setSelectedDraft(initiatorSelected
112
- ? selectedDraft.filter(function (o) { return o !== initiator; })
113
- : selectedDraft.concat(initiator));
114
- }
115
- };
116
- var handleClose = function () { return setSelectedDraft(selectedOptionsRef.current); };
117
- React.useEffect(function () {
118
- setSelectedDraft(selectedOptions);
119
- selectedOptionsRef.current = selectedOptions;
120
- }, [selectedOptions]);
121
- var memoizedOptions = React.useMemo(function () { return (showSelectAll ? tslib.__spreadArray([selectAllOption], options, true) : options); }, [options, showSelectAll]);
122
- return {
123
- OptionsList: OptionsListWithApply,
124
- optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { OptionsList: OptionsList, showClear: showClear, onClear: handleClear, onApply: handleApply, onClose: handleClose, selectedDraft: selectedDraft, showHeaderWithSelectAll: showHeaderWithSelectAll, headerProps: {
125
- indeterminate: !!selectedDraft.length && selectedDraft.length < flatOptions.length,
126
- checked: selectedDraft.length === flatOptions.length,
127
- onChange: handleToggleAll,
128
- } }),
129
- allowUnselect: true,
130
- multiple: true,
131
- options: memoizedOptions,
132
- onChange: handleChange,
133
- selected: selected,
134
- };
135
- }
136
-
137
- var VIRTUAL_OPTIONS_LIST_THRESHOLD$1 = 30;
138
- var SelectMobile = React.forwardRef(function (_a, ref) {
139
- var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow = _p === void 0 ? components_arrow_Component.Arrow : _p, _q = _a.Field, Field = _q === void 0 ? components_field_Component.Field : _q, _r = _a.Optgroup, Optgroup = _r === void 0 ? components_optgroup_Component.Optgroup : _r, _s = _a.Option, Option = _s === void 0 ? components_option_Component.Option : _s, selected = _a.selected, options = _a.options, _t = _a.OptionsList, OptionsList = _t === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD$1
140
- ? components_virtualOptionsList_Component.VirtualOptionsList
141
- : components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, bottomSheetProps = _a.bottomSheetProps, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _v = _a.useWithApplyHook, useWithApplyHook = _v === void 0 ? multiple : _v, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "bottomSheetProps", "showClear", "showSelectAll", "showHeaderWithSelectAll", "useWithApplyHook"]);
142
- var applyProps = useSelectWithApply({
143
- optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { Footer: components_baseSelectMobile_footer_Component.Footer }),
144
- OptionsList: OptionsList,
145
- selected: selected,
146
- options: options,
147
- onChange: onChange,
148
- showClear: showClear,
149
- showSelectAll: showSelectAll,
150
- });
151
- return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, bottomSheetProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, bottomSheetProps), optionsListProps: optionsListProps }, restProps, (useWithApplyHook && applyProps))));
152
- });
153
-
154
- var VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
155
- var SelectModalMobile = React.forwardRef(function (_a, ref) {
156
- var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow = _p === void 0 ? components_arrow_Component.Arrow : _p, _q = _a.Field, Field = _q === void 0 ? components_field_Component.Field : _q, _r = _a.Optgroup, Optgroup = _r === void 0 ? components_optgroup_Component.Optgroup : _r, _s = _a.Option, Option = _s === void 0 ? components_option_Component.Option : _s, selected = _a.selected, options = _a.options, _t = _a.OptionsList, OptionsList = _t === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD
157
- ? components_virtualOptionsList_Component.VirtualOptionsList
158
- : components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, _v = _a.useWithApplyHook, useWithApplyHook = _v === void 0 ? multiple : _v, modalHeaderProps = _a.modalHeaderProps, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "showClear", "showSelectAll", "useWithApplyHook", "modalHeaderProps", "showHeaderWithSelectAll"]);
159
- var applyProps = useSelectWithApply({
160
- optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { Footer: components_baseSelectMobile_footer_Component.Footer }),
161
- OptionsList: OptionsList,
162
- selected: selected,
163
- options: options,
164
- onChange: onChange,
165
- showClear: showClear,
166
- showSelectAll: showSelectAll,
167
- });
168
- return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, optionsListProps: optionsListProps, modalHeaderProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, modalHeaderProps) }, restProps, (useWithApplyHook && applyProps))));
169
- });
170
-
171
- exports.OptionsListWithApply = OptionsListWithApply;
172
- exports.SELECT_ALL_KEY = SELECT_ALL_KEY;
173
- exports.SelectMobile = SelectMobile;
174
- exports.SelectModalMobile = SelectModalMobile;
175
- exports.useSelectWithApply = useSelectWithApply;
@@ -1,104 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { HTMLAttributes, ReactNode } from "react";
4
- import { BaseSelectProps } from "./typings";
5
- type FormControlProps = HTMLAttributes<HTMLDivElement> & {
6
- /**
7
- * Растягивает компонент на ширину контейнера
8
- */
9
- block?: boolean;
10
- /**
11
- * Размер компонента
12
- */
13
- size?: "s" | "m" | "l" | "xl";
14
- /**
15
- * Набор цветов для компонента
16
- */
17
- colors?: "default" | "inverted";
18
- /**
19
- * Заблокированное состояние
20
- */
21
- disabled?: boolean;
22
- /**
23
- * Cостояние только для чтения
24
- */
25
- readOnly?: boolean;
26
- /**
27
- * Заполненное состояние
28
- */
29
- filled?: boolean;
30
- /**
31
- * Выбранное (фокус) состояние
32
- */
33
- focused?: boolean;
34
- /**
35
- * Отображение ошибки
36
- */
37
- error?: ReactNode | boolean;
38
- /**
39
- * Текст подсказки
40
- */
41
- hint?: ReactNode;
42
- /**
43
- * Лейбл компонента
44
- */
45
- label?: ReactNode;
46
- /**
47
- * Вид лейбла внутри / снаружи
48
- */
49
- labelView?: "inner" | "outer";
50
- /**
51
- * Слот слева
52
- */
53
- leftAddons?: ReactNode;
54
- /**
55
- * Слот справа
56
- */
57
- rightAddons?: ReactNode;
58
- /**
59
- * Слот под полем
60
- */
61
- bottomAddons?: ReactNode;
62
- /**
63
- * Дополнительный класс
64
- */
65
- className?: string;
66
- /**
67
- * Дополнительный класс для поля
68
- */
69
- fieldClassName?: string;
70
- /**
71
- * Дополнительный класс для поля
72
- */
73
- inputWrapperClassName?: string;
74
- /**
75
- * Дополнительный класс для лейбла
76
- */
77
- labelClassName?: string;
78
- /**
79
- * Дополнительный класс для аддонов
80
- */
81
- addonsClassName?: string;
82
- /**
83
- * Идентификатор для систем автоматизированного тестирования
84
- */
85
- dataTestId?: string;
86
- /**
87
- * Компонент поля (инпут, textarea и пр.)
88
- */
89
- children?: ReactNode;
90
- };
91
- type SelectFieldProps = Omit<FormControlProps, 'size'> & Record<string, unknown>;
92
- type SelectProps = Omit<BaseSelectProps, 'fieldProps'> & {
93
- /**
94
- * Пропсы, которые будут прокинуты в компонент поля
95
- */
96
- fieldProps?: SelectFieldProps;
97
- };
98
- declare const Select: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "fieldProps"> & {
99
- /**
100
- * Пропсы, которые будут прокинуты в компонент поля
101
- */
102
- fieldProps?: SelectFieldProps | undefined;
103
- } & React.RefAttributes<HTMLDivElement>>;
104
- export { SelectFieldProps, SelectProps, Select };
@@ -1,93 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { FC, ReactNode } from "react";
4
- import { NavigationBarProps } from "./types-ebda875c";
5
- import { BaseModalProps, BaseModalContext } from "@alfalab/core-components-base-modal";
6
- type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
7
- declare const Header: FC<HeaderProps>;
8
- type ModalDesktopProps = BaseModalProps & {
9
- /**
10
- * Ширина модального окна
11
- * @default "m"
12
- */
13
- size?: "s" | "m" | "l" | "xl" | "fullscreen";
14
- /**
15
- * Растягивает модальное окно на весь экран
16
- * @deprecated Используйте размер fullscreen
17
- */
18
- fullscreen?: boolean;
19
- /**
20
- * Фиксирует позицию модального окна после открытия,
21
- * предотвращая скачки, если контент внутри будет меняться
22
- */
23
- fixedPosition?: boolean;
24
- /**
25
- * Управление наличием закрывающего крестика
26
- * @default false
27
- */
28
- hasCloser?: boolean;
29
- };
30
- type ModalMobileProps = Omit<ModalDesktopProps, "size" | "fixedPosition" | "fullscreen">;
31
- type View = "desktop" | "mobile";
32
- type TResponsiveModalContext = {
33
- view: View;
34
- size: NonNullable<ModalDesktopProps["size"]>;
35
- };
36
- type ContentProps = {
37
- /**
38
- * Контент
39
- */
40
- children?: ReactNode;
41
- /**
42
- * Дополнительный класс
43
- */
44
- className?: string;
45
- /**
46
- * Растягивает контент на всю высоту
47
- */
48
- flex?: boolean;
49
- };
50
- declare const Content: FC<ContentProps>;
51
- type FooterProps = {
52
- /**
53
- * Контент футера
54
- */
55
- children?: ReactNode;
56
- /**
57
- * Дополнительный класс
58
- */
59
- className?: string;
60
- /**
61
- * Фиксирует футер
62
- */
63
- sticky?: boolean;
64
- /**
65
- * Выравнивание элементов футера
66
- */
67
- layout?: "start" | "center" | "space-between" | "column";
68
- /**
69
- * Отступы между элементами футера
70
- */
71
- gap?: 16 | 24 | 32;
72
- };
73
- declare const Footer: FC<FooterProps>;
74
- declare const Modal: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
75
- size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
76
- fullscreen?: boolean | undefined;
77
- fixedPosition?: boolean | undefined;
78
- hasCloser?: boolean | undefined;
79
- } & {
80
- view: View;
81
- } & React.RefAttributes<HTMLDivElement>>;
82
- declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
83
- declare const ModalContext: import("react").Context<BaseModalContext>;
84
- declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
85
- Content: React.FC<ContentProps>;
86
- Header: React.FC<HeaderProps>;
87
- Footer: React.FC<FooterProps>;
88
- Closer: React.FC<CloserProps>;
89
- };
90
- export * from "./Component-3885b0d7";
91
- export * from "./index-ebda875c";
92
- export type { NavigationBarProps } from "./types-ebda875c";
93
- export { HeaderProps, Header, Content, FooterProps, Footer, Modal, ResponsiveContext, ModalContext, ModalMobile };
File without changes