@bifrostui/react 2.0.0-beta.2 → 2.0.0-beta.5

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 (349) hide show
  1. package/dist/ActionSheet/ActionSheet.css +16 -6
  2. package/dist/ActionSheet/ActionSheetItem.css +11 -17
  3. package/dist/ActionSheet/ActionSheetItem.js +1 -1
  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/AvatarGroup.css +19 -15
  10. package/dist/Avatar/index.css +93 -0
  11. package/dist/Backdrop/Backdrop.d.ts +1 -1
  12. package/dist/Backdrop/Backdrop.js +1 -1
  13. package/dist/Backdrop/{Backdrop.css → index.css} +6 -2
  14. package/dist/Badge/Badge.d.ts +1 -1
  15. package/dist/Badge/Badge.js +1 -1
  16. package/dist/Badge/Badge.types.d.ts +1 -1
  17. package/dist/Badge/{Badge.css → index.css} +47 -27
  18. package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
  19. package/dist/Breadcrumb/Breadcrumb.js +1 -1
  20. package/dist/Breadcrumb/index.css +38 -0
  21. package/dist/Button/Button.d.ts +1 -1
  22. package/dist/Button/Button.js +3 -2
  23. package/{es/Button/Button.css → dist/Button/index.css} +69 -38
  24. package/dist/Calendar/Calendar.d.ts +1 -1
  25. package/dist/Calendar/Calendar.js +3 -3
  26. package/dist/Calendar/{Calendar.css → index.css} +35 -31
  27. package/dist/Card/Card.css +10 -1
  28. package/dist/Card/CardContent.css +1 -1
  29. package/dist/Card/CardFooter.css +2 -2
  30. package/dist/Card/CardHeader.css +4 -3
  31. package/dist/Card/CardHeader.js +2 -2
  32. package/dist/Card/index.css +77 -0
  33. package/dist/Checkbox/Checkbox.d.ts +1 -1
  34. package/dist/Checkbox/Checkbox.js +2 -2
  35. package/dist/Checkbox/CheckboxGroup.d.ts +1 -1
  36. package/dist/Checkbox/CheckboxGroup.js +1 -1
  37. package/dist/Checkbox/{Checkbox.css → index.css} +14 -10
  38. package/dist/CitySelector/CitySelector.miniapp.d.ts +0 -1
  39. package/dist/CitySelector/CitySelector.miniapp.js +0 -1
  40. package/dist/CitySelector/CitySelectorCore.d.ts +1 -1
  41. package/dist/CitySelector/CitySelectorCore.js +1 -1
  42. package/dist/CitySelector/Selector/index.css +4 -4
  43. package/{es/CitySelector/CitySelector.css → dist/CitySelector/index.css} +31 -27
  44. package/dist/Collapse/Collapse.d.ts +1 -1
  45. package/dist/Collapse/Collapse.js +1 -1
  46. package/dist/CollapsePanel/CollapsePanel.d.ts +1 -1
  47. package/dist/CollapsePanel/CollapsePanel.js +1 -1
  48. package/dist/CollapsePanel/{CollapsePanel.css → index.css} +10 -6
  49. package/dist/Countdown/Countdown.d.ts +1 -1
  50. package/dist/Countdown/Countdown.js +1 -1
  51. package/{es/Countdown/Countdown.css → dist/Countdown/index.css} +12 -8
  52. package/dist/Dialog/index.css +26 -23
  53. package/dist/Divider/Divider.d.ts +1 -1
  54. package/dist/Divider/Divider.js +1 -1
  55. package/{es/Divider/Divider.css → dist/Divider/index.css} +14 -10
  56. package/dist/Drawer/Drawer.d.ts +1 -1
  57. package/dist/Drawer/Drawer.js +1 -1
  58. package/dist/IconButton/IconButton.d.ts +1 -1
  59. package/dist/IconButton/IconButton.js +3 -3
  60. package/dist/IconButton/IconButton.types.d.ts +4 -3
  61. package/{es/IconButton/IconButton.css → dist/IconButton/index.css} +79 -29
  62. package/dist/Image/index.css +6 -2
  63. package/dist/Input/Input.d.ts +1 -1
  64. package/dist/Input/Input.js +2 -2
  65. package/dist/Input/{Input.css → index.css} +22 -18
  66. package/dist/ItemSelector/ItemSelector.miniapp.d.ts +0 -1
  67. package/dist/ItemSelector/ItemSelector.miniapp.js +0 -1
  68. package/dist/ItemSelector/ItemSelectorCore.d.ts +1 -1
  69. package/dist/ItemSelector/ItemSelectorCore.js +1 -1
  70. package/dist/List/List.css +7 -3
  71. package/dist/List/ListItem.css +3 -3
  72. package/dist/List/index.css +80 -0
  73. package/dist/Loading/Loading.d.ts +1 -1
  74. package/dist/Loading/Loading.js +1 -1
  75. package/{es/Loading/Loading.css → dist/Loading/index.css} +10 -6
  76. package/dist/Modal/Modal.d.ts +1 -1
  77. package/dist/Modal/Modal.js +1 -1
  78. package/dist/Modal/Modal.miniapp.d.ts +2 -2
  79. package/dist/Modal/Modal.miniapp.js +1 -1
  80. package/dist/NavBar/NavBar.d.ts +1 -1
  81. package/dist/NavBar/NavBar.js +1 -1
  82. package/dist/NavBar/index.css +65 -0
  83. package/dist/Picker/Picker.css +21 -16
  84. package/dist/Picker/Picker.js +1 -1
  85. package/dist/Picker/Picker.types.d.ts +2 -2
  86. package/dist/Picker/PickerPanel.css +8 -8
  87. package/dist/Picker/PickerPanel.js +33 -22
  88. package/dist/Picker/index.css +116 -0
  89. package/dist/Popover/Popover.d.ts +1 -1
  90. package/dist/Popover/Popover.js +1 -1
  91. package/{es/Popover/Popover.css → dist/Popover/index.css} +32 -28
  92. package/dist/Progress/Progress.d.ts +1 -1
  93. package/dist/Progress/Progress.js +1 -1
  94. package/dist/Progress/index.css +28 -0
  95. package/dist/Radio/Radio.d.ts +1 -1
  96. package/dist/Radio/Radio.js +1 -1
  97. package/dist/Radio/RadioButtonIcon.js +6 -1
  98. package/dist/Radio/RadioGroup.d.ts +1 -1
  99. package/dist/Radio/RadioGroup.js +1 -1
  100. package/dist/Radio/{Radio.css → index.css} +10 -6
  101. package/dist/Rating/Rating.d.ts +1 -1
  102. package/dist/Rating/Rating.js +2 -2
  103. package/dist/Rating/{Rating.css → index.css} +20 -7
  104. package/dist/ScrollView/ScrollView.d.ts +1 -1
  105. package/dist/ScrollView/ScrollView.js +1 -1
  106. package/dist/Select/Select.d.ts +1 -1
  107. package/dist/Select/Select.js +2 -8
  108. package/dist/Select/SelectOption.d.ts +1 -1
  109. package/dist/Select/SelectOption.js +1 -1
  110. package/{es/Select/Select.css → dist/Select/index.css} +26 -19
  111. package/dist/Skeleton/Skeleton.d.ts +1 -1
  112. package/dist/Skeleton/Skeleton.js +1 -1
  113. package/{es/Skeleton/Skeleton.css → dist/Skeleton/index.css} +7 -3
  114. package/dist/Slider/Slider.d.ts +1 -1
  115. package/dist/Slider/Slider.js +2 -2
  116. package/dist/Slider/index.css +111 -0
  117. package/dist/Stack/Stack.d.ts +1 -1
  118. package/dist/Stack/Stack.js +1 -1
  119. package/dist/Steps/Step.css +14 -14
  120. package/dist/Steps/Step.js +1 -1
  121. package/dist/Steps/Steps.css +18 -14
  122. package/dist/Steps/index.css +199 -0
  123. package/dist/Swiper/Swiper.d.ts +1 -1
  124. package/dist/Swiper/Swiper.js +1 -1
  125. package/dist/Swiper/{Swiper.css → index.css} +6 -2
  126. package/dist/Switch/Switch.d.ts +1 -1
  127. package/dist/Switch/Switch.js +1 -1
  128. package/dist/Switch/Switch.types.d.ts +1 -1
  129. package/dist/Switch/{Switch.css → index.css} +46 -35
  130. package/dist/TabBar/TabBar.css +12 -8
  131. package/dist/TabBar/TabBar.js +1 -1
  132. package/dist/TabBar/TabBarContext.d.ts +3 -3
  133. package/dist/TabBar/TabBarItem.css +6 -0
  134. package/dist/TabBar/TabBarItem.js +3 -3
  135. package/dist/TabBar/index.css +59 -0
  136. package/dist/TabBar/index.types.d.ts +3 -3
  137. package/dist/Tabs/Tab.css +9 -9
  138. package/dist/Tabs/Tabs.css +24 -4
  139. package/dist/Tabs/Tabs.js +1 -1
  140. package/dist/Tabs/index.css +135 -0
  141. package/dist/Tag/Tag.css +48 -22
  142. package/dist/Tag/Tag.js +2 -2
  143. package/dist/Tag/Tag.types.d.ts +4 -4
  144. package/dist/Tag/TagGroup.css +13 -9
  145. package/dist/Tag/index.css +182 -0
  146. package/dist/TextArea/TextArea.d.ts +1 -1
  147. package/dist/TextArea/TextArea.js +1 -1
  148. package/dist/TextArea/index.css +57 -0
  149. package/dist/ThemeProvider/ThemeProvider.js +1 -4
  150. package/dist/ThemeProvider/ThemeProvider.types.d.ts +5 -10
  151. package/dist/ThemeProvider/utils/constants.d.ts +1 -1
  152. package/dist/ThemeProvider/utils/constants.js +4 -1
  153. package/dist/ThemeProvider/utils/mountTokens.d.ts +4 -4
  154. package/dist/Toast/Toast.d.ts +1 -1
  155. package/dist/Toast/Toast.js +5 -5
  156. package/dist/Toast/index.css +58 -0
  157. package/dist/Tooltip/Tooltip.d.ts +1 -1
  158. package/dist/Tooltip/Tooltip.js +1 -1
  159. package/dist/Tooltip/index.css +95 -0
  160. package/es/ActionSheet/ActionSheet.css +16 -6
  161. package/es/ActionSheet/ActionSheetItem.css +11 -17
  162. package/es/ActionSheet/ActionSheetItem.js +1 -1
  163. package/es/ActionSheet/ActionSheetItem.types.d.ts +2 -2
  164. package/es/ActionSheet/index.css +89 -0
  165. package/es/Alert/Alert.types.d.ts +3 -3
  166. package/es/Alert/index.css +18 -14
  167. package/es/Avatar/Avatar.css +16 -12
  168. package/es/Avatar/AvatarGroup.css +19 -15
  169. package/es/Avatar/index.css +93 -0
  170. package/es/Backdrop/Backdrop.d.ts +1 -1
  171. package/es/Backdrop/Backdrop.js +1 -1
  172. package/es/Backdrop/{Backdrop.css → index.css} +6 -2
  173. package/es/Badge/Badge.d.ts +1 -1
  174. package/es/Badge/Badge.js +1 -1
  175. package/es/Badge/Badge.types.d.ts +1 -1
  176. package/es/Badge/{Badge.css → index.css} +47 -27
  177. package/es/Breadcrumb/Breadcrumb.d.ts +1 -1
  178. package/es/Breadcrumb/Breadcrumb.js +1 -1
  179. package/es/Breadcrumb/index.css +38 -0
  180. package/es/Button/Button.d.ts +1 -1
  181. package/es/Button/Button.js +3 -2
  182. package/{dist/Button/Button.css → es/Button/index.css} +69 -38
  183. package/es/Calendar/Calendar.d.ts +1 -1
  184. package/es/Calendar/Calendar.js +3 -3
  185. package/es/Calendar/{Calendar.css → index.css} +35 -31
  186. package/es/Card/Card.css +10 -1
  187. package/es/Card/CardContent.css +1 -1
  188. package/es/Card/CardFooter.css +2 -2
  189. package/es/Card/CardHeader.css +4 -3
  190. package/es/Card/CardHeader.js +2 -2
  191. package/es/Card/index.css +77 -0
  192. package/es/Checkbox/Checkbox.d.ts +1 -1
  193. package/es/Checkbox/Checkbox.js +2 -2
  194. package/es/Checkbox/CheckboxGroup.d.ts +1 -1
  195. package/es/Checkbox/CheckboxGroup.js +1 -1
  196. package/es/Checkbox/{Checkbox.css → index.css} +14 -10
  197. package/es/CitySelector/CitySelector.miniapp.d.ts +0 -1
  198. package/es/CitySelector/CitySelector.miniapp.js +0 -1
  199. package/es/CitySelector/CitySelectorCore.d.ts +1 -1
  200. package/es/CitySelector/CitySelectorCore.js +1 -1
  201. package/es/CitySelector/Selector/index.css +4 -4
  202. package/{dist/CitySelector/CitySelector.css → es/CitySelector/index.css} +31 -27
  203. package/es/Collapse/Collapse.d.ts +1 -1
  204. package/es/Collapse/Collapse.js +1 -1
  205. package/es/CollapsePanel/CollapsePanel.d.ts +1 -1
  206. package/es/CollapsePanel/CollapsePanel.js +1 -1
  207. package/es/CollapsePanel/{CollapsePanel.css → index.css} +10 -6
  208. package/es/Countdown/Countdown.d.ts +1 -1
  209. package/es/Countdown/Countdown.js +1 -1
  210. package/{dist/Countdown/Countdown.css → es/Countdown/index.css} +12 -8
  211. package/es/Dialog/index.css +26 -23
  212. package/es/Divider/Divider.d.ts +1 -1
  213. package/es/Divider/Divider.js +1 -1
  214. package/{dist/Divider/Divider.css → es/Divider/index.css} +14 -10
  215. package/es/Drawer/Drawer.d.ts +1 -1
  216. package/es/Drawer/Drawer.js +1 -1
  217. package/es/IconButton/IconButton.d.ts +1 -1
  218. package/es/IconButton/IconButton.js +3 -3
  219. package/es/IconButton/IconButton.types.d.ts +4 -3
  220. package/{dist/IconButton/IconButton.css → es/IconButton/index.css} +79 -29
  221. package/es/Image/index.css +6 -2
  222. package/es/Input/Input.d.ts +1 -1
  223. package/es/Input/Input.js +2 -2
  224. package/es/Input/{Input.css → index.css} +22 -18
  225. package/es/ItemSelector/ItemSelector.miniapp.d.ts +0 -1
  226. package/es/ItemSelector/ItemSelector.miniapp.js +0 -1
  227. package/es/ItemSelector/ItemSelectorCore.d.ts +1 -1
  228. package/es/ItemSelector/ItemSelectorCore.js +1 -1
  229. package/es/List/List.css +7 -3
  230. package/es/List/ListItem.css +3 -3
  231. package/es/List/index.css +80 -0
  232. package/es/Loading/Loading.d.ts +1 -1
  233. package/es/Loading/Loading.js +1 -1
  234. package/{dist/Loading/Loading.css → es/Loading/index.css} +10 -6
  235. package/es/Modal/Modal.d.ts +1 -1
  236. package/es/Modal/Modal.js +1 -1
  237. package/es/Modal/Modal.miniapp.d.ts +2 -2
  238. package/es/Modal/Modal.miniapp.js +1 -1
  239. package/es/NavBar/NavBar.d.ts +1 -1
  240. package/es/NavBar/NavBar.js +1 -1
  241. package/es/NavBar/index.css +65 -0
  242. package/es/Picker/Picker.css +21 -16
  243. package/es/Picker/Picker.js +1 -1
  244. package/es/Picker/Picker.types.d.ts +2 -2
  245. package/es/Picker/PickerPanel.css +8 -8
  246. package/es/Picker/PickerPanel.js +46 -24
  247. package/es/Picker/index.css +116 -0
  248. package/es/Popover/Popover.d.ts +1 -1
  249. package/es/Popover/Popover.js +1 -1
  250. package/{dist/Popover/Popover.css → es/Popover/index.css} +32 -28
  251. package/es/Progress/Progress.d.ts +1 -1
  252. package/es/Progress/Progress.js +1 -1
  253. package/es/Progress/index.css +28 -0
  254. package/es/Radio/Radio.d.ts +1 -1
  255. package/es/Radio/Radio.js +1 -1
  256. package/es/Radio/RadioButtonIcon.js +6 -1
  257. package/es/Radio/RadioGroup.d.ts +1 -1
  258. package/es/Radio/RadioGroup.js +1 -1
  259. package/es/Radio/{Radio.css → index.css} +10 -6
  260. package/es/Rating/Rating.d.ts +1 -1
  261. package/es/Rating/Rating.js +2 -2
  262. package/es/Rating/{Rating.css → index.css} +20 -7
  263. package/es/ScrollView/ScrollView.d.ts +1 -1
  264. package/es/ScrollView/ScrollView.js +1 -1
  265. package/es/Select/Select.d.ts +1 -1
  266. package/es/Select/Select.js +2 -8
  267. package/es/Select/SelectOption.d.ts +1 -1
  268. package/es/Select/SelectOption.js +1 -1
  269. package/{dist/Select/Select.css → es/Select/index.css} +26 -19
  270. package/es/Skeleton/Skeleton.d.ts +1 -1
  271. package/es/Skeleton/Skeleton.js +1 -1
  272. package/{dist/Skeleton/Skeleton.css → es/Skeleton/index.css} +7 -3
  273. package/es/Slider/Slider.d.ts +1 -1
  274. package/es/Slider/Slider.js +2 -2
  275. package/es/Slider/index.css +111 -0
  276. package/es/Stack/Stack.d.ts +1 -1
  277. package/es/Stack/Stack.js +1 -1
  278. package/es/Steps/Step.css +14 -14
  279. package/es/Steps/Step.js +1 -1
  280. package/es/Steps/Steps.css +18 -14
  281. package/es/Steps/index.css +199 -0
  282. package/es/Swiper/Swiper.d.ts +1 -1
  283. package/es/Swiper/Swiper.js +1 -1
  284. package/es/Swiper/{Swiper.css → index.css} +6 -2
  285. package/es/Switch/Switch.d.ts +1 -1
  286. package/es/Switch/Switch.js +1 -1
  287. package/es/Switch/Switch.types.d.ts +1 -1
  288. package/es/Switch/{Switch.css → index.css} +46 -35
  289. package/es/TabBar/TabBar.css +12 -8
  290. package/es/TabBar/TabBar.js +1 -1
  291. package/es/TabBar/TabBarContext.d.ts +3 -3
  292. package/es/TabBar/TabBarItem.css +6 -0
  293. package/es/TabBar/TabBarItem.js +2 -2
  294. package/es/TabBar/index.css +59 -0
  295. package/es/TabBar/index.types.d.ts +3 -3
  296. package/es/Tabs/Tab.css +9 -9
  297. package/es/Tabs/Tabs.css +24 -4
  298. package/es/Tabs/Tabs.js +1 -1
  299. package/es/Tabs/index.css +135 -0
  300. package/es/Tag/Tag.css +48 -22
  301. package/es/Tag/Tag.js +2 -2
  302. package/es/Tag/Tag.types.d.ts +4 -4
  303. package/es/Tag/TagGroup.css +13 -9
  304. package/es/Tag/index.css +182 -0
  305. package/es/TextArea/TextArea.d.ts +1 -1
  306. package/es/TextArea/TextArea.js +1 -1
  307. package/es/TextArea/index.css +57 -0
  308. package/es/ThemeProvider/ThemeProvider.js +1 -4
  309. package/es/ThemeProvider/ThemeProvider.types.d.ts +5 -10
  310. package/es/ThemeProvider/utils/constants.d.ts +1 -1
  311. package/es/ThemeProvider/utils/constants.js +4 -1
  312. package/es/ThemeProvider/utils/mountTokens.d.ts +4 -4
  313. package/es/Toast/Toast.d.ts +1 -1
  314. package/es/Toast/Toast.js +5 -5
  315. package/es/Toast/index.css +58 -0
  316. package/es/Tooltip/Tooltip.d.ts +1 -1
  317. package/es/Tooltip/Tooltip.js +1 -1
  318. package/es/Tooltip/index.css +95 -0
  319. package/package.json +13 -5
  320. package/dist/Breadcrumb/Breadcrumb.css +0 -34
  321. package/dist/CitySelector/miniapp.css +0 -4
  322. package/dist/ItemSelector/miniapp.css +0 -4
  323. package/dist/NavBar/NavBar.css +0 -61
  324. package/dist/Progress/Progress.css +0 -24
  325. package/dist/Slider/Slider.css +0 -106
  326. package/dist/TextArea/TextArea.css +0 -53
  327. package/dist/Toast/Toast.css +0 -54
  328. package/dist/Tooltip/Tooltip.css +0 -91
  329. package/es/Breadcrumb/Breadcrumb.css +0 -34
  330. package/es/CitySelector/miniapp.css +0 -4
  331. package/es/ItemSelector/miniapp.css +0 -4
  332. package/es/NavBar/NavBar.css +0 -61
  333. package/es/Progress/Progress.css +0 -24
  334. package/es/Slider/Slider.css +0 -106
  335. package/es/TextArea/TextArea.css +0 -53
  336. package/es/Toast/Toast.css +0 -54
  337. package/es/Tooltip/Tooltip.css +0 -91
  338. /package/dist/Collapse/{Collapse.css → index.css} +0 -0
  339. /package/dist/Drawer/{Drawer.css → index.css} +0 -0
  340. /package/dist/ItemSelector/{ItemSelector.css → index.css} +0 -0
  341. /package/dist/Modal/{Modal.css → index.css} +0 -0
  342. /package/dist/ScrollView/{ScrollView.css → index.css} +0 -0
  343. /package/dist/Stack/{Stack.css → index.css} +0 -0
  344. /package/es/Collapse/{Collapse.css → index.css} +0 -0
  345. /package/es/Drawer/{Drawer.css → index.css} +0 -0
  346. /package/es/ItemSelector/{ItemSelector.css → index.css} +0 -0
  347. /package/es/Modal/{Modal.css → index.css} +0 -0
  348. /package/es/ScrollView/{ScrollView.css → index.css} +0 -0
  349. /package/es/Stack/{Stack.css → index.css} +0 -0
@@ -1,31 +1,36 @@
1
+ :root,
2
+ page,
3
+ xhs-page {
4
+ --bui-picker-header-height: 50px;
5
+ --bui-picker-header-padding: 0 var(--bui-spacing-lg);
6
+ --bui-picker-cancel-height: 100%;
7
+ --bui-picker-cancel-line-height: 50px;
8
+ --bui-picker-confirm-height: 100%;
9
+ --bui-picker-confirm-line-height: 50px;
10
+ --bui-picker-panel-height: 260px;
11
+ --bui-picker-indicator-top: 108px;
12
+ --bui-picker-option-height: 36px;
13
+ --bui-picker-option-font-size: var(--bui-title-size-4);
14
+ }
1
15
  .bui-picker {
2
- --header-height: var(--bui-picker-header-height, 50px);
3
- --header-padding: var(--bui-picker-header-padding, 0 var(--bui-spacing-lg));
4
- --cancel-height: var(--bui-picker-cancel-height, 100%);
5
- --cancel-line-height: var(--bui-picker-cancel-line-height, 50px);
6
- --confirm-height: var(--bui-picker-confirm-height, 100%);
7
- --confirm-line-height: var(--bui-picker-confirm-line-height, 50px);
8
- --panel-container-height: var(--bui-picker-panel-height, 260px);
9
- --indicator-top: var(--bui-picker-indicator-top, 108px);
10
- --option-height: var(--bui-picker-option-height, 36px);
11
16
  font-family: var(--bui-font-family);
12
17
  }
13
18
  .bui-picker .bui-drawer-content {
14
19
  border-radius: var(--bui-shape-radius-drawer) var(--bui-shape-radius-drawer) 0 0;
15
20
  }
16
21
  .bui-picker-header {
17
- height: var(--header-height);
22
+ height: var(--bui-picker-header-height);
18
23
  display: flex;
19
24
  align-items: center;
20
25
  justify-content: space-between;
21
- padding: var(--header-padding);
26
+ padding: var(--bui-picker-header-padding);
22
27
  }
23
28
  .bui-picker-cancel {
24
29
  cursor: pointer;
25
- height: var(--cancel-height);
30
+ height: var(--bui-picker-cancel-height);
26
31
  font-size: var(--bui-title-size-4);
27
32
  text-align: center;
28
- line-height: var(--cancel-line-height);
33
+ line-height: var(--bui-picker-cancel-line-height);
29
34
  color: var(--bui-color-fg-default);
30
35
  }
31
36
  .bui-picker-title {
@@ -35,15 +40,15 @@
35
40
  }
36
41
  .bui-picker-confirm {
37
42
  cursor: pointer;
38
- height: var(--confirm-height);
43
+ height: var(--bui-picker-confirm-height);
39
44
  font-size: var(--bui-title-size-4);
40
45
  text-align: center;
41
- line-height: var(--confirm-line-height);
46
+ line-height: var(--bui-picker-confirm-line-height);
42
47
  color: var(--bui-color-primary);
43
48
  }
44
49
  .bui-picker-container {
45
50
  width: 100%;
46
- height: var(--panel-container-height);
51
+ height: var(--bui-picker-panel-height);
47
52
  display: flex;
48
53
  overflow: hidden;
49
54
  }
@@ -238,7 +238,7 @@ const Picker = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
238
238
  columnIndex: index,
239
239
  defaultValue: internalValue == null ? void 0 : internalValue[index],
240
240
  onSelect: handleSelect,
241
- pickerStyle: others == null ? void 0 : others.style
241
+ open
242
242
  }
243
243
  )))
244
244
  )
@@ -93,9 +93,9 @@ export type PickerPanelProps<D extends React.ElementType = 'div', P = {}> = Over
93
93
  */
94
94
  columnIndex?: number;
95
95
  /**
96
- * Piker组件的样式,PickerPanel的主题定制与css变量传入的Tokens有关,需要透传计算
96
+ * 是否展示选择器
97
97
  */
98
- pickerStyle?: React.CSSProperties;
98
+ open?: boolean;
99
99
  /**
100
100
  * 选择选项时的回调
101
101
  */
@@ -8,9 +8,9 @@
8
8
  transform: rotate3d(1, 0, 0, 60deg);
9
9
  transform-style: preserve-3d;
10
10
  position: absolute;
11
- top: var(--indicator-top);
11
+ top: var(--bui-picker-indicator-top);
12
12
  width: 100%;
13
- height: var(--option-height);
13
+ height: var(--bui-picker-option-height);
14
14
  }
15
15
  .bui-picker-panel-mask {
16
16
  position: absolute;
@@ -28,14 +28,14 @@
28
28
  var(--bui-color-bg-alpha-light-9),
29
29
  var(--bui-color-bg-alpha-light-3));
30
30
  background-position: top, bottom;
31
- background-size: 100% var(--indicator-top);
31
+ background-size: 100% var(--bui-picker-indicator-top);
32
32
  background-repeat: no-repeat;
33
33
  transform: translateZ(0);
34
34
  }
35
35
  .bui-picker-panel-indicator {
36
36
  position: absolute;
37
- top: var(--indicator-top);
38
- height: var(--option-height);
37
+ top: var(--bui-picker-indicator-top);
38
+ height: var(--bui-picker-option-height);
39
39
  width: 100%;
40
40
  border-top: 1px solid var(--bui-color-border-default);
41
41
  border-bottom: 1px solid var(--bui-color-border-default);
@@ -45,10 +45,10 @@
45
45
  top: 0;
46
46
  left: 0;
47
47
  text-align: center;
48
- height: var(--option-height);
49
- line-height: var(--option-height);
48
+ height: var(--bui-picker-option-height);
49
+ line-height: var(--bui-picker-option-height);
50
50
  color: var(--bui-color-fg-default);
51
- font-size: var(--option-font-size);
51
+ font-size: var(--bui-picker-option-font-size);
52
52
  backface-visibility: hidden;
53
53
  width: auto;
54
54
  overflow: hidden;
@@ -63,19 +63,18 @@ var import_PickerPanel = require("./PickerPanel.css");
63
63
  const prefixCls = "bui-picker-panel";
64
64
  const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
65
65
  (props, ref) => {
66
- var _b;
67
66
  const _a = props, {
68
67
  options = [],
69
68
  defaultValue,
70
69
  onSelect,
71
70
  columnIndex,
72
- pickerStyle
71
+ open
73
72
  } = _a, others = __objRest(_a, [
74
73
  "options",
75
74
  "defaultValue",
76
75
  "onSelect",
77
76
  "columnIndex",
78
- "pickerStyle"
77
+ "open"
79
78
  ]);
80
79
  const touch = (0, import_utils.useTouch)();
81
80
  let timer;
@@ -85,9 +84,8 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
85
84
  const ROTATION = 20;
86
85
  const TOUCH_END = "end";
87
86
  const DEFAULT_LINE_SPACING = 36;
88
- const LINE_SPACING_STR = (_b = ((pickerStyle == null ? void 0 : pickerStyle["--option-height"]) ? `${pickerStyle == null ? void 0 : pickerStyle["--option-height"]}` : `${DEFAULT_LINE_SPACING}`).match(/\d+/)) == null ? void 0 : _b[0];
89
- const LINE_SPACING = parseInt(LINE_SPACING_STR, 10);
90
- const INDICATOR_OFFSET = LINE_SPACING * 108 / DEFAULT_LINE_SPACING;
87
+ const lineSpacing = (0, import_react.useRef)(DEFAULT_LINE_SPACING);
88
+ const [indicatorOffset, setIndicatorOffset] = (0, import_react.useState)(108);
91
89
  const [startY, setStartY] = (0, import_react.useState)(0);
92
90
  const [currIndex, setCurrIndex] = (0, import_react.useState)(1);
93
91
  const [startTime, setStartTime] = (0, import_react.useState)(0);
@@ -96,10 +94,18 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
96
94
  const [scrollDistance, setScrollDistance] = (0, import_react.useState)(0);
97
95
  const transformY = (0, import_react.useRef)(0);
98
96
  const isVerticalMoving = (0, import_react.useRef)(false);
99
- const rollerRef = (0, import_react.useRef)(null);
97
+ const fitstOptionRef = (0, import_react.useRef)(null);
100
98
  const PickerPanelRef = (0, import_react.useRef)(null);
101
99
  const pickerPanelRef = (0, import_utils.useForkRef)(PickerPanelRef, ref);
102
100
  (0, import_utils.useTouchEmulator)(PickerPanelRef.current);
101
+ (0, import_react.useLayoutEffect)(() => {
102
+ if (!open)
103
+ return;
104
+ (0, import_utils.getBoundingClientRect)(fitstOptionRef.current).then((rect) => {
105
+ lineSpacing.current = (rect == null ? void 0 : rect.height) || DEFAULT_LINE_SPACING;
106
+ setIndicatorOffset(lineSpacing.current * 108 / DEFAULT_LINE_SPACING);
107
+ });
108
+ }, [open]);
103
109
  const updateSelect = () => {
104
110
  let index = -1;
105
111
  if (defaultValue) {
@@ -112,7 +118,7 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
112
118
  });
113
119
  }
114
120
  setCurrIndex(index === -1 ? 1 : index + 1);
115
- const move = index === -1 ? 0 : index * LINE_SPACING;
121
+ const move = index === -1 ? 0 : index * lineSpacing.current;
116
122
  setMove({ move: -move });
117
123
  };
118
124
  (0, import_react.useEffect)(() => {
@@ -139,22 +145,24 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
139
145
  if (updateMove > 0) {
140
146
  updateMove = 0;
141
147
  }
142
- if (updateMove < -(options.length - 1) * LINE_SPACING) {
143
- updateMove = -(options.length - 1) * LINE_SPACING;
148
+ if (updateMove < -(options.length - 1) * lineSpacing.current) {
149
+ updateMove = -(options.length - 1) * lineSpacing.current;
144
150
  }
145
- const endMove = Math.round(updateMove / LINE_SPACING) * LINE_SPACING;
146
- const deg = `${(Math.abs(Math.round(endMove / LINE_SPACING)) + 1) * ROTATION}deg`;
151
+ const endMove = Math.round(updateMove / lineSpacing.current) * lineSpacing.current;
152
+ const deg = `${(Math.abs(Math.round(endMove / lineSpacing.current)) + 1) * ROTATION}deg`;
147
153
  setTransform(type, deg, time, endMove);
148
- setCurrIndex(Math.abs(Math.round(endMove / LINE_SPACING)) + 1);
154
+ setCurrIndex(Math.abs(Math.round(endMove / lineSpacing.current)) + 1);
149
155
  } else {
150
156
  let deg = 0;
151
- const currentDeg = (-updateMove / LINE_SPACING + 1) * ROTATION;
157
+ const currentDeg = (-updateMove / lineSpacing.current + 1) * ROTATION;
152
158
  const maxDeg = (options.length + 1) * ROTATION;
153
159
  const minDeg = 0;
154
160
  deg = Math.min(Math.max(currentDeg, minDeg), maxDeg);
155
161
  if (minDeg < deg && deg < maxDeg) {
156
162
  setTransform("", `${deg}deg`, void 0, updateMove);
157
- setCurrIndex(Math.abs(Math.round(updateMove / LINE_SPACING)) + 1);
163
+ setCurrIndex(
164
+ Math.abs(Math.round(updateMove / lineSpacing.current)) + 1
165
+ );
158
166
  }
159
167
  }
160
168
  };
@@ -203,17 +211,17 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
203
211
  }, 0);
204
212
  };
205
213
  (0, import_react.useEffect)(() => {
206
- var _a2, _b2, _c;
214
+ var _a2, _b, _c;
207
215
  (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.addEventListener("touchstart", panelTouchStart);
208
- (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.addEventListener("touchmove", panelTouchMove);
216
+ (_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", panelTouchMove);
209
217
  (_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", panelTouchEnd);
210
218
  return () => {
211
- var _a3, _b3, _c2;
219
+ var _a3, _b2, _c2;
212
220
  (_a3 = PickerPanelRef.current) == null ? void 0 : _a3.removeEventListener(
213
221
  "touchstart",
214
222
  panelTouchStart
215
223
  );
216
- (_b3 = PickerPanelRef.current) == null ? void 0 : _b3.removeEventListener(
224
+ (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener(
217
225
  "touchmove",
218
226
  panelTouchMove
219
227
  );
@@ -224,7 +232,7 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
224
232
  isVerticalMoving.current = false;
225
233
  setTouchTime(0);
226
234
  onSelect == null ? void 0 : onSelect(e, {
227
- columnOption: options == null ? void 0 : options[Math.round(-scrollDistance / LINE_SPACING)],
235
+ columnOption: options == null ? void 0 : options[Math.round(-scrollDistance / lineSpacing.current)],
228
236
  columnIndex
229
237
  });
230
238
  };
@@ -244,7 +252,6 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
244
252
  "div",
245
253
  {
246
254
  className: `${prefixCls}-roller`,
247
- ref: rollerRef,
248
255
  style: {
249
256
  transition: `transform ${touchTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,
250
257
  transform: `rotate3d(1, 0, 0, ${touchDeg})`
@@ -254,12 +261,16 @@ const PickerPanel = /* @__PURE__ */ import_react.default.forwardRef(
254
261
  options.map((item, i) => /* @__PURE__ */ import_react.default.createElement(
255
262
  "div",
256
263
  {
264
+ ref: (el) => {
265
+ if (i === 0 && !fitstOptionRef.current)
266
+ fitstOptionRef.current = el;
267
+ },
257
268
  className: (0, import_clsx.default)(`${prefixCls}-option`, {
258
269
  [`${prefixCls}-option-hidden`]: i + 1 <= currIndex - 8 || i + 1 >= currIndex + 8
259
270
  }),
260
271
  key: `${item == null ? void 0 : item.value}-${i}`,
261
272
  style: {
262
- transform: `rotate3d(1, 0, 0, ${-ROTATION * (i + 1)}deg) translate3d(0px, 0px, ${INDICATOR_OFFSET}px)`
273
+ transform: `rotate3d(1, 0, 0, ${-ROTATION * (i + 1)}deg) translate3d(0px, 0px, ${indicatorOffset}px)`
263
274
  }
264
275
  },
265
276
  item == null ? void 0 : item.label
@@ -0,0 +1,116 @@
1
+ :root,
2
+ page,
3
+ xhs-page {
4
+ --bui-picker-header-height: 50px;
5
+ --bui-picker-header-padding: 0 var(--bui-spacing-lg);
6
+ --bui-picker-cancel-height: 100%;
7
+ --bui-picker-cancel-line-height: 50px;
8
+ --bui-picker-confirm-height: 100%;
9
+ --bui-picker-confirm-line-height: 50px;
10
+ --bui-picker-panel-height: 260px;
11
+ --bui-picker-indicator-top: 108px;
12
+ --bui-picker-option-height: 36px;
13
+ --bui-picker-option-font-size: var(--bui-title-size-4);
14
+ }
15
+ .bui-picker {
16
+ font-family: var(--bui-font-family);
17
+ }
18
+ .bui-picker .bui-drawer-content {
19
+ border-radius: var(--bui-shape-radius-drawer) var(--bui-shape-radius-drawer) 0 0;
20
+ }
21
+ .bui-picker-header {
22
+ height: var(--bui-picker-header-height);
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: space-between;
26
+ padding: var(--bui-picker-header-padding);
27
+ }
28
+ .bui-picker-cancel {
29
+ cursor: pointer;
30
+ height: var(--bui-picker-cancel-height);
31
+ font-size: var(--bui-title-size-4);
32
+ text-align: center;
33
+ line-height: var(--bui-picker-cancel-line-height);
34
+ color: var(--bui-color-fg-default);
35
+ }
36
+ .bui-picker-title {
37
+ font-size: var(--bui-title-size-3);
38
+ color: var(--bui-color-fg-default);
39
+ font-weight: var(--bui-font-weight-medium);
40
+ }
41
+ .bui-picker-confirm {
42
+ cursor: pointer;
43
+ height: var(--bui-picker-confirm-height);
44
+ font-size: var(--bui-title-size-4);
45
+ text-align: center;
46
+ line-height: var(--bui-picker-confirm-line-height);
47
+ color: var(--bui-color-primary);
48
+ }
49
+ .bui-picker-container {
50
+ width: 100%;
51
+ height: var(--bui-picker-panel-height);
52
+ display: flex;
53
+ overflow: hidden;
54
+ }
55
+ .bui-picker-panel {
56
+ flex: 1;
57
+ flex-shrink: 0;
58
+ position: relative;
59
+ font-family: var(--bui-font-family);
60
+ }
61
+ .bui-picker-panel-roller {
62
+ transform: rotate3d(1, 0, 0, 60deg);
63
+ transform-style: preserve-3d;
64
+ position: absolute;
65
+ top: var(--bui-picker-indicator-top);
66
+ width: 100%;
67
+ height: var(--bui-picker-option-height);
68
+ }
69
+ .bui-picker-panel-mask {
70
+ position: absolute;
71
+ top: 0;
72
+ left: 0;
73
+ width: 100%;
74
+ height: 100%;
75
+ background-image:
76
+ linear-gradient(
77
+ 180deg,
78
+ var(--bui-color-bg-alpha-light-9),
79
+ var(--bui-color-bg-alpha-light-3)),
80
+ linear-gradient(
81
+ 0deg,
82
+ var(--bui-color-bg-alpha-light-9),
83
+ var(--bui-color-bg-alpha-light-3));
84
+ background-position: top, bottom;
85
+ background-size: 100% var(--bui-picker-indicator-top);
86
+ background-repeat: no-repeat;
87
+ transform: translateZ(0);
88
+ }
89
+ .bui-picker-panel-indicator {
90
+ position: absolute;
91
+ top: var(--bui-picker-indicator-top);
92
+ height: var(--bui-picker-option-height);
93
+ width: 100%;
94
+ border-top: 1px solid var(--bui-color-border-default);
95
+ border-bottom: 1px solid var(--bui-color-border-default);
96
+ }
97
+ .bui-picker-panel-option {
98
+ position: absolute;
99
+ top: 0;
100
+ left: 0;
101
+ text-align: center;
102
+ height: var(--bui-picker-option-height);
103
+ line-height: var(--bui-picker-option-height);
104
+ color: var(--bui-color-fg-default);
105
+ font-size: var(--bui-picker-option-font-size);
106
+ backface-visibility: hidden;
107
+ width: auto;
108
+ overflow: hidden;
109
+ text-overflow: ellipsis;
110
+ white-space: nowrap;
111
+ width: 100%;
112
+ }
113
+ .bui-picker-panel-option-hidden {
114
+ visibility: hidden;
115
+ opacity: 0;
116
+ }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './Popover.less';
3
2
  import { PopoverProps } from './Popover.types';
3
+ import './index.less';
4
4
  declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Popover;
@@ -60,7 +60,7 @@ var import_clsx = __toESM(require("clsx"));
60
60
  var import_react = __toESM(require("react"));
61
61
  var import_utils = require("@bifrostui/utils");
62
62
  var import_Portal = __toESM(require("../Portal"));
63
- var import_Popover = require("./Popover.css");
63
+ var import_index = require("./index.css");
64
64
  const prefixCls = "bui-popover";
65
65
  const Popover = /* @__PURE__ */ import_react.default.forwardRef((props, ref) => {
66
66
  const _a = props, {
@@ -1,10 +1,14 @@
1
+ :root,
2
+ page,
3
+ xhs-page {
4
+ --bui-popover-arrow-size: 8PX;
5
+ --bui-popover-location-position: 8PX;
6
+ --bui-popover-max-width: 350px;
7
+ --bui-popover-content-min-width: 30px;
8
+ --bui-popover-content-padding: 6px 8px;
9
+ }
1
10
  .bui-popover {
2
- --arrow-size: var(--bui-popover-arrow-size, 8PX);
3
- --location-position: var(--bui-popover-location-position, 8PX);
4
- --max-width: var(--bui-popover-max-width, 350px);
5
- --content-min-width: var(--bui-popover-content-min-width, 30px);
6
- --content-padding: var(--bui-popover-content-padding, 6px 8px);
7
- max-width: var(--max-width);
11
+ max-width: var(--bui-popover-max-width);
8
12
  font-size: var(--bui-text-size-1);
9
13
  position: absolute;
10
14
  visibility: hidden;
@@ -16,16 +20,16 @@
16
20
  position: absolute;
17
21
  }
18
22
  .bui-popover .bui-popover-arrow.location-left {
19
- left: var(--location-position);
23
+ left: var(--bui-popover-location-position);
20
24
  }
21
25
  .bui-popover .bui-popover-arrow.location-right {
22
- right: var(--location-position);
26
+ right: var(--bui-popover-location-position);
23
27
  }
24
28
  .bui-popover .bui-popover-arrow.location-top {
25
- top: var(--location-position);
29
+ top: var(--bui-popover-location-position);
26
30
  }
27
31
  .bui-popover .bui-popover-arrow.location-bottom {
28
- bottom: var(--location-position);
32
+ bottom: var(--bui-popover-location-position);
29
33
  }
30
34
  .bui-popover.popover-top .location-center,
31
35
  .bui-popover.popover-bottom .location-center {
@@ -38,48 +42,48 @@
38
42
  transform: translateY(-50%);
39
43
  }
40
44
  .bui-popover.popover-top {
41
- padding-bottom: var(--arrow-size);
45
+ padding-bottom: var(--bui-popover-arrow-size);
42
46
  }
43
47
  .bui-popover.popover-top .bui-popover-arrow {
44
- border-left: var(--arrow-size) solid transparent;
45
- border-right: var(--arrow-size) solid transparent;
46
- border-top: var(--arrow-size) solid var(--bui-color-bg-view);
48
+ border-left: var(--bui-popover-arrow-size) solid transparent;
49
+ border-right: var(--bui-popover-arrow-size) solid transparent;
50
+ border-top: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
47
51
  bottom: 0;
48
52
  }
49
53
  .bui-popover.popover-bottom {
50
- padding-top: var(--arrow-size);
54
+ padding-top: var(--bui-popover-arrow-size);
51
55
  }
52
56
  .bui-popover.popover-bottom .bui-popover-arrow {
53
- border-left: var(--arrow-size) solid transparent;
54
- border-right: var(--arrow-size) solid transparent;
55
- border-bottom: var(--arrow-size) solid var(--bui-color-bg-view);
57
+ border-left: var(--bui-popover-arrow-size) solid transparent;
58
+ border-right: var(--bui-popover-arrow-size) solid transparent;
59
+ border-bottom: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
56
60
  top: 0;
57
61
  }
58
62
  .bui-popover.popover-left {
59
- padding-right: var(--arrow-size);
63
+ padding-right: var(--bui-popover-arrow-size);
60
64
  }
61
65
  .bui-popover.popover-left .bui-popover-arrow {
62
- border-top: var(--arrow-size) solid transparent;
63
- border-bottom: var(--arrow-size) solid transparent;
64
- border-left: var(--arrow-size) solid var(--bui-color-bg-view);
66
+ border-top: var(--bui-popover-arrow-size) solid transparent;
67
+ border-bottom: var(--bui-popover-arrow-size) solid transparent;
68
+ border-left: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
65
69
  right: 0;
66
70
  }
67
71
  .bui-popover.popover-right {
68
- padding-left: var(--arrow-size);
72
+ padding-left: var(--bui-popover-arrow-size);
69
73
  }
70
74
  .bui-popover.popover-right .bui-popover-arrow {
71
- border-top: var(--arrow-size) solid transparent;
72
- border-bottom: var(--arrow-size) solid transparent;
73
- border-right: var(--arrow-size) solid var(--bui-color-bg-view);
75
+ border-top: var(--bui-popover-arrow-size) solid transparent;
76
+ border-bottom: var(--bui-popover-arrow-size) solid transparent;
77
+ border-right: var(--bui-popover-arrow-size) solid var(--bui-color-bg-view);
74
78
  left: 0;
75
79
  }
76
80
  .bui-popover .bui-popover-title {
77
81
  font-weight: var(--bui-font-weight-bold);
78
82
  }
79
83
  .bui-popover .bui-popover-content {
80
- min-width: var(--content-min-width);
84
+ min-width: var(--bui-popover-content-min-width);
81
85
  color: var(--bui-color-fg-muted);
82
- padding: var(--content-padding);
86
+ padding: var(--bui-popover-content-padding);
83
87
  text-align: left;
84
88
  text-decoration: none;
85
89
  word-wrap: break-word;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ProgressGradient, ProgressProps } from './Progress.types';
3
- import './Progress.less';
3
+ import './index.less';
4
4
  export declare const handleGradient: (strokeColor: ProgressGradient) => {
5
5
  backgroundImage: string;
6
6
  };
@@ -59,7 +59,7 @@ __export(Progress_exports, {
59
59
  module.exports = __toCommonJS(Progress_exports);
60
60
  var import_clsx = __toESM(require("clsx"));
61
61
  var import_react = __toESM(require("react"));
62
- var import_Progress2 = require("./Progress.css");
62
+ var import_index = require("./index.css");
63
63
  const prefixCls = "bui-progress";
64
64
  function validProgress(progress) {
65
65
  if (!progress || progress < 0) {
@@ -0,0 +1,28 @@
1
+ :root,
2
+ page,
3
+ xhs-page {
4
+ --bui-progress-fill-color: var(--bui-color-primary);
5
+ --bui-progress-trail-color: rgba(156, 156, 165, 0.2);
6
+ --bui-progress-stroke-width: 8px;
7
+ --bui-progress-width: 100%;
8
+ --bui-progress-border-radius: 100px;
9
+ }
10
+ .bui-progress {
11
+ width: var(--bui-progress-width);
12
+ font-family: var(--bui-font-family);
13
+ }
14
+ .bui-progress-inner {
15
+ position: relative;
16
+ display: inline-block;
17
+ width: var(--bui-progress-width);
18
+ overflow: hidden;
19
+ vertical-align: middle;
20
+ background-color: var(--bui-progress-trail-color);
21
+ border-radius: var(--bui-progress-border-radius);
22
+ }
23
+ .bui-progress-bg {
24
+ position: relative;
25
+ border-radius: var(--bui-progress-border-radius);
26
+ background-color: var(--bui-progress-fill-color);
27
+ height: var(--bui-progress-stroke-width);
28
+ }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { RadioProps } from './Radio.types';
3
- import './Radio.less';
3
+ import './index.less';
4
4
  declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Radio;
@@ -64,7 +64,7 @@ var import_clsx = __toESM(require("clsx"));
64
64
  var import_react = __toESM(require("react"));
65
65
  var import_RadioButtonIcon = __toESM(require("./RadioButtonIcon"));
66
66
  var import_RadioContext = __toESM(require("./RadioContext"));
67
- var import_Radio2 = require("./Radio.css");
67
+ var import_index = require("./index.css");
68
68
  const prefixCls = "bui-radio";
69
69
  const Radio = (0, import_react.forwardRef)((props, ref) => {
70
70
  const _a = props, {
@@ -35,7 +35,12 @@ var import_clsx = __toESM(require("clsx"));
35
35
  var import_react = __toESM(require("react"));
36
36
  const prefixCls = "bui-radio-btn-icon";
37
37
  function RadioButtonIcon(props) {
38
- const { checked, size = "medium", color, htmlColor = "#959aa5" } = props;
38
+ const {
39
+ checked,
40
+ size = "medium",
41
+ color,
42
+ htmlColor = "var(--bui-color-fg-subtle)"
43
+ } = props;
39
44
  return /* @__PURE__ */ import_react.default.createElement(
40
45
  "span",
41
46
  {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './Radio.less';
3
2
  import { RadioGroupProps } from './Radio.types';
3
+ import './index.less';
4
4
  declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default RadioGroup;
@@ -59,8 +59,8 @@ module.exports = __toCommonJS(RadioGroup_exports);
59
59
  var import_utils = require("@bifrostui/utils");
60
60
  var import_clsx = __toESM(require("clsx"));
61
61
  var import_react = __toESM(require("react"));
62
- var import_Radio = require("./Radio.css");
63
62
  var import_RadioContext = require("./RadioContext");
63
+ var import_index = require("./index.css");
64
64
  const prefixCls = "bui-radio-group";
65
65
  const RadioGroup = (0, import_react.forwardRef)((props, ref) => {
66
66
  const _a = props, {
@@ -1,7 +1,11 @@
1
+ :root,
2
+ page,
3
+ xhs-page {
4
+ --bui-radio-label-color: var(--bui-color-fg-default);
5
+ --bui-radio-label-font-size: var(--bui-text-size-1);
6
+ --bui-radio-icon-padding: 5px;
7
+ }
1
8
  .bui-radio {
2
- --label-color: var(--bui-radio-label-color, var(--bui-color-fg-default));
3
- --label-font-size: var(--bui-radio-label-font-size, var(--bui-text-size-1));
4
- --icon-padding: var(--bui-radio-icon-padding, 5px);
5
9
  display: inline-flex;
6
10
  align-items: center;
7
11
  position: relative;
@@ -35,12 +39,12 @@
35
39
  align-items: center;
36
40
  justify-content: center;
37
41
  flex-shrink: 0;
38
- padding: var(--icon-padding);
42
+ padding: var(--bui-radio-icon-padding);
39
43
  box-sizing: border-box;
40
44
  }
41
45
  .bui-radio-label {
42
- font-size: var(--label-font-size);
43
- color: var(--label-color);
46
+ font-size: var(--bui-radio-label-font-size);
47
+ color: var(--bui-radio-label-color);
44
48
  }
45
49
  .bui-radio-btn-icon {
46
50
  position: relative;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { RatingProps } from './Rating.types';
3
- import './Rating.less';
3
+ import './index.less';
4
4
  declare const Rating: React.ForwardRefExoticComponent<Omit<RatingProps<"div", {}>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export default Rating;