@bifrostui/react 1.4.8-beta.0 → 2.0.0-beta.1

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 (313) hide show
  1. package/dist/ActionSheet/ActionSheet.css +2 -2
  2. package/dist/ActionSheet/ActionSheetItem.js +3 -8
  3. package/dist/Avatar/Avatar.js +3 -8
  4. package/dist/Avatar/AvatarGroup.js +2 -6
  5. package/dist/Badge/Badge.js +3 -8
  6. package/dist/Button/Button.css +77 -78
  7. package/dist/Button/Button.d.ts +1 -1
  8. package/dist/Button/Button.js +4 -10
  9. package/dist/Button/Button.types.d.ts +8 -7
  10. package/dist/Calendar/Calendar.js +7 -19
  11. package/dist/Calendar/Calendar.types.d.ts +0 -5
  12. package/dist/Card/Card.css +1 -1
  13. package/dist/Card/CardContent.css +1 -2
  14. package/dist/Card/CardFooter.css +2 -4
  15. package/dist/Card/CardHeader.css +4 -5
  16. package/dist/Checkbox/Checkbox.js +2 -6
  17. package/dist/Checkbox/CheckboxGroup.js +4 -7
  18. package/dist/Collapse/Collapse.css +1 -0
  19. package/dist/Collapse/Collapse.d.ts +1 -1
  20. package/dist/Collapse/Collapse.js +8 -11
  21. package/dist/CollapsePanel/CollapsePanel.css +2 -4
  22. package/dist/CollapsePanel/CollapsePanelItem.js +45 -46
  23. package/dist/Countdown/Countdown.js +5 -12
  24. package/dist/Dialog/FunctionalDialog.js +1 -1
  25. package/dist/Divider/Divider.js +8 -5
  26. package/dist/Drawer/Drawer.js +4 -10
  27. package/dist/Fade/Fade.js +52 -56
  28. package/dist/IconButton/IconButton.js +5 -12
  29. package/dist/Image/Image.js +112 -119
  30. package/dist/Input/Input.js +4 -10
  31. package/dist/List/List.js +3 -8
  32. package/dist/List/ListItem.js +42 -44
  33. package/dist/List/ListItemContent.js +1 -4
  34. package/dist/List/ListItemExtra.js +9 -4
  35. package/dist/List/ListItemFooter.js +9 -4
  36. package/dist/List/ListItemHeader.js +9 -4
  37. package/dist/Loading/Loading.js +13 -4
  38. package/dist/Modal/Modal.js +0 -6
  39. package/dist/Modal/Modal.miniapp.js +4 -10
  40. package/dist/NavBar/NavBar.js +0 -1
  41. package/dist/Picker/Picker.css +0 -5
  42. package/dist/Picker/Picker.js +5 -27
  43. package/dist/Picker/Picker.types.d.ts +2 -15
  44. package/dist/Picker/PickerPanel.css +0 -4
  45. package/dist/Picker/PickerPanel.js +6 -7
  46. package/dist/Popover/Popover.css +5 -5
  47. package/dist/Popover/Popover.js +27 -70
  48. package/dist/Portal/Portal.miniapp.js +4 -7
  49. package/dist/Radio/Radio.css +0 -1
  50. package/dist/Radio/Radio.js +2 -6
  51. package/dist/Radio/RadioGroup.js +0 -3
  52. package/dist/Rating/Rating.js +8 -18
  53. package/dist/ScrollView/ScrollView.js +11 -24
  54. package/dist/ScrollView/ScrollView.types.d.ts +1 -0
  55. package/dist/Select/Select.css +4 -1
  56. package/dist/Select/Select.js +41 -68
  57. package/dist/Skeleton/Skeleton.js +5 -9
  58. package/dist/Slide/Slide.js +69 -74
  59. package/dist/Slider/Slider.js +11 -27
  60. package/dist/Steps/Step.js +81 -82
  61. package/dist/Steps/Steps.d.ts +1 -1
  62. package/dist/Steps/Steps.js +57 -60
  63. package/dist/Switch/Switch.js +75 -78
  64. package/dist/TabBar/TabBar.js +3 -8
  65. package/dist/Tabs/Tab.css +10 -16
  66. package/dist/Tabs/Tab.js +2 -3
  67. package/dist/Tabs/Tabs.css +13 -22
  68. package/dist/Tabs/Tabs.js +39 -70
  69. package/dist/Tabs/Tabs.types.d.ts +0 -10
  70. package/dist/Tabs/utils/bound.d.ts +1 -0
  71. package/dist/{DesktopPicker/utils/calcAfterMounted.js → Tabs/utils/bound.js} +14 -7
  72. package/dist/Tag/Tag.css +1 -1
  73. package/dist/Tag/Tag.js +2 -6
  74. package/dist/TextArea/TextArea.js +5 -12
  75. package/dist/Toast/FunctionalToast.js +1 -1
  76. package/dist/Toast/Toast.css +1 -0
  77. package/dist/Tooltip/Tooltip.css +5 -5
  78. package/dist/Tooltip/Tooltip.js +27 -70
  79. package/dist/Transition/TransitionCore.js +3 -8
  80. package/dist/index.d.ts +0 -6
  81. package/dist/index.js +1 -13
  82. package/dist/locales/base.d.ts +0 -11
  83. package/dist/locales/en-US.js +0 -24
  84. package/dist/locales/zh-CN.js +0 -24
  85. package/dist/locales/zh-TW.js +0 -24
  86. package/es/ActionSheet/ActionSheet.css +2 -2
  87. package/es/ActionSheet/ActionSheetItem.js +3 -8
  88. package/es/Avatar/Avatar.js +3 -8
  89. package/es/Avatar/AvatarGroup.js +2 -6
  90. package/es/Badge/Badge.js +3 -8
  91. package/es/Button/Button.css +77 -78
  92. package/es/Button/Button.d.ts +1 -1
  93. package/es/Button/Button.js +3 -9
  94. package/es/Button/Button.types.d.ts +8 -7
  95. package/es/Calendar/Calendar.js +7 -19
  96. package/es/Calendar/Calendar.types.d.ts +0 -5
  97. package/es/Card/Card.css +1 -1
  98. package/es/Card/CardContent.css +1 -2
  99. package/es/Card/CardFooter.css +2 -4
  100. package/es/Card/CardHeader.css +4 -5
  101. package/es/Checkbox/Checkbox.js +2 -6
  102. package/es/Checkbox/CheckboxGroup.js +4 -7
  103. package/es/Collapse/Collapse.css +1 -0
  104. package/es/Collapse/Collapse.d.ts +1 -1
  105. package/es/Collapse/Collapse.js +8 -11
  106. package/es/CollapsePanel/CollapsePanel.css +2 -4
  107. package/es/CollapsePanel/CollapsePanelItem.js +45 -46
  108. package/es/Countdown/Countdown.js +5 -12
  109. package/es/Dialog/FunctionalDialog.js +2 -2
  110. package/es/Divider/Divider.js +8 -5
  111. package/es/Drawer/Drawer.js +4 -10
  112. package/es/Fade/Fade.js +52 -56
  113. package/es/IconButton/IconButton.js +5 -12
  114. package/es/Image/Image.js +112 -119
  115. package/es/Input/Input.js +4 -10
  116. package/es/List/List.js +3 -8
  117. package/es/List/ListItem.js +42 -44
  118. package/es/List/ListItemContent.js +1 -4
  119. package/es/List/ListItemExtra.js +9 -4
  120. package/es/List/ListItemFooter.js +9 -4
  121. package/es/List/ListItemHeader.js +9 -4
  122. package/es/Loading/Loading.js +13 -4
  123. package/es/Modal/Modal.js +0 -6
  124. package/es/Modal/Modal.miniapp.d.ts +1 -1
  125. package/es/Modal/Modal.miniapp.js +4 -10
  126. package/es/NavBar/NavBar.js +0 -1
  127. package/es/Picker/Picker.css +0 -5
  128. package/es/Picker/Picker.js +5 -27
  129. package/es/Picker/Picker.types.d.ts +2 -15
  130. package/es/Picker/PickerPanel.css +0 -4
  131. package/es/Picker/PickerPanel.js +6 -7
  132. package/es/Popover/Popover.css +5 -5
  133. package/es/Popover/Popover.js +29 -73
  134. package/es/Portal/Portal.miniapp.js +5 -8
  135. package/es/Radio/Radio.css +0 -1
  136. package/es/Radio/Radio.js +2 -6
  137. package/es/Radio/RadioGroup.js +0 -3
  138. package/es/Rating/Rating.js +8 -18
  139. package/es/ScrollView/ScrollView.js +11 -24
  140. package/es/ScrollView/ScrollView.types.d.ts +1 -0
  141. package/es/Select/Select.css +4 -1
  142. package/es/Select/Select.js +42 -68
  143. package/es/Skeleton/Skeleton.js +5 -9
  144. package/es/Slide/Slide.js +69 -74
  145. package/es/Slider/Slider.js +12 -30
  146. package/es/Steps/Step.js +81 -82
  147. package/es/Steps/Steps.d.ts +1 -1
  148. package/es/Steps/Steps.js +57 -60
  149. package/es/Switch/Switch.js +75 -78
  150. package/es/TabBar/TabBar.js +3 -8
  151. package/es/Tabs/Tab.css +10 -16
  152. package/es/Tabs/Tab.js +2 -3
  153. package/es/Tabs/Tabs.css +13 -22
  154. package/es/Tabs/Tabs.js +41 -83
  155. package/es/Tabs/Tabs.types.d.ts +0 -10
  156. package/es/Tabs/utils/bound.d.ts +1 -0
  157. package/es/Tabs/utils/bound.js +13 -0
  158. package/es/Tag/Tag.css +1 -1
  159. package/es/Tag/Tag.js +2 -6
  160. package/es/TextArea/TextArea.js +5 -12
  161. package/es/Toast/FunctionalToast.js +2 -2
  162. package/es/Toast/Toast.css +1 -0
  163. package/es/Tooltip/Tooltip.css +5 -5
  164. package/es/Tooltip/Tooltip.js +29 -73
  165. package/es/Transition/TransitionCore.js +3 -8
  166. package/es/index.d.ts +0 -6
  167. package/es/index.js +0 -6
  168. package/es/locales/base.d.ts +0 -11
  169. package/es/locales/en-US.js +0 -24
  170. package/es/locales/zh-CN.js +0 -24
  171. package/es/locales/zh-TW.js +0 -24
  172. package/package.json +6 -6
  173. package/dist/Collapse/Collapse.miniapp.d.ts +0 -5
  174. package/dist/Collapse/Collapse.miniapp.js +0 -177
  175. package/dist/DatePicker/DatePicker.d.ts +0 -4
  176. package/dist/DatePicker/DatePicker.js +0 -335
  177. package/dist/DatePicker/DatePicker.types.d.ts +0 -36
  178. package/dist/DatePicker/DatePicker.types.js +0 -15
  179. package/dist/DatePicker/constants.d.ts +0 -9
  180. package/dist/DatePicker/constants.js +0 -37
  181. package/dist/DatePicker/index.d.ts +0 -3
  182. package/dist/DatePicker/index.js +0 -44
  183. package/dist/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
  184. package/dist/DesktopDatePicker/DesktopDatePicker.js +0 -280
  185. package/dist/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -163
  186. package/dist/DesktopDatePicker/DesktopDatePicker.types.js +0 -15
  187. package/dist/DesktopDatePicker/deskTopPickerContainer.css +0 -100
  188. package/dist/DesktopDatePicker/index.css +0 -61
  189. package/dist/DesktopDatePicker/index.d.ts +0 -2
  190. package/dist/DesktopDatePicker/index.js +0 -41
  191. package/dist/DesktopDatePicker/useGetDatePickerContent.d.ts +0 -6
  192. package/dist/DesktopDatePicker/useGetDatePickerContent.js +0 -343
  193. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -5
  194. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -322
  195. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -163
  196. package/dist/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -15
  197. package/dist/DesktopDateTimePicker/index.css +0 -66
  198. package/dist/DesktopDateTimePicker/index.d.ts +0 -2
  199. package/dist/DesktopDateTimePicker/index.js +0 -41
  200. package/dist/DesktopPicker/DesktopPicker.d.ts +0 -5
  201. package/dist/DesktopPicker/DesktopPicker.js +0 -238
  202. package/dist/DesktopPicker/DesktopPicker.types.d.ts +0 -57
  203. package/dist/DesktopPicker/DesktopPicker.types.js +0 -15
  204. package/dist/DesktopPicker/index.css +0 -37
  205. package/dist/DesktopPicker/index.d.ts +0 -2
  206. package/dist/DesktopPicker/index.js +0 -41
  207. package/dist/DesktopPicker/utils/calcAfterMounted.d.ts +0 -2
  208. package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +0 -2
  209. package/dist/DesktopPicker/utils/calcAfterMounted.miniapp.js +0 -38
  210. package/dist/DesktopTimePicker/DesktopTimePicker.d.ts +0 -5
  211. package/dist/DesktopTimePicker/DesktopTimePicker.js +0 -288
  212. package/dist/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -182
  213. package/dist/DesktopTimePicker/DesktopTimePicker.types.js +0 -15
  214. package/dist/DesktopTimePicker/DesktopTimePickerList.d.ts +0 -4
  215. package/dist/DesktopTimePicker/DesktopTimePickerList.js +0 -111
  216. package/dist/DesktopTimePicker/index.css +0 -170
  217. package/dist/DesktopTimePicker/index.d.ts +0 -2
  218. package/dist/DesktopTimePicker/index.js +0 -41
  219. package/dist/DesktopTimePicker/useGetTimePickerContent.d.ts +0 -6
  220. package/dist/DesktopTimePicker/useGetTimePickerContent.js +0 -249
  221. package/dist/DesktopTimePicker/utils/scrollUtil.d.ts +0 -2
  222. package/dist/DesktopTimePicker/utils/scrollUtil.js +0 -27
  223. package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +0 -2
  224. package/dist/DesktopTimePicker/utils/scrollUtil.miniapp.js +0 -51
  225. package/dist/DesktopTimePicker/utils/utils.d.ts +0 -28
  226. package/dist/DesktopTimePicker/utils/utils.js +0 -408
  227. package/dist/SwipeAction/SwipeAction.css +0 -79
  228. package/dist/SwipeAction/SwipeAction.d.ts +0 -5
  229. package/dist/SwipeAction/SwipeAction.js +0 -349
  230. package/dist/SwipeAction/SwipeAction.types.d.ts +0 -75
  231. package/dist/SwipeAction/SwipeAction.types.js +0 -15
  232. package/dist/SwipeAction/SwipeActionContext.d.ts +0 -4
  233. package/dist/SwipeAction/SwipeActionContext.js +0 -30
  234. package/dist/SwipeAction/SwipeActionItem.css +0 -31
  235. package/dist/SwipeAction/SwipeActionItem.d.ts +0 -5
  236. package/dist/SwipeAction/SwipeActionItem.js +0 -105
  237. package/dist/SwipeAction/constants.d.ts +0 -9
  238. package/dist/SwipeAction/constants.js +0 -39
  239. package/dist/SwipeAction/index.d.ts +0 -5
  240. package/dist/SwipeAction/index.js +0 -50
  241. package/dist/Tabs/utils/scroll.d.ts +0 -2
  242. package/dist/Tabs/utils/scroll.js +0 -55
  243. package/es/Collapse/Collapse.miniapp.d.ts +0 -5
  244. package/es/Collapse/Collapse.miniapp.js +0 -157
  245. package/es/DatePicker/DatePicker.d.ts +0 -4
  246. package/es/DatePicker/DatePicker.js +0 -308
  247. package/es/DatePicker/DatePicker.types.d.ts +0 -36
  248. package/es/DatePicker/DatePicker.types.js +0 -1
  249. package/es/DatePicker/constants.d.ts +0 -9
  250. package/es/DatePicker/constants.js +0 -14
  251. package/es/DatePicker/index.d.ts +0 -3
  252. package/es/DatePicker/index.js +0 -8
  253. package/es/DesktopDatePicker/DesktopDatePicker.d.ts +0 -5
  254. package/es/DesktopDatePicker/DesktopDatePicker.js +0 -253
  255. package/es/DesktopDatePicker/DesktopDatePicker.types.d.ts +0 -163
  256. package/es/DesktopDatePicker/DesktopDatePicker.types.js +0 -1
  257. package/es/DesktopDatePicker/deskTopPickerContainer.css +0 -100
  258. package/es/DesktopDatePicker/index.css +0 -61
  259. package/es/DesktopDatePicker/index.d.ts +0 -2
  260. package/es/DesktopDatePicker/index.js +0 -6
  261. package/es/DesktopDatePicker/useGetDatePickerContent.d.ts +0 -6
  262. package/es/DesktopDatePicker/useGetDatePickerContent.js +0 -316
  263. package/es/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +0 -5
  264. package/es/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -295
  265. package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +0 -163
  266. package/es/DesktopDateTimePicker/DesktopDateTimePicker.types.js +0 -1
  267. package/es/DesktopDateTimePicker/index.css +0 -66
  268. package/es/DesktopDateTimePicker/index.d.ts +0 -2
  269. package/es/DesktopDateTimePicker/index.js +0 -9
  270. package/es/DesktopPicker/DesktopPicker.d.ts +0 -5
  271. package/es/DesktopPicker/DesktopPicker.js +0 -221
  272. package/es/DesktopPicker/DesktopPicker.types.d.ts +0 -57
  273. package/es/DesktopPicker/DesktopPicker.types.js +0 -1
  274. package/es/DesktopPicker/index.css +0 -37
  275. package/es/DesktopPicker/index.d.ts +0 -2
  276. package/es/DesktopPicker/index.js +0 -6
  277. package/es/DesktopPicker/utils/calcAfterMounted.d.ts +0 -2
  278. package/es/DesktopPicker/utils/calcAfterMounted.js +0 -6
  279. package/es/DesktopPicker/utils/calcAfterMounted.miniapp.d.ts +0 -2
  280. package/es/DesktopPicker/utils/calcAfterMounted.miniapp.js +0 -9
  281. package/es/DesktopTimePicker/DesktopTimePicker.d.ts +0 -5
  282. package/es/DesktopTimePicker/DesktopTimePicker.js +0 -261
  283. package/es/DesktopTimePicker/DesktopTimePicker.types.d.ts +0 -182
  284. package/es/DesktopTimePicker/DesktopTimePicker.types.js +0 -1
  285. package/es/DesktopTimePicker/DesktopTimePickerList.d.ts +0 -4
  286. package/es/DesktopTimePicker/DesktopTimePickerList.js +0 -84
  287. package/es/DesktopTimePicker/index.css +0 -170
  288. package/es/DesktopTimePicker/index.d.ts +0 -2
  289. package/es/DesktopTimePicker/index.js +0 -6
  290. package/es/DesktopTimePicker/useGetTimePickerContent.d.ts +0 -6
  291. package/es/DesktopTimePicker/useGetTimePickerContent.js +0 -226
  292. package/es/DesktopTimePicker/utils/scrollUtil.d.ts +0 -2
  293. package/es/DesktopTimePicker/utils/scrollUtil.js +0 -8
  294. package/es/DesktopTimePicker/utils/scrollUtil.miniapp.d.ts +0 -2
  295. package/es/DesktopTimePicker/utils/scrollUtil.miniapp.js +0 -22
  296. package/es/DesktopTimePicker/utils/utils.d.ts +0 -28
  297. package/es/DesktopTimePicker/utils/utils.js +0 -365
  298. package/es/SwipeAction/SwipeAction.css +0 -79
  299. package/es/SwipeAction/SwipeAction.d.ts +0 -5
  300. package/es/SwipeAction/SwipeAction.js +0 -334
  301. package/es/SwipeAction/SwipeAction.types.d.ts +0 -75
  302. package/es/SwipeAction/SwipeAction.types.js +0 -1
  303. package/es/SwipeAction/SwipeActionContext.d.ts +0 -4
  304. package/es/SwipeAction/SwipeActionContext.js +0 -11
  305. package/es/SwipeAction/SwipeActionItem.css +0 -31
  306. package/es/SwipeAction/SwipeActionItem.d.ts +0 -5
  307. package/es/SwipeAction/SwipeActionItem.js +0 -78
  308. package/es/SwipeAction/constants.d.ts +0 -9
  309. package/es/SwipeAction/constants.js +0 -15
  310. package/es/SwipeAction/index.d.ts +0 -5
  311. package/es/SwipeAction/index.js +0 -12
  312. package/es/Tabs/utils/scroll.d.ts +0 -2
  313. package/es/Tabs/utils/scroll.js +0 -36
@@ -33,52 +33,50 @@ import ListContext from "./ListContext";
33
33
  import ListItemFooter from "./ListItemFooter";
34
34
  import "./ListItem.css";
35
35
  const prefixCls = "bui-list-item";
36
- const ListItem = /* @__PURE__ */ React.forwardRef((props, ref) => {
37
- const _a = props, {
38
- children,
39
- className,
40
- hideDivider,
41
- disabled,
42
- onClick,
43
- endIcon,
44
- component: Component
45
- } = _a, others = __objRest(_a, [
46
- "children",
47
- "className",
48
- "hideDivider",
49
- "disabled",
50
- "onClick",
51
- "endIcon",
52
- "component"
53
- ]);
54
- let chevron;
55
- if (typeof endIcon === "boolean") {
56
- chevron = endIcon && /* @__PURE__ */ React.createElement(ArrowForwardIcon, { size: "small" });
57
- } else if (React.isValidElement(endIcon)) {
58
- chevron = endIcon;
59
- } else {
60
- chevron = onClick && /* @__PURE__ */ React.createElement(ArrowForwardIcon, { size: "small" });
61
- }
62
- const context = React.useContext(ListContext);
63
- return /* @__PURE__ */ React.createElement(
64
- Component,
65
- __spreadValues({
66
- className: clsx(prefixCls, className, {
67
- [`${prefixCls}-divider`]: !(hideDivider || context.hideDivider),
68
- [`${prefixCls}-disabled`]: disabled
69
- }),
36
+ const ListItem = /* @__PURE__ */ React.forwardRef(
37
+ (_a, ref) => {
38
+ var _b = _a, {
39
+ children,
40
+ className,
41
+ hideDivider = false,
42
+ disabled,
70
43
  onClick,
71
- ref
72
- }, others),
73
- children,
74
- chevron && /* @__PURE__ */ React.createElement(ListItemFooter, null, chevron)
75
- );
76
- });
44
+ endIcon,
45
+ component: Component = "div"
46
+ } = _b, others = __objRest(_b, [
47
+ "children",
48
+ "className",
49
+ "hideDivider",
50
+ "disabled",
51
+ "onClick",
52
+ "endIcon",
53
+ "component"
54
+ ]);
55
+ let chevron;
56
+ if (typeof endIcon === "boolean") {
57
+ chevron = endIcon && /* @__PURE__ */ React.createElement(ArrowForwardIcon, { size: "small" });
58
+ } else if (React.isValidElement(endIcon)) {
59
+ chevron = endIcon;
60
+ } else {
61
+ chevron = onClick && /* @__PURE__ */ React.createElement(ArrowForwardIcon, { size: "small" });
62
+ }
63
+ const context = React.useContext(ListContext);
64
+ return /* @__PURE__ */ React.createElement(
65
+ Component,
66
+ __spreadValues({
67
+ className: clsx(prefixCls, className, {
68
+ [`${prefixCls}-divider`]: !(hideDivider || context.hideDivider),
69
+ [`${prefixCls}-disabled`]: disabled
70
+ }),
71
+ onClick,
72
+ ref
73
+ }, others),
74
+ children,
75
+ chevron && /* @__PURE__ */ React.createElement(ListItemFooter, null, chevron)
76
+ );
77
+ }
78
+ );
77
79
  ListItem.displayName = "BuiListItem";
78
- ListItem.defaultProps = {
79
- component: "div",
80
- hideDivider: false
81
- };
82
80
  var ListItem_default = ListItem;
83
81
  export {
84
82
  ListItem_default as default
@@ -35,7 +35,7 @@ const ListItemContent = /* @__PURE__ */ React.forwardRef(
35
35
  const _a = props, {
36
36
  children,
37
37
  className,
38
- component: Component,
38
+ component: Component = "div",
39
39
  primary,
40
40
  secondary
41
41
  } = _a, others = __objRest(_a, [
@@ -49,9 +49,6 @@ const ListItemContent = /* @__PURE__ */ React.forwardRef(
49
49
  }
50
50
  );
51
51
  ListItemContent.displayName = "BuiListItemContent";
52
- ListItemContent.defaultProps = {
53
- component: "div"
54
- };
55
52
  var ListItemContent_default = ListItemContent;
56
53
  export {
57
54
  ListItemContent_default as default
@@ -32,14 +32,19 @@ import "./ListItemExtra.css";
32
32
  const prefixCls = "bui-list-item-extra";
33
33
  const ListItemExtra = /* @__PURE__ */ React.forwardRef(
34
34
  (props, ref) => {
35
- const _a = props, { children, className, component: Component } = _a, others = __objRest(_a, ["children", "className", "component"]);
35
+ const _a = props, {
36
+ children,
37
+ className,
38
+ component: Component = "div"
39
+ } = _a, others = __objRest(_a, [
40
+ "children",
41
+ "className",
42
+ "component"
43
+ ]);
36
44
  return /* @__PURE__ */ React.createElement(Component, __spreadValues({ className: clsx(prefixCls, className), ref }, others), children);
37
45
  }
38
46
  );
39
47
  ListItemExtra.displayName = "BuiListItemExtra";
40
- ListItemExtra.defaultProps = {
41
- component: "div"
42
- };
43
48
  var ListItemExtra_default = ListItemExtra;
44
49
  export {
45
50
  ListItemExtra_default as default
@@ -32,14 +32,19 @@ import "./ListItemFooter.css";
32
32
  const prefixCls = "bui-list-item-footer";
33
33
  const ListItemFooter = /* @__PURE__ */ React.forwardRef(
34
34
  (props, ref) => {
35
- const _a = props, { children, className, component: Component } = _a, others = __objRest(_a, ["children", "className", "component"]);
35
+ const _a = props, {
36
+ children,
37
+ className,
38
+ component: Component = "div"
39
+ } = _a, others = __objRest(_a, [
40
+ "children",
41
+ "className",
42
+ "component"
43
+ ]);
36
44
  return /* @__PURE__ */ React.createElement(Component, __spreadValues({ className: clsx(prefixCls, className), ref }, others), children);
37
45
  }
38
46
  );
39
47
  ListItemFooter.displayName = "BuiListItemFooter";
40
- ListItemFooter.defaultProps = {
41
- component: "div"
42
- };
43
48
  var ListItemFooter_default = ListItemFooter;
44
49
  export {
45
50
  ListItemFooter_default as default
@@ -32,14 +32,19 @@ import "./ListItemHeader.css";
32
32
  const prefixCls = "bui-list-item-header";
33
33
  const ListItemHeader = /* @__PURE__ */ React.forwardRef(
34
34
  (props, ref) => {
35
- const _a = props, { children, className, component: Component } = _a, others = __objRest(_a, ["children", "className", "component"]);
35
+ const _a = props, {
36
+ children,
37
+ className,
38
+ component: Component = "div"
39
+ } = _a, others = __objRest(_a, [
40
+ "children",
41
+ "className",
42
+ "component"
43
+ ]);
36
44
  return /* @__PURE__ */ React.createElement(Component, __spreadValues({ className: clsx(prefixCls, className), ref }, others), children);
37
45
  }
38
46
  );
39
47
  ListItemHeader.displayName = "BuiListItemHeader";
40
- ListItemHeader.defaultProps = {
41
- component: "div"
42
- };
43
48
  var ListItemHeader_default = ListItemHeader;
44
49
  export {
45
50
  ListItemHeader_default as default
@@ -32,7 +32,19 @@ import { LoadingThreeQuartersOutlinedIcon } from "@bifrostui/icons";
32
32
  import "./Loading.css";
33
33
  const prefixCls = "bui-loading";
34
34
  const Loading = /* @__PURE__ */ React.forwardRef((props, ref) => {
35
- const _a = props, { className, icon, IconProps, children, direction } = _a, otherProps = __objRest(_a, ["className", "icon", "IconProps", "children", "direction"]);
35
+ const _a = props, {
36
+ className,
37
+ icon,
38
+ IconProps,
39
+ children,
40
+ direction = "vertical"
41
+ } = _a, otherProps = __objRest(_a, [
42
+ "className",
43
+ "icon",
44
+ "IconProps",
45
+ "children",
46
+ "direction"
47
+ ]);
36
48
  const renderIcon = () => {
37
49
  return icon != null ? icon : /* @__PURE__ */ React.createElement(
38
50
  LoadingThreeQuartersOutlinedIcon,
@@ -52,9 +64,6 @@ const Loading = /* @__PURE__ */ React.forwardRef((props, ref) => {
52
64
  );
53
65
  });
54
66
  Loading.displayName = "BuiLoading";
55
- Loading.defaultProps = {
56
- direction: "vertical"
57
- };
58
67
  var Loading_default = Loading;
59
68
  export {
60
69
  Loading_default as default
package/es/Modal/Modal.js CHANGED
@@ -106,12 +106,6 @@ const Modal = /* @__PURE__ */ React.forwardRef((props, ref) => {
106
106
  ) : null, (open || keepMounted) && children));
107
107
  });
108
108
  Modal.displayName = "BuiModal";
109
- Modal.defaultProps = {
110
- open: false,
111
- disablePortal: false,
112
- disableScrollLock: false,
113
- hideBackdrop: false
114
- };
115
109
  var Modal_default = Modal;
116
110
  export {
117
111
  Modal_default as default
@@ -12,5 +12,5 @@ declare const Modal: React.ForwardRefExoticComponent<Omit<ViewProps & {
12
12
  keepMounted?: boolean;
13
13
  } & import("@bifrostui/types").ICommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
14
  ref?: React.Ref<HTMLDivElement>;
15
- }, "open" | keyof import("@bifrostui/types").ICommonProps | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ }, keyof import("@bifrostui/types").ICommonProps | "container" | "open" | "BackdropProps" | "onClose" | "disablePortal" | "keepMounted" | "hideBackdrop" | "disableScrollLock">, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
16
  export default Modal;
@@ -41,13 +41,13 @@ const Modal = /* @__PURE__ */ React.forwardRef(
41
41
  (props, ref) => {
42
42
  const _a = props, {
43
43
  className,
44
- open,
44
+ open = false,
45
45
  BackdropProps,
46
46
  children,
47
47
  container,
48
- disablePortal,
49
- disableScrollLock,
50
- hideBackdrop,
48
+ disablePortal = false,
49
+ disableScrollLock = false,
50
+ hideBackdrop = false,
51
51
  onClose,
52
52
  keepMounted
53
53
  } = _a, others = __objRest(_a, [
@@ -103,12 +103,6 @@ const Modal = /* @__PURE__ */ React.forwardRef(
103
103
  }
104
104
  );
105
105
  Modal.displayName = "BuiModal";
106
- Modal.defaultProps = {
107
- open: false,
108
- disablePortal: false,
109
- disableScrollLock: false,
110
- hideBackdrop: false
111
- };
112
106
  var Modal_miniapp_default = Modal;
113
107
  export {
114
108
  Modal_miniapp_default as default
@@ -103,7 +103,6 @@ const NavBar = /* @__PURE__ */ React.forwardRef((props, ref) => {
103
103
  return /* @__PURE__ */ React.createElement(React.Fragment, null, renderNavBar(), renderPlaceholder());
104
104
  });
105
105
  NavBar.displayName = "BuiNavBar";
106
- NavBar.defaultProps = {};
107
106
  var NavBar_default = NavBar;
108
107
  export {
109
108
  NavBar_default as default
@@ -8,7 +8,6 @@
8
8
  --panel-container-height: var(--bui-picker-panel-height, 260px);
9
9
  --indicator-top: var(--bui-picker-indicator-top, 108px);
10
10
  --option-height: var(--bui-picker-option-height, 36px);
11
- --bui-picker-confirm-disabled-opacity: 0.38;
12
11
  font-family: var(--bui-font-family);
13
12
  }
14
13
  .bui-picker .bui-drawer-content {
@@ -42,10 +41,6 @@
42
41
  line-height: var(--confirm-line-height);
43
42
  color: var(--bui-color-primary);
44
43
  }
45
- .bui-picker-confirm-disabled {
46
- color: var(--bui-color-fg-default);
47
- opacity: var(--bui-picker-confirm-disabled-opacity);
48
- }
49
44
  .bui-picker-container {
50
45
  width: 100%;
51
46
  height: var(--panel-container-height);
@@ -37,12 +37,6 @@ import { useLocaleText } from "../locales";
37
37
  import { formatOptions, pickerPanelType, safeData } from "./utils";
38
38
  import "./Picker.css";
39
39
  const prefixCls = "bui-picker";
40
- const checkDisabled = (values, columns) => values.find(
41
- (value, index) => {
42
- var _a, _b;
43
- return (_b = (_a = columns == null ? void 0 : columns[index]) == null ? void 0 : _a.find((column) => (column == null ? void 0 : column.value) === value)) == null ? void 0 : _b.disabled;
44
- }
45
- );
46
40
  const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
47
41
  const _a = props, {
48
42
  className,
@@ -50,8 +44,6 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
50
44
  title,
51
45
  options = [],
52
46
  value,
53
- confirmText: propConfirmText,
54
- cancelText: propCancelText,
55
47
  contentProps,
56
48
  onConfirm,
57
49
  onOptionChange,
@@ -63,8 +55,6 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
63
55
  "title",
64
56
  "options",
65
57
  "value",
66
- "confirmText",
67
- "cancelText",
68
58
  "contentProps",
69
59
  "onConfirm",
70
60
  "onOptionChange",
@@ -76,7 +66,6 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
76
66
  const [columns, setColumns] = useState([]);
77
67
  const [internalValue, setInternalValue] = useState([]);
78
68
  const { cancel: cancelText, confirm: confirmText } = useLocaleText("picker");
79
- const disabled = checkDisabled(internalValue, columns);
80
69
  useEffect(() => {
81
70
  if (!open)
82
71
  return;
@@ -99,7 +88,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
99
88
  }, [value, options]);
100
89
  const confirm = (e) => {
101
90
  const isMoving = rollerRefs.current.some((roller) => roller == null ? void 0 : roller.isMoving);
102
- if (isMoving || disabled)
91
+ if (isMoving)
103
92
  return;
104
93
  const { safeValue } = safeData({
105
94
  value: internalValue,
@@ -158,8 +147,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
158
147
  onOptionChange == null ? void 0 : onOptionChange(e, {
159
148
  value: conbineValues,
160
149
  options: formatted,
161
- currentOption: columnOption,
162
- columnIndex
150
+ currentOption: columnOption
163
151
  });
164
152
  } else {
165
153
  const result = [...internalValue];
@@ -168,8 +156,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
168
156
  onOptionChange == null ? void 0 : onOptionChange(e, {
169
157
  value: result,
170
158
  options,
171
- currentOption: columnOption,
172
- columnIndex
159
+ currentOption: columnOption
173
160
  });
174
161
  }
175
162
  }
@@ -211,16 +198,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
211
198
  __spreadProps(__spreadValues({}, contentProps), {
212
199
  className: clsx(`${prefixCls}-content`, contentProps == null ? void 0 : contentProps.className)
213
200
  }),
214
- /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-cancel`, onClick: cancel }, propCancelText || cancelText), title && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-title` }, title), /* @__PURE__ */ React.createElement(
215
- "div",
216
- {
217
- className: clsx(`${prefixCls}-confirm`, {
218
- [`${prefixCls}-confirm-disabled`]: disabled
219
- }),
220
- onClick: confirm
221
- },
222
- propConfirmText || confirmText
223
- )),
201
+ /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-cancel`, onClick: cancel }, cancelText), title && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-title` }, title), /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-confirm`, onClick: confirm }, confirmText)),
224
202
  /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-container` }, columns.map((column, index) => /* @__PURE__ */ React.createElement(
225
203
  PickerPanel,
226
204
  {
@@ -228,7 +206,7 @@ const Picker = /* @__PURE__ */ React.forwardRef((props, ref) => {
228
206
  key: index,
229
207
  options: column,
230
208
  columnIndex: index,
231
- value: internalValue == null ? void 0 : internalValue[index],
209
+ defaultValue: internalValue == null ? void 0 : internalValue[index],
232
210
  onSelect: handleSelect,
233
211
  pickerStyle: others == null ? void 0 : others.style
234
212
  }
@@ -10,10 +10,6 @@ export interface IPickerOptionItem {
10
10
  * 选项对应唯一的值
11
11
  */
12
12
  value: string | number;
13
- /**
14
- * 是否禁用
15
- */
16
- disabled?: boolean;
17
13
  }
18
14
  export type ICascadePickerChildOptionItem = IPickerOptionItem & {
19
15
  /**
@@ -38,14 +34,6 @@ export type PickerProps<D extends React.ElementType = 'div', P = DrawerProps> =
38
34
  * 标题
39
35
  */
40
36
  title?: string;
41
- /**
42
- * 确认文本内容
43
- */
44
- confirmText?: string;
45
- /**
46
- * 取消文本内容
47
- */
48
- cancelText?: string;
49
37
  /**
50
38
  * 列表数据
51
39
  * @default []
@@ -73,7 +61,6 @@ export type PickerProps<D extends React.ElementType = 'div', P = DrawerProps> =
73
61
  value: (string | number)[];
74
62
  options: ICascadePickerChildOptionItem[][];
75
63
  currentOption: ICascadePickerChildOptionItem;
76
- columnIndex: number;
77
64
  }) => void;
78
65
  /**
79
66
  * 点击取消按钮时候回调
@@ -98,9 +85,9 @@ export type PickerPanelProps<D extends React.ElementType = 'div', P = {}> = Over
98
85
  */
99
86
  options?: ICascadePickerChildOptionItem[];
100
87
  /**
101
- * 选中值
88
+ * 默认值
102
89
  */
103
- value?: string | number;
90
+ defaultValue?: string | number;
104
91
  /**
105
92
  * 列索引
106
93
  */
@@ -1,5 +1,4 @@
1
1
  .bui-picker-panel {
2
- --bui-picker-option-disabled-opacity: 0.38;
3
2
  flex: 1;
4
3
  flex-shrink: 0;
5
4
  position: relative;
@@ -57,9 +56,6 @@
57
56
  white-space: nowrap;
58
57
  width: 100%;
59
58
  }
60
- .bui-picker-panel-option-disabled {
61
- opacity: var(--bui-picker-option-disabled-opacity);
62
- }
63
59
  .bui-picker-panel-option-hidden {
64
60
  visibility: hidden;
65
61
  opacity: 0;
@@ -36,13 +36,13 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
36
36
  var _b;
37
37
  const _a = props, {
38
38
  options = [],
39
- value,
39
+ defaultValue,
40
40
  onSelect,
41
41
  columnIndex,
42
42
  pickerStyle
43
43
  } = _a, others = __objRest(_a, [
44
44
  "options",
45
- "value",
45
+ "defaultValue",
46
46
  "onSelect",
47
47
  "columnIndex",
48
48
  "pickerStyle"
@@ -72,9 +72,9 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
72
72
  useTouchEmulator(PickerPanelRef.current);
73
73
  const updateSelect = () => {
74
74
  let index = -1;
75
- if (value) {
75
+ if (defaultValue) {
76
76
  options.some((item, idx) => {
77
- if (item.value === value) {
77
+ if (item.value === defaultValue) {
78
78
  index = idx;
79
79
  return true;
80
80
  }
@@ -92,7 +92,7 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
92
92
  return () => {
93
93
  clearTimeout(timer);
94
94
  };
95
- }, [options, value]);
95
+ }, [options]);
96
96
  const setTransform = (type, deg, time = DEFAULT_DURATION, translateY = 0) => {
97
97
  let nTime = time;
98
98
  if (type !== TOUCH_END) {
@@ -225,8 +225,7 @@ const PickerPanel = /* @__PURE__ */ React.forwardRef(
225
225
  "div",
226
226
  {
227
227
  className: clsx(`${prefixCls}-option`, {
228
- [`${prefixCls}-option-hidden`]: i + 1 <= currIndex - 8 || i + 1 >= currIndex + 8,
229
- [`${prefixCls}-option-disabled`]: item == null ? void 0 : item.disabled
228
+ [`${prefixCls}-option-hidden`]: i + 1 <= currIndex - 8 || i + 1 >= currIndex + 8
230
229
  }),
231
230
  key: `${item == null ? void 0 : item.value}-${i}`,
232
231
  style: {
@@ -1,6 +1,6 @@
1
1
  .bui-popover {
2
2
  --arrow-size: var(--bui-popover-arrow-size, 8PX);
3
- --localtion-position: var(--bui-popover-localtion-position, 8PX);
3
+ --location-position: var(--bui-popover-location-position, 8PX);
4
4
  --max-width: var(--bui-popover-max-width, 350px);
5
5
  --content-min-width: var(--bui-popover-content-min-width, 30px);
6
6
  --content-padding: var(--bui-popover-content-padding, 6px 8px);
@@ -16,16 +16,16 @@
16
16
  position: absolute;
17
17
  }
18
18
  .bui-popover .bui-popover-arrow.location-left {
19
- left: var(--localtion-position);
19
+ left: var(--location-position);
20
20
  }
21
21
  .bui-popover .bui-popover-arrow.location-right {
22
- right: var(--localtion-position);
22
+ right: var(--location-position);
23
23
  }
24
24
  .bui-popover .bui-popover-arrow.location-top {
25
- top: var(--localtion-position);
25
+ top: var(--location-position);
26
26
  }
27
27
  .bui-popover .bui-popover-arrow.location-bottom {
28
- bottom: var(--localtion-position);
28
+ bottom: var(--location-position);
29
29
  }
30
30
  .bui-popover.popover-top .location-center,
31
31
  .bui-popover.popover-bottom .location-center {