@alfalab/core-components-select 15.2.3 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/Component.desktop.d.ts +3 -16
  2. package/Component.desktop.js +4 -2
  3. package/Component.mobile.d.ts +3 -39
  4. package/Component.mobile.js +23 -10
  5. package/Component.modal.mobile.d.ts +2 -58
  6. package/Component.modal.mobile.js +23 -35
  7. package/Component.responsive.d.ts +3 -17
  8. package/Component.responsive.js +11 -13
  9. package/components/arrow/Component.js +1 -1
  10. package/components/arrow/index.css +5 -5
  11. package/components/base-checkmark/Component.js +1 -1
  12. package/components/base-checkmark/index.css +4 -4
  13. package/components/base-option/Component.js +1 -1
  14. package/components/base-option/index.css +16 -16
  15. package/components/base-select/Component.d.ts +17 -2
  16. package/components/base-select/Component.js +188 -81
  17. package/components/base-select/index.css +12 -12
  18. package/components/base-select/index.js +1 -1
  19. package/{esm/components/base-select-mobile/index.css → components/base-select/mobile.css} +13 -22
  20. package/components/checkmark/Component.js +1 -1
  21. package/components/checkmark/index.css +11 -11
  22. package/components/checkmark-mobile/Component.js +1 -1
  23. package/components/checkmark-mobile/index.css +6 -6
  24. package/components/field/Component.js +1 -1
  25. package/components/field/index.css +15 -17
  26. package/components/footer/Component.d.ts +12 -0
  27. package/components/{base-select-mobile/footer → footer}/Component.js +6 -5
  28. package/{modern/components/base-select-mobile → components}/footer/index.css +6 -6
  29. package/components/footer/index.d.ts +1 -0
  30. package/components/{base-select-mobile/footer → footer}/index.js +3 -2
  31. package/components/index.js +2 -1
  32. package/components/optgroup/Component.js +1 -1
  33. package/components/optgroup/index.css +7 -7
  34. package/components/option/Component.js +1 -1
  35. package/components/option/index.css +24 -24
  36. package/components/options-list/Component.js +7 -3
  37. package/components/options-list/index.css +11 -11
  38. package/components/options-list/index.js +2 -1
  39. package/components/search/Component.d.ts +2 -4
  40. package/components/search/Component.js +1 -1
  41. package/components/search/index.css +2 -2
  42. package/components/virtual-options-list/Component.js +7 -3
  43. package/components/virtual-options-list/index.css +18 -18
  44. package/components/virtual-options-list/index.js +2 -1
  45. package/cssm/Component.desktop.d.ts +3 -16
  46. package/cssm/Component.desktop.js +5 -2
  47. package/cssm/Component.mobile.d.ts +3 -39
  48. package/cssm/Component.mobile.js +27 -13
  49. package/cssm/Component.modal.mobile.d.ts +2 -58
  50. package/cssm/Component.modal.mobile.js +28 -39
  51. package/cssm/Component.responsive.d.ts +3 -17
  52. package/cssm/Component.responsive.js +13 -15
  53. package/cssm/components/arrow/index.module.css +2 -2
  54. package/cssm/components/base-option/index.module.css +3 -3
  55. package/cssm/components/base-select/Component.d.ts +17 -2
  56. package/cssm/components/base-select/Component.js +186 -80
  57. package/cssm/components/base-select/index.js +2 -1
  58. package/cssm/components/base-select/index.module.css +2 -2
  59. package/cssm/components/{base-select-mobile/index.module.css → base-select/mobile.module.css} +0 -9
  60. package/cssm/components/checkmark/index.module.css +1 -1
  61. package/cssm/components/field/index.module.css +3 -5
  62. package/cssm/components/footer/Component.d.ts +12 -0
  63. package/cssm/components/{base-select-mobile/footer → footer}/Component.js +5 -4
  64. package/cssm/components/footer/index.d.ts +1 -0
  65. package/cssm/components/{base-select-mobile/footer → footer}/index.js +3 -2
  66. package/cssm/components/{base-select-mobile/footer → footer}/index.module.css +1 -1
  67. package/cssm/components/index.js +3 -1
  68. package/cssm/components/optgroup/index.module.css +1 -1
  69. package/cssm/components/option/index.module.css +4 -4
  70. package/cssm/components/options-list/Component.js +6 -2
  71. package/cssm/components/options-list/index.js +2 -1
  72. package/cssm/components/options-list/index.module.css +2 -2
  73. package/cssm/components/search/Component.d.ts +2 -4
  74. package/cssm/components/virtual-options-list/Component.js +6 -2
  75. package/cssm/components/virtual-options-list/index.js +2 -1
  76. package/cssm/components/virtual-options-list/index.module.css +3 -3
  77. package/cssm/desktop/index.d.ts +2 -0
  78. package/cssm/desktop/index.js +51 -0
  79. package/cssm/{hook-244c8d6e.js → hook-2f9ec939.js} +9 -5
  80. package/{esm/hook-8abfea97.d.ts → cssm/hook-ad89c253.d.ts} +3 -2
  81. package/cssm/index.d.ts +2 -2
  82. package/cssm/index.js +10 -9
  83. package/cssm/mobile/index.d.ts +3 -0
  84. package/cssm/mobile/index.js +67 -0
  85. package/cssm/presets/index.d.ts +1 -1
  86. package/cssm/presets/index.js +3 -2
  87. package/cssm/presets/useSelectWithApply/hook.js +3 -2
  88. package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -2
  89. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  90. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +3 -2
  91. package/cssm/shared/index.d.ts +12 -0
  92. package/cssm/shared/index.js +87 -0
  93. package/cssm/typings.d.ts +86 -7
  94. package/desktop/index.d.ts +2 -0
  95. package/{desktop.js → desktop/index.js} +16 -14
  96. package/desktop/package.json +3 -0
  97. package/esm/Component.desktop.d.ts +3 -16
  98. package/esm/Component.desktop.js +4 -2
  99. package/esm/Component.mobile.d.ts +3 -39
  100. package/esm/Component.mobile.js +22 -9
  101. package/esm/Component.modal.mobile.d.ts +2 -58
  102. package/esm/Component.modal.mobile.js +24 -36
  103. package/esm/Component.responsive.d.ts +3 -17
  104. package/esm/Component.responsive.js +11 -13
  105. package/esm/components/arrow/Component.js +1 -1
  106. package/esm/components/arrow/index.css +5 -5
  107. package/esm/components/base-checkmark/Component.js +1 -1
  108. package/esm/components/base-checkmark/index.css +4 -4
  109. package/esm/components/base-option/Component.js +1 -1
  110. package/esm/components/base-option/index.css +16 -16
  111. package/esm/components/base-select/Component.d.ts +17 -2
  112. package/esm/components/base-select/Component.js +190 -83
  113. package/esm/components/base-select/index.css +12 -12
  114. package/esm/components/base-select/index.js +1 -1
  115. package/{components/base-select-mobile/index.css → esm/components/base-select/mobile.css} +13 -22
  116. package/esm/components/checkmark/Component.js +1 -1
  117. package/esm/components/checkmark/index.css +11 -11
  118. package/esm/components/checkmark-mobile/Component.js +1 -1
  119. package/esm/components/checkmark-mobile/index.css +6 -6
  120. package/esm/components/field/Component.js +1 -1
  121. package/esm/components/field/index.css +15 -17
  122. package/esm/components/footer/Component.d.ts +12 -0
  123. package/esm/components/{base-select-mobile/footer → footer}/Component.js +6 -5
  124. package/{components/base-select-mobile → esm/components}/footer/index.css +6 -6
  125. package/esm/components/footer/index.d.ts +1 -0
  126. package/esm/components/{base-select-mobile/footer → footer}/index.js +1 -0
  127. package/esm/components/index.js +2 -1
  128. package/esm/components/optgroup/Component.js +1 -1
  129. package/esm/components/optgroup/index.css +7 -7
  130. package/esm/components/option/Component.js +1 -1
  131. package/esm/components/option/index.css +24 -24
  132. package/esm/components/options-list/Component.js +7 -3
  133. package/esm/components/options-list/index.css +11 -11
  134. package/esm/components/options-list/index.js +2 -1
  135. package/esm/components/search/Component.d.ts +2 -4
  136. package/esm/components/search/Component.js +1 -1
  137. package/esm/components/search/index.css +2 -2
  138. package/esm/components/virtual-options-list/Component.js +7 -3
  139. package/esm/components/virtual-options-list/index.css +18 -18
  140. package/esm/components/virtual-options-list/index.js +2 -1
  141. package/esm/desktop/index.d.ts +2 -0
  142. package/esm/{desktop.js → desktop/index.js} +16 -14
  143. package/esm/{hook-e63a15d0.js → hook-8209d0d1.js} +10 -6
  144. package/{cssm/hook-8abfea97.d.ts → esm/hook-ad89c253.d.ts} +3 -2
  145. package/esm/index.d.ts +2 -2
  146. package/esm/index.js +8 -7
  147. package/esm/mobile/index.d.ts +3 -0
  148. package/esm/mobile/index.js +44 -0
  149. package/esm/presets/index.d.ts +1 -1
  150. package/esm/presets/index.js +3 -2
  151. package/esm/presets/useSelectWithApply/hook.js +3 -2
  152. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -2
  153. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  154. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  155. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  156. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  157. package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  158. package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +3 -2
  159. package/esm/presets/useSelectWithLoading/hook.js +1 -1
  160. package/esm/presets/useSelectWithLoading/index.css +2 -2
  161. package/esm/shared/index.d.ts +12 -0
  162. package/esm/shared/index.js +42 -0
  163. package/esm/typings.d.ts +86 -7
  164. package/{hook-8abfea97.d.ts → hook-ad89c253.d.ts} +3 -2
  165. package/{hook-74d61833.js → hook-cb17586d.js} +9 -5
  166. package/index.d.ts +2 -2
  167. package/index.js +8 -7
  168. package/mobile/index.d.ts +3 -0
  169. package/mobile/index.js +53 -0
  170. package/mobile/package.json +3 -0
  171. package/modern/Component.desktop.d.ts +3 -16
  172. package/modern/Component.desktop.js +5 -3
  173. package/modern/Component.mobile.d.ts +3 -39
  174. package/modern/Component.mobile.js +29 -13
  175. package/modern/Component.modal.mobile.d.ts +2 -58
  176. package/modern/Component.modal.mobile.js +23 -43
  177. package/modern/Component.responsive.d.ts +3 -17
  178. package/modern/Component.responsive.js +11 -13
  179. package/modern/components/arrow/Component.js +1 -1
  180. package/modern/components/arrow/index.css +5 -5
  181. package/modern/components/base-checkmark/Component.js +1 -1
  182. package/modern/components/base-checkmark/index.css +4 -4
  183. package/modern/components/base-option/Component.js +1 -1
  184. package/modern/components/base-option/index.css +16 -16
  185. package/modern/components/base-select/Component.d.ts +17 -2
  186. package/modern/components/base-select/Component.js +179 -72
  187. package/modern/components/base-select/index.css +12 -12
  188. package/modern/components/base-select/index.js +1 -1
  189. package/modern/components/{base-select-mobile/index.css → base-select/mobile.css} +13 -22
  190. package/modern/components/checkmark/Component.js +1 -1
  191. package/modern/components/checkmark/index.css +11 -11
  192. package/modern/components/checkmark-mobile/Component.js +1 -1
  193. package/modern/components/checkmark-mobile/index.css +6 -6
  194. package/modern/components/field/Component.js +1 -1
  195. package/modern/components/field/index.css +15 -17
  196. package/modern/components/footer/Component.d.ts +12 -0
  197. package/modern/components/{base-select-mobile/footer → footer}/Component.js +5 -4
  198. package/{esm/components/base-select-mobile → modern/components}/footer/index.css +6 -6
  199. package/modern/components/footer/index.d.ts +1 -0
  200. package/modern/components/{base-select-mobile/footer → footer}/index.js +1 -0
  201. package/modern/components/index.js +2 -1
  202. package/modern/components/optgroup/Component.js +1 -1
  203. package/modern/components/optgroup/index.css +7 -7
  204. package/modern/components/option/Component.js +1 -1
  205. package/modern/components/option/index.css +24 -24
  206. package/modern/components/options-list/Component.js +5 -3
  207. package/modern/components/options-list/index.css +11 -11
  208. package/modern/components/options-list/index.js +2 -1
  209. package/modern/components/search/Component.d.ts +2 -4
  210. package/modern/components/search/Component.js +1 -1
  211. package/modern/components/search/index.css +2 -2
  212. package/modern/components/virtual-options-list/Component.js +5 -3
  213. package/modern/components/virtual-options-list/index.css +18 -18
  214. package/modern/components/virtual-options-list/index.js +2 -1
  215. package/modern/desktop/index.d.ts +2 -0
  216. package/modern/{desktop.js → desktop/index.js} +16 -14
  217. package/modern/{hook-5e1db0b0.js → hook-4a3d365d.js} +7 -3
  218. package/modern/{hook-8abfea97.d.ts → hook-ad89c253.d.ts} +3 -2
  219. package/modern/index.d.ts +2 -2
  220. package/modern/index.js +8 -7
  221. package/modern/mobile/index.d.ts +3 -0
  222. package/modern/mobile/index.js +43 -0
  223. package/modern/presets/index.d.ts +1 -1
  224. package/modern/presets/index.js +3 -2
  225. package/modern/presets/useSelectWithApply/hook.js +3 -2
  226. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -2
  227. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  228. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  229. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  230. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  231. package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  232. package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +3 -2
  233. package/modern/presets/useSelectWithLoading/hook.js +1 -1
  234. package/modern/presets/useSelectWithLoading/index.css +2 -2
  235. package/modern/shared/index.d.ts +12 -0
  236. package/modern/shared/index.js +41 -0
  237. package/modern/typings.d.ts +86 -7
  238. package/package.json +12 -10
  239. package/presets/index.d.ts +1 -1
  240. package/presets/index.js +3 -2
  241. package/presets/useSelectWithApply/hook.js +3 -2
  242. package/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -2
  243. package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
  244. package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
  245. package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
  246. package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
  247. package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  248. package/presets/useSelectWithApply/options-list-with-apply/index.js +3 -2
  249. package/presets/useSelectWithLoading/hook.js +1 -1
  250. package/presets/useSelectWithLoading/index.css +2 -2
  251. package/shared/index.d.ts +12 -0
  252. package/{shared.js → shared/index.js} +44 -43
  253. package/shared/package.json +3 -0
  254. package/src/Component.desktop.tsx +5 -14
  255. package/src/Component.mobile.tsx +38 -57
  256. package/src/Component.modal.mobile.tsx +5 -147
  257. package/src/Component.responsive.tsx +9 -44
  258. package/src/components/base-select/Component.tsx +380 -156
  259. package/src/components/base-select/index.module.css +1 -1
  260. package/src/components/{base-select-mobile/index.module.css → base-select/mobile.module.css} +0 -15
  261. package/src/components/{base-select-mobile/footer → footer}/Component.tsx +22 -4
  262. package/src/components/{base-select-mobile/footer → footer}/index.module.css +1 -1
  263. package/src/components/footer/index.ts +1 -0
  264. package/src/components/options-list/Component.tsx +6 -2
  265. package/src/components/virtual-options-list/Component.tsx +6 -2
  266. package/src/desktop/index.ts +2 -0
  267. package/src/desktop/package.json +3 -0
  268. package/src/index.ts +2 -4
  269. package/src/mobile/index.ts +4 -0
  270. package/src/mobile/package.json +3 -0
  271. package/src/presets/useSelectWithApply/hook.tsx +9 -3
  272. package/src/shared/index.ts +13 -0
  273. package/src/shared/package.json +3 -0
  274. package/src/typings.ts +110 -9
  275. package/src/vars.css +1 -1
  276. package/typings.d.ts +86 -7
  277. package/Component-89f0cb07.d.ts +0 -38
  278. package/Component.mobile-ebda875c.d.ts +0 -6
  279. package/Component.mobile-f1f15074.d.ts +0 -404
  280. package/components/base-select-mobile/Component.d.ts +0 -70
  281. package/components/base-select-mobile/Component.js +0 -296
  282. package/components/base-select-mobile/footer/Component.d.ts +0 -9
  283. package/components/base-select-mobile/footer/index.d.ts +0 -1
  284. package/components/base-select-mobile/index.d.ts +0 -1
  285. package/components/base-select-mobile/index.js +0 -36
  286. package/cssm/Component-89f0cb07.d.ts +0 -38
  287. package/cssm/Component.mobile-ebda875c.d.ts +0 -6
  288. package/cssm/Component.mobile-f1f15074.d.ts +0 -404
  289. package/cssm/components/base-select-mobile/Component.d.ts +0 -70
  290. package/cssm/components/base-select-mobile/Component.js +0 -303
  291. package/cssm/components/base-select-mobile/footer/Component.d.ts +0 -9
  292. package/cssm/components/base-select-mobile/footer/index.d.ts +0 -1
  293. package/cssm/components/base-select-mobile/index.d.ts +0 -1
  294. package/cssm/components/base-select-mobile/index.js +0 -45
  295. package/cssm/desktop-69921c40.d.ts +0 -6
  296. package/cssm/desktop.d.ts +0 -2
  297. package/cssm/desktop.js +0 -48
  298. package/cssm/index-ebda875c.d.ts +0 -2
  299. package/cssm/mobile-96988a65.d.ts +0 -2
  300. package/cssm/mobile.d.ts +0 -5
  301. package/cssm/mobile.js +0 -62
  302. package/cssm/shared.d.ts +0 -5
  303. package/cssm/shared.js +0 -85
  304. package/cssm/typings-89f0cb07.d.ts +0 -93
  305. package/cssm/typings-baf4875b.d.ts +0 -52
  306. package/desktop-69921c40.d.ts +0 -6
  307. package/desktop.d.ts +0 -2
  308. package/esm/Component-89f0cb07.d.ts +0 -38
  309. package/esm/Component.mobile-ebda875c.d.ts +0 -6
  310. package/esm/Component.mobile-f1f15074.d.ts +0 -404
  311. package/esm/components/base-select-mobile/Component.d.ts +0 -70
  312. package/esm/components/base-select-mobile/Component.js +0 -286
  313. package/esm/components/base-select-mobile/footer/Component.d.ts +0 -9
  314. package/esm/components/base-select-mobile/footer/index.d.ts +0 -1
  315. package/esm/components/base-select-mobile/index.d.ts +0 -1
  316. package/esm/components/base-select-mobile/index.js +0 -28
  317. package/esm/desktop-69921c40.d.ts +0 -6
  318. package/esm/desktop.d.ts +0 -2
  319. package/esm/index-ebda875c.d.ts +0 -2
  320. package/esm/mobile-96988a65.d.ts +0 -2
  321. package/esm/mobile.d.ts +0 -5
  322. package/esm/mobile.js +0 -40
  323. package/esm/shared.d.ts +0 -5
  324. package/esm/shared.js +0 -41
  325. package/esm/typings-89f0cb07.d.ts +0 -93
  326. package/esm/typings-baf4875b.d.ts +0 -52
  327. package/index-ebda875c.d.ts +0 -2
  328. package/mobile-96988a65.d.ts +0 -2
  329. package/mobile.d.ts +0 -5
  330. package/mobile.js +0 -49
  331. package/modern/Component-89f0cb07.d.ts +0 -38
  332. package/modern/Component.mobile-ebda875c.d.ts +0 -6
  333. package/modern/Component.mobile-f1f15074.d.ts +0 -404
  334. package/modern/components/base-select-mobile/Component.d.ts +0 -70
  335. package/modern/components/base-select-mobile/Component.js +0 -285
  336. package/modern/components/base-select-mobile/footer/Component.d.ts +0 -9
  337. package/modern/components/base-select-mobile/footer/index.d.ts +0 -1
  338. package/modern/components/base-select-mobile/index.d.ts +0 -1
  339. package/modern/components/base-select-mobile/index.js +0 -27
  340. package/modern/desktop-69921c40.d.ts +0 -6
  341. package/modern/desktop.d.ts +0 -2
  342. package/modern/index-ebda875c.d.ts +0 -2
  343. package/modern/mobile-96988a65.d.ts +0 -2
  344. package/modern/mobile.d.ts +0 -5
  345. package/modern/mobile.js +0 -39
  346. package/modern/shared.d.ts +0 -5
  347. package/modern/shared.js +0 -40
  348. package/modern/typings-89f0cb07.d.ts +0 -93
  349. package/modern/typings-baf4875b.d.ts +0 -52
  350. package/shared.d.ts +0 -5
  351. package/src/components/base-select-mobile/Component.tsx +0 -572
  352. package/src/components/base-select-mobile/footer/index.ts +0 -1
  353. package/src/components/base-select-mobile/index.ts +0 -1
  354. package/src/desktop.ts +0 -1
  355. package/src/mobile.ts +0 -5
  356. package/src/shared.ts +0 -5
  357. package/typings-89f0cb07.d.ts +0 -93
  358. package/typings-baf4875b.d.ts +0 -52
  359. /package/cssm/{hook-244c8d6e.d.ts → hook-2f9ec939.d.ts} +0 -0
  360. /package/esm/{hook-e63a15d0.d.ts → hook-8209d0d1.d.ts} +0 -0
  361. /package/{hook-74d61833.d.ts → hook-cb17586d.d.ts} +0 -0
  362. /package/modern/{hook-5e1db0b0.d.ts → hook-4a3d365d.d.ts} +0 -0
@@ -1,93 +0,0 @@
1
- import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, ReactNode } from 'react';
2
- type StyleColors = {
3
- default: {
4
- [key: string]: string;
5
- };
6
- inverted: {
7
- [key: string]: string;
8
- };
9
- };
10
- type ComponentProps = {
11
- /**
12
- * Тип кнопки
13
- * @default secondary
14
- */
15
- view?: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'outlined' | 'filled' | 'transparent' | 'link' | 'ghost';
16
- /**
17
- * Слот слева
18
- */
19
- leftAddons?: ReactNode;
20
- /**
21
- * Слот справа
22
- */
23
- rightAddons?: ReactNode;
24
- /**
25
- * Размер компонента
26
- * @default m
27
- */
28
- size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
29
- /**
30
- * Растягивает компонент на ширину контейнера
31
- * @default false
32
- */
33
- block?: boolean;
34
- /**
35
- * Дополнительный класс
36
- */
37
- className?: string;
38
- /**
39
- * Дополнительный класс для спиннера
40
- */
41
- spinnerClassName?: string;
42
- /**
43
- * Выводит ссылку в виде кнопки
44
- */
45
- href?: string;
46
- /**
47
- * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
48
- */
49
- Component?: ElementType;
50
- /**
51
- * Идентификатор для систем автоматизированного тестирования
52
- */
53
- dataTestId?: string;
54
- /**
55
- * Показать лоадер
56
- * @default false
57
- */
58
- loading?: boolean;
59
- /**
60
- * Не переносить текст кнопки на новую строку
61
- * @default false
62
- */
63
- nowrap?: boolean;
64
- /**
65
- * Набор цветов для компонента
66
- */
67
- colors?: 'default' | 'inverted';
68
- /**
69
- * Дочерние элементы.
70
- */
71
- children?: ReactNode;
72
- };
73
- type PrivateButtonProps = {
74
- /**
75
- * Основные стили компонента.
76
- */
77
- styles: {
78
- [key: string]: string;
79
- };
80
- /**
81
- * Стили компонента для default и inverted режима.
82
- */
83
- colorStylesMap: StyleColors;
84
- };
85
- type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
- type ButtonProps = CommonButtonProps & {
87
- /**
88
- * Контрольная точка, с нее начинается desktop версия
89
- * @default 1024
90
- */
91
- breakpoint?: number;
92
- };
93
- export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
@@ -1,52 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { BaseModalProps } from "@alfalab/core-components-base-modal";
3
- type ModalDesktopProps = BaseModalProps & {
4
- /**
5
- * Ширина модального окна
6
- * @default "m"
7
- */
8
- size?: 's' | 'm' | 'l' | 'xl' | 'fullscreen';
9
- /**
10
- * Растягивает модальное окно на весь экран
11
- * @deprecated Используйте размер fullscreen
12
- */
13
- fullscreen?: boolean;
14
- /**
15
- * Фиксирует позицию модального окна после открытия,
16
- * предотвращая скачки, если контент внутри будет меняться
17
- */
18
- fixedPosition?: boolean;
19
- /**
20
- * Управление наличием закрывающего крестика
21
- * @default false
22
- */
23
- hasCloser?: boolean;
24
- };
25
- type ModalMobileProps = Omit<ModalDesktopProps, 'size' | 'fixedPosition' | 'fullscreen'>;
26
- type ModalResponsiveProps = ModalDesktopProps & {
27
- /**
28
- * Контрольная точка, с нее начинается desktop версия
29
- * @default 1024
30
- */
31
- breakpoint?: number;
32
- };
33
- type View = 'desktop' | 'mobile';
34
- type TResponsiveModalContext = {
35
- view: View;
36
- size: NonNullable<ModalDesktopProps['size']>;
37
- };
38
- type ContentProps = {
39
- /**
40
- * Контент
41
- */
42
- children?: ReactNode;
43
- /**
44
- * Дополнительный класс
45
- */
46
- className?: string;
47
- /**
48
- * Растягивает контент на всю высоту
49
- */
50
- flex?: boolean;
51
- };
52
- export { ModalDesktopProps, ModalMobileProps, ModalResponsiveProps, View, TResponsiveModalContext, ContentProps };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { CommonButtonProps } from "./typings-89f0cb07";
4
- declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
5
- export { ButtonDesktop };
6
- export type { CommonButtonProps as ButtonDesktopProps } from "./typings-89f0cb07";
package/desktop.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { SelectDesktop, SelectDesktopProps } from "./Component.desktop";
2
- export {};
@@ -1,38 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { FC } from "react";
4
- import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
5
- type SpinnerProps = {
6
- /**
7
- * Управление видимостью компонента
8
- */
9
- visible?: boolean;
10
- /**
11
- * Размер компонента
12
- */
13
- size?: "xs" | "s" | "m";
14
- /**
15
- * Дополнительный класс
16
- */
17
- className?: string;
18
- /**
19
- * Идентификатор компонента в DOM
20
- */
21
- id?: string;
22
- /**
23
- * Идентификатор для систем автоматизированного тестирования
24
- */
25
- dataTestId?: string;
26
- /**
27
- * Палитра, в контексте которой используется спиннер
28
- */
29
- colors?: "default" | "inverted";
30
- };
31
- declare const Spinner: FC<SpinnerProps>;
32
- /**
33
- * Минимальное время отображения лоадера - 500мс,
34
- * чтобы при быстрых ответах от сервера кнопка не «моргала».
35
- */
36
- declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
37
- declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
38
- export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
4
- type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
- declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
- export { FormControlMobileProps, FormControlMobile };
@@ -1,404 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { FC, ReactNode, ButtonHTMLAttributes, ElementType, ForwardRefExoticComponent, RefAttributes, HTMLAttributes, AnchorHTMLAttributes, ReactElement } from "react";
4
- import { ContentProps, TResponsiveModalContext, View, ModalMobileProps } from "./typings-baf4875b";
5
- import { BaseModalContext } from "@alfalab/core-components-base-modal";
6
- import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
7
- import { ButtonProps } from "@alfalab/core-components-button";
8
- declare const Content: FC<ContentProps>;
9
- declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
10
- declare const Modal: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
11
- size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
12
- fullscreen?: boolean | undefined;
13
- fixedPosition?: boolean | undefined;
14
- hasCloser?: boolean | undefined;
15
- } & {
16
- view: View;
17
- } & React.RefAttributes<HTMLDivElement>>;
18
- type FooterProps = {
19
- /**
20
- * Контент футера
21
- */
22
- children?: ReactNode;
23
- /**
24
- * Дополнительный класс
25
- */
26
- className?: string;
27
- /**
28
- * Фиксирует футер
29
- */
30
- sticky?: boolean;
31
- /**
32
- * Выравнивание элементов футера
33
- */
34
- layout?: "start" | "center" | "space-between" | "column";
35
- /**
36
- * Отступы между элементами футера
37
- */
38
- gap?: 16 | 24 | 32;
39
- };
40
- declare const Footer: FC<FooterProps>;
41
- interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
42
- /**
43
- * Вид компонента
44
- */
45
- view: "desktop" | "mobile";
46
- /**
47
- * Дополнительный класс
48
- */
49
- className?: string;
50
- /**
51
- * Позиция крестика
52
- */
53
- align?: "left" | "right";
54
- /**
55
- * Фиксирует крестик
56
- */
57
- sticky?: boolean;
58
- /**
59
- * Иконка
60
- */
61
- icon?: ElementType;
62
- /**
63
- * Идентификатор для систем автоматизированного тестирования
64
- */
65
- dataTestId?: string;
66
- /**
67
- * Коллбэк закрытия.
68
- */
69
- onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
70
- }
71
- type NavigationBarProps = {
72
- /**
73
- * Контент шапки
74
- */
75
- children?: ReactNode;
76
- /**
77
- * Заголовок шапки
78
- */
79
- title?: string;
80
- /**
81
- * Подзаголовок (доступен только в мобильной версии)
82
- */
83
- subtitle?: ReactNode;
84
- /**
85
- * Размер заголовка (compact доступен только в мобильной версии)
86
- */
87
- titleSize?: "default" | "compact";
88
- /**
89
- * Доп. класс для аддонов
90
- */
91
- addonClassName?: string;
92
- /**
93
- * Слот слева
94
- */
95
- leftAddons?: ReactNode;
96
- /**
97
- * Слот справа
98
- */
99
- rightAddons?: ReactNode;
100
- /**
101
- * Дополнительный класс для closer
102
- */
103
- closerClassName?: string;
104
- /**
105
- * Слот снизу
106
- */
107
- bottomAddons?: ReactNode;
108
- /**
109
- * Наличие компонента крестика
110
- */
111
- hasCloser?: boolean;
112
- /**
113
- * Наличие кнопки "Назад"
114
- */
115
- hasBackButton?: boolean;
116
- /**
117
- * Дополнительный класс для правого аддона
118
- */
119
- backButtonClassName?: string;
120
- /**
121
- * Дополнительный класс
122
- */
123
- className?: string;
124
- /**
125
- * Дополнительный класс для контента
126
- */
127
- contentClassName?: string;
128
- /**
129
- * Дополнительный класс для нижнего аддона
130
- */
131
- bottomAddonsClassName?: string;
132
- /**
133
- * Выравнивание заголовка
134
- */
135
- align?: "left" | "center";
136
- /**
137
- * Обрезать ли заголовок
138
- */
139
- trim?: boolean;
140
- /**
141
- * Фиксирует шапку
142
- */
143
- sticky?: boolean;
144
- /**
145
- * Идентификатор для систем автоматизированного тестирования
146
- */
147
- dataTestId?: string;
148
- /**
149
- * Фоновое изображение
150
- */
151
- imageUrl?: string;
152
- /**
153
- * Иконка closer.
154
- */
155
- closerIcon?: React.ElementType;
156
- /**
157
- * Обработчик закрытия
158
- */
159
- onClose?: CloserProps["onClose"];
160
- /**
161
- * обработчик клика по кнопке "назад"
162
- */
163
- onBack?: () => void;
164
- /**
165
- * Вид шапки - мобильный или десктоп
166
- */
167
- view: "desktop" | "mobile";
168
- /**
169
- * Ссылка на родительскую ноду overflow: auto
170
- */
171
- scrollableParentRef?: React.RefObject<HTMLDivElement>;
172
- };
173
- type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
174
- declare const Header: FC<HeaderProps>;
175
- declare const ModalContext: import("react").Context<BaseModalContext>;
176
- interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
177
- /**
178
- * Текст после иконки
179
- */
180
- text?: string;
181
- /**
182
- * Дополнительный класс
183
- */
184
- className?: string;
185
- /**
186
- * Вид компонента
187
- */
188
- view: "mobile" | "desktop";
189
- /**
190
- * Прозрачность текста
191
- */
192
- textOpacity?: number;
193
- /**
194
- * Обработчик клика
195
- */
196
- onClick?: () => void;
197
- }
198
- declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
199
- declare const colors: readonly [
200
- "tertiary",
201
- "disabled",
202
- "accent",
203
- "primary",
204
- "attention",
205
- "positive",
206
- "secondary",
207
- "tertiary-inverted",
208
- "primary-inverted",
209
- "secondary-inverted",
210
- "link",
211
- "negative",
212
- "static-primary-light",
213
- "static-secondary-light",
214
- "static-tertiary-light",
215
- "static-primary-dark",
216
- "static-secondary-dark",
217
- "static-tertiary-dark",
218
- "static-accent"
219
- ];
220
- type Color = (typeof colors)[number];
221
- type NativeProps = HTMLAttributes<HTMLSpanElement>;
222
- type TextBaseProps = {
223
- /**
224
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
225
- */
226
- view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
227
- /**
228
- * Цвет текста
229
- */
230
- color?: Color;
231
- /**
232
- * Толщина шрифта
233
- */
234
- weight?: "regular" | "medium" | "bold";
235
- /**
236
- * Делает цифры моноширинными
237
- */
238
- monospaceNumbers?: boolean;
239
- /**
240
- * HTML тег
241
- */
242
- tag?: "span" | "div";
243
- /**
244
- * Css-класс для стилизации (native prop)
245
- */
246
- className?: string;
247
- /**
248
- * Id компонента для тестов
249
- */
250
- dataTestId?: string;
251
- /**
252
- * Контент (native prop)
253
- */
254
- children?: React.ReactNode;
255
- /**
256
- * Добавляет отступы к тэгу 'p'
257
- */
258
- defaultMargins?: never;
259
- /**
260
- * Количество строк (не поддерживает IE)
261
- */
262
- rowLimit?: 1 | 2 | 3;
263
- /**
264
- * Показать скелетон
265
- */
266
- showSkeleton?: boolean;
267
- /**
268
- * Пропы для скелетона
269
- */
270
- skeletonProps?: TextSkeletonProps;
271
- };
272
- type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
273
- tag?: "p";
274
- defaultMargins?: boolean;
275
- };
276
- type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
277
- type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
278
- type TitleProps = Omit<NativeProps$0, "color"> & {
279
- /**
280
- * HTML тег
281
- */
282
- tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
283
- /**
284
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
285
- */
286
- view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
287
- /**
288
- * Цвет текста
289
- */
290
- color?: Color;
291
- /**
292
- * Толщина шрифта
293
- */
294
- weight?: "regular" | "medium" | "bold";
295
- /**
296
- * Шрифт текста
297
- */
298
- font?: "styrene" | "system";
299
- /**
300
- * Добавляет отступы
301
- */
302
- defaultMargins?: boolean;
303
- /**
304
- * Css-класс для стилизации (native prop)
305
- */
306
- className?: string;
307
- /**
308
- * Id компонента для тестов
309
- */
310
- dataTestId?: string;
311
- /**
312
- * Контент (native prop)
313
- */
314
- children?: React.ReactNode;
315
- /**
316
- * Количество строк (не поддерживает IE)
317
- */
318
- rowLimit?: 1 | 2 | 3;
319
- /**
320
- * Показать скелетон
321
- */
322
- showSkeleton?: boolean;
323
- /**
324
- * Пропы для скелетона
325
- */
326
- skeletonProps?: TextSkeletonProps;
327
- };
328
- type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
329
- declare const Typography: {
330
- Title: FC<TitleProps>;
331
- Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
332
- TitleResponsive: FC<TitleProps>;
333
- TitleMobile: FC<TitleMobileProps>;
334
- };
335
- declare const typographyPresets: {
336
- mobile: {
337
- list: {
338
- text: {
339
- primary: {
340
- tag: string;
341
- view: string;
342
- };
343
- secondary: {
344
- tag: string;
345
- color: string;
346
- view: string;
347
- };
348
- };
349
- };
350
- };
351
- };
352
- declare const TitleResponsive: FC<TitleProps>;
353
- type IconButtonProps = {
354
- /**
355
- * Компонент иконки
356
- */
357
- icon: ElementType<{
358
- className?: string;
359
- }> | ReactElement;
360
- /**
361
- * Тип кнопки
362
- */
363
- view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
364
- /**
365
- * Размер компонента
366
- */
367
- size?: "xxs" | "xs" | "s";
368
- /**
369
- * Дополнительный класс
370
- */
371
- className?: string;
372
- /**
373
- * Выравнивание иконки
374
- * @default 'center'
375
- */
376
- alignIcon?: "left" | "center" | "right";
377
- /**
378
- * Идентификатор для систем автоматизированного тестирования
379
- */
380
- dataTestId?: string;
381
- /**
382
- * Набор цветов для компонента
383
- */
384
- colors?: "default" | "inverted";
385
- } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
386
- declare const IconButton: React.ForwardRefExoticComponent<{
387
- icon: ElementType<{
388
- className?: string;
389
- }> | ReactElement;
390
- view?: "primary" | "secondary" | "tertiary" | "negative" | "transparent" | undefined;
391
- size?: "xs" | "s" | "xxs" | undefined;
392
- className?: string | undefined;
393
- alignIcon?: "center" | "right" | "left" | undefined;
394
- dataTestId?: string | undefined;
395
- colors?: "default" | "inverted" | undefined;
396
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "Component" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
397
- declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
398
- Content: React.FC<import("./typings-baf4875b").ContentProps>;
399
- Header: React.FC<HeaderProps>;
400
- Footer: React.FC<FooterProps>;
401
- };
402
- export { Content, ResponsiveContext, Modal, FooterProps, Footer, HeaderProps, Header, ModalContext, BackArrowAddonProps, BackArrowAddon, Typography, typographyPresets, TitleResponsive, IconButtonProps, IconButton, ModalMobile };
403
- export type { TitleProps, TextProps, Color };
404
- export * from "./useSkeleton-1b036d4b";
@@ -1,70 +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 { BaseSelectProps } from "../../typings";
6
- type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
- /**
8
- * Футер
9
- * @deprecated Используйте bottomSheetProps.actionButton
10
- */
11
- footer?: ReactNode;
12
- /**
13
- * Будет ли свайпаться шторка
14
- * @deprecated Используйте bottomSheetProps.swipeable
15
- */
16
- swipeable?: boolean;
17
- /**
18
- * Отображать в BottomSheet
19
- */
20
- isBottomSheet?: boolean;
21
- /**
22
- * Дополнительные пропсы шторки
23
- */
24
- bottomSheetProps?: Partial<BottomSheetProps>;
25
- /**
26
- * Дополнительные пропсы модалки
27
- */
28
- modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
29
- /**
30
- * Дополнительные пропсы шапки модалки
31
- */
32
- modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
33
- /**
34
- * Дополнительные пропсы футера модалки
35
- */
36
- modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
37
- };
38
- declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
39
- /**
40
- * Футер
41
- * @deprecated Используйте bottomSheetProps.actionButton
42
- */
43
- footer?: ReactNode;
44
- /**
45
- * Будет ли свайпаться шторка
46
- * @deprecated Используйте bottomSheetProps.swipeable
47
- */
48
- swipeable?: boolean | undefined;
49
- /**
50
- * Отображать в BottomSheet
51
- */
52
- isBottomSheet?: boolean | undefined;
53
- /**
54
- * Дополнительные пропсы шторки
55
- */
56
- bottomSheetProps?: Partial<BottomSheetProps> | undefined;
57
- /**
58
- * Дополнительные пропсы модалки
59
- */
60
- modalProps?: Partial<ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
61
- /**
62
- * Дополнительные пропсы шапки модалки
63
- */
64
- modalHeaderProps?: Partial<import("../../Component.mobile-f1f15074").HeaderProps> | undefined;
65
- /**
66
- * Дополнительные пропсы футера модалки
67
- */
68
- modalFooterProps?: Partial<import("../../Component.mobile-f1f15074").FooterProps> | undefined;
69
- } & React.RefAttributes<unknown>>;
70
- export { SelectMobileProps, BaseSelectMobile };