@bifrostui/react 0.0.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 (779) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -0
  3. package/dist/ActionSheet/ActionSheet.css +27 -0
  4. package/dist/ActionSheet/ActionSheet.d.ts +5 -0
  5. package/dist/ActionSheet/ActionSheet.js +66 -0
  6. package/dist/ActionSheet/ActionSheet.types.d.ts +28 -0
  7. package/dist/ActionSheet/ActionSheet.types.js +5 -0
  8. package/dist/ActionSheet/ActionSheetContext.d.ts +4 -0
  9. package/dist/ActionSheet/ActionSheetContext.js +11 -0
  10. package/dist/ActionSheet/ActionSheetItem.css +51 -0
  11. package/dist/ActionSheet/ActionSheetItem.d.ts +5 -0
  12. package/dist/ActionSheet/ActionSheetItem.js +58 -0
  13. package/dist/ActionSheet/ActionSheetItem.types.d.ts +38 -0
  14. package/dist/ActionSheet/ActionSheetItem.types.js +5 -0
  15. package/dist/ActionSheet/index.d.ts +4 -0
  16. package/dist/ActionSheet/index.js +54 -0
  17. package/dist/Alert/Alert.d.ts +5 -0
  18. package/dist/Alert/Alert.js +115 -0
  19. package/dist/Alert/Alert.types.d.ts +61 -0
  20. package/dist/Alert/Alert.types.js +5 -0
  21. package/dist/Alert/index.css +89 -0
  22. package/dist/Alert/index.d.ts +4 -0
  23. package/dist/Alert/index.js +34 -0
  24. package/dist/Avatar/Avatar.css +43 -0
  25. package/dist/Avatar/Avatar.d.ts +5 -0
  26. package/dist/Avatar/Avatar.js +59 -0
  27. package/dist/Avatar/Avatar.types.d.ts +46 -0
  28. package/dist/Avatar/Avatar.types.js +5 -0
  29. package/dist/Avatar/AvatarGroup.css +31 -0
  30. package/dist/Avatar/AvatarGroup.d.ts +5 -0
  31. package/dist/Avatar/AvatarGroup.js +69 -0
  32. package/dist/Avatar/AvatarGroup.types.d.ts +27 -0
  33. package/dist/Avatar/AvatarGroup.types.js +5 -0
  34. package/dist/Avatar/index.d.ts +6 -0
  35. package/dist/Avatar/index.js +54 -0
  36. package/dist/Backdrop/Backdrop.css +14 -0
  37. package/dist/Backdrop/Backdrop.d.ts +5 -0
  38. package/dist/Backdrop/Backdrop.js +34 -0
  39. package/dist/Backdrop/Backdrop.types.d.ts +17 -0
  40. package/dist/Backdrop/Backdrop.types.js +5 -0
  41. package/dist/Backdrop/index.d.ts +2 -0
  42. package/dist/Backdrop/index.js +34 -0
  43. package/dist/Badge/Badge.css +95 -0
  44. package/dist/Badge/Badge.d.ts +5 -0
  45. package/dist/Badge/Badge.js +42 -0
  46. package/dist/Badge/Badge.types.d.ts +27 -0
  47. package/dist/Badge/Badge.types.js +5 -0
  48. package/dist/Badge/index.d.ts +2 -0
  49. package/dist/Badge/index.js +34 -0
  50. package/dist/Button/Button.css +200 -0
  51. package/dist/Button/Button.d.ts +5 -0
  52. package/dist/Button/Button.js +53 -0
  53. package/dist/Button/Button.types.d.ts +52 -0
  54. package/dist/Button/Button.types.js +5 -0
  55. package/dist/Button/index.d.ts +2 -0
  56. package/dist/Button/index.js +34 -0
  57. package/dist/Calendar/Calendar.css +105 -0
  58. package/dist/Calendar/Calendar.d.ts +5 -0
  59. package/dist/Calendar/Calendar.js +275 -0
  60. package/dist/Calendar/Calendar.types.d.ts +76 -0
  61. package/dist/Calendar/Calendar.types.js +5 -0
  62. package/dist/Calendar/index.d.ts +2 -0
  63. package/dist/Calendar/index.js +34 -0
  64. package/dist/Calendar/utils.d.ts +25 -0
  65. package/dist/Calendar/utils.js +77 -0
  66. package/dist/Card/Card.css +9 -0
  67. package/dist/Card/Card.d.ts +5 -0
  68. package/dist/Card/Card.js +27 -0
  69. package/dist/Card/Card.types.d.ts +6 -0
  70. package/dist/Card/Card.types.js +5 -0
  71. package/dist/Card/CardContent.css +6 -0
  72. package/dist/Card/CardContent.d.ts +5 -0
  73. package/dist/Card/CardContent.js +25 -0
  74. package/dist/Card/CardContent.types.d.ts +6 -0
  75. package/dist/Card/CardContent.types.js +5 -0
  76. package/dist/Card/CardFooter.css +8 -0
  77. package/dist/Card/CardFooter.d.ts +5 -0
  78. package/dist/Card/CardFooter.js +25 -0
  79. package/dist/Card/CardFooter.types.d.ts +6 -0
  80. package/dist/Card/CardFooter.types.js +5 -0
  81. package/dist/Card/CardHeader.css +45 -0
  82. package/dist/Card/CardHeader.d.ts +5 -0
  83. package/dist/Card/CardHeader.js +59 -0
  84. package/dist/Card/CardHeader.types.d.ts +23 -0
  85. package/dist/Card/CardHeader.types.js +5 -0
  86. package/dist/Card/index.d.ts +10 -0
  87. package/dist/Card/index.js +94 -0
  88. package/dist/Checkbox/Checkbox.css +45 -0
  89. package/dist/Checkbox/Checkbox.d.ts +5 -0
  90. package/dist/Checkbox/Checkbox.js +101 -0
  91. package/dist/Checkbox/Checkbox.types.d.ts +84 -0
  92. package/dist/Checkbox/Checkbox.types.js +5 -0
  93. package/dist/Checkbox/CheckboxContext.d.ts +5 -0
  94. package/dist/Checkbox/CheckboxContext.js +11 -0
  95. package/dist/Checkbox/CheckboxGroup.d.ts +5 -0
  96. package/dist/Checkbox/CheckboxGroup.js +57 -0
  97. package/dist/Checkbox/index.d.ts +3 -0
  98. package/dist/Checkbox/index.js +42 -0
  99. package/dist/Countdown/Countdown.css +28 -0
  100. package/dist/Countdown/Countdown.d.ts +5 -0
  101. package/dist/Countdown/Countdown.js +103 -0
  102. package/dist/Countdown/Countdown.types.d.ts +123 -0
  103. package/dist/Countdown/Countdown.types.js +5 -0
  104. package/dist/Countdown/index.d.ts +3 -0
  105. package/dist/Countdown/index.js +46 -0
  106. package/dist/Countdown/useCountdown.d.ts +10 -0
  107. package/dist/Countdown/useCountdown.js +47 -0
  108. package/dist/Countdown/utils.d.ts +9 -0
  109. package/dist/Countdown/utils.js +124 -0
  110. package/dist/Divider/Divider.css +41 -0
  111. package/dist/Divider/Divider.d.ts +5 -0
  112. package/dist/Divider/Divider.js +64 -0
  113. package/dist/Divider/Divider.types.d.ts +19 -0
  114. package/dist/Divider/Divider.types.js +5 -0
  115. package/dist/Divider/index.d.ts +2 -0
  116. package/dist/Divider/index.js +34 -0
  117. package/dist/Drawer/Drawer.css +35 -0
  118. package/dist/Drawer/Drawer.d.ts +5 -0
  119. package/dist/Drawer/Drawer.js +66 -0
  120. package/dist/Drawer/Drawer.types.d.ts +51 -0
  121. package/dist/Drawer/Drawer.types.js +5 -0
  122. package/dist/Drawer/index.d.ts +2 -0
  123. package/dist/Drawer/index.js +34 -0
  124. package/dist/Fade/Fade.d.ts +4 -0
  125. package/dist/Fade/Fade.js +72 -0
  126. package/dist/Fade/Fade.types.d.ts +9 -0
  127. package/dist/Fade/Fade.types.js +5 -0
  128. package/dist/Fade/index.d.ts +3 -0
  129. package/dist/Fade/index.js +34 -0
  130. package/dist/IconButton/IconButton.css +130 -0
  131. package/dist/IconButton/IconButton.d.ts +5 -0
  132. package/dist/IconButton/IconButton.js +50 -0
  133. package/dist/IconButton/IconButton.types.d.ts +41 -0
  134. package/dist/IconButton/IconButton.types.js +5 -0
  135. package/dist/IconButton/index.d.ts +2 -0
  136. package/dist/IconButton/index.js +34 -0
  137. package/dist/Image/Image.d.ts +5 -0
  138. package/dist/Image/Image.js +123 -0
  139. package/dist/Image/Image.types.d.ts +48 -0
  140. package/dist/Image/Image.types.js +5 -0
  141. package/dist/Image/index.css +35 -0
  142. package/dist/Image/index.d.ts +3 -0
  143. package/dist/Image/index.js +34 -0
  144. package/dist/Input/Input.css +59 -0
  145. package/dist/Input/Input.d.ts +5 -0
  146. package/dist/Input/Input.js +115 -0
  147. package/dist/Input/Input.types.d.ts +70 -0
  148. package/dist/Input/Input.types.js +5 -0
  149. package/dist/Input/index.d.ts +2 -0
  150. package/dist/Input/index.js +34 -0
  151. package/dist/List/List.css +9 -0
  152. package/dist/List/List.d.ts +5 -0
  153. package/dist/List/List.js +43 -0
  154. package/dist/List/List.types.d.ts +22 -0
  155. package/dist/List/List.types.js +5 -0
  156. package/dist/List/ListContext.d.ts +7 -0
  157. package/dist/List/ListContext.js +12 -0
  158. package/dist/List/ListItem.css +23 -0
  159. package/dist/List/ListItem.d.ts +5 -0
  160. package/dist/List/ListItem.js +57 -0
  161. package/dist/List/ListItem.types.d.ts +20 -0
  162. package/dist/List/ListItem.types.js +5 -0
  163. package/dist/List/ListItemContent.css +18 -0
  164. package/dist/List/ListItemContent.d.ts +5 -0
  165. package/dist/List/ListItemContent.js +37 -0
  166. package/dist/List/ListItemContent.types.d.ts +16 -0
  167. package/dist/List/ListItemContent.types.js +5 -0
  168. package/dist/List/ListItemExtra.css +7 -0
  169. package/dist/List/ListItemExtra.d.ts +5 -0
  170. package/dist/List/ListItemExtra.js +29 -0
  171. package/dist/List/ListItemExtra.types.d.ts +8 -0
  172. package/dist/List/ListItemExtra.types.js +5 -0
  173. package/dist/List/ListItemFooter.css +9 -0
  174. package/dist/List/ListItemFooter.d.ts +5 -0
  175. package/dist/List/ListItemFooter.js +29 -0
  176. package/dist/List/ListItemFooter.types.d.ts +8 -0
  177. package/dist/List/ListItemFooter.types.js +5 -0
  178. package/dist/List/ListItemHeader.css +7 -0
  179. package/dist/List/ListItemHeader.d.ts +5 -0
  180. package/dist/List/ListItemHeader.js +29 -0
  181. package/dist/List/ListItemHeader.types.d.ts +8 -0
  182. package/dist/List/ListItemHeader.types.js +5 -0
  183. package/dist/List/index.d.ts +13 -0
  184. package/dist/List/index.js +134 -0
  185. package/dist/Loading/Loading.css +31 -0
  186. package/dist/Loading/Loading.d.ts +5 -0
  187. package/dist/Loading/Loading.js +39 -0
  188. package/dist/Loading/Loading.types.d.ts +20 -0
  189. package/dist/Loading/Loading.types.js +5 -0
  190. package/dist/Loading/index.d.ts +2 -0
  191. package/dist/Loading/index.js +34 -0
  192. package/dist/Modal/Modal.css +15 -0
  193. package/dist/Modal/Modal.d.ts +5 -0
  194. package/dist/Modal/Modal.js +89 -0
  195. package/dist/Modal/Modal.types.d.ts +20 -0
  196. package/dist/Modal/Modal.types.js +5 -0
  197. package/dist/Modal/index.d.ts +3 -0
  198. package/dist/Modal/index.js +34 -0
  199. package/dist/NavBar/NavBar.css +57 -0
  200. package/dist/NavBar/NavBar.d.ts +5 -0
  201. package/dist/NavBar/NavBar.js +87 -0
  202. package/dist/NavBar/NavBar.types.d.ts +44 -0
  203. package/dist/NavBar/NavBar.types.js +5 -0
  204. package/dist/NavBar/index.d.ts +2 -0
  205. package/dist/NavBar/index.js +34 -0
  206. package/dist/Portal/Portal.d.ts +4 -0
  207. package/dist/Portal/Portal.js +18 -0
  208. package/dist/Portal/Portal.miniapp.d.ts +4 -0
  209. package/dist/Portal/Portal.miniapp.js +44 -0
  210. package/dist/Portal/Portal.types.d.ts +22 -0
  211. package/dist/Portal/Portal.types.js +5 -0
  212. package/dist/Portal/PortalCore.d.ts +8 -0
  213. package/dist/Portal/PortalCore.js +57 -0
  214. package/dist/Portal/index.d.ts +3 -0
  215. package/dist/Portal/index.js +34 -0
  216. package/dist/Progress/Progress.css +22 -0
  217. package/dist/Progress/Progress.d.ts +8 -0
  218. package/dist/Progress/Progress.js +89 -0
  219. package/dist/Progress/Progress.types.d.ts +28 -0
  220. package/dist/Progress/Progress.types.js +5 -0
  221. package/dist/Progress/index.d.ts +3 -0
  222. package/dist/Progress/index.js +34 -0
  223. package/dist/Radio/Radio.css +65 -0
  224. package/dist/Radio/Radio.d.ts +5 -0
  225. package/dist/Radio/Radio.js +120 -0
  226. package/dist/Radio/Radio.types.d.ts +83 -0
  227. package/dist/Radio/Radio.types.js +5 -0
  228. package/dist/Radio/RadioButtonIcon.d.ts +12 -0
  229. package/dist/Radio/RadioButtonIcon.js +38 -0
  230. package/dist/Radio/RadioContext.d.ts +5 -0
  231. package/dist/Radio/RadioContext.js +11 -0
  232. package/dist/Radio/RadioGroup.d.ts +5 -0
  233. package/dist/Radio/RadioGroup.js +51 -0
  234. package/dist/Radio/index.d.ts +3 -0
  235. package/dist/Radio/index.js +42 -0
  236. package/dist/Rating/Rating.css +52 -0
  237. package/dist/Rating/Rating.d.ts +5 -0
  238. package/dist/Rating/Rating.js +100 -0
  239. package/dist/Rating/Rating.types.d.ts +66 -0
  240. package/dist/Rating/Rating.types.js +5 -0
  241. package/dist/Rating/index.d.ts +2 -0
  242. package/dist/Rating/index.js +34 -0
  243. package/dist/ScrollView/ScrollView.css +19 -0
  244. package/dist/ScrollView/ScrollView.d.ts +5 -0
  245. package/dist/ScrollView/ScrollView.js +204 -0
  246. package/dist/ScrollView/ScrollView.types.d.ts +258 -0
  247. package/dist/ScrollView/ScrollView.types.js +5 -0
  248. package/dist/ScrollView/index.d.ts +3 -0
  249. package/dist/ScrollView/index.js +34 -0
  250. package/dist/ScrollView/index.miniapp.d.ts +3 -0
  251. package/dist/ScrollView/index.miniapp.js +14 -0
  252. package/dist/Select/Select.css +89 -0
  253. package/dist/Select/Select.d.ts +5 -0
  254. package/dist/Select/Select.js +159 -0
  255. package/dist/Select/Select.types.d.ts +98 -0
  256. package/dist/Select/Select.types.js +5 -0
  257. package/dist/Select/SelectOption.d.ts +5 -0
  258. package/dist/Select/SelectOption.js +51 -0
  259. package/dist/Select/index.d.ts +4 -0
  260. package/dist/Select/index.js +42 -0
  261. package/dist/Select/selectContext.d.ts +4 -0
  262. package/dist/Select/selectContext.js +11 -0
  263. package/dist/Skeleton/Skeleton.css +54 -0
  264. package/dist/Skeleton/Skeleton.d.ts +5 -0
  265. package/dist/Skeleton/Skeleton.js +42 -0
  266. package/dist/Skeleton/Skeleton.types.d.ts +33 -0
  267. package/dist/Skeleton/Skeleton.types.js +5 -0
  268. package/dist/Skeleton/index.d.ts +3 -0
  269. package/dist/Skeleton/index.js +34 -0
  270. package/dist/Slide/Slide.d.ts +4 -0
  271. package/dist/Slide/Slide.js +88 -0
  272. package/dist/Slide/Slide.types.d.ts +14 -0
  273. package/dist/Slide/Slide.types.js +5 -0
  274. package/dist/Slide/index.d.ts +3 -0
  275. package/dist/Slide/index.js +34 -0
  276. package/dist/Slider/Slider.css +95 -0
  277. package/dist/Slider/Slider.d.ts +5 -0
  278. package/dist/Slider/Slider.js +281 -0
  279. package/dist/Slider/Slider.types.d.ts +62 -0
  280. package/dist/Slider/Slider.types.js +5 -0
  281. package/dist/Slider/index.d.ts +2 -0
  282. package/dist/Slider/index.js +34 -0
  283. package/dist/Slider/utils.d.ts +14 -0
  284. package/dist/Slider/utils.js +30 -0
  285. package/dist/Stack/Stack.css +11 -0
  286. package/dist/Stack/Stack.d.ts +5 -0
  287. package/dist/Stack/Stack.js +53 -0
  288. package/dist/Stack/Stack.types.d.ts +35 -0
  289. package/dist/Stack/Stack.types.js +5 -0
  290. package/dist/Stack/demo/StackDemo.d.ts +4 -0
  291. package/dist/Stack/demo/StackDemo.js +126 -0
  292. package/dist/Stack/demo/index.css +23 -0
  293. package/dist/Stack/index.d.ts +3 -0
  294. package/dist/Stack/index.js +34 -0
  295. package/dist/Steps/Step.css +174 -0
  296. package/dist/Steps/Step.d.ts +5 -0
  297. package/dist/Steps/Step.js +107 -0
  298. package/dist/Steps/Step.types.d.ts +35 -0
  299. package/dist/Steps/Step.types.js +5 -0
  300. package/dist/Steps/Steps.css +14 -0
  301. package/dist/Steps/Steps.d.ts +5 -0
  302. package/dist/Steps/Steps.js +65 -0
  303. package/dist/Steps/Steps.types.d.ts +35 -0
  304. package/dist/Steps/Steps.types.js +5 -0
  305. package/dist/Steps/StepsContext.d.ts +5 -0
  306. package/dist/Steps/StepsContext.js +11 -0
  307. package/dist/Steps/index.d.ts +4 -0
  308. package/dist/Steps/index.js +54 -0
  309. package/dist/Swiper/Swiper.css +20 -0
  310. package/dist/Swiper/Swiper.d.ts +10 -0
  311. package/dist/Swiper/Swiper.js +109 -0
  312. package/dist/Swiper/Swiper.types.d.ts +173 -0
  313. package/dist/Swiper/Swiper.types.js +5 -0
  314. package/dist/Swiper/SwiperItem.d.ts +7 -0
  315. package/dist/Swiper/SwiperItem.js +30 -0
  316. package/dist/Swiper/index.d.ts +3 -0
  317. package/dist/Swiper/index.js +42 -0
  318. package/dist/Swiper/index.miniapp.d.ts +8 -0
  319. package/dist/Swiper/index.miniapp.js +23 -0
  320. package/dist/Switch/Switch.css +127 -0
  321. package/dist/Switch/Switch.d.ts +5 -0
  322. package/dist/Switch/Switch.js +73 -0
  323. package/dist/Switch/Switch.types.d.ts +56 -0
  324. package/dist/Switch/Switch.types.js +5 -0
  325. package/dist/Switch/index.d.ts +3 -0
  326. package/dist/Switch/index.js +34 -0
  327. package/dist/TabBar/TabBar.css +8 -0
  328. package/dist/TabBar/TabBar.d.ts +5 -0
  329. package/dist/TabBar/TabBar.js +47 -0
  330. package/dist/TabBar/TabBarContext.d.ts +27 -0
  331. package/dist/TabBar/TabBarContext.js +9 -0
  332. package/dist/TabBar/TabBarItem.css +38 -0
  333. package/dist/TabBar/TabBarItem.d.ts +5 -0
  334. package/dist/TabBar/TabBarItem.js +62 -0
  335. package/dist/TabBar/index.d.ts +4 -0
  336. package/dist/TabBar/index.js +36 -0
  337. package/dist/TabBar/index.types.d.ts +54 -0
  338. package/dist/TabBar/index.types.js +5 -0
  339. package/dist/Tabs/Tab.css +52 -0
  340. package/dist/Tabs/Tab.d.ts +5 -0
  341. package/dist/Tabs/Tab.js +58 -0
  342. package/dist/Tabs/Tab.types.d.ts +12 -0
  343. package/dist/Tabs/Tab.types.js +5 -0
  344. package/dist/Tabs/TabPanel.css +9 -0
  345. package/dist/Tabs/TabPanel.d.ts +5 -0
  346. package/dist/Tabs/TabPanel.js +37 -0
  347. package/dist/Tabs/TabPanel.types.d.ts +19 -0
  348. package/dist/Tabs/TabPanel.types.js +5 -0
  349. package/dist/Tabs/Tabs.css +56 -0
  350. package/dist/Tabs/Tabs.d.ts +5 -0
  351. package/dist/Tabs/Tabs.js +193 -0
  352. package/dist/Tabs/Tabs.types.d.ts +45 -0
  353. package/dist/Tabs/Tabs.types.js +5 -0
  354. package/dist/Tabs/TabsContext.d.ts +9 -0
  355. package/dist/Tabs/TabsContext.js +14 -0
  356. package/dist/Tabs/index.d.ts +6 -0
  357. package/dist/Tabs/index.js +74 -0
  358. package/dist/Tabs/utils/bound.d.ts +1 -0
  359. package/dist/Tabs/utils/bound.js +16 -0
  360. package/dist/Tag/Tag.css +97 -0
  361. package/dist/Tag/Tag.d.ts +5 -0
  362. package/dist/Tag/Tag.js +80 -0
  363. package/dist/Tag/Tag.types.d.ts +23 -0
  364. package/dist/Tag/Tag.types.js +5 -0
  365. package/dist/Tag/TagGroup.css +16 -0
  366. package/dist/Tag/TagGroup.d.ts +5 -0
  367. package/dist/Tag/TagGroup.js +27 -0
  368. package/dist/Tag/TagGroup.types.d.ts +6 -0
  369. package/dist/Tag/TagGroup.types.js +5 -0
  370. package/dist/Tag/index.d.ts +5 -0
  371. package/dist/Tag/index.js +48 -0
  372. package/dist/TextArea/TextArea.css +43 -0
  373. package/dist/TextArea/TextArea.d.ts +5 -0
  374. package/dist/TextArea/TextArea.js +149 -0
  375. package/dist/TextArea/TextArea.types.d.ts +70 -0
  376. package/dist/TextArea/TextArea.types.js +5 -0
  377. package/dist/TextArea/index.d.ts +2 -0
  378. package/dist/TextArea/index.js +34 -0
  379. package/dist/Transition/Transition.d.ts +4 -0
  380. package/dist/Transition/Transition.js +19 -0
  381. package/dist/Transition/Transition.miniapp.d.ts +4 -0
  382. package/dist/Transition/Transition.miniapp.js +19 -0
  383. package/dist/Transition/Transition.types.d.ts +100 -0
  384. package/dist/Transition/Transition.types.js +5 -0
  385. package/dist/Transition/TransitionCore.d.ts +4 -0
  386. package/dist/Transition/TransitionCore.js +180 -0
  387. package/dist/Transition/index.d.ts +3 -0
  388. package/dist/Transition/index.js +34 -0
  389. package/dist/index.d.ts +38 -0
  390. package/dist/index.js +423 -0
  391. package/es/ActionSheet/ActionSheet.css +27 -0
  392. package/es/ActionSheet/ActionSheet.d.ts +5 -0
  393. package/es/ActionSheet/ActionSheet.js +59 -0
  394. package/es/ActionSheet/ActionSheet.types.d.ts +28 -0
  395. package/es/ActionSheet/ActionSheet.types.js +1 -0
  396. package/es/ActionSheet/ActionSheetContext.d.ts +4 -0
  397. package/es/ActionSheet/ActionSheetContext.js +4 -0
  398. package/es/ActionSheet/ActionSheetItem.css +51 -0
  399. package/es/ActionSheet/ActionSheetItem.d.ts +5 -0
  400. package/es/ActionSheet/ActionSheetItem.js +51 -0
  401. package/es/ActionSheet/ActionSheetItem.types.d.ts +38 -0
  402. package/es/ActionSheet/ActionSheetItem.types.js +1 -0
  403. package/es/ActionSheet/index.d.ts +4 -0
  404. package/es/ActionSheet/index.js +4 -0
  405. package/es/Alert/Alert.d.ts +5 -0
  406. package/es/Alert/Alert.js +110 -0
  407. package/es/Alert/Alert.types.d.ts +61 -0
  408. package/es/Alert/Alert.types.js +1 -0
  409. package/es/Alert/index.css +89 -0
  410. package/es/Alert/index.d.ts +4 -0
  411. package/es/Alert/index.js +4 -0
  412. package/es/Avatar/Avatar.css +43 -0
  413. package/es/Avatar/Avatar.d.ts +5 -0
  414. package/es/Avatar/Avatar.js +55 -0
  415. package/es/Avatar/Avatar.types.d.ts +46 -0
  416. package/es/Avatar/Avatar.types.js +1 -0
  417. package/es/Avatar/AvatarGroup.css +31 -0
  418. package/es/Avatar/AvatarGroup.d.ts +5 -0
  419. package/es/Avatar/AvatarGroup.js +65 -0
  420. package/es/Avatar/AvatarGroup.types.d.ts +27 -0
  421. package/es/Avatar/AvatarGroup.types.js +1 -0
  422. package/es/Avatar/index.d.ts +6 -0
  423. package/es/Avatar/index.js +6 -0
  424. package/es/Backdrop/Backdrop.css +14 -0
  425. package/es/Backdrop/Backdrop.d.ts +5 -0
  426. package/es/Backdrop/Backdrop.js +30 -0
  427. package/es/Backdrop/Backdrop.types.d.ts +17 -0
  428. package/es/Backdrop/Backdrop.types.js +1 -0
  429. package/es/Backdrop/index.d.ts +2 -0
  430. package/es/Backdrop/index.js +2 -0
  431. package/es/Badge/Badge.css +95 -0
  432. package/es/Badge/Badge.d.ts +5 -0
  433. package/es/Badge/Badge.js +38 -0
  434. package/es/Badge/Badge.types.d.ts +27 -0
  435. package/es/Badge/Badge.types.js +1 -0
  436. package/es/Badge/index.d.ts +2 -0
  437. package/es/Badge/index.js +2 -0
  438. package/es/Button/Button.css +200 -0
  439. package/es/Button/Button.d.ts +5 -0
  440. package/es/Button/Button.js +47 -0
  441. package/es/Button/Button.types.d.ts +52 -0
  442. package/es/Button/Button.types.js +1 -0
  443. package/es/Button/index.d.ts +2 -0
  444. package/es/Button/index.js +2 -0
  445. package/es/Calendar/Calendar.css +105 -0
  446. package/es/Calendar/Calendar.d.ts +5 -0
  447. package/es/Calendar/Calendar.js +286 -0
  448. package/es/Calendar/Calendar.types.d.ts +76 -0
  449. package/es/Calendar/Calendar.types.js +1 -0
  450. package/es/Calendar/index.d.ts +2 -0
  451. package/es/Calendar/index.js +2 -0
  452. package/es/Calendar/utils.d.ts +25 -0
  453. package/es/Calendar/utils.js +66 -0
  454. package/es/Card/Card.css +9 -0
  455. package/es/Card/Card.d.ts +5 -0
  456. package/es/Card/Card.js +21 -0
  457. package/es/Card/Card.types.d.ts +6 -0
  458. package/es/Card/Card.types.js +1 -0
  459. package/es/Card/CardContent.css +6 -0
  460. package/es/Card/CardContent.d.ts +5 -0
  461. package/es/Card/CardContent.js +19 -0
  462. package/es/Card/CardContent.types.d.ts +6 -0
  463. package/es/Card/CardContent.types.js +1 -0
  464. package/es/Card/CardFooter.css +8 -0
  465. package/es/Card/CardFooter.d.ts +5 -0
  466. package/es/Card/CardFooter.js +19 -0
  467. package/es/Card/CardFooter.types.d.ts +6 -0
  468. package/es/Card/CardFooter.types.js +1 -0
  469. package/es/Card/CardHeader.css +45 -0
  470. package/es/Card/CardHeader.d.ts +5 -0
  471. package/es/Card/CardHeader.js +53 -0
  472. package/es/Card/CardHeader.types.d.ts +23 -0
  473. package/es/Card/CardHeader.types.js +1 -0
  474. package/es/Card/index.d.ts +10 -0
  475. package/es/Card/index.js +10 -0
  476. package/es/Checkbox/Checkbox.css +45 -0
  477. package/es/Checkbox/Checkbox.d.ts +5 -0
  478. package/es/Checkbox/Checkbox.js +108 -0
  479. package/es/Checkbox/Checkbox.types.d.ts +84 -0
  480. package/es/Checkbox/Checkbox.types.js +1 -0
  481. package/es/Checkbox/CheckboxContext.d.ts +5 -0
  482. package/es/Checkbox/CheckboxContext.js +4 -0
  483. package/es/Checkbox/CheckboxGroup.d.ts +5 -0
  484. package/es/Checkbox/CheckboxGroup.js +64 -0
  485. package/es/Checkbox/index.d.ts +3 -0
  486. package/es/Checkbox/index.js +3 -0
  487. package/es/Countdown/Countdown.css +28 -0
  488. package/es/Countdown/Countdown.d.ts +5 -0
  489. package/es/Countdown/Countdown.js +109 -0
  490. package/es/Countdown/Countdown.types.d.ts +123 -0
  491. package/es/Countdown/Countdown.types.js +1 -0
  492. package/es/Countdown/index.d.ts +3 -0
  493. package/es/Countdown/index.js +3 -0
  494. package/es/Countdown/useCountdown.d.ts +10 -0
  495. package/es/Countdown/useCountdown.js +55 -0
  496. package/es/Countdown/utils.d.ts +9 -0
  497. package/es/Countdown/utils.js +126 -0
  498. package/es/Divider/Divider.css +41 -0
  499. package/es/Divider/Divider.d.ts +5 -0
  500. package/es/Divider/Divider.js +52 -0
  501. package/es/Divider/Divider.types.d.ts +19 -0
  502. package/es/Divider/Divider.types.js +1 -0
  503. package/es/Divider/index.d.ts +2 -0
  504. package/es/Divider/index.js +2 -0
  505. package/es/Drawer/Drawer.css +35 -0
  506. package/es/Drawer/Drawer.d.ts +5 -0
  507. package/es/Drawer/Drawer.js +71 -0
  508. package/es/Drawer/Drawer.types.d.ts +51 -0
  509. package/es/Drawer/Drawer.types.js +1 -0
  510. package/es/Drawer/index.d.ts +2 -0
  511. package/es/Drawer/index.js +2 -0
  512. package/es/Fade/Fade.d.ts +4 -0
  513. package/es/Fade/Fade.js +70 -0
  514. package/es/Fade/Fade.types.d.ts +9 -0
  515. package/es/Fade/Fade.types.js +1 -0
  516. package/es/Fade/index.d.ts +3 -0
  517. package/es/Fade/index.js +3 -0
  518. package/es/IconButton/IconButton.css +130 -0
  519. package/es/IconButton/IconButton.d.ts +5 -0
  520. package/es/IconButton/IconButton.js +45 -0
  521. package/es/IconButton/IconButton.types.d.ts +41 -0
  522. package/es/IconButton/IconButton.types.js +1 -0
  523. package/es/IconButton/index.d.ts +2 -0
  524. package/es/IconButton/index.js +2 -0
  525. package/es/Image/Image.d.ts +5 -0
  526. package/es/Image/Image.js +131 -0
  527. package/es/Image/Image.types.d.ts +48 -0
  528. package/es/Image/Image.types.js +1 -0
  529. package/es/Image/index.css +35 -0
  530. package/es/Image/index.d.ts +3 -0
  531. package/es/Image/index.js +3 -0
  532. package/es/Input/Input.css +59 -0
  533. package/es/Input/Input.d.ts +5 -0
  534. package/es/Input/Input.js +125 -0
  535. package/es/Input/Input.types.d.ts +70 -0
  536. package/es/Input/Input.types.js +1 -0
  537. package/es/Input/index.d.ts +2 -0
  538. package/es/Input/index.js +2 -0
  539. package/es/List/List.css +9 -0
  540. package/es/List/List.d.ts +5 -0
  541. package/es/List/List.js +37 -0
  542. package/es/List/List.types.d.ts +22 -0
  543. package/es/List/List.types.js +1 -0
  544. package/es/List/ListContext.d.ts +7 -0
  545. package/es/List/ListContext.js +5 -0
  546. package/es/List/ListItem.css +23 -0
  547. package/es/List/ListItem.d.ts +5 -0
  548. package/es/List/ListItem.js +52 -0
  549. package/es/List/ListItem.types.d.ts +20 -0
  550. package/es/List/ListItem.types.js +1 -0
  551. package/es/List/ListItemContent.css +18 -0
  552. package/es/List/ListItemContent.d.ts +5 -0
  553. package/es/List/ListItemContent.js +31 -0
  554. package/es/List/ListItemContent.types.d.ts +16 -0
  555. package/es/List/ListItemContent.types.js +1 -0
  556. package/es/List/ListItemExtra.css +7 -0
  557. package/es/List/ListItemExtra.d.ts +5 -0
  558. package/es/List/ListItemExtra.js +23 -0
  559. package/es/List/ListItemExtra.types.d.ts +8 -0
  560. package/es/List/ListItemExtra.types.js +1 -0
  561. package/es/List/ListItemFooter.css +9 -0
  562. package/es/List/ListItemFooter.d.ts +5 -0
  563. package/es/List/ListItemFooter.js +23 -0
  564. package/es/List/ListItemFooter.types.d.ts +8 -0
  565. package/es/List/ListItemFooter.types.js +1 -0
  566. package/es/List/ListItemHeader.css +7 -0
  567. package/es/List/ListItemHeader.d.ts +5 -0
  568. package/es/List/ListItemHeader.js +23 -0
  569. package/es/List/ListItemHeader.types.d.ts +8 -0
  570. package/es/List/ListItemHeader.types.js +1 -0
  571. package/es/List/index.d.ts +13 -0
  572. package/es/List/index.js +13 -0
  573. package/es/Loading/Loading.css +31 -0
  574. package/es/Loading/Loading.d.ts +5 -0
  575. package/es/Loading/Loading.js +33 -0
  576. package/es/Loading/Loading.types.d.ts +20 -0
  577. package/es/Loading/Loading.types.js +1 -0
  578. package/es/Loading/index.d.ts +2 -0
  579. package/es/Loading/index.js +2 -0
  580. package/es/Modal/Modal.css +15 -0
  581. package/es/Modal/Modal.d.ts +5 -0
  582. package/es/Modal/Modal.js +95 -0
  583. package/es/Modal/Modal.types.d.ts +20 -0
  584. package/es/Modal/Modal.types.js +1 -0
  585. package/es/Modal/index.d.ts +3 -0
  586. package/es/Modal/index.js +3 -0
  587. package/es/NavBar/NavBar.css +57 -0
  588. package/es/NavBar/NavBar.d.ts +5 -0
  589. package/es/NavBar/NavBar.js +82 -0
  590. package/es/NavBar/NavBar.types.d.ts +44 -0
  591. package/es/NavBar/NavBar.types.js +1 -0
  592. package/es/NavBar/index.d.ts +2 -0
  593. package/es/NavBar/index.js +2 -0
  594. package/es/Portal/Portal.d.ts +4 -0
  595. package/es/Portal/Portal.js +11 -0
  596. package/es/Portal/Portal.miniapp.d.ts +4 -0
  597. package/es/Portal/Portal.miniapp.js +33 -0
  598. package/es/Portal/Portal.types.d.ts +22 -0
  599. package/es/Portal/Portal.types.js +1 -0
  600. package/es/Portal/PortalCore.d.ts +8 -0
  601. package/es/Portal/PortalCore.js +57 -0
  602. package/es/Portal/index.d.ts +3 -0
  603. package/es/Portal/index.js +3 -0
  604. package/es/Progress/Progress.css +22 -0
  605. package/es/Progress/Progress.d.ts +8 -0
  606. package/es/Progress/Progress.js +90 -0
  607. package/es/Progress/Progress.types.d.ts +28 -0
  608. package/es/Progress/Progress.types.js +1 -0
  609. package/es/Progress/index.d.ts +3 -0
  610. package/es/Progress/index.js +3 -0
  611. package/es/Radio/Radio.css +65 -0
  612. package/es/Radio/Radio.d.ts +5 -0
  613. package/es/Radio/Radio.js +126 -0
  614. package/es/Radio/Radio.types.d.ts +83 -0
  615. package/es/Radio/Radio.types.js +1 -0
  616. package/es/Radio/RadioButtonIcon.d.ts +12 -0
  617. package/es/Radio/RadioButtonIcon.js +33 -0
  618. package/es/Radio/RadioContext.d.ts +5 -0
  619. package/es/Radio/RadioContext.js +4 -0
  620. package/es/Radio/RadioGroup.d.ts +5 -0
  621. package/es/Radio/RadioGroup.js +52 -0
  622. package/es/Radio/index.d.ts +3 -0
  623. package/es/Radio/index.js +3 -0
  624. package/es/Rating/Rating.css +52 -0
  625. package/es/Rating/Rating.d.ts +5 -0
  626. package/es/Rating/Rating.js +107 -0
  627. package/es/Rating/Rating.types.d.ts +66 -0
  628. package/es/Rating/Rating.types.js +1 -0
  629. package/es/Rating/index.d.ts +2 -0
  630. package/es/Rating/index.js +2 -0
  631. package/es/ScrollView/ScrollView.css +19 -0
  632. package/es/ScrollView/ScrollView.d.ts +5 -0
  633. package/es/ScrollView/ScrollView.js +204 -0
  634. package/es/ScrollView/ScrollView.types.d.ts +258 -0
  635. package/es/ScrollView/ScrollView.types.js +1 -0
  636. package/es/ScrollView/index.d.ts +3 -0
  637. package/es/ScrollView/index.js +3 -0
  638. package/es/ScrollView/index.miniapp.d.ts +3 -0
  639. package/es/ScrollView/index.miniapp.js +3 -0
  640. package/es/Select/Select.css +89 -0
  641. package/es/Select/Select.d.ts +5 -0
  642. package/es/Select/Select.js +165 -0
  643. package/es/Select/Select.types.d.ts +98 -0
  644. package/es/Select/Select.types.js +1 -0
  645. package/es/Select/SelectOption.d.ts +5 -0
  646. package/es/Select/SelectOption.js +43 -0
  647. package/es/Select/index.d.ts +4 -0
  648. package/es/Select/index.js +4 -0
  649. package/es/Select/selectContext.d.ts +4 -0
  650. package/es/Select/selectContext.js +5 -0
  651. package/es/Skeleton/Skeleton.css +54 -0
  652. package/es/Skeleton/Skeleton.d.ts +5 -0
  653. package/es/Skeleton/Skeleton.js +38 -0
  654. package/es/Skeleton/Skeleton.types.d.ts +33 -0
  655. package/es/Skeleton/Skeleton.types.js +1 -0
  656. package/es/Skeleton/index.d.ts +3 -0
  657. package/es/Skeleton/index.js +3 -0
  658. package/es/Slide/Slide.d.ts +4 -0
  659. package/es/Slide/Slide.js +85 -0
  660. package/es/Slide/Slide.types.d.ts +14 -0
  661. package/es/Slide/Slide.types.js +1 -0
  662. package/es/Slide/index.d.ts +3 -0
  663. package/es/Slide/index.js +3 -0
  664. package/es/Slider/Slider.css +95 -0
  665. package/es/Slider/Slider.d.ts +5 -0
  666. package/es/Slider/Slider.js +318 -0
  667. package/es/Slider/Slider.types.d.ts +62 -0
  668. package/es/Slider/Slider.types.js +1 -0
  669. package/es/Slider/index.d.ts +2 -0
  670. package/es/Slider/index.js +2 -0
  671. package/es/Slider/utils.d.ts +14 -0
  672. package/es/Slider/utils.js +25 -0
  673. package/es/Stack/Stack.css +11 -0
  674. package/es/Stack/Stack.d.ts +5 -0
  675. package/es/Stack/Stack.js +50 -0
  676. package/es/Stack/Stack.types.d.ts +35 -0
  677. package/es/Stack/Stack.types.js +1 -0
  678. package/es/Stack/demo/StackDemo.d.ts +4 -0
  679. package/es/Stack/demo/StackDemo.js +128 -0
  680. package/es/Stack/demo/index.css +23 -0
  681. package/es/Stack/index.d.ts +3 -0
  682. package/es/Stack/index.js +3 -0
  683. package/es/Steps/Step.css +174 -0
  684. package/es/Steps/Step.d.ts +5 -0
  685. package/es/Steps/Step.js +88 -0
  686. package/es/Steps/Step.types.d.ts +35 -0
  687. package/es/Steps/Step.types.js +1 -0
  688. package/es/Steps/Steps.css +14 -0
  689. package/es/Steps/Steps.d.ts +5 -0
  690. package/es/Steps/Steps.js +60 -0
  691. package/es/Steps/Steps.types.d.ts +35 -0
  692. package/es/Steps/Steps.types.js +1 -0
  693. package/es/Steps/StepsContext.d.ts +5 -0
  694. package/es/Steps/StepsContext.js +4 -0
  695. package/es/Steps/index.d.ts +4 -0
  696. package/es/Steps/index.js +4 -0
  697. package/es/Swiper/Swiper.css +20 -0
  698. package/es/Swiper/Swiper.d.ts +10 -0
  699. package/es/Swiper/Swiper.js +112 -0
  700. package/es/Swiper/Swiper.types.d.ts +173 -0
  701. package/es/Swiper/Swiper.types.js +1 -0
  702. package/es/Swiper/SwiperItem.d.ts +7 -0
  703. package/es/Swiper/SwiperItem.js +24 -0
  704. package/es/Swiper/index.d.ts +3 -0
  705. package/es/Swiper/index.js +3 -0
  706. package/es/Swiper/index.miniapp.d.ts +8 -0
  707. package/es/Swiper/index.miniapp.js +6 -0
  708. package/es/Switch/Switch.css +127 -0
  709. package/es/Switch/Switch.d.ts +5 -0
  710. package/es/Switch/Switch.js +76 -0
  711. package/es/Switch/Switch.types.d.ts +56 -0
  712. package/es/Switch/Switch.types.js +1 -0
  713. package/es/Switch/index.d.ts +3 -0
  714. package/es/Switch/index.js +3 -0
  715. package/es/TabBar/TabBar.css +8 -0
  716. package/es/TabBar/TabBar.d.ts +5 -0
  717. package/es/TabBar/TabBar.js +42 -0
  718. package/es/TabBar/TabBarContext.d.ts +27 -0
  719. package/es/TabBar/TabBarContext.js +3 -0
  720. package/es/TabBar/TabBarItem.css +38 -0
  721. package/es/TabBar/TabBarItem.d.ts +5 -0
  722. package/es/TabBar/TabBarItem.js +54 -0
  723. package/es/TabBar/index.d.ts +4 -0
  724. package/es/TabBar/index.js +4 -0
  725. package/es/TabBar/index.types.d.ts +54 -0
  726. package/es/TabBar/index.types.js +1 -0
  727. package/es/Tabs/Tab.css +52 -0
  728. package/es/Tabs/Tab.d.ts +5 -0
  729. package/es/Tabs/Tab.js +50 -0
  730. package/es/Tabs/Tab.types.d.ts +12 -0
  731. package/es/Tabs/Tab.types.js +1 -0
  732. package/es/Tabs/TabPanel.css +9 -0
  733. package/es/Tabs/TabPanel.d.ts +5 -0
  734. package/es/Tabs/TabPanel.js +30 -0
  735. package/es/Tabs/TabPanel.types.d.ts +19 -0
  736. package/es/Tabs/TabPanel.types.js +1 -0
  737. package/es/Tabs/Tabs.css +56 -0
  738. package/es/Tabs/Tabs.d.ts +5 -0
  739. package/es/Tabs/Tabs.js +210 -0
  740. package/es/Tabs/Tabs.types.d.ts +45 -0
  741. package/es/Tabs/Tabs.types.js +1 -0
  742. package/es/Tabs/TabsContext.d.ts +9 -0
  743. package/es/Tabs/TabsContext.js +7 -0
  744. package/es/Tabs/index.d.ts +6 -0
  745. package/es/Tabs/index.js +6 -0
  746. package/es/Tabs/utils/bound.d.ts +1 -0
  747. package/es/Tabs/utils/bound.js +10 -0
  748. package/es/Tag/Tag.css +97 -0
  749. package/es/Tag/Tag.d.ts +5 -0
  750. package/es/Tag/Tag.js +76 -0
  751. package/es/Tag/Tag.types.d.ts +23 -0
  752. package/es/Tag/Tag.types.js +1 -0
  753. package/es/Tag/TagGroup.css +16 -0
  754. package/es/Tag/TagGroup.d.ts +5 -0
  755. package/es/Tag/TagGroup.js +21 -0
  756. package/es/Tag/TagGroup.types.d.ts +6 -0
  757. package/es/Tag/TagGroup.types.js +1 -0
  758. package/es/Tag/index.d.ts +5 -0
  759. package/es/Tag/index.js +5 -0
  760. package/es/TextArea/TextArea.css +43 -0
  761. package/es/TextArea/TextArea.d.ts +5 -0
  762. package/es/TextArea/TextArea.js +150 -0
  763. package/es/TextArea/TextArea.types.d.ts +70 -0
  764. package/es/TextArea/TextArea.types.js +1 -0
  765. package/es/TextArea/index.d.ts +2 -0
  766. package/es/TextArea/index.js +2 -0
  767. package/es/Transition/Transition.d.ts +4 -0
  768. package/es/Transition/Transition.js +12 -0
  769. package/es/Transition/Transition.miniapp.d.ts +4 -0
  770. package/es/Transition/Transition.miniapp.js +12 -0
  771. package/es/Transition/Transition.types.d.ts +100 -0
  772. package/es/Transition/Transition.types.js +1 -0
  773. package/es/Transition/TransitionCore.d.ts +4 -0
  774. package/es/Transition/TransitionCore.js +289 -0
  775. package/es/Transition/index.d.ts +3 -0
  776. package/es/Transition/index.js +3 -0
  777. package/es/index.d.ts +38 -0
  778. package/es/index.js +38 -0
  779. package/package.json +50 -0
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './Button.less';
3
+ import { ButtonProps } from './Button.types';
4
+ declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ export default Button;
@@ -0,0 +1,47 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["className", "children", "startIcon", "endIcon", "size", "variant", "color", "disabled"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
8
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
9
+ import clsx from 'clsx';
10
+ import React from 'react';
11
+ import "./Button.css";
12
+ var prefixCls = 'bui-btn';
13
+ var ButtonIcon = function ButtonIcon(_ref) {
14
+ var children = _ref.children,
15
+ iconPosition = _ref.iconPosition;
16
+ return /*#__PURE__*/React.createElement("span", {
17
+ className: "".concat(prefixCls, "-icon-").concat(iconPosition)
18
+ }, children);
19
+ };
20
+ var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
+ var className = props.className,
22
+ children = props.children,
23
+ startIcon = props.startIcon,
24
+ endIcon = props.endIcon,
25
+ size = props.size,
26
+ variant = props.variant,
27
+ color = props.color,
28
+ disabled = props.disabled,
29
+ others = _objectWithoutProperties(props, _excluded);
30
+ return /*#__PURE__*/React.createElement("button", _extends({
31
+ type: "button",
32
+ className: clsx(prefixCls, "".concat(prefixCls, "-").concat(variant), "".concat(prefixCls, "-").concat(size), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-").concat(color), color), "".concat(prefixCls, "-disabled"), disabled), className),
33
+ ref: ref
34
+ }, others), startIcon && /*#__PURE__*/React.createElement(ButtonIcon, {
35
+ iconPosition: "start"
36
+ }, startIcon), children, endIcon && /*#__PURE__*/React.createElement(ButtonIcon, {
37
+ iconPosition: "end"
38
+ }, endIcon));
39
+ });
40
+ Button.displayName = 'BuiButton';
41
+ Button.defaultProps = {
42
+ size: 'medium',
43
+ variant: 'outlined',
44
+ color: 'default',
45
+ disabled: false
46
+ };
47
+ export default Button;
@@ -0,0 +1,52 @@
1
+ import { OverrideProps, ThemeColor, ButtonOpenType } from '@bifrostui/types';
2
+ import React from 'react';
3
+ export type ButtonProps<D extends React.ElementType = 'button', P = {}> = OverrideProps<{
4
+ props: P & {
5
+ /**
6
+ * 是否禁用
7
+ * @default false
8
+ */
9
+ disabled?: boolean;
10
+ /**
11
+ * 按钮尺寸
12
+ * - small: 小按钮
13
+ * - medium: 中号按钮,默认按钮
14
+ * - large: 大按钮/半屏按钮
15
+ * - full: 通栏按钮
16
+ * @default 'medium'
17
+ */
18
+ size?: 'small' | 'medium' | 'large' | 'full';
19
+ /** 按钮颜色
20
+ * @default 'default'
21
+ */
22
+ color?: ThemeColor | 'default' | 'vip';
23
+ /**
24
+ * 按钮类型
25
+ * - text: 文字按钮
26
+ * - outlined: 描边按钮
27
+ * - contained: 实心填充按钮
28
+ * - light: 浅亮填充按钮
29
+ * @default 'outlined'
30
+ */
31
+ variant?: 'outlined' | 'text' | 'contained' | 'light';
32
+ /**
33
+ * 在子元素前放在的内容
34
+ */
35
+ startIcon?: React.ReactNode;
36
+ /**
37
+ * 在子元素后放在的内容
38
+ */
39
+ endIcon?: React.ReactNode;
40
+ /**
41
+ * 点击事件回调方法
42
+ * @param event
43
+ * @returns
44
+ */
45
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
46
+ /**
47
+ * 仅微信小程序支持的button开放能力
48
+ */
49
+ openType?: ButtonOpenType;
50
+ };
51
+ defaultComponent: D;
52
+ }, D>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as Button, default } from './Button';
2
+ export * from './Button.types';
@@ -0,0 +1,2 @@
1
+ export { default as Button, default } from "./Button";
2
+ export * from "./Button.types";
@@ -0,0 +1,105 @@
1
+ .bui-calendar {
2
+ overflow: hidden;
3
+ display: flex;
4
+ flex-direction: column;
5
+ background-color: var(--bui-color-bg-view);
6
+ position: relative;
7
+ width: 100%;
8
+ box-sizing: border-box;
9
+ padding: 6px 12px 7px;
10
+ font-family: var(--bui-font-family);
11
+ }
12
+ .bui-calendar-week {
13
+ height: 30px;
14
+ font-size: var(--bui-text-size-2);
15
+ font-weight: var(--bui-font-weight-medium);
16
+ color: var(--bui-color-fg-default);
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: space-between;
20
+ }
21
+ .bui-calendar-week-item {
22
+ width: 14.28%;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ }
27
+ .bui-calendar-week-item:nth-child(1),
28
+ .bui-calendar-week-item:nth-child(7) {
29
+ color: var(--bui-color-primary);
30
+ }
31
+ .bui-calendar-handler {
32
+ height: 28px;
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ margin-bottom: 7px;
37
+ }
38
+ .bui-calendar-handler-text {
39
+ width: 80px;
40
+ font-size: var(--bui-title-size-3);
41
+ font-weight: var(--bui-font-weight-medium);
42
+ text-align: center;
43
+ }
44
+ .bui-calendar-handler-btn {
45
+ font-size: 16px;
46
+ height: 100%;
47
+ width: 46px;
48
+ cursor: pointer;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ }
53
+ .bui-calendar-handler-btn-icon {
54
+ font-size: 28px;
55
+ }
56
+ .bui-calendar-month {
57
+ display: flex;
58
+ flex-wrap: wrap;
59
+ margin-bottom: var(--bui-spacing-sm);
60
+ }
61
+ .bui-calendar-day-box {
62
+ width: 14.28%;
63
+ height: 30px;
64
+ margin-bottom: 7px;
65
+ }
66
+ .bui-calendar-highlight-day .bui-calendar-day {
67
+ color: var(--bui-color-primary);
68
+ }
69
+ .bui-calendar-day {
70
+ width: 100%;
71
+ height: 100%;
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ border-radius: 6px;
76
+ font-size: var(--bui-title-size-4);
77
+ font-weight: var(--bui-font-weight-medium);
78
+ color: var(--bui-color-fg-default);
79
+ cursor: pointer;
80
+ }
81
+ .bui-calendar-day.bui-calendar-disabled {
82
+ color: #9c9ca5;
83
+ }
84
+ .bui-calendar-today {
85
+ color: var(--bui-color-primary);
86
+ }
87
+ .bui-calendar-middle {
88
+ color: #000;
89
+ border-radius: 0;
90
+ background-color: #ffeaf1;
91
+ }
92
+ .bui-calendar-start {
93
+ color: #000;
94
+ background-color: #ffc7da;
95
+ }
96
+ .bui-calendar-range {
97
+ border-top-right-radius: 0;
98
+ border-bottom-right-radius: 0;
99
+ }
100
+ .bui-calendar-end {
101
+ color: #000;
102
+ background-color: #ffc7da;
103
+ border-top-left-radius: 0;
104
+ border-bottom-left-radius: 0;
105
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './Calendar.less';
3
+ import { CalendarProps } from './Calendar.types';
4
+ declare const Calendar: React.ForwardRefExoticComponent<Omit<CalendarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ export default Calendar;
@@ -0,0 +1,286 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["className", "defaultValue", "value", "minDate", "maxDate", "mode", "hideDaysOutsideCurrentMonth", "disabledDate", "highlightDate", "dateRender", "weekRender", "onMonthChange", "onChange"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
10
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
15
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
16
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
18
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
19
+ import { CaretLeftIcon, CaretRightIcon } from '@bifrostui/icons';
20
+ import { useDidMountEffect, useValue } from '@bifrostui/utils';
21
+ import clsx from 'clsx';
22
+ import dayjs from 'dayjs';
23
+ import isoWeek from 'dayjs/plugin/isoWeek';
24
+ import React, { useMemo, useState } from 'react';
25
+ import "./Calendar.css";
26
+ import { formatDate, isRange, isSame } from "./utils";
27
+ dayjs.extend(isoWeek);
28
+ var SUNDAY_WEEK_DATA = ['日', '一', '二', '三', '四', '五', '六'];
29
+ var classes = {
30
+ root: 'bui-calendar',
31
+ handler: 'bui-calendar-handler',
32
+ day: 'bui-calendar-day',
33
+ week: 'bui-calendar-week',
34
+ disabled: 'bui-calendar-disabled'
35
+ };
36
+ var Calendar = /*#__PURE__*/React.forwardRef(function (props, ref) {
37
+ var className = props.className,
38
+ defaultValue = props.defaultValue,
39
+ value = props.value,
40
+ minDate = props.minDate,
41
+ maxDate = props.maxDate,
42
+ mode = props.mode,
43
+ hideDaysOutsideCurrentMonth = props.hideDaysOutsideCurrentMonth,
44
+ disabledDate = props.disabledDate,
45
+ highlightDate = props.highlightDate,
46
+ dateRender = props.dateRender,
47
+ weekRender = props.weekRender,
48
+ onMonthChange = props.onMonthChange,
49
+ onChange = props.onChange,
50
+ others = _objectWithoutProperties(props, _excluded);
51
+ var isRangeMode = mode === 'range';
52
+ /** @type undefined | Array<Date|null> */
53
+ var formattedValue = formatDate(mode, value, minDate, maxDate);
54
+ /** @type undefined | Array<Date|null> */
55
+ var formattedDefaultValue = formatDate(mode, defaultValue, minDate, maxDate);
56
+
57
+ // 头部操作栏月份
58
+ var _useState = useState(function () {
59
+ var initMonth = formattedValue === undefined ? formattedDefaultValue === null || formattedDefaultValue === void 0 ? void 0 : formattedDefaultValue[0] : formattedValue === null || formattedValue === void 0 ? void 0 : formattedValue[0];
60
+ return dayjs(initMonth || minDate).toDate();
61
+ }),
62
+ _useState2 = _slicedToArray(_useState, 2),
63
+ renderMonth = _useState2[0],
64
+ setRenderMonth = _useState2[1];
65
+ /**
66
+ * 日历状态值
67
+ * @type Array<Date|null>
68
+ */
69
+ var _useValue = useValue({
70
+ value: formattedValue,
71
+ defaultValue: formattedDefaultValue,
72
+ onChange: onChange
73
+ }),
74
+ _useValue2 = _slicedToArray(_useValue, 2),
75
+ calendarValue = _useValue2[0],
76
+ triggerChange = _useValue2[1];
77
+ // 根据calendarValue计算选中开始/结束日期
78
+ var selectedStartDate = useMemo(function () {
79
+ return calendarValue === null || calendarValue === void 0 ? void 0 : calendarValue[0];
80
+ }, [calendarValue]);
81
+ var selectedEndDate = useMemo(function () {
82
+ return calendarValue === null || calendarValue === void 0 ? void 0 : calendarValue[1];
83
+ }, [calendarValue]);
84
+ var isMinMonth = dayjs(minDate).isSame(renderMonth, 'month');
85
+ var isMaxMonth = dayjs(maxDate).isSame(renderMonth, 'month');
86
+ useDidMountEffect(function () {
87
+ var initMonth = formattedValue === undefined ? formattedDefaultValue === null || formattedDefaultValue === void 0 ? void 0 : formattedDefaultValue[0] : formattedValue === null || formattedValue === void 0 ? void 0 : formattedValue[0];
88
+ setRenderMonth(dayjs(initMonth || minDate).toDate());
89
+ }, [JSON.stringify(value), JSON.stringify(defaultValue)]);
90
+ var getDaysInMonth = function getDaysInMonth(args) {
91
+ var m = dayjs(args).format('YYYY/MM');
92
+ // 获取当前月份包含的天数
93
+ var count = dayjs(m).daysInMonth();
94
+ // 获取月初ISO星期几
95
+ var week = dayjs(m).isoWeekday();
96
+ // 获取月末ISO星期几
97
+ var eneWeek = dayjs(m).endOf('month').isoWeekday();
98
+ // 获取上月天数
99
+ var prevMount = dayjs(m).subtract(1, 'month');
100
+ var list = [];
101
+
102
+ // 填补上月日期
103
+ if (week !== 7) {
104
+ var prevMountCount = prevMount.daysInMonth();
105
+ _toConsumableArray(Array(week)).forEach(function (_, i) {
106
+ var day = dayjs("".concat(prevMount.format('YYYY/MM'), "/").concat(prevMountCount - i)).toDate();
107
+ list.unshift({
108
+ day: hideDaysOutsideCurrentMonth ? null : day,
109
+ disabled: true
110
+ });
111
+ });
112
+ }
113
+ _toConsumableArray(Array(count)).forEach(function (_, i) {
114
+ var day = dayjs("".concat(m, "/").concat(i + 1)).toDate();
115
+
116
+ // 先判断是否minDate与maxDate之间,再判断传入的方法
117
+ var defaultDisable = !isRange(day, minDate, maxDate);
118
+ var propsDisable = disabledDate ? !!(disabledDate !== null && disabledDate !== void 0 && disabledDate(day)) : false;
119
+ list.push({
120
+ day: day,
121
+ disabled: defaultDisable ? true : propsDisable
122
+ });
123
+ });
124
+
125
+ // 填补下月日期
126
+ var end = eneWeek === 7 ? 6 : 6 - eneWeek;
127
+ _toConsumableArray(Array(end)).forEach(function (_, i) {
128
+ var nextMonth = dayjs(m).add(1, 'month');
129
+ var day = dayjs("".concat(dayjs(nextMonth).format('YYYY/MM'), "/").concat(i + 1)).toDate();
130
+ list.push({
131
+ day: hideDaysOutsideCurrentMonth ? null : day,
132
+ disabled: true
133
+ });
134
+ });
135
+ return list;
136
+ };
137
+ var getDayClassName = function getDayClassName(_ref) {
138
+ var itemDate = _ref.day,
139
+ disabled = _ref.disabled;
140
+ var result = '';
141
+ if (disabled) return result;
142
+ var isToday = dayjs(itemDate).diff(dayjs().format('YYYYMMDD'), 'day') === 0;
143
+ if (selectedStartDate && isSame(selectedStartDate, itemDate)) {
144
+ result = "".concat(classes.root, "-start");
145
+ // 此时endDate已选中
146
+ if (selectedEndDate) {
147
+ result += " ".concat(classes.root, "-range");
148
+ }
149
+ } else if (selectedEndDate && isSame(selectedEndDate, itemDate)) {
150
+ result = "".concat(classes.root, "-end");
151
+ } else if (selectedStartDate && selectedEndDate && dayjs(itemDate).diff(selectedStartDate) > 0 && dayjs(itemDate).diff(selectedEndDate) < 0) {
152
+ result = "".concat(classes.root, "-middle");
153
+ }
154
+ if (highlightDate === 'today' && isToday && !result) {
155
+ result = "".concat(classes.root, "-today");
156
+ }
157
+ return result;
158
+ };
159
+ var defaultDateRender = function defaultDateRender(ins) {
160
+ var dayClassName = getDayClassName(ins);
161
+ return /*#__PURE__*/React.createElement("div", {
162
+ className: clsx(classes.day, (ins === null || ins === void 0 ? void 0 : ins.disabled) && classes.disabled, dayClassName)
163
+ }, ins.day && dayjs(ins.day).format('D'));
164
+ };
165
+ var onClickDay = function onClickDay(e, ins) {
166
+ if (ins !== null && ins !== void 0 && ins.disabled) return;
167
+ if (isRangeMode) {
168
+ // 都无值
169
+ if (!selectedStartDate && !selectedEndDate) {
170
+ triggerChange === null || triggerChange === void 0 || triggerChange(e, [ins.day, null]);
171
+ }
172
+ // start有值,end无值
173
+ else if (selectedStartDate && !selectedEndDate) {
174
+ var result;
175
+ // 选中了start,此时置空start
176
+ if (isSame(ins.day, selectedStartDate)) {
177
+ result = [null, null];
178
+ } else {
179
+ // 比较当前选中日期与start,重新赋值start、end
180
+ result = dayjs(ins.day).diff(dayjs(selectedStartDate)) < 0 ? [ins.day, selectedStartDate] : [selectedStartDate, ins.day];
181
+ }
182
+ triggerChange === null || triggerChange === void 0 || triggerChange(e, result);
183
+ }
184
+ // start、end都有值,选中日期为start
185
+ else if (selectedStartDate && selectedEndDate) {
186
+ triggerChange === null || triggerChange === void 0 || triggerChange(e, [ins.day, null]);
187
+ }
188
+ return;
189
+ }
190
+
191
+ // 单选模式使用selectedStartDate判断是否已选中
192
+ var hasSelectedDate = selectedStartDate && isSame(ins.day, selectedStartDate);
193
+ triggerChange === null || triggerChange === void 0 || triggerChange(e, hasSelectedDate ? null : ins.day);
194
+ };
195
+ var renderDayList = function renderDayList() {
196
+ return getDaysInMonth(renderMonth).map(function (ins, index) {
197
+ var dayStr = dayjs(ins.day).format('YYYYMMDD');
198
+ return /*#__PURE__*/React.createElement("div", {
199
+ className: clsx("".concat(classes.day, "-box"), _defineProperty({}, "".concat(classes.root, "-highlight-day"), highlightDate === 'weekend' && !ins.disabled && (index % 7 === 0 || index % 7 === 6))),
200
+ key: "".concat(dayStr, "-").concat(index),
201
+ onClick: function onClick(e) {
202
+ return onClickDay(e, ins);
203
+ }
204
+ }, dateRender ? dateRender(ins) : defaultDateRender(ins));
205
+ });
206
+ };
207
+
208
+ /**
209
+ * 切换上一个月
210
+ */
211
+ var onClickPrev = function onClickPrev(e) {
212
+ if (!isMinMonth) {
213
+ var month = dayjs(renderMonth).subtract(1, 'month').toDate();
214
+ setRenderMonth(month);
215
+ onMonthChange === null || onMonthChange === void 0 || onMonthChange(e, {
216
+ type: 'prev',
217
+ month: dayjs(month).format('YYYY/MM')
218
+ });
219
+ }
220
+ };
221
+
222
+ /**
223
+ * 切换下一个月
224
+ */
225
+ var onClickNext = function onClickNext(e) {
226
+ if (!isMaxMonth) {
227
+ var month = dayjs(renderMonth).add(1, 'month').toDate();
228
+ setRenderMonth(month);
229
+ onMonthChange === null || onMonthChange === void 0 || onMonthChange(e, {
230
+ type: 'next',
231
+ month: dayjs(month).format('YYYY/MM')
232
+ });
233
+ }
234
+ };
235
+ var data = {};
236
+ if (isRangeMode) {
237
+ data = {
238
+ 'data-start': dayjs(selectedStartDate).format('YYYYMMDD'),
239
+ 'data-end': dayjs(selectedEndDate).format('YYYYMMDD')
240
+ };
241
+ } else {
242
+ data = {
243
+ 'data-selected': dayjs(selectedStartDate).format('YYYYMMDD')
244
+ };
245
+ }
246
+ return /*#__PURE__*/React.createElement("div", _extends({
247
+ ref: ref,
248
+ className: clsx(classes.root, className, _defineProperty({}, "".concat(classes.root, "-highlight-weekend"), highlightDate === 'weekend'))
249
+ }, others, {
250
+ "data-mode": mode
251
+ }, data), /*#__PURE__*/React.createElement("div", {
252
+ className: classes.handler
253
+ }, /*#__PURE__*/React.createElement("div", {
254
+ onClick: onClickPrev,
255
+ className: "".concat(classes.handler, "-btn")
256
+ }, /*#__PURE__*/React.createElement(CaretLeftIcon, {
257
+ className: "".concat(classes.handler, "-btn-icon"),
258
+ htmlColor: isMinMonth && '#cccccc'
259
+ })), /*#__PURE__*/React.createElement("div", {
260
+ className: "".concat(classes.handler, "-text")
261
+ }, dayjs(renderMonth).format('YYYY/MM')), /*#__PURE__*/React.createElement("div", {
262
+ onClick: onClickNext,
263
+ className: "".concat(classes.handler, "-btn")
264
+ }, /*#__PURE__*/React.createElement(CaretRightIcon, {
265
+ className: "".concat(classes.handler, "-btn-icon"),
266
+ htmlColor: isMaxMonth && '#cccccc'
267
+ }))), /*#__PURE__*/React.createElement("div", {
268
+ className: classes.week
269
+ }, SUNDAY_WEEK_DATA === null || SUNDAY_WEEK_DATA === void 0 ? void 0 : SUNDAY_WEEK_DATA.map(function (w) {
270
+ return weekRender ? weekRender(w) : /*#__PURE__*/React.createElement("div", {
271
+ key: w,
272
+ className: "".concat(classes.week, "-item")
273
+ }, w);
274
+ })), /*#__PURE__*/React.createElement("div", {
275
+ className: clsx("".concat(classes.root, "-month"))
276
+ }, renderDayList()));
277
+ });
278
+ Calendar.displayName = 'BuiCalendar';
279
+ Calendar.defaultProps = {
280
+ hideDaysOutsideCurrentMonth: false,
281
+ mode: 'single',
282
+ minDate: dayjs(dayjs().format('YYYYMMDD')).add(0, 'month').toDate(),
283
+ maxDate: dayjs(dayjs().format('YYYYMMDD')).add(11, 'month').toDate(),
284
+ highlightDate: 'today'
285
+ };
286
+ export default Calendar;
@@ -0,0 +1,76 @@
1
+ import { OverrideProps } from '@bifrostui/types';
2
+ import React from 'react';
3
+ export interface ICalendarInstance {
4
+ /** 日期对象 */
5
+ day: Date;
6
+ /** 是否禁用 */
7
+ disabled: boolean;
8
+ }
9
+ export interface ICalendarMonthChangeData {
10
+ /** 切换后的月份 */
11
+ month: string;
12
+ /** 操作类型,prev: 点击上个月 next: 点击下个月 */
13
+ type: 'prev' | 'next';
14
+ }
15
+ export type ICalendarMode = 'single' | 'range';
16
+ export type ICalendarValue = Date | Date[] | null;
17
+ export type CalendarProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<{
18
+ props: P & {
19
+ /**
20
+ * 默认选中的值,当组件非受控时使用
21
+ */
22
+ defaultValue?: ICalendarValue;
23
+ /**
24
+ * 选中的值,当组件受控时使用
25
+ */
26
+ value?: ICalendarValue;
27
+ /**
28
+ * 可选择的最小日期,默认为当前日期
29
+ * 渲染指定月时:value=null并指定minDate
30
+ */
31
+ minDate?: Date;
32
+ /**
33
+ * 可选择的最大日期,默认为当前日期的一年后
34
+ */
35
+ maxDate?: Date;
36
+ /**
37
+ * 选择类型,默认为single
38
+ * single 表示选择单个日期
39
+ * range 表示选择日期区间
40
+ */
41
+ mode?: ICalendarMode;
42
+ /**
43
+ * 是否隐藏当前月之外的日期,默认为false
44
+ */
45
+ hideDaysOutsideCurrentMonth?: boolean;
46
+ /**
47
+ * 不可选择的日期
48
+ */
49
+ disabledDate?: (currentDate: Date) => boolean;
50
+ /**
51
+ * 高亮的日期,默认为today
52
+ * today 若选中的非当天,则当天高亮显示,若选中的是当天,则当天展示选中态
53
+ * weekend 可选的周末高亮显示
54
+ */
55
+ highlightDate?: 'today' | 'weekend';
56
+ /**
57
+ * 自定义日期单元格的内容
58
+ */
59
+ dateRender?: (currentDate: ICalendarInstance) => React.ReactNode;
60
+ /**
61
+ * 自定义周单元格的内容
62
+ */
63
+ weekRender?: (week: string) => React.ReactNode;
64
+ /**
65
+ * 月份发生变化的回调
66
+ */
67
+ onMonthChange?: (e: React.SyntheticEvent, data: ICalendarMonthChangeData) => void;
68
+ /**
69
+ * 日期发生变化的回调
70
+ */
71
+ onChange?: (e: React.SyntheticEvent, data: {
72
+ value: ICalendarValue;
73
+ }) => void;
74
+ };
75
+ defaultComponent: D;
76
+ }, D>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as Calendar, default } from './Calendar';
2
+ export * from './Calendar.types';
@@ -0,0 +1,2 @@
1
+ export { default as Calendar, default } from "./Calendar";
2
+ export * from "./Calendar.types";
@@ -0,0 +1,25 @@
1
+ import { ICalendarMode, ICalendarValue } from './Calendar.types';
2
+ /**
3
+ * 判断日期是否相同
4
+ */
5
+ export declare const isSame: (start: Date, end: Date) => boolean;
6
+ /**
7
+ * 计算日期差
8
+ */
9
+ export declare const geteDateDiff: (a: Date, b: Date) => number;
10
+ /**
11
+ * 判断是否在日期区间内
12
+ */
13
+ export declare const isRange: (current: Date, start: Date, end: Date) => boolean;
14
+ /**
15
+ * 取数组第一个日期为开始日期,最后一个日期为结束日期
16
+ */
17
+ export declare const generateRangeDate: (value: Date[]) => {
18
+ start: Date;
19
+ end: Date;
20
+ };
21
+ /**
22
+ * 格式化初始日期
23
+ * @return undefined | Array<Date|null>
24
+ */
25
+ export declare const formatDate: (mode: ICalendarMode, value: ICalendarValue, minDate: Date, maxDate: Date) => any[] | Date;