@bifrostui/react 2.0.0-alpha.2 → 2.0.0-alpha.20

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 (484) hide show
  1. package/dist/ActionSheet/ActionSheet.d.ts +1 -1
  2. package/dist/ActionSheet/ActionSheet.js +8 -8
  3. package/dist/ActionSheet/ActionSheet.types.d.ts +1 -1
  4. package/dist/ActionSheet/ActionSheetContext.d.ts +1 -1
  5. package/dist/ActionSheet/ActionSheetContext.js +2 -2
  6. package/dist/ActionSheet/ActionSheetItem.types.d.ts +1 -1
  7. package/dist/Alert/Alert.d.ts +1 -1
  8. package/dist/Alert/Alert.js +16 -16
  9. package/dist/Alert/__tests__/fixtures/A11yDemos.d.ts +1 -1
  10. package/dist/Alert/__tests__/fixtures/A11yDemos.js +12 -12
  11. package/dist/Avatar/Avatar.d.ts +1 -1
  12. package/dist/Avatar/Avatar.js +5 -5
  13. package/dist/Avatar/Avatar.types.d.ts +1 -1
  14. package/dist/Avatar/AvatarGroup.types.d.ts +1 -1
  15. package/dist/Backdrop/Backdrop.d.ts +1 -1
  16. package/dist/Backdrop/Backdrop.js +3 -3
  17. package/dist/Backdrop/Backdrop.types.d.ts +1 -1
  18. package/dist/Backdrop/__tests__/fixtures/A11yDemos.d.ts +1 -1
  19. package/dist/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
  20. package/dist/Badge/Badge.d.ts +1 -1
  21. package/dist/Badge/Badge.js +4 -4
  22. package/dist/Badge/__tests__/fixtures/A11yDemos.d.ts +1 -1
  23. package/dist/Badge/__tests__/fixtures/A11yDemos.js +13 -13
  24. package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
  25. package/dist/Breadcrumb/Breadcrumb.js +9 -9
  26. package/dist/Breadcrumb/Breadcrumb.types.d.ts +1 -1
  27. package/dist/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  28. package/dist/Breadcrumb/BreadcrumbItem.js +4 -4
  29. package/dist/Button/Button.d.ts +1 -1
  30. package/dist/Button/Button.js +6 -6
  31. package/dist/Button/Button.types.d.ts +1 -1
  32. package/dist/Button/__tests__/fixtures/A11yDemos.d.ts +1 -1
  33. package/dist/Button/__tests__/fixtures/A11yDemos.js +8 -8
  34. package/dist/Button/index.css +2 -3
  35. package/dist/Calendar/Calendar.types.d.ts +1 -1
  36. package/dist/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -1
  37. package/dist/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
  38. package/dist/Card/Card.d.ts +1 -1
  39. package/dist/Card/Card.js +3 -3
  40. package/dist/Card/Card.types.d.ts +1 -1
  41. package/dist/Card/CardContent.d.ts +1 -1
  42. package/dist/Card/CardContent.js +3 -3
  43. package/dist/Card/CardContent.types.d.ts +1 -1
  44. package/dist/Card/CardFooter.d.ts +1 -1
  45. package/dist/Card/CardFooter.js +3 -3
  46. package/dist/Card/CardFooter.types.d.ts +1 -1
  47. package/dist/Card/CardHeader.d.ts +1 -1
  48. package/dist/Card/CardHeader.js +10 -10
  49. package/dist/Checkbox/CheckboxContext.d.ts +1 -1
  50. package/dist/Checkbox/CheckboxContext.js +2 -2
  51. package/dist/Checkbox/__tests__/fixtures/A11yDemos.d.ts +1 -1
  52. package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +4 -4
  53. package/dist/CitySelector/CitySelector.types.d.ts +1 -0
  54. package/dist/CitySelector/Selector/index.d.ts +1 -1
  55. package/dist/CitySelector/Selector/index.js +2 -2
  56. package/dist/Collapse/Collapse.types.d.ts +1 -1
  57. package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
  58. package/dist/CollapsePanel/CollapsePanel.js +9 -9
  59. package/dist/CollapsePanel/CollapsePanel.types.d.ts +1 -1
  60. package/dist/CollapsePanel/CollapsePanelItem.d.ts +1 -1
  61. package/dist/CollapsePanel/CollapsePanelItem.js +5 -5
  62. package/dist/Countdown/Countdown.types.d.ts +2 -2
  63. package/dist/Countdown/__tests__/fixtures/A11yDemos.d.ts +1 -1
  64. package/dist/Countdown/__tests__/fixtures/A11yDemos.js +10 -10
  65. package/dist/Countdown/utils.d.ts +2 -2
  66. package/dist/Countdown/utils.js +4 -4
  67. package/dist/DatePicker/DatePicker.types.d.ts +1 -1
  68. package/dist/DesktopPicker/DesktopPicker.types.d.ts +1 -1
  69. package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +11 -11
  70. package/dist/DesktopTimePicker/useGetTimePickerContent.js +2 -2
  71. package/dist/DesktopTimePicker/utils/utils.d.ts +1 -1
  72. package/dist/DesktopTimePicker/utils/utils.js +3 -3
  73. package/dist/Dialog/__tests__/fixtures/A11yDemos.d.ts +1 -1
  74. package/dist/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
  75. package/dist/Divider/Divider.types.d.ts +1 -1
  76. package/dist/Drawer/Drawer.d.ts +1 -1
  77. package/dist/Drawer/Drawer.js +5 -5
  78. package/dist/Drawer/Drawer.types.d.ts +1 -1
  79. package/dist/Fade/Fade.d.ts +1 -1
  80. package/dist/Fade/Fade.js +4 -4
  81. package/dist/Fade/Fade.miniapp.js +13 -10
  82. package/dist/Fade/Fade.types.d.ts +1 -1
  83. package/dist/IconButton/IconButton.d.ts +1 -1
  84. package/dist/IconButton/IconButton.js +6 -6
  85. package/dist/IconButton/IconButton.types.d.ts +1 -1
  86. package/dist/Input/Input.types.d.ts +1 -1
  87. package/dist/Input/__tests__/fixtures/A11yDemos.d.ts +1 -1
  88. package/dist/Input/__tests__/fixtures/A11yDemos.js +7 -7
  89. package/dist/ItemSelector/ItemSelector.miniapp.js +7 -5
  90. package/dist/ItemSelector/ItemSelector.types.d.ts +1 -0
  91. package/dist/ItemSelector/Selector/index.d.ts +1 -1
  92. package/dist/ItemSelector/Selector/index.js +2 -2
  93. package/dist/List/List.d.ts +1 -1
  94. package/dist/List/List.js +4 -4
  95. package/dist/List/ListContext.d.ts +1 -1
  96. package/dist/List/ListContext.js +2 -2
  97. package/dist/List/ListItem.d.ts +1 -1
  98. package/dist/List/ListItem.js +8 -8
  99. package/dist/List/ListItem.types.d.ts +1 -1
  100. package/dist/List/ListItemContent.d.ts +1 -1
  101. package/dist/List/ListItemContent.js +3 -3
  102. package/dist/List/ListItemContent.types.d.ts +1 -1
  103. package/dist/List/ListItemExtra.d.ts +1 -1
  104. package/dist/List/ListItemExtra.js +3 -3
  105. package/dist/List/ListItemExtra.types.d.ts +1 -1
  106. package/dist/List/ListItemFooter.d.ts +1 -1
  107. package/dist/List/ListItemFooter.js +3 -3
  108. package/dist/List/ListItemFooter.types.d.ts +1 -1
  109. package/dist/List/ListItemHeader.d.ts +1 -1
  110. package/dist/List/ListItemHeader.js +3 -3
  111. package/dist/List/ListItemHeader.types.d.ts +1 -1
  112. package/dist/Loading/Loading.d.ts +1 -1
  113. package/dist/Loading/Loading.js +5 -5
  114. package/dist/Loading/Loading.types.d.ts +1 -1
  115. package/dist/Modal/Modal.d.ts +1 -1
  116. package/dist/Modal/Modal.js +6 -6
  117. package/dist/Modal/Modal.miniapp.d.ts +1 -1
  118. package/dist/Modal/Modal.miniapp.js +7 -7
  119. package/dist/Modal/__tests__/fixtures/A11yDemos.d.ts +1 -1
  120. package/dist/Modal/__tests__/fixtures/A11yDemos.js +3 -3
  121. package/dist/Modal/useModal.js +26 -29
  122. package/dist/NavBar/NavBar.d.ts +1 -1
  123. package/dist/NavBar/NavBar.js +10 -10
  124. package/dist/Picker/Picker.js +0 -1
  125. package/dist/Picker/Picker.types.d.ts +1 -1
  126. package/dist/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -1
  127. package/dist/Picker/__tests__/fixtures/A11yDemos.js +2 -2
  128. package/dist/Popover/Popover.d.ts +1 -1
  129. package/dist/Popover/Popover.js +8 -8
  130. package/dist/Popover/Popover.types.d.ts +1 -1
  131. package/dist/Popover/__tests__/fixtures/A11yDemos.d.ts +1 -1
  132. package/dist/Popover/__tests__/fixtures/A11yDemos.js +21 -21
  133. package/dist/Portal/Portal.d.ts +1 -1
  134. package/dist/Portal/Portal.js +3 -3
  135. package/dist/Portal/Portal.miniapp.js +14 -8
  136. package/dist/Portal/Portal.types.d.ts +1 -1
  137. package/dist/Progress/Progress.d.ts +1 -1
  138. package/dist/Progress/Progress.js +4 -4
  139. package/dist/Progress/Progress.types.d.ts +1 -1
  140. package/dist/Progress/__tests__/fixtures/A11yDemos.d.ts +1 -1
  141. package/dist/Progress/__tests__/fixtures/A11yDemos.js +9 -9
  142. package/dist/Radio/RadioButtonIcon.d.ts +1 -1
  143. package/dist/Radio/RadioButtonIcon.js +4 -4
  144. package/dist/Radio/RadioContext.d.ts +1 -1
  145. package/dist/Radio/RadioContext.js +2 -2
  146. package/dist/Radio/__tests__/fixtures/A11yDemos.d.ts +1 -1
  147. package/dist/Radio/__tests__/fixtures/A11yDemos.js +4 -4
  148. package/dist/Rating/Rating.types.d.ts +1 -1
  149. package/dist/ScrollView/ScrollView.types.d.ts +210 -1
  150. package/dist/ScrollView/__tests__/fixtures/A11yDemos.d.ts +1 -1
  151. package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +30 -30
  152. package/dist/ScrollView/useScrollView.js +16 -4
  153. package/dist/Skeleton/Skeleton.d.ts +1 -1
  154. package/dist/Skeleton/Skeleton.js +3 -3
  155. package/dist/Skeleton/Skeleton.types.d.ts +1 -1
  156. package/dist/Slide/Slide.d.ts +1 -1
  157. package/dist/Slide/Slide.js +4 -4
  158. package/dist/Slide/Slide.miniapp.js +13 -10
  159. package/dist/Slider/Slider.types.d.ts +1 -1
  160. package/dist/Steps/Step.types.d.ts +1 -1
  161. package/dist/Steps/StepsContext.d.ts +1 -1
  162. package/dist/Steps/StepsContext.js +2 -2
  163. package/dist/SwipeAction/SwipeAction.js +7 -8
  164. package/dist/SwipeAction/SwipeAction.types.d.ts +1 -1
  165. package/dist/Swiper/Swiper.types.d.ts +1 -1
  166. package/dist/Swiper/SwiperItem.d.ts +1 -1
  167. package/dist/Swiper/SwiperItem.js +2 -2
  168. package/dist/Switch/__tests__/fixtures/A11yDemos.d.ts +1 -1
  169. package/dist/Switch/__tests__/fixtures/A11yDemos.js +4 -4
  170. package/dist/TabBar/TabBar.d.ts +1 -1
  171. package/dist/TabBar/TabBar.js +5 -5
  172. package/dist/Tabs/Tab.css +1 -23
  173. package/dist/Tabs/Tab.d.ts +2 -2
  174. package/dist/Tabs/Tab.js +42 -34
  175. package/dist/Tabs/Tab.types.d.ts +1 -1
  176. package/dist/Tabs/TabIndicator.d.ts +11 -0
  177. package/dist/Tabs/TabIndicator.js +185 -0
  178. package/dist/Tabs/TabMask.d.ts +7 -0
  179. package/dist/Tabs/TabMask.js +47 -0
  180. package/dist/Tabs/TabPanel.js +4 -4
  181. package/dist/Tabs/TabPanel.types.d.ts +1 -1
  182. package/dist/Tabs/Tabs.css +15 -6
  183. package/dist/Tabs/Tabs.js +99 -157
  184. package/dist/Tabs/Tabs.types.d.ts +5 -6
  185. package/dist/Tabs/TabsContext.d.ts +15 -6
  186. package/dist/Tabs/TabsContext.js +6 -14
  187. package/dist/Tabs/classes.d.ts +13 -0
  188. package/dist/Tabs/classes.js +63 -0
  189. package/dist/Tabs/index.css +16 -29
  190. package/dist/Tabs/index.d.ts +2 -2
  191. package/dist/Tabs/index.js +4 -4
  192. package/dist/Tabs/index.miniapp.d.ts +5 -0
  193. package/dist/Tabs/index.miniapp.js +50 -0
  194. package/dist/Tabs/miniapp/Tab.d.ts +5 -0
  195. package/dist/Tabs/miniapp/Tab.js +106 -0
  196. package/dist/Tabs/miniapp/TabIndicator.d.ts +15 -0
  197. package/dist/Tabs/miniapp/TabIndicator.js +301 -0
  198. package/dist/Tabs/miniapp/Tabs.d.ts +5 -0
  199. package/dist/Tabs/miniapp/Tabs.js +251 -0
  200. package/dist/Tabs/miniapp/TabsContext.d.ts +17 -0
  201. package/dist/Tabs/miniapp/TabsContext.js +39 -0
  202. package/dist/Tabs/miniapp/index.d.ts +2 -0
  203. package/dist/Tabs/miniapp/index.js +41 -0
  204. package/dist/Tabs/miniapp/scroll.d.ts +21 -0
  205. package/dist/Tabs/miniapp/scroll.js +52 -0
  206. package/dist/Tabs/miniapp/utils/queryBatch.d.ts +68 -0
  207. package/dist/Tabs/miniapp/utils/queryBatch.js +100 -0
  208. package/dist/Tabs/utils/scroll.js +10 -4
  209. package/dist/Tag/Tag.css +0 -1
  210. package/dist/Tag/Tag.d.ts +1 -1
  211. package/dist/Tag/Tag.js +6 -6
  212. package/dist/Tag/Tag.types.d.ts +1 -1
  213. package/dist/Tag/TagGroup.d.ts +1 -1
  214. package/dist/Tag/TagGroup.js +3 -3
  215. package/dist/Tag/TagGroup.types.d.ts +1 -1
  216. package/dist/Tag/__tests__/fixtures/A11yDemos.js +3 -3
  217. package/dist/Tag/index.css +0 -1
  218. package/dist/TextArea/__tests__/fixtures/A11yDemos.d.ts +1 -1
  219. package/dist/TextArea/__tests__/fixtures/A11yDemos.js +6 -6
  220. package/dist/ThemeProvider/hooks/ThemeContext.d.ts +1 -1
  221. package/dist/ThemeProvider/hooks/ThemeContext.js +2 -2
  222. package/dist/ThemeProvider/hooks/useTheme.js +2 -2
  223. package/dist/ThemeProvider/utils/mountTokens.js +2 -2
  224. package/dist/Toast/Toast.d.ts +1 -1
  225. package/dist/Toast/Toast.js +8 -8
  226. package/dist/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -1
  227. package/dist/Toast/__tests__/fixtures/A11yDemos.js +2 -2
  228. package/dist/Tooltip/Tooltip.d.ts +1 -1
  229. package/dist/Tooltip/Tooltip.js +5 -5
  230. package/dist/Tooltip/Tooltip.types.d.ts +1 -1
  231. package/dist/Tooltip/__tests__/fixtures/A11yDemos.d.ts +1 -1
  232. package/dist/Tooltip/__tests__/fixtures/A11yDemos.js +14 -14
  233. package/dist/Transition/Transition.d.ts +1 -1
  234. package/dist/Transition/Transition.js +3 -3
  235. package/dist/Transition/Transition.miniapp.d.ts +1 -1
  236. package/dist/Transition/Transition.miniapp.js +3 -3
  237. package/dist/Transition/TransitionCore.js +8 -2
  238. package/dist/_.._/benchmarks/components/Button.d.js +15 -0
  239. package/dist/_.._/benchmarks/components/Button.js +2 -2
  240. package/dist/_.._/benchmarks/components/Input.d.js +15 -0
  241. package/dist/_.._/benchmarks/components/Tabs.d.js +15 -0
  242. package/es/ActionSheet/ActionSheet.d.ts +1 -1
  243. package/es/ActionSheet/ActionSheet.js +1 -1
  244. package/es/ActionSheet/ActionSheet.types.d.ts +1 -1
  245. package/es/ActionSheet/ActionSheetContext.d.ts +1 -1
  246. package/es/ActionSheet/ActionSheetContext.js +1 -1
  247. package/es/ActionSheet/ActionSheetItem.types.d.ts +1 -1
  248. package/es/Alert/Alert.d.ts +1 -1
  249. package/es/Alert/Alert.js +1 -1
  250. package/es/Alert/__tests__/fixtures/A11yDemos.d.ts +1 -1
  251. package/es/Alert/__tests__/fixtures/A11yDemos.js +1 -1
  252. package/es/Avatar/Avatar.d.ts +1 -1
  253. package/es/Avatar/Avatar.js +1 -1
  254. package/es/Avatar/Avatar.types.d.ts +1 -1
  255. package/es/Avatar/AvatarGroup.types.d.ts +1 -1
  256. package/es/Backdrop/Backdrop.d.ts +1 -1
  257. package/es/Backdrop/Backdrop.js +1 -1
  258. package/es/Backdrop/Backdrop.types.d.ts +1 -1
  259. package/es/Backdrop/__tests__/fixtures/A11yDemos.d.ts +1 -1
  260. package/es/Backdrop/__tests__/fixtures/A11yDemos.js +1 -1
  261. package/es/Badge/Badge.d.ts +1 -1
  262. package/es/Badge/Badge.js +1 -1
  263. package/es/Badge/__tests__/fixtures/A11yDemos.d.ts +1 -1
  264. package/es/Badge/__tests__/fixtures/A11yDemos.js +1 -1
  265. package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
  266. package/es/Breadcrumb/Breadcrumb.js +1 -1
  267. package/es/Breadcrumb/Breadcrumb.types.d.ts +1 -1
  268. package/es/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  269. package/es/Breadcrumb/BreadcrumbItem.js +1 -1
  270. package/es/Button/Button.d.ts +1 -1
  271. package/es/Button/Button.js +1 -1
  272. package/es/Button/Button.types.d.ts +1 -1
  273. package/es/Button/__tests__/fixtures/A11yDemos.d.ts +1 -1
  274. package/es/Button/__tests__/fixtures/A11yDemos.js +1 -1
  275. package/es/Button/index.css +2 -3
  276. package/es/Calendar/Calendar.types.d.ts +1 -1
  277. package/es/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -1
  278. package/es/Calendar/__tests__/fixtures/A11yDemos.js +1 -1
  279. package/es/Card/Card.d.ts +1 -1
  280. package/es/Card/Card.js +1 -1
  281. package/es/Card/Card.types.d.ts +1 -1
  282. package/es/Card/CardContent.d.ts +1 -1
  283. package/es/Card/CardContent.js +1 -1
  284. package/es/Card/CardContent.types.d.ts +1 -1
  285. package/es/Card/CardFooter.d.ts +1 -1
  286. package/es/Card/CardFooter.js +1 -1
  287. package/es/Card/CardFooter.types.d.ts +1 -1
  288. package/es/Card/CardHeader.d.ts +1 -1
  289. package/es/Card/CardHeader.js +1 -1
  290. package/es/Checkbox/CheckboxContext.d.ts +1 -1
  291. package/es/Checkbox/CheckboxContext.js +1 -1
  292. package/es/Checkbox/__tests__/fixtures/A11yDemos.d.ts +1 -1
  293. package/es/Checkbox/__tests__/fixtures/A11yDemos.js +1 -1
  294. package/es/CitySelector/CitySelector.types.d.ts +1 -0
  295. package/es/CitySelector/Selector/index.d.ts +1 -1
  296. package/es/CitySelector/Selector/index.js +1 -1
  297. package/es/Collapse/Collapse.types.d.ts +1 -1
  298. package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
  299. package/es/CollapsePanel/CollapsePanel.js +1 -1
  300. package/es/CollapsePanel/CollapsePanel.types.d.ts +1 -1
  301. package/es/CollapsePanel/CollapsePanelItem.d.ts +1 -1
  302. package/es/CollapsePanel/CollapsePanelItem.js +1 -1
  303. package/es/Countdown/Countdown.types.d.ts +2 -2
  304. package/es/Countdown/__tests__/fixtures/A11yDemos.d.ts +1 -1
  305. package/es/Countdown/__tests__/fixtures/A11yDemos.js +1 -1
  306. package/es/Countdown/utils.d.ts +2 -2
  307. package/es/Countdown/utils.js +4 -4
  308. package/es/DatePicker/DatePicker.types.d.ts +1 -1
  309. package/es/DesktopPicker/DesktopPicker.types.d.ts +1 -1
  310. package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +11 -11
  311. package/es/DesktopTimePicker/useGetTimePickerContent.js +3 -3
  312. package/es/DesktopTimePicker/utils/utils.d.ts +1 -1
  313. package/es/DesktopTimePicker/utils/utils.js +2 -2
  314. package/es/Dialog/__tests__/fixtures/A11yDemos.d.ts +1 -1
  315. package/es/Dialog/__tests__/fixtures/A11yDemos.js +1 -1
  316. package/es/Divider/Divider.types.d.ts +1 -1
  317. package/es/Drawer/Drawer.d.ts +1 -1
  318. package/es/Drawer/Drawer.js +1 -1
  319. package/es/Drawer/Drawer.types.d.ts +1 -1
  320. package/es/Fade/Fade.d.ts +1 -1
  321. package/es/Fade/Fade.js +1 -1
  322. package/es/Fade/Fade.miniapp.js +14 -11
  323. package/es/Fade/Fade.types.d.ts +1 -1
  324. package/es/IconButton/IconButton.d.ts +1 -1
  325. package/es/IconButton/IconButton.js +1 -1
  326. package/es/IconButton/IconButton.types.d.ts +1 -1
  327. package/es/Input/Input.types.d.ts +1 -1
  328. package/es/Input/__tests__/fixtures/A11yDemos.d.ts +1 -1
  329. package/es/Input/__tests__/fixtures/A11yDemos.js +1 -1
  330. package/es/ItemSelector/ItemSelector.miniapp.js +7 -5
  331. package/es/ItemSelector/ItemSelector.types.d.ts +1 -0
  332. package/es/ItemSelector/Selector/index.d.ts +1 -1
  333. package/es/ItemSelector/Selector/index.js +1 -1
  334. package/es/List/List.d.ts +1 -1
  335. package/es/List/List.js +1 -1
  336. package/es/List/ListContext.d.ts +1 -1
  337. package/es/List/ListContext.js +1 -1
  338. package/es/List/ListItem.d.ts +1 -1
  339. package/es/List/ListItem.js +1 -1
  340. package/es/List/ListItem.types.d.ts +1 -1
  341. package/es/List/ListItemContent.d.ts +1 -1
  342. package/es/List/ListItemContent.js +1 -1
  343. package/es/List/ListItemContent.types.d.ts +1 -1
  344. package/es/List/ListItemExtra.d.ts +1 -1
  345. package/es/List/ListItemExtra.js +1 -1
  346. package/es/List/ListItemExtra.types.d.ts +1 -1
  347. package/es/List/ListItemFooter.d.ts +1 -1
  348. package/es/List/ListItemFooter.js +1 -1
  349. package/es/List/ListItemFooter.types.d.ts +1 -1
  350. package/es/List/ListItemHeader.d.ts +1 -1
  351. package/es/List/ListItemHeader.js +1 -1
  352. package/es/List/ListItemHeader.types.d.ts +1 -1
  353. package/es/Loading/Loading.d.ts +1 -1
  354. package/es/Loading/Loading.js +1 -1
  355. package/es/Loading/Loading.types.d.ts +1 -1
  356. package/es/Modal/Modal.d.ts +1 -1
  357. package/es/Modal/Modal.js +1 -1
  358. package/es/Modal/Modal.miniapp.d.ts +2 -2
  359. package/es/Modal/Modal.miniapp.js +1 -1
  360. package/es/Modal/__tests__/fixtures/A11yDemos.d.ts +1 -1
  361. package/es/Modal/__tests__/fixtures/A11yDemos.js +1 -1
  362. package/es/Modal/useModal.js +26 -29
  363. package/es/NavBar/NavBar.d.ts +1 -1
  364. package/es/NavBar/NavBar.js +1 -1
  365. package/es/Picker/Picker.js +0 -1
  366. package/es/Picker/Picker.types.d.ts +1 -1
  367. package/es/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -1
  368. package/es/Picker/__tests__/fixtures/A11yDemos.js +1 -1
  369. package/es/Popover/Popover.d.ts +1 -1
  370. package/es/Popover/Popover.js +1 -1
  371. package/es/Popover/Popover.types.d.ts +1 -1
  372. package/es/Popover/__tests__/fixtures/A11yDemos.d.ts +1 -1
  373. package/es/Popover/__tests__/fixtures/A11yDemos.js +1 -1
  374. package/es/Portal/Portal.d.ts +1 -1
  375. package/es/Portal/Portal.js +1 -1
  376. package/es/Portal/Portal.miniapp.js +15 -9
  377. package/es/Portal/Portal.types.d.ts +1 -1
  378. package/es/Progress/Progress.d.ts +1 -1
  379. package/es/Progress/Progress.js +1 -1
  380. package/es/Progress/Progress.types.d.ts +1 -1
  381. package/es/Progress/__tests__/fixtures/A11yDemos.d.ts +1 -1
  382. package/es/Progress/__tests__/fixtures/A11yDemos.js +1 -1
  383. package/es/Radio/RadioButtonIcon.d.ts +1 -1
  384. package/es/Radio/RadioButtonIcon.js +1 -1
  385. package/es/Radio/RadioContext.d.ts +1 -1
  386. package/es/Radio/RadioContext.js +1 -1
  387. package/es/Radio/__tests__/fixtures/A11yDemos.d.ts +1 -1
  388. package/es/Radio/__tests__/fixtures/A11yDemos.js +1 -1
  389. package/es/Rating/Rating.types.d.ts +1 -1
  390. package/es/ScrollView/ScrollView.types.d.ts +210 -1
  391. package/es/ScrollView/__tests__/fixtures/A11yDemos.d.ts +1 -1
  392. package/es/ScrollView/__tests__/fixtures/A11yDemos.js +1 -1
  393. package/es/ScrollView/useScrollView.js +16 -4
  394. package/es/Skeleton/Skeleton.d.ts +1 -1
  395. package/es/Skeleton/Skeleton.js +1 -1
  396. package/es/Skeleton/Skeleton.types.d.ts +1 -1
  397. package/es/Slide/Slide.d.ts +1 -1
  398. package/es/Slide/Slide.js +1 -1
  399. package/es/Slide/Slide.miniapp.js +14 -11
  400. package/es/Slider/Slider.types.d.ts +1 -1
  401. package/es/Steps/Step.types.d.ts +1 -1
  402. package/es/Steps/StepsContext.d.ts +1 -1
  403. package/es/Steps/StepsContext.js +1 -1
  404. package/es/SwipeAction/SwipeAction.js +7 -8
  405. package/es/SwipeAction/SwipeAction.types.d.ts +1 -1
  406. package/es/Swiper/Swiper.js +5 -1
  407. package/es/Swiper/Swiper.types.d.ts +1 -1
  408. package/es/Swiper/SwiperItem.d.ts +1 -1
  409. package/es/Swiper/SwiperItem.js +1 -1
  410. package/es/Switch/__tests__/fixtures/A11yDemos.d.ts +1 -1
  411. package/es/Switch/__tests__/fixtures/A11yDemos.js +1 -1
  412. package/es/TabBar/TabBar.d.ts +1 -1
  413. package/es/TabBar/TabBar.js +1 -1
  414. package/es/Tabs/Tab.css +1 -23
  415. package/es/Tabs/Tab.d.ts +2 -2
  416. package/es/Tabs/Tab.js +44 -36
  417. package/es/Tabs/Tab.types.d.ts +1 -1
  418. package/es/Tabs/TabIndicator.d.ts +11 -0
  419. package/es/Tabs/TabIndicator.js +156 -0
  420. package/es/Tabs/TabMask.d.ts +7 -0
  421. package/es/Tabs/TabMask.js +18 -0
  422. package/es/Tabs/TabPanel.js +8 -4
  423. package/es/Tabs/TabPanel.types.d.ts +1 -1
  424. package/es/Tabs/Tabs.css +15 -6
  425. package/es/Tabs/Tabs.js +100 -158
  426. package/es/Tabs/Tabs.types.d.ts +5 -6
  427. package/es/Tabs/TabsContext.d.ts +15 -6
  428. package/es/Tabs/TabsContext.js +6 -4
  429. package/es/Tabs/classes.d.ts +13 -0
  430. package/es/Tabs/classes.js +28 -0
  431. package/es/Tabs/index.css +16 -29
  432. package/es/Tabs/index.d.ts +2 -2
  433. package/es/Tabs/index.js +2 -2
  434. package/es/Tabs/index.miniapp.d.ts +5 -0
  435. package/es/Tabs/index.miniapp.js +11 -0
  436. package/es/Tabs/miniapp/Tab.d.ts +5 -0
  437. package/es/Tabs/miniapp/Tab.js +77 -0
  438. package/es/Tabs/miniapp/TabIndicator.d.ts +15 -0
  439. package/es/Tabs/miniapp/TabIndicator.js +272 -0
  440. package/es/Tabs/miniapp/Tabs.d.ts +5 -0
  441. package/es/Tabs/miniapp/Tabs.js +229 -0
  442. package/es/Tabs/miniapp/TabsContext.d.ts +17 -0
  443. package/es/Tabs/miniapp/TabsContext.js +16 -0
  444. package/es/Tabs/miniapp/index.d.ts +2 -0
  445. package/es/Tabs/miniapp/index.js +7 -0
  446. package/es/Tabs/miniapp/scroll.d.ts +21 -0
  447. package/es/Tabs/miniapp/scroll.js +29 -0
  448. package/es/Tabs/miniapp/utils/queryBatch.d.ts +68 -0
  449. package/es/Tabs/miniapp/utils/queryBatch.js +65 -0
  450. package/es/Tabs/utils/scroll.js +10 -4
  451. package/es/Tag/Tag.css +0 -1
  452. package/es/Tag/Tag.d.ts +1 -1
  453. package/es/Tag/Tag.js +4 -4
  454. package/es/Tag/Tag.types.d.ts +1 -1
  455. package/es/Tag/TagGroup.d.ts +1 -1
  456. package/es/Tag/TagGroup.js +1 -1
  457. package/es/Tag/TagGroup.types.d.ts +1 -1
  458. package/es/Tag/__tests__/fixtures/A11yDemos.js +3 -3
  459. package/es/Tag/index.css +0 -1
  460. package/es/TextArea/__tests__/fixtures/A11yDemos.d.ts +1 -1
  461. package/es/TextArea/__tests__/fixtures/A11yDemos.js +1 -1
  462. package/es/ThemeProvider/hooks/ThemeContext.d.ts +1 -1
  463. package/es/ThemeProvider/hooks/ThemeContext.js +1 -1
  464. package/es/ThemeProvider/hooks/useTheme.js +1 -1
  465. package/es/ThemeProvider/utils/mountTokens.js +1 -1
  466. package/es/Toast/Toast.d.ts +1 -1
  467. package/es/Toast/Toast.js +1 -1
  468. package/es/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -1
  469. package/es/Toast/__tests__/fixtures/A11yDemos.js +1 -1
  470. package/es/Tooltip/Tooltip.d.ts +1 -1
  471. package/es/Tooltip/Tooltip.js +1 -1
  472. package/es/Tooltip/Tooltip.types.d.ts +1 -1
  473. package/es/Tooltip/__tests__/fixtures/A11yDemos.d.ts +1 -1
  474. package/es/Tooltip/__tests__/fixtures/A11yDemos.js +1 -1
  475. package/es/Transition/Transition.d.ts +1 -1
  476. package/es/Transition/Transition.js +1 -1
  477. package/es/Transition/Transition.miniapp.d.ts +1 -1
  478. package/es/Transition/Transition.miniapp.js +1 -1
  479. package/es/Transition/TransitionCore.js +8 -2
  480. package/es/_.._/benchmarks/components/Button.d.js +0 -0
  481. package/es/_.._/benchmarks/components/Button.js +1 -1
  482. package/es/_.._/benchmarks/components/Input.d.js +0 -0
  483. package/es/_.._/benchmarks/components/Tabs.d.js +0 -0
  484. package/package.json +7 -6
@@ -36,7 +36,6 @@ function useModal(parameters) {
36
36
  onClose,
37
37
  open,
38
38
  rootRef,
39
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
39
  children
41
40
  } = parameters;
42
41
  const modal = useRef({
@@ -59,12 +58,12 @@ function useModal(parameters) {
59
58
  }
60
59
  return modal.current;
61
60
  };
62
- const isTopModal = () => modalManager.isTopModal(getModal());
63
- const handleMounted = () => {
61
+ const isTopModal = useCallback(() => modalManager.isTopModal(getModal()), []);
62
+ const handleMounted = useCallback(() => {
64
63
  modalManager.mount(getModal(), {
65
64
  disableScrollLock
66
65
  });
67
- };
66
+ }, [disableScrollLock]);
68
67
  const handleOpen = useEventCallback(() => {
69
68
  const resolvedContainer = getContainer(container) || document.body;
70
69
  modalManager.add(getModal(), resolvedContainer);
@@ -72,17 +71,20 @@ function useModal(parameters) {
72
71
  handleMounted();
73
72
  }
74
73
  });
75
- const handlePortalRef = useEventCallback((node) => {
76
- mountNodeRef.current = node;
77
- if (!node) {
78
- return;
79
- }
80
- if (open && isTopModal()) {
81
- handleMounted();
82
- } else if (modalRef.current) {
83
- ariaHidden(modalRef.current, ariaHiddenProp);
84
- }
85
- });
74
+ const handlePortalRef = useCallback(
75
+ (node) => {
76
+ mountNodeRef.current = node;
77
+ if (!node) {
78
+ return;
79
+ }
80
+ if (open && isTopModal()) {
81
+ handleMounted();
82
+ } else if (modalRef.current) {
83
+ ariaHidden(modalRef.current, ariaHiddenProp);
84
+ }
85
+ },
86
+ [open, ariaHiddenProp, isTopModal, handleMounted]
87
+ );
86
88
  const handleClose = useCallback(() => {
87
89
  modalManager.remove(getModal(), ariaHiddenProp);
88
90
  }, [ariaHiddenProp]);
@@ -98,21 +100,17 @@ function useModal(parameters) {
98
100
  handleClose();
99
101
  }
100
102
  }, [open, handleClose, hasTransition, handleOpen]);
101
- const createHandleBackdropClick = (
102
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
- (backdropHandlers = {}) => (event) => {
104
- var _a;
105
- (_a = backdropHandlers.onClick) == null ? void 0 : _a.call(backdropHandlers, event);
106
- if (event.target !== event.currentTarget) {
107
- return;
108
- }
109
- if (onClose) {
110
- onClose(event, { from: "backdropClick" });
111
- }
103
+ const createHandleBackdropClick = (backdropHandlers = {}) => (event) => {
104
+ var _a;
105
+ (_a = backdropHandlers.onClick) == null ? void 0 : _a.call(backdropHandlers, event);
106
+ if (event.target !== event.currentTarget) {
107
+ return;
112
108
  }
113
- );
109
+ if (onClose) {
110
+ onClose(event, { from: "backdropClick" });
111
+ }
112
+ };
114
113
  const getRootProps = useCallback(
115
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
114
  (rootHandlers) => {
117
115
  return __spreadProps(__spreadValues({
118
116
  role: "presentation"
@@ -123,7 +121,6 @@ function useModal(parameters) {
123
121
  [handleRef]
124
122
  );
125
123
  const getBackdropProps = useCallback(
126
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
127
124
  (backdropHandlers = {}) => {
128
125
  const propsEventHandlers = {
129
126
  onClick: createHandleBackdropClick(backdropHandlers)
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { NavBarProps } from './NavBar.types';
3
3
  import './index.less';
4
4
  declare const NavBar: React.ForwardRefExoticComponent<Omit<NavBarProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -26,7 +26,7 @@ var __objRest = (source, exclude) => {
26
26
  }
27
27
  return target;
28
28
  };
29
- import React from "react";
29
+ import * as React from "react";
30
30
  import clsx from "clsx";
31
31
  import { useForkRef, useSize } from "@bifrostui/utils";
32
32
  import { ArrowBackwardLargeIcon } from "@bifrostui/icons";
@@ -238,7 +238,6 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
238
238
  [`${prefixCls}-confirm-disabled`]: disabled
239
239
  }),
240
240
  onClick: confirm,
241
- type: "button",
242
241
  "aria-label": "Confirm",
243
242
  tabIndex: disabled ? -1 : 0
244
243
  },
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { OverrideProps } from '@bifrostui/types';
3
3
  import { DrawerProps } from '../Drawer/Drawer.types';
4
4
  export interface IPickerOptionItem {
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  export declare const CalendarDemo: () => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import Picker from "../../Picker";
3
3
  const CalendarDemo = () => {
4
4
  return /* @__PURE__ */ React.createElement(
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { PopoverProps } from './Popover.types';
3
3
  import './index.less';
4
4
  declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
  import clsx from "clsx";
33
- import React from "react";
33
+ import * as React from "react";
34
34
  import { useForkRef } from "@bifrostui/utils";
35
35
  import Portal from "../Portal";
36
36
  import Backdrop from "../Backdrop";
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { OverrideProps } from '@bifrostui/types';
3
3
  type triggerType = 'click' | 'hover' | 'none';
4
4
  export interface AnchorOrigin {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  /**
3
3
  * 自定义 Popover 组件 Demo 集合
4
4
  * 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import Popover from "../../Popover";
3
3
  const basicPopoverDemo = () => {
4
4
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { PortalProps } from './Portal.types';
3
3
  export declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLElement>>;
4
4
  export default Portal;
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import React from "react";
20
+ import * as React from "react";
21
21
  import PortalCore from "./PortalCore";
22
22
  const Portal = /* @__PURE__ */ React.forwardRef(
23
23
  (props, ref) => {
@@ -18,19 +18,25 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import Taro from "@tarojs/taro";
21
- import React, { forwardRef, useEffect, useState } from "react";
21
+ import React, { forwardRef, useLayoutEffect, useState, useMemo } from "react";
22
22
  import PortalCore from "./PortalCore";
23
23
  const Portal = forwardRef((props, ref) => {
24
24
  const { disablePortal } = props;
25
25
  const [rootWrapperElement, setRootWrapperElement] = useState();
26
- useEffect(() => {
26
+ const initialPageInfo = useMemo(() => {
27
+ const currentPages = Taro.getCurrentPages() || [];
28
+ const currentPage = currentPages[currentPages.length - 1];
29
+ return {
30
+ path: currentPage == null ? void 0 : currentPage.$taroPath
31
+ };
32
+ }, []);
33
+ useLayoutEffect(() => {
27
34
  let root;
28
- if (!disablePortal) {
29
- const currentPages = Taro.getCurrentPages() || [];
30
- const currentPage = currentPages[currentPages.length - 1];
31
- const pageElement = currentPage == null ? void 0 : currentPage.$taroPath;
32
- const rootElement = document.getElementById(pageElement);
33
- const portalId = (rootElement == null ? void 0 : rootElement.sid) ? `${rootElement == null ? void 0 : rootElement.sid}_portalId` : `${pageElement}_portalId`;
35
+ if (!disablePortal && initialPageInfo.path) {
36
+ const { path } = initialPageInfo;
37
+ const rootElement = document.getElementById(path);
38
+ const elementWithSid = rootElement;
39
+ const portalId = (elementWithSid == null ? void 0 : elementWithSid.sid) ? `${elementWithSid.sid}_portalId` : `${path}_portalId`;
34
40
  const portalWrapperElement = document.getElementById(portalId);
35
41
  if (!portalWrapperElement) {
36
42
  const view = document.createElement("view");
@@ -42,7 +48,7 @@ const Portal = forwardRef((props, ref) => {
42
48
  }
43
49
  }
44
50
  setRootWrapperElement(root);
45
- }, []);
51
+ }, [disablePortal, initialPageInfo.path]);
46
52
  return /* @__PURE__ */ React.createElement(PortalCore, __spreadProps(__spreadValues({}, props), { ref, rootElement: rootWrapperElement }));
47
53
  });
48
54
  Portal.displayName = "BuiPortal";
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  export interface PortalCoreProps {
3
3
  /**
4
4
  * container中渲染的元素
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { ProgressGradient, ProgressProps } from './Progress.types';
3
3
  import './index.less';
4
4
  export declare const handleGradient: (strokeColor: ProgressGradient) => {
@@ -27,7 +27,7 @@ var __objRest = (source, exclude) => {
27
27
  return target;
28
28
  };
29
29
  import clsx from "clsx";
30
- import React from "react";
30
+ import * as React from "react";
31
31
  import { useLocaleText } from "../locales";
32
32
  import "./index.css";
33
33
  const prefixCls = "bui-progress";
@@ -1,5 +1,5 @@
1
1
  import { OverrideProps } from '@bifrostui/types';
2
- import React from 'react';
2
+ import * as React from 'react';
3
3
  export type ProgressStringGradients = {
4
4
  [percentage: string]: string;
5
5
  };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  /**
3
3
  * 自定义 Progress 组件 Demo 集合
4
4
  * 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import Progress from "../../Progress";
3
3
  const basicProgressDemo = () => {
4
4
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Progress, { percent: 40 }));
@@ -1,5 +1,5 @@
1
1
  import { ISvgIconProps } from '@bifrostui/icons';
2
- import React from 'react';
2
+ import * as React from 'react';
3
3
  export interface IRadioButtonIconProps extends ISvgIconProps {
4
4
  checked: boolean;
5
5
  }
@@ -3,7 +3,7 @@ import {
3
3
  RadioCheckedFilledIcon as RadioButtonCheckedIcon
4
4
  } from "@bifrostui/icons";
5
5
  import clsx from "clsx";
6
- import React from "react";
6
+ import * as React from "react";
7
7
  const prefixCls = "bui-radio-btn-icon";
8
8
  function RadioButtonIcon(props) {
9
9
  const {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { RadioGroupContextProps } from './Radio.types';
3
3
  declare const RadioGroupContext: React.Context<RadioGroupContextProps>;
4
4
  export declare const RadioContextProvider: React.Provider<RadioGroupContextProps>;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  const RadioGroupContext = React.createContext(void 0);
3
3
  const RadioContextProvider = RadioGroupContext.Provider;
4
4
  var RadioContext_default = RadioGroupContext;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  /**
3
3
  * 自定义 Radio 组件 Demo 集合
4
4
  * 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import Radio from "../../Radio";
3
3
  const basicRadioDemo = () => {
4
4
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", null, /* @__PURE__ */ React.createElement(Radio, { checked: true }), "Radio"));
@@ -1,5 +1,5 @@
1
1
  import { OverrideProps } from '@bifrostui/types';
2
- import React from 'react';
2
+ import * as React from 'react';
3
3
  export type RatingSize = 'xsmall' | 'small' | 'medium' | 'large';
4
4
  export type RatingProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
5
5
  props: P & {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { OverrideProps } from '@bifrostui/types';
3
3
  /**
4
4
  * 滚动事件详情
@@ -9,6 +9,22 @@ export interface ScrollViewScrollEvent extends Event {
9
9
  scrollTop: number;
10
10
  scrollHeight: number;
11
11
  scrollWidth: number;
12
+ deltaX?: number;
13
+ deltaY?: number;
14
+ isDrag?: boolean;
15
+ };
16
+ }
17
+ /**
18
+ * 拖拽事件详情
19
+ */
20
+ export interface ScrollViewDragEvent extends Event {
21
+ detail?: {
22
+ /** 横向滚动条位置 */
23
+ scrollLeft?: number;
24
+ /** 竖向滚动条位置 */
25
+ scrollTop?: number;
26
+ /** 滚动速度 */
27
+ velocity?: number;
12
28
  };
13
29
  }
14
30
  /**
@@ -52,6 +68,134 @@ export type ScrollViewProps<D extends React.ElementType = 'div', P = {}> = Overr
52
68
  * @default false
53
69
  */
54
70
  scrollWithAnimation?: boolean;
71
+ /**
72
+ * 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。
73
+ */
74
+ scrollAnimationDuration?: number;
75
+ /**
76
+ * 滚动条返回顶部,只支持竖向
77
+ * 仅小程序可用
78
+ * @default false
79
+ */
80
+ enableBackToTop?: boolean;
81
+ /**
82
+ * 启用 flexbox 布局。开启后,当前节点声明了 `display: flex` 就会成为 flex container,并作用于其孩子节点。
83
+ * 仅小程序可用
84
+ * @default false
85
+ */
86
+ enableFlex?: boolean;
87
+ /**
88
+ * 开启 scroll anchoring 特性,即控制滚动位置不随内容变化而抖动,仅在 iOS 下生效,安卓下可参考 CSS `overflow-anchor` 属性。
89
+ * 仅小程序可用
90
+ * @default false
91
+ */
92
+ scrollAnchoring?: boolean;
93
+ /**
94
+ * 启用 scroll-view 增强特性
95
+ * 仅小程序可用
96
+ * @default false
97
+ */
98
+ enhanced?: boolean;
99
+ /**
100
+ * iOS 下 scroll-view 边界弹性控制 (同时开启 enhanced 属性后生效)
101
+ * 仅小程序可用
102
+ * @default true
103
+ */
104
+ bounces?: boolean;
105
+ /**
106
+ * 滚动条显隐控制 (同时开启 enhanced 属性后生效)
107
+ * 仅小程序可用
108
+ * @default true
109
+ */
110
+ showScrollbar?: boolean;
111
+ /**
112
+ * 分页滑动效果 (同时开启 enhanced 属性后生效)
113
+ * 仅小程序可用
114
+ * @default false
115
+ */
116
+ pagingEnabled?: boolean;
117
+ /**
118
+ * 滑动减速速率控制 (同时开启 enhanced 属性后生效)
119
+ * 仅小程序可用
120
+ * @default false
121
+ */
122
+ fastDeceleration?: boolean;
123
+ /**
124
+ * 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。
125
+ * 仅小程序可用
126
+ * @default false
127
+ */
128
+ trapScroll?: string;
129
+ /**
130
+ * 发生滚动前,对滚动方向进行判断,当方向是顶部/左边时,如果值为always将始终禁止滚动,如果值为out-of-bounds 且当前已经滚动到顶部/左边,禁止滚动。
131
+ * 仅小程序可用
132
+ */
133
+ disableLowerScroll?: string;
134
+ /**
135
+ * 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为always将始终禁止滚动,如果值为out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。
136
+ * 仅小程序可用
137
+ */
138
+ disableUpperScroll?: string;
139
+ /**
140
+ * 无障碍访问,(属性)元素的额外描述
141
+ * 仅小程序可用
142
+ */
143
+ ariaLabel?: string;
144
+ /**
145
+ * 开启 passive 特性,能优化一定的滚动性能
146
+ * 仅小程序可用
147
+ * @default false
148
+ */
149
+ enablePassive?: string;
150
+ /**
151
+ * 渲染模式
152
+ * list - 列表模式。只会渲染在屏节点,会根据直接子节点是否在屏来按需渲染,若只有一个直接子节点则性能会退化
153
+ * custom - 自定义模式。只会渲染在屏节点,子节点可以是 sticky-section list-view grid-view 等组件
154
+ * 仅小程序可用
155
+ * @default 'list'
156
+ */
157
+ type?: 'list' | 'custom';
158
+ /**
159
+ * 是否反向滚动。一般初始滚动位置是在顶部,反向滚动则是在底部。
160
+ * 仅小程序可用
161
+ * @default false
162
+ */
163
+ reverse?: boolean;
164
+ /**
165
+ * 指定视口外渲染区域的距离,默认情况下视口外节点不渲染。指定 cache-extent 可优化滚动体验和加载速度,但会提高内存占用且影响首屏速度,可按需启用。
166
+ * 仅小程序可用
167
+ */
168
+ cacheExtent?: number;
169
+ /**
170
+ * 只 scroll-into-view 到 cacheExtent 以内的目标节点,性能更佳
171
+ * 仅小程序可用
172
+ * @default false
173
+ */
174
+ scrollIntoViewWithinExtent?: boolean;
175
+ /**
176
+ * 开启自定义下拉刷新
177
+ * 仅小程序可用
178
+ * @default false
179
+ */
180
+ refresherEnabled?: boolean;
181
+ /**
182
+ * 设置自定义下拉刷新默认样式,支持设置 `black | white | none`, none 表示不使用默认样式
183
+ * 仅小程序可用
184
+ * @default 'black'
185
+ */
186
+ refresherDefaultStyle?: string;
187
+ /**
188
+ * 设置自定义下拉刷新区域背景颜色
189
+ * 仅小程序可用
190
+ * @default '#FFF'
191
+ */
192
+ refresherBackground?: string;
193
+ /**
194
+ * 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
195
+ * 仅小程序可用
196
+ * @default false
197
+ */
198
+ refresherTriggered?: boolean;
55
199
  /**
56
200
  * 距顶部/左边多远时(单位px),触发 onScrollToUpper 事件
57
201
  * @default 50
@@ -78,6 +222,71 @@ export type ScrollViewProps<D extends React.ElementType = 'div', P = {}> = Overr
78
222
  * 触摸移动时触发
79
223
  */
80
224
  onTouchMove?: (e: React.SyntheticEvent<HTMLDivElement, TouchEvent>) => void;
225
+ /**
226
+ * 滚动开始事件
227
+ * 仅小程序可用
228
+ */
229
+ onScrollStart?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewScrollEvent>) => void;
230
+ /**
231
+ * 滚动结束事件
232
+ * 仅小程序可用
233
+ */
234
+ onScrollEnd?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewScrollEvent>) => void;
235
+ /**
236
+ * 自定义下拉刷新控件被下拉
237
+ * 仅小程序可用
238
+ */
239
+ onRefresherPulling?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
240
+ /**
241
+ * 自定义下拉刷新被触发
242
+ * 仅小程序可用
243
+ */
244
+ onRefresherRefresh?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
245
+ /**
246
+ * 自定义下拉刷新被复位
247
+ * 仅小程序可用
248
+ */
249
+ onRefresherRestore?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
250
+ /**
251
+ * 自定义下拉刷新被中止
252
+ * 仅小程序可用
253
+ */
254
+ onRefresherAbort?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
255
+ /**
256
+ * 自定义下拉刷新即将触发刷新(拖动超过 refresher-threshold 时)的事件
257
+ * 仅小程序可用
258
+ */
259
+ onRefresherWillRefresh?: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void;
260
+ /**
261
+ * 滑动开始事件 (同时开启 enhanced 属性后生效)
262
+ * 仅小程序可用
263
+ */
264
+ onDragStart?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewDragEvent>) => void;
265
+ /**
266
+ * 滑动事件 (同时开启 enhanced 属性后生效)
267
+ * 仅小程序可用
268
+ */
269
+ onDragging?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewDragEvent>) => void;
270
+ /**
271
+ * 滑动结束事件 (同时开启 enhanced 属性后生效)
272
+ * 仅小程序可用
273
+ */
274
+ onDragEnd?: (e: React.SyntheticEvent<HTMLDivElement, ScrollViewDragEvent>) => void;
275
+ /**
276
+ * 触摸动作开始。
277
+ * 仅小程序可用
278
+ */
279
+ onTouchStart?: (e: React.SyntheticEvent<HTMLDivElement, TouchEvent>) => void;
280
+ /**
281
+ * 触摸动作结束。
282
+ * 仅小程序可用
283
+ */
284
+ onTouchEnd?: (e: React.SyntheticEvent<HTMLDivElement, TouchEvent>) => void;
285
+ /**
286
+ * 触摸动作被打断,如来电提醒、弹窗。
287
+ * 仅小程序可用
288
+ */
289
+ onTouchCancel?: (e: React.SyntheticEvent<HTMLDivElement, TouchEvent>) => void;
81
290
  };
82
291
  defaultComponent: D;
83
292
  }, D>;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  export declare const BasicScrollViewDemo: React.FC;
3
3
  export declare const HorizontalScrollViewDemo: React.FC;
4
4
  export declare const ScrollEventsDemo: React.FC;
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import React from "react";
20
+ import * as React from "react";
21
21
  import ScrollView from "../../ScrollView";
22
22
  const BasicScrollViewDemo = () => {
23
23
  return /* @__PURE__ */ React.createElement(ScrollView, { scrollY: true, style: { height: "300px", width: "100%" } }, Array.from({ length: 50 }, (_, index) => /* @__PURE__ */ React.createElement(