@bifrostui/react 2.0.0-alpha.32 → 2.0.0-alpha.34

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 (481) hide show
  1. package/dist/ActionSheet/ActionSheet.js +18 -8
  2. package/dist/ActionSheet/ActionSheetItem.d.ts +1 -1
  3. package/dist/ActionSheet/ActionSheetItem.js +12 -5
  4. package/dist/Alert/Alert.d.ts +1 -1
  5. package/dist/Alert/Alert.js +36 -34
  6. package/dist/Alert/__tests__/fixtures/A11yDemos.d.ts +8 -9
  7. package/dist/Alert/__tests__/fixtures/A11yDemos.js +60 -54
  8. package/dist/Avatar/Avatar.d.ts +1 -1
  9. package/dist/Avatar/Avatar.js +11 -9
  10. package/dist/Avatar/AvatarGroup.d.ts +1 -1
  11. package/dist/Avatar/AvatarGroup.js +10 -6
  12. package/dist/Backdrop/Backdrop.d.ts +1 -1
  13. package/dist/Backdrop/Backdrop.js +9 -5
  14. package/dist/Backdrop/__tests__/fixtures/A11yDemos.d.ts +4 -5
  15. package/dist/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
  16. package/dist/Badge/Badge.d.ts +1 -1
  17. package/dist/Badge/Badge.js +23 -15
  18. package/dist/Badge/__tests__/fixtures/A11yDemos.d.ts +16 -17
  19. package/dist/Badge/__tests__/fixtures/A11yDemos.js +60 -27
  20. package/dist/Badge/index.css +3 -3
  21. package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
  22. package/dist/Breadcrumb/Breadcrumb.js +19 -10
  23. package/dist/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  24. package/dist/Breadcrumb/BreadcrumbItem.js +18 -10
  25. package/dist/Button/Button.d.ts +1 -1
  26. package/dist/Button/Button.js +14 -7
  27. package/dist/Button/__tests__/fixtures/A11yDemos.d.ts +14 -15
  28. package/dist/Button/__tests__/fixtures/A11yDemos.js +32 -8
  29. package/dist/CSSTransition/CSSTransition.js +2 -1
  30. package/dist/CSSTransition/demo/CSSTransitionDemo.d.ts +1 -2
  31. package/dist/CSSTransition/demo/CSSTransitionDemo.js +28 -35
  32. package/dist/Calendar/Calendar.d.ts +1 -1
  33. package/dist/Calendar/Calendar.js +74 -66
  34. package/dist/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -2
  35. package/dist/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
  36. package/dist/Card/Card.d.ts +1 -1
  37. package/dist/Card/Card.js +9 -4
  38. package/dist/Card/CardContent.d.ts +1 -1
  39. package/dist/Card/CardContent.js +5 -1
  40. package/dist/Card/CardFooter.d.ts +1 -1
  41. package/dist/Card/CardFooter.js +5 -1
  42. package/dist/Card/CardHeader.d.ts +1 -1
  43. package/dist/Card/CardHeader.js +16 -9
  44. package/dist/Checkbox/Checkbox.d.ts +1 -1
  45. package/dist/Checkbox/Checkbox.js +27 -23
  46. package/dist/Checkbox/CheckboxGroup.d.ts +1 -1
  47. package/dist/Checkbox/CheckboxGroup.js +9 -5
  48. package/dist/Checkbox/__tests__/fixtures/A11yDemos.d.ts +6 -7
  49. package/dist/Checkbox/__tests__/fixtures/A11yDemos.js +10 -4
  50. package/dist/Checkbox/index.css +4 -4
  51. package/dist/CitySelector/CitySelector.d.ts +1 -1
  52. package/dist/CitySelector/CitySelector.js +2 -1
  53. package/dist/CitySelector/CitySelector.miniapp.d.ts +1 -1
  54. package/dist/CitySelector/CitySelector.miniapp.js +2 -1
  55. package/dist/CitySelector/CitySelectorCore.js +83 -61
  56. package/dist/CitySelector/Selector/index.d.ts +1 -1
  57. package/dist/CitySelector/Selector/index.js +5 -15
  58. package/dist/Collapse/Collapse.js +51 -50
  59. package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
  60. package/dist/CollapsePanel/CollapsePanel.js +10 -8
  61. package/dist/CollapsePanel/CollapsePanelItem.d.ts +1 -1
  62. package/dist/CollapsePanel/CollapsePanelItem.js +27 -17
  63. package/dist/Countdown/Countdown.d.ts +1 -1
  64. package/dist/Countdown/Countdown.js +39 -29
  65. package/dist/Countdown/__tests__/fixtures/A11yDemos.d.ts +14 -15
  66. package/dist/Countdown/__tests__/fixtures/A11yDemos.js +37 -23
  67. package/dist/DatePicker/DatePicker.d.ts +1 -1
  68. package/dist/DatePicker/DatePicker.js +3 -2
  69. package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
  70. package/dist/DesktopDatePicker/DesktopDatePicker.js +45 -40
  71. package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +1 -2
  72. package/dist/DesktopDatePicker/useGetDatePickerContent.js +48 -41
  73. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
  74. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +57 -51
  75. package/dist/DesktopPicker/DesktopPicker.d.ts +1 -1
  76. package/dist/DesktopPicker/DesktopPicker.js +36 -25
  77. package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
  78. package/dist/DesktopTimePicker/DesktopTimePicker.js +46 -41
  79. package/dist/DesktopTimePicker/DesktopTimePickerList.js +21 -20
  80. package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +1 -2
  81. package/dist/DesktopTimePicker/useGetTimePickerContent.js +9 -8
  82. package/dist/Dialog/Dialog.js +48 -39
  83. package/dist/Dialog/FunctionalDialog.js +8 -8
  84. package/dist/Dialog/__tests__/fixtures/A11yDemos.d.ts +3 -4
  85. package/dist/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
  86. package/dist/Divider/Divider.d.ts +1 -1
  87. package/dist/Divider/Divider.js +9 -4
  88. package/dist/Drawer/Drawer.js +28 -25
  89. package/dist/Drawer/__tests__/fixtures/A11yDemos.d.ts +12 -13
  90. package/dist/Drawer/__tests__/fixtures/A11yDemos.js +88 -35
  91. package/dist/Fade/Fade.js +23 -22
  92. package/dist/IconButton/IconButton.d.ts +1 -1
  93. package/dist/IconButton/IconButton.js +14 -9
  94. package/dist/Image/Image.d.ts +1 -1
  95. package/dist/Image/Image.js +15 -10
  96. package/dist/Image/__tests__/fixtures/A11yDemos.d.ts +12 -13
  97. package/dist/Image/__tests__/fixtures/A11yDemos.js +29 -25
  98. package/dist/Input/Input.d.ts +1 -1
  99. package/dist/Input/Input.js +28 -24
  100. package/dist/Input/__tests__/fixtures/A11yDemos.d.ts +12 -13
  101. package/dist/Input/__tests__/fixtures/A11yDemos.js +31 -13
  102. package/dist/ItemSelector/ItemSelector.d.ts +1 -1
  103. package/dist/ItemSelector/ItemSelector.js +2 -1
  104. package/dist/ItemSelector/ItemSelector.miniapp.d.ts +1 -1
  105. package/dist/ItemSelector/ItemSelector.miniapp.js +2 -1
  106. package/dist/ItemSelector/ItemSelectorCore.js +82 -68
  107. package/dist/ItemSelector/Selector/index.d.ts +1 -1
  108. package/dist/ItemSelector/Selector/index.js +5 -15
  109. package/dist/List/List.d.ts +1 -1
  110. package/dist/List/List.js +14 -7
  111. package/dist/List/ListItem.d.ts +1 -1
  112. package/dist/List/ListItem.js +14 -7
  113. package/dist/List/ListItemContent.d.ts +1 -1
  114. package/dist/List/ListItemContent.js +8 -1
  115. package/dist/List/ListItemExtra.d.ts +1 -1
  116. package/dist/List/ListItemExtra.js +5 -1
  117. package/dist/List/ListItemFooter.d.ts +1 -1
  118. package/dist/List/ListItemFooter.js +5 -1
  119. package/dist/List/ListItemHeader.d.ts +1 -1
  120. package/dist/List/ListItemHeader.js +5 -1
  121. package/dist/Loading/Loading.d.ts +1 -1
  122. package/dist/Loading/Loading.js +13 -6
  123. package/dist/Modal/Modal.d.ts +1 -1
  124. package/dist/Modal/Modal.js +5 -1
  125. package/dist/Modal/Modal.miniapp.d.ts +2 -4
  126. package/dist/Modal/Modal.miniapp.js +9 -6
  127. package/dist/Modal/__tests__/fixtures/A11yDemos.d.ts +2 -3
  128. package/dist/Modal/__tests__/fixtures/A11yDemos.js +7 -7
  129. package/dist/NavBar/NavBar.d.ts +1 -1
  130. package/dist/NavBar/NavBar.js +24 -11
  131. package/dist/Picker/Picker.d.ts +1 -1
  132. package/dist/Picker/Picker.js +63 -57
  133. package/dist/Picker/PickerPanel.d.ts +1 -1
  134. package/dist/Picker/PickerPanel.js +44 -37
  135. package/dist/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -2
  136. package/dist/Picker/__tests__/fixtures/A11yDemos.js +2 -2
  137. package/dist/Popover/Popover.d.ts +1 -1
  138. package/dist/Popover/Popover.js +65 -52
  139. package/dist/Popover/__tests__/fixtures/A11yDemos.d.ts +16 -17
  140. package/dist/Popover/__tests__/fixtures/A11yDemos.js +62 -50
  141. package/dist/Popover/hooks/usePopoverPosition.js +1 -1
  142. package/dist/Portal/Portal.js +2 -1
  143. package/dist/Portal/Portal.miniapp.js +3 -2
  144. package/dist/Progress/Progress.d.ts +1 -1
  145. package/dist/Progress/Progress.js +9 -4
  146. package/dist/Progress/__tests__/fixtures/A11yDemos.d.ts +12 -13
  147. package/dist/Progress/__tests__/fixtures/A11yDemos.js +51 -30
  148. package/dist/Radio/Radio.d.ts +1 -1
  149. package/dist/Radio/Radio.js +25 -22
  150. package/dist/Radio/RadioButtonIcon.d.ts +1 -2
  151. package/dist/Radio/RadioButtonIcon.js +24 -22
  152. package/dist/Radio/RadioGroup.d.ts +1 -1
  153. package/dist/Radio/RadioGroup.js +9 -5
  154. package/dist/Radio/__tests__/fixtures/A11yDemos.d.ts +6 -7
  155. package/dist/Radio/__tests__/fixtures/A11yDemos.js +10 -4
  156. package/dist/Rating/Rating.d.ts +1 -1
  157. package/dist/Rating/Rating.js +42 -33
  158. package/dist/ScrollView/ScrollView.d.ts +1 -1
  159. package/dist/ScrollView/ScrollView.js +3 -2
  160. package/dist/ScrollView/__tests__/fixtures/A11yDemos.js +205 -168
  161. package/dist/Select/Select.d.ts +1 -1
  162. package/dist/Select/Select.js +87 -78
  163. package/dist/Select/SelectOption.d.ts +1 -1
  164. package/dist/Select/SelectOption.js +5 -4
  165. package/dist/Select/__tests__/fixtures/A11yDemos.d.ts +12 -13
  166. package/dist/Select/__tests__/fixtures/A11yDemos.js +76 -46
  167. package/dist/Skeleton/Skeleton.d.ts +1 -1
  168. package/dist/Skeleton/Skeleton.js +9 -4
  169. package/dist/Slide/Slide.js +25 -24
  170. package/dist/Slider/Slider.d.ts +1 -1
  171. package/dist/Slider/Slider.js +34 -27
  172. package/dist/Stack/Stack.d.ts +1 -1
  173. package/dist/Stack/Stack.js +17 -9
  174. package/dist/Stack/demo/StackDemo.d.ts +1 -2
  175. package/dist/Stack/demo/StackDemo.js +114 -101
  176. package/dist/Steps/Step.d.ts +1 -1
  177. package/dist/Steps/Step.js +56 -44
  178. package/dist/Steps/Steps.d.ts +1 -1
  179. package/dist/Steps/Steps.js +23 -17
  180. package/dist/SwipeAction/SwipeAction.d.ts +1 -1
  181. package/dist/SwipeAction/SwipeAction.js +55 -46
  182. package/dist/SwipeAction/SwipeActionItem.d.ts +1 -1
  183. package/dist/SwipeAction/SwipeActionItem.js +9 -4
  184. package/dist/Swiper/Swiper.d.ts +1 -1
  185. package/dist/Swiper/Swiper.js +7 -6
  186. package/dist/Swiper/SwiperItem.d.ts +1 -2
  187. package/dist/Swiper/SwiperItem.js +5 -2
  188. package/dist/Switch/Switch.d.ts +1 -1
  189. package/dist/Switch/Switch.js +22 -18
  190. package/dist/Switch/__tests__/fixtures/A11yDemos.d.ts +6 -7
  191. package/dist/Switch/__tests__/fixtures/A11yDemos.js +10 -4
  192. package/dist/Switch/index.css +11 -11
  193. package/dist/TabBar/TabBar.d.ts +1 -1
  194. package/dist/TabBar/TabBar.js +14 -10
  195. package/dist/TabBar/TabBarItem.d.ts +1 -1
  196. package/dist/TabBar/TabBarItem.js +31 -20
  197. package/dist/Tabs/Tab.d.ts +1 -1
  198. package/dist/Tabs/Tab.js +5 -4
  199. package/dist/Tabs/TabIndicator.js +3 -2
  200. package/dist/Tabs/TabMask.js +2 -1
  201. package/dist/Tabs/TabPanel.d.ts +1 -1
  202. package/dist/Tabs/TabPanel.js +10 -5
  203. package/dist/Tabs/Tabs.d.ts +1 -1
  204. package/dist/Tabs/Tabs.js +26 -17
  205. package/dist/Tabs/miniapp/Tab.d.ts +1 -1
  206. package/dist/Tabs/miniapp/Tab.js +5 -4
  207. package/dist/Tabs/miniapp/TabIndicator.js +3 -2
  208. package/dist/Tabs/miniapp/Tabs.d.ts +1 -1
  209. package/dist/Tabs/miniapp/Tabs.js +33 -23
  210. package/dist/Tag/Tag.d.ts +1 -1
  211. package/dist/Tag/Tag.js +9 -4
  212. package/dist/Tag/TagGroup.d.ts +1 -1
  213. package/dist/Tag/TagGroup.js +9 -4
  214. package/dist/Tag/__tests__/fixtures/A11yDemos.d.ts +12 -13
  215. package/dist/Tag/__tests__/fixtures/A11yDemos.js +121 -83
  216. package/dist/TextArea/TextArea.d.ts +1 -1
  217. package/dist/TextArea/TextArea.js +40 -36
  218. package/dist/TextArea/__tests__/fixtures/A11yDemos.d.ts +10 -11
  219. package/dist/TextArea/__tests__/fixtures/A11yDemos.js +18 -15
  220. package/dist/ThemeProvider/ThemeProvider.d.ts +1 -1
  221. package/dist/ThemeProvider/ThemeProvider.js +3 -2
  222. package/dist/Toast/FunctionalToast.js +11 -11
  223. package/dist/Toast/Toast.js +38 -32
  224. package/dist/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -2
  225. package/dist/Toast/__tests__/fixtures/A11yDemos.js +5 -5
  226. package/dist/Tooltip/Tooltip.d.ts +1 -1
  227. package/dist/Tooltip/Tooltip.js +13 -6
  228. package/dist/Tooltip/__tests__/fixtures/A11yDemos.d.ts +16 -17
  229. package/dist/Tooltip/__tests__/fixtures/A11yDemos.js +51 -18
  230. package/dist/Tooltip/useTooltip.js +1 -1
  231. package/dist/Transition/Transition.js +2 -1
  232. package/dist/Transition/Transition.miniapp.js +2 -1
  233. package/dist/Transition/TransitionCore.js +8 -2
  234. package/dist/TransitionGroup/TransitionGroup.d.ts +1 -2
  235. package/dist/TransitionGroup/TransitionGroup.js +3 -2
  236. package/dist/TransitionGroup/demo/TransitionGroupDemo.d.ts +1 -2
  237. package/dist/TransitionGroup/demo/TransitionGroupDemo.js +24 -27
  238. package/dist/_.._/benchmarks/components/Button.js +2 -12
  239. package/dist/_.._/benchmarks/components/Input.js +3 -12
  240. package/dist/_.._/benchmarks/components/Tabs.js +8 -12
  241. package/es/ActionSheet/ActionSheet.js +18 -8
  242. package/es/ActionSheet/ActionSheetItem.d.ts +1 -1
  243. package/es/ActionSheet/ActionSheetItem.js +12 -5
  244. package/es/Alert/Alert.d.ts +1 -1
  245. package/es/Alert/Alert.js +36 -34
  246. package/es/Alert/__tests__/fixtures/A11yDemos.d.ts +8 -9
  247. package/es/Alert/__tests__/fixtures/A11yDemos.js +60 -54
  248. package/es/Avatar/Avatar.d.ts +1 -1
  249. package/es/Avatar/Avatar.js +11 -9
  250. package/es/Avatar/AvatarGroup.d.ts +1 -1
  251. package/es/Avatar/AvatarGroup.js +10 -6
  252. package/es/Backdrop/Backdrop.d.ts +1 -1
  253. package/es/Backdrop/Backdrop.js +9 -5
  254. package/es/Backdrop/__tests__/fixtures/A11yDemos.d.ts +4 -5
  255. package/es/Backdrop/__tests__/fixtures/A11yDemos.js +3 -3
  256. package/es/Badge/Badge.d.ts +1 -1
  257. package/es/Badge/Badge.js +23 -15
  258. package/es/Badge/__tests__/fixtures/A11yDemos.d.ts +16 -17
  259. package/es/Badge/__tests__/fixtures/A11yDemos.js +60 -27
  260. package/es/Badge/index.css +3 -3
  261. package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
  262. package/es/Breadcrumb/Breadcrumb.js +19 -10
  263. package/es/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  264. package/es/Breadcrumb/BreadcrumbItem.js +18 -10
  265. package/es/Button/Button.d.ts +1 -1
  266. package/es/Button/Button.js +14 -7
  267. package/es/Button/__tests__/fixtures/A11yDemos.d.ts +14 -15
  268. package/es/Button/__tests__/fixtures/A11yDemos.js +32 -8
  269. package/es/CSSTransition/CSSTransition.js +2 -1
  270. package/es/CSSTransition/demo/CSSTransitionDemo.d.ts +1 -2
  271. package/es/CSSTransition/demo/CSSTransitionDemo.js +28 -25
  272. package/es/Calendar/Calendar.d.ts +1 -1
  273. package/es/Calendar/Calendar.js +67 -59
  274. package/es/Calendar/__tests__/fixtures/A11yDemos.d.ts +1 -2
  275. package/es/Calendar/__tests__/fixtures/A11yDemos.js +2 -2
  276. package/es/Card/Card.d.ts +1 -1
  277. package/es/Card/Card.js +9 -4
  278. package/es/Card/CardContent.d.ts +1 -1
  279. package/es/Card/CardContent.js +5 -1
  280. package/es/Card/CardFooter.d.ts +1 -1
  281. package/es/Card/CardFooter.js +5 -1
  282. package/es/Card/CardHeader.d.ts +1 -1
  283. package/es/Card/CardHeader.js +16 -9
  284. package/es/Checkbox/Checkbox.d.ts +1 -1
  285. package/es/Checkbox/Checkbox.js +30 -23
  286. package/es/Checkbox/CheckboxGroup.d.ts +1 -1
  287. package/es/Checkbox/CheckboxGroup.js +9 -5
  288. package/es/Checkbox/__tests__/fixtures/A11yDemos.d.ts +6 -7
  289. package/es/Checkbox/__tests__/fixtures/A11yDemos.js +10 -4
  290. package/es/Checkbox/index.css +4 -4
  291. package/es/CitySelector/CitySelector.d.ts +1 -1
  292. package/es/CitySelector/CitySelector.js +2 -1
  293. package/es/CitySelector/CitySelector.miniapp.d.ts +1 -1
  294. package/es/CitySelector/CitySelector.miniapp.js +2 -1
  295. package/es/CitySelector/CitySelectorCore.js +83 -61
  296. package/es/CitySelector/Selector/index.d.ts +1 -1
  297. package/es/CitySelector/Selector/index.js +5 -5
  298. package/es/Collapse/Collapse.js +51 -50
  299. package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
  300. package/es/CollapsePanel/CollapsePanel.js +10 -8
  301. package/es/CollapsePanel/CollapsePanelItem.d.ts +1 -1
  302. package/es/CollapsePanel/CollapsePanelItem.js +27 -17
  303. package/es/Countdown/Countdown.d.ts +1 -1
  304. package/es/Countdown/Countdown.js +39 -29
  305. package/es/Countdown/__tests__/fixtures/A11yDemos.d.ts +14 -15
  306. package/es/Countdown/__tests__/fixtures/A11yDemos.js +37 -23
  307. package/es/DatePicker/DatePicker.d.ts +1 -1
  308. package/es/DatePicker/DatePicker.js +3 -2
  309. package/es/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
  310. package/es/DesktopDatePicker/DesktopDatePicker.js +45 -40
  311. package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +1 -2
  312. package/es/DesktopDatePicker/useGetDatePickerContent.js +48 -41
  313. package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
  314. package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +57 -51
  315. package/es/DesktopPicker/DesktopPicker.d.ts +1 -1
  316. package/es/DesktopPicker/DesktopPicker.js +36 -25
  317. package/es/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
  318. package/es/DesktopTimePicker/DesktopTimePicker.js +46 -41
  319. package/es/DesktopTimePicker/DesktopTimePickerList.js +21 -20
  320. package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +1 -2
  321. package/es/DesktopTimePicker/useGetTimePickerContent.js +9 -8
  322. package/es/Dialog/Dialog.js +48 -39
  323. package/es/Dialog/FunctionalDialog.js +8 -8
  324. package/es/Dialog/__tests__/fixtures/A11yDemos.d.ts +3 -4
  325. package/es/Dialog/__tests__/fixtures/A11yDemos.js +4 -4
  326. package/es/Divider/Divider.d.ts +1 -1
  327. package/es/Divider/Divider.js +9 -4
  328. package/es/Drawer/Drawer.js +28 -25
  329. package/es/Drawer/__tests__/fixtures/A11yDemos.d.ts +12 -13
  330. package/es/Drawer/__tests__/fixtures/A11yDemos.js +88 -35
  331. package/es/Fade/Fade.js +23 -22
  332. package/es/IconButton/IconButton.d.ts +1 -1
  333. package/es/IconButton/IconButton.js +14 -9
  334. package/es/Image/Image.d.ts +1 -1
  335. package/es/Image/Image.js +15 -10
  336. package/es/Image/__tests__/fixtures/A11yDemos.d.ts +12 -13
  337. package/es/Image/__tests__/fixtures/A11yDemos.js +29 -25
  338. package/es/Input/Input.d.ts +1 -1
  339. package/es/Input/Input.js +28 -24
  340. package/es/Input/__tests__/fixtures/A11yDemos.d.ts +12 -13
  341. package/es/Input/__tests__/fixtures/A11yDemos.js +31 -13
  342. package/es/ItemSelector/ItemSelector.d.ts +1 -1
  343. package/es/ItemSelector/ItemSelector.js +2 -1
  344. package/es/ItemSelector/ItemSelector.miniapp.d.ts +1 -1
  345. package/es/ItemSelector/ItemSelector.miniapp.js +2 -1
  346. package/es/ItemSelector/ItemSelectorCore.js +82 -68
  347. package/es/ItemSelector/Selector/index.d.ts +1 -1
  348. package/es/ItemSelector/Selector/index.js +5 -5
  349. package/es/List/List.d.ts +1 -1
  350. package/es/List/List.js +14 -7
  351. package/es/List/ListItem.d.ts +1 -1
  352. package/es/List/ListItem.js +14 -7
  353. package/es/List/ListItemContent.d.ts +1 -1
  354. package/es/List/ListItemContent.js +8 -1
  355. package/es/List/ListItemExtra.d.ts +1 -1
  356. package/es/List/ListItemExtra.js +5 -1
  357. package/es/List/ListItemFooter.d.ts +1 -1
  358. package/es/List/ListItemFooter.js +5 -1
  359. package/es/List/ListItemHeader.d.ts +1 -1
  360. package/es/List/ListItemHeader.js +5 -1
  361. package/es/Loading/Loading.d.ts +1 -1
  362. package/es/Loading/Loading.js +13 -6
  363. package/es/Modal/Modal.d.ts +1 -1
  364. package/es/Modal/Modal.js +5 -1
  365. package/es/Modal/Modal.miniapp.d.ts +2 -4
  366. package/es/Modal/Modal.miniapp.js +9 -6
  367. package/es/Modal/__tests__/fixtures/A11yDemos.d.ts +2 -3
  368. package/es/Modal/__tests__/fixtures/A11yDemos.js +7 -7
  369. package/es/NavBar/NavBar.d.ts +1 -1
  370. package/es/NavBar/NavBar.js +24 -11
  371. package/es/Picker/Picker.d.ts +1 -1
  372. package/es/Picker/Picker.js +63 -57
  373. package/es/Picker/PickerPanel.d.ts +1 -1
  374. package/es/Picker/PickerPanel.js +44 -37
  375. package/es/Picker/__tests__/fixtures/A11yDemos.d.ts +1 -2
  376. package/es/Picker/__tests__/fixtures/A11yDemos.js +2 -2
  377. package/es/Popover/Popover.d.ts +1 -1
  378. package/es/Popover/Popover.js +65 -52
  379. package/es/Popover/__tests__/fixtures/A11yDemos.d.ts +16 -17
  380. package/es/Popover/__tests__/fixtures/A11yDemos.js +62 -50
  381. package/es/Popover/hooks/usePopoverPosition.js +1 -1
  382. package/es/Portal/Portal.js +2 -1
  383. package/es/Portal/Portal.miniapp.js +3 -2
  384. package/es/Progress/Progress.d.ts +1 -1
  385. package/es/Progress/Progress.js +9 -4
  386. package/es/Progress/__tests__/fixtures/A11yDemos.d.ts +12 -13
  387. package/es/Progress/__tests__/fixtures/A11yDemos.js +51 -30
  388. package/es/Radio/Radio.d.ts +1 -1
  389. package/es/Radio/Radio.js +25 -22
  390. package/es/Radio/RadioButtonIcon.d.ts +1 -2
  391. package/es/Radio/RadioButtonIcon.js +24 -22
  392. package/es/Radio/RadioGroup.d.ts +1 -1
  393. package/es/Radio/RadioGroup.js +9 -5
  394. package/es/Radio/__tests__/fixtures/A11yDemos.d.ts +6 -7
  395. package/es/Radio/__tests__/fixtures/A11yDemos.js +10 -4
  396. package/es/Rating/Rating.d.ts +1 -1
  397. package/es/Rating/Rating.js +42 -33
  398. package/es/ScrollView/ScrollView.d.ts +1 -1
  399. package/es/ScrollView/ScrollView.js +3 -2
  400. package/es/ScrollView/__tests__/fixtures/A11yDemos.js +205 -168
  401. package/es/Select/Select.d.ts +1 -1
  402. package/es/Select/Select.js +87 -78
  403. package/es/Select/SelectOption.d.ts +1 -1
  404. package/es/Select/SelectOption.js +5 -4
  405. package/es/Select/__tests__/fixtures/A11yDemos.d.ts +12 -13
  406. package/es/Select/__tests__/fixtures/A11yDemos.js +76 -46
  407. package/es/Skeleton/Skeleton.d.ts +1 -1
  408. package/es/Skeleton/Skeleton.js +9 -4
  409. package/es/Slide/Slide.js +25 -24
  410. package/es/Slider/Slider.d.ts +1 -1
  411. package/es/Slider/Slider.js +34 -27
  412. package/es/Stack/Stack.d.ts +1 -1
  413. package/es/Stack/Stack.js +17 -9
  414. package/es/Stack/demo/StackDemo.d.ts +1 -2
  415. package/es/Stack/demo/StackDemo.js +114 -91
  416. package/es/Steps/Step.d.ts +1 -1
  417. package/es/Steps/Step.js +56 -44
  418. package/es/Steps/Steps.d.ts +1 -1
  419. package/es/Steps/Steps.js +23 -17
  420. package/es/SwipeAction/SwipeAction.d.ts +1 -1
  421. package/es/SwipeAction/SwipeAction.js +55 -46
  422. package/es/SwipeAction/SwipeActionItem.d.ts +1 -1
  423. package/es/SwipeAction/SwipeActionItem.js +9 -4
  424. package/es/Swiper/Swiper.d.ts +1 -1
  425. package/es/Swiper/Swiper.js +7 -6
  426. package/es/Swiper/SwiperItem.d.ts +1 -2
  427. package/es/Swiper/SwiperItem.js +5 -2
  428. package/es/Switch/Switch.d.ts +1 -1
  429. package/es/Switch/Switch.js +22 -18
  430. package/es/Switch/__tests__/fixtures/A11yDemos.d.ts +6 -7
  431. package/es/Switch/__tests__/fixtures/A11yDemos.js +10 -4
  432. package/es/Switch/index.css +11 -11
  433. package/es/TabBar/TabBar.d.ts +1 -1
  434. package/es/TabBar/TabBar.js +14 -10
  435. package/es/TabBar/TabBarItem.d.ts +1 -1
  436. package/es/TabBar/TabBarItem.js +31 -20
  437. package/es/Tabs/Tab.d.ts +1 -1
  438. package/es/Tabs/Tab.js +5 -4
  439. package/es/Tabs/TabIndicator.js +3 -2
  440. package/es/Tabs/TabMask.js +2 -1
  441. package/es/Tabs/TabPanel.d.ts +1 -1
  442. package/es/Tabs/TabPanel.js +10 -5
  443. package/es/Tabs/Tabs.d.ts +1 -1
  444. package/es/Tabs/Tabs.js +26 -17
  445. package/es/Tabs/miniapp/Tab.d.ts +1 -1
  446. package/es/Tabs/miniapp/Tab.js +5 -4
  447. package/es/Tabs/miniapp/TabIndicator.js +3 -2
  448. package/es/Tabs/miniapp/Tabs.d.ts +1 -1
  449. package/es/Tabs/miniapp/Tabs.js +33 -23
  450. package/es/Tag/Tag.d.ts +1 -1
  451. package/es/Tag/Tag.js +9 -4
  452. package/es/Tag/TagGroup.d.ts +1 -1
  453. package/es/Tag/TagGroup.js +9 -4
  454. package/es/Tag/__tests__/fixtures/A11yDemos.d.ts +12 -13
  455. package/es/Tag/__tests__/fixtures/A11yDemos.js +121 -83
  456. package/es/TextArea/TextArea.d.ts +1 -1
  457. package/es/TextArea/TextArea.js +40 -36
  458. package/es/TextArea/__tests__/fixtures/A11yDemos.d.ts +10 -11
  459. package/es/TextArea/__tests__/fixtures/A11yDemos.js +18 -15
  460. package/es/ThemeProvider/ThemeProvider.d.ts +1 -1
  461. package/es/ThemeProvider/ThemeProvider.js +3 -2
  462. package/es/Toast/FunctionalToast.js +11 -11
  463. package/es/Toast/Toast.js +38 -32
  464. package/es/Toast/__tests__/fixtures/A11yDemos.d.ts +1 -2
  465. package/es/Toast/__tests__/fixtures/A11yDemos.js +5 -5
  466. package/es/Tooltip/Tooltip.d.ts +1 -1
  467. package/es/Tooltip/Tooltip.js +13 -6
  468. package/es/Tooltip/__tests__/fixtures/A11yDemos.d.ts +16 -17
  469. package/es/Tooltip/__tests__/fixtures/A11yDemos.js +51 -18
  470. package/es/Tooltip/useTooltip.js +1 -1
  471. package/es/Transition/Transition.js +2 -1
  472. package/es/Transition/Transition.miniapp.js +2 -1
  473. package/es/Transition/TransitionCore.js +8 -2
  474. package/es/TransitionGroup/TransitionGroup.d.ts +1 -2
  475. package/es/TransitionGroup/TransitionGroup.js +3 -2
  476. package/es/TransitionGroup/demo/TransitionGroupDemo.d.ts +1 -2
  477. package/es/TransitionGroup/demo/TransitionGroupDemo.js +24 -17
  478. package/es/_.._/benchmarks/components/Button.js +2 -2
  479. package/es/_.._/benchmarks/components/Input.js +3 -2
  480. package/es/_.._/benchmarks/components/Tabs.js +8 -2
  481. package/package.json +17 -11
@@ -52,24 +52,26 @@ __export(A11yDemos_exports, {
52
52
  ThresholdTestDemo: () => ThresholdTestDemo
53
53
  });
54
54
  module.exports = __toCommonJS(A11yDemos_exports);
55
+ var import_jsx_runtime = require("react/jsx-runtime");
55
56
  var React = __toESM(require("react"));
56
57
  var import_ScrollView = __toESM(require("../../ScrollView"));
57
58
  const BasicScrollViewDemo = () => {
58
- return /* @__PURE__ */ React.createElement(import_ScrollView.default, { scrollY: true, style: { height: "300px", width: "100%" } }, Array.from({ length: 50 }, (_, index) => /* @__PURE__ */ React.createElement(
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollView.default, { scrollY: true, style: { height: "300px", width: "100%" }, children: Array.from({ length: 50 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
59
60
  "div",
60
61
  {
61
- key: index,
62
- style: { padding: "10px", borderBottom: "1px solid #eee" }
62
+ style: { padding: "10px", borderBottom: "1px solid #eee" },
63
+ children: [
64
+ "Item ",
65
+ index + 1
66
+ ]
63
67
  },
64
- "Item ",
65
- index + 1
66
- )));
68
+ index
69
+ )) });
67
70
  };
68
71
  const HorizontalScrollViewDemo = () => {
69
- return /* @__PURE__ */ React.createElement(import_ScrollView.default, { scrollX: true, style: { width: "300px" } }, /* @__PURE__ */ React.createElement("div", { style: { display: "flex", width: "max-content" } }, Array.from({ length: 20 }, (_, index) => /* @__PURE__ */ React.createElement(
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ScrollView.default, { scrollX: true, style: { width: "300px" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "flex", width: "max-content" }, children: Array.from({ length: 20 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
70
73
  "div",
71
74
  {
72
- key: index,
73
75
  style: {
74
76
  minWidth: "100px",
75
77
  height: "80px",
@@ -79,11 +81,14 @@ const HorizontalScrollViewDemo = () => {
79
81
  display: "flex",
80
82
  alignItems: "center",
81
83
  justifyContent: "center"
82
- }
84
+ },
85
+ children: [
86
+ "Item ",
87
+ index + 1
88
+ ]
83
89
  },
84
- "Item ",
85
- index + 1
86
- ))));
90
+ index
91
+ )) }) });
87
92
  };
88
93
  const ScrollEventsDemo = () => {
89
94
  const [scrollInfo, setScrollInfo] = React.useState({
@@ -105,40 +110,56 @@ const ScrollEventsDemo = () => {
105
110
  const handleScrollToLower = () => {
106
111
  setScrollInfo((prev) => __spreadProps(__spreadValues({}, prev), { atTop: false, atBottom: true }));
107
112
  };
108
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
109
- "div",
110
- {
111
- "data-testid": "scroll-info",
112
- style: {
113
- marginBottom: "10px",
114
- padding: "10px",
115
- backgroundColor: "#f9f9f9"
116
- }
117
- },
118
- /* @__PURE__ */ React.createElement("p", null, "Scroll Top: ", scrollInfo.scrollTop),
119
- /* @__PURE__ */ React.createElement("p", null, "At Top: ", scrollInfo.atTop ? "Yes" : "No"),
120
- /* @__PURE__ */ React.createElement("p", null, "At Bottom: ", scrollInfo.atBottom ? "Yes" : "No")
121
- ), /* @__PURE__ */ React.createElement(
122
- import_ScrollView.default,
123
- {
124
- scrollY: true,
125
- style: { height: "200px", width: "100%" },
126
- onScroll: handleScroll,
127
- onScrollToUpper: handleScrollToUpper,
128
- onScrollToLower: handleScrollToLower,
129
- upperThreshold: 30,
130
- lowerThreshold: 30
131
- },
132
- Array.from({ length: 30 }, (_, index) => /* @__PURE__ */ React.createElement(
113
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
133
115
  "div",
134
116
  {
135
- key: index,
136
- style: { padding: "15px", borderBottom: "1px solid #ddd" }
137
- },
138
- "Scroll Item ",
139
- index + 1
140
- ))
141
- ));
117
+ "data-testid": "scroll-info",
118
+ style: {
119
+ marginBottom: "10px",
120
+ padding: "10px",
121
+ backgroundColor: "#f9f9f9"
122
+ },
123
+ children: [
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
125
+ "Scroll Top: ",
126
+ scrollInfo.scrollTop
127
+ ] }),
128
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
129
+ "At Top: ",
130
+ scrollInfo.atTop ? "Yes" : "No"
131
+ ] }),
132
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
133
+ "At Bottom: ",
134
+ scrollInfo.atBottom ? "Yes" : "No"
135
+ ] })
136
+ ]
137
+ }
138
+ ),
139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
140
+ import_ScrollView.default,
141
+ {
142
+ scrollY: true,
143
+ style: { height: "200px", width: "100%" },
144
+ onScroll: handleScroll,
145
+ onScrollToUpper: handleScrollToUpper,
146
+ onScrollToLower: handleScrollToLower,
147
+ upperThreshold: 30,
148
+ lowerThreshold: 30,
149
+ children: Array.from({ length: 30 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
150
+ "div",
151
+ {
152
+ style: { padding: "15px", borderBottom: "1px solid #ddd" },
153
+ children: [
154
+ "Scroll Item ",
155
+ index + 1
156
+ ]
157
+ },
158
+ index
159
+ ))
160
+ }
161
+ )
162
+ ] });
142
163
  };
143
164
  const ControlledScrollDemo = () => {
144
165
  const [scrollTop, setScrollTop] = React.useState(0);
@@ -151,72 +172,79 @@ const ControlledScrollDemo = () => {
151
172
  setScrollTop(0);
152
173
  setScrollIntoView(elementId);
153
174
  };
154
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
155
- "div",
156
- {
157
- style: {
158
- marginBottom: "10px",
159
- padding: "10px",
160
- backgroundColor: "#f5f5f5"
161
- }
162
- },
163
- /* @__PURE__ */ React.createElement(
164
- "button",
165
- {
166
- type: "button",
167
- onClick: () => scrollToPosition(0),
168
- style: { marginRight: "5px" }
169
- },
170
- "Top"
171
- ),
172
- /* @__PURE__ */ React.createElement(
173
- "button",
174
- {
175
- type: "button",
176
- onClick: () => scrollToPosition(200),
177
- style: { marginRight: "5px" }
178
- },
179
- "200px"
180
- ),
181
- /* @__PURE__ */ React.createElement(
182
- "button",
183
- {
184
- type: "button",
185
- onClick: () => scrollToElement("item-10"),
186
- style: { marginRight: "5px" }
187
- },
188
- "Item 10"
189
- ),
190
- /* @__PURE__ */ React.createElement("button", { type: "button", onClick: () => scrollToElement("item-20") }, "Item 20")
191
- ), /* @__PURE__ */ React.createElement(
192
- import_ScrollView.default,
193
- {
194
- scrollY: true,
195
- style: { height: "250px", width: "100%" },
196
- scrollTop,
197
- scrollIntoView,
198
- scrollWithAnimation: true
199
- },
200
- Array.from({ length: 30 }, (_, index) => /* @__PURE__ */ React.createElement(
175
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
176
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
201
177
  "div",
202
178
  {
203
- key: index,
204
- id: `item-${index + 1}`,
205
179
  style: {
206
- padding: "20px",
207
- borderBottom: "1px solid #ccc",
208
- backgroundColor: (index + 1) % 10 === 0 ? "#e6f3ff" : "white"
209
- }
210
- },
211
- "Item ",
212
- index + 1,
213
- " ",
214
- (index + 1) % 10 === 0 && "(Highlighted)"
215
- ))
216
- ));
180
+ marginBottom: "10px",
181
+ padding: "10px",
182
+ backgroundColor: "#f5f5f5"
183
+ },
184
+ children: [
185
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
186
+ "button",
187
+ {
188
+ type: "button",
189
+ onClick: () => scrollToPosition(0),
190
+ style: { marginRight: "5px" },
191
+ children: "Top"
192
+ }
193
+ ),
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
195
+ "button",
196
+ {
197
+ type: "button",
198
+ onClick: () => scrollToPosition(200),
199
+ style: { marginRight: "5px" },
200
+ children: "200px"
201
+ }
202
+ ),
203
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
204
+ "button",
205
+ {
206
+ type: "button",
207
+ onClick: () => scrollToElement("item-10"),
208
+ style: { marginRight: "5px" },
209
+ children: "Item 10"
210
+ }
211
+ ),
212
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => scrollToElement("item-20"), children: "Item 20" })
213
+ ]
214
+ }
215
+ ),
216
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
217
+ import_ScrollView.default,
218
+ {
219
+ scrollY: true,
220
+ style: { height: "250px", width: "100%" },
221
+ scrollTop,
222
+ scrollIntoView,
223
+ scrollWithAnimation: true,
224
+ children: Array.from({ length: 30 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
225
+ "div",
226
+ {
227
+ id: `item-${index + 1}`,
228
+ style: {
229
+ padding: "20px",
230
+ borderBottom: "1px solid #ccc",
231
+ backgroundColor: (index + 1) % 10 === 0 ? "#e6f3ff" : "white"
232
+ },
233
+ children: [
234
+ "Item ",
235
+ index + 1,
236
+ " ",
237
+ (index + 1) % 10 === 0 && "(Highlighted)"
238
+ ]
239
+ },
240
+ index
241
+ ))
242
+ }
243
+ )
244
+ ] });
217
245
  };
218
246
  const BidirectionalScrollDemo = () => {
219
- return /* @__PURE__ */ React.createElement(
247
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
220
248
  import_ScrollView.default,
221
249
  {
222
250
  scrollX: true,
@@ -226,39 +254,41 @@ const BidirectionalScrollDemo = () => {
226
254
  height: "200px",
227
255
  border: "1px solid #ddd",
228
256
  borderRadius: "4px"
229
- }
230
- },
231
- /* @__PURE__ */ React.createElement(
232
- "div",
233
- {
234
- style: {
235
- width: "600px",
236
- height: "400px",
237
- backgroundImage: "linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%), linear-gradient(-45deg, transparent 75%, #f0f0f0 75%)",
238
- backgroundSize: "20px 20px",
239
- backgroundPosition: "0 0, 0 10px, 10px -10px, -10px 0px",
240
- position: "relative"
241
- }
242
257
  },
243
- /* @__PURE__ */ React.createElement(
258
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
244
259
  "div",
245
260
  {
246
261
  style: {
247
- position: "absolute",
248
- top: "50%",
249
- left: "50%",
250
- transform: "translate(-50%, -50%)",
251
- padding: "20px",
252
- backgroundColor: "white",
253
- border: "2px solid #007acc",
254
- borderRadius: "8px",
255
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
256
- }
257
- },
258
- /* @__PURE__ */ React.createElement("h3", { style: { margin: "0 0 10px 0", color: "#007acc" } }, "Scroll in both directions!"),
259
- /* @__PURE__ */ React.createElement("p", { style: { margin: 0, color: "#666" } }, "This content area is larger than the viewport")
262
+ width: "600px",
263
+ height: "400px",
264
+ backgroundImage: "linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%), linear-gradient(-45deg, transparent 75%, #f0f0f0 75%)",
265
+ backgroundSize: "20px 20px",
266
+ backgroundPosition: "0 0, 0 10px, 10px -10px, -10px 0px",
267
+ position: "relative"
268
+ },
269
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
270
+ "div",
271
+ {
272
+ style: {
273
+ position: "absolute",
274
+ top: "50%",
275
+ left: "50%",
276
+ transform: "translate(-50%, -50%)",
277
+ padding: "20px",
278
+ backgroundColor: "white",
279
+ border: "2px solid #007acc",
280
+ borderRadius: "8px",
281
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
282
+ },
283
+ children: [
284
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { style: { margin: "0 0 10px 0", color: "#007acc" }, children: "Scroll in both directions!" }),
285
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: { margin: 0, color: "#666" }, children: "This content area is larger than the viewport" })
286
+ ]
287
+ }
288
+ )
289
+ }
260
290
  )
261
- )
291
+ }
262
292
  );
263
293
  };
264
294
  const ThresholdTestDemo = () => {
@@ -269,44 +299,51 @@ const ThresholdTestDemo = () => {
269
299
  `${(/* @__PURE__ */ new Date()).toLocaleTimeString()}: ${event}`
270
300
  ]);
271
301
  };
272
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
273
- "div",
274
- {
275
- "data-testid": "threshold-events",
276
- style: {
277
- marginBottom: "10px",
278
- padding: "10px",
279
- backgroundColor: "#f0f8ff",
280
- minHeight: "80px"
281
- }
282
- },
283
- /* @__PURE__ */ React.createElement("strong", null, "Threshold Events:"),
284
- thresholdEvents.map((event, index) => /* @__PURE__ */ React.createElement("div", { key: index, style: { fontSize: "12px", color: "#666" } }, event))
285
- ), /* @__PURE__ */ React.createElement(
286
- import_ScrollView.default,
287
- {
288
- scrollY: true,
289
- style: { height: "150px", width: "100%" },
290
- upperThreshold: 20,
291
- lowerThreshold: 20,
292
- onScrollToUpper: () => addEvent("Reached upper threshold (20px)"),
293
- onScrollToLower: () => addEvent("Reached lower threshold (20px)")
294
- },
295
- Array.from({ length: 20 }, (_, index) => /* @__PURE__ */ React.createElement(
302
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
303
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
296
304
  "div",
297
305
  {
298
- key: index,
306
+ "data-testid": "threshold-events",
299
307
  style: {
300
- padding: "12px",
301
- borderBottom: "1px solid #eee",
302
- backgroundColor: index === 0 || index === 19 ? "#fff3cd" : "white"
303
- }
304
- },
305
- index === 0 && "First Item (Top Threshold Test)",
306
- index === 19 && "Last Item (Bottom Threshold Test)",
307
- index !== 0 && index !== 19 && `Item ${index + 1}`
308
- ))
309
- ));
308
+ marginBottom: "10px",
309
+ padding: "10px",
310
+ backgroundColor: "#f0f8ff",
311
+ minHeight: "80px"
312
+ },
313
+ children: [
314
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "Threshold Events:" }),
315
+ thresholdEvents.map((event, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontSize: "12px", color: "#666" }, children: event }, index))
316
+ ]
317
+ }
318
+ ),
319
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
320
+ import_ScrollView.default,
321
+ {
322
+ scrollY: true,
323
+ style: { height: "150px", width: "100%" },
324
+ upperThreshold: 20,
325
+ lowerThreshold: 20,
326
+ onScrollToUpper: () => addEvent("Reached upper threshold (20px)"),
327
+ onScrollToLower: () => addEvent("Reached lower threshold (20px)"),
328
+ children: Array.from({ length: 20 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
329
+ "div",
330
+ {
331
+ style: {
332
+ padding: "12px",
333
+ borderBottom: "1px solid #eee",
334
+ backgroundColor: index === 0 || index === 19 ? "#fff3cd" : "white"
335
+ },
336
+ children: [
337
+ index === 0 && "First Item (Top Threshold Test)",
338
+ index === 19 && "Last Item (Bottom Threshold Test)",
339
+ index !== 0 && index !== 19 && `Item ${index + 1}`
340
+ ]
341
+ },
342
+ index
343
+ ))
344
+ }
345
+ )
346
+ ] });
310
347
  };
311
348
  // Annotate the CommonJS export names for ESM import in node:
312
349
  0 && (module.exports = {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { SelectProps } from './Select.types';
3
3
  import './index.less';
4
- declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Select;
@@ -79,6 +79,7 @@ __export(Select_exports, {
79
79
  default: () => Select_default
80
80
  });
81
81
  module.exports = __toCommonJS(Select_exports);
82
+ var import_jsx_runtime = require("react/jsx-runtime");
82
83
  var import_icons = require("@bifrostui/icons");
83
84
  var import_utils = require("@bifrostui/utils");
84
85
  var import_clsx = __toESM(require("clsx"));
@@ -205,100 +206,108 @@ const Select = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
205
206
  };
206
207
  }
207
208
  }, []);
208
- const defaultIcon = isOpen ? /* @__PURE__ */ import_react.default.createElement(import_icons.CaretUpIcon, { className: `${prefixCls}-selector-icon`, color: "neutral" }) : /* @__PURE__ */ import_react.default.createElement(import_icons.CaretDownIcon, { className: `${prefixCls}-selector-icon`, color: "neutral" });
209
+ const defaultIcon = isOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CaretUpIcon, { className: `${prefixCls}-selector-icon`, color: "neutral" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CaretDownIcon, { className: `${prefixCls}-selector-icon`, color: "neutral" });
209
210
  const renderOptions = () => {
210
211
  var _a2;
211
- return /* @__PURE__ */ import_react.default.createElement(
212
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
212
213
  import_Fade.default,
213
214
  {
214
215
  in: isOpen,
215
216
  timeout: {
216
217
  enter: 167,
217
218
  exit: 167
218
- }
219
- },
220
- /* @__PURE__ */ import_react.default.createElement(
221
- "div",
222
- {
223
- className: (0, import_clsx.default)(
224
- `${prefixCls}-option-container`,
225
- ...((_a2 = className == null ? void 0 : className.split(/\s+/)) == null ? void 0 : _a2.map((cls) => `${cls}-option-container`)) || [],
226
- `${prefixCls}-option-container-${placement}`,
227
- {
228
- [`${prefixCls}-option-container-hide`]: !isOpen
229
- }
230
- ),
231
- ref: optionContainerRef,
232
- style: optionStyle
233
219
  },
234
- /* @__PURE__ */ import_react.default.createElement(
235
- import_Slide.default,
220
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
221
+ "div",
236
222
  {
237
- in: isOpen,
238
- direction: placement === "bottom" ? "down" : "up",
239
- timeout: {
240
- enter: 167,
241
- exit: 167
242
- }
243
- },
244
- /* @__PURE__ */ import_react.default.createElement(
245
- "div",
246
- {
247
- className: (0, import_clsx.default)(`${prefixCls}-option-main`),
248
- ref: optionMainRef,
249
- role: "listbox",
250
- "aria-label": "option list"
251
- },
252
- children
253
- )
223
+ className: (0, import_clsx.default)(
224
+ `${prefixCls}-option-container`,
225
+ ...((_a2 = className == null ? void 0 : className.split(/\s+/)) == null ? void 0 : _a2.map((cls) => `${cls}-option-container`)) || [],
226
+ `${prefixCls}-option-container-${placement}`,
227
+ {
228
+ [`${prefixCls}-option-container-hide`]: !isOpen
229
+ }
230
+ ),
231
+ ref: optionContainerRef,
232
+ style: optionStyle,
233
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
234
+ import_Slide.default,
235
+ {
236
+ in: isOpen,
237
+ direction: placement === "bottom" ? "down" : "up",
238
+ timeout: {
239
+ enter: 167,
240
+ exit: 167
241
+ },
242
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
243
+ "div",
244
+ {
245
+ className: (0, import_clsx.default)(`${prefixCls}-option-main`),
246
+ ref: optionMainRef,
247
+ role: "listbox",
248
+ "aria-label": "option list",
249
+ children
250
+ }
251
+ )
252
+ }
253
+ )
254
+ }
254
255
  )
255
- )
256
+ }
256
257
  );
257
258
  };
258
- return /* @__PURE__ */ import_react.default.createElement(import_selectContext.default.Provider, { value: selectContext }, /* @__PURE__ */ import_react.default.createElement(
259
- "div",
260
- __spreadProps(__spreadValues({
261
- className: (0, import_clsx.default)(prefixCls, className, {
262
- [`${prefixCls}-disabled`]: disabled,
263
- [`${prefixCls}-active`]: isOpen
264
- }),
265
- ref: rootRef,
266
- role: "combobox",
267
- "aria-expanded": isOpen,
268
- "aria-haspopup": "listbox",
269
- "aria-label": others["aria-label"] || "Select",
270
- tabIndex: disabled ? -1 : 0
271
- }, others), {
272
- onClick: handleSelectClick
273
- }),
274
- /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-selector-container` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-selector` }, renderValue || placeholder), /* @__PURE__ */ import_react.default.createElement(
275
- "input",
259
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_selectContext.default.Provider, { value: selectContext, children: [
260
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
261
+ "div",
276
262
  __spreadProps(__spreadValues({
277
- name,
278
- readOnly: true,
279
- ref: inputRef,
280
- value: selectValue,
281
- "aria-hidden": "true",
282
- tabIndex: -1
283
- }, inputProps), {
284
- className: (0, import_clsx.default)(`${prefixCls}-input`, {
285
- [inputProps == null ? void 0 : inputProps.className]: inputProps == null ? void 0 : inputProps.className
286
- })
263
+ className: (0, import_clsx.default)(prefixCls, className, {
264
+ [`${prefixCls}-disabled`]: disabled,
265
+ [`${prefixCls}-active`]: isOpen
266
+ }),
267
+ ref: rootRef,
268
+ role: "combobox",
269
+ "aria-expanded": isOpen,
270
+ "aria-haspopup": "listbox",
271
+ "aria-label": others["aria-label"] || "Select",
272
+ tabIndex: disabled ? -1 : 0
273
+ }, others), {
274
+ onClick: handleSelectClick,
275
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-selector-container`, children: [
276
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-selector`, children: renderValue || placeholder }),
277
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
278
+ "input",
279
+ __spreadProps(__spreadValues({
280
+ name,
281
+ readOnly: true,
282
+ ref: inputRef,
283
+ value: selectValue,
284
+ "aria-hidden": "true",
285
+ tabIndex: -1
286
+ }, inputProps), {
287
+ className: (0, import_clsx.default)(`${prefixCls}-input`, {
288
+ [inputProps == null ? void 0 : inputProps.className]: inputProps == null ? void 0 : inputProps.className
289
+ })
290
+ })
291
+ ),
292
+ icon || defaultIcon
293
+ ] })
287
294
  })
288
- ), icon || defaultIcon)
289
- ), /* @__PURE__ */ import_react.default.createElement(import_Portal.default, { onMounted: updateOptionStyle }, renderOptions()), /* @__PURE__ */ import_react.default.createElement(
290
- import_Backdrop.default,
291
- __spreadProps(__spreadValues({
292
- open: isOpen,
293
- invisible: true,
294
- onTouchStart: handleBackdropClick,
295
- onClick: handleBackdropClick
296
- }, BackdropProps), {
297
- className: (0, import_clsx.default)(`${prefixCls}-backdrop`, {
298
- [BackdropProps == null ? void 0 : BackdropProps.className]: BackdropProps == null ? void 0 : BackdropProps.className
295
+ ),
296
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Portal.default, { onMounted: updateOptionStyle, children: renderOptions() }),
297
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
298
+ import_Backdrop.default,
299
+ __spreadProps(__spreadValues({
300
+ open: isOpen,
301
+ invisible: true,
302
+ onTouchStart: handleBackdropClick,
303
+ onClick: handleBackdropClick
304
+ }, BackdropProps), {
305
+ className: (0, import_clsx.default)(`${prefixCls}-backdrop`, {
306
+ [BackdropProps == null ? void 0 : BackdropProps.className]: BackdropProps == null ? void 0 : BackdropProps.className
307
+ })
299
308
  })
300
- })
301
- ));
309
+ )
310
+ ] });
302
311
  });
303
312
  Select.displayName = "BuiSelect";
304
313
  var Select_default = Select;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { SelectOptionProps } from './Select.types';
3
3
  import './index.less';
4
- declare const SelectOption: React.ForwardRefExoticComponent<Omit<SelectOptionProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const SelectOption: React.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default SelectOption;