@bifrostui/react 1.5.0 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/dist/ActionSheet/ActionSheet.css +16 -6
  2. package/dist/ActionSheet/ActionSheetItem.css +11 -17
  3. package/dist/ActionSheet/ActionSheetItem.js +3 -8
  4. package/dist/ActionSheet/ActionSheetItem.types.d.ts +2 -2
  5. package/dist/ActionSheet/index.css +89 -0
  6. package/dist/Alert/Alert.types.d.ts +3 -3
  7. package/dist/Alert/index.css +18 -14
  8. package/dist/Avatar/Avatar.css +16 -12
  9. package/dist/Avatar/Avatar.js +3 -8
  10. package/dist/Avatar/AvatarGroup.css +19 -15
  11. package/dist/Avatar/AvatarGroup.js +2 -6
  12. package/dist/Avatar/index.css +93 -0
  13. package/dist/Backdrop/Backdrop.d.ts +1 -1
  14. package/dist/Backdrop/Backdrop.js +1 -1
  15. package/dist/Backdrop/{Backdrop.css → index.css} +6 -2
  16. package/dist/Badge/Badge.d.ts +1 -1
  17. package/dist/Badge/Badge.js +4 -9
  18. package/dist/Badge/Badge.types.d.ts +1 -1
  19. package/dist/Badge/{Badge.css → index.css} +47 -27
  20. package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
  21. package/dist/Breadcrumb/Breadcrumb.js +1 -1
  22. package/dist/Breadcrumb/index.css +38 -0
  23. package/dist/Button/Button.d.ts +1 -1
  24. package/dist/Button/Button.js +6 -11
  25. package/dist/Button/Button.types.d.ts +8 -7
  26. package/{es/Button/Button.css → dist/Button/index.css} +93 -63
  27. package/dist/Calendar/Calendar.d.ts +1 -1
  28. package/dist/Calendar/Calendar.js +10 -22
  29. package/dist/Calendar/Calendar.types.d.ts +0 -5
  30. package/dist/Calendar/{Calendar.css → index.css} +35 -31
  31. package/dist/Card/Card.css +9 -0
  32. package/dist/Card/CardContent.css +1 -2
  33. package/dist/Card/CardFooter.css +2 -4
  34. package/dist/Card/CardHeader.css +5 -5
  35. package/dist/Card/CardHeader.js +2 -2
  36. package/dist/Card/index.css +77 -0
  37. package/dist/Checkbox/Checkbox.d.ts +1 -1
  38. package/dist/Checkbox/Checkbox.js +4 -8
  39. package/dist/Checkbox/CheckboxGroup.d.ts +1 -1
  40. package/dist/Checkbox/CheckboxGroup.js +5 -8
  41. package/dist/Checkbox/{Checkbox.css → index.css} +14 -10
  42. package/dist/CitySelector/CitySelector.miniapp.d.ts +0 -1
  43. package/dist/CitySelector/CitySelector.miniapp.js +0 -1
  44. package/dist/CitySelector/CitySelectorCore.d.ts +1 -1
  45. package/dist/CitySelector/CitySelectorCore.js +1 -1
  46. package/dist/CitySelector/Selector/index.css +4 -4
  47. package/{es/CitySelector/CitySelector.css → dist/CitySelector/index.css} +31 -27
  48. package/dist/Collapse/Collapse.d.ts +2 -2
  49. package/dist/Collapse/Collapse.js +9 -12
  50. package/{es/Collapse/Collapse.css → dist/Collapse/index.css} +1 -0
  51. package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
  52. package/dist/CollapsePanel/CollapsePanel.js +1 -1
  53. package/dist/CollapsePanel/CollapsePanelItem.js +45 -46
  54. package/dist/CollapsePanel/{CollapsePanel.css → index.css} +12 -10
  55. package/dist/Countdown/Countdown.d.ts +1 -1
  56. package/dist/Countdown/Countdown.js +6 -13
  57. package/{es/Countdown/Countdown.css → dist/Countdown/index.css} +12 -8
  58. package/dist/Dialog/Dialog.types.d.ts +0 -5
  59. package/dist/Dialog/FunctionalDialog.js +2 -13
  60. package/dist/Dialog/index.css +26 -23
  61. package/dist/Divider/Divider.d.ts +1 -1
  62. package/dist/Divider/Divider.js +9 -6
  63. package/dist/Divider/{Divider.css → index.css} +14 -10
  64. package/dist/Drawer/Drawer.d.ts +1 -1
  65. package/dist/Drawer/Drawer.js +5 -11
  66. package/{es/Drawer/Drawer.css → dist/Drawer/index.css} +2 -0
  67. package/dist/Fade/Fade.js +52 -56
  68. package/dist/IconButton/IconButton.d.ts +1 -1
  69. package/dist/IconButton/IconButton.js +7 -14
  70. package/dist/IconButton/IconButton.types.d.ts +4 -3
  71. package/{es/IconButton/IconButton.css → dist/IconButton/index.css} +79 -29
  72. package/dist/Image/Image.js +112 -119
  73. package/dist/Image/index.css +6 -2
  74. package/dist/Input/Input.d.ts +1 -1
  75. package/dist/Input/Input.js +6 -12
  76. package/{es/Input/Input.css → dist/Input/index.css} +22 -16
  77. package/dist/ItemSelector/ItemSelector.miniapp.d.ts +0 -1
  78. package/dist/ItemSelector/ItemSelector.miniapp.js +0 -1
  79. package/dist/ItemSelector/ItemSelectorCore.d.ts +1 -1
  80. package/dist/ItemSelector/ItemSelectorCore.js +1 -1
  81. package/dist/List/List.css +7 -3
  82. package/dist/List/List.js +3 -8
  83. package/dist/List/ListItem.css +3 -3
  84. package/dist/List/ListItem.js +42 -44
  85. package/dist/List/ListItemContent.js +1 -4
  86. package/dist/List/ListItemExtra.js +9 -4
  87. package/dist/List/ListItemFooter.js +9 -4
  88. package/dist/List/ListItemHeader.js +9 -4
  89. package/dist/List/index.css +80 -0
  90. package/dist/Loading/Loading.d.ts +1 -1
  91. package/dist/Loading/Loading.js +14 -5
  92. package/{es/Loading/Loading.css → dist/Loading/index.css} +10 -6
  93. package/dist/Modal/Modal.d.ts +1 -1
  94. package/dist/Modal/Modal.js +1 -7
  95. package/dist/Modal/Modal.miniapp.d.ts +2 -2
  96. package/dist/Modal/Modal.miniapp.js +5 -11
  97. package/dist/NavBar/NavBar.d.ts +1 -1
  98. package/dist/NavBar/NavBar.js +1 -2
  99. package/dist/NavBar/index.css +65 -0
  100. package/dist/Picker/Picker.css +21 -21
  101. package/dist/Picker/Picker.js +6 -28
  102. package/dist/Picker/Picker.types.d.ts +4 -17
  103. package/dist/Picker/PickerPanel.css +8 -12
  104. package/dist/Picker/PickerPanel.js +39 -29
  105. package/dist/Picker/index.css +116 -0
  106. package/dist/Popover/Popover.d.ts +1 -1
  107. package/dist/Popover/Popover.js +28 -71
  108. package/{es/Popover/Popover.css → dist/Popover/index.css} +32 -28
  109. package/dist/Portal/Portal.miniapp.js +4 -7
  110. package/dist/Progress/Progress.d.ts +1 -1
  111. package/dist/Progress/Progress.js +1 -1
  112. package/dist/Progress/index.css +28 -0
  113. package/dist/Radio/Radio.d.ts +1 -1
  114. package/dist/Radio/Radio.js +3 -7
  115. package/dist/Radio/RadioButtonIcon.js +6 -1
  116. package/dist/Radio/RadioGroup.d.ts +1 -1
  117. package/dist/Radio/RadioGroup.js +1 -4
  118. package/dist/Radio/{Radio.css → index.css} +10 -7
  119. package/dist/Rating/Rating.d.ts +1 -1
  120. package/dist/Rating/Rating.js +9 -19
  121. package/{es/Rating/Rating.css → dist/Rating/index.css} +20 -7
  122. package/dist/ScrollView/ScrollView.d.ts +1 -1
  123. package/dist/ScrollView/ScrollView.js +12 -25
  124. package/dist/ScrollView/ScrollView.types.d.ts +1 -0
  125. package/dist/Select/Select.d.ts +1 -1
  126. package/dist/Select/Select.js +43 -76
  127. package/dist/Select/SelectOption.d.ts +1 -1
  128. package/dist/Select/SelectOption.js +1 -1
  129. package/dist/Select/{Select.css → index.css} +30 -20
  130. package/dist/Skeleton/Skeleton.d.ts +1 -1
  131. package/dist/Skeleton/Skeleton.js +6 -10
  132. package/dist/Skeleton/{Skeleton.css → index.css} +7 -3
  133. package/dist/Slide/Slide.js +69 -74
  134. package/dist/Slider/Slider.d.ts +1 -1
  135. package/dist/Slider/Slider.js +13 -29
  136. package/dist/Slider/index.css +111 -0
  137. package/dist/Stack/Stack.d.ts +1 -1
  138. package/dist/Stack/Stack.js +1 -1
  139. package/dist/Steps/Step.css +14 -14
  140. package/dist/Steps/Step.js +81 -82
  141. package/dist/Steps/Steps.css +18 -14
  142. package/dist/Steps/Steps.d.ts +1 -1
  143. package/dist/Steps/Steps.js +57 -60
  144. package/dist/Steps/index.css +199 -0
  145. package/dist/Swiper/Swiper.d.ts +1 -1
  146. package/dist/Swiper/Swiper.js +1 -1
  147. package/{es/Swiper/Swiper.css → dist/Swiper/index.css} +6 -2
  148. package/dist/Switch/Switch.d.ts +1 -1
  149. package/dist/Switch/Switch.js +76 -79
  150. package/dist/Switch/Switch.types.d.ts +1 -1
  151. package/{es/Switch/Switch.css → dist/Switch/index.css} +46 -35
  152. package/dist/TabBar/TabBar.css +12 -8
  153. package/dist/TabBar/TabBar.js +3 -8
  154. package/dist/TabBar/TabBarContext.d.ts +3 -3
  155. package/dist/TabBar/TabBarItem.css +6 -0
  156. package/dist/TabBar/TabBarItem.js +3 -3
  157. package/dist/TabBar/index.css +59 -0
  158. package/dist/TabBar/index.types.d.ts +3 -3
  159. package/dist/Tabs/Tab.css +10 -16
  160. package/dist/Tabs/Tab.js +2 -3
  161. package/dist/Tabs/Tabs.css +32 -21
  162. package/dist/Tabs/Tabs.js +39 -70
  163. package/dist/Tabs/Tabs.types.d.ts +0 -10
  164. package/dist/Tabs/index.css +135 -0
  165. package/dist/Tabs/utils/bound.d.ts +1 -0
  166. package/dist/{DesktopPicker/utils/calcAfterMounted.js → Tabs/utils/bound.js} +14 -7
  167. package/dist/Tag/Tag.css +49 -23
  168. package/dist/Tag/Tag.js +3 -7
  169. package/dist/Tag/Tag.types.d.ts +4 -4
  170. package/dist/Tag/TagGroup.css +15 -11
  171. package/dist/Tag/TagGroup.d.ts +2 -2
  172. package/dist/Tag/TagGroup.js +16 -14
  173. package/dist/Tag/index.css +182 -0
  174. package/dist/TextArea/TextArea.d.ts +1 -1
  175. package/dist/TextArea/TextArea.js +6 -13
  176. package/dist/TextArea/index.css +57 -0
  177. package/dist/ThemeProvider/ThemeProvider.js +1 -4
  178. package/dist/ThemeProvider/ThemeProvider.types.d.ts +5 -10
  179. package/dist/ThemeProvider/utils/constants.d.ts +1 -1
  180. package/dist/ThemeProvider/utils/constants.js +4 -1
  181. package/dist/ThemeProvider/utils/mountTokens.d.ts +4 -4
  182. package/dist/Toast/FunctionalToast.js +2 -13
  183. package/dist/Toast/Toast.d.ts +1 -1
  184. package/dist/Toast/Toast.js +5 -5
  185. package/dist/Toast/Toast.types.d.ts +0 -5
  186. package/dist/Toast/index.css +58 -0
  187. package/dist/Tooltip/Tooltip.d.ts +1 -1
  188. package/dist/Tooltip/Tooltip.js +28 -71
  189. package/dist/Tooltip/index.css +95 -0
  190. package/dist/Transition/TransitionCore.js +3 -8
  191. package/dist/index.d.ts +0 -6
  192. package/dist/index.js +1 -13
  193. package/dist/locales/base.d.ts +0 -11
  194. package/dist/locales/en-US.js +0 -24
  195. package/dist/locales/zh-CN.js +0 -24
  196. package/dist/locales/zh-TW.js +0 -24
  197. package/es/ActionSheet/ActionSheet.css +16 -6
  198. package/es/ActionSheet/ActionSheetItem.css +11 -17
  199. package/es/ActionSheet/ActionSheetItem.js +3 -8
  200. package/es/ActionSheet/ActionSheetItem.types.d.ts +2 -2
  201. package/es/ActionSheet/index.css +89 -0
  202. package/es/Alert/Alert.types.d.ts +3 -3
  203. package/es/Alert/index.css +18 -14
  204. package/es/Avatar/Avatar.css +16 -12
  205. package/es/Avatar/Avatar.js +3 -8
  206. package/es/Avatar/AvatarGroup.css +19 -15
  207. package/es/Avatar/AvatarGroup.js +2 -6
  208. package/es/Avatar/index.css +93 -0
  209. package/es/Backdrop/Backdrop.d.ts +1 -1
  210. package/es/Backdrop/Backdrop.js +1 -1
  211. package/es/Backdrop/{Backdrop.css → index.css} +6 -2
  212. package/es/Badge/Badge.d.ts +1 -1
  213. package/es/Badge/Badge.js +4 -9
  214. package/es/Badge/Badge.types.d.ts +1 -1
  215. package/es/Badge/{Badge.css → index.css} +47 -27
  216. package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
  217. package/es/Breadcrumb/Breadcrumb.js +1 -1
  218. package/es/Breadcrumb/index.css +38 -0
  219. package/es/Button/Button.d.ts +1 -1
  220. package/es/Button/Button.js +6 -11
  221. package/es/Button/Button.types.d.ts +8 -7
  222. package/{dist/Button/Button.css → es/Button/index.css} +93 -63
  223. package/es/Calendar/Calendar.d.ts +1 -1
  224. package/es/Calendar/Calendar.js +10 -22
  225. package/es/Calendar/Calendar.types.d.ts +0 -5
  226. package/es/Calendar/{Calendar.css → index.css} +35 -31
  227. package/es/Card/Card.css +9 -0
  228. package/es/Card/CardContent.css +1 -2
  229. package/es/Card/CardFooter.css +2 -4
  230. package/es/Card/CardHeader.css +5 -5
  231. package/es/Card/CardHeader.js +2 -2
  232. package/es/Card/index.css +77 -0
  233. package/es/Checkbox/Checkbox.d.ts +1 -1
  234. package/es/Checkbox/Checkbox.js +4 -8
  235. package/es/Checkbox/CheckboxGroup.d.ts +1 -1
  236. package/es/Checkbox/CheckboxGroup.js +5 -8
  237. package/es/Checkbox/{Checkbox.css → index.css} +14 -10
  238. package/es/CitySelector/CitySelector.miniapp.d.ts +0 -1
  239. package/es/CitySelector/CitySelector.miniapp.js +0 -1
  240. package/es/CitySelector/CitySelectorCore.d.ts +1 -1
  241. package/es/CitySelector/CitySelectorCore.js +1 -1
  242. package/es/CitySelector/Selector/index.css +4 -4
  243. package/{dist/CitySelector/CitySelector.css → es/CitySelector/index.css} +31 -27
  244. package/es/Collapse/Collapse.d.ts +2 -2
  245. package/es/Collapse/Collapse.js +9 -12
  246. package/{dist/Collapse/Collapse.css → es/Collapse/index.css} +1 -0
  247. package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
  248. package/es/CollapsePanel/CollapsePanel.js +1 -1
  249. package/es/CollapsePanel/CollapsePanelItem.js +45 -46
  250. package/es/CollapsePanel/{CollapsePanel.css → index.css} +12 -10
  251. package/es/Countdown/Countdown.d.ts +1 -1
  252. package/es/Countdown/Countdown.js +6 -13
  253. package/{dist/Countdown/Countdown.css → es/Countdown/index.css} +12 -8
  254. package/es/Dialog/Dialog.types.d.ts +0 -5
  255. package/es/Dialog/FunctionalDialog.js +3 -14
  256. package/es/Dialog/index.css +26 -23
  257. package/es/Divider/Divider.d.ts +1 -1
  258. package/es/Divider/Divider.js +9 -6
  259. package/es/Divider/{Divider.css → index.css} +14 -10
  260. package/es/Drawer/Drawer.d.ts +1 -1
  261. package/es/Drawer/Drawer.js +5 -11
  262. package/{dist/Drawer/Drawer.css → es/Drawer/index.css} +2 -0
  263. package/es/Fade/Fade.js +52 -56
  264. package/es/IconButton/IconButton.d.ts +1 -1
  265. package/es/IconButton/IconButton.js +7 -14
  266. package/es/IconButton/IconButton.types.d.ts +4 -3
  267. package/{dist/IconButton/IconButton.css → es/IconButton/index.css} +79 -29
  268. package/es/Image/Image.js +112 -119
  269. package/es/Image/index.css +6 -2
  270. package/es/Input/Input.d.ts +1 -1
  271. package/es/Input/Input.js +6 -12
  272. package/{dist/Input/Input.css → es/Input/index.css} +22 -16
  273. package/es/ItemSelector/ItemSelector.miniapp.d.ts +0 -1
  274. package/es/ItemSelector/ItemSelector.miniapp.js +0 -1
  275. package/es/ItemSelector/ItemSelectorCore.d.ts +1 -1
  276. package/es/ItemSelector/ItemSelectorCore.js +1 -1
  277. package/es/List/List.css +7 -3
  278. package/es/List/List.js +3 -8
  279. package/es/List/ListItem.css +3 -3
  280. package/es/List/ListItem.js +42 -44
  281. package/es/List/ListItemContent.js +1 -4
  282. package/es/List/ListItemExtra.js +9 -4
  283. package/es/List/ListItemFooter.js +9 -4
  284. package/es/List/ListItemHeader.js +9 -4
  285. package/es/List/index.css +80 -0
  286. package/es/Loading/Loading.d.ts +1 -1
  287. package/es/Loading/Loading.js +14 -5
  288. package/{dist/Loading/Loading.css → es/Loading/index.css} +10 -6
  289. package/es/Modal/Modal.d.ts +1 -1
  290. package/es/Modal/Modal.js +1 -7
  291. package/es/Modal/Modal.miniapp.d.ts +2 -2
  292. package/es/Modal/Modal.miniapp.js +5 -11
  293. package/es/NavBar/NavBar.d.ts +1 -1
  294. package/es/NavBar/NavBar.js +1 -2
  295. package/es/NavBar/index.css +65 -0
  296. package/es/Picker/Picker.css +21 -21
  297. package/es/Picker/Picker.js +6 -28
  298. package/es/Picker/Picker.types.d.ts +4 -17
  299. package/es/Picker/PickerPanel.css +8 -12
  300. package/es/Picker/PickerPanel.js +52 -31
  301. package/es/Picker/index.css +116 -0
  302. package/es/Popover/Popover.d.ts +1 -1
  303. package/es/Popover/Popover.js +30 -74
  304. package/{dist/Popover/Popover.css → es/Popover/index.css} +32 -28
  305. package/es/Portal/Portal.miniapp.js +5 -8
  306. package/es/Progress/Progress.d.ts +1 -1
  307. package/es/Progress/Progress.js +1 -1
  308. package/es/Progress/index.css +28 -0
  309. package/es/Radio/Radio.d.ts +1 -1
  310. package/es/Radio/Radio.js +3 -7
  311. package/es/Radio/RadioButtonIcon.js +6 -1
  312. package/es/Radio/RadioGroup.d.ts +1 -1
  313. package/es/Radio/RadioGroup.js +1 -4
  314. package/es/Radio/{Radio.css → index.css} +10 -7
  315. package/es/Rating/Rating.d.ts +1 -1
  316. package/es/Rating/Rating.js +9 -19
  317. package/{dist/Rating/Rating.css → es/Rating/index.css} +20 -7
  318. package/es/ScrollView/ScrollView.d.ts +1 -1
  319. package/es/ScrollView/ScrollView.js +12 -25
  320. package/es/ScrollView/ScrollView.types.d.ts +1 -0
  321. package/es/Select/Select.d.ts +1 -1
  322. package/es/Select/Select.js +44 -76
  323. package/es/Select/SelectOption.d.ts +1 -1
  324. package/es/Select/SelectOption.js +1 -1
  325. package/es/Select/{Select.css → index.css} +30 -20
  326. package/es/Skeleton/Skeleton.d.ts +1 -1
  327. package/es/Skeleton/Skeleton.js +6 -10
  328. package/es/Skeleton/{Skeleton.css → index.css} +7 -3
  329. package/es/Slide/Slide.js +69 -74
  330. package/es/Slider/Slider.d.ts +1 -1
  331. package/es/Slider/Slider.js +14 -32
  332. package/es/Slider/index.css +111 -0
  333. package/es/Stack/Stack.d.ts +1 -1
  334. package/es/Stack/Stack.js +1 -1
  335. package/es/Steps/Step.css +14 -14
  336. package/es/Steps/Step.js +81 -82
  337. package/es/Steps/Steps.css +18 -14
  338. package/es/Steps/Steps.d.ts +1 -1
  339. package/es/Steps/Steps.js +57 -60
  340. package/es/Steps/index.css +199 -0
  341. package/es/Swiper/Swiper.d.ts +1 -1
  342. package/es/Swiper/Swiper.js +1 -1
  343. package/{dist/Swiper/Swiper.css → es/Swiper/index.css} +6 -2
  344. package/es/Switch/Switch.d.ts +1 -1
  345. package/es/Switch/Switch.js +76 -79
  346. package/es/Switch/Switch.types.d.ts +1 -1
  347. package/{dist/Switch/Switch.css → es/Switch/index.css} +46 -35
  348. package/es/TabBar/TabBar.css +12 -8
  349. package/es/TabBar/TabBar.js +3 -8
  350. package/es/TabBar/TabBarContext.d.ts +3 -3
  351. package/es/TabBar/TabBarItem.css +6 -0
  352. package/es/TabBar/TabBarItem.js +2 -2
  353. package/es/TabBar/index.css +59 -0
  354. package/es/TabBar/index.types.d.ts +3 -3
  355. package/es/Tabs/Tab.css +10 -16
  356. package/es/Tabs/Tab.js +2 -3
  357. package/es/Tabs/Tabs.css +32 -21
  358. package/es/Tabs/Tabs.js +41 -83
  359. package/es/Tabs/Tabs.types.d.ts +0 -10
  360. package/es/Tabs/index.css +135 -0
  361. package/es/Tabs/utils/bound.d.ts +1 -0
  362. package/es/Tabs/utils/bound.js +13 -0
  363. package/es/Tag/Tag.css +49 -23
  364. package/es/Tag/Tag.js +3 -7
  365. package/es/Tag/Tag.types.d.ts +4 -4
  366. package/es/Tag/TagGroup.css +15 -11
  367. package/es/Tag/TagGroup.d.ts +2 -2
  368. package/es/Tag/TagGroup.js +16 -14
  369. package/es/Tag/index.css +182 -0
  370. package/es/TextArea/TextArea.d.ts +1 -1
  371. package/es/TextArea/TextArea.js +6 -13
  372. package/es/TextArea/index.css +57 -0
  373. package/es/ThemeProvider/ThemeProvider.js +1 -4
  374. package/es/ThemeProvider/ThemeProvider.types.d.ts +5 -10
  375. package/es/ThemeProvider/utils/constants.d.ts +1 -1
  376. package/es/ThemeProvider/utils/constants.js +4 -1
  377. package/es/ThemeProvider/utils/mountTokens.d.ts +4 -4
  378. package/es/Toast/FunctionalToast.js +3 -14
  379. package/es/Toast/Toast.d.ts +1 -1
  380. package/es/Toast/Toast.js +5 -5
  381. package/es/Toast/Toast.types.d.ts +0 -5
  382. package/es/Toast/index.css +58 -0
  383. package/es/Tooltip/Tooltip.d.ts +1 -1
  384. package/es/Tooltip/Tooltip.js +30 -74
  385. package/es/Tooltip/index.css +95 -0
  386. package/es/Transition/TransitionCore.js +3 -8
  387. package/es/index.d.ts +0 -6
  388. package/es/index.js +0 -6
  389. package/es/locales/base.d.ts +0 -11
  390. package/es/locales/en-US.js +0 -24
  391. package/es/locales/zh-CN.js +0 -24
  392. package/es/locales/zh-TW.js +0 -24
  393. package/package.json +14 -6
  394. package/dist/Breadcrumb/Breadcrumb.css +0 -34
  395. package/dist/CitySelector/miniapp.css +0 -4
  396. package/dist/Collapse/Collapse.miniapp.d.ts +0 -5
  397. package/dist/Collapse/Collapse.miniapp.js +0 -177
  398. package/dist/DatePicker/DatePicker.d.ts +0 -4
  399. package/dist/DatePicker/DatePicker.js +0 -335
  400. package/dist/DatePicker/DatePicker.types.d.ts +0 -36
  401. package/dist/DatePicker/DatePicker.types.js +0 -15
  402. package/dist/DatePicker/constants.d.ts +0 -9
  403. package/dist/DatePicker/constants.js +0 -37
  404. package/dist/DatePicker/index.d.ts +0 -3
  405. package/dist/DatePicker/index.js +0 -44
  406. package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
  407. package/dist/DesktopDatePicker/DesktopDatePicker.js +0 -280
  408. package/dist/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -163
  409. package/dist/DesktopDatePicker/DesktopDatePicker.types.js +0 -15
  410. package/dist/DesktopDatePicker/deskTopPickerContainer.css +0 -100
  411. package/dist/DesktopDatePicker/index.css +0 -61
  412. package/dist/DesktopDatePicker/index.d.ts +0 -2
  413. package/dist/DesktopDatePicker/index.js +0 -41
  414. package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +0 -6
  415. package/dist/DesktopDatePicker/useGetDatePickerContent.js +0 -343
  416. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -5
  417. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -322
  418. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -163
  419. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -15
  420. package/dist/DesktopDateTimePicker/index.css +0 -66
  421. package/dist/DesktopDateTimePicker/index.d.ts +0 -2
  422. package/dist/DesktopDateTimePicker/index.js +0 -41
  423. package/dist/DesktopPicker/DesktopPicker.d.ts +0 -5
  424. package/dist/DesktopPicker/DesktopPicker.js +0 -243
  425. package/dist/DesktopPicker/DesktopPicker.types.d.ts +0 -61
  426. package/dist/DesktopPicker/DesktopPicker.types.js +0 -15
  427. package/dist/DesktopPicker/index.css +0 -39
  428. package/dist/DesktopPicker/index.d.ts +0 -2
  429. package/dist/DesktopPicker/index.js +0 -41
  430. package/dist/DesktopPicker/utils/calcAfterMounted.d.ts +0 -2
  431. package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +0 -2
  432. package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.js +0 -38
  433. package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +0 -5
  434. package/dist/DesktopTimePicker/DesktopTimePicker.js +0 -288
  435. package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -182
  436. package/dist/DesktopTimePicker/DesktopTimePicker.types.js +0 -15
  437. package/dist/DesktopTimePicker/DesktopTimePickerList.d.ts +0 -4
  438. package/dist/DesktopTimePicker/DesktopTimePickerList.js +0 -111
  439. package/dist/DesktopTimePicker/index.css +0 -170
  440. package/dist/DesktopTimePicker/index.d.ts +0 -2
  441. package/dist/DesktopTimePicker/index.js +0 -41
  442. package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +0 -6
  443. package/dist/DesktopTimePicker/useGetTimePickerContent.js +0 -249
  444. package/dist/DesktopTimePicker/utils/scrollUtil.d.ts +0 -2
  445. package/dist/DesktopTimePicker/utils/scrollUtil.js +0 -27
  446. package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +0 -2
  447. package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.js +0 -51
  448. package/dist/DesktopTimePicker/utils/utils.d.ts +0 -28
  449. package/dist/DesktopTimePicker/utils/utils.js +0 -408
  450. package/dist/ItemSelector/miniapp.css +0 -4
  451. package/dist/NavBar/NavBar.css +0 -61
  452. package/dist/Progress/Progress.css +0 -24
  453. package/dist/Slider/Slider.css +0 -106
  454. package/dist/SwipeAction/SwipeAction.css +0 -79
  455. package/dist/SwipeAction/SwipeAction.d.ts +0 -5
  456. package/dist/SwipeAction/SwipeAction.js +0 -349
  457. package/dist/SwipeAction/SwipeAction.types.d.ts +0 -75
  458. package/dist/SwipeAction/SwipeAction.types.js +0 -15
  459. package/dist/SwipeAction/SwipeActionContext.d.ts +0 -4
  460. package/dist/SwipeAction/SwipeActionContext.js +0 -30
  461. package/dist/SwipeAction/SwipeActionItem.css +0 -31
  462. package/dist/SwipeAction/SwipeActionItem.d.ts +0 -5
  463. package/dist/SwipeAction/SwipeActionItem.js +0 -105
  464. package/dist/SwipeAction/constants.d.ts +0 -9
  465. package/dist/SwipeAction/constants.js +0 -39
  466. package/dist/SwipeAction/index.d.ts +0 -5
  467. package/dist/SwipeAction/index.js +0 -50
  468. package/dist/Tabs/utils/scroll.d.ts +0 -2
  469. package/dist/Tabs/utils/scroll.js +0 -55
  470. package/dist/TextArea/TextArea.css +0 -53
  471. package/dist/Toast/Toast.css +0 -53
  472. package/dist/Tooltip/Tooltip.css +0 -91
  473. package/es/Breadcrumb/Breadcrumb.css +0 -34
  474. package/es/CitySelector/miniapp.css +0 -4
  475. package/es/Collapse/Collapse.miniapp.d.ts +0 -5
  476. package/es/Collapse/Collapse.miniapp.js +0 -157
  477. package/es/DatePicker/DatePicker.d.ts +0 -4
  478. package/es/DatePicker/DatePicker.js +0 -308
  479. package/es/DatePicker/DatePicker.types.d.ts +0 -36
  480. package/es/DatePicker/DatePicker.types.js +0 -1
  481. package/es/DatePicker/constants.d.ts +0 -9
  482. package/es/DatePicker/constants.js +0 -14
  483. package/es/DatePicker/index.d.ts +0 -3
  484. package/es/DatePicker/index.js +0 -8
  485. package/es/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
  486. package/es/DesktopDatePicker/DesktopDatePicker.js +0 -253
  487. package/es/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -163
  488. package/es/DesktopDatePicker/DesktopDatePicker.types.js +0 -1
  489. package/es/DesktopDatePicker/deskTopPickerContainer.css +0 -100
  490. package/es/DesktopDatePicker/index.css +0 -61
  491. package/es/DesktopDatePicker/index.d.ts +0 -2
  492. package/es/DesktopDatePicker/index.js +0 -6
  493. package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +0 -6
  494. package/es/DesktopDatePicker/useGetDatePickerContent.js +0 -316
  495. package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -5
  496. package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -295
  497. package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -163
  498. package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -1
  499. package/es/DesktopDateTimePicker/index.css +0 -66
  500. package/es/DesktopDateTimePicker/index.d.ts +0 -2
  501. package/es/DesktopDateTimePicker/index.js +0 -9
  502. package/es/DesktopPicker/DesktopPicker.d.ts +0 -5
  503. package/es/DesktopPicker/DesktopPicker.js +0 -226
  504. package/es/DesktopPicker/DesktopPicker.types.d.ts +0 -61
  505. package/es/DesktopPicker/DesktopPicker.types.js +0 -1
  506. package/es/DesktopPicker/index.css +0 -39
  507. package/es/DesktopPicker/index.d.ts +0 -2
  508. package/es/DesktopPicker/index.js +0 -6
  509. package/es/DesktopPicker/utils/calcAfterMounted.d.ts +0 -2
  510. package/es/DesktopPicker/utils/calcAfterMounted.js +0 -6
  511. package/es/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +0 -2
  512. package/es/DesktopPicker/utils/calcAfterMounted.miniapp.js +0 -9
  513. package/es/DesktopTimePicker/DesktopTimePicker.d.ts +0 -5
  514. package/es/DesktopTimePicker/DesktopTimePicker.js +0 -261
  515. package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -182
  516. package/es/DesktopTimePicker/DesktopTimePicker.types.js +0 -1
  517. package/es/DesktopTimePicker/DesktopTimePickerList.d.ts +0 -4
  518. package/es/DesktopTimePicker/DesktopTimePickerList.js +0 -84
  519. package/es/DesktopTimePicker/index.css +0 -170
  520. package/es/DesktopTimePicker/index.d.ts +0 -2
  521. package/es/DesktopTimePicker/index.js +0 -6
  522. package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +0 -6
  523. package/es/DesktopTimePicker/useGetTimePickerContent.js +0 -226
  524. package/es/DesktopTimePicker/utils/scrollUtil.d.ts +0 -2
  525. package/es/DesktopTimePicker/utils/scrollUtil.js +0 -8
  526. package/es/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +0 -2
  527. package/es/DesktopTimePicker/utils/scrollUtil.miniapp.js +0 -22
  528. package/es/DesktopTimePicker/utils/utils.d.ts +0 -28
  529. package/es/DesktopTimePicker/utils/utils.js +0 -365
  530. package/es/ItemSelector/miniapp.css +0 -4
  531. package/es/NavBar/NavBar.css +0 -61
  532. package/es/Progress/Progress.css +0 -24
  533. package/es/Slider/Slider.css +0 -106
  534. package/es/SwipeAction/SwipeAction.css +0 -79
  535. package/es/SwipeAction/SwipeAction.d.ts +0 -5
  536. package/es/SwipeAction/SwipeAction.js +0 -334
  537. package/es/SwipeAction/SwipeAction.types.d.ts +0 -75
  538. package/es/SwipeAction/SwipeAction.types.js +0 -1
  539. package/es/SwipeAction/SwipeActionContext.d.ts +0 -4
  540. package/es/SwipeAction/SwipeActionContext.js +0 -11
  541. package/es/SwipeAction/SwipeActionItem.css +0 -31
  542. package/es/SwipeAction/SwipeActionItem.d.ts +0 -5
  543. package/es/SwipeAction/SwipeActionItem.js +0 -78
  544. package/es/SwipeAction/constants.d.ts +0 -9
  545. package/es/SwipeAction/constants.js +0 -15
  546. package/es/SwipeAction/index.d.ts +0 -5
  547. package/es/SwipeAction/index.js +0 -12
  548. package/es/Tabs/utils/scroll.d.ts +0 -2
  549. package/es/Tabs/utils/scroll.js +0 -36
  550. package/es/TextArea/TextArea.css +0 -53
  551. package/es/Toast/Toast.css +0 -53
  552. package/es/Tooltip/Tooltip.css +0 -91
  553. /package/dist/ItemSelector/{ItemSelector.css → index.css} +0 -0
  554. /package/dist/Modal/{Modal.css → index.css} +0 -0
  555. /package/dist/ScrollView/{ScrollView.css → index.css} +0 -0
  556. /package/dist/Stack/{Stack.css → index.css} +0 -0
  557. /package/es/ItemSelector/{ItemSelector.css → index.css} +0 -0
  558. /package/es/Modal/{Modal.css → index.css} +0 -0
  559. /package/es/ScrollView/{ScrollView.css → index.css} +0 -0
  560. /package/es/Stack/{Stack.css → index.css} +0 -0
package/es/Fade/Fade.js CHANGED
@@ -46,64 +46,60 @@ const defaultTimeout = {
46
46
  enter: duration.enteringScreen,
47
47
  exit: duration.leavingScreen
48
48
  };
49
- const Fade = /* @__PURE__ */ React.forwardRef((props, ref) => {
50
- const _a = props, {
51
- appear,
52
- children,
53
- in: inProp,
54
- easing: easingProp,
55
- style,
56
- timeout,
57
- delay
58
- } = _a, others = __objRest(_a, [
59
- "appear",
60
- "children",
61
- "in",
62
- "easing",
63
- "style",
64
- "timeout",
65
- "delay"
66
- ]);
67
- const transitions = createTransitions();
68
- const nodeRef = useForkRef(ref, children == null ? void 0 : children.ref);
69
- return /* @__PURE__ */ React.createElement(
70
- Transition,
71
- __spreadProps(__spreadValues({
72
- appear,
49
+ const Fade = /* @__PURE__ */ React.forwardRef(
50
+ (_a, ref) => {
51
+ var _b = _a, {
52
+ appear = true,
53
+ children,
73
54
  in: inProp,
74
- timeout,
75
- delay
76
- }, others), {
77
- ref: nodeRef
78
- }),
79
- (state, childProps) => {
80
- const transition = transitions.create(
81
- "opacity",
82
- getTransitionProps(
83
- { timeout, style, easing: easingProp, delay },
84
- {
85
- mode: state
86
- }
87
- )
88
- );
89
- return React.cloneElement(children, __spreadValues({
90
- style: __spreadValues(__spreadValues({
91
- visibility: state === "exited" ? "hidden" : "visible",
92
- transition,
93
- WebkitTransition: transition,
94
- opacity: state === "entering" || state === "entered" ? "1" : "0"
95
- }, style), children.props.style)
96
- }, childProps));
97
- }
98
- );
99
- });
55
+ easing: easingProp = defaultEasing,
56
+ style,
57
+ timeout = defaultTimeout,
58
+ delay = 0
59
+ } = _b, others = __objRest(_b, [
60
+ "appear",
61
+ "children",
62
+ "in",
63
+ "easing",
64
+ "style",
65
+ "timeout",
66
+ "delay"
67
+ ]);
68
+ const transitions = createTransitions();
69
+ const nodeRef = useForkRef(ref, children == null ? void 0 : children.ref);
70
+ return /* @__PURE__ */ React.createElement(
71
+ Transition,
72
+ __spreadProps(__spreadValues({
73
+ appear,
74
+ in: inProp,
75
+ timeout,
76
+ delay
77
+ }, others), {
78
+ ref: nodeRef
79
+ }),
80
+ (state, childProps) => {
81
+ const transition = transitions.create(
82
+ "opacity",
83
+ getTransitionProps(
84
+ { timeout, style, easing: easingProp, delay },
85
+ {
86
+ mode: state
87
+ }
88
+ )
89
+ );
90
+ return React.cloneElement(children, __spreadValues({
91
+ style: __spreadValues(__spreadValues({
92
+ visibility: state === "exited" ? "hidden" : "visible",
93
+ transition,
94
+ WebkitTransition: transition,
95
+ opacity: state === "entering" || state === "entered" ? "1" : "0"
96
+ }, style), children.props.style)
97
+ }, childProps));
98
+ }
99
+ );
100
+ }
101
+ );
100
102
  Fade.displayName = "BuiFade";
101
- Fade.defaultProps = {
102
- easing: defaultEasing,
103
- timeout: defaultTimeout,
104
- appear: true,
105
- delay: 0
106
- };
107
103
  var Fade_default = Fade;
108
104
  export {
109
105
  Fade_default as default
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { IconButtonProps } from './IconButton.types';
3
- import './IconButton.less';
3
+ import './index.less';
4
4
  declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps<"button", {}>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
5
  export default IconButton;
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
29
29
  import { isMini } from "@bifrostui/utils";
30
30
  import clsx from "clsx";
31
31
  import React from "react";
32
- import "./IconButton.css";
32
+ import "./index.css";
33
33
  const prefixCls = "bui-icon-btn";
34
34
  const IconButton = /* @__PURE__ */ React.forwardRef(
35
35
  (props, ref) => {
@@ -37,11 +37,11 @@ const IconButton = /* @__PURE__ */ React.forwardRef(
37
37
  const _a = props, {
38
38
  className,
39
39
  children,
40
- color,
41
- disabled,
42
- size,
43
- variant,
44
- shape
40
+ color = "neutral",
41
+ disabled = false,
42
+ size = "medium",
43
+ variant = "default",
44
+ shape = "circular"
45
45
  } = _a, others = __objRest(_a, [
46
46
  "className",
47
47
  "children",
@@ -72,19 +72,12 @@ const IconButton = /* @__PURE__ */ React.forwardRef(
72
72
  isMini && React.isValidElement(children) ? React.cloneElement(children, __spreadValues(__spreadValues({}, !isContainedVariant && {
73
73
  color: ((_b = children.props) == null ? void 0 : _b.color) || color
74
74
  }), isContainedVariant && {
75
- htmlColor: ((_c = children.props) == null ? void 0 : _c.htmlColor) || "#fff"
75
+ htmlColor: ((_c = children.props) == null ? void 0 : _c.htmlColor) || "var(--bui-color-white)"
76
76
  })) : children
77
77
  );
78
78
  }
79
79
  );
80
80
  IconButton.displayName = "BuiIconButton";
81
- IconButton.defaultProps = {
82
- size: "medium",
83
- variant: "default",
84
- shape: "circular",
85
- color: "default",
86
- disabled: false
87
- };
88
81
  var IconButton_default = IconButton;
89
82
  export {
90
83
  IconButton_default as default
@@ -10,16 +10,17 @@ export type IconButtonProps<D extends React.ElementType = 'button', P = {}> = Ov
10
10
  */
11
11
  size?: 'small' | 'medium' | 'large';
12
12
  /** 按钮颜色
13
- * @default 'default'
13
+ * @default 'neutral'
14
14
  */
15
- color?: ThemeColor | 'default';
15
+ color?: ThemeColor;
16
16
  /**
17
17
  * - default: 图标按钮
18
18
  * - contained: 实心填充按钮
19
19
  * - outlined: 描边按钮
20
+ * - subtle: 柔和按钮
20
21
  * @default 'default'
21
22
  */
22
- variant?: 'default' | 'contained' | 'outlined';
23
+ variant?: 'default' | 'contained' | 'outlined' | 'subtle';
23
24
  /**
24
25
  * - circular: 圆形
25
26
  * - square: 正方形
@@ -1,10 +1,20 @@
1
+ :root,
2
+ page,
3
+ xhs-page {
4
+ --bui-icon-btn-contained-bg-color: var(--bui-color-neutral-5);
5
+ --bui-icon-btn-color: var(--bui-color-fg-muted);
6
+ --bui-icon-btn-small-font-size: var(--bui-text-size-4);
7
+ --bui-icon-btn-font-size: 17px;
8
+ --bui-icon-btn-small-padding: var(--bui-spacing-xs);
9
+ --bui-icon-btn-padding: 5px;
10
+ --bui-icon-btn-large-padding: var(--bui-spacing-sm);
11
+ --bui-icon-btn-large-font-size: 23px;
12
+ --bui-icon-btn-disabled-opacity: 0.5;
13
+ --bui-icon-btn-outlined-border: 1px solid;
14
+ --bui-icon-btn-subtle-border: 1px solid transparent;
15
+ --bui-icon-btn-border: 1px solid transparent;
16
+ }
1
17
  .bui-icon-btn {
2
- --bg-color: var(--bui-icon-btn-bg-color, var(--bui-color-neutral-5));
3
- --color: var(--bui-icon-btn-color, var(--bui-color-fg-muted));
4
- --icon-size: var(--bui-icon-btn-font-size, 17px);
5
- --user-area: var(--bui-icon-btn-padding, 5px);
6
- --large-font-size: var(--bui-icon-btn-large-font-size, 23px);
7
- --disabled-opacity: var(--bui-icon-btn-disabled-opacity, 0.5);
8
18
  position: relative;
9
19
  display: inline-flex;
10
20
  height: auto;
@@ -12,12 +22,12 @@
12
22
  align-items: center;
13
23
  justify-content: center;
14
24
  background-color: transparent;
15
- border: 1px solid transparent;
16
- color: var(--color);
25
+ border: var(--bui-icon-btn-border);
26
+ color: var(--bui-icon-btn-color);
17
27
  cursor: pointer;
18
28
  font-family: var(--bui-font-family);
19
- font-size: var(--icon-size);
20
- padding: var(--user-area);
29
+ font-size: var(--bui-icon-btn-font-size);
30
+ padding: var(--bui-icon-btn-padding);
21
31
  }
22
32
  .bui-icon-btn::before {
23
33
  position: absolute;
@@ -40,28 +50,16 @@
40
50
  border: 0;
41
51
  }
42
52
  .bui-icon-btn-small {
43
- font-size: var(--bui-text-size-4);
44
- padding: var(--bui-spacing-xs);
45
- }
46
- .bui-icon-btn-small.bui-icon-btn-outlined,
47
- .bui-icon-btn-small.bui-icon-btn-contained {
48
- padding: var(--bui-spacing-xs);
49
- }
50
- .bui-icon-btn-medium.bui-icon-btn-outlined,
51
- .bui-icon-btn-medium.bui-icon-btn-contained {
52
- padding: var(--user-area);
53
+ font-size: var(--bui-icon-btn-small-font-size);
54
+ padding: var(--bui-icon-btn-small-padding);
53
55
  }
54
56
  .bui-icon-btn-large {
55
- font-size: var(--large-font-size);
56
- padding: var(--bui-spacing-sm);
57
- }
58
- .bui-icon-btn-large.bui-icon-btn-outlined,
59
- .bui-icon-btn-large.bui-icon-btn-contained {
60
- padding: var(--bui-spacing-sm);
57
+ font-size: var(--bui-icon-btn-large-font-size);
58
+ padding: var(--bui-icon-btn-large-padding);
61
59
  }
62
60
  .bui-icon-btn-disabled {
63
61
  pointer-events: none;
64
- opacity: var(--disabled-opacity);
62
+ opacity: var(--bui-icon-btn-disabled-opacity);
65
63
  }
66
64
  .bui-icon-btn-circular {
67
65
  border-radius: 100%;
@@ -84,8 +82,14 @@
84
82
  .bui-icon-btn-default.bui-icon-btn-warning {
85
83
  color: var(--bui-color-warning);
86
84
  }
85
+ .bui-icon-btn-default.bui-icon-btn-light {
86
+ color: var(--bui-color-bg-view);
87
+ }
88
+ .bui-icon-btn-default.bui-icon-btn-dark {
89
+ color: var(--bui-color-fg-default);
90
+ }
87
91
  .bui-icon-btn-outlined {
88
- border: solid 1px;
92
+ border: var(--bui-icon-btn-outlined-border);
89
93
  }
90
94
  .bui-icon-btn-outlined.bui-icon-btn-primary {
91
95
  color: var(--bui-color-primary);
@@ -107,8 +111,16 @@
107
111
  color: var(--bui-color-danger);
108
112
  border-color: var(--bui-color-danger);
109
113
  }
114
+ .bui-icon-btn-outlined.bui-icon-btn-light {
115
+ color: var(--bui-color-bg-view);
116
+ border-color: var(--bui-color-bg-view);
117
+ }
118
+ .bui-icon-btn-outlined.bui-icon-btn-dark {
119
+ color: var(--bui-color-fg-default);
120
+ border-color: var(--bui-color-fg-default);
121
+ }
110
122
  .bui-icon-btn-contained {
111
- background-color: var(--bg-color);
123
+ background-color: var(--bui-icon-btn-contained-bg-color);
112
124
  }
113
125
  .bui-icon-btn-contained.bui-icon-btn-primary {
114
126
  color: var(--bui-color-white);
@@ -150,3 +162,41 @@
150
162
  var(--bui-color-danger-start) 0%,
151
163
  var(--bui-color-danger-end) 100%);
152
164
  }
165
+ .bui-icon-btn-contained.bui-icon-btn-light {
166
+ color: var(--bui-color-fg-default);
167
+ background: var(--bui-color-bg-view);
168
+ }
169
+ .bui-icon-btn-contained.bui-icon-btn-dark {
170
+ color: var(--bui-color-bg-view);
171
+ background: var(--bui-color-fg-default);
172
+ }
173
+ .bui-icon-btn-subtle {
174
+ background-color: var(--bui-color-gray-light);
175
+ border: var(--bui-icon-btn-subtle-border);
176
+ }
177
+ .bui-icon-btn-subtle.bui-icon-btn-warning {
178
+ color: var(--bui-color-warning);
179
+ background: var(--bui-color-warning-light);
180
+ }
181
+ .bui-icon-btn-subtle.bui-icon-btn-primary {
182
+ color: var(--bui-color-primary);
183
+ background: var(--bui-color-primary-light);
184
+ }
185
+ .bui-icon-btn-subtle.bui-icon-btn-info {
186
+ color: var(--bui-color-info);
187
+ background: var(--bui-color-info-light);
188
+ }
189
+ .bui-icon-btn-subtle.bui-icon-btn-success {
190
+ color: var(--bui-color-success);
191
+ background: var(--bui-color-success-light);
192
+ }
193
+ .bui-icon-btn-subtle.bui-icon-btn-danger {
194
+ color: var(--bui-color-danger);
195
+ background: var(--bui-color-danger-light);
196
+ }
197
+ .bui-icon-btn-subtle.bui-icon-btn-light {
198
+ color: var(--bui-color-bg-view);
199
+ }
200
+ .bui-icon-btn-subtle.bui-icon-btn-dark {
201
+ color: var(--bui-color-fg-default);
202
+ }
package/es/Image/Image.js CHANGED
@@ -34,127 +34,120 @@ import clsx from "clsx";
34
34
  import React, { useLayoutEffect, useState } from "react";
35
35
  import "./index.css";
36
36
  const prefixCls = "bui-image";
37
- const Image = /* @__PURE__ */ React.forwardRef((props, ref) => {
38
- const [loaded, setLoaded] = useState(false);
39
- const [failed, setFailed] = useState(false);
40
- const _a = props, {
41
- fit,
42
- src,
43
- lazy,
44
- style,
45
- webp,
46
- alt,
47
- showMenu,
48
- width,
49
- height,
50
- fallback,
51
- className,
52
- placeholder,
53
- onClick,
54
- onLoad,
55
- onError,
56
- imgProps
57
- } = _a, others = __objRest(_a, [
58
- "fit",
59
- "src",
60
- "lazy",
61
- "style",
62
- "webp",
63
- "alt",
64
- "showMenu",
65
- "width",
66
- "height",
67
- "fallback",
68
- "className",
69
- "placeholder",
70
- "onClick",
71
- "onLoad",
72
- "onError",
73
- "imgProps"
74
- ]);
75
- const modeEnum = {
76
- none: "center",
77
- // 被替换的内容将保持其原有的尺寸居中裁切展示
78
- contain: "aspectFit",
79
- // 被替换的内容将被缩放,以在填充元素的内容框时保持其宽高比。 整个对象在填充盒子的同时保留其长宽比,因此如果宽高比与框的宽高比不匹配
80
- cover: "aspectFill",
81
- // 被替换的内容在保持其宽高比的同时填充元素的整个内容框。如果对象的宽高比与内容框不相匹配,该对象将被剪裁以适应内容框。
82
- fill: "scaleToFill",
83
- // 被替换的内容正好填充元素的内容框。整个对象将完全填充此框。如果对象的宽高比与内容框不相匹配,那么该对象将被拉伸以适应内容框
84
- "scale-down": "aspectFit",
85
- // 内容的尺寸与 none 或 contain 中的一个相同,取决于它们两个之间谁得到的对象尺寸会更小一些。
86
- widthFix: "widthFix",
87
- // 【微信小程序】缩放模式,宽度不变,高度自动变化,保持原图宽高比不变。
88
- heightFix: "heightFix"
89
- // 【微信小程序】缩放模式,高度不变,宽度自动变化,保持原图宽高比不变。
90
- };
91
- useLayoutEffect(() => {
92
- setLoaded(false);
93
- setFailed(false);
94
- }, [src]);
95
- function defaultIconWrap(icon) {
96
- return /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-default-icon-wrap` }, icon);
97
- }
98
- const defaultIcon = defaultIconWrap(
99
- /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-default-icon-item` })
100
- );
101
- const defaultPlaceholder = placeholder === false ? [] : placeholder !== true && defaultIconWrap(placeholder) || defaultIcon;
102
- const defaultFallback = fallback && defaultIconWrap(fallback) || defaultPlaceholder;
103
- const miniAttr = {
104
- webp,
105
- lazyLoad: lazy,
106
- "lazy-load": lazy,
107
- mode: fit && modeEnum[fit],
108
- showMenuByLongpress: showMenu
109
- };
110
- const imgEle = /* @__PURE__ */ React.createElement(
111
- "img",
112
- __spreadValues(__spreadProps(__spreadValues({
113
- src,
114
- loading: lazy ? "lazy" : "eager",
115
- onLoad: (e) => {
116
- setLoaded(true);
117
- onLoad == null ? void 0 : onLoad(e);
118
- },
119
- onError: (e) => {
120
- setFailed(true);
121
- onError == null ? void 0 : onError(e);
122
- },
123
- alt
124
- }, imgProps), {
125
- style: __spreadValues({ objectFit: fit }, (imgProps == null ? void 0 : imgProps.style) || {}),
126
- className: clsx(
127
- `${prefixCls}-img`,
128
- // 无占位且不onFail时直接展示img本体
129
- (loaded || placeholder === false && !failed) && `${prefixCls}-loaded`,
130
- imgProps == null ? void 0 : imgProps.className
131
- )
132
- }), isMini ? miniAttr : {})
133
- );
134
- function renderImgEle() {
135
- return /* @__PURE__ */ React.createElement(React.Fragment, null, failed && defaultFallback || !loaded && defaultPlaceholder || null, imgEle);
136
- }
137
- return /* @__PURE__ */ React.createElement(
138
- "div",
139
- __spreadValues({
140
- ref,
37
+ const Image = /* @__PURE__ */ React.forwardRef(
38
+ (_a, ref) => {
39
+ var _b = _a, {
40
+ fit = "fill",
41
+ src = "",
42
+ lazy = false,
43
+ style,
44
+ webp,
45
+ alt,
46
+ showMenu,
47
+ width,
48
+ height,
49
+ fallback = null,
50
+ className,
51
+ placeholder = false,
141
52
  onClick,
142
- style: __spreadValues({ width, height }, style),
143
- className: clsx(prefixCls, className)
144
- }, others),
145
- renderImgEle()
146
- );
147
- });
53
+ onLoad,
54
+ onError,
55
+ imgProps
56
+ } = _b, others = __objRest(_b, [
57
+ "fit",
58
+ "src",
59
+ "lazy",
60
+ "style",
61
+ "webp",
62
+ "alt",
63
+ "showMenu",
64
+ "width",
65
+ "height",
66
+ "fallback",
67
+ "className",
68
+ "placeholder",
69
+ "onClick",
70
+ "onLoad",
71
+ "onError",
72
+ "imgProps"
73
+ ]);
74
+ const [loaded, setLoaded] = useState(false);
75
+ const [failed, setFailed] = useState(false);
76
+ const modeEnum = {
77
+ none: "center",
78
+ // 被替换的内容将保持其原有的尺寸居中裁切展示
79
+ contain: "aspectFit",
80
+ // 被替换的内容将被缩放,以在填充元素的内容框时保持其宽高比。 整个对象在填充盒子的同时保留其长宽比,因此如果宽高比与框的宽高比不匹配
81
+ cover: "aspectFill",
82
+ // 被替换的内容在保持其宽高比的同时填充元素的整个内容框。如果对象的宽高比与内容框不相匹配,该对象将被剪裁以适应内容框。
83
+ fill: "scaleToFill",
84
+ // 被替换的内容正好填充元素的内容框。整个对象将完全填充此框。如果对象的宽高比与内容框不匹配,那么该对象将被拉伸以适应内容框
85
+ "scale-down": "aspectFit",
86
+ // 内容的尺寸与 none 或 contain 中的一个相同,取决于它们两个之间谁得到的对象尺寸会更小一些。
87
+ widthFix: "widthFix",
88
+ // 【微信小程序】缩放模式,宽度不变,高度自动变化,保持原图宽高比不变。
89
+ heightFix: "heightFix"
90
+ // 【微信小程序】缩放模式,高度不变,宽度自动变化,保持原图宽高比不变。
91
+ };
92
+ useLayoutEffect(() => {
93
+ setLoaded(false);
94
+ setFailed(false);
95
+ }, [src]);
96
+ function defaultIconWrap(icon) {
97
+ return /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-default-icon-wrap` }, icon);
98
+ }
99
+ const defaultIcon = defaultIconWrap(
100
+ /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-default-icon-item` })
101
+ );
102
+ const defaultPlaceholder = placeholder === false ? [] : placeholder !== true && defaultIconWrap(placeholder) || defaultIcon;
103
+ const defaultFallback = fallback && defaultIconWrap(fallback) || defaultPlaceholder;
104
+ const miniAttr = {
105
+ webp,
106
+ lazyLoad: lazy,
107
+ "lazy-load": lazy,
108
+ mode: fit && modeEnum[fit],
109
+ showMenuByLongpress: showMenu
110
+ };
111
+ const imgEle = /* @__PURE__ */ React.createElement(
112
+ "img",
113
+ __spreadValues(__spreadProps(__spreadValues({
114
+ src,
115
+ loading: lazy ? "lazy" : "eager",
116
+ onLoad: (e) => {
117
+ setLoaded(true);
118
+ onLoad == null ? void 0 : onLoad(e);
119
+ },
120
+ onError: (e) => {
121
+ setFailed(true);
122
+ onError == null ? void 0 : onError(e);
123
+ },
124
+ alt
125
+ }, imgProps), {
126
+ style: __spreadValues({ objectFit: fit }, (imgProps == null ? void 0 : imgProps.style) || {}),
127
+ className: clsx(
128
+ `${prefixCls}-img`,
129
+ // 无占位且不onFail时直接展示img本体
130
+ (loaded || placeholder === false && !failed) && `${prefixCls}-loaded`,
131
+ imgProps == null ? void 0 : imgProps.className
132
+ )
133
+ }), isMini ? miniAttr : {})
134
+ );
135
+ function renderImgEle() {
136
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, failed && defaultFallback || !loaded && defaultPlaceholder || null, imgEle);
137
+ }
138
+ return /* @__PURE__ */ React.createElement(
139
+ "div",
140
+ __spreadValues({
141
+ ref,
142
+ onClick,
143
+ style: __spreadValues({ width, height }, style),
144
+ className: clsx(prefixCls, className)
145
+ }, others),
146
+ renderImgEle()
147
+ );
148
+ }
149
+ );
148
150
  Image.displayName = "BuiImage";
149
- Image.defaultProps = {
150
- src: "",
151
- lazy: false,
152
- fallback: null,
153
- placeholder: false,
154
- width: void 0,
155
- height: void 0,
156
- fit: "fill"
157
- };
158
151
  var Image_default = Image;
159
152
  export {
160
153
  Image_default as default
@@ -1,5 +1,9 @@
1
+ :root,
2
+ page,
3
+ xhs-page {
4
+ --bui-image-default-background-color: rgba(127, 127, 127, 0.2);
5
+ }
1
6
  .bui-image {
2
- --default-background-color: var(--bui-image-default-background-color, rgba(127, 127, 127, 0.2));
3
7
  width: auto;
4
8
  height: auto;
5
9
  display: inline-block;
@@ -32,5 +36,5 @@
32
36
  .bui-image-default-icon-item {
33
37
  width: 100%;
34
38
  height: 100%;
35
- background-color: var(--default-background-color);
39
+ background-color: var(--bui-image-default-background-color);
36
40
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { InputProps } from './index';
3
- import './Input.less';
3
+ import './index.less';
4
4
  declare const Input: React.ForwardRefExoticComponent<Omit<InputProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Input;
package/es/Input/Input.js CHANGED
@@ -33,22 +33,22 @@ import { ErrorCircleFilledIcon } from "@bifrostui/icons";
33
33
  import { isMini, useValue } from "@bifrostui/utils";
34
34
  import clsx from "clsx";
35
35
  import React, { forwardRef, useState } from "react";
36
- import "./Input.css";
36
+ import "./index.css";
37
37
  const prefixCls = "bui-input";
38
38
  const Input = forwardRef((props, ref) => {
39
39
  const _a = props, {
40
40
  className,
41
- defaultValue,
41
+ defaultValue = "",
42
42
  value,
43
43
  inputProps,
44
44
  inputRef,
45
45
  name,
46
- type,
47
- clearable,
46
+ type = "text",
47
+ clearable = false,
48
48
  startIcon,
49
49
  endIcon,
50
50
  placeholder,
51
- disabled,
51
+ disabled = false,
52
52
  onClear,
53
53
  onChange,
54
54
  onFocus,
@@ -141,17 +141,11 @@ const Input = forwardRef((props, ref) => {
141
141
  className: clsx(`${prefixCls}-input`, inputProps == null ? void 0 : inputProps.className)
142
142
  })
143
143
  ),
144
- clearable && !!inputValue && hasFocus && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-clear`, onClick: handleClear }, /* @__PURE__ */ React.createElement(ErrorCircleFilledIcon, { htmlColor: "#959aa5" })),
144
+ clearable && !!inputValue && hasFocus && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-clear`, onClick: handleClear }, /* @__PURE__ */ React.createElement(ErrorCircleFilledIcon, { htmlColor: "var(--bui-color-fg-subtle)" })),
145
145
  endIcon && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-icon ${prefixCls}-icon-end` }, endIcon)
146
146
  );
147
147
  });
148
148
  Input.displayName = "BuiInput";
149
- Input.defaultProps = {
150
- defaultValue: "",
151
- type: "text",
152
- clearable: false,
153
- disabled: false
154
- };
155
149
  var Input_default = Input;
156
150
  export {
157
151
  Input_default as default