@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
package/es/Tabs/Tabs.js CHANGED
@@ -29,6 +29,7 @@ var __objRest = (source, exclude) => {
29
29
  }
30
30
  return target;
31
31
  };
32
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
32
33
  import React, { useEffect, useMemo, useRef, useState } from "react";
33
34
  import clsx from "clsx";
34
35
  import { useValue, useEventCallback } from "@bifrostui/utils";
@@ -114,7 +115,7 @@ const Tabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
114
115
  );
115
116
  const renderedTabs = useMemo(() => {
116
117
  if (tabs.length > 0) {
117
- return tabs.map((item) => /* @__PURE__ */ React.createElement(Tab, { key: item.index, index: item == null ? void 0 : item.index, disabled: item == null ? void 0 : item.disabled }, item.title));
118
+ return tabs.map((item) => /* @__PURE__ */ jsx(Tab, { index: item == null ? void 0 : item.index, disabled: item == null ? void 0 : item.disabled, children: item.title }, item.index));
118
119
  }
119
120
  return children;
120
121
  }, [tabs, children]);
@@ -137,24 +138,32 @@ const Tabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
137
138
  resizeObserver.disconnect();
138
139
  };
139
140
  }, [registrationVersion]);
140
- return /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues({ className: clsx(tabsRootClass, className) }, others), { ref }), isScrollable && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TabMask, { position: "left" }), /* @__PURE__ */ React.createElement(TabMask, { position: "right" })), /* @__PURE__ */ React.createElement(
141
- "div",
142
- {
143
- className: tabsScrollClass,
144
- ref: tabsRef,
145
- role: "tablist",
146
- "aria-orientation": "horizontal"
147
- },
148
- /* @__PURE__ */ React.createElement(
149
- TabIndicator,
141
+ return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ className: clsx(tabsRootClass, className) }, others), { ref, children: [
142
+ isScrollable && /* @__PURE__ */ jsxs(Fragment, { children: [
143
+ /* @__PURE__ */ jsx(TabMask, { position: "left" }),
144
+ /* @__PURE__ */ jsx(TabMask, { position: "right" })
145
+ ] }),
146
+ /* @__PURE__ */ jsxs(
147
+ "div",
150
148
  {
151
- currentValue,
152
- registeredTabs,
153
- tabsContainerRef: tabsRef
149
+ className: tabsScrollClass,
150
+ ref: tabsRef,
151
+ role: "tablist",
152
+ "aria-orientation": "horizontal",
153
+ children: [
154
+ /* @__PURE__ */ jsx(
155
+ TabIndicator,
156
+ {
157
+ currentValue,
158
+ registeredTabs,
159
+ tabsContainerRef: tabsRef
160
+ }
161
+ ),
162
+ /* @__PURE__ */ jsx(TabsContextProvider, { value: contextValue, children: renderedTabs })
163
+ ]
154
164
  }
155
- ),
156
- /* @__PURE__ */ React.createElement(TabsContextProvider, { value: contextValue }, renderedTabs)
157
- ));
165
+ )
166
+ ] }));
158
167
  });
159
168
  Tabs.displayName = "BuiTabs";
160
169
  var Tabs_default = Tabs;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { TabProps } from '../Tab.types';
3
3
  import '../Tab.less';
4
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TabProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>>;
4
+ declare const _default: React.NamedExoticComponent<Omit<TabProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import React, { useEffect, useRef } from "react";
2
3
  import clsx from "clsx";
3
4
  import { useContextSelector, useForkRef } from "@bifrostui/utils";
@@ -51,7 +52,7 @@ const Tab = /* @__PURE__ */ React.forwardRef((props, ref) => {
51
52
  className
52
53
  );
53
54
  const tabId = tabsContainerId ? `${tabsContainerId}-tab-${index}` : void 0;
54
- return /* @__PURE__ */ React.createElement(
55
+ return /* @__PURE__ */ jsx(
55
56
  "div",
56
57
  {
57
58
  id: tabId,
@@ -63,9 +64,9 @@ const Tab = /* @__PURE__ */ React.forwardRef((props, ref) => {
63
64
  return;
64
65
  triggerChange == null ? void 0 : triggerChange(e, { index });
65
66
  onClick == null ? void 0 : onClick(e, { index });
66
- }
67
- },
68
- children
67
+ },
68
+ children
69
+ }
69
70
  );
70
71
  });
71
72
  Tab.displayName = "BuiTab";
@@ -18,7 +18,8 @@ var __async = (__this, __arguments, generator) => {
18
18
  step((generator = generator.apply(__this, __arguments)).next());
19
19
  });
20
20
  };
21
- import React, { useEffect, useRef } from "react";
21
+ import { jsx } from "react/jsx-runtime";
22
+ import { useEffect, useRef } from "react";
22
23
  import clsx from "clsx";
23
24
  import Taro from "@tarojs/taro";
24
25
  import { useEventCallback } from "@bifrostui/utils";
@@ -251,7 +252,7 @@ const TabIndicator = ({
251
252
  }
252
253
  };
253
254
  }, []);
254
- return /* @__PURE__ */ React.createElement(
255
+ return /* @__PURE__ */ jsx(
255
256
  "div",
256
257
  {
257
258
  ref: indicatorRef,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { TabsProps } from '../Tabs.types';
3
3
  import '../Tabs.less';
4
- declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Tabs;
@@ -18,6 +18,7 @@ var __async = (__this, __arguments, generator) => {
18
18
  step((generator = generator.apply(__this, __arguments)).next());
19
19
  });
20
20
  };
21
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
21
22
  import React, { useMemo, useState } from "react";
22
23
  import clsx from "clsx";
23
24
  import Taro from "@tarojs/taro";
@@ -192,34 +193,43 @@ const Tabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
192
193
  );
193
194
  const renderedTabs = useMemo(() => {
194
195
  if (tabs.length > 0) {
195
- return tabs.map((item) => /* @__PURE__ */ React.createElement(Tab, { key: item.index, index: item == null ? void 0 : item.index, disabled: item == null ? void 0 : item.disabled }, item.title));
196
+ return tabs.map((item) => /* @__PURE__ */ jsx(Tab, { index: item == null ? void 0 : item.index, disabled: item == null ? void 0 : item.disabled, children: item.title }, item.index));
196
197
  }
197
198
  return children;
198
199
  }, [tabs, children]);
199
- return /* @__PURE__ */ React.createElement("div", { className: clsx(tabsRootClass, className), style, ref }, isScrollable && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TabMask, { position: "left" }), /* @__PURE__ */ React.createElement(TabMask, { position: "right" })), /* @__PURE__ */ React.createElement(
200
- ScrollView,
201
- {
202
- id: scrollViewId,
203
- className: tabsScrollClass,
204
- scrollX: true,
205
- scrollWithAnimation,
206
- scrollLeft,
207
- onScroll: handleScroll,
208
- enhanced: true,
209
- showScrollbar: false,
210
- enablePassive: true
211
- },
212
- /* @__PURE__ */ React.createElement("div", { id: wrapperId, className: tabsScrollWrapperClass }, /* @__PURE__ */ React.createElement(
213
- TabIndicator,
200
+ return /* @__PURE__ */ jsxs("div", { className: clsx(tabsRootClass, className), style, ref, children: [
201
+ isScrollable && /* @__PURE__ */ jsxs(Fragment, { children: [
202
+ /* @__PURE__ */ jsx(TabMask, { position: "left" }),
203
+ /* @__PURE__ */ jsx(TabMask, { position: "right" })
204
+ ] }),
205
+ /* @__PURE__ */ jsx(
206
+ ScrollView,
214
207
  {
215
- currentValue,
216
- registeredTabValues,
217
- wrapperId,
218
- scrollViewId,
219
- registrationVersion
208
+ id: scrollViewId,
209
+ className: tabsScrollClass,
210
+ scrollX: true,
211
+ scrollWithAnimation,
212
+ scrollLeft,
213
+ onScroll: handleScroll,
214
+ enhanced: true,
215
+ showScrollbar: false,
216
+ enablePassive: true,
217
+ children: /* @__PURE__ */ jsxs("div", { id: wrapperId, className: tabsScrollWrapperClass, children: [
218
+ /* @__PURE__ */ jsx(
219
+ TabIndicator,
220
+ {
221
+ currentValue,
222
+ registeredTabValues,
223
+ wrapperId,
224
+ scrollViewId,
225
+ registrationVersion
226
+ }
227
+ ),
228
+ /* @__PURE__ */ jsx(TabsContextProvider, { value: contextValue, children: renderedTabs })
229
+ ] })
220
230
  }
221
- ), /* @__PURE__ */ React.createElement(TabsContextProvider, { value: contextValue }, renderedTabs))
222
- ));
231
+ )
232
+ ] });
223
233
  });
224
234
  Tabs.displayName = "BuiTabs";
225
235
  var Tabs_default = Tabs;
package/es/Tag/Tag.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { TagProps } from './Tag.types';
3
3
  import './Tag.less';
4
- declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Tag;
package/es/Tag/Tag.js CHANGED
@@ -1,4 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
14
16
  }
15
17
  return a;
16
18
  };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
17
20
  var __objRest = (source, exclude) => {
18
21
  var target = {};
19
22
  for (var prop in source)
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
26
29
  }
27
30
  return target;
28
31
  };
32
+ import { jsx } from "react/jsx-runtime";
29
33
  import { convertHexToRGBA } from "@bifrostui/utils";
30
34
  import clsx from "clsx";
31
35
  import * as React from "react";
@@ -79,9 +83,9 @@ const Tag = /* @__PURE__ */ React.forwardRef((props, ref) => {
79
83
  };
80
84
  }
81
85
  }
82
- return /* @__PURE__ */ React.createElement(
86
+ return /* @__PURE__ */ jsx(
83
87
  "div",
84
- __spreadValues({
88
+ __spreadProps(__spreadValues({
85
89
  className: clsx(
86
90
  prefixCls,
87
91
  {
@@ -93,8 +97,9 @@ const Tag = /* @__PURE__ */ React.forwardRef((props, ref) => {
93
97
  ref,
94
98
  style: __spreadValues(__spreadValues({}, style), customStyles),
95
99
  onClick
96
- }, others),
97
- children
100
+ }, others), {
101
+ children
102
+ })
98
103
  );
99
104
  });
100
105
  Tag.displayName = "BuiTag";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { TagGroupProps } from './TagGroup.types';
3
3
  import './TagGroup.less';
4
- declare const TagGroup: React.ForwardRefExoticComponent<Omit<TagGroupProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const TagGroup: React.ForwardRefExoticComponent<Omit<TagGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default TagGroup;
@@ -1,4 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
14
16
  }
15
17
  return a;
16
18
  };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
17
20
  var __objRest = (source, exclude) => {
18
21
  var target = {};
19
22
  for (var prop in source)
@@ -26,6 +29,7 @@ var __objRest = (source, exclude) => {
26
29
  }
27
30
  return target;
28
31
  };
32
+ import { jsx } from "react/jsx-runtime";
29
33
  import clsx from "clsx";
30
34
  import * as React from "react";
31
35
  import "./TagGroup.css";
@@ -33,14 +37,15 @@ const prefixCls = "bui-tag-group";
33
37
  const TagGroup = /* @__PURE__ */ React.forwardRef(
34
38
  (props, ref) => {
35
39
  const _a = props, { className, onClick, children } = _a, others = __objRest(_a, ["className", "onClick", "children"]);
36
- return /* @__PURE__ */ React.createElement(
40
+ return /* @__PURE__ */ jsx(
37
41
  "div",
38
- __spreadValues({
42
+ __spreadProps(__spreadValues({
39
43
  ref,
40
44
  onClick,
41
45
  className: clsx(prefixCls, className)
42
- }, others),
43
- children
46
+ }, others), {
47
+ children
48
+ })
44
49
  );
45
50
  }
46
51
  );
@@ -1,21 +1,20 @@
1
- import React from 'react';
2
1
  /**
3
2
  * 自定义 Tag 组件 Demo 集合
4
3
  * 这个文件包含多个测试 demo,展示如何使用 getCustomDemoCodesFromFile 进行无障碍测试
5
4
  * 文件名必须是 A11yDemos.tsx(固定约定)
6
5
  */
7
- export declare const basicTagDemo: () => React.JSX.Element;
8
- export declare const variantTagDemo: () => React.JSX.Element;
9
- export declare const ClickableTagDemo: () => React.JSX.Element;
10
- export declare const customColorTagDemo: () => React.JSX.Element;
11
- export declare const ariaLabelTagDemo: () => React.JSX.Element;
12
- export declare const complexTagListDemo: () => React.JSX.Element;
6
+ export declare const basicTagDemo: () => import("react/jsx-runtime").JSX.Element;
7
+ export declare const variantTagDemo: () => import("react/jsx-runtime").JSX.Element;
8
+ export declare const ClickableTagDemo: () => import("react/jsx-runtime").JSX.Element;
9
+ export declare const customColorTagDemo: () => import("react/jsx-runtime").JSX.Element;
10
+ export declare const ariaLabelTagDemo: () => import("react/jsx-runtime").JSX.Element;
11
+ export declare const complexTagListDemo: () => import("react/jsx-runtime").JSX.Element;
13
12
  declare const _default: {
14
- basicTagDemo: () => React.JSX.Element;
15
- variantTagDemo: () => React.JSX.Element;
16
- ClickableTagDemo: () => React.JSX.Element;
17
- customColorTagDemo: () => React.JSX.Element;
18
- ariaLabelTagDemo: () => React.JSX.Element;
19
- complexTagListDemo: () => React.JSX.Element;
13
+ basicTagDemo: () => import("react/jsx-runtime").JSX.Element;
14
+ variantTagDemo: () => import("react/jsx-runtime").JSX.Element;
15
+ ClickableTagDemo: () => import("react/jsx-runtime").JSX.Element;
16
+ customColorTagDemo: () => import("react/jsx-runtime").JSX.Element;
17
+ ariaLabelTagDemo: () => import("react/jsx-runtime").JSX.Element;
18
+ complexTagListDemo: () => import("react/jsx-runtime").JSX.Element;
20
19
  };
21
20
  export default _default;
@@ -17,13 +17,25 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import React, { useState } from "react";
20
+ import { jsx, jsxs } from "react/jsx-runtime";
21
+ import { useState } from "react";
21
22
  import Tag from "../../Tag";
22
23
  const basicTagDemo = () => {
23
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Tag, { color: "primary" }, "\u4E3B\u8981\u6807\u7B7E"), /* @__PURE__ */ React.createElement(Tag, { color: "success" }, "\u6210\u529F\u6807\u7B7E"), /* @__PURE__ */ React.createElement(Tag, { color: "warning" }, "\u8B66\u544A\u6807\u7B7E"), /* @__PURE__ */ React.createElement(Tag, { color: "danger" }, "\u5371\u9669\u6807\u7B7E"), /* @__PURE__ */ React.createElement(Tag, { color: "info" }, "\u4FE1\u606F\u6807\u7B7E"), /* @__PURE__ */ React.createElement(Tag, { color: "neutral" }, "\u4E2D\u6027\u6807\u7B7E"));
24
+ return /* @__PURE__ */ jsxs("div", { children: [
25
+ /* @__PURE__ */ jsx(Tag, { color: "primary", children: "\u4E3B\u8981\u6807\u7B7E" }),
26
+ /* @__PURE__ */ jsx(Tag, { color: "success", children: "\u6210\u529F\u6807\u7B7E" }),
27
+ /* @__PURE__ */ jsx(Tag, { color: "warning", children: "\u8B66\u544A\u6807\u7B7E" }),
28
+ /* @__PURE__ */ jsx(Tag, { color: "danger", children: "\u5371\u9669\u6807\u7B7E" }),
29
+ /* @__PURE__ */ jsx(Tag, { color: "info", children: "\u4FE1\u606F\u6807\u7B7E" }),
30
+ /* @__PURE__ */ jsx(Tag, { color: "neutral", children: "\u4E2D\u6027\u6807\u7B7E" })
31
+ ] });
24
32
  };
25
33
  const variantTagDemo = () => {
26
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Tag, { variant: "contained", color: "primary" }, "\u586B\u5145\u6807\u7B7E"), /* @__PURE__ */ React.createElement(Tag, { variant: "outlined", color: "success" }, "\u8FB9\u6846\u6807\u7B7E"), /* @__PURE__ */ React.createElement(Tag, { variant: "subtle", color: "warning" }, "\u8F7B\u91CF\u6807\u7B7E"));
34
+ return /* @__PURE__ */ jsxs("div", { children: [
35
+ /* @__PURE__ */ jsx(Tag, { variant: "contained", color: "primary", children: "\u586B\u5145\u6807\u7B7E" }),
36
+ /* @__PURE__ */ jsx(Tag, { variant: "outlined", color: "success", children: "\u8FB9\u6846\u6807\u7B7E" }),
37
+ /* @__PURE__ */ jsx(Tag, { variant: "subtle", color: "warning", children: "\u8F7B\u91CF\u6807\u7B7E" })
38
+ ] });
27
39
  };
28
40
  const ClickableTagDemo = () => {
29
41
  const [clicked, setClicked] = useState([]);
@@ -33,66 +45,83 @@ const ClickableTagDemo = () => {
33
45
  );
34
46
  console.log(`\u70B9\u51FB\u4E86\u6807\u7B7E: ${tag}`);
35
47
  };
36
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
37
- Tag,
38
- {
39
- color: "primary",
40
- onClick: () => handleTagClick("tag1"),
41
- style: {
42
- opacity: clicked.includes("tag1") ? 0.6 : 1,
43
- margin: "4px"
48
+ return /* @__PURE__ */ jsxs("div", { children: [
49
+ /* @__PURE__ */ jsx(
50
+ Tag,
51
+ {
52
+ color: "primary",
53
+ onClick: () => handleTagClick("tag1"),
54
+ style: {
55
+ opacity: clicked.includes("tag1") ? 0.6 : 1,
56
+ margin: "4px"
57
+ },
58
+ children: "\u53EF\u70B9\u51FB\u6807\u7B7E 1"
44
59
  }
45
- },
46
- "\u53EF\u70B9\u51FB\u6807\u7B7E 1"
47
- ), /* @__PURE__ */ React.createElement(
48
- Tag,
49
- {
50
- color: "success",
51
- onClick: () => handleTagClick("tag2"),
52
- style: {
53
- opacity: clicked.includes("tag2") ? 0.6 : 1,
54
- margin: "4px"
60
+ ),
61
+ /* @__PURE__ */ jsx(
62
+ Tag,
63
+ {
64
+ color: "success",
65
+ onClick: () => handleTagClick("tag2"),
66
+ style: {
67
+ opacity: clicked.includes("tag2") ? 0.6 : 1,
68
+ margin: "4px"
69
+ },
70
+ children: "\u53EF\u70B9\u51FB\u6807\u7B7E 2"
55
71
  }
56
- },
57
- "\u53EF\u70B9\u51FB\u6807\u7B7E 2"
58
- ), /* @__PURE__ */ React.createElement(
59
- Tag,
60
- {
61
- color: "warning",
62
- onClick: () => handleTagClick("tag3"),
63
- style: {
64
- opacity: clicked.includes("tag3") ? 0.6 : 1,
65
- margin: "4px"
72
+ ),
73
+ /* @__PURE__ */ jsx(
74
+ Tag,
75
+ {
76
+ color: "warning",
77
+ onClick: () => handleTagClick("tag3"),
78
+ style: {
79
+ opacity: clicked.includes("tag3") ? 0.6 : 1,
80
+ margin: "4px"
81
+ },
82
+ children: "\u53EF\u70B9\u51FB\u6807\u7B7E 3"
66
83
  }
67
- },
68
- "\u53EF\u70B9\u51FB\u6807\u7B7E 3"
69
- ), clicked.length > 0 && /* @__PURE__ */ React.createElement("p", null, "\u5DF2\u70B9\u51FB\u7684\u6807\u7B7E: ", clicked.join(", ")));
84
+ ),
85
+ clicked.length > 0 && /* @__PURE__ */ jsxs("p", { children: [
86
+ "\u5DF2\u70B9\u51FB\u7684\u6807\u7B7E: ",
87
+ clicked.join(", ")
88
+ ] })
89
+ ] });
70
90
  };
71
91
  const customColorTagDemo = () => {
72
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(Tag, { htmlColor: "#ff6b6b", variant: "contained" }, "\u81EA\u5B9A\u4E49\u7EA2\u8272"), /* @__PURE__ */ React.createElement(Tag, { htmlColor: "#4ecdc4", variant: "outlined" }, "\u81EA\u5B9A\u4E49\u9752\u8272"), /* @__PURE__ */ React.createElement(Tag, { htmlColor: "#45b7d1", variant: "subtle" }, "\u81EA\u5B9A\u4E49\u84DD\u8272"), /* @__PURE__ */ React.createElement(Tag, { htmlColor: "rgb(255, 193, 7)", variant: "contained" }, "RGB \u9EC4\u8272"));
92
+ return /* @__PURE__ */ jsxs("div", { children: [
93
+ /* @__PURE__ */ jsx(Tag, { htmlColor: "#ff6b6b", variant: "contained", children: "\u81EA\u5B9A\u4E49\u7EA2\u8272" }),
94
+ /* @__PURE__ */ jsx(Tag, { htmlColor: "#4ecdc4", variant: "outlined", children: "\u81EA\u5B9A\u4E49\u9752\u8272" }),
95
+ /* @__PURE__ */ jsx(Tag, { htmlColor: "#45b7d1", variant: "subtle", children: "\u81EA\u5B9A\u4E49\u84DD\u8272" }),
96
+ /* @__PURE__ */ jsx(Tag, { htmlColor: "rgb(255, 193, 7)", variant: "contained", children: "RGB \u9EC4\u8272" })
97
+ ] });
73
98
  };
74
99
  const ariaLabelTagDemo = () => {
75
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
76
- Tag,
77
- {
78
- color: "primary",
79
- onClick: () => {
80
- console.log("\u5220\u9664\u7528\u6237");
81
- },
82
- "aria-label": "\u5220\u9664\u7528\u6237\u6807\u7B7E"
83
- },
84
- "\u7528\u6237"
85
- ), /* @__PURE__ */ React.createElement(
86
- Tag,
87
- {
88
- color: "success",
89
- onClick: () => {
90
- console.log("\u7F16\u8F91\u9879\u76EE");
91
- },
92
- "aria-label": "\u7F16\u8F91\u9879\u76EE\u6807\u7B7E"
93
- },
94
- "\u9879\u76EE"
95
- ), /* @__PURE__ */ React.createElement(Tag, { color: "info", "aria-label": "\u53EA\u8BFB\u7684\u8BBE\u7F6E\u4FE1\u606F" }, "\u8BBE\u7F6E"));
100
+ return /* @__PURE__ */ jsxs("div", { children: [
101
+ /* @__PURE__ */ jsx(
102
+ Tag,
103
+ {
104
+ color: "primary",
105
+ onClick: () => {
106
+ console.log("\u5220\u9664\u7528\u6237");
107
+ },
108
+ "aria-label": "\u5220\u9664\u7528\u6237\u6807\u7B7E",
109
+ children: "\u7528\u6237"
110
+ }
111
+ ),
112
+ /* @__PURE__ */ jsx(
113
+ Tag,
114
+ {
115
+ color: "success",
116
+ onClick: () => {
117
+ console.log("\u7F16\u8F91\u9879\u76EE");
118
+ },
119
+ "aria-label": "\u7F16\u8F91\u9879\u76EE\u6807\u7B7E",
120
+ children: "\u9879\u76EE"
121
+ }
122
+ ),
123
+ /* @__PURE__ */ jsx(Tag, { color: "info", "aria-label": "\u53EA\u8BFB\u7684\u8BBE\u7F6E\u4FE1\u606F", children: "\u8BBE\u7F6E" })
124
+ ] });
96
125
  };
97
126
  const ComplexTagListDemo = () => {
98
127
  const [tags, setTags] = useState([
@@ -110,36 +139,45 @@ const ComplexTagListDemo = () => {
110
139
  );
111
140
  };
112
141
  const activeTags = tags.filter((tag) => tag.active);
113
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h4", null, "\u6280\u672F\u6807\u7B7E\u9009\u62E9\u5668"), /* @__PURE__ */ React.createElement("div", { style: { marginBottom: "10px" } }, tags.map((tag) => /* @__PURE__ */ React.createElement(
114
- Tag,
115
- {
116
- key: tag.id,
117
- color: tag.color,
118
- variant: tag.active ? "contained" : "outlined",
119
- onClick: () => toggleTag(tag.id),
120
- "aria-label": `${tag.active ? "\u53D6\u6D88\u9009\u62E9" : "\u9009\u62E9"} ${tag.name} \u6280\u672F\u6807\u7B7E`,
121
- style: {
122
- margin: "2px",
123
- cursor: "pointer",
124
- opacity: tag.active ? 1 : 0.7
125
- }
126
- },
127
- tag.name
128
- ))), /* @__PURE__ */ React.createElement("p", null, "\u5DF2\u9009\u62E9\u7684\u6280\u672F:", " ", activeTags.length > 0 ? activeTags.map((tag) => tag.name).join(", ") : "\u65E0"), /* @__PURE__ */ React.createElement(
129
- "button",
130
- {
131
- type: "button",
132
- onClick: () => {
133
- setTags(
134
- (prevTags) => prevTags.map((tag) => __spreadProps(__spreadValues({}, tag), { active: false }))
135
- );
142
+ return /* @__PURE__ */ jsxs("div", { children: [
143
+ /* @__PURE__ */ jsx("h4", { children: "\u6280\u672F\u6807\u7B7E\u9009\u62E9\u5668" }),
144
+ /* @__PURE__ */ jsx("div", { style: { marginBottom: "10px" }, children: tags.map((tag) => /* @__PURE__ */ jsx(
145
+ Tag,
146
+ {
147
+ color: tag.color,
148
+ variant: tag.active ? "contained" : "outlined",
149
+ onClick: () => toggleTag(tag.id),
150
+ "aria-label": `${tag.active ? "\u53D6\u6D88\u9009\u62E9" : "\u9009\u62E9"} ${tag.name} \u6280\u672F\u6807\u7B7E`,
151
+ style: {
152
+ margin: "2px",
153
+ cursor: "pointer",
154
+ opacity: tag.active ? 1 : 0.7
155
+ },
156
+ children: tag.name
157
+ },
158
+ tag.id
159
+ )) }),
160
+ /* @__PURE__ */ jsxs("p", { children: [
161
+ "\u5DF2\u9009\u62E9\u7684\u6280\u672F:",
162
+ " ",
163
+ activeTags.length > 0 ? activeTags.map((tag) => tag.name).join(", ") : "\u65E0"
164
+ ] }),
165
+ /* @__PURE__ */ jsx(
166
+ "button",
167
+ {
168
+ type: "button",
169
+ onClick: () => {
170
+ setTags(
171
+ (prevTags) => prevTags.map((tag) => __spreadProps(__spreadValues({}, tag), { active: false }))
172
+ );
173
+ },
174
+ children: "\u6E05\u9664\u6240\u6709\u9009\u62E9"
136
175
  }
137
- },
138
- "\u6E05\u9664\u6240\u6709\u9009\u62E9"
139
- ));
176
+ )
177
+ ] });
140
178
  };
141
179
  const complexTagListDemo = () => {
142
- return /* @__PURE__ */ React.createElement(ComplexTagListDemo, null);
180
+ return /* @__PURE__ */ jsx(ComplexTagListDemo, {});
143
181
  };
144
182
  var A11yDemos_default = {
145
183
  basicTagDemo,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { TextAreaProps } from './TextArea.types';
3
3
  import './index.less';
4
- declare const TextArea: React.ForwardRefExoticComponent<Omit<TextAreaProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const TextArea: React.ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default TextArea;