@vkontakte/vkui 5.9.1 → 5.9.3

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 (303) hide show
  1. package/dist/cjs/components/ActionSheet/ActionSheet.js +1 -1
  2. package/dist/cjs/components/ActionSheet/ActionSheet.js.map +1 -1
  3. package/dist/cjs/components/Alert/Alert.d.ts +3 -3
  4. package/dist/cjs/components/Alert/Alert.d.ts.map +1 -1
  5. package/dist/cjs/components/Alert/Alert.js +5 -3
  6. package/dist/cjs/components/Alert/Alert.js.map +1 -1
  7. package/dist/cjs/components/CalendarRange/CalendarRange.d.ts +1 -1
  8. package/dist/cjs/components/CalendarRange/CalendarRange.d.ts.map +1 -1
  9. package/dist/cjs/components/CalendarRange/CalendarRange.js +1 -2
  10. package/dist/cjs/components/CalendarRange/CalendarRange.js.map +1 -1
  11. package/dist/cjs/components/ChipsSelect/ChipsSelect.js +1 -1
  12. package/dist/cjs/components/ChipsSelect/ChipsSelect.js.map +1 -1
  13. package/dist/cjs/components/CustomScrollView/CustomScrollView.d.ts +4 -2
  14. package/dist/cjs/components/CustomScrollView/CustomScrollView.d.ts.map +1 -1
  15. package/dist/cjs/components/CustomScrollView/CustomScrollView.js +17 -5
  16. package/dist/cjs/components/CustomScrollView/CustomScrollView.js.map +1 -1
  17. package/dist/cjs/components/CustomSelect/CustomSelect.d.ts +4 -1
  18. package/dist/cjs/components/CustomSelect/CustomSelect.d.ts.map +1 -1
  19. package/dist/cjs/components/CustomSelect/CustomSelect.js.map +1 -1
  20. package/dist/cjs/components/FormLayout/FormLayout.d.ts +3 -3
  21. package/dist/cjs/components/FormLayout/FormLayout.d.ts.map +1 -1
  22. package/dist/cjs/components/FormLayout/FormLayout.js +5 -2
  23. package/dist/cjs/components/FormLayout/FormLayout.js.map +1 -1
  24. package/dist/cjs/components/Gallery/Gallery.d.ts.map +1 -1
  25. package/dist/cjs/components/Gallery/Gallery.js +3 -10
  26. package/dist/cjs/components/Gallery/Gallery.js.map +1 -1
  27. package/dist/cjs/components/Gallery/hooks.d.ts +2 -0
  28. package/dist/cjs/components/Gallery/hooks.d.ts.map +1 -0
  29. package/dist/cjs/components/Gallery/hooks.js +52 -0
  30. package/dist/cjs/components/Gallery/hooks.js.map +1 -0
  31. package/dist/cjs/components/Header/Header.d.ts +3 -3
  32. package/dist/cjs/components/Header/Header.d.ts.map +1 -1
  33. package/dist/cjs/components/Header/Header.js +4 -5
  34. package/dist/cjs/components/Header/Header.js.map +1 -1
  35. package/dist/cjs/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -1
  36. package/dist/cjs/components/HorizontalScroll/HorizontalScroll.js +4 -0
  37. package/dist/cjs/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
  38. package/dist/cjs/components/ModalPageHeader/ModalPageHeader.d.ts +3 -3
  39. package/dist/cjs/components/ModalPageHeader/ModalPageHeader.d.ts.map +1 -1
  40. package/dist/cjs/components/ModalPageHeader/ModalPageHeader.js +5 -2
  41. package/dist/cjs/components/ModalPageHeader/ModalPageHeader.js.map +1 -1
  42. package/dist/cjs/components/ModalRoot/ModalRoot.js +6 -8
  43. package/dist/cjs/components/ModalRoot/ModalRoot.js.map +1 -1
  44. package/dist/cjs/components/PullToRefresh/PullToRefresh.d.ts.map +1 -1
  45. package/dist/cjs/components/PullToRefresh/PullToRefresh.js +22 -7
  46. package/dist/cjs/components/PullToRefresh/PullToRefresh.js.map +1 -1
  47. package/dist/cjs/components/Typography/Caption/Caption.d.ts +2 -0
  48. package/dist/cjs/components/Typography/Caption/Caption.d.ts.map +1 -1
  49. package/dist/cjs/components/Typography/Caption/Caption.js.map +1 -1
  50. package/dist/cjs/components/Typography/Footnote/Footnote.d.ts +2 -0
  51. package/dist/cjs/components/Typography/Footnote/Footnote.d.ts.map +1 -1
  52. package/dist/cjs/components/Typography/Footnote/Footnote.js.map +1 -1
  53. package/dist/cjs/components/Typography/Headline/Headline.d.ts +2 -0
  54. package/dist/cjs/components/Typography/Headline/Headline.d.ts.map +1 -1
  55. package/dist/cjs/components/Typography/Headline/Headline.js.map +1 -1
  56. package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts +2 -0
  57. package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts.map +1 -1
  58. package/dist/cjs/components/Typography/Paragraph/Paragraph.js.map +1 -1
  59. package/dist/cjs/components/Typography/Subhead/Subhead.d.ts +2 -0
  60. package/dist/cjs/components/Typography/Subhead/Subhead.d.ts.map +1 -1
  61. package/dist/cjs/components/Typography/Subhead/Subhead.js.map +1 -1
  62. package/dist/cjs/components/Typography/Text/Text.d.ts +2 -0
  63. package/dist/cjs/components/Typography/Text/Text.d.ts.map +1 -1
  64. package/dist/cjs/components/Typography/Text/Text.js.map +1 -1
  65. package/dist/cjs/components/Typography/Title/Title.d.ts +2 -0
  66. package/dist/cjs/components/Typography/Title/Title.d.ts.map +1 -1
  67. package/dist/cjs/components/Typography/Title/Title.js.map +1 -1
  68. package/dist/cjs/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +3 -3
  69. package/dist/cjs/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts.map +1 -1
  70. package/dist/cjs/components/VisuallyHiddenInput/VisuallyHiddenInput.js +6 -3
  71. package/dist/cjs/components/VisuallyHiddenInput/VisuallyHiddenInput.js.map +1 -1
  72. package/dist/cjs/lib/floating/adapters.d.ts +1 -1
  73. package/dist/cjs/lib/floating/adapters.d.ts.map +1 -1
  74. package/dist/cjs/lib/floating/adapters.js +1 -1
  75. package/dist/cjs/lib/floating/adapters.js.map +1 -1
  76. package/dist/cjs/lib/floating/index.d.ts +1 -1
  77. package/dist/cjs/lib/floating/index.d.ts.map +1 -1
  78. package/dist/cjs/lib/floating/index.js +1 -1
  79. package/dist/cjs/lib/floating/index.js.map +1 -1
  80. package/dist/cjs/lib/floating/types.d.ts +2 -2
  81. package/dist/cjs/lib/floating/types.d.ts.map +1 -1
  82. package/dist/components/ActionSheet/ActionSheet.js +1 -1
  83. package/dist/components/ActionSheet/ActionSheet.js.map +1 -1
  84. package/dist/components/Alert/Alert.d.ts +3 -3
  85. package/dist/components/Alert/Alert.d.ts.map +1 -1
  86. package/dist/components/Alert/Alert.js +5 -3
  87. package/dist/components/Alert/Alert.js.map +1 -1
  88. package/dist/components/CalendarRange/CalendarRange.d.ts +1 -1
  89. package/dist/components/CalendarRange/CalendarRange.d.ts.map +1 -1
  90. package/dist/components/CalendarRange/CalendarRange.js +1 -2
  91. package/dist/components/CalendarRange/CalendarRange.js.map +1 -1
  92. package/dist/components/ChipsSelect/ChipsSelect.js +1 -1
  93. package/dist/components/ChipsSelect/ChipsSelect.js.map +1 -1
  94. package/dist/components/CustomScrollView/CustomScrollView.d.ts +4 -2
  95. package/dist/components/CustomScrollView/CustomScrollView.d.ts.map +1 -1
  96. package/dist/components/CustomScrollView/CustomScrollView.js +17 -5
  97. package/dist/components/CustomScrollView/CustomScrollView.js.map +1 -1
  98. package/dist/components/CustomSelect/CustomSelect.d.ts +4 -1
  99. package/dist/components/CustomSelect/CustomSelect.d.ts.map +1 -1
  100. package/dist/components/CustomSelect/CustomSelect.js.map +1 -1
  101. package/dist/components/FormLayout/FormLayout.d.ts +3 -3
  102. package/dist/components/FormLayout/FormLayout.d.ts.map +1 -1
  103. package/dist/components/FormLayout/FormLayout.js +5 -2
  104. package/dist/components/FormLayout/FormLayout.js.map +1 -1
  105. package/dist/components/Gallery/Gallery.d.ts.map +1 -1
  106. package/dist/components/Gallery/Gallery.js +3 -10
  107. package/dist/components/Gallery/Gallery.js.map +1 -1
  108. package/dist/components/Gallery/hooks.d.ts +2 -0
  109. package/dist/components/Gallery/hooks.d.ts.map +1 -0
  110. package/dist/components/Gallery/hooks.js +41 -0
  111. package/dist/components/Gallery/hooks.js.map +1 -0
  112. package/dist/components/Header/Header.d.ts +3 -3
  113. package/dist/components/Header/Header.d.ts.map +1 -1
  114. package/dist/components/Header/Header.js +4 -5
  115. package/dist/components/Header/Header.js.map +1 -1
  116. package/dist/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -1
  117. package/dist/components/HorizontalScroll/HorizontalScroll.js +4 -0
  118. package/dist/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
  119. package/dist/components/ModalPageHeader/ModalPageHeader.d.ts +3 -3
  120. package/dist/components/ModalPageHeader/ModalPageHeader.d.ts.map +1 -1
  121. package/dist/components/ModalPageHeader/ModalPageHeader.js +5 -2
  122. package/dist/components/ModalPageHeader/ModalPageHeader.js.map +1 -1
  123. package/dist/components/ModalRoot/ModalRoot.js +6 -8
  124. package/dist/components/ModalRoot/ModalRoot.js.map +1 -1
  125. package/dist/components/PullToRefresh/PullToRefresh.d.ts.map +1 -1
  126. package/dist/components/PullToRefresh/PullToRefresh.js +22 -7
  127. package/dist/components/PullToRefresh/PullToRefresh.js.map +1 -1
  128. package/dist/components/Typography/Caption/Caption.d.ts +2 -0
  129. package/dist/components/Typography/Caption/Caption.d.ts.map +1 -1
  130. package/dist/components/Typography/Caption/Caption.js +2 -0
  131. package/dist/components/Typography/Caption/Caption.js.map +1 -1
  132. package/dist/components/Typography/Footnote/Footnote.d.ts +2 -0
  133. package/dist/components/Typography/Footnote/Footnote.d.ts.map +1 -1
  134. package/dist/components/Typography/Footnote/Footnote.js +2 -0
  135. package/dist/components/Typography/Footnote/Footnote.js.map +1 -1
  136. package/dist/components/Typography/Headline/Headline.d.ts +2 -0
  137. package/dist/components/Typography/Headline/Headline.d.ts.map +1 -1
  138. package/dist/components/Typography/Headline/Headline.js +2 -0
  139. package/dist/components/Typography/Headline/Headline.js.map +1 -1
  140. package/dist/components/Typography/Paragraph/Paragraph.d.ts +2 -0
  141. package/dist/components/Typography/Paragraph/Paragraph.d.ts.map +1 -1
  142. package/dist/components/Typography/Paragraph/Paragraph.js +2 -0
  143. package/dist/components/Typography/Paragraph/Paragraph.js.map +1 -1
  144. package/dist/components/Typography/Subhead/Subhead.d.ts +2 -0
  145. package/dist/components/Typography/Subhead/Subhead.d.ts.map +1 -1
  146. package/dist/components/Typography/Subhead/Subhead.js +2 -0
  147. package/dist/components/Typography/Subhead/Subhead.js.map +1 -1
  148. package/dist/components/Typography/Text/Text.d.ts +2 -0
  149. package/dist/components/Typography/Text/Text.d.ts.map +1 -1
  150. package/dist/components/Typography/Text/Text.js +2 -0
  151. package/dist/components/Typography/Text/Text.js.map +1 -1
  152. package/dist/components/Typography/Title/Title.d.ts +2 -0
  153. package/dist/components/Typography/Title/Title.d.ts.map +1 -1
  154. package/dist/components/Typography/Title/Title.js +2 -0
  155. package/dist/components/Typography/Title/Title.js.map +1 -1
  156. package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +3 -3
  157. package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts.map +1 -1
  158. package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.js +6 -3
  159. package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.js.map +1 -1
  160. package/dist/components.css +6 -6
  161. package/dist/components.css.map +1 -1
  162. package/dist/components.js.tmp +3783 -2492
  163. package/dist/cssm/components/ActionSheet/ActionSheet.js +1 -1
  164. package/dist/cssm/components/ActionSheet/ActionSheet.js.map +1 -1
  165. package/dist/cssm/components/Alert/Alert.d.ts +3 -3
  166. package/dist/cssm/components/Alert/Alert.d.ts.map +1 -1
  167. package/dist/cssm/components/Alert/Alert.js +3 -2
  168. package/dist/cssm/components/Alert/Alert.js.map +1 -1
  169. package/dist/cssm/components/Alert/Alert.module.css +5 -0
  170. package/dist/cssm/components/Button/Button.module.css +3 -1
  171. package/dist/cssm/components/CalendarRange/CalendarRange.d.ts +1 -1
  172. package/dist/cssm/components/CalendarRange/CalendarRange.d.ts.map +1 -1
  173. package/dist/cssm/components/CalendarRange/CalendarRange.js +1 -1
  174. package/dist/cssm/components/CalendarRange/CalendarRange.js.map +1 -1
  175. package/dist/cssm/components/ChipsSelect/ChipsSelect.js +1 -1
  176. package/dist/cssm/components/ChipsSelect/ChipsSelect.js.map +1 -1
  177. package/dist/cssm/components/CustomScrollView/CustomScrollView.d.ts +4 -2
  178. package/dist/cssm/components/CustomScrollView/CustomScrollView.d.ts.map +1 -1
  179. package/dist/cssm/components/CustomScrollView/CustomScrollView.js +4 -2
  180. package/dist/cssm/components/CustomScrollView/CustomScrollView.js.map +1 -1
  181. package/dist/cssm/components/CustomSelect/CustomSelect.d.ts +4 -1
  182. package/dist/cssm/components/CustomSelect/CustomSelect.d.ts.map +1 -1
  183. package/dist/cssm/components/CustomSelect/CustomSelect.js.map +1 -1
  184. package/dist/cssm/components/CustomSelectOption/CustomSelectOption.module.css +0 -5
  185. package/dist/cssm/components/FormLayout/FormLayout.d.ts +3 -3
  186. package/dist/cssm/components/FormLayout/FormLayout.d.ts.map +1 -1
  187. package/dist/cssm/components/FormLayout/FormLayout.js +4 -2
  188. package/dist/cssm/components/FormLayout/FormLayout.js.map +1 -1
  189. package/dist/cssm/components/Gallery/Gallery.d.ts.map +1 -1
  190. package/dist/cssm/components/Gallery/Gallery.js +2 -7
  191. package/dist/cssm/components/Gallery/Gallery.js.map +1 -1
  192. package/dist/cssm/components/Gallery/hooks.d.ts +2 -0
  193. package/dist/cssm/components/Gallery/hooks.d.ts.map +1 -0
  194. package/dist/cssm/components/Gallery/hooks.js +39 -0
  195. package/dist/cssm/components/Gallery/hooks.js.map +1 -0
  196. package/dist/cssm/components/Header/Header.d.ts +3 -3
  197. package/dist/cssm/components/Header/Header.d.ts.map +1 -1
  198. package/dist/cssm/components/Header/Header.js +2 -3
  199. package/dist/cssm/components/Header/Header.js.map +1 -1
  200. package/dist/cssm/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -1
  201. package/dist/cssm/components/HorizontalScroll/HorizontalScroll.js +4 -0
  202. package/dist/cssm/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
  203. package/dist/cssm/components/ModalPage/ModalPage.module.css +1 -4
  204. package/dist/cssm/components/ModalPageHeader/ModalPageHeader.d.ts +3 -3
  205. package/dist/cssm/components/ModalPageHeader/ModalPageHeader.d.ts.map +1 -1
  206. package/dist/cssm/components/ModalPageHeader/ModalPageHeader.js +4 -2
  207. package/dist/cssm/components/ModalPageHeader/ModalPageHeader.js.map +1 -1
  208. package/dist/cssm/components/ModalRoot/ModalRoot.js +6 -8
  209. package/dist/cssm/components/ModalRoot/ModalRoot.js.map +1 -1
  210. package/dist/cssm/components/PanelHeaderButton/PanelHeaderButton.module.css +7 -1
  211. package/dist/cssm/components/PullToRefresh/PullToRefresh.d.ts.map +1 -1
  212. package/dist/cssm/components/PullToRefresh/PullToRefresh.js +22 -7
  213. package/dist/cssm/components/PullToRefresh/PullToRefresh.js.map +1 -1
  214. package/dist/cssm/components/Snackbar/Snackbar.module.css +1 -1
  215. package/dist/cssm/components/Typography/Caption/Caption.d.ts +2 -0
  216. package/dist/cssm/components/Typography/Caption/Caption.d.ts.map +1 -1
  217. package/dist/cssm/components/Typography/Caption/Caption.js +2 -0
  218. package/dist/cssm/components/Typography/Caption/Caption.js.map +1 -1
  219. package/dist/cssm/components/Typography/Footnote/Footnote.d.ts +2 -0
  220. package/dist/cssm/components/Typography/Footnote/Footnote.d.ts.map +1 -1
  221. package/dist/cssm/components/Typography/Footnote/Footnote.js +2 -0
  222. package/dist/cssm/components/Typography/Footnote/Footnote.js.map +1 -1
  223. package/dist/cssm/components/Typography/Headline/Headline.d.ts +2 -0
  224. package/dist/cssm/components/Typography/Headline/Headline.d.ts.map +1 -1
  225. package/dist/cssm/components/Typography/Headline/Headline.js +2 -0
  226. package/dist/cssm/components/Typography/Headline/Headline.js.map +1 -1
  227. package/dist/cssm/components/Typography/Paragraph/Paragraph.d.ts +2 -0
  228. package/dist/cssm/components/Typography/Paragraph/Paragraph.d.ts.map +1 -1
  229. package/dist/cssm/components/Typography/Paragraph/Paragraph.js +2 -0
  230. package/dist/cssm/components/Typography/Paragraph/Paragraph.js.map +1 -1
  231. package/dist/cssm/components/Typography/Subhead/Subhead.d.ts +2 -0
  232. package/dist/cssm/components/Typography/Subhead/Subhead.d.ts.map +1 -1
  233. package/dist/cssm/components/Typography/Subhead/Subhead.js +2 -0
  234. package/dist/cssm/components/Typography/Subhead/Subhead.js.map +1 -1
  235. package/dist/cssm/components/Typography/Text/Text.d.ts +2 -0
  236. package/dist/cssm/components/Typography/Text/Text.d.ts.map +1 -1
  237. package/dist/cssm/components/Typography/Text/Text.js +2 -0
  238. package/dist/cssm/components/Typography/Text/Text.js.map +1 -1
  239. package/dist/cssm/components/Typography/Title/Title.d.ts +2 -0
  240. package/dist/cssm/components/Typography/Title/Title.d.ts.map +1 -1
  241. package/dist/cssm/components/Typography/Title/Title.js +2 -0
  242. package/dist/cssm/components/Typography/Title/Title.js.map +1 -1
  243. package/dist/cssm/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +3 -3
  244. package/dist/cssm/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts.map +1 -1
  245. package/dist/cssm/components/VisuallyHiddenInput/VisuallyHiddenInput.js +4 -2
  246. package/dist/cssm/components/VisuallyHiddenInput/VisuallyHiddenInput.js.map +1 -1
  247. package/dist/cssm/lib/floating/adapters.d.ts +1 -1
  248. package/dist/cssm/lib/floating/adapters.d.ts.map +1 -1
  249. package/dist/cssm/lib/floating/adapters.js +1 -1
  250. package/dist/cssm/lib/floating/adapters.js.map +1 -1
  251. package/dist/cssm/lib/floating/index.d.ts +1 -1
  252. package/dist/cssm/lib/floating/index.d.ts.map +1 -1
  253. package/dist/cssm/lib/floating/index.js +1 -1
  254. package/dist/cssm/lib/floating/index.js.map +1 -1
  255. package/dist/cssm/lib/floating/types.d.ts +2 -2
  256. package/dist/cssm/lib/floating/types.d.ts.map +1 -1
  257. package/dist/cssm/lib/floating/types.js.map +1 -1
  258. package/dist/lib/floating/adapters.d.ts +1 -1
  259. package/dist/lib/floating/adapters.d.ts.map +1 -1
  260. package/dist/lib/floating/adapters.js +1 -1
  261. package/dist/lib/floating/adapters.js.map +1 -1
  262. package/dist/lib/floating/index.d.ts +1 -1
  263. package/dist/lib/floating/index.d.ts.map +1 -1
  264. package/dist/lib/floating/index.js +1 -1
  265. package/dist/lib/floating/index.js.map +1 -1
  266. package/dist/lib/floating/types.d.ts +2 -2
  267. package/dist/lib/floating/types.d.ts.map +1 -1
  268. package/dist/lib/floating/types.js.map +1 -1
  269. package/dist/vkui.css +6 -6
  270. package/dist/vkui.css.map +1 -1
  271. package/dist/vkui.js.tmp +3783 -2492
  272. package/package.json +2 -2
  273. package/src/components/ActionSheet/ActionSheet.tsx +2 -2
  274. package/src/components/Alert/Alert.module.css +5 -0
  275. package/src/components/Alert/Alert.tsx +10 -3
  276. package/src/components/Button/Button.module.css +3 -1
  277. package/src/components/CalendarRange/CalendarRange.tsx +0 -1
  278. package/src/components/ChipsSelect/ChipsSelect.tsx +1 -1
  279. package/src/components/CustomScrollView/CustomScrollView.tsx +13 -2
  280. package/src/components/CustomSelect/CustomSelect.tsx +5 -1
  281. package/src/components/CustomSelectOption/CustomSelectOption.module.css +0 -5
  282. package/src/components/FormLayout/FormLayout.tsx +8 -3
  283. package/src/components/Gallery/Gallery.tsx +2 -6
  284. package/src/components/Gallery/hooks.ts +39 -0
  285. package/src/components/Header/Header.tsx +3 -3
  286. package/src/components/HorizontalScroll/HorizontalScroll.tsx +4 -0
  287. package/src/components/ModalPage/ModalPage.module.css +1 -4
  288. package/src/components/ModalPageHeader/ModalPageHeader.tsx +8 -4
  289. package/src/components/ModalRoot/ModalRoot.tsx +6 -5
  290. package/src/components/PanelHeaderButton/PanelHeaderButton.module.css +6 -1
  291. package/src/components/PullToRefresh/PullToRefresh.tsx +28 -9
  292. package/src/components/Snackbar/Snackbar.module.css +1 -1
  293. package/src/components/Typography/Caption/Caption.tsx +2 -0
  294. package/src/components/Typography/Footnote/Footnote.tsx +2 -0
  295. package/src/components/Typography/Headline/Headline.tsx +2 -0
  296. package/src/components/Typography/Paragraph/Paragraph.tsx +2 -0
  297. package/src/components/Typography/Subhead/Subhead.tsx +2 -0
  298. package/src/components/Typography/Text/Text.tsx +2 -0
  299. package/src/components/Typography/Title/Title.tsx +2 -0
  300. package/src/components/VisuallyHiddenInput/VisuallyHiddenInput.tsx +6 -2
  301. package/src/lib/floating/adapters.ts +1 -1
  302. package/src/lib/floating/index.ts +1 -1
  303. package/src/lib/floating/types.ts +2 -2
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.9.1",
2
+ "version": "5.9.3",
3
3
  "name": "@vkontakte/vkui",
4
4
  "description": "VKUI library",
5
5
  "main": "dist/cjs/index.js",
@@ -70,10 +70,10 @@
70
70
  "react-dom": "^17.0.0 || ^18.1.0"
71
71
  },
72
72
  "dependencies": {
73
- "@floating-ui/react-dom": "^2.0.2",
74
73
  "@swc/helpers": "^0.5.2",
75
74
  "@vkontakte/icons": "^2.62.0",
76
75
  "@vkontakte/vkjs": "^1.1.0",
76
+ "@vkontakte/vkui-floating-ui": "^0.1.0",
77
77
  "dayjs": "^1.11.10",
78
78
  "mitt": "^3.0.1"
79
79
  },
@@ -130,14 +130,14 @@ export const ActionSheet = ({
130
130
  >
131
131
  <div className={styles['ActionSheet__content-wrapper']}>
132
132
  {(header || text) && (
133
- <header className={styles['ActionSheet__header']}>
133
+ <div className={styles['ActionSheet__header']}>
134
134
  {header && (
135
135
  <Footnote weight="2" className={styles['ActionSheet__title']}>
136
136
  {header}
137
137
  </Footnote>
138
138
  )}
139
139
  {text && <Footnote className={styles['ActionSheet__text']}>{text}</Footnote>}
140
- </header>
140
+ </div>
141
141
  )}
142
142
  {children}
143
143
  </div>
@@ -61,6 +61,11 @@
61
61
  color: var(--vkui--color_text_secondary);
62
62
  }
63
63
 
64
+ .Alert__header,
65
+ .Alert__text {
66
+ word-break: break-word;
67
+ }
68
+
64
69
  .Alert__actions--direction-horizontal {
65
70
  justify-content: flex-end;
66
71
  }
@@ -7,7 +7,7 @@ import { usePlatform } from '../../hooks/usePlatform';
7
7
  import { useWaitTransitionFinish } from '../../hooks/useWaitTransitionFinish';
8
8
  import { Platform } from '../../lib/platform';
9
9
  import { stopPropagation } from '../../lib/utils';
10
- import { AlignType, AnchorHTMLAttributesOnly, HasDataAttribute } from '../../types';
10
+ import { AlignType, AnchorHTMLAttributesOnly, HasDataAttribute, HasRootRef } from '../../types';
11
11
  import { useScrollLock } from '../AppRoot/ScrollContext';
12
12
  import { ButtonProps } from '../Button/Button';
13
13
  import { FocusTrap } from '../FocusTrap/FocusTrap';
@@ -31,7 +31,7 @@ export interface AlertActionInterface
31
31
  mode: AlertActionMode;
32
32
  }
33
33
 
34
- export interface AlertProps extends React.HTMLAttributes<HTMLElement> {
34
+ export interface AlertProps extends React.HTMLAttributes<HTMLElement>, HasRootRef<HTMLDivElement> {
35
35
  actionsLayout?: 'vertical' | 'horizontal';
36
36
  actionsAlign?: AlignType;
37
37
  actions?: AlertActionInterface[];
@@ -67,6 +67,7 @@ export const Alert = ({
67
67
  renderAction,
68
68
  actionsAlign,
69
69
  dismissButtonMode = 'outside',
70
+ getRootRef,
70
71
  ...restProps
71
72
  }: AlertProps) => {
72
73
  const generatedId = useId();
@@ -124,7 +125,13 @@ export const Alert = ({
124
125
  useScrollLock();
125
126
 
126
127
  return (
127
- <PopoutWrapper className={className} closing={closing} style={style} onClick={close}>
128
+ <PopoutWrapper
129
+ className={className}
130
+ closing={closing}
131
+ style={style}
132
+ onClick={close}
133
+ getRootRef={getRootRef}
134
+ >
128
135
  <FocusTrap
129
136
  {...restProps}
130
137
  getRootRef={elementRef}
@@ -185,7 +185,9 @@
185
185
  .Button--mode-link .Button__after,
186
186
  .Button--mode-link .Button__before,
187
187
  .Button--mode-link .Button__content:first-child,
188
- .Button--mode-link .Button__content:last-child {
188
+ .Button--mode-link .Button__content:last-child,
189
+ .Button--stretched .Button__after:only-child,
190
+ .Button--stretched .Button__before:only-child {
189
191
  padding-left: 0;
190
192
  padding-right: 0;
191
193
  }
@@ -59,7 +59,6 @@ export const CalendarRange = ({
59
59
  shouldDisableDate,
60
60
  onClose,
61
61
  weekStartsOn = 1,
62
- getRootRef,
63
62
  disablePickers,
64
63
  prevMonthAriaLabel,
65
64
  nextMonthAriaLabel,
@@ -137,7 +137,7 @@ export const ChipsSelect = <Option extends ChipOption>(props: ChipsSelectProps<O
137
137
  const [popperPlacement, setPopperPlacement] = React.useState<Placement | undefined>(undefined);
138
138
 
139
139
  const scrollBoxRef = React.useRef<HTMLDivElement>(null);
140
- const rootRef = useExternRef(getRef);
140
+ const rootRef = useExternRef(getRootRef);
141
141
  const {
142
142
  fieldValue,
143
143
  selectedOptions = [],
@@ -5,10 +5,15 @@ import { useExternRef } from '../../hooks/useExternRef';
5
5
  import { DOMProps, useDOM } from '../../lib/dom';
6
6
  import { useIsomorphicLayoutEffect } from '../../lib/useIsomorphicLayoutEffect';
7
7
  import { stopPropagation } from '../../lib/utils';
8
+ import type { HasRootRef } from '../../types';
8
9
  import { TrackerOptionsProps, useTrackerVisibility } from './useTrackerVisibility';
9
10
  import styles from './CustomScrollView.module.css';
10
11
 
11
- export interface CustomScrollViewProps extends DOMProps, TrackerOptionsProps {
12
+ export interface CustomScrollViewProps
13
+ extends React.AllHTMLAttributes<HTMLDivElement>,
14
+ DOMProps, // TODO [>=6]: remove
15
+ HasRootRef<HTMLDivElement>,
16
+ TrackerOptionsProps {
12
17
  windowResize?: boolean;
13
18
  boxRef?: React.Ref<HTMLDivElement>;
14
19
  className?: HTMLDivElement['className'];
@@ -24,6 +29,8 @@ export const CustomScrollView = ({
24
29
  autoHideScrollbar = false,
25
30
  autoHideScrollbarDelay,
26
31
  onScroll,
32
+ getRootRef,
33
+ ...restProps
27
34
  }: CustomScrollViewProps) => {
28
35
  const { document, window } = useDOM();
29
36
 
@@ -174,7 +181,11 @@ export const CustomScrollView = ({
174
181
  };
175
182
 
176
183
  return (
177
- <div className={classNames(styles['CustomScrollView'], className)}>
184
+ <div
185
+ className={classNames(styles['CustomScrollView'], className)}
186
+ ref={getRootRef}
187
+ {...restProps}
188
+ >
178
189
  <div className={styles['CustomScrollView__box']} tabIndex={-1} ref={boxRef} onScroll={scroll}>
179
190
  {children}
180
191
  </div>
@@ -111,6 +111,10 @@ export interface CustomSelectOptionInterface {
111
111
  [index: string]: any;
112
112
  }
113
113
 
114
+ interface CustomSelectRenderOption extends CustomSelectOptionProps {
115
+ option: CustomSelectOptionInterface;
116
+ }
117
+
114
118
  export interface SelectProps extends NativeSelectProps, FormFieldProps, TrackerOptionsProps {
115
119
  /**
116
120
  * Если `true`, то при клике на селект в нём появится текстовое поле для поиска по `options`. По умолчанию поиск
@@ -149,7 +153,7 @@ export interface SelectProps extends NativeSelectProps, FormFieldProps, TrackerO
149
153
  * > Запрещается выставлять `disabled` проп опциям в обход `options`, иначе селект не будет знать об актуальном состоянии
150
154
  * опции.
151
155
  */
152
- renderOption?: (props: CustomSelectOptionProps) => React.ReactNode;
156
+ renderOption?: (props: CustomSelectRenderOption) => React.ReactNode;
153
157
  /**
154
158
  * Рендер-проп для кастомного рендера содержимого дропдауна.
155
159
  * В `defaultDropdownContent` содержится список опций в виде скроллящегося блока.
@@ -5,7 +5,6 @@
5
5
  position: relative;
6
6
  box-sizing: border-box;
7
7
  padding: 8px 12px;
8
- white-space: nowrap;
9
8
  user-select: none;
10
9
  cursor: pointer;
11
10
  color: var(--vkui--color_text_primary);
@@ -52,8 +51,6 @@
52
51
 
53
52
  .CustomSelectOption__children {
54
53
  min-width: 0;
55
- overflow: hidden;
56
- text-overflow: ellipsis;
57
54
  }
58
55
 
59
56
  .CustomSelectOption__after {
@@ -65,8 +62,6 @@
65
62
 
66
63
  .CustomSelectOption__description {
67
64
  color: var(--vkui--color_text_secondary);
68
- text-overflow: ellipsis;
69
- overflow: hidden;
70
65
  }
71
66
 
72
67
  .CustomSelectOption__selectedIcon {
@@ -1,12 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { classNames } from '@vkontakte/vkjs';
3
- import { HasComponent, HasRef } from '../../types';
3
+ import { useExternRef } from '../../hooks/useExternRef';
4
+ import { HasComponent, HasRef, HasRootRef } from '../../types';
4
5
  import styles from './FormLayout.module.css';
5
6
 
6
7
  const preventDefault = (e: React.FormEvent) => e.preventDefault();
7
8
 
8
9
  export type FormLayoutProps = React.AllHTMLAttributes<HTMLElement> &
9
10
  HasRef<HTMLElement> &
11
+ HasRootRef<HTMLElement> &
10
12
  HasComponent;
11
13
 
12
14
  /**
@@ -15,17 +17,20 @@ export type FormLayoutProps = React.AllHTMLAttributes<HTMLElement> &
15
17
  export const FormLayout = ({
16
18
  children,
17
19
  Component = 'form',
18
- getRef,
20
+ getRef, // TOOD [>=6]: remove
21
+ getRootRef,
19
22
  onSubmit = preventDefault,
20
23
  className,
21
24
  ...restProps
22
25
  }: FormLayoutProps) => {
26
+ const formLayoutRef = useExternRef(getRef, getRootRef);
27
+
23
28
  return (
24
29
  <Component
25
30
  {...restProps}
26
31
  className={classNames(styles['FormLayout'], className)}
27
32
  onSubmit={onSubmit}
28
- ref={getRef}
33
+ ref={formLayoutRef}
29
34
  >
30
35
  {children}
31
36
  {Component === 'form' && (
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { clamp } from '../../helpers/math';
3
3
  import { useIsClient } from '../../hooks/useIsClient';
4
- import { useTimeout } from '../../hooks/useTimeout';
5
4
  import { BaseGallery } from '../BaseGallery/BaseGallery';
6
5
  import { CarouselBase } from '../BaseGallery/CarouselBase/CarouselBase';
7
6
  import { BaseGalleryProps } from '../BaseGallery/types';
7
+ import { useAutoPlay } from './hooks';
8
8
 
9
9
  export interface GalleryProps extends BaseGalleryProps {
10
10
  initialSlideIndex?: number;
@@ -47,11 +47,7 @@ export const Gallery = ({
47
47
  [isControlled, onChange, slideIndex],
48
48
  );
49
49
 
50
- const autoplay = useTimeout(() => handleChange((slideIndex + 1) % childCount), timeout);
51
- React.useEffect(
52
- () => (timeout ? autoplay.set() : autoplay.clear()),
53
- [timeout, slideIndex, autoplay],
54
- );
50
+ useAutoPlay(timeout, slideIndex, () => handleChange((slideIndex + 1) % childCount));
55
51
 
56
52
  // prevent invalid slideIndex
57
53
  // any slide index is invalid with no slides, just keep it as is
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { useTimeout } from '../../hooks/useTimeout';
3
+ import { useDOM } from '../../lib/dom';
4
+
5
+ export function useAutoPlay(timeout: number, slideIndex: number, callbackFn: VoidFunction) {
6
+ const { clear: clearAutoPlay, set: setAutoPlay } = useTimeout(callbackFn, timeout);
7
+ const { document } = useDOM();
8
+
9
+ React.useEffect(
10
+ () => (timeout ? setAutoPlay() : clearAutoPlay()),
11
+ [timeout, slideIndex, clearAutoPlay, setAutoPlay],
12
+ );
13
+
14
+ // Отключаем прокрутку слайдов при неактивной вкладке
15
+ React.useEffect(
16
+ function preventSlideChange() {
17
+ if (!document || !timeout) {
18
+ return;
19
+ }
20
+
21
+ const changeAutoPlay = () => {
22
+ if (document.visibilityState === 'visible') {
23
+ clearAutoPlay();
24
+ setAutoPlay();
25
+ }
26
+ if (document.visibilityState === 'hidden') {
27
+ clearAutoPlay();
28
+ }
29
+ };
30
+
31
+ document.addEventListener('visibilitychange', changeAutoPlay);
32
+
33
+ return () => {
34
+ document.removeEventListener('visibilitychange', changeAutoPlay);
35
+ };
36
+ },
37
+ [document, timeout, clearAutoPlay, setAutoPlay],
38
+ );
39
+ }
@@ -11,7 +11,7 @@ import { Subhead } from '../Typography/Subhead/Subhead';
11
11
  import { Title } from '../Typography/Title/Title';
12
12
  import styles from './Header.module.css';
13
13
 
14
- export interface HeaderProps extends HTMLAttributesWithRootRef<HTMLElement> {
14
+ export interface HeaderProps extends HTMLAttributesWithRootRef<HTMLElement>, HasComponent {
15
15
  mode?: 'primary' | 'secondary' | 'tertiary';
16
16
  size?: 'regular' | 'large';
17
17
  subtitle?: React.ReactNode;
@@ -75,6 +75,7 @@ const stylesMode = {
75
75
  export const Header = ({
76
76
  mode = 'primary',
77
77
  size = 'regular',
78
+ Component = 'h2',
78
79
  children,
79
80
  subtitle,
80
81
  indicator,
@@ -84,7 +85,6 @@ export const Header = ({
84
85
  }: HeaderProps) => {
85
86
  return (
86
87
  <RootComponent
87
- Component="header"
88
88
  {...restProps}
89
89
  baseClassName={classNames(
90
90
  styles['Header'],
@@ -97,7 +97,7 @@ export const Header = ({
97
97
  <div className={styles['Header__main']}>
98
98
  <HeaderContent
99
99
  className={styles['Header__content']}
100
- Component="span"
100
+ Component={Component}
101
101
  mode={mode}
102
102
  size={size}
103
103
  >
@@ -288,9 +288,11 @@ export const HorizontalScroll = ({
288
288
  >
289
289
  {showArrows && (hasPointer || hasPointer === undefined) && canScrollLeft && (
290
290
  <ScrollArrow
291
+ data-testid={process.env.NODE_ENV === 'test' ? 'ScrollArrow' : undefined}
291
292
  size={arrowSize}
292
293
  offsetY={arrowOffsetY}
293
294
  direction="left"
295
+ aria-hidden
294
296
  className={classNames(
295
297
  styles['HorizontalScroll__arrow'],
296
298
  styles['HorizontalScroll__arrowLeft'],
@@ -300,9 +302,11 @@ export const HorizontalScroll = ({
300
302
  )}
301
303
  {showArrows && (hasPointer || hasPointer === undefined) && canScrollRight && (
302
304
  <ScrollArrow
305
+ data-testid={process.env.NODE_ENV === 'test' ? 'ScrollArrow' : undefined}
303
306
  size={arrowSize}
304
307
  offsetY={arrowOffsetY}
305
308
  direction="right"
309
+ aria-hidden
306
310
  className={classNames(
307
311
  styles['HorizontalScroll__arrow'],
308
312
  styles['HorizontalScroll__arrowRight'],
@@ -116,10 +116,7 @@
116
116
  }
117
117
 
118
118
  .ModalPage--desktop .ModalPage__content-in,
119
- :global(.vkuiInternalModalRoot__modal--expandable):not(
120
- :global(.vkuiInternalModalRoot__modal--collapsed)
121
- )
122
- .ModalPage__content-in {
119
+ :global(.vkuiInternalModalRoot__modal--expandable) .ModalPage__content-in {
123
120
  height: 100%;
124
121
  }
125
122
 
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { classNames } from '@vkontakte/vkjs';
3
3
  import { useAdaptivityWithJSMediaQueries } from '../../hooks/useAdaptivityWithJSMediaQueries';
4
+ import { useExternRef } from '../../hooks/useExternRef';
4
5
  import { usePlatform } from '../../hooks/usePlatform';
5
6
  import { Platform } from '../../lib/platform';
6
- import { HasRef } from '../../types';
7
+ import { HasRef, HasRootRef } from '../../types';
7
8
  import { ModalPageContext } from '../ModalPage/ModalPageContext';
8
9
  import { PanelHeader, PanelHeaderProps } from '../PanelHeader/PanelHeader';
9
10
  import { Separator } from '../Separator/Separator';
@@ -12,7 +13,8 @@ import styles from './ModalPageHeader.module.css';
12
13
  export interface ModalPageHeaderProps
13
14
  extends React.HTMLAttributes<HTMLDivElement>,
14
15
  Omit<PanelHeaderProps, 'fixed' | 'shadow'>,
15
- HasRef<HTMLDivElement> {}
16
+ HasRef<HTMLDivElement>,
17
+ HasRootRef<HTMLDivElement> {}
16
18
 
17
19
  /**
18
20
  * @see https://vkcom.github.io/VKUI/#/ModalPageHeader
@@ -20,7 +22,8 @@ export interface ModalPageHeaderProps
20
22
  export const ModalPageHeader = ({
21
23
  children,
22
24
  separator = true,
23
- getRef,
25
+ getRef, // TODO [>=6]: remove
26
+ getRootRef,
24
27
  className,
25
28
  typographyProps,
26
29
  ...restProps
@@ -29,6 +32,7 @@ export const ModalPageHeader = ({
29
32
  const hasSeparator = separator && platform === Platform.VKCOM;
30
33
  const { isDesktop } = useAdaptivityWithJSMediaQueries();
31
34
  const { labelId } = React.useContext(ModalPageContext);
35
+ const modalPageHeaderRef = useExternRef(getRef, getRootRef);
32
36
 
33
37
  return (
34
38
  <div
@@ -37,7 +41,7 @@ export const ModalPageHeader = ({
37
41
  platform !== Platform.VKCOM && styles['ModalPageHeader--withGaps'],
38
42
  isDesktop && styles['ModalPageHeader--desktop'],
39
43
  )}
40
- ref={getRef}
44
+ ref={modalPageHeaderRef}
41
45
  >
42
46
  <PanelHeader
43
47
  className={classNames('vkuiInternalModalPageHeader__in', className)}
@@ -402,7 +402,7 @@ class ModalRootTouchComponent extends React.Component<
402
402
 
403
403
  modalState.translateY = translateY;
404
404
  modalState.translateYCurrent = translateY;
405
- modalState.collapsed = translateY > 0 && translateY < shiftYEndPercent;
405
+ modalState.collapsed = numberInRange(translateY, modalState.collapsedRange);
406
406
  modalState.expanded = translateY === 0;
407
407
  modalState.hidden = translateY === 100;
408
408
 
@@ -661,9 +661,10 @@ function initPageModal(modalState: ModalsStateEntry) {
661
661
  let translateYFrom;
662
662
  let translateY;
663
663
  let expandedRange: TranslateRange;
664
- let collapsedRange: TranslateRange;
664
+ let collapsedRange: TranslateRange | undefined;
665
665
  let hiddenRange: TranslateRange;
666
666
 
667
+ const hasCollapsedState = Boolean(modalState.expandable && modalState.settlingHeight !== 100);
667
668
  if (modalState.expandable) {
668
669
  translateYFrom = 100 - (modalState.settlingHeight ?? 0);
669
670
 
@@ -671,10 +672,10 @@ function initPageModal(modalState: ModalsStateEntry) {
671
672
  const visiblePart = 100 - translateYFrom;
672
673
 
673
674
  expandedRange = [0, shiftHalf];
674
- collapsedRange = [shiftHalf, translateYFrom + visiblePart / 4];
675
+ collapsedRange = hasCollapsedState ? [shiftHalf, translateYFrom + visiblePart / 4] : undefined;
675
676
  hiddenRange = [translateYFrom + visiblePart / 4, 100];
676
677
 
677
- collapsed = translateYFrom > 0;
678
+ collapsed = hasCollapsedState && translateYFrom > 0;
678
679
  expanded = translateYFrom <= 0;
679
680
  translateY = translateYFrom;
680
681
  } else {
@@ -686,7 +687,7 @@ function initPageModal(modalState: ModalsStateEntry) {
686
687
  translateY = translateYFrom;
687
688
 
688
689
  expandedRange = [translateY, translateY + 25];
689
- collapsedRange = [translateY + 25, translateY + 25];
690
+ collapsedRange = undefined;
690
691
  hiddenRange = [translateY + 25, translateY + 100];
691
692
  }
692
693
 
@@ -17,7 +17,7 @@
17
17
  .PanelHeaderButton--primitive {
18
18
  height: 48px;
19
19
  line-height: 48px;
20
- padding: 0 12px;
20
+ padding: 0 10px;
21
21
  }
22
22
 
23
23
  /*
@@ -44,6 +44,11 @@
44
44
  padding: 8px;
45
45
  }
46
46
 
47
+ /* stylelint-disable-next-line @project-tools/stylelint-atomic -- фикс для иконки назад */
48
+ .PanelHeaderBack--ios :global(.vkuiIcon--w-20) {
49
+ padding-left: 4px;
50
+ }
51
+
47
52
  /*
48
53
  * Android
49
54
  */
@@ -8,6 +8,7 @@ import { useTimeout } from '../../hooks/useTimeout';
8
8
  import { DOMProps, useDOM } from '../../lib/dom';
9
9
  import { Platform } from '../../lib/platform';
10
10
  import { runTapticImpactOccurred } from '../../lib/taptic';
11
+ import { coordY, VKUITouchEvent } from '../../lib/touch';
11
12
  import { useIsomorphicLayoutEffect } from '../../lib/useIsomorphicLayoutEffect';
12
13
  import { AnyFunction, HasChildren } from '../../types';
13
14
  import { ScrollContextInterface, useScroll } from '../AppRoot/ScrollContext';
@@ -113,15 +114,6 @@ export const PullToRefresh = ({
113
114
  const [contentShift, setContentShift] = React.useState(0);
114
115
  const [spinnerProgress, setSpinnerProgress] = React.useState(0);
115
116
 
116
- const onWindowTouchMove = (event: Event) => {
117
- if (refreshing) {
118
- event.preventDefault();
119
- event.stopPropagation();
120
- }
121
- };
122
-
123
- useGlobalEventListener(document, 'touchmove', onWindowTouchMove, TOUCH_MOVE_EVENT_PARAMS);
124
-
125
117
  const resetRefreshingState = React.useCallback(() => {
126
118
  setWatching(false);
127
119
  setCanRefresh(false);
@@ -199,13 +191,40 @@ export const PullToRefresh = ({
199
191
  runRefreshing,
200
192
  ]);
201
193
 
194
+ const startYRef = React.useRef(0);
195
+
202
196
  const onTouchStart = (e: TouchEvent) => {
203
197
  if (refreshing) {
204
198
  cancelEvent(e);
205
199
  }
206
200
  setTouchDown(true);
201
+ startYRef.current = e.startY;
207
202
  };
208
203
 
204
+ const shouldPreventTouchMove = (event: VKUITouchEvent) => {
205
+ if (watching || refreshing) {
206
+ return true;
207
+ }
208
+
209
+ /* Нам нужно запретить touchmove у документа как только стало понятно, что
210
+ * начинается pull.
211
+ * состояния watching и refreshing устанавливаются слишком поздно и браузер
212
+ * может успеть начать нативный pull to refresh. */
213
+ const shiftY = coordY(event) - startYRef.current;
214
+ const pageYOffset = scroll?.getScroll().y;
215
+ const isRefreshGestureStarted = pageYOffset === 0 && shiftY > 0 && touchDown;
216
+ return isRefreshGestureStarted;
217
+ };
218
+
219
+ const onWindowTouchMove = (event: VKUITouchEvent) => {
220
+ if (shouldPreventTouchMove(event)) {
221
+ event.preventDefault();
222
+ event.stopPropagation();
223
+ }
224
+ };
225
+
226
+ useGlobalEventListener(document, 'touchmove', onWindowTouchMove, TOUCH_MOVE_EVENT_PARAMS);
227
+
209
228
  const onTouchMove = (e: TouchEvent) => {
210
229
  const { isY, shiftY } = e;
211
230
  const { start, max } = initParams;
@@ -42,7 +42,7 @@
42
42
  align-items: center;
43
43
  background: var(--vkui--color_background_modal);
44
44
  box-shadow: var(--vkui--elevation4);
45
- border-radius: var(--vkui--size_border_radius--regular);
45
+ border-radius: var(--vkui--size_card_border_radius--regular);
46
46
  }
47
47
 
48
48
  .Snackbar--mode-dark .Snackbar__body {
@@ -14,6 +14,8 @@ export interface CaptionProps extends TypographyProps, HasCaps {
14
14
  }
15
15
 
16
16
  /**
17
+ * Используется для мелких подписей.
18
+ *
17
19
  * @see https://vkcom.github.io/VKUI/#/Caption
18
20
  */
19
21
  export const Caption = ({
@@ -6,6 +6,8 @@ import styles from './Footnote.module.css';
6
6
  export interface FootnoteProps extends TypographyProps, HasCaps {}
7
7
 
8
8
  /**
9
+ * Используется для основных подписей.
10
+ *
9
11
  * @see https://vkcom.github.io/VKUI/#/Footnote
10
12
  */
11
13
  export const Footnote = ({
@@ -20,6 +20,8 @@ export interface HeadlineProps extends TypographyProps {
20
20
  }
21
21
 
22
22
  /**
23
+ * Используется для подзаголовков.
24
+ *
23
25
  * @see https://vkcom.github.io/VKUI/#/Headline
24
26
  */
25
27
  export const Headline = ({
@@ -6,6 +6,8 @@ import styles from './Paragraph.module.css';
6
6
  export type ParagraphProps = TypographyProps;
7
7
 
8
8
  /**
9
+ * Используется для основного текста.
10
+ *
9
11
  * @see https://vkcom.github.io/VKUI/#/Paragraph
10
12
  */
11
13
  export const Paragraph = ({
@@ -13,6 +13,8 @@ const sizeYClassNames = {
13
13
  export type SubheadProps = TypographyProps;
14
14
 
15
15
  /**
16
+ * Используется для подзаголовков 2 уровня.
17
+ *
16
18
  * @see https://vkcom.github.io/VKUI/#/Subhead
17
19
  */
18
20
  export const Subhead = ({
@@ -13,6 +13,8 @@ const sizeYClassNames = {
13
13
  export type TextProps = TypographyProps;
14
14
 
15
15
  /**
16
+ * Основной наборный текст.
17
+ *
16
18
  * @see https://vkcom.github.io/VKUI/#/Text
17
19
  */
18
20
  export const Text = ({
@@ -14,6 +14,8 @@ export interface TitleProps extends TypographyProps {
14
14
  }
15
15
 
16
16
  /**
17
+ * Используется для заголовков.
18
+ *
17
19
  * @see https://vkcom.github.io/VKUI/#/Title
18
20
  */
19
21
  export const Title = ({